/* Ergänzungen der Testversion 0.17.460 – Farben und Fristenband nach den Entwürfen vom 23.11.2026.
   Unlayered: gewinnt gegen die Token der Schicht "mandreo-preview", ohne deren Regeln zu ändern. */
:root {
  --preview-ink: #111d31;
  --preview-muted: #414e62;
  --preview-icon: #6a7893;
  --preview-line: #d9e1f0;
  --preview-hairline: #e6ecf6;
  --preview-canvas: #f8fbff;
  --preview-soft: #eef3fd;
  --preview-selection: #e7eeff;
  --preview-sidebar: #f3f6fd;
  --preview-sidebar-ink: #26334a;
  --preview-active: #223d8c;
  --preview-accent: #223d8c;
  --preview-accent-hover: #182f74;
  --preview-focus: #223d8c;
  --preview-control-edge: #8794ad;
  --preview-screen-control: #aebcda;
  --nb-attention: #a94d1e;
  --nb-attention-tint: #fdf1e9;
  --nb-attention-line: #f1d3bf;
  --nb-stem: #aebcda;
}

/* Die drei Zahlenkacheln weichen in der Testversion dem Fristenband. */

.nb-band-card {
  background: #fff; border: 1px solid var(--preview-line); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(24,47,116,.04), 0 12px 32px -20px rgba(24,47,116,.16);
  color: var(--preview-ink); position: relative; min-width: 0;
}
.nb-band-head { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 20px 0 24px; flex-wrap: wrap; }
.nb-band-head h2 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.02em; color: var(--preview-ink); }
.nb-band-head .nb-meta { color: var(--preview-muted); font-size: 12.5px; }
.nb-legend { display: flex; gap: 16px; margin-left: 16px; color: var(--preview-muted); font-size: 12.5px; }
.nb-legend span { display: inline-flex; align-items: center; gap: 6px; }
.nb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--preview-active); flex: none; display: inline-block; }
.nb-dot.nb-termin { border-radius: 1px; transform: rotate(45deg); background: #fff; box-shadow: inset 0 0 0 1.5px var(--preview-active); }
.nb-dot.nb-heute { background: var(--nb-attention); }
.nb-open {
  margin-left: auto; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 8px;
  border: 0; background: none; border-radius: 8px; color: var(--preview-muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.nb-open:hover { color: var(--preview-active); background: var(--preview-soft); }
.nb-band { padding: 0 24px 20px; }
.nb-pins { position: relative; height: 64px; }
.nb-pin {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px 0 8px; max-width: 100%;
  border: 1px solid var(--preview-line); border-radius: 14px; background: #fff; color: var(--preview-ink);
  font: inherit; font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; box-sizing: border-box;
}
.nb-pin:hover { border-color: var(--preview-control-edge); }
.nb-pin .nb-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nb-pin em { font-style: normal; font-weight: 400; color: var(--preview-muted); margin-left: 6px; }
.nb-pin .nb-plus { height: 18px; padding: 0 6px; border-radius: 9px; background: var(--preview-selection); color: var(--preview-active); font-size: 11px; font-weight: 650; display: inline-flex; align-items: center; flex: none; }
.nb-pin::after { content: ""; position: absolute; left: 10.5px; top: calc(100% + 1px); width: 1px; height: var(--nb-stem-h, 8px); background: var(--nb-stem); pointer-events: none; }
.nb-pin[hidden] { display: none; }
.nb-pin.nb-row1 { top: 0; --nb-stem-h: 44px; }
.nb-pin.nb-row2 { top: 36px; --nb-stem-h: 8px; }
.nb-pin.nb-hot { background: var(--nb-attention-tint); border-color: var(--nb-attention-line); color: #7c3410; }
.nb-pin.nb-hot em { color: #7c3410; }
.nb-pin.nb-hot::after { background: #e3a783; }
.nb-pin.nb-hot .nb-dot:not(.nb-termin) { background: var(--nb-attention); }
.nb-pin.nb-hot .nb-dot.nb-termin { box-shadow: inset 0 0 0 1.5px var(--nb-attention); background: var(--nb-attention-tint); }
.nb-days { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); margin-top: 8px; }
.nb-day {
  position: relative; border: 0; border-top: 1px solid var(--preview-line); background: none; padding: 10px 0 6px; margin: 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; color: var(--preview-ink); cursor: default; border-radius: 0 0 12px 12px;
}
.nb-day[data-count]:not([data-count="0"]) { cursor: pointer; }
.nb-day[data-count]:not([data-count="0"]):hover b { background: var(--preview-soft); }
.nb-day small { font-size: 11px; font-weight: 500; letter-spacing: .03em; color: var(--preview-muted); }
.nb-day b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 500; }
.nb-day.nb-we small, .nb-day.nb-we b { color: #66738e; } /* 4,8:1 auf Weiß; vorher #97a3b8 mit 2,6:1 */
.nb-day.nb-today { background: linear-gradient(var(--nb-attention-tint), rgba(253,241,233,0)); }
.nb-day.nb-today small { color: var(--nb-attention); font-weight: 650; }
.nb-day.nb-today b, .nb-day.nb-today:hover b { background: var(--nb-attention) !important; color: #fff; font-weight: 650; }
.nb-day.nb-sel:not(.nb-today) b { box-shadow: 0 0 0 1.5px var(--preview-active); color: var(--preview-active); font-weight: 650; }
.nb-pin:focus-visible, .nb-ev:focus-visible, .nb-open:focus-visible, .nb-pop footer [role=button]:focus-visible { outline: 2px solid var(--preview-active); outline-offset: 2px; }
.nb-day:focus-visible { outline: 2px solid var(--preview-active); outline-offset: -2px; }
.nb-marks { position: absolute; top: -4px; left: 50%; transform: translateX(-50%); display: flex; gap: 3px; background: #fff; padding: 0 3px; }
.nb-tick { position: absolute; top: 0; left: 50%; width: 1px; height: 5px; background: var(--preview-line); }
.nb-month { position: absolute; top: -21px; left: 50%; transform: translateX(-50%); font-size: 10.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--preview-muted); background: #fff; padding: 0 4px; }
.nb-empty { padding: 6px 24px 22px; color: var(--preview-muted); }
.nb-pop {
  position: absolute; z-index: 40; width: 372px; max-width: calc(100% - 16px); background: #fff; border: 1px solid var(--preview-line); border-radius: 14px; text-align: left;
  box-shadow: 0 2px 6px rgba(24,47,116,.08), 0 24px 48px -16px rgba(24,47,116,.28);
}
.nb-pop header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 16px; border-bottom: 1px solid var(--preview-hairline); }
.nb-pop header strong { font-size: 14px; font-weight: 650; }
.nb-pop header span { font-size: 12.5px; color: var(--preview-muted); }
.nb-ev { display: grid; grid-template-columns: 44px 8px minmax(0, 1fr); column-gap: 10px; align-items: center; width: 100%; min-height: 48px; padding: 6px 16px; border: 0; border-top: 1px solid var(--preview-hairline); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; box-sizing: border-box; }
.nb-pop header + .nb-ev { border-top: 0; }
.nb-ev:hover { background: var(--preview-soft); }
.nb-ev time { font-size: 12.5px; font-weight: 600; }
.nb-ev time.nb-frist { font-weight: 500; color: var(--preview-muted); }
.nb-ev .nb-t1 { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-ev .nb-t2 { font-size: 12.5px; color: var(--preview-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-pop footer { border-top: 1px solid var(--preview-hairline); padding: 8px; }
.nb-pop footer [role=button] { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 32px; border: 0; border-radius: 8px; background: none; color: var(--preview-active); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.nb-pop footer [role=button]:hover { background: var(--preview-soft); }
@media (max-width: 900px) { .nb-band-card { display: none; } html[data-design-preview] body #app #content .start-page144.nb-has-band > .preview-start-metrics { display: grid !important; } }
@media (prefers-reduced-motion: no-preference) { .nb-pop { animation: nb-in .12s ease-out; } @keyframes nb-in { from { opacity: 0; transform: translateY(-4px); } } }

/* Adressbuch: die beiden Karten stießen ohne Abstand aneinander. */
html[data-design-preview] body #app #content .private-address396 + .address-workspace { margin-top: 24px !important; }

/* ───── Design-Durchsicht vom 23.11.2026 ─────
   Regeln mit Vorrang stehen in einer früher erklärten Schicht, weil die Vorschau-Schicht mit !important arbeitet. */
@layer nb-vorrang {
  /* ───── Finanzen und Dokumente, 23.11.2026 ───── */
  /* Reiterzeile der Finanzen: nur eine Linie darunter. */
  html[data-design-preview] body #app #content .finance-controls338 { border-bottom: 0 !important; padding-bottom: 0 !important; }
  /* Diagramm: Eingänge grün, Ausgänge blau – vorher zwei dunkle Töne. */
  html[data-design-preview] body #app #content .finance-stick182:not(.outgoing) { background: #1f8a5b !important; }
  html[data-design-preview] body #app #content .finance173-legend span:first-child::before { background: #1f8a5b !important; }
  html[data-design-preview] body #app #content .finance-stick182.outgoing, html[data-design-preview] body #app #content .finance173-legend span:last-child::before { background: #223d8c !important; }
  /* Letzte Kontoaktivitäten: eine Zeile je Buchung. */
  html[data-design-preview] body #app #content .finance173-transaction { min-height: 44px !important; padding-top: 8px !important; padding-bottom: 8px !important; align-items: center !important; }
  html[data-design-preview] body #app #content .finance173-transaction > span { display: flex !important; flex-direction: row !important; align-items: baseline !important; gap: 10px !important; min-width: 0 !important; }
  html[data-design-preview] body #app #content .finance173-transaction > span > b { flex: 0 0 auto !important; white-space: nowrap !important; }
  html[data-design-preview] body #app #content .finance173-transaction > span > small { flex: 0 1 auto !important; min-width: 0 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; margin: 0 !important; }
  html[data-design-preview] body #app #content .finance173-transaction > span > small + small { display: none !important; }
  /* Dokumente in der Akte */
  html[data-design-preview] body #app #content .document-entry408 .document-actions96 > button:not([title*="Herunterladen"]):not([aria-label*="Herunterladen"]) { display: none !important; }
  html[data-design-preview] body #app #content .document-entry408 .document-actions96.nb-open > button { display: inline-flex !important; }
  html[data-design-preview] body #app #content .document-entry408 .document-actions96 { align-items: center !important; gap: 8px !important; flex-wrap: nowrap !important; }
  html[data-design-preview] body #app #content .document-entry408 .document-actions96 > button.delete:not(:hover):not(:focus-visible) { color: var(--preview-muted) !important; border-color: var(--preview-line) !important; background: #fff !important; }
  html[data-design-preview] body #app #content .document-entry408 .document-actions96 > button.delete:not(:hover):not(:focus-visible) svg { color: inherit !important; stroke: currentColor !important; }
  html[data-design-preview] body #app #content .nb-doc-open { cursor: pointer !important; }
  html[data-design-preview] body #app #content .document-entry408:hover { background: var(--preview-canvas) !important; }
  @media (min-width: 860px) {
    /* Breite der Ordnerspalte bleibt wie im Programm (sie ist dort verschiebbar); nur der Umbruch mitten im Wort entfällt. */
    html[data-design-preview] body #app #content .document-folder-pane408 * { overflow-wrap: normal !important; word-break: normal !important; hyphens: auto !important; }
  }
  /* Feldränder: 3,1:1 statt 1,3:1 gegen Weiß. Fokus, Fehler und gesperrte Felder behalten ihre eigene Farbe. */
  html[data-design-preview] body .nb-field:not(:focus):not(:focus-visible):not([aria-invalid="true"]):not(:disabled) { border-color: #8794ad !important; }

  @media (min-width: 860px) {
    /* Bankumsätze: die Knöpfe einer Buchung stehen am Zeilenende statt in einer eigenen Zeile darunter. */
    html[data-design-preview] body #app #content .bank-tx-panel145 .bank-tx-main { display: grid !important; grid-template-columns: minmax(0, 1fr) auto !important; column-gap: 16px !important; align-items: start !important; }
    html[data-design-preview] body #app #content .bank-tx-panel145 .bank-tx-main > * { grid-column: 1 !important; }
    html[data-design-preview] body #app #content .bank-tx-panel145 .bank-tx-main > .bank-tx-row-actions152 { grid-column: 2 !important; grid-row: 1 / span 2 !important; margin: 0 !important; flex-wrap: nowrap !important; align-self: start !important; }
    html[data-design-preview] body #app #content .bank-tx-panel145 .bank-tx-main > [id^="bankReceiptOptions152"] { grid-column: 1 / -1 !important; }
  }


  /* Übersicht: der E-Mail-Hinweis ist eine Zeile in „Heute im Blick" statt einer eigenen Karte. */
  html[data-design-preview] body #app #content .nb-mail-row { display: flex !important; align-items: center !important; gap: 12px !important; min-height: 52px !important; margin: 0 !important; padding: 8px 24px !important; border: 0 !important; border-bottom: 1px solid var(--preview-hairline) !important; border-radius: 0 !important; background: var(--preview-canvas) !important; box-shadow: none !important; }
  html[data-design-preview] body #app #content .nb-mail-row h2 { margin: 0 !important; font-size: 14px !important; font-weight: 600 !important; letter-spacing: 0 !important; }
  html[data-design-preview] body #app #content .nb-mail-row p { margin: 0 !important; color: var(--preview-muted) !important; font-size: 13px !important; }
  html[data-design-preview] body #app #content .nb-mail-row button { margin-left: auto !important; min-height: 32px !important; height: 32px !important; padding: 0 12px !important; }

  /* Einstellungen: die Suche steht links über dem Katalog statt allein rechts in einer leeren Zeile. */
  html[data-design-preview] body #app #content .settings-welcome.nb-left { justify-content: flex-start !important; min-height: 0 !important; padding: 0 !important; gap: 0 !important; }
  /* Titelblock bleibt für Vorleseprogramme erhalten, nimmt aber keinen Platz ein. */
  html[data-design-preview] body #app #content .settings-welcome.nb-left > :not(label) { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; margin: 0 !important; padding: 0 !important; }
  html[data-design-preview] body #app #content .settings-welcome.nb-left > label { margin: 0 !important; width: min(480px, 100%) !important; }
}

/* „Mehr" an einer Dokumentzeile */
.nb-doc-more { width: 40px; height: 40px; border: 1px solid var(--preview-line); border-radius: 9px; background: #fff; color: var(--preview-muted); display: inline-grid; place-items: center; font-size: 18px; line-height: 1; cursor: pointer; flex: none; user-select: none; }
.nb-doc-more:hover, .nb-doc-more[aria-expanded="true"] { background: var(--preview-soft); color: var(--preview-active); border-color: var(--preview-control-edge); }
.nb-doc-more:focus-visible { outline: 2px solid var(--preview-active); outline-offset: 2px; }
