/* ============================================================
   NEWSLETTER – Liste, Baustein-Editor links, Vorschau rechts
   Status als Rand rundum (keine farbigen Streifen links)
   ============================================================ */
.nl-kopfzeile { align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.nl-kopfzeile > div:first-child { flex: 1 1 420px; min-width: 0; }
.nl-kopfzeile .text-muted { margin: 0; max-width: 680px; line-height: 1.5; }
.nl-aktionen { display: flex; align-items: center; gap: 12px; margin-left: auto; flex-wrap: wrap; }
.nl-empf-info { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-soft); }
.nl-empf-info .material-icons { font-size: 18px; }
.nl-fehlerzahl { color: var(--danger); font-size: 12px; }

.nl-chip { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 2px solid transparent; white-space: nowrap; }
.nl-st-entwurf.nl-chip { background: var(--surface, #f6f4ef); border-color: var(--line, #ddd); color: var(--ink-soft); }
.nl-st-laeuft.nl-chip { background: var(--pal-blau-hell, #e6eef8); border-color: var(--pal-blau, #3b78c4); color: var(--pal-blau-dunkel, #1f4e89); }
.nl-st-halt.nl-chip { background: var(--pal-senf-hell, #f7f2e4); border-color: var(--pal-senf-mittel, #d8c27a); color: var(--pal-senf-dunkel, #6b5a1e); }
.nl-st-fertig.nl-chip { background: var(--pal-gruen-hell, #e5f3e8); border-color: var(--pal-gruen, #2e7d32); color: var(--pal-gruen, #2e7d32); }

/* [hidden] gilt auch für Knöpfe mit display:inline-flex */
.nl-seite [hidden] { display: none !important; }

/* Editor-Leiste */
.nl-leiste { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0 12px; background: var(--surface, #f6f4ef); }
.nl-titel { flex: 1 1 260px; min-width: 180px; font-size: 18px; font-weight: 600; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line, #ddd); background: var(--paper, #fff); color: var(--ink); }
.nl-sicher { font-size: 12.5px; color: var(--ink-soft); min-width: 92px; }
.nl-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.nl-knoepfe .btn, .nl-leiste > .btn { display: inline-flex; align-items: center; gap: 6px; }
#nl-estatus:not(:empty) { margin: 0 0 12px; }

.nl-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr); gap: 22px; align-items: start; padding-bottom: 40px; }
.nl-box { margin: 0 0 18px; }
.nl-box .field { margin-bottom: 12px; }
.nl-box label small { font-weight: 400; color: var(--ink-soft); }
.nl-box textarea { width: 100%; resize: vertical; line-height: 1.5; font-family: inherit; }
.nl-format-hilfe code, .nl-ph-knopf { font-family: inherit; }
.nl-format-hilfe code { padding: 1px 6px; border-radius: 6px; background: var(--neutral-100, #f2f1ee); font-size: 12px; color: var(--ink); }

/* Bausteine */
.nl-bausteine { display: flex; flex-direction: column; gap: 12px; }
.nl-baustein { background: var(--paper, #fff); border: 1px solid var(--line, #e5e5e5); border-radius: 12px; padding: 10px 14px 4px; }
.nl-baustein:focus-within { border-color: var(--pal-senf-mittel, #e5d7a5); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pal-senf-mittel, #e5d7a5) 35%, transparent); }
.nl-bkopf { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.nl-bkopf > .material-icons { font-size: 19px; color: var(--pal-gold-mittel, #c59556); }
.nl-bkopf b { font-size: 14px; }
.nl-bknoepfe { margin-left: auto; display: flex; gap: 2px; }
.nl-bknoepfe button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-soft); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.nl-bknoepfe button:hover:not(:disabled) { background: var(--surface, #f6f4ef); color: var(--ink); }
.nl-bknoepfe button:disabled { opacity: .3; cursor: default; }
.nl-bknoepfe .material-icons { font-size: 18px; }
.nl-bknoepfe .nl-bweg:hover { color: var(--danger); background: var(--danger-tint, #fde8e8); }
.nl-zeile-titel .field:first-child { flex: 3 1 0; }
.nl-leer-hinweis { margin: 4px 0; color: var(--ink-soft); font-style: italic; }
.nl-ph { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 10px; font-size: 12.5px; color: var(--ink-soft); }
.nl-ph-knopf { padding: 2px 9px; border-radius: 999px; border: 1px dashed var(--line, #ccc); background: var(--surface, #f6f4ef); font-size: 12px; color: var(--ink); cursor: pointer; }
.nl-ph-knopf:hover { border-style: solid; border-color: var(--pal-senf-mittel, #e5d7a5); }

.nl-neu-leiste { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 10px; }
.nl-neu-knopf { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; border: 1px dashed var(--ink-faint, #bbb); background: var(--paper, #fff); color: var(--ink); font: inherit; font-size: 13.5px; cursor: pointer; }
.nl-neu-knopf .material-icons { font-size: 18px; color: var(--pal-gold-mittel, #c59556); }
.nl-neu-knopf:hover { border-style: solid; border-color: var(--pal-gold-mittel, #c59556); background: var(--pal-gold-tint, #fbf4e3); }

/* Bild-Baustein */
.nl-bild { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; align-items: start; }
.nl-bild-feld { display: flex; align-items: center; justify-content: center; min-height: 130px; border: 2px dashed var(--line, #ccc); border-radius: 12px; background: var(--surface, #f6f4ef); cursor: pointer; overflow: hidden; text-align: center; font-size: 12.5px; color: var(--ink-soft); }
.nl-bild-feld img { display: block; width: 100%; height: auto; }
.nl-bild-feld .material-icons { font-size: 30px; }
.nl-bild-feld.is-ueber { border-color: var(--pal-gold-mittel, #c59556); background: var(--pal-gold-tint, #fbf4e3); }
.nl-bild-feld.is-laedt { opacity: .5; pointer-events: none; }
.nl-bild-feld.is-aus { cursor: default; }

/* Produkt-Baustein */
.nl-pkacheln { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.nl-pkachel { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 140px; padding: 10px; border: 1px solid var(--line, #e5e5e5); border-radius: 10px; background: var(--paper, #fff); font-size: 12.5px; text-align: center; line-height: 1.3; }
.nl-pkachel img { width: 100%; height: 90px; object-fit: contain; }
.nl-pkachel > .material-icons { font-size: 40px; color: var(--ink-faint); }
.nl-pweg { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--surface, #f2f2f2); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.nl-pweg .material-icons { font-size: 16px; }
.nl-pdazu { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 140px; min-height: 130px; border: 2px dashed var(--line, #ccc); border-radius: 10px; background: var(--surface, #f6f4ef); font: inherit; font-size: 13px; color: var(--ink-soft); cursor: pointer; }
.nl-pdazu:hover { border-color: var(--pal-gold-mittel, #c59556); color: var(--ink); }
.nl-pdialog .dialog-inner { width: min(640px, 94vw); }
.nl-nurshop { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-size: 13.5px; }
.nl-pliste { display: flex; flex-direction: column; gap: 6px; max-height: 56vh; overflow: auto; }
.nl-pzeile { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--line, #e5e5e5); border-radius: 10px; background: var(--paper, #fff); text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.nl-pzeile:hover { border-color: var(--pal-gold-mittel, #c59556); }
.nl-pzeile.is-gewaehlt { border: 2px solid var(--pal-gruen, #2e7d32); }
.nl-pzeile img { width: 56px; height: 48px; object-fit: contain; }
.nl-pzeile > .material-icons { font-size: 30px; color: var(--ink-faint); text-align: center; }
.nl-pzeile b { display: block; font-size: 14px; }
.nl-pzeile small { color: var(--ink-soft); font-size: 12px; }
.nl-pzeile em { font-style: normal; font-weight: 700; white-space: nowrap; }

/* Vorschau */
.nl-rechts { position: sticky; top: 70px; }
.nl-vorschau-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.nl-geraet { display: inline-flex; border: 1px solid var(--line, #ddd); border-radius: 10px; overflow: hidden; }
.nl-geraet button { width: 40px; height: 34px; border: 0; background: var(--paper, #fff); color: var(--ink-soft); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.nl-geraet button.is-an { background: var(--login-background, #e8c547); color: var(--neutral-800, #222); }
.nl-postfach { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 8px; border-radius: 10px; background: var(--paper, #fff); border: 1px solid var(--line, #e5e5e5); font-size: 13px; }
.nl-postfach .material-icons { font-size: 20px; color: var(--ink-faint); }
.nl-postfach div { display: flex; flex-direction: column; min-width: 0; }
.nl-postfach span { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nl-rahmen { background: #e9e9e9; border-radius: 12px; padding: 10px; transition: padding .2s; }
.nl-rahmen iframe { display: block; width: 100%; height: calc(100vh - 210px); min-height: 520px; border: 0; border-radius: 8px; background: #f5f5f5; margin: 0 auto; transition: width .2s; }
.nl-rahmen.is-handy iframe { width: 390px; max-width: 100%; border: 8px solid #222; border-radius: 26px; }

/* Versandstand */
.nl-versand { margin: 0 0 18px; padding: 16px 18px; border-radius: 14px; background: var(--paper, #fff); border: 3px solid var(--line, #ddd); }
.nl-versand.nl-st-laeuft { border-color: var(--pal-blau, #3b78c4); }
.nl-versand.nl-st-halt { border-color: var(--pal-senf-mittel, #d8c27a); }
.nl-versand.nl-st-fertig { border-color: var(--pal-gruen, #2e7d32); }
.nl-vkopf { display: flex; align-items: center; gap: 12px; }
.nl-vkopf > .material-icons { font-size: 32px; color: var(--ink-soft); }
.nl-st-laeuft .nl-vkopf > .material-icons { color: var(--pal-blau, #3b78c4); }
.nl-st-fertig .nl-vkopf > .material-icons { color: var(--pal-gruen, #2e7d32); }
.nl-vkopf div { display: flex; flex-direction: column; flex: 1; }
.nl-vkopf b { font-size: 17px; }
.nl-vkopf small { color: var(--ink-soft); }
.nl-balken { height: 16px; margin: 14px 0 10px; border-radius: 999px; background: var(--surface, #eee); overflow: hidden; }
.nl-balken div { height: 100%; border-radius: 999px; background: var(--pal-blau, #3b78c4); transition: width .6s; }
.nl-st-fertig .nl-balken div { background: var(--pal-gruen, #2e7d32); }
.nl-st-laeuft .nl-balken div { background-image: linear-gradient(45deg, rgba(255,255,255,.25) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.25) 50%, rgba(255,255,255,.25) 75%, transparent 75%); background-size: 24px 24px; animation: nl-lauf 1s linear infinite; }
@keyframes nl-lauf { to { background-position: 24px 0; } }
.nl-zahlen { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-soft); }
.nl-zahlen b { font-size: 18px; color: var(--ink); margin-right: 3px; }
.nl-rot, .nl-rot b { color: var(--danger) !important; }
.nl-versand details { margin-top: 12px; }
.nl-versand summary { cursor: pointer; font-size: 13.5px; font-weight: 600; }
.nl-elist { max-height: 320px; overflow: auto; margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.nl-ezeile { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 6px 10px; border-radius: 8px; background: var(--surface, #f6f4ef); font-size: 13px; }
.nl-ezeile span small { display: block; color: var(--ink-soft); font-size: 12px; }
.nl-ezeile em { grid-column: 1 / -1; font-style: normal; font-size: 12px; color: var(--danger); }
.nl-e-Gesendet b { color: var(--pal-gruen, #2e7d32); }
.nl-e-Fehler b { color: var(--danger); }
.nl-e-bersprungen b, .nl-e-Offen b { color: var(--ink-soft); }

.nl-gesperrt .nl-links { opacity: .85; }

@media (max-width: 1100px) {
  .nl-raster { grid-template-columns: 1fr; }
  .nl-rechts { position: static; }
  .nl-rahmen iframe { height: 70vh; }
}
@media (max-width: 600px) {
  .nl-knoepfe .btn span { display: none; }
  .nl-bild { grid-template-columns: 1fr; }
  .nl-leiste { position: static; }
}
body.dark-mode .nl-rahmen { background: #1b1b1b; }
