/* Acid Forest 0.3 – Ergänzungen zum Filament-Standardtheme.
   Farben kommen über die Paletten im AdminPanelProvider, hier nur Details. */
:root {
    --af-bau: #0B1F14;
    --af-forest: #1A4D2E;
    --af-acid: #DFFF00;
    --af-lichtung: #F1F4EA;
    --af-forest-900: #12301F;
    --af-moss: #9DB8A4;
}

.dachs-signet .bg { fill: var(--af-acid); }
.dachs-signet .fg { fill: var(--af-bau); }
:root:not(.dark) .fi-simple-layout .dachs-signet .bg { fill: var(--af-bau); }
:root:not(.dark) .fi-simple-layout .dachs-signet .fg { fill: var(--af-acid); }

.dachs-wordmark {
    font-family: "Inter Tight", Inter, system-ui, sans-serif;
    font-size: 1.32rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.005em;
    color: var(--af-lichtung);
}
.dachs-wordmark-suffix { font-weight: 300; }
/* Auf der hellen Login-Seite dunkel */
:root:not(.dark) .fi-simple-layout .dachs-wordmark { color: var(--af-bau); }

/* Schriften wie auf dachs.consulting */
.fi-header-heading,
.fi-simple-header-heading {
    font-family: Outfit, Geist, system-ui, sans-serif;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.025em;
}
.fi-header-heading em, .fi-simple-header-heading em { font-style: normal; font-weight: 300; }
.fi-section-header-heading,
.fi-ta-header-heading,
.fi-modal-heading {
    font-family: Outfit, Geist, system-ui, sans-serif;
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    line-height: 1.1;
    letter-spacing: -0.015em;
}
/* Mono-Labels in Versalien (Eyebrow-Stil der Website) */
.fi-wi-stats-overview-stat-label,
.fi-ta-header-cell,
.fi-ta-header-cell-sort-btn,
.fi-sidebar-group-label {
    font-family: "Geist Mono", ui-monospace, monospace !important;
    font-size: 0.72rem !important;
    font-weight: 400 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase;
}
.fi-ta-header-cell { color: var(--gray-500) !important; }
.dark .fi-ta-header-cell { color: var(--gray-300) !important; }
.fi-fo-field-label-content {
    font-family: "Geist Mono", ui-monospace, monospace;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Login: Lichtung hell, Bau dunkel, mit dezentem Acid-Schimmer */
.fi-simple-layout { background: var(--af-lichtung); }
.dark .fi-simple-layout {
    background:
        radial-gradient(60rem 30rem at 50% -10%, rgba(223, 255, 0, 0.08), transparent 60%),
        var(--af-bau);
}

/* Tabellenzahlen ruhig ausrichten */
.fi-ta-text-item-label { font-variant-numeric: tabular-nums; }

/* Timer in der Kopfzeile */
.dachs-timer { display: flex; align-items: center; margin-inline-end: .75rem; }
.dachs-timer-running {
    display: flex; align-items: center; gap: .6rem;
    padding: .25rem .25rem .25rem .75rem;
    border-radius: .6rem;
    background: rgba(223, 255, 0, .12);
    border: 1px solid rgba(223, 255, 0, .35);
}
.dachs-timer-dot {
    width: .5rem; height: .5rem; border-radius: 999px; background: var(--af-acid);
    box-shadow: 0 0 0 0 rgba(223, 255, 0, .6); animation: dachs-pulse 2s infinite;
}
.dachs-timer-project { font: 500 .75rem/1 "Geist Mono", ui-monospace, monospace; letter-spacing: .08em; color: var(--af-moss); }
.dachs-timer-clock { color: var(--af-lichtung); font: 500 .95rem/1 "Geist Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; min-width: 4.2rem; }
@keyframes dachs-pulse {
    0% { box-shadow: 0 0 0 0 rgba(223, 255, 0, .6); }
    70% { box-shadow: 0 0 0 .45rem rgba(223, 255, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(223, 255, 0, 0); }
}

/* ---------- Werkstatt: dunkle Leiste, heller Inhalt ---------- */

/* Kopfzeile zweifarbig: links über der Navigation dunkel (Logo), rechts hell */
.fi-topbar-ctn, .fi-topbar {
    --af-split: var(--sidebar-width, 20rem);
    background: #fff !important;
    border-color: rgba(14, 26, 18, .10) !important;
    box-shadow: none !important;
}
.fi-body:has(.fi-sidebar:not(.fi-sidebar-open)) .fi-topbar { --af-split: var(--sidebar-collapsed-width, 4.5rem); }
@media (min-width: 64rem) {
    .fi-topbar {
        background:
            linear-gradient(to right, var(--af-bau) 0 var(--af-split), #fff var(--af-split)) !important;
    }
    .fi-topbar-start { margin-inline-end: 0; width: calc(var(--af-split) - 1rem); }
    .fi-topbar-start .fi-icon-btn { color: var(--af-moss); }
    .fi-topbar-start .fi-icon-btn:hover { color: var(--af-lichtung); background: rgba(241, 244, 234, .06); }
    .fi-topbar-end, .fi-topbar > .fi-global-search-ctn { padding-inline-start: 1.5rem; }
}
/* Handy: Kopfzeile ganz dunkel, damit das Logo stimmt */
@media (max-width: 63.99rem) {
    .fi-topbar { background: var(--af-bau) !important; }
    .fi-topbar .fi-icon-btn { color: var(--af-moss); }
    .fi-topbar .dachs-timer-running { background: rgba(223, 255, 0, .12); }
}

/* Timer auf hellem Grund: dunkle Kapsel, Acid nur auf Dunkel */
@media (min-width: 64rem) {
    .dachs-timer-running { background: var(--af-bau); border-color: var(--af-bau); }
}

/* Suche */
:root:not(.dark) .fi-topbar .fi-global-search-field .fi-input-wrp {
    background: var(--af-lichtung) !important;
    box-shadow: inset 0 0 0 1px rgba(14, 26, 18, .10) !important;
}
@media (max-width: 63.99rem) {
    .fi-topbar .fi-global-search-field .fi-input-wrp {
        background: rgba(241, 244, 234, .06) !important;
        --tw-ring-color: rgba(157, 184, 164, .25) !important;
    }
    .fi-topbar .fi-global-search-field input { color: var(--af-lichtung); }
}

/* Dunkelmodus: Kopfzeile dunkler als der Hauptbereich (wie hell: Kopf weiß, Fläche getönt, nur umgekehrt) */
.dark .fi-topbar-ctn, .dark .fi-topbar {
    background: #06120B !important;
    border-color: rgba(241, 244, 234, .07) !important;
}
@media (min-width: 64rem) {
    .dark .fi-topbar {
        background: linear-gradient(to right, var(--af-bau) 0 var(--af-split), rgba(241, 244, 234, .08) var(--af-split) calc(var(--af-split) + 1px), #06120B calc(var(--af-split) + 1px)) !important;
    }
}
.dark .fi-topbar .fi-global-search-field .fi-input-wrp {
    background: rgba(241, 244, 234, .05) !important;
    box-shadow: inset 0 0 0 1px rgba(241, 244, 234, .08) !important;
}
@media (min-width: 64rem) {
    .dark .dachs-timer-running { background: #0B1F14; border-color: rgba(223, 255, 0, .25); }
}

/* Seitenleiste */
.fi-sidebar, .fi-sidebar-nav, .fi-sidebar-header {
    background: var(--af-forest-900) !important;
}
.fi-sidebar { border-inline-end: 1px solid rgba(157, 184, 164, .10); }
@media (min-width: 64rem) {
    .fi-main-ctn { background: var(--gray-50); }
}
.fi-sidebar-item-btn { border-radius: .6rem; }
.fi-sidebar-item-label { color: rgba(241, 244, 234, .82) !important; font-weight: 500; }
.fi-sidebar-item-icon { color: var(--af-moss) !important; }
.fi-sidebar-item-btn:hover { background: rgba(241, 244, 234, .06) !important; }
.fi-sidebar-item.fi-active .fi-sidebar-item-btn { background: rgba(223, 255, 0, .10) !important; }
.fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-sidebar-item.fi-active .fi-sidebar-item-icon { color: var(--af-acid) !important; }
.fi-sidebar-group-label { color: var(--af-moss) !important; }
.fi-sidebar .fi-icon-btn { color: var(--af-moss); }

/* Inhalt hell: Karten weiß mit feiner Kante statt Schatten */
:root:not(.dark) .fi-section,
:root:not(.dark) .fi-ta-ctn,
:root:not(.dark) .fi-wi-stats-overview-stat {
    box-shadow: none !important;
    --tw-ring-color: rgba(14, 26, 18, .10) !important;
}
:root:not(.dark) .fi-header-heading { color: var(--af-bau); }

/* Große Kennzahlen wie die Zahlen der Website: Outfit 300 */
.fi-wi-stats-overview-stat-value {
    font-family: Outfit, Geist, system-ui, sans-serif !important;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    font-weight: 300 !important;
    font-size: 2.5rem !important;
    line-height: 1 !important;
}
.dachs-num { font-family: "Geist Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }

/* Acid nie als Schrift auf Hell: kleine Zähler-Badges dunkel mit Acid */
:root:not(.dark) .fi-icon-btn-badge-ctn .fi-badge {
    background: var(--af-bau) !important;
    color: var(--af-acid) !important;
    --tw-ring-color: transparent !important;
}

/* Schalter: Beschriftung bleibt Geist (Satz statt Label) */
.fi-fo-field:has(.fi-fo-toggle) .fi-fo-field-label-content {
    font-family: Geist, system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

/* ---------- Seitenvorlagen B (Entwurf "Suite-Seitenvorlagen") ---------- */
:root {
    --ds-line: rgba(14, 26, 18, .10);
    --ds-line-strong: rgba(14, 26, 18, .20);
    --ds-ink: #0E1A12;
    --ds-ink-muted: #5F6B56;
    --ds-card: #fff;
    --ds-surface: #F1F4EA;
    --ds-success-soft: #F6FFB8;
    --ds-danger-text: #BE123C;
    --ds-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
    --ds-display: Outfit, Geist, system-ui, sans-serif;
}
.dark {
    --ds-line: rgba(157, 184, 164, .12);
    --ds-line-strong: rgba(157, 184, 164, .25);
    --ds-ink: #F1F4EA;
    --ds-ink-muted: #9DB8A4;
    --ds-card: #12301F;
    --ds-surface: #0B1F14;
    --ds-success-soft: rgba(223, 255, 0, .14);
    --ds-danger-text: #FB7185;
}
.fi-main-ctn { background: var(--ds-surface) !important; }
.dachs-num { font-family: var(--ds-mono); font-variant-numeric: tabular-nums; }
.dachs-muted { color: var(--ds-ink-muted); }
.dachs-right { text-align: right; }
.dachs-stat-label, .fi-wi-stats-overview-stat-label {
    color: var(--ds-ink-muted);
    font: 400 11.5px/16px var(--ds-mono) !important;
    letter-spacing: .08em !important;
    text-transform: uppercase;
}
.fi-header-heading { font-size: 32px !important; }

/* Kopfzahlen als ein Band (Zeiten und Dashboard) */
.dachs-week { display: flex; flex-direction: column; gap: 24px; }
.dachs-stats, .fi-section-content:has(> .fi-grid-col .fi-wi-stats-overview-stat) {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1px !important; background: var(--ds-line);
    border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--ds-line);
}
.fi-section-content:has(> .fi-grid-col .fi-wi-stats-overview-stat) > .fi-grid-col > .fi-sc-component,
.fi-section-content:has(> .fi-grid-col .fi-wi-stats-overview-stat) .fi-wi-stats-overview-stat { height: 100%; }
.dachs-stat, .fi-wi-stats-overview-stat {
    background: var(--ds-card) !important; padding: 20px 24px !important;
    display: flex; flex-direction: column; gap: 10px;
    border-radius: 0 !important; box-shadow: none !important; --tw-ring-color: transparent !important;
}
.dachs-stat-value, .fi-wi-stats-overview-stat-value {
    font: 300 32px/1 var(--ds-display) !important; letter-spacing: -.02em; color: var(--ds-ink);
    font-variant-numeric: tabular-nums;
}

/* Schnellfilter als Pillen, Suche rechts */
.dachs-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.dachs-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.dachs-pill, .fi-tabs .fi-tabs-item {
    height: 32px; padding: 0 10px; border-radius: 8px; border: 0;
    background: var(--ds-card); color: var(--ds-ink);
    box-shadow: inset 0 0 0 1px var(--ds-line-strong);
    font: 600 14px/1 Geist, system-ui, sans-serif; cursor: pointer;
}
.dachs-pill:hover, .fi-tabs .fi-tabs-item:hover { background: var(--ds-surface); }
.dachs-pill-active, .dachs-pill-active:hover,
.fi-tabs .fi-tabs-item.fi-active, .fi-tabs .fi-tabs-item.fi-active:hover {
    background: var(--af-bau) !important; color: var(--af-lichtung) !important; box-shadow: none;
}
.fi-tabs .fi-tabs-item.fi-active .fi-tabs-item-label { color: var(--af-lichtung) !important; }
.fi-tabs .fi-tabs-item .fi-tabs-item-label { color: inherit; font-weight: 600; }
.fi-tabs { background: transparent !important; box-shadow: none !important; padding: 0 !important; gap: 8px !important;
    margin-inline: 0 !important; justify-content: flex-start !important; --tw-ring-color: transparent !important; }
.fi-tabs-item-badge { display: none; }
.dachs-search input {
    width: 260px; height: 36px; padding: 0 12px; border-radius: 8px; border: 0;
    background: var(--ds-card); color: var(--ds-ink);
    box-shadow: inset 0 0 0 1px var(--ds-line-strong); font: 400 14px/20px Geist, system-ui, sans-serif;
}
.dachs-search input:focus { outline: 2px solid var(--af-forest); outline-offset: 1px; }

/* Ein Tag = eine Karte */
.dachs-day { background: var(--ds-card); border-radius: 12px; box-shadow: 0 0 0 1px var(--ds-line); overflow: hidden; }
.dachs-day-head {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 14px 24px; border-bottom: 1px solid var(--ds-line); background: var(--ds-surface);
}
.dachs-day-title { color: var(--ds-ink); }
.dachs-day-head .dachs-num { font-size: 14px; }
.dachs-entry {
    display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr) 110px 110px 90px;
    gap: 16px; align-items: center; padding: 14px 24px; cursor: pointer; color: var(--ds-ink); font-size: 14px;
}
.dachs-entry + .dachs-entry { border-top: 1px solid var(--ds-line); }
.dachs-entry:hover { background: rgba(14, 26, 18, .025); }
.dachs-entry-project .dachs-muted { display: block; }
.dachs-running {
    margin-left: 2px; padding: 1px 6px; border-radius: 6px;
    background: var(--ds-success-soft); color: var(--af-forest);
}
.dark .dachs-running { color: var(--af-acid); }
.dachs-link { color: var(--af-forest); text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; cursor: pointer; font: inherit; }
.dark .dachs-link { color: var(--af-acid); }
.dachs-empty { padding: 32px 24px; text-align: center; }
.dachs-empty-title { font: 600 18px/1.2 var(--ds-display); color: var(--ds-ink); margin-bottom: 4px; }
@media (max-width: 60rem) {
    .dachs-entry { grid-template-columns: 1fr auto; }
    .dachs-entry > :nth-child(3), .dachs-entry > :nth-child(5), .dachs-entry > :nth-child(6) { display: none; }
}

/* Knöpfe wie im Designsystem: Sekundär weiß mit Kante */
.fi-header .fi-btn:not(.fi-color-primary):not(.fi-color-danger),
.fi-modal-footer .fi-btn:not(.fi-color) {
    background: var(--ds-card) !important; color: var(--ds-ink) !important;
    box-shadow: inset 0 0 0 1px var(--ds-line-strong) !important; --tw-ring-color: transparent !important;
}

/* ---------- Panel von rechts ---------- */
.fi-modal-slide-over .fi-modal-window { background: var(--ds-surface) !important; }
.fi-modal-slide-over .fi-modal-header {
    position: relative; height: 82px !important; min-height: 82px; flex-shrink: 0; box-sizing: border-box;
    display: flex !important; flex-direction: column !important; justify-content: center; align-items: flex-start !important; gap: 6px !important;
    padding: 0 190px 0 24px !important; background: var(--ds-card) !important;
    border-bottom: 1px solid var(--ds-line);
}
.fi-modal-slide-over .fi-modal-header > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; max-width: 100%; }
.fi-modal-slide-over .fi-modal-heading {
    font: 800 24px/1 var(--ds-display) !important; letter-spacing: -.025em; color: var(--ds-ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 !important;
}
.fi-modal-slide-over .fi-modal-description {
    order: -1; margin: 0 !important; color: var(--ds-ink-muted);
    font: 400 11.5px/16px var(--ds-mono) !important; letter-spacing: .08em; text-transform: uppercase;
}
.fi-modal-slide-over .fi-modal-close-btn { position: absolute !important; top: 25px !important; right: 20px !important; inset-inline-end: 20px !important; }
.fi-modal-slide-over .fi-modal-content { padding: 24px !important; gap: 24px; }
.fi-modal-slide-over .fi-section {
    background: transparent !important; box-shadow: none !important; --tw-ring-color: transparent !important;
    border-radius: 0 !important;
}
.fi-modal-slide-over .fi-section-header { padding: 0 0 12px !important; }
.fi-modal-slide-over .fi-section-header-description { font-size: 13px; color: var(--ds-ink-muted); margin-top: 4px; }
.fi-modal-slide-over .fi-section-content-ctn {
    background: var(--ds-card); border-radius: 12px; box-shadow: 0 0 0 1px var(--ds-line);
    border-top: 0 !important;
}
.fi-modal-slide-over .fi-section-content { padding: 24px !important; }
/* Fußleiste: Löschen links, Hinweis rechts; Speichern sitzt oben im Kopf */
.fi-modal-slide-over .fi-modal-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 14px 24px !important; background: var(--ds-card) !important; border-top: 1px solid var(--ds-line);
    min-height: 52px; box-sizing: border-box;
}
.fi-modal-slide-over .fi-modal-footer::after { content: "Esc schließt ohne Speichern"; color: var(--ds-ink-muted); font-size: 12px; margin-inline-start: auto; }
.fi-modal-slide-over .fi-modal-footer-actions { display: flex; justify-content: flex-start; gap: 16px; }
.fi-modal-slide-over .fi-modal-footer-actions > .fi-btn:not(.fi-color) { display: none !important; }
.fi-modal-slide-over .fi-modal-footer-actions > .fi-btn.fi-color-primary {
    position: absolute; right: 64px; bottom: calc(100dvh - 59px); z-index: 20;
}
.fi-modal-slide-over .fi-modal-footer-actions .fi-link.fi-color-danger,
.fi-modal-slide-over .fi-modal-footer-actions .fi-link.fi-color-danger .fi-link-label { color: var(--ds-danger-text) !important; font-weight: 500; }
/* Abgerechnet-Zeile */
.fi-modal-slide-over .fi-fo-field:has(.dachs-num):has(.fi-fo-field-label-col) { }
.dachs-billed { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid var(--ds-line); }

/* ---------- Formularseiten (Entwurf Formular B) ---------- */
.dachs-form-page .fi-header {
    background: var(--ds-card); border-bottom: 1px solid var(--ds-line);
    margin: calc(-1 * var(--dachs-page-pt, 2rem)) calc(-1 * var(--dachs-page-px, 2rem)) 0;
    padding: 20px var(--dachs-page-px, 2rem); align-items: center !important;
}
.dachs-form-page .fi-header > div:first-child { display: flex; flex-direction: column; gap: 8px; }
.dachs-form-page .fi-header-subheading {
    order: -1; margin: 0 !important; color: var(--ds-ink-muted) !important;
    font: 400 11.5px/16px var(--ds-mono) !important; letter-spacing: .08em; text-transform: uppercase;
}
.dachs-form-page .fi-header-heading { font-size: 28px !important; }
.dachs-form-page .fi-page-content { max-width: 1040px; }
.dachs-form-page .fi-section.fi-aside > .fi-section-header .fi-section-header-description,
.dachs-form-page .fi-section-header-description { line-height: 1.5; }
.dachs-form-page { --dachs-page-px: 1rem; }
@media (min-width: 48rem) { .dachs-form-page { --dachs-page-px: 1.5rem; } }
@media (min-width: 64rem) { .dachs-form-page { --dachs-page-px: 2rem; } }

/* ---------- Kopfzeile: nur das Signet, Klick klappt die Leiste ---------- */
@media (min-width: 64rem) {
    .fi-topbar-collapse-sidebar-btn-ctn,
    .fi-topbar-open-sidebar-btn,
    .fi-topbar-close-sidebar-btn { display: none !important; }
}
.fi-topbar .dachs-brand { cursor: pointer; }
.fi-topbar-start { padding-inline-start: 4px; }
@media (min-width: 64rem) {
    /* Eingeklappt: nur das Signet, kein Schriftzug */
    .fi-body:has(.fi-sidebar:not(.fi-sidebar-open)) .fi-topbar .dachs-wordmark { display: none; }
}
.dachs-wordmark { white-space: nowrap; }
@media (min-width: 64rem) {
    .fi-body:has(.fi-sidebar:not(.fi-sidebar-open)) .fi-topbar-start { width: auto; }
}
@media (min-width: 64rem) { .fi-topbar-start { margin-inline-start: -12px; } }

/* Dunkelmodus: aktive Pille hell, sonst verschwindet sie im Grund */
.dark .dachs-pill-active, .dark .dachs-pill-active:hover,
.dark .fi-tabs .fi-tabs-item.fi-active, .dark .fi-tabs .fi-tabs-item.fi-active:hover {
    background: var(--af-lichtung) !important; color: var(--af-bau) !important; box-shadow: none !important;
}
.dark .fi-tabs .fi-tabs-item.fi-active .fi-tabs-item-label { color: var(--af-bau) !important; }

/* Tätigkeit mehrzeilig: in der Woche höchstens zwei Zeilen, ganz im Panel */
.dachs-entry-note { white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
