/* Rueckfallwerte: die v2-Tokens sind auf .v2-layout definiert, nicht auf :root.
   Dialog und Kurzmeldungen koennen ausserhalb dieses Containers landen -
   ohne Rueckfall waeren dort alle Farben ungueltig (= durchsichtig). */
/* static/css/accounting.css — accounting-ui-v1
   Eigene Oberflaechenschicht fuer die Buchhaltung. Nutzt ausschliesslich die
   bestehenden v2-Designtokens (Farben, Radius, Schatten), damit die Seiten
   sich in den Rest der Anwendung einfuegen und Theme-Wechsel (physio-edition)
   automatisch mitgehen. */

.acc-page { --acc-gap: 1rem; }

/* ---------------------------------------------------------------- Kopfzeile */
.acc-head {
    display: flex; flex-wrap: wrap; gap: var(--acc-gap);
    align-items: flex-end; justify-content: space-between;
    margin-bottom: 1.25rem;
}
.acc-head h2 {
    font-size: 1.5rem; font-weight: 700; margin: 0;
    color: var(--v2-text, #1a2332); letter-spacing: -0.01em;
}
.acc-head .acc-sub {
    margin: 0.15rem 0 0; font-size: 0.875rem; color: var(--v2-text-muted, #8a97a8);
}
.acc-head-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* Zeitraumwahl: Pfeile + Auswahl als eine zusammenhaengende Einheit */
.acc-period {
    display: inline-flex; align-items: stretch;
    background: var(--v2-surface-card, #ffffff);
    border: 1px solid var(--v2-outline, rgba(94,109,127,0.12));
    border-radius: var(--v2-radius, 0.75rem);
    overflow: hidden;
}
.acc-period button {
    border: 0; background: transparent; color: var(--v2-text-secondary, #5e6d7f);
    padding: 0 0.7rem; cursor: pointer; font-size: 0.8rem; line-height: 1;
    transition: background 0.15s, color 0.15s;
}
.acc-period button:hover:not(:disabled) { background: var(--v2-surface-low, #edf1f5); color: var(--v2-text, #1a2332); }
.acc-period button:disabled { opacity: 0.3; cursor: default; }
.acc-period .acc-period-label {
    display: flex; align-items: center; padding: 0.45rem 0.85rem;
    font-size: 0.875rem; font-weight: 600; color: var(--v2-text, #1a2332);
    min-width: 8.5rem; justify-content: center;
    border-left: 1px solid var(--v2-outline, rgba(94,109,127,0.12));
    border-right: 1px solid var(--v2-outline, rgba(94,109,127,0.12));
    white-space: nowrap;
}
.acc-select, .acc-input {
    border: 1px solid var(--v2-outline, rgba(94,109,127,0.12)); border-radius: var(--v2-radius, 0.75rem);
    background: var(--v2-surface-card, #ffffff); color: var(--v2-text, #1a2332);
    padding: 0.45rem 0.7rem; font-size: 0.875rem; line-height: 1.2;
}
.acc-select:focus, .acc-input:focus {
    outline: none; border-color: var(--v2-primary, #2E6B94);
    box-shadow: 0 0 0 3px rgba(46,107,148,0.12);
}
.acc-input { min-width: 13rem; }

.acc-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    border: 1px solid var(--v2-outline, rgba(94,109,127,0.12)); border-radius: var(--v2-radius, 0.75rem);
    background: var(--v2-surface-card, #ffffff); color: var(--v2-text, #1a2332);
    padding: 0.45rem 0.85rem; font-size: 0.875rem; font-weight: 500;
    cursor: pointer; transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.acc-btn:hover { background: var(--v2-surface-low, #edf1f5); }
.acc-btn-primary {
    background: var(--v2-primary, #2E6B94); border-color: var(--v2-primary, #2E6B94); color: #fff;
}
.acc-btn-primary:hover { background: var(--v2-primary, #2E6B94); filter: brightness(1.08); }
.acc-btn-ghost { background: transparent; border-color: transparent; color: var(--v2-text-secondary, #5e6d7f); }
.acc-btn-ghost:hover { background: var(--v2-surface-low, #edf1f5); color: var(--v2-text, #1a2332); }
.acc-btn-danger { color: var(--v2-danger, #d94452); border-color: rgba(217,68,82,0.3); }
.acc-btn-danger:hover { background: rgba(217,68,82,0.08); }
.acc-btn:disabled { opacity: 0.5; cursor: default; }

/* ------------------------------------------------------------------- Karten */
.acc-card {
    background: var(--v2-surface-card, #ffffff);
    border: 1px solid var(--v2-outline, rgba(94,109,127,0.12));
    border-radius: var(--v2-radius, 0.75rem);
    box-shadow: var(--v2-shadow, 0px 12px 32px rgba(25,28,30,0.06));
}
.acc-card-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.75rem; padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--v2-outline, rgba(94,109,127,0.12));
}
.acc-card-head h3 {
    margin: 0; font-size: 0.95rem; font-weight: 650; color: var(--v2-text, #1a2332);
    display: flex; align-items: center; gap: 0.5rem;
}
.acc-card-head h3 i { color: var(--v2-text-muted, #8a97a8); font-size: 0.85em; }
.acc-card-body { padding: 1.1rem; }
.acc-card-body.p0 { padding: 0; }

/* --------------------------------------------------------------- Kennzahlen */
.acc-kpis {
    display: grid; gap: var(--acc-gap); margin-bottom: var(--acc-gap);
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}
.acc-kpi {
    position: relative; overflow: hidden;
    background: var(--v2-surface-card, #ffffff);
    border: 1px solid var(--v2-outline, rgba(94,109,127,0.12));
    border-radius: var(--v2-radius, 0.75rem);
    box-shadow: var(--v2-shadow, 0px 12px 32px rgba(25,28,30,0.06));
    padding: 1rem 1.1rem;
}
.acc-kpi::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: var(--acc-kpi-color, var(--v2-primary, #2E6B94));
}
.acc-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.acc-kpi-label {
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em;
    text-transform: uppercase; color: var(--v2-text-muted, #8a97a8);
}
.acc-kpi-icon {
    width: 2rem; height: 2rem; border-radius: 0.6rem;
    display: grid; place-items: center; font-size: 0.8rem;
    background: color-mix(in srgb, var(--acc-kpi-color, var(--v2-primary, #2E6B94)) 12%, transparent);
    color: var(--acc-kpi-color, var(--v2-primary, #2E6B94));
    flex: 0 0 auto;
}
.acc-kpi-value {
    margin-top: 0.55rem; font-size: 1.6rem; font-weight: 700; line-height: 1.1;
    color: var(--v2-text, #1a2332); font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.acc-kpi-value.is-negative { color: var(--v2-danger, #d94452); }
.acc-kpi-value.is-positive { color: var(--v2-success, #2d9d78); }
.acc-kpi-note { margin-top: 0.3rem; font-size: 0.78rem; color: var(--v2-text-muted, #8a97a8); }

/* ------------------------------------------------------------------ Tabelle */
.acc-table-wrap { overflow-x: auto; }
.acc-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.acc-table thead th {
    position: sticky; top: 0; z-index: 1;
    background: var(--v2-surface-low, #edf1f5);
    color: var(--v2-text-secondary, #5e6d7f);
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
    text-transform: uppercase; text-align: left;
    padding: 0.6rem 0.85rem; white-space: nowrap;
    border-bottom: 1px solid var(--v2-outline, rgba(94,109,127,0.12));
}
.acc-table tbody td {
    padding: 0.65rem 0.85rem; border-bottom: 1px solid var(--v2-outline, rgba(94,109,127,0.12));
    color: var(--v2-text, #1a2332); vertical-align: middle;
}
.acc-table tbody tr:last-child td { border-bottom: 0; }
.acc-table tbody tr:hover td { background: var(--v2-surface-low, #edf1f5); }
.acc-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.acc-table .muted { color: var(--v2-text-muted, #8a97a8); }
.acc-table .strong { font-weight: 650; }
.acc-table tr.is-storno td { color: var(--v2-text-muted, #8a97a8); text-decoration: line-through; }
.acc-table tr.is-storno td .acc-pill { text-decoration: none; }

.acc-acct {
    display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem; padding: 0.1rem 0.4rem; border-radius: 0.35rem;
    background: var(--v2-surface-low, #edf1f5); color: var(--v2-text-secondary, #5e6d7f);
    border: 1px solid var(--v2-outline, rgba(94,109,127,0.12));
}
.acc-acct.is-debit  { color: var(--v2-primary, #2E6B94); }
.acc-acct.is-credit { color: var(--v2-text-secondary, #5e6d7f); }
/* accounting-bank-acctnames-v1: Kontonummern, hinter denen eine Bezeichnung
   im Tooltip steht, bekommen einen sichtbaren Hinweis darauf — ohne ihn
   probiert niemand den Mauszeiger darueber aus. */
.acc-acct.has-name {
    cursor: help;
    border-bottom-style: dotted;
    border-bottom-width: 2px;
    border-bottom-color: currentColor;
}

.acc-pill {
    display: inline-flex; align-items: center; gap: 0.3rem;
    font-size: 0.72rem; font-weight: 650; padding: 0.2rem 0.55rem;
    border-radius: 999px; white-space: nowrap;
}
.acc-pill-success { background: rgba(45,157,120,0.12); color: var(--v2-success, #2d9d78); }
.acc-pill-info    { background: rgba(46,107,148,0.12); color: var(--v2-primary, #2E6B94); }
.acc-pill-warn    { background: rgba(214,158,46,0.15); color: #a86b12; }
.acc-pill-danger  { background: rgba(217,68,82,0.12); color: var(--v2-danger, #d94452); }
.acc-pill-muted   { background: var(--v2-surface-high, #e3e8ee); color: var(--v2-text-secondary, #5e6d7f); }

.acc-table-foot {
    display: flex; flex-wrap: wrap; gap: 1rem;
    align-items: center; justify-content: space-between;
    padding: 0.75rem 1.1rem; background: var(--v2-surface-low, #edf1f5);
    border-top: 1px solid var(--v2-outline, rgba(94,109,127,0.12));
    border-radius: 0 0 var(--v2-radius, 0.75rem) var(--v2-radius, 0.75rem);
    font-size: 0.85rem; color: var(--v2-text-secondary, #5e6d7f);
}
.acc-table-foot .strong { color: var(--v2-text, #1a2332); font-weight: 700; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------- Aufgaben / Hinweise */
.acc-task {
    display: flex; gap: 0.75rem; align-items: flex-start;
    padding: 0.7rem 0.8rem; margin-bottom: 0.5rem;
    border-radius: var(--v2-radius, 0.75rem); cursor: pointer;
    border: 1px solid transparent;
    background: var(--v2-surface-low, #edf1f5);
    transition: border-color 0.15s, transform 0.15s;
}
.acc-task:last-child { margin-bottom: 0; }
.acc-task:hover { border-color: var(--v2-outline, rgba(94,109,127,0.12)); transform: translateX(2px); }
.acc-task i { margin-top: 0.15rem; }
.acc-task-title { font-size: 0.875rem; color: var(--v2-text, #1a2332); }
.acc-task-note { font-size: 0.78rem; color: var(--v2-text-muted, #8a97a8); margin-top: 0.1rem; }
.acc-task.is-danger  { background: rgba(217,68,82,0.08); }
.acc-task.is-danger i { color: var(--v2-danger, #d94452); }
.acc-task.is-warn    { background: rgba(214,158,46,0.1); }
.acc-task.is-warn i  { color: #a86b12; }
.acc-task.is-info    { background: rgba(46,107,148,0.08); }
.acc-task.is-info i  { color: var(--v2-primary, #2E6B94); }

/* ------------------------------------------------- Leer- / Fehlerzustaende */
.acc-empty, .acc-error, .acc-loading {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0.6rem; padding: 2.5rem 1.25rem; text-align: center;
    color: var(--v2-text-muted, #8a97a8);
}
.acc-empty i, .acc-error i { font-size: 1.6rem; opacity: 0.6; }
.acc-empty-title, .acc-error-title { font-size: 0.95rem; font-weight: 600; color: var(--v2-text-secondary, #5e6d7f); }
.acc-empty-note, .acc-error-note { font-size: 0.83rem; max-width: 32rem; }
.acc-error i, .acc-error-title { color: var(--v2-danger, #d94452); }

.acc-skeleton {
    height: 0.85rem; border-radius: 0.35rem; margin: 0.55rem 0;
    background: linear-gradient(90deg, var(--v2-surface-low, #edf1f5) 25%,
                var(--v2-surface-high, #e3e8ee) 37%, var(--v2-surface-low, #edf1f5) 63%);
    background-size: 400% 100%;
    animation: acc-shimmer 1.3s ease-in-out infinite;
}
@keyframes acc-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) {
    .acc-skeleton { animation: none; }
    .acc-task:hover { transform: none; }
}

/* ------------------------------------------------------------------ Raster */
.acc-grid-2 { display: grid; gap: var(--acc-gap); grid-template-columns: 5fr 7fr; margin-bottom: var(--acc-gap); }
@media (max-width: 992px) { .acc-grid-2 { grid-template-columns: 1fr; } }

.acc-bwa-row td:first-child { color: var(--v2-text-secondary, #5e6d7f); }
.acc-bwa-row.is-subtotal td { font-weight: 700; color: var(--v2-text, #1a2332); background: var(--v2-surface-low, #edf1f5); }

.acc-hint {
    display: flex; gap: 0.55rem; align-items: flex-start;
    font-size: 0.8rem; color: var(--v2-text-muted, #8a97a8);
    padding: 0.6rem 0.75rem; margin-top: var(--acc-gap);
    background: var(--v2-surface-low, #edf1f5); border-radius: var(--v2-radius, 0.75rem);
}

/* ================================================================= Bank-Seite
   accounting-bank-ui-v1 — Bausteine, die Dashboard/Buchungen nicht brauchten. */

/* Hinweisbanner (z.B. "Direktanbindung nicht eingerichtet") */
.acc-notice {
    display: flex; gap: 0.85rem; align-items: flex-start;
    padding: 0.9rem 1.1rem; margin-bottom: var(--acc-gap);
    border: 1px solid var(--v2-outline, rgba(94,109,127,0.12)); border-left-width: 3px;
    border-radius: var(--v2-radius, 0.75rem); background: var(--v2-surface-card, #ffffff);
    box-shadow: var(--v2-shadow, 0px 12px 32px rgba(25,28,30,0.06));
}
.acc-notice > i { font-size: 1rem; margin-top: 0.15rem; flex: 0 0 auto; }
.acc-notice-title { font-size: 0.9rem; font-weight: 650; color: var(--v2-text, #1a2332); }
.acc-notice-note { font-size: 0.83rem; color: var(--v2-text-muted, #8a97a8); margin-top: 0.2rem; }
.acc-notice-actions { margin-top: 0.6rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.acc-notice.is-info    { border-left-color: var(--v2-primary, #2E6B94); }
.acc-notice.is-info > i { color: var(--v2-primary, #2E6B94); }
.acc-notice.is-warn    { border-left-color: #d69e2e; }
.acc-notice.is-warn > i { color: #a86b12; }
.acc-notice.is-danger  { border-left-color: var(--v2-danger, #d94452); }
.acc-notice.is-danger > i { color: var(--v2-danger, #d94452); }

/* Segmentfilter: EIN Bedienelement statt vier verschiedenfarbiger Knoepfe */
.acc-seg {
    display: inline-flex; padding: 0.2rem; gap: 0.15rem;
    background: var(--v2-surface-low, #edf1f5); border: 1px solid var(--v2-outline, rgba(94,109,127,0.12));
    border-radius: var(--v2-radius, 0.75rem); flex-wrap: wrap;
}
.acc-seg button {
    border: 0; background: transparent; cursor: pointer;
    padding: 0.35rem 0.75rem; border-radius: calc(var(--v2-radius, 0.75rem) - 0.15rem);
    font-size: 0.83rem; font-weight: 550; color: var(--v2-text-secondary, #5e6d7f);
    display: inline-flex; align-items: center; gap: 0.4rem;
    transition: background 0.15s, color 0.15s;
}
.acc-seg button:hover { color: var(--v2-text, #1a2332); }
.acc-seg button.is-active {
    background: var(--v2-surface-card, #ffffff); color: var(--v2-text, #1a2332);
    box-shadow: var(--v2-shadow, 0px 12px 32px rgba(25,28,30,0.06));
}
.acc-seg .acc-seg-count {
    font-size: 0.72rem; font-weight: 700; padding: 0.05rem 0.35rem;
    border-radius: 999px; background: var(--v2-surface-high, #e3e8ee);
    color: var(--v2-text-muted, #8a97a8); font-variant-numeric: tabular-nums;
}
.acc-seg button.is-active .acc-seg-count { background: var(--v2-surface-low, #edf1f5); }

/* Werkzeugleiste ueber der Tabelle */
.acc-toolbar {
    display: flex; flex-wrap: wrap; gap: 0.6rem;
    align-items: center; justify-content: space-between;
    padding: 0.75rem 1.1rem; border-bottom: 1px solid var(--v2-outline, rgba(94,109,127,0.12));
}
.acc-toolbar-group { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* Lange Texte in der Tabelle kuerzen — ohne feste Pixelbreite im Markup */
.acc-table .acc-clip {
    display: block; max-width: 22rem; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.acc-table .acc-clip-sm { max-width: 12rem; }
.acc-table td.acc-nowrap, .acc-table th.acc-nowrap { white-space: nowrap; }
.acc-table .acc-rowactions { display: flex; gap: 0.25rem; justify-content: flex-end; }
.acc-iconbtn {
    border: 1px solid var(--v2-outline, rgba(94,109,127,0.12)); background: var(--v2-surface-card, #ffffff);
    color: var(--v2-text-secondary, #5e6d7f); border-radius: var(--v2-radius, 0.75rem);
    width: 1.9rem; height: 1.9rem; display: grid; place-items: center;
    cursor: pointer; font-size: 0.78rem; transition: background 0.15s, color 0.15s;
}
.acc-iconbtn:hover { background: var(--v2-surface-low, #edf1f5); color: var(--v2-text, #1a2332); }
.acc-iconbtn.is-primary:hover { color: var(--v2-primary, #2E6B94); border-color: var(--v2-primary, #2E6B94); }
.acc-iconbtn.is-danger:hover  { color: var(--v2-danger, #d94452); border-color: var(--v2-danger, #d94452); }
.acc-iconbtn:disabled { opacity: 0.4; cursor: default; }

.acc-amount-in  { color: var(--v2-success, #2d9d78); font-weight: 650; }
.acc-amount-out { color: var(--v2-text, #1a2332); font-weight: 650; }

/* Dialog — eigener Overlay statt Bootstrap-Modal, damit die Seite auch dann
   bedienbar bleibt, wenn das Bootstrap-Bundle nicht geladen wurde. */
.acc-overlay {
    position: fixed; inset: 0; z-index: 1080;
    background: rgba(15, 23, 32, 0.45);
    display: flex; align-items: center; justify-content: center;
    padding: 1.25rem; overflow-y: auto;
}
.acc-modal {
    background: var(--v2-surface-card, #ffffff); border: 1px solid var(--v2-outline, rgba(94,109,127,0.12));
    border-radius: var(--v2-radius, 0.75rem); box-shadow: 0 18px 48px rgba(0,0,0,0.22);
    width: min(38rem, 100%); max-height: calc(100vh - 2.5rem);
    display: flex; flex-direction: column;
}
.acc-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.75rem; padding: 1rem 1.15rem; border-bottom: 1px solid var(--v2-outline, rgba(94,109,127,0.12));
}
.acc-modal-head h3 { margin: 0; font-size: 1rem; font-weight: 650; color: var(--v2-text, #1a2332); }
.acc-modal-body { padding: 1.15rem; overflow-y: auto; }
.acc-modal-foot {
    display: flex; gap: 0.5rem; justify-content: flex-end;
    padding: 0.9rem 1.15rem; border-top: 1px solid var(--v2-outline, rgba(94,109,127,0.12));
}
.acc-field { margin-bottom: 0.9rem; }
.acc-field:last-child { margin-bottom: 0; }
.acc-field label {
    display: block; font-size: 0.78rem; font-weight: 600;
    color: var(--v2-text-secondary, #5e6d7f); margin-bottom: 0.3rem;
}
.acc-field .acc-input, .acc-field .acc-select { width: 100%; min-width: 0; }
.acc-field-note { font-size: 0.75rem; color: var(--v2-text-muted, #8a97a8); margin-top: 0.25rem; }
.acc-field-row { display: grid; gap: 0.75rem; grid-template-columns: 1fr 1fr; }

/* Ablageflaeche fuer die Kontoauszugsdatei */
.acc-drop {
    border: 1.5px dashed var(--v2-outline, rgba(94,109,127,0.12)); border-radius: var(--v2-radius, 0.75rem);
    padding: 1.75rem 1.25rem; text-align: center; cursor: pointer;
    background: var(--v2-surface-low, #edf1f5); transition: border-color 0.15s, background 0.15s;
}
.acc-drop:hover, .acc-drop.is-over { border-color: var(--v2-primary, #2E6B94); background: var(--v2-surface-card, #ffffff); }
.acc-drop i { font-size: 1.5rem; color: var(--v2-text-muted, #8a97a8); }
.acc-drop-title { margin-top: 0.5rem; font-size: 0.9rem; font-weight: 600; color: var(--v2-text, #1a2332); }
.acc-drop-note { margin-top: 0.25rem; font-size: 0.8rem; color: var(--v2-text-muted, #8a97a8); }

/* Kurzmeldungen statt alert() */
.acc-toasts {
    position: fixed; right: 1rem; bottom: 1rem; z-index: 1090;
    display: flex; flex-direction: column; gap: 0.5rem; max-width: min(24rem, calc(100vw - 2rem));
}
.acc-toast {
    display: flex; gap: 0.6rem; align-items: flex-start;
    padding: 0.7rem 0.9rem; border-radius: var(--v2-radius, 0.75rem);
    background: var(--v2-surface-card, #ffffff); border: 1px solid var(--v2-outline, rgba(94,109,127,0.12));
    border-left: 3px solid var(--v2-primary, #2E6B94);
    box-shadow: 0 8px 24px rgba(0,0,0,0.16);
    font-size: 0.85rem; color: var(--v2-text, #1a2332);
    animation: acc-toast-in 0.18s ease-out;
}
.acc-toast.is-success { border-left-color: var(--v2-success, #2d9d78); }
.acc-toast.is-success > i { color: var(--v2-success, #2d9d78); }
.acc-toast.is-error { border-left-color: var(--v2-danger, #d94452); }
.acc-toast.is-error > i { color: var(--v2-danger, #d94452); }
.acc-toast.is-info > i { color: var(--v2-primary, #2E6B94); }
@keyframes acc-toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .acc-toast { animation: none; } }

/* Aktionsspalte bleibt beim waagerechten Scrollen erreichbar.
   Bewusst nur fuer Tabellen mit Zeilenaktionen (Bank), nicht global. */
.acc-table.has-sticky-actions th:last-child,
.acc-table.has-sticky-actions td:last-child {
    position: sticky; right: 0;
    background: var(--v2-surface-card, #ffffff);
    box-shadow: -10px 0 10px -10px rgba(25,28,30,0.28);
}
.acc-table.has-sticky-actions thead th:last-child { background: var(--v2-surface-low, #edf1f5); }
.acc-table.has-sticky-actions tbody tr:hover td:last-child { background: var(--v2-surface-low, #edf1f5); }

/* Kontokacheln sollen bei einem einzelnen Konto nicht ueber die ganze
   Breite laufen. */
.acc-kpis.acc-accounts { grid-template-columns: repeat(auto-fill, minmax(15rem, 21rem)); }

/* ============================== Einstellungen / Steuern / DATEV
   accounting-settings-ui-v1, accounting-tax-ui-v1, accounting-datev-ui-v1 */

/* Einstellungen: zwei Spalten, Karten fliessen */
.acc-settings-grid {
    display: grid; gap: var(--acc-gap);
    grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
    align-items: start;
}

.acc-readonly {
    padding: 0.45rem 0.6rem; border-radius: var(--v2-radius, 0.75rem);
    background: var(--v2-surface-low, #edf1f5); border: 1px solid var(--v2-outline, rgba(94,109,127,0.12));
    font-size: 0.875rem; color: var(--v2-text-secondary, #5e6d7f);
    font-variant-numeric: tabular-nums;
}

.acc-check { display: flex; align-items: center; gap: 0.5rem; cursor: pointer;
    font-size: 0.875rem; font-weight: 500; color: var(--v2-text, #1a2332); margin-bottom: 0; }
.acc-check input { width: 1rem; height: 1rem; accent-color: var(--v2-primary, #2E6B94); }

.acc-field-error { font-size: 0.78rem; color: var(--v2-danger, #d94452); margin-top: 0.25rem; }
.acc-field.has-error .acc-input,
.acc-field.has-error .acc-select { border-color: var(--v2-danger, #d94452); }

/* Werkzeugleiste ausserhalb einer Karte (Auswertungen/Steuern/DATEV) */
.acc-toolbar.acc-toolbar-standalone {
    border: 1px solid var(--v2-outline, rgba(94,109,127,0.12)); border-radius: var(--v2-radius, 0.75rem);
    background: var(--v2-surface-card, #ffffff); box-shadow: var(--v2-shadow, 0px 12px 32px rgba(25,28,30,0.06));
    margin-bottom: var(--acc-gap);
}

/* Bilanz: beide Seiten gleich breit (acc-grid-2 ist 5fr/7fr) */
.acc-grid-2.acc-grid-even { grid-template-columns: 1fr 1fr; align-items: start; }

/* Zwischensummen und errechnete Zeilen */
.acc-table tr.acc-row-total td { background: var(--v2-surface-low, #edf1f5); font-weight: 650; }
.acc-table tr.acc-row-sub td { color: var(--v2-text-muted, #8a97a8); font-size: 0.83rem; }

/* Bereitschaftsliste (ELSTER) */
.acc-checklist { list-style: none; margin: 0; padding: 0; }
.acc-checklist li {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.4rem 0; border-bottom: 1px solid var(--v2-outline, rgba(94,109,127,0.12));
    font-size: 0.85rem;
}
.acc-checklist li:last-child { border-bottom: 0; }
.acc-checklist i { width: 1rem; text-align: center; }
.acc-checklist i.is-ok  { color: var(--v2-success, #2d9d78); }
.acc-checklist i.is-off { color: var(--v2-text-muted, #8a97a8); }
.acc-checklist-label { color: var(--v2-text-secondary, #5e6d7f); }
.acc-checklist-value { margin-left: auto; color: var(--v2-text, #1a2332); font-weight: 550; }

/* DATEV-Exportkacheln: Kachel-Optik, aber mit Text und Knopf */
.acc-kpis.acc-exports { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
.acc-export-card { display: flex; flex-direction: column; gap: 0.6rem; }
.acc-export-card .acc-kpi-label { font-size: 0.9rem; text-transform: none;
    letter-spacing: 0; color: var(--v2-text, #1a2332); font-weight: 650; }
.acc-export-note { font-size: 0.82rem; color: var(--v2-text-muted, #8a97a8); flex: 1 1 auto; }
.acc-export-card .acc-btn { align-self: flex-start; }

@media (max-width: 900px) {
    .acc-grid-2.acc-grid-even { grid-template-columns: 1fr; }
}
