/* ─── 0. GEOMANIST (Markenschrift, Designsystem) ───────────── */
@font-face { font-family:'Geomanist'; src:url('/assets/fonts/geomanist/geomanist-light.woff2') format('woff2');   font-weight:300; font-display:swap; }
@font-face { font-family:'Geomanist'; src:url('/assets/fonts/geomanist/geomanist-regular.woff2') format('woff2'); font-weight:400; font-display:swap; }
@font-face { font-family:'Geomanist'; src:url('/assets/fonts/geomanist/geomanist-medium.woff2') format('woff2');  font-weight:500; font-display:swap; }
@font-face { font-family:'Geomanist'; src:url('/assets/fonts/geomanist/geomanist-bold.woff2') format('woff2');    font-weight:700; font-display:swap; }
@font-face { font-family:'Geomanist'; src:url('/assets/fonts/geomanist/geomanist-black.woff2') format('woff2');   font-weight:900; font-display:swap; }

/* ═══════════════════════════════════════════════════════════════
   Elico Media Theme – style.css
   Eingebunden via header.php
   ═══════════════════════════════════════════════════════════════ */

/* ─── 1. TOKENS ─────────────────────────────────────────────── */
:root {
    --status-color:        #fff;
    --bg:                  #0b0d10;
    --surface:             #212121;
    --surface-2:           #181d25;
    --surface-3:           #202733;
    --text:                #f4f6fb;
    --muted:               #a9b1bf;
    --muted-2:             #747e8d;
    --line:                rgba(255,255,255,.10);
    --line-strong:         rgba(255,255,255,.16);
    --brand:               #f16334;
    --brand-rgb:           241,99,52;
    --brand-2:             #ff7a45;
    --brand-soft:          rgba(241,99,52,.18);
    --radius-lg:           28px;
    --radius-md:           18px;
    --radius-sm:           12px;
    --shadow:              0 28px 90px rgba(0,0,0,.42);
    --shadow-soft:         0 18px 50px rgba(0,0,0,.24);
    --sidebar-w:           260px;
    --sidebar-collapsed-w: 64px;
    --transition:          .22s cubic-bezier(.4,0,.2,1);
}

/* ─── 2. RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Geomanist', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}
a    { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ─── 3. APP SHELL ──────────────────────────────────────────── */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ─── 4. SIDEBAR ────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--transition);
    overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-collapsed-w); }

/* Logo-Bereich */
.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 14px;
    height: 64px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.sidebar-logo-mark {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    min-width: 0;
}
.sidebar-logo-svg {
    flex-shrink: 0;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
}
.sidebar-logo-svg svg { display: block; }

.sidebar-logo-text {
    opacity: 1;
    transition: opacity var(--transition), width var(--transition);
    white-space: nowrap;
    overflow: hidden;
}
.sidebar.collapsed .sidebar-logo-text { opacity: 0; width: 0; }
.sidebar-logo-text svg { display: block; width: 108px; height: auto; }

/* Toggle-Button */
.sidebar-toggle {
    flex-shrink: 0;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    transition: background var(--transition), color var(--transition),
                border-color var(--transition);
}
.sidebar-toggle:hover {
    background: var(--surface-2);
    border-color: var(--line-strong);
    color: var(--text);
}
.sidebar-toggle svg { transition: transform var(--transition); }
.sidebar.collapsed .sidebar-toggle svg { transform: rotate(180deg); }

/* Scrollbereich */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
}
.sidebar-nav::-webkit-scrollbar       { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

/* Gruppen-Label */
.nav-group           { margin-bottom: 4px; }
.nav-group + .nav-group { margin-top: 18px; }

.nav-group-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    color: rgba(255,255,255,.35);
    font-size: 16px; font-weight: 400;

    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
}
.sidebar.collapsed .nav-group-label span { opacity: 0; }

.nav-group-label-line {
    flex: 1; height: 1px;
    background: var(--line);
    transition: opacity var(--transition);
}
.sidebar.collapsed .nav-group-label-line { opacity: 0; }

/* Nav-Links */
.nav-item { position: relative; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 16px; font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    transition: background var(--transition), color var(--transition);
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}
.nav-link:hover           { background: var(--surface-2); color: var(--text); }
.nav-link.active          { background: var(--brand-soft); color: var(--brand-2); }
.nav-link.active .nav-icon{ color: var(--brand); }

/* Aktiv-Indikator */
.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 60%;
    background: var(--brand);
    border-radius: 0 3px 3px 0;
}

.nav-icon {
    flex-shrink: 0;
    width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    transition: color var(--transition);
}
.nav-link:hover .nav-icon { color: #fff; }

.nav-label {
    flex: 1;
    opacity: 1;
    transition: opacity var(--transition);
}
.sidebar.collapsed .nav-label { opacity: 0; }

/* Chevron */
.nav-chevron {
    flex-shrink: 0;
    color: var(--muted-2);
    transition: transform var(--transition), opacity var(--transition);
}
.sidebar.collapsed .nav-chevron    { opacity: 0; }
.nav-item.open > .nav-link .nav-chevron { transform: rotate(90deg); }

/* Chevron als eigener Klick-Button (z.B. Kundenübersicht: Link + Aufklapp-Chevron) */
.nav-chevron-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; margin: -6px -6px -6px 0; padding: 0;
    border: none; background: transparent; cursor: pointer;
    border-radius: 6px;
    color: var(--muted-2);
}
.nav-chevron-btn:hover { background: rgba(255,255,255,.08); color: var(--text); }

/* Collapsed: Icons zentrieren */
.sidebar.collapsed .nav-link { justify-content: center; padding: 9px; }

/* Unternavigation */
.nav-sub {
    overflow: hidden;
    max-height: 0;
    transition: max-height var(--transition);
}
.nav-item.open > .nav-sub  { max-height: 500px; }
.sidebar.collapsed .nav-sub { display: none; }

/* Kundenprojekte-Untermenü: bei vielen Kunden scrollbar */
#navItemKundenprojekte.open > .nav-sub {
    max-height: 320px;
    overflow-y: auto;
}
#navItemKundenprojekte .nav-sub::-webkit-scrollbar { width: 6px; }
#navItemKundenprojekte .nav-sub::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }

.nav-sub .nav-link {
    padding-left: 40px;
    font-size: 16px; font-weight: 400;
    color: #fff;
}
.nav-sub .nav-link:hover  { color: var(--text); }
.nav-sub .nav-link.active { color: var(--brand-2); }

/* Sidebar-Footer */
.sidebar-footer {
    padding: 12px 10px;
    border-top: 1px solid var(--line);
    flex-shrink: 0;
}
.sidebar-footer .nav-link { color: #fff; font-size: 16px; }

/* ─── 5. MAIN CONTENT ───────────────────────────────────────── */
.main-wrap {
    flex: 1;
    min-width: 0;               /* Flex-Kind darf nie breiter als der Viewport werden */
    max-width: calc(100vw - var(--sidebar-w));
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    transition: margin-left var(--transition);
    display: flex;
    flex-direction: column;
}
.main-wrap.collapsed { max-width: calc(100vw - var(--sidebar-collapsed-w)); }
.main-wrap.collapsed { margin-left: var(--sidebar-collapsed-w); }

/* Page Stage */
#cstage {
    width: 100%;
    max-width: 100%;
    /*max-width: 1180px;*/
    margin: 0 auto;
    padding: 45px 36px 72px 36px;
    flex: 1;
}

/* ─── 6. HERO ───────────────────────────────────────────────── */
.report-hero {
    position: relative;
    width: 100%;
    margin: 0 auto 28px auto;
    padding: 64px 36px 48px 36px;
    text-align: center;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.report-hero-inner {
    position: relative; z-index: 2;
    max-width: 750px; margin: 0 auto;
}
.hero-glow {
    position: absolute; top: -54%; left: 50%;
    transform: translateX(-50%);
    width: 1200px; height: 900px;
    background: radial-gradient(
        circle at 50% 40%,
        rgba(var(--brand-rgb),.28),
        rgba(var(--brand-rgb),.08) 35%,
        transparent 62%
    );
    pointer-events: none;
    filter: blur(10px);
    z-index: 0;
}
.report-hero h1 {
    position: relative; z-index: 2;
    margin: 0; color: var(--text);
    font-size: clamp(32px, 4.5vw, 60px);
    line-height: .98; font-weight: 900;

}
.report-hero h1 span { color: var(--brand); }
.report-hero p {
    position: relative; z-index: 2;
    max-width: 640px; margin: 20px auto 0 auto;
    color: var(--muted);
    font-size: clamp(15px, 1.8vw, 19px);
    line-height: 1.6; font-weight: 400;
}
.report-meta {
    position: relative; z-index: 2;
    display: flex; justify-content: center;
    gap: 10px; flex-wrap: wrap; margin-top: 28px;
}
.report-meta span {
    display: inline-flex; align-items: center;
    gap: 6px; padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(0,0,0,.22);
    color: var(--muted); font-size: 16px;
}
.report-meta strong { color: var(--text); font-weight: 800; }

/* ─── 7. STAT-KACHELN ───────────────────────────────────────── */
.statusoverview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px; margin: 0 0 28px 0;
}
.base-card { position: relative; overflow: hidden; }
.base-card::before {
    content: ''; position: absolute; inset: -1px;
    background: radial-gradient(600px 200px at 10% -10%, rgba(var(--brand-rgb),.14), transparent 60%);
    pointer-events: none; opacity: 0;
    transition: opacity var(--transition);
}
.base-card.active::before { opacity: .9; }

.statusoverview .box {
    display: flex; flex-direction: column;
    align-items: flex-start; justify-content: space-between;
    min-height: 130px; padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface); color: var(--text);
    text-align: left; cursor: pointer;
    transition: transform var(--transition), border-color var(--transition),
                background var(--transition), box-shadow var(--transition);
}
.statusoverview .box:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    background: var(--surface-2);
    box-shadow: var(--shadow-soft);
}
.statusoverview .box.active {
    border-color: rgba(var(--brand-rgb),.55);
    box-shadow: 0 20px 60px rgba(var(--brand-rgb),.10);
}
.box-label          { position: relative; z-index: 2; color: var(--muted); font-size: 16px; font-weight: 800; }
.statusoverview strong { position: relative; z-index: 2; display: block; margin-top: 10px; color: var(--text); font-size: 32px; line-height: 1; font-weight: 900; }
.statusoverview small  { position: relative; z-index: 2; display: block; margin-top: 8px; color: var(--muted-2); font-size: 16px; font-weight: 700; }

/* ─── 8. PROJECT CARDS ──────────────────────────────────────── */
.project-list { display: flex; flex-direction: column; gap: 22px; }

.project-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}
.project-card-header {
    display: flex; align-items: center;
    justify-content: space-between; gap: 20px;
    padding: 22px 26px;
    border-bottom: 1px solid var(--line);
}
.project-kicker {
    display: block; margin-bottom: 5px;
    color: var(--brand); font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
}
.project-card h2 {
    margin: 0; color: var(--text);
    font-size: 22px; line-height: 1.2;
    font-weight: 900;
}
.project-time            { flex: 0 0 auto; padding: 10px 14px; text-align: right; }
.project-time span       { display: block; color: var(--muted-2); font-size: 16px; font-weight: 800; text-transform: uppercase; }
.project-time strong     { display: block; margin-top: 2px; color: var(--text); font-size: 20px; line-height: 1.1; font-weight: 900; }

/* ─── 9. REPORT TABLE ───────────────────────────────────────── */
.report-table { width: 100%; }
.report-row   { display: grid; grid-template-columns: minmax(0,1fr) 190px 180px; align-items: center; }
.report-head  { background: rgba(255,255,255,.025); border-bottom: 1px solid var(--line); }
.report-head .report-cell { color: var(--muted); font-size: 16px; font-weight: 900; text-transform: uppercase; }
.report-body  { border-bottom: 1px solid var(--line); transition: background var(--transition); }
.report-body:hover       { background: rgba(255,255,255,.035); }
.report-body:last-child  { border-bottom: none; }
.report-cell  { min-width: 0; padding: 15px 20px; }
.task-title   { color: var(--text); font-size: 16px; font-weight: 750; line-height: 1.4; }

.status-badge {
    display: inline-flex; align-items: center;
    justify-content: center; max-width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--status-color);
    border-radius: 999px; background: transparent;
    color: var(--status-color); font-size: 16px;
    font-weight: 900; white-space: nowrap;
}
.time-cell strong { display: block; color: var(--text); font-size: 16px; font-weight: 900; }
.time-cell small  { display: block; margin-top: 3px; color: var(--muted-2); font-size: 16px; font-weight: 700; }
.mobile-label     { display: none; }

/* ─── 10. HILFSELEMENTE ─────────────────────────────────────── */
.empty-state {
    padding: 40px 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    text-align: center;
}
.empty-state span { display: inline-block; margin-bottom: 10px; color: var(--brand); font-size: 16px; font-weight: 900; text-transform: uppercase; }
.empty-state h2   { margin: 0; font-size: 24px; }
.empty-state p    { max-width: 520px; margin: 10px auto 0; color: var(--muted); font-size: 16px; }

.total-recorded-time { display: flex; justify-content: flex-end; margin: 28px 0 0 0; }
.total-recorded-time-inner {
    display: inline-flex; align-items: center;
    gap: 10px; padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 999px; color: var(--muted);
    font-size: 16px; font-weight: 800;
}
.total-recorded-time-inner strong { color: var(--text); font-size: 16px; }

.section-gap  { margin-top: 32px; }
.is-hidden    { display: none !important; }

/* ─── 11. FOOTER ────────────────────────────────────────────── */
.site-footer {
    margin-left: var(--sidebar-w);
    border-top: 1px solid var(--line);
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    transition: margin-left var(--transition);
}
.site-footer.collapsed { margin-left: var(--sidebar-collapsed-w); }
.footer-copy  { color: var(--muted-2); font-size: 16px; font-weight: 700; }
.footer-copy a { color: var(--muted); }
.footer-copy a:hover { color: var(--text); }

/* ─── 12. MOBILE OVERLAY ────────────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99;
    backdrop-filter: blur(2px);
}
.mobile-nav-toggle { display: none; }

/* ─── 13. RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 1100px) {
    .statusoverview { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
    :root { --sidebar-w: 240px; }

    #cstage { padding: 28px 18px 56px 18px; }

    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-w) !important;
        transition: transform var(--transition);
    }
    .sidebar.mobile-open { transform: translateX(0); }

    .main-wrap,
    .main-wrap.collapsed { margin-left: 0; max-width: 100vw; }

    .site-footer,
    .site-footer.collapsed { margin-left: 0; }

    .sidebar-overlay { display: block; opacity: 0; pointer-events: none; transition: opacity var(--transition); }
    .sidebar-overlay.visible { opacity: 1; pointer-events: all; }

    .mobile-nav-toggle {
        display: flex;
        position: fixed; top: 14px; left: 14px;
        z-index: 98;
        width: 40px; height: 40px;
        align-items: center; justify-content: center;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: rgba(18,22,28,.9);
        color: var(--muted);
        backdrop-filter: blur(10px);
    }

    .report-hero   { padding: 70px 20px 36px 20px; text-align: left; }
    .report-hero-inner { max-width: none; }
    .report-hero p { margin-top: 14px; font-size: 16px; }
    .report-meta   { justify-content: flex-start; }
    .report-meta span { width: 100%; border-radius: 12px; }

    .statusoverview { grid-template-columns: 1fr; }

    .project-card-header { display: block; padding: 18px; }
    .project-time { margin-top: 12px; text-align: left; }

    .report-table  { padding: 0 12px 14px 12px; }
    .report-head   { display: none; }
    .report-row    { display: block; }
    .report-body   { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,255,255,.025); overflow: hidden; }
    .report-cell   { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
    .report-cell:last-child { border-bottom: none; }
    .mobile-label  { display: block; flex: 0 0 80px; color: var(--muted-2); font-size: 16px; font-weight: 900; text-transform: uppercase; }
    .task-title    { text-align: right; }
    .status-cell   { align-items: center; }
    .time-cell     { text-align: right; }

    .total-recorded-time { justify-content: stretch; }
    .total-recorded-time-inner { width: 100%; justify-content: space-between; border-radius: 14px; }
}

/* ═══════════════════════════════════════════════════════════════
   ELICO OS – ERWEITERUNGEN
   Wird nach dem Basis-Theme geladen
   ═══════════════════════════════════════════════════════════════ */

/* ─── FOOTER VERSION-BADGE ──────────────────────────────────── */
.footer-version {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    margin-left: 8px;
    background: var(--surface-3);
    border: 1px solid var(--line);
    border-radius: 99px;
    font-size: 16px;
    font-weight: 900;
    color: var(--muted-2);

}

/* ─── STATUS ACTIVE (Dashboard-Meta) ───────────────────────── */
.status-active {
    color: #4ade80;
}

/* ─── PRICELIST ─────────────────────────────────────────────── */
.pricelist-wrap { display: flex; flex-direction: column; gap: 22px; }

/* Tabs */
.pricelist-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.pricelist-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: background var(--transition), color var(--transition),
                border-color var(--transition);
}
.pricelist-tab svg { flex-shrink: 0; }
.pricelist-tab:hover {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--line-strong);
}
.pricelist-tab.active {
    background: var(--brand-soft);
    color: var(--brand-2);
    border-color: rgba(var(--brand-rgb),.45);
}

/* Kategorie-Titel */
.pricelist-cat-title {
    display: flex;
    align-items: center;
    gap: 14px;
}
.pricelist-cat-icon {
    flex-shrink: 0;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--brand-soft);
    color: var(--brand);
}

/* Preis-Zelle */
.price-value {
    color: var(--brand-2) !important;
    font-size: 16px !important;
    font-weight: 900 !important;

}
.price-unit {
    color: var(--muted);
    font-size: 16px;
    font-weight: 700;
    background: var(--surface-3);
    padding: 4px 10px;
    border-radius: 99px;
    border: 1px solid var(--line);
}

/* Highlight-Karte */
.pricelist-highlight {
    border-color: rgba(var(--brand-rgb),.35) !important;
    box-shadow: 0 0 0 1px rgba(var(--brand-rgb),.15),
                var(--shadow-soft);
}

/* Hidden sections */
.pricelist-section.tab-hidden { display: none !important; }

/* Hinweis */
.pricelist-note {
    color: var(--muted-2);
    font-size: 16px;
    font-weight: 700;
    text-align: right;
    padding: 0 4px;
    margin: 0;
}
.pricelist-note a {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ─── MOBILE: PRICELIST ─────────────────────────────────────── */
@media (max-width: 820px) {
    .pricelist-tabs { gap: 6px; }
    .pricelist-tab  { padding: 7px 12px; font-size: 16px; }
    .pricelist-cat-title { gap: 10px; }
    .pricelist-note { text-align: left; }

    /* Mobile: Preis prominent */
    .price-value { font-size: 16px !important; }
}

/* ─── TOUCH: Bessere Tap-Targets auf Mobile ─────────────────── */
@media (max-width: 820px) {
    .nav-link   { min-height: 44px; }
    .box        { min-height: 110px; }
    .pricelist-tab { min-height: 40px; }
}

/* ─── SAFE AREA (iPhone Notch / Dynamic Island) ─────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .site-footer {
        padding-bottom: calc(18px + env(safe-area-inset-bottom));
    }
    #cstage {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
}

/* ─── DATATABLE ─────────────────────────────────────────────── */

/* Wrapper */
.dt-wrap { display: flex; flex-direction: column; gap: 16px; }

/* Toolbar */
.dt-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.dt-search-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
    max-width: 440px;
}
.dt-search-icon {
    position: absolute;
    left: 13px; top: 50%;
    transform: translateY(-50%);
    color: var(--muted-2);
    pointer-events: none;
    display: flex;
}
.dt-search {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    font-weight: 600;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.dt-search::placeholder { color: var(--muted-2); }
.dt-search:focus {
    border-color: rgba(var(--brand-rgb),.5);
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.12);
}

.dt-per-page-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.dt-per-page-label {
    color: var(--muted-2);
    font-size: 16px;
    font-weight: 800;
}
.dt-per-page {
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition);
}
.dt-per-page:focus { border-color: rgba(var(--brand-rgb),.5); }

/* Tabellen-Wrapper (horizontal scrollbar auf Mobile) */
.dt-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    -webkit-overflow-scrolling: touch;
}

/* Tabelle */
.dt-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

/* Header */
.dt-th {
    padding: 13px 18px;
    background: rgba(255,255,255,.025);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 16px;
    font-weight: 900;

    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
    user-select: none;
}
.dt-th.sortable {
    cursor: pointer;
    transition: color var(--transition), background var(--transition);
}
.dt-th.sortable:hover { color: var(--text); background: rgba(255,255,255,.04); }
.dt-th::after { content: ''; margin-left: 6px; opacity: .35; font-size: 16px; }
.dt-th.sort-asc::after  { content: '↑'; opacity: 1; color: var(--brand); }
.dt-th.sort-desc::after { content: '↓'; opacity: 1; color: var(--brand); }

/* Zeilen */
.dt-row {
    border-bottom: 1px solid var(--line);
    transition: background var(--transition);
}
.dt-row:last-child { border-bottom: none; }
.dt-row:hover { background: rgba(255,255,255,.032); }
.dt-row.dt-hidden { display: none; }

/* Zellen */
.dt-td {
    padding: 13px 18px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    vertical-align: middle;
    white-space: nowrap;
}
.dt-td-id    { color: var(--muted-2); font-size: 16px; font-weight: 700; width: 44px; }
.dt-td-task  { white-space: normal; min-width: 200px; font-weight: 750; }
.dt-td-time  { font-weight: 800; font-variant-numeric: tabular-nums; }
.dt-td-date  { color: var(--muted); font-variant-numeric: tabular-nums; }
.dt-project  {
    display: inline-block;
    padding: 3px 9px;
    background: var(--surface-3);
    border: 1px solid var(--line);
    border-radius: 99px;
    font-size: 16px;
    font-weight: 800;
    color: var(--muted);
    white-space: nowrap;
}
.dt-notime { color: var(--muted-2); }

/* Kein Ergebnis */
.dt-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--muted-2);
    font-size: 16px;
    font-weight: 700;
}

/* Footer */
.dt-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 4px 2px;
}
.dt-info {
    color: var(--muted-2);
    font-size: 16px;
    font-weight: 700;
}

/* Pagination */
.dt-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.dt-page-btn {
    min-width: 34px; height: 34px;
    padding: 0 10px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    font-size: 16px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition), color var(--transition),
                border-color var(--transition);
}
.dt-page-btn:hover:not(:disabled) {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--line-strong);
}
.dt-page-btn.active {
    background: var(--brand-soft);
    color: var(--brand-2);
    border-color: rgba(var(--brand-rgb),.45);
}
.dt-page-btn:disabled {
    opacity: .35;
    cursor: default;
}
.dt-page-dots {
    color: var(--muted-2);
    font-size: 16px;
    padding: 0 4px;
}

/* ─── MOBILE: DATATABLE ─────────────────────────────────────── */
@media (max-width: 820px) {
    .dt-toolbar { gap: 10px; }
    .dt-search-wrap { max-width: 100%; }
    .dt-footer { gap: 10px; }
    .dt-per-page-wrap { width: 100%; justify-content: flex-end; }
}

/* ─── SEO INSIGHTS ──────────────────────────────────────────── */

/* Toolbar */
.si-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.si-toolbar-left  { display: flex; gap: 8px; flex-wrap: wrap; }
.si-toolbar-right { display: flex; gap: 8px; align-items: center; }

.si-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 16px;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px; font-weight: 800; font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), transform var(--transition);
}
.si-btn:hover { background: var(--brand-2); transform: translateY(-1px); color: #fff; }
.si-btn-ghost {
    background: var(--surface);
    color: var(--muted);
    border: 1px solid var(--line);
}
.si-btn-ghost:hover { background: var(--surface-2); color: var(--text); transform: none; }

/* Stat-Kacheln Farben */
.si-green { color: #4ade80 !important; }
.si-red   { color: #f87171 !important; }

/* Tabellen-Wrapper */
.si-table-wrap { display: flex; flex-direction: column; gap: 12px; }
.si-table-scroll {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    -webkit-overflow-scrolling: touch;
}
.si-table-footer {
    display: flex; justify-content: flex-end;
    padding: 2px 4px;
}

/* Tabelle */
.si-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1400px;
}
.si-th {
    position: sticky; top: 0; z-index: 2;
    padding: 11px 14px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 16px; font-weight: 900;
 text-transform: uppercase;
    white-space: nowrap; text-align: left;
}
.si-th.si-sortable {
    cursor: pointer;
    user-select: none;
    transition: color var(--transition), background var(--transition);
}
.si-th.si-sortable:hover { color: var(--text); background: rgba(255,255,255,.04); }
.si-th.si-sortable::after { content: ''; margin-left: 5px; opacity: .3; font-size: 16px; }
.si-th.si-sort-asc::after  { content: '↑'; opacity: 1; color: var(--brand); }
.si-th.si-sort-desc::after { content: '↓'; opacity: 1; color: var(--brand); }
.si-table tbody tr {
    border-bottom: 1px solid var(--line);
    transition: background var(--transition);
}
.si-table tbody tr:hover { background: rgba(255,255,255,.03); }
.si-table tbody tr:last-child { border-bottom: none; }
.si-table tbody tr.si-hidden { display: none; }

.si-table td {
    padding: 10px 14px;
    font-size: 16px; font-weight: 600;
    color: var(--text);
    vertical-align: middle;
    white-space: nowrap;
}
.tac { text-align: center; }

/* Aktions-Spalte */
.si-actions { display: flex; gap: 6px; align-items: center; }
.si-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: transparent;
    color: var(--muted-2);
    cursor: pointer;
    font-family: inherit;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.si-icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }
.si-btn-del:hover { color: #f87171; border-color: rgba(248,113,113,.4); }

/* Keyword-Link */
.si-kw-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}
.si-kw-link:hover { color: var(--brand); }

/* URL-Zelle (abgeschnitten) */
.si-url {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--muted) !important;
    font-size: 16px !important;
}

/* Positions-Badge */
.si-pos-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; padding: 3px 8px;
    border-radius: 99px;
    font-size: 16px; font-weight: 900;
    background: var(--surface-3);
    border: 1px solid var(--line);
    color: var(--muted);
}
.si-pos-badge.pos-top3  { background: rgba(74,222,128,.12); border-color: rgba(74,222,128,.35); color: #4ade80; }
.si-pos-badge.pos-page1 { background: rgba(40,184,218,.12); border-color: rgba(40,184,218,.35); color: #28B8DA; }
.si-pos-badge.pos-page3 { background: rgba(245,158,11,.10); border-color: rgba(245,158,11,.30); color: #f59e0b; }
.si-pos-badge.pos-low   { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.25); color: #f87171; }

/* Trend */
.si-trend { font-size: 16px; font-weight: 800; white-space: nowrap; }
.si-trend-up   { color: #4ade80; }
.si-trend-down { color: #f87171; }

/* Inline-Inputs */
.si-inline-input {
    width: 100%; min-width: 120px;
    padding: 5px 9px;
    background: var(--surface-3);
    border: 1px solid transparent;
    border-radius: 7px;
    color: var(--text);
    font-size: 16px; font-weight: 600; font-family: inherit;
    outline: none;
    transition: border-color var(--transition), background var(--transition);
}
.si-inline-input:hover { border-color: var(--line); }
.si-inline-input:focus { border-color: rgba(var(--brand-rgb),.5); background: var(--surface-2); }

/* Sparkline */
.si-sparkline { display: block; transform: scaleY(-1); }

/* ─── MODALS ────────────────────────────────────────────────── */
.si-modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
    z-index: 200;
}
.si-modal-overlay.visible { display: block; }

.si-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(.96);
    z-index: 201;
    width: 90vw; max-width: 560px;
    max-height: 85vh;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    overflow: hidden;
}
.si-modal.si-modal-wide { max-width: 820px; }
.si-modal:not([hidden]) {
    display: flex;
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.si-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.si-modal-header h3 {
    margin: 0; font-size: 16px; font-weight: 900;
    color: var(--text);
}
.si-modal-close {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 8px;
    background: transparent; color: var(--muted);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.si-modal-close:hover { background: var(--surface-2); color: var(--text); }

.si-modal-body {
    padding: 22px;
    overflow-y: auto;
    flex: 1;
}
.si-modal-footer-btns {
    display: flex; justify-content: flex-end;
    margin-top: 16px;
}

.si-textarea {
    width: 100%; min-height: 260px;
    padding: 14px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 16px; font-family: inherit; font-weight: 600;
    line-height: 1.7; resize: vertical;
    outline: none;
    transition: border-color var(--transition);
}
.si-textarea:focus { border-color: rgba(var(--brand-rgb),.5); }

.si-file-drop {
    display: flex; flex-direction: column; align-items: center;
    gap: 12px; padding: 40px 20px;
    border: 2px dashed var(--line);
    border-radius: var(--radius-md);
    color: var(--muted);
    transition: border-color var(--transition);
    cursor: pointer;
}
.si-file-drop:hover { border-color: rgba(var(--brand-rgb),.5); }
.si-file-drop p { margin: 0; font-size: 16px; font-weight: 700; }
.si-file-drop input[type="file"] { font-size: 16px; color: var(--muted); }

.si-select {
    padding: 6px 10px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--text);
    font-size: 16px; font-family: inherit; font-weight: 700;
    outline: none;
}
.si-hint { color: var(--muted); font-size: 16px; font-weight: 700; margin: 0 0 14px; }

/* ─── MOBILE ────────────────────────────────────────────────── */
@media (max-width: 820px) {
    .si-toolbar { gap: 10px; }
    .si-toolbar-right .dt-search-wrap { max-width: 100%; }
    .si-modal { width: 95vw; }
}

/* ─── COLUMN VISIBILITY DROPDOWN ───────────────────────────── */
.si-colvis-wrap {
    position: relative;
}
.si-colvis-chevron {
    transition: transform var(--transition);
    flex-shrink: 0;
}
#siBtnColVis[aria-expanded="true"] .si-colvis-chevron {
    transform: rotate(180deg);
}
.si-colvis-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 150;
    width: 230px;
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.si-colvis-dropdown[hidden] { display: none; }

.si-colvis-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
    font-weight: 900;
    color: var(--muted-2);

    text-transform: uppercase;
}
.si-colvis-all {
    padding: 3px 10px;
    background: var(--surface-3);
    border: 1px solid var(--line);
    border-radius: 99px;
    color: var(--muted);
    font-size: 16px; font-weight: 800; font-family: inherit;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.si-colvis-all:hover { background: var(--brand-soft); color: var(--brand-2); }

.si-colvis-list {
    max-height: 340px;
    overflow-y: auto;
    padding: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
}
.si-colvis-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition);
    user-select: none;
}
.si-colvis-item:hover { background: var(--surface-3); }
.si-colvis-item input[type="checkbox"] {
    accent-color: var(--brand);
    width: 14px; height: 14px;
    flex-shrink: 0;
    cursor: pointer;
}
.si-colvis-item label {
    font-size: 16px; font-weight: 700;
    color: var(--text);
    cursor: pointer;
    flex: 1;
}
.si-colvis-item.col-hidden label { color: var(--muted-2); }

/* Spalte ausgeblendet */
.si-col-hidden { display: none !important; }

/* ─── VIEW TABS (Liste / Gruppen) ───────────────────────────── */
.si-view-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}
.si-view-tab {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 16px; font-weight: 800; font-family: inherit;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.si-view-tab:hover { background: var(--surface-2); color: var(--text); }
.si-view-tab.active {
    background: var(--brand-soft);
    color: var(--brand-2);
    border-color: rgba(var(--brand-rgb),.45);
}
.si-view-tab-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px;
    background: var(--surface-3);
    border-radius: 99px;
    font-size: 16px; font-weight: 900;
    color: var(--muted-2);
}
.si-view-tab.active .si-view-tab-count {
    background: rgba(var(--brand-rgb),.2);
    color: var(--brand);
}

/* ─── GRUPPEN-STATISTIK OBEN ────────────────────────────────── */
.si-group-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}
.si-group-stat {
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    display: flex; flex-direction: column; gap: 6px;
}
.si-group-stat span { color: var(--muted); font-size: 16px; font-weight: 800; }
.si-group-stat strong { color: var(--text); font-size: 24px; font-weight: 900; }
.si-group-stat-accent { border-color: rgba(var(--brand-rgb),.3); }
.si-group-stat-accent strong { color: var(--brand-2); }

/* ─── GRUPPEN-KARTEN ────────────────────────────────────────── */
.si-groups-list { display: flex; flex-direction: column; gap: 10px; }

.si-group-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    overflow: hidden;
    transition: border-color var(--transition);
}
.si-group-card:hover { border-color: var(--line-strong); }

.si-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    transition: background var(--transition);
}
.si-group-header:hover { background: rgba(255,255,255,.025); }

.si-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.si-group-chevron {
    flex-shrink: 0;
    color: var(--muted-2);
    transition: transform var(--transition);
    display: flex;
}
.si-group-card.open .si-group-chevron { transform: rotate(90deg); }

.si-group-title strong {
    font-size: 16px; font-weight: 900;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.si-group-kw-count {
    flex-shrink: 0;
    padding: 2px 8px;
    background: var(--surface-3);
    border: 1px solid var(--line);
    border-radius: 99px;
    font-size: 16px; font-weight: 800;
    color: var(--muted-2);
}

.si-group-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}
.si-group-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.si-group-metric span:first-child {
    font-size: 16px; font-weight: 900;
    color: var(--muted-2);
    text-transform: uppercase;

}
.si-group-metric strong {
    font-size: 16px; font-weight: 900;
    color: var(--text);
}
.si-group-metric small {
    font-size: 16px; font-weight: 700;
    color: var(--muted-2);
}
.si-metric-sv strong { color: var(--brand-2); }

/* Fortschrittsbalken */
.si-group-bar-wrap {
    width: 80px; height: 4px;
    background: var(--surface-3);
    border-radius: 99px;
    overflow: hidden;
}
.si-group-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    border-radius: 99px;
    min-width: 2px;
    transition: width .4s ease;
}

.si-group-body { overflow: hidden; }
.si-group-body[hidden] { display: none; }

/* ─── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 820px) {
    .si-group-stats { grid-template-columns: repeat(2, 1fr); }
    .si-group-meta { gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
    .si-group-bar-wrap { display: none; }
    .si-metric-sv { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   CRM – CONTACTS
   ═══════════════════════════════════════════════════════════════ */

/* Alert-Banner */
.crm-alert {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 16px; font-weight: 400;
    margin-bottom: 18px;
}
.crm-alert-success { background: rgba(74,222,128,.12); border: 1px solid rgba(74,222,128,.3); color: #4ade80; }
.crm-alert-error   { background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.3); color: #f87171; }

/* ── TABS ────────────────────────────────────────────────────── */
.crm-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.crm-tab {
    display: inline-flex; align-items: center;
    padding: 8px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 16px; font-weight: 400; font-family: inherit;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.crm-tab:hover  { background: var(--surface-2); color: var(--text); }
.crm-tab.active {
    background: var(--brand-soft);
    color: var(--brand-2);
    border-color: rgba(var(--brand-rgb),.45);
}

/* ── TAB-INHALTE ─────────────────────────────────────────────── */
.crm-tab-content       { display: none; }
.crm-tab-content.active { display: block; }

/* ── TABELLE ─────────────────────────────────────────────────── */
.crm-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}
.crm-th {
    padding: 11px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 16px; font-weight: 400;
 text-transform: uppercase;
    white-space: nowrap; text-align: left;
}
.crm-th.crm-sortable {
    cursor: pointer; user-select: none;
    transition: color var(--transition), background var(--transition);
}
.crm-th.crm-sortable:hover { color: var(--text); background: rgba(255,255,255,.04); }
.crm-th.crm-sortable::after { content: ''; margin-left: 5px; opacity: .3; font-size: 16px; }
.crm-th.crm-sort-asc::after  { content: '↑'; opacity: 1; color: var(--brand); }
.crm-th.crm-sort-desc::after { content: '↓'; opacity: 1; color: var(--brand); }

.crm-row {
    border-bottom: 1px solid var(--line);
    transition: background var(--transition);
}
.crm-row:last-child { border-bottom: none; }
.crm-row:hover { background: rgba(255,255,255,.03); }
.crm-row.crm-hidden { display: none; }

.crm-td {
    padding: 12px 16px;
    font-size: 16px; font-weight: 400;
    color: var(--text);
    vertical-align: middle;
}
.crm-td-id      { color: var(--muted-2); font-size: 16px; width: 44px; }
.crm-td-company { font-weight: 400; }
.crm-td-date    { color: var(--muted); font-size: 16px; font-variant-numeric: tabular-nums; }

.crm-company-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 400;
}
.crm-company-link:hover { color: var(--brand); }

/* Kontakt-Badges (Mail, Tel, Web) */
.crm-contact-badges { display: flex; gap: 6px; align-items: center; }
.crm-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-3);
    color: var(--muted-2);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.crm-badge:hover { background: var(--brand-soft); color: var(--brand); border-color: rgba(var(--brand-rgb),.4); }

/* Fortschrittsbalken */
.crm-progress {
    display: flex; align-items: center; gap: 8px;
    min-width: 100px;
}
/* Schiene (Track) mit fester Breite */
.crm-progress-track {
    flex: 0 0 120px;
    width: 120px; height: 6px;
    background: var(--surface-3);
    border-radius: 99px;
    overflow: hidden;
}
/* Füll-Balken – width:% greift jetzt korrekt */
.crm-progress-bar {
    height: 100%;
    border-radius: 99px;
    min-width: 2px;
    transition: width .3s ease;
}
/* Ampel: rot bis 89%, orange 90–100%, grün über 100% */
.crm-progress-bar.crm-progress-ok   { background: #f87171; }
.crm-progress-bar.crm-progress-near { background: #f59e0b; }
.crm-progress-bar.crm-progress-over { background: #4ade80; }
.crm-progress-label { font-size: 16px; font-weight: 400; color: var(--muted); flex-shrink: 0; }
.crm-no-budget { color: var(--muted-2); font-size: 16px; }

.crm-table-footer {
    display: flex; justify-content: flex-end;
    padding: 10px 4px 2px;
}

/* ── FORMULAR ────────────────────────────────────────────────── */
.crm-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.crm-fieldset-settings { grid-column: 1 / -1; }

.crm-fieldset {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex; flex-direction: column; gap: 12px;
}
.crm-fieldset legend {
    padding: 0 8px;
    color: var(--brand);
    font-size: 16px; font-weight: 400;
 text-transform: uppercase;
}
.crm-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.crm-form-group { display: flex; flex-direction: column; gap: 5px; }

.crm-label {
    font-size: 16px; font-weight: 400;
    color: var(--muted);
}
.crm-req { color: var(--brand); }

.crm-input,
.crm-select {
    padding: 9px 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font-size: 16px; font-family: inherit; font-weight: 400;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.crm-input:focus,
.crm-select:focus {
    border-color: rgba(var(--brand-rgb),.5);
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.1);
}
.crm-input::placeholder { color: var(--muted-2); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 820px) {
    .crm-form-grid   { grid-template-columns: 1fr; }
    .crm-fieldset-settings { grid-column: 1; }
    .crm-form-row    { grid-template-columns: 1fr; }
    .crm-tabs        { gap: 5px; }
    .crm-tab         { padding: 7px 12px; font-size: 16px; }
}

/* ═══════════════════════════════════════════════════════════════
   CONTACT – Einzelkunden-Ansicht
   ═══════════════════════════════════════════════════════════════ */

/* ── KOPF ────────────────────────────────────────────────────── */
.ct-back {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--muted-2); font-size: 16px; font-weight: 400;
    margin-bottom: 18px;
    transition: color var(--transition);
}
.ct-back:hover { color: var(--brand); }

.ct-profile {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 26px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    margin-bottom: 22px;
}
.ct-avatar {
    flex-shrink: 0;
    width: 64px; height: 64px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff; font-size: 24px; font-weight: 400;

}
.ct-profile-info { min-width: 0; flex: 1; }
.ct-profile-info h1 {
    margin: 0; font-size: 26px; font-weight: 900;
    color: var(--text);
    line-height: 1.1;
}
.ct-profile-info > p {
    margin: 4px 0 12px; color: var(--muted); font-size: 16px; font-weight: 400;
}
.ct-contact-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-contact-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted); font-size: 16px; font-weight: 400;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.ct-contact-pill:hover { background: var(--surface-3); color: var(--text); border-color: var(--line-strong); }
.ct-pill-seo { background: var(--brand-soft); color: var(--brand-2); border-color: rgba(var(--brand-rgb),.3); }
.ct-pill-seo:hover { background: rgba(var(--brand-rgb),.25); color: var(--brand-2); }
.ct-pill-report { background: rgba(40,184,218,.12); color: #28B8DA; border-color: rgba(40,184,218,.3); }
.ct-pill-report:hover { background: rgba(40,184,218,.22); color: #28B8DA; }

/* ── TABS ────────────────────────────────────────────────────── */
.ct-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
    overflow-x: auto;
}
.ct-tab {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 18px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--muted-2);
    font-size: 16px; font-weight: 400; font-family: inherit;
    cursor: pointer; white-space: nowrap;
    transition: color var(--transition), border-color var(--transition);
}
.ct-tab:hover { color: var(--text); }
.ct-tab.active { color: var(--brand-2); border-bottom-color: var(--brand); }

/* ── PANELS ──────────────────────────────────────────────────── */
.ct-panel { display: none; }
.ct-panel.active { display: block; }

/* ── PROJEKTE ────────────────────────────────────────────────── */
.ct-project-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    margin-bottom: 18px;
}
.ct-project-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 20px; padding: 20px 24px;
    border-bottom: 1px solid var(--line);
}
.ct-kicker {
    display: block; margin-bottom: 5px;
    color: var(--brand); font-size: 16px; font-weight: 400;
 text-transform: uppercase;
}
.ct-project-head h2 { margin: 0; font-size: 20px; font-weight: 900; color: var(--text); }
.ct-project-desc { margin: 6px 0 0; color: var(--muted); font-size: 16px; font-weight: 400; }
.ct-project-time { flex-shrink: 0; text-align: right; }
.ct-project-time span { display: block; color: var(--muted-2); font-size: 16px; font-weight: 400; text-transform: uppercase; }
.ct-project-time strong { display: block; margin-top: 2px; color: var(--text); font-size: 20px; font-weight: 900; }

.ct-no-tasks { padding: 20px 24px; color: var(--muted-2); font-size: 16px; font-weight: 400; }

.ct-task-table { width: 100%; }
.ct-task-row {
    display: grid;
    grid-template-columns: minmax(0,1fr) 160px 130px 110px;
    align-items: center;
    border-bottom: 1px solid var(--line);
}
.ct-task-row:last-child { border-bottom: none; }
.ct-task-head {
    background: rgba(255,255,255,.025);
}
.ct-task-head > div {
    padding: 11px 24px;
    color: var(--muted); font-size: 16px; font-weight: 400;
 text-transform: uppercase;
}
.ct-task-row:not(.ct-task-head) { transition: background var(--transition); }
.ct-task-row:not(.ct-task-head):hover { background: rgba(255,255,255,.03); }
.ct-task-row:not(.ct-task-head) > div { padding: 13px 24px; font-size: 16px; }
.ct-task-name { color: var(--text); font-weight: 400; }
.ct-task-date { color: var(--muted); font-variant-numeric: tabular-nums; }
.ct-task-time { color: var(--text); font-weight: 400; font-variant-numeric: tabular-nums; }

/* ── AKTIVITÄTEN ─────────────────────────────────────────────── */
.ct-month-label {
    color: var(--muted-2); font-size: 16px; font-weight: 400;
 text-transform: uppercase;
    margin: 24px 0 12px; padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
}
.ct-month-label:first-child { margin-top: 0; }
.ct-activity {
    display: flex; gap: 14px;
    padding: 14px 0;
}
.ct-activity-dot {
    flex-shrink: 0; width: 10px; height: 10px;
    border-radius: 50%; margin-top: 5px;
}
.ct-activity-body { flex: 1; min-width: 0; }
.ct-activity-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ct-activity-type {
    padding: 2px 10px; border-radius: 99px;
    background: color-mix(in srgb, var(--ac) 15%, transparent);
    border: 1px solid var(--ac);
    color: var(--ac); font-size: 16px; font-weight: 400;
}
.ct-activity-by { color: var(--muted); font-size: 16px; font-weight: 400; }
.ct-activity-date { color: var(--muted-2); font-size: 16px; margin-left: auto; font-variant-numeric: tabular-nums; }
.ct-activity-title { margin-top: 6px; color: var(--text); font-size: 16px; font-weight: 400; }
.ct-activity-desc { margin-top: 4px; color: var(--muted); font-size: 16px; line-height: 1.5; }

/* ── NOTIZEN ─────────────────────────────────────────────────── */
.ct-note-form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 22px;
}
.ct-note-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text); font-size: 16px; font-family: inherit; font-weight: 400;
    line-height: 1.6; resize: vertical; outline: none;
    transition: border-color var(--transition);
}
.ct-note-input:focus { border-color: rgba(var(--brand-rgb),.5); }
.ct-note-form-footer {
    display: flex; align-items: center; gap: 12px;
    margin-top: 12px; flex-wrap: wrap;
}
.ct-remind-label {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--muted); font-size: 16px; font-weight: 400;
}
.ct-remind-input {
    padding: 8px 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text); font-size: 16px; font-family: inherit;
    outline: none;
    color-scheme: dark;
}
.ct-remind-input:focus { border-color: rgba(var(--brand-rgb),.5); }
.ct-note-form-footer .si-btn { margin-left: auto; }

.ct-notes-list { display: flex; flex-direction: column; gap: 10px; }
.ct-note-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    transition: opacity .3s;
}
.ct-note-card.ct-note-overdue { border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.05); }
.ct-note-card.ct-note-pending { border-color: rgba(245,158,11,.35); }
.ct-note-body { color: var(--text); font-size: 16px; line-height: 1.6; font-weight: 400; }
.ct-note-meta {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin-top: 12px; padding-top: 12px;
    border-top: 1px solid var(--line);
}
.ct-note-date {
    display: inline-flex; align-items: center; gap: 5px;
    color: var(--muted-2); font-size: 16px; font-weight: 400;
}
.ct-note-remind {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 99px;
    font-size: 16px; font-weight: 400;
}
.ct-note-remind.pending { background: rgba(245,158,11,.12); color: #f59e0b; }
.ct-note-remind.overdue { background: rgba(248,113,113,.15); color: #f87171; }
.ct-note-remind.done    { background: rgba(74,222,128,.12); color: #4ade80; }
.ct-note-done-btn {
    padding: 4px 12px;
    background: rgba(74,222,128,.12);
    border: 1px solid rgba(74,222,128,.3);
    border-radius: 99px;
    color: #4ade80; font-size: 16px; font-weight: 400; font-family: inherit;
    cursor: pointer;
    transition: background var(--transition);
}
.ct-note-done-btn:hover { background: rgba(74,222,128,.2); }
.ct-note-del-btn {
    margin-left: auto;
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 7px;
    background: transparent; color: var(--muted-2);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.ct-note-del-btn:hover { background: rgba(248,113,113,.1); color: #f87171; border-color: rgba(248,113,113,.4); }

/* ── DATEIEN ─────────────────────────────────────────────────── */
.ct-upload-form { margin-bottom: 22px; }
.ct-dropzone {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; padding: 40px 24px;
    border: 2px dashed var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--muted-2);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}
.ct-dropzone:hover, .ct-dropzone.dragover {
    border-color: rgba(var(--brand-rgb),.5);
    background: var(--surface-2);
    color: var(--brand-2);
}
.ct-dropzone-title { margin: 0; font-size: 16px; font-weight: 400; color: var(--text); }
.ct-dropzone-hint  { margin: 0; font-size: 16px; font-weight: 400; }
.ct-upload-actions {
    display: flex; align-items: center; gap: 14px;
    margin-top: 14px; padding: 12px 16px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.ct-upload-filename { color: var(--text); font-size: 16px; font-weight: 400; flex: 1; }
.ct-upload-actions .si-btn { margin-left: auto; }

.ct-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.ct-file-card {
    display: flex; align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition);
}
.ct-file-card:hover { border-color: var(--line-strong); }
.ct-file-main {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; flex: 1; min-width: 0;
}
.ct-file-icon {
    flex-shrink: 0;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--brand-soft);
    color: var(--brand);
}
.ct-file-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ct-file-name {
    color: var(--text); font-size: 16px; font-weight: 400;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ct-file-meta { color: var(--muted-2); font-size: 16px; font-weight: 400; }
.ct-file-del {
    flex-shrink: 0;
    width: 36px; align-self: stretch;
    display: flex; align-items: center; justify-content: center;
    border: none; border-left: 1px solid var(--line);
    background: transparent; color: var(--muted-2);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.ct-file-del:hover { background: rgba(248,113,113,.1); color: #f87171; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 820px) {
    .ct-profile { flex-direction: column; align-items: flex-start; gap: 14px; }
    .ct-task-row { grid-template-columns: 1fr; }
    .ct-task-head { display: none; }
    .ct-task-row:not(.ct-task-head) > div {
        display: flex; justify-content: space-between; gap: 12px;
        padding: 8px 16px; border-bottom: 1px solid var(--line);
    }
    .ct-task-row:not(.ct-task-head) > div::before {
        content: attr(data-label);
        color: var(--muted-2); font-size: 16px; font-weight: 400; text-transform: uppercase;
    }
    .ct-task-name { font-weight: 400; }
    .ct-note-form-footer { gap: 8px; }
    .ct-note-form-footer .si-btn,
    .ct-remind-input { width: 100%; margin-left: 0; }
    .ct-files-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   CONTACT – PROJEKTE: Status-Filter, Tasks, Task-Modal
   ═══════════════════════════════════════════════════════════════ */

/* ── Status-Übersicht (Filter-Kacheln) ──────────────────────── */
.ct-status-overview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.ct-status-box {
    --status-color: var(--muted-2);
    flex: 1 1 auto; min-width: 110px;
    display: flex; flex-direction: column; gap: 2px;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    cursor: pointer; text-align: left;
    font-family: inherit;
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.ct-status-box:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.ct-status-box strong { font-size: 28px; font-weight: 900; color: var(--text); line-height: 1; }
.ct-status-box span { font-size: 16px; font-weight: 700; color: var(--muted); }
.ct-status-box.active {
    border-color: var(--status-color);
    box-shadow: inset 0 0 0 1px var(--status-color);
}
.ct-status-box.active strong { color: var(--status-color); }

/* ── Projekt-Kopf rechts ────────────────────────────────────── */
.ct-project-head-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.ct-add-task-btn {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 8px;
    background: var(--surface-2); color: var(--muted);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.ct-add-task-btn:hover { background: var(--brand-soft); color: var(--brand); border-color: rgba(var(--brand-rgb),.4); }

/* ── Aufgaben: klickbar ─────────────────────────────────────── */
.ct-task-row { grid-template-columns: minmax(0,1fr) 150px 120px 110px 100px 100px; }
.ct-task-clickable { cursor: pointer; }
.ct-task-name { display: flex; align-items: center; gap: 8px; }
.ct-task-staff { display: flex; gap: 4px; flex-wrap: wrap; }
.ct-staff-chip {
    width: 26px; height: 26px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: #425b76; color: #fff;
    font-size: 16px; font-weight: 400;
    cursor: help;
}
.ct-task-row.ct-row-hidden { display: none; }

/* ── TASK-MODAL ─────────────────────────────────────────────── */
.ct-task-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
    z-index: 200;
}
.ct-task-modal-overlay[hidden] { display: none; }

.ct-task-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 201;
    width: 92vw; max-width: 900px;
    max-height: 88vh;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex; flex-direction: column;
    overflow: hidden;
}
.ct-task-modal[hidden] { display: none; }
.ct-task-modal.ct-modal-sm { max-width: 460px; }
.ct-task-modal-inner { display: flex; flex-direction: column; overflow: hidden; }

.ct-task-modal-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; padding: 20px 24px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.ct-task-modal-title { flex: 1; min-width: 0; }
.ct-task-modal-title small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 16px; font-weight: 400; }
.ct-task-modal-title strong { font-size: 18px; font-weight: 900; color: var(--text); }
.ct-task-title-input {
    width: 100%;
    background: transparent; border: none;
    color: var(--text); font-size: 20px; font-weight: 400; font-family: inherit;
 outline: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition);
}
.ct-task-title-input:focus { border-bottom-color: var(--line); }
.ct-task-modal-close {
    flex-shrink: 0;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 8px;
    background: transparent; color: var(--muted);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.ct-task-modal-close:hover { background: var(--surface-2); color: var(--text); }

.ct-task-modal-body {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 24px;
    padding: 24px;
    overflow-y: auto;
}
.ct-task-label {
    display: block; margin-bottom: 6px;
    color: var(--muted); font-size: 16px; font-weight: 400;
    text-transform: uppercase;
}
.ct-editor {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    overflow: hidden;
}
.ct-editor:focus-within { border-color: rgba(var(--brand-rgb),.5); }
.ct-editor-toolbar {
    display: flex; gap: 2px; flex-wrap: wrap;
    padding: 6px 8px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-3);
}
.ct-editor-toolbar button {
    width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; border-radius: 6px;
    background: transparent; color: var(--muted);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.ct-editor-toolbar button:hover { background: var(--surface); color: var(--text); }
.ct-editor-toolbar button svg { width: 17px; height: 17px; }
.ct-task-desc {
    min-height: 120px;
    padding: 12px 14px;
    color: var(--text); font-size: 16px; font-weight: 400;
    line-height: 1.6; outline: none;
    overflow-y: auto; max-height: 320px;
}
.ct-task-desc:empty::before {
    content: attr(data-placeholder);
    color: var(--muted-2);
}
.ct-task-desc a { color: var(--brand); text-decoration: underline; }

/* Zeiterfassung */
.ct-time-section { margin-top: 24px; }
.ct-time-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ct-time-total {
    padding: 4px 12px;
    background: var(--brand-soft);
    border-radius: 99px;
    color: var(--brand-2); font-size: 16px; font-weight: 900;
    font-variant-numeric: tabular-nums;
}
.ct-timer-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.ct-timer-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 14px;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--surface-2); color: var(--text);
    font-size: 16px; font-weight: 400; font-family: inherit;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}
.ct-timer-btn:hover { background: var(--surface-3); }
.ct-timer-start { background: var(--brand); color: #fff; border-color: var(--brand); }
.ct-timer-start:hover { background: var(--brand-2); }
.ct-timer-stop { background: #02ab84; color: #fff; border-color: #02ab84; }
.ct-timer-stop:hover { background: #02936f; }

.ct-manual-form {
    margin-top: 14px; padding: 16px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}
.ct-manual-form[hidden] { display: none; }
.ct-manual-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ct-manual-form label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 16px; font-weight: 400; }
.ct-manual-form input {
    width: 100%; padding: 8px 10px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
    color: var(--text); font-size: 16px; font-family: inherit; outline: none;
    color-scheme: dark;
}
.ct-manual-form input:focus { border-color: rgba(var(--brand-rgb),.5); }
.ct-manual-note { margin-top: 12px; }
.ct-manual-form .si-btn { margin-top: 14px; }

.ct-timers-list { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.ct-timer-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 16px;
}
.ct-timer-item .ct-ti-staff { font-weight: 400; color: var(--text); flex-shrink: 0; }
.ct-timer-item .ct-ti-range { color: var(--muted); font-size: 16px; flex: 1; min-width: 0; }
.ct-timer-item .ct-ti-dur { font-weight: 400; color: var(--brand-2); font-variant-numeric: tabular-nums; }
.ct-timer-item .ct-ti-del {
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border: none; background: transparent; color: var(--muted-2);
    cursor: pointer; border-radius: 6px;
    transition: background var(--transition), color var(--transition);
}
.ct-timer-item .ct-ti-del:hover { background: rgba(248,113,113,.12); color: #f87171; }
.ct-ti-note { display: block; color: var(--muted-2); font-size: 16px; margin-top: 2px; }

/* Rechte Spalte */
.ct-task-side { display: flex; flex-direction: column; gap: 22px; }
.ct-side-group {}
.ct-task-select {
    width: 100%; padding: 9px 12px;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
    color: var(--text); font-size: 16px; font-family: inherit; font-weight: 400;
    outline: none; cursor: pointer;
}
.ct-task-select:focus { border-color: rgba(var(--brand-rgb),.5); }
.ct-assigned-list { display: flex; flex-direction: column; gap: 6px; }
.ct-assigned-item {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 10px;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
    font-size: 16px; cursor: pointer;
    transition: background var(--transition);
}
.ct-assigned-item:hover { background: var(--surface-3); }
.ct-assigned-item input { accent-color: var(--brand); width: 14px; height: 14px; }
.ct-assigned-item label { color: var(--text); font-weight: 400; cursor: pointer; flex: 1; }

.ct-task-delete {
    width: 100%;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px;
    border: 1px solid rgba(248,113,113,.3); border-radius: var(--radius-sm);
    background: rgba(248,113,113,.08); color: #f87171;
    font-size: 16px; font-weight: 400; font-family: inherit;
    cursor: pointer;
    transition: background var(--transition);
}
.ct-task-delete:hover { background: rgba(248,113,113,.18); }

/* ── RESPONSIVE Task-Modal ──────────────────────────────────── */
@media (max-width: 820px) {
    .ct-task-modal-body { grid-template-columns: 1fr; }
    .ct-task-row { grid-template-columns: 1fr; }
    .ct-manual-row { grid-template-columns: 1fr; }
    .ct-status-box { min-width: calc(50% - 5px); }
}

/* ═══════════════════════════════════════════════════════════════
   GLOBALER TIMER-INDIKATOR (oben rechts, alle Seiten)
   ═══════════════════════════════════════════════════════════════ */
.global-timer {
    position: fixed;
    top: 16px; right: 20px;
    z-index: 95;
    display: inline-flex; align-items: center; gap: 9px;
    padding: 9px 16px;
    background: #02ab84;
    border: 1px solid #02ab84;
    border-radius: 999px;
    color: #fff;
    font-family: inherit; font-size: 16px; font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(2,171,132,.35);
    transition: transform var(--transition), box-shadow var(--transition);
    animation: gt-appear .3s ease;
}
.global-timer[hidden] { display: none; }
.global-timer:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(2,171,132,.45); }
.global-timer-pulse {
    width: 8px; height: 8px; border-radius: 50%;
    background: #fff;
    animation: gt-pulse 1.4s ease-in-out infinite;
}
.global-timer-time { font-variant-numeric: tabular-nums; }
.global-timer-task {
    max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    opacity: .85; font-weight: 600; font-size: 16px;
    border-left: 1px solid rgba(255,255,255,.3); padding-left: 9px;
}
@keyframes gt-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .4; transform: scale(.7); }
}
@keyframes gt-appear {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Auf kleinen Screens: Task-Name ausblenden, kompakter */
@media (max-width: 820px) {
    .global-timer { top: 14px; right: 14px; padding: 8px 12px; }
    .global-timer-task { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   LOGIN
   ═══════════════════════════════════════════════════════════════ */
.login-body {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(900px 500px at 50% -10%, rgba(var(--brand-rgb),.18), transparent 60%),
        var(--bg);
    padding: 24px;
}
.login-wrap { width: 100%; max-width: 420px; }
.login-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 40px 36px;
}
.login-logo {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 32px;
}
.login-logo span { font-size: 17px; font-weight: 900; color: var(--text); }
.login-card h1 { margin: 0 0 6px; font-size: 26px; font-weight: 900; color: var(--text); }
.login-sub { margin: 0 0 26px; color: var(--muted); font-size: 16px; }

.login-error {
    display: flex; align-items: center; gap: 9px;
    padding: 12px 16px; margin-bottom: 22px;
    background: rgba(248,113,113,.12);
    border: 1px solid rgba(248,113,113,.3);
    border-radius: var(--radius-sm);
    color: #f87171; font-size: 16px; font-weight: 700;
}

.login-form { display: flex; flex-direction: column; }
.login-label {
    margin-bottom: 6px;
    color: var(--muted); font-size: 16px; font-weight: 800;
    text-transform: uppercase;
}
.login-input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 18px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text); font-size: 16px; font-family: inherit; font-weight: 500;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.login-input:focus {
    border-color: rgba(var(--brand-rgb),.5);
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.12);
}
.login-pass-wrap { position: relative; }
.login-pass-wrap .login-input { margin-bottom: 0; padding-right: 46px; }
.login-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border: none; background: transparent; color: var(--muted-2);
    cursor: pointer; border-radius: 7px;
    transition: color var(--transition), background var(--transition);
}
.login-toggle:hover { background: var(--surface-3); color: var(--text); }

.login-btn {
    width: 100%; margin-top: 26px;
    padding: 13px;
    background: var(--brand);
    border: none; border-radius: var(--radius-sm);
    color: #fff; font-size: 16px; font-weight: 800; font-family: inherit;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}
.login-btn:hover { background: var(--brand-2); transform: translateY(-1px); }

.login-footer {
    margin-top: 22px; text-align: center;
    color: var(--muted-2); font-size: 16px; font-weight: 600;
}

/* ── Sidebar: eingeloggter Mitarbeiter ──────────────────────── */
.sidebar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; margin-bottom: 6px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.sidebar-user-avatar {
    flex-shrink: 0;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff; font-size: 16px; font-weight: 900;
}
.sidebar-user-name {
    color: var(--text); font-size: 16px; font-weight: 700;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   RECHNUNGEN – Übersicht
   ═══════════════════════════════════════════════════════════════ */
.inv-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 20px; margin-bottom: 22px;
}
.inv-head h1 { margin: 0; font-size: 26px; font-weight: 900; color: var(--text); }
.inv-head p { margin: 4px 0 0; color: var(--muted); font-size: 16px; }

.inv-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.inv-stat {
    flex: 1 1 auto; min-width: 150px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}
.inv-stat span { display: block; color: var(--muted-2); font-size: 16px; font-weight: 800; text-transform: uppercase; }
.inv-stat strong { display: block; margin-top: 4px; color: var(--text); font-size: 24px; font-weight: 900; }

.inv-table-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.inv-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.inv-table thead th {
    padding: 13px 16px;
    background: rgba(255,255,255,.025);
    color: var(--muted); font-size: 16px; font-weight: 400;
    text-transform: uppercase; text-align: left;
    border-bottom: 1px solid var(--line);
}
.inv-table tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--text); }
.inv-table tbody tr:last-child td { border-bottom: none; }
.inv-table tbody tr { transition: background var(--transition); }
.inv-table tbody tr:hover { background: rgba(255,255,255,.03); }
.inv-num { font-weight: 800; }
.inv-date, .inv-company { color: var(--muted); }
.inv-brutto { font-weight: 400; }
.ta-r { text-align: right; }
.ta-c { text-align: center; }

.inv-actions { display: inline-flex; gap: 4px; }
.inv-act {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 7px;
    background: transparent; color: var(--muted);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.inv-act:hover { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }
.inv-act.ok { color: #4ade80; }
.inv-act.missing { color: #f87171; }
.inv-act.inv-del:hover { background: rgba(248,113,113,.12); color: #f87171; border-color: rgba(248,113,113,.4); }

/* ═══════════════════════════════════════════════════════════════
   RECHNUNG ERSTELLEN / BEARBEITEN
   ═══════════════════════════════════════════════════════════════ */
.inv-create-head { margin-bottom: 20px; }
.inv-create-head h1 { margin: 8px 0 4px; font-size: 24px; font-weight: 900; color: var(--text); }
.inv-hint { margin: 0; color: var(--muted); font-size: 16px; }

.inv-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

.inv-form-col {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px;
}
.inv-field { margin-bottom: 14px; }
.inv-field label {
    display: block; margin-bottom: 5px;
    color: var(--muted); font-size: 16px; font-weight: 400;
    text-transform: uppercase;
}
.inv-field input, .inv-field select, .inv-field textarea {
    width: 100%; padding: 10px 12px;
    background: var(--surface-2);
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    color: var(--text); font-size: 16px; font-family: inherit; font-weight: 400;
    outline: none; color-scheme: dark;
    transition: border-color var(--transition);
}
.inv-field input:focus, .inv-field select:focus, .inv-field textarea:focus { border-color: rgba(var(--brand-rgb),.5); }
.inv-field input[readonly] { background: var(--surface-3); color: var(--muted); }
.inv-field small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 16px; }
.inv-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.inv-col-span { grid-column: 1 / -1; }

/* Positionen */
.inv-positions { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 18px; }
.inv-pos-head, .inv-pos-row {
    display: grid;
    grid-template-columns: 38px 1fr 90px 90px 100px 28px;
    gap: 8px; align-items: start;
}
.inv-pos-head {
    margin-bottom: 8px;
    color: var(--muted-2); font-size: 16px; font-weight: 400; text-transform: uppercase;
}
.inv-pos-row { margin-bottom: 8px; }
.inv-pos-num { padding-top: 10px; color: var(--muted); font-weight: 700; font-size: 16px; }
.inv-pos-row textarea, .inv-pos-row input {
    width: 100%; padding: 8px 10px;
    background: var(--surface-2);
    border: 1px solid var(--line); border-radius: 8px;
    color: var(--text); font-size: 16px; font-family: inherit;
    outline: none; resize: vertical;
}
.inv-pos-row textarea:focus, .inv-pos-row input:focus { border-color: rgba(var(--brand-rgb),.5); }
.inv-pos-del {
    width: 28px; height: 36px;
    border: 1px solid var(--line); border-radius: 7px;
    background: transparent; color: var(--muted-2);
    cursor: pointer; font-size: 16px;
    transition: background var(--transition), color var(--transition);
}
.inv-pos-del:hover { background: rgba(248,113,113,.12); color: #f87171; }
.inv-pos-actions { margin-top: 6px; }

.si-btn-ghost {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 16px;
    background: var(--surface-2);
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    color: var(--text); font-size: 16px; font-weight: 800; font-family: inherit;
    cursor: pointer;
    transition: background var(--transition);
}
.si-btn-ghost:hover { background: var(--surface-3); }

.inv-create-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.inv-save-msg {
    margin-top: 12px; padding: 12px 16px; border-radius: var(--radius-sm);
    font-size: 16px; font-weight: 400;
}
.inv-save-msg.ok    { background: rgba(74,222,128,.12); color: #4ade80; border: 1px solid rgba(74,222,128,.3); }
.inv-save-msg.error { background: rgba(248,113,113,.12); color: #f87171; border: 1px solid rgba(248,113,113,.3); }

/* Vorschau */
.inv-preview-col {
    position: sticky; top: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.inv-preview-label {
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
    color: var(--muted); font-size: 16px; font-weight: 400; text-transform: uppercase;
}
#invPreview {
    width: 100%; aspect-ratio: 1 / 1.414;
    border: none; background: #fff; display: block;
}

@media (max-width: 1100px) {
    .inv-layout { grid-template-columns: 1fr; }
    .inv-preview-col { position: static; }
    #invPreview { min-height: 700px; }
}
@media (max-width: 700px) {
    .inv-grid2 { grid-template-columns: 1fr; }
    .inv-pos-head { display: none; }
    .inv-pos-row { grid-template-columns: 1fr 1fr; gap: 6px; }
    .inv-pos-row textarea { grid-column: 1 / -1; }
    .inv-pos-num { display: none; }
}

/* ── Rechnungen: Zeitraum-Filter ────────────────────────────── */
.inv-filter {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    margin-bottom: 18px;
}
.inv-filter-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.inv-filter-chip {
    padding: 7px 14px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted); font-size: 16px; font-weight: 400;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.inv-filter-chip:hover { background: var(--surface-3); color: var(--text); }
.inv-filter-chip.active {
    background: var(--brand-soft); color: var(--brand-2);
    border-color: rgba(var(--brand-rgb),.4);
}
.inv-filter-custom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inv-filter-custom label {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--muted-2); font-size: 16px; font-weight: 400;
}
.inv-filter-custom input[type="date"] {
    padding: 7px 10px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text); font-size: 16px; font-family: inherit;
    outline: none; color-scheme: dark;
}
.inv-filter-custom input[type="date"]:focus { border-color: rgba(var(--brand-rgb),.5); }

@media (max-width: 720px) {
    .inv-filter { flex-direction: column; align-items: stretch; }
}

/* ═══════════════════════════════════════════════════════════════
   CRM: Status-Filter, Aktiv-Toggle, Löschen
   ═══════════════════════════════════════════════════════════════ */

/* Status-Filter-Chips in der Toolbar */
.crm-status-filter {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    margin-right: 12px;
}
.crm-status-chip {
    padding: 6px 14px;
    border-radius: 999px;
    color: var(--muted); font-size: 16px; font-weight: 700;
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}
.crm-status-chip:hover { color: var(--text); }
.crm-status-chip.active {
    background: var(--brand);
    color: #fff;
}

/* Aktionen-Spalte */
.crm-th-actions { width: 1%; white-space: nowrap; }
.crm-td-actions { white-space: nowrap; }
.crm-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Toggle-Switch */
.crm-toggle {
    position: relative;
    width: 38px; height: 22px;
    flex-shrink: 0;
    border: none;
    border-radius: 999px;
    background: var(--surface-3);
    cursor: pointer;
    transition: background var(--transition);
    padding: 0;
}
.crm-toggle.is-active { background: #4ade80; }
.crm-toggle-knob {
    position: absolute;
    top: 2px; left: 2px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.crm-toggle.is-active .crm-toggle-knob { transform: translateX(16px); }
.crm-toggle:disabled { opacity: .5; cursor: default; }

.crm-status-text {
    font-size: 16px; font-weight: 700;
    color: var(--muted);
    min-width: 46px;
}

/* Lösch-Button */
.crm-delete {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 30px; height: 30px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
    color: var(--muted-2);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.crm-delete:hover {
    background: rgba(248,113,113,.12);
    color: #f87171;
    border-color: rgba(248,113,113,.4);
}
.crm-delete:disabled { opacity: .5; cursor: default; }

/* Inaktive Zeile visuell abheben */
.crm-row-inactive { opacity: .5; }
.crm-row-inactive .crm-company-link { text-decoration: line-through; }
.crm-row-inactive:hover { opacity: .8; }

/* ═══════════════════════════════════════════════════════════════
   MITARBEITERVERWALTUNG (staff.php)
   ═══════════════════════════════════════════════════════════════ */
.stf-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.stf-head h1 { margin: 0 0 4px; font-size: 24px; font-weight: 900; color: var(--text); }
.stf-head p { margin: 0; color: var(--muted); font-size: 16px; }

.stf-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.stf-stat {
    flex: 1; min-width: 140px;
    padding: 16px 18px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
}
.stf-stat span { display: block; color: var(--muted); font-size: 16px; font-weight: 700; text-transform: uppercase; margin-bottom: 6px; }
.stf-stat strong { font-size: 26px; font-weight: 900; color: var(--text); }

.stf-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.stf-table thead th {
    text-align: left; padding: 11px 14px;
    color: var(--muted-2); font-size: 16px; font-weight: 800;
    text-transform: uppercase;
    border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
.stf-table tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--text); }
.stf-table .ta-c { text-align: center; }
.stf-table .ta-r { text-align: right; }
.stf-row:hover { background: var(--surface-2); }
.stf-row-inactive { opacity: .5; }

.stf-name { display: flex; align-items: center; gap: 10px; }
.stf-name em { color: var(--muted-2); font-style: normal; font-size: 16px; }
.stf-avatar {
    flex-shrink: 0; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center; border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff; font-size: 16px; font-weight: 900;
}
.stf-mail { color: var(--brand-2); }
.stf-mail:hover { text-decoration: underline; }
.stf-login { color: var(--muted); font-size: 16px; white-space: nowrap; }

.stf-badge {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    background: var(--surface-3); color: var(--muted);
    font-size: 16px; font-weight: 700;
}
.stf-badge-admin { background: var(--brand-soft); color: var(--brand-2); }

/* Toggle */
.stf-toggle {
    position: relative; width: 38px; height: 22px; border: none;
    border-radius: 999px; background: var(--surface-3); cursor: pointer; padding: 0;
    transition: background var(--transition);
}
.stf-toggle.is-active { background: #4ade80; }
.stf-toggle-knob {
    position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
    border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3);
    transition: transform var(--transition);
}
.stf-toggle.is-active .stf-toggle-knob { transform: translateX(16px); }
.stf-toggle:disabled { opacity: .45; cursor: default; }

.stf-actions { display: inline-flex; gap: 6px; }
.stf-act {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px;
    background: transparent; color: var(--muted); cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.stf-act:hover { background: var(--surface-3); color: var(--text); }
.stf-delete:hover { background: rgba(248,113,113,.12); color: #f87171; border-color: rgba(248,113,113,.4); }
.stf-act:disabled { opacity: .4; cursor: default; }

/* Modal-Formular */
.stf-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stf-col-span { grid-column: 1 / -1; }
.stf-field label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 16px; font-weight: 800; text-transform: uppercase; }
.stf-field input[type="text"], .stf-field input[type="email"], .stf-field input[type="password"] {
    width: 100%; padding: 10px 12px; background: var(--surface-2);
    border: 1px solid var(--line); border-radius: 8px; color: var(--text);
    font-size: 16px; font-family: inherit; outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.stf-field input:focus { border-color: rgba(var(--brand-rgb),.5); box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.12); }
.stf-field small { display: block; margin-top: 5px; color: var(--muted-2); font-size: 16px; }

.stf-pass-wrap { position: relative; }
.stf-pass-wrap input { padding-right: 44px !important; }
.stf-pass-toggle {
    position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    border: none; background: transparent; color: var(--muted-2); cursor: pointer; border-radius: 7px;
}
.stf-pass-toggle:hover { background: var(--surface-3); color: var(--text); }

.stf-checks { display: flex; flex-direction: column; gap: 10px; }
.stf-check { display: flex; align-items: center; gap: 9px; cursor: pointer; text-transform: none !important; }
.stf-check input { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; }
.stf-check span { color: var(--text); font-size: 16px; font-weight: 600; }

.stf-form-msg { margin: 16px 0 0; padding: 11px 14px; border-radius: 8px; font-size: 16px; font-weight: 700; }
.stf-form-msg.error { background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.3); color: #f87171; }

.stf-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

@media (max-width: 640px) {
    .stf-form-grid { grid-template-columns: 1fr; }
}

/* ── SEO Insights: Kundenauswahl im Hero ────────────────────── */
.seo-customer-select {
    position: relative; z-index: 2;
    display: inline-flex; flex-direction: column; align-items: center;
    gap: 7px; margin: 24px auto 0;
}
.seo-customer-select label {
    color: var(--muted-2); font-size: 16px; font-weight: 800;
    text-transform: uppercase;
}
.seo-customer-select select {
    min-width: 280px; max-width: 100%;
    padding: 11px 40px 11px 16px;
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--text); font-size: 16px; font-weight: 700; font-family: inherit;
    cursor: pointer; outline: none;
    text-align: center; text-align-last: center;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.seo-customer-select select:hover { border-color: rgba(var(--brand-rgb),.5); }
.seo-customer-select select:focus {
    border-color: rgba(var(--brand-rgb),.6);
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.14);
}
.seo-customer-select select option { background: var(--surface); color: var(--text); font-weight: 600; }

@media (max-width: 768px) {
    .seo-customer-select { align-items: flex-start; }
    .seo-customer-select select { min-width: 0; width: 100%; text-align: left; text-align-last: left; }
}

/* ═══════════════════════════════════════════════════════════════
   CONTACT.PHP – Aktiv-Schalter im Header + Stammdaten-Tab
   ═══════════════════════════════════════════════════════════════ */

/* Kopfzeile mit Back-Link links und Aktiv-Schalter rechts */
.ct-header-top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; margin-bottom: 18px;
}
.ct-header-top .ct-back { margin-bottom: 0; }

.ct-active-switch { display: inline-flex; align-items: center; gap: 10px; }
.ct-active-label { font-size: 16px; font-weight: 400; color: var(--muted); }
.ct-active-toggle {
    position: relative; width: 44px; height: 24px; border: none;
    border-radius: 999px; background: var(--surface-3); cursor: pointer; padding: 0;
    transition: background var(--transition); flex-shrink: 0;
}
.ct-active-toggle.is-active { background: #4ade80; }
.ct-active-knob {
    position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
    border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3);
    transition: transform var(--transition);
}
.ct-active-toggle.is-active .ct-active-knob { transform: translateX(20px); }
.ct-active-toggle:disabled { opacity: .5; cursor: default; }

/* Stammdaten-Formular */
.ct-stammdaten { max-width: 820px; }
.ct-form-section {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-md); padding: 22px 24px; margin-bottom: 18px;
}
.ct-form-section h3 {
    margin: 0 0 18px; font-size: 16px; font-weight: 800; color: var(--text);
    padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.ct-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ct-col-span { grid-column: 1 / -1; }
.ct-field label {
    display: block; margin-bottom: 6px; color: var(--muted);
    font-size: 16px; font-weight: 400; text-transform: uppercase;
}
.ct-field input, .ct-field select {
    width: 100%; padding: 10px 12px; background: var(--surface-2);
    border: 1px solid var(--line); border-radius: 8px; color: var(--text);
    font-size: 16px; font-family: inherit; outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.ct-field input:focus, .ct-field select:focus {
    border-color: rgba(var(--brand-rgb),.5); box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.12);
}
.ct-field input[type="date"] { color-scheme: dark; }
.ct-field select { cursor: pointer; }

.ct-form-msg { margin-bottom: 16px; padding: 11px 14px; border-radius: 8px; font-size: 16px; font-weight: 400; }
.ct-form-msg.ok    { background: rgba(74,222,128,.12); border: 1px solid rgba(74,222,128,.3); color: #4ade80; }
.ct-form-msg.error { background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.3); color: #f87171; }

.ct-form-actions { display: flex; justify-content: flex-end; }

@media (max-width: 640px) {
    .ct-form-grid { grid-template-columns: 1fr; }
    .ct-header-top { flex-wrap: wrap; }
}

/* ── contact.php: Löschen-Button im Header ──────────────────── */
.ct-delete-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 14px; margin-left: 4px;
    background: transparent;
    border: 1px solid rgba(248,113,113,.35);
    border-radius: 8px;
    color: #f87171; font-size: 16px; font-weight: 400; font-family: inherit;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}
.ct-delete-btn:hover { background: rgba(248,113,113,.14); border-color: rgba(248,113,113,.6); }
.ct-delete-btn:disabled { opacity: .5; cursor: default; }

/* ── contact.php: Budget-Progressbar unter Kontaktzeile ─────── */
.ct-budget-bar {
    display: flex; align-items: center; gap: 10px;
    margin-top: 16px;
    width: 100%;
}
.ct-budget-track {
    flex: 1;
    height: 5px;
    background: var(--surface-3);
    border-radius: 99px;
    overflow: hidden;
}
.ct-budget-fill {
    height: 100%;
    border-radius: 99px;
    min-width: 2px;
    transition: width .35s ease;
}
.ct-budget-fill.ct-budget-ok   { background: #f87171; }   /* < 90 % – noch viel offen */
.ct-budget-fill.ct-budget-near { background: #f59e0b; }   /* 90–100 % – fast aufgebraucht */
.ct-budget-fill.ct-budget-over { background: #4ade80; }   /* > 100 % – erreicht/überschritten */
.ct-budget-pct {
    flex-shrink: 0;
    font-size: 16px; font-weight: 400; color: var(--muted-2);
    min-width: 34px; text-align: right;
}

/* ── contact.php: Projekte-Toolbar + Projekt löschen ────────── */
.ct-projects-toolbar {
    display: flex; justify-content: flex-end;
    margin-bottom: 18px;
}
.ct-del-project-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; margin-left: 8px;
    border: 1px solid rgba(248,113,113,.3);
    border-radius: 8px;
    background: transparent; color: #f87171;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}
.ct-del-project-btn:hover { background: rgba(248,113,113,.14); border-color: rgba(248,113,113,.55); }
.ct-del-project-btn:disabled { opacity: .5; cursor: default; }

/* ── contact.php: Projekt-Card ein-/ausklappbar ─────────────── */
.ct-project-toggle { cursor: pointer; user-select: none; }
.ct-project-toggle:hover h2 { color: var(--brand-2); }

/* Einklapp-Pfeil */
.ct-project-collapse {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    border: none; background: transparent; color: var(--muted);
    cursor: pointer; border-radius: 8px;
    transition: background var(--transition), transform .25s ease, color var(--transition);
}
.ct-project-collapse:hover { background: var(--surface-3); color: var(--text); }
/* Pfeil zeigt nach unten (offen); dreht sich, wenn eingeklappt */
.ct-project-card[data-collapsed="true"] .ct-project-collapse { transform: rotate(-90deg); }

/* Aufgaben-Bereich aus-/einblenden */
.ct-project-body {
    overflow: hidden;
    max-height: 4000px;
    transition: max-height .3s ease, opacity .2s ease;
}
.ct-project-card[data-collapsed="true"] .ct-project-body {
    max-height: 0;
    opacity: 0;
}
/* Wenn eingeklappt, untere Linie des Headers entfernen (sieht sauberer aus) */
.ct-project-card[data-collapsed="true"] .ct-project-head { border-bottom: none; }

/* ═══════════════════════════════════════════════════════════════
   ZEITPLANUNG (planung.php)
   ═══════════════════════════════════════════════════════════════ */
.pl-head { margin-bottom: 20px; }
.pl-head h1 { margin: 0 0 4px; font-size: 24px; font-weight: 900; color: var(--text); }
.pl-head p { margin: 0; color: var(--muted); font-size: 16px; }

.pl-controls {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.pl-filter { display: flex; align-items: center; gap: 14px; }
.pl-filter select {
    padding: 9px 14px; background: var(--surface-2); border: 1px solid var(--line);
    border-radius: 8px; color: var(--text); font-size: 16px; font-weight: 700;
    font-family: inherit; cursor: pointer; outline: none;
}
.pl-month-nav { display: flex; align-items: center; gap: 10px; }
.pl-nav-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px;
    background: var(--surface-2); color: var(--text);
    transition: background var(--transition), border-color var(--transition);
}
.pl-nav-btn:hover { background: var(--surface-3); border-color: var(--line-strong); }
.pl-month-label { font-size: 16px; font-weight: 800; color: var(--text); min-width: 150px; text-align: center; }

.pl-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pl-summary { color: var(--muted); font-size: 16px; }
.pl-summary strong { color: var(--text); font-size: 16px; }

/* Kontingent-Balken je Kunde */
.pl-quota-bar {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px; margin-bottom: 22px;
}
.pl-quota-item {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-md); padding: 12px 14px;
}
.pl-quota-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.pl-quota-name { font-size: 16px; font-weight: 800; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-quota-val { font-size: 16px; font-weight: 700; color: var(--muted); flex-shrink: 0; cursor: pointer; transition: color var(--transition); }
.pl-quota-val:hover { color: var(--brand-2); text-decoration: underline; }
.pl-quota-track { display: flex; height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.pl-quota-fill { height: 100%; min-width: 0; transition: width .35s ease; }
/* gearbeiteter Anteil (kräftig) + geplanter Anteil (heller, gestreift) */
.pl-quota-worked  { background: var(--brand); }
.pl-quota-planned { background: rgba(var(--brand-rgb),.4); }
.pl-quota-planned-over { background: #f87171; height: 100%; transition: width .35s ease; }
/* Legende */
.pl-quota-legend { display: flex; gap: 14px; margin-top: 7px; }
.pl-quota-legend span { display: inline-flex; align-items: center; gap: 5px; font-size: 16px; color: var(--muted); font-weight: 600; }
.pl-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pl-dot-worked  { background: var(--brand); }
.pl-dot-planned { background: rgba(var(--brand-rgb),.4); }
/* Wert rot färben bei Überbuchung */
.pl-quota-val-over { color: #f87171 !important; }

/* Kalender */
.pl-calendar {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 16px; overflow: hidden;
}
.pl-weekdays {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
    margin-bottom: 10px;
}
.pl-weekdays span {
    text-align: center; color: var(--muted-2); font-size: 16px;
    font-weight: 800; text-transform: uppercase;
}
.pl-grid {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
}
.pl-cell {
    position: relative;
    min-height: 130px;
    background: var(--surface-2); border: 1px solid var(--line);
    border-radius: var(--radius-md); padding: 8px;
    display: flex; flex-direction: column;
}
.pl-cell-empty { background: transparent; border: 1px dashed var(--line); opacity: .4; min-height: 0; }
.pl-today { border-color: rgba(var(--brand-rgb),.5); box-shadow: 0 0 0 2px rgba(var(--brand-rgb),.15); }
.pl-cell-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.pl-daynum { font-size: 16px; font-weight: 900; color: var(--text); }
.pl-dayhours { font-size: 16px; font-weight: 800; color: var(--muted-2); }
.pl-dayhours.pl-over { color: #f87171; }
.pl-cell-body { flex: 1; display: flex; flex-direction: column; gap: 5px; overflow-y: auto; }

.pl-entry {
    position: relative;
    background: var(--surface-3); border-radius: 7px;
    padding: 6px 22px 6px 8px;
    border-left: 3px solid var(--brand);
}
.pl-entry-task { display: block; font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.3; }
.pl-entry-meta { display: flex; justify-content: space-between; gap: 6px; margin-top: 2px; }
.pl-entry-cust { font-size: 16px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-entry-h { font-size: 16px; font-weight: 800; color: var(--brand-2); flex-shrink: 0; }
.pl-entry-del {
    position: absolute; top: 4px; right: 4px;
    width: 16px; height: 16px; display: flex; align-items: center; justify-content: center;
    border: none; background: transparent; color: var(--muted-2); cursor: pointer; border-radius: 4px;
    opacity: 0; transition: opacity var(--transition), background var(--transition);
}
.pl-entry:hover .pl-entry-del { opacity: 1; }
.pl-entry-del:hover { background: rgba(248,113,113,.2); color: #f87171; }

.pl-add-btn {
    margin-top: 6px;
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 26px;
    border: 1px dashed var(--line-strong); border-radius: 6px;
    background: transparent; color: var(--muted-2); cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.pl-add-btn:hover { background: var(--surface-3); color: var(--brand); border-color: rgba(var(--brand-rgb),.5); }

/* Modal */
.pl-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.6);
    z-index: 200; backdrop-filter: blur(2px);
}
.pl-modal {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
    z-index: 201; width: 92%; max-width: 420px;
}
.pl-modal-inner {
    background: var(--surface); border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
}
.pl-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.pl-modal-head strong { font-size: 16px; font-weight: 800; color: var(--text); }
.pl-modal-close {
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    border: none; background: transparent; color: var(--muted); cursor: pointer; border-radius: 7px;
}
.pl-modal-close:hover { background: var(--surface-3); color: var(--text); }
.pl-modal-body { padding: 20px; }
.pl-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 16px; font-weight: 800; text-transform: uppercase; }
.pl-select, .pl-input {
    width: 100%; padding: 10px 12px; margin-bottom: 16px;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
    color: var(--text); font-size: 16px; font-family: inherit; outline: none;
}
.pl-select:focus, .pl-input:focus { border-color: rgba(var(--brand-rgb),.5); box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.12); }
.pl-modal-msg { padding: 10px 13px; border-radius: 8px; font-size: 16px; font-weight: 700;
    background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.3); color: #f87171; }

@media (max-width: 900px) {
    .pl-grid, .pl-weekdays { grid-template-columns: repeat(2, 1fr); }
    .pl-cell-empty { display: none; }
}

/* ── Task-Modal: geplanter Aufwand Info ─────────────────────── */
.ct-estimate-info {
    margin-top: 7px;
    font-size: 16px; color: var(--muted);
    line-height: 1.5;
}
.ct-estimate-info strong { color: var(--text); font-weight: 800; }

/* ── Planung: Eintrag-Info-Modal ────────────────────────────── */
.pl-entry { cursor: pointer; }
.pl-info-row {
    display: flex; justify-content: space-between; gap: 14px;
    padding: 9px 0; border-bottom: 1px solid var(--line);
}
.pl-info-row:last-of-type { border-bottom: none; }
.pl-info-label {
    color: var(--muted-2); font-size: 16px; font-weight: 800;
    text-transform: uppercase; flex-shrink: 0;
}
.pl-info-val { color: var(--text); font-size: 16px; font-weight: 600; text-align: right; }
.pl-info-actions {
    display: flex; flex-direction: column; gap: 10px;
    margin-top: 18px;
}
.pl-info-actions .si-btn { width: 100%; justify-content: center; }
.pl-info-actions .si-btn-ghost { width: 100%; }

/* ── Planung: vergangene Tage abheben ───────────────────────── */
.pl-cell.pl-past { opacity: .55; background: var(--surface); }
.pl-cell.pl-past .pl-daynum { color: var(--muted-2); }

/* ── Sidebar: ausgegrauter Platzhalter-Link (z.B. "Keine Kunden") ── */
.nav-link-muted { opacity: .5; cursor: default; font-style: italic; }
.nav-link-muted:hover { background: transparent; }

/* ═══════════════════════════════════════════════════════════════
   PERFORMANCE REPORT (index.php)
   ═══════════════════════════════════════════════════════════════ */

/* Zurück-Link im Hero */
.rep-back {
    position: relative; z-index: 2;
    display: inline-flex; align-items: center; gap: 6px;
    margin-bottom: 16px;
    color: var(--muted); font-size: 16px; font-weight: 700;
    transition: color var(--transition);
}
.rep-back:hover { color: var(--brand-2); }

/* Monatsnavigation im Hero */
.rep-month-nav {
    position: relative; z-index: 2;
    display: inline-flex; align-items: center; gap: 12px;
    margin-top: 20px;
}
.rep-month-label { font-size: 16px; font-weight: 800; color: var(--text); min-width: 130px; text-align: center; }

.rep-proj-desc { margin: 6px 0 0; color: var(--muted); font-size: 16px; font-weight: 500; }

/* ── Report-Kundenauswahl ───────────────────────────────────── */
.rep-picker-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.rep-picker-card {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-md);
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.rep-picker-card:hover {
    border-color: rgba(var(--brand-rgb),.5);
    background: var(--surface-2);
    transform: translateY(-1px);
}
.rep-picker-avatar {
    flex-shrink: 0; width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center; border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff; font-size: 16px; font-weight: 900;
}
.rep-picker-name { flex: 1; font-size: 16px; font-weight: 700; color: var(--text); }
.rep-picker-card svg { color: var(--muted-2); flex-shrink: 0; }
.rep-picker-card:hover svg { color: var(--brand-2); }

/* ═══════════════════════════════════════════════════════════════
   WORKFLOWS (workflows.php / workflow.php)
   ═══════════════════════════════════════════════════════════════ */

/* ── Übersicht: Kopf ────────────────────────────────────────── */
.wf-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.wf-head h1 { margin: 0 0 4px; font-size: 24px; font-weight: 900; color: var(--text); }
.wf-head p { margin: 0; color: var(--muted); font-size: 16px; max-width: 640px; }

/* ── Übersicht: Karten-Grid ─────────────────────────────────── */
.wf-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.wf-card {
    position: relative;
    display: flex; gap: 14px; align-items: flex-start;
    padding: 20px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition), transform var(--transition), background var(--transition);
}
.wf-card:hover { border-color: rgba(var(--brand-rgb),.5); transform: translateY(-2px); background: var(--surface-2); }
.wf-card-icon {
    flex-shrink: 0; width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center; border-radius: 12px;
    background: var(--brand-soft); color: var(--brand-2);
}
.wf-card-body { flex: 1; min-width: 0; }
.wf-card-body h3 { margin: 0 0 5px; font-size: 16px; font-weight: 800; color: var(--text); }
.wf-card-body p { margin: 0 0 12px; font-size: 16px; color: var(--muted); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wf-card-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.wf-card-meta span { font-size: 16px; font-weight: 700; color: var(--muted-2); }
.wf-card-progress { color: var(--brand-2) !important; }
.wf-card-progress.done { color: #4ade80 !important; }
.wf-card-bar { height: 5px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.wf-card-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 99px; transition: width .35s ease; }
.wf-card-del {
    position: absolute; top: 12px; right: 12px;
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    border: none; background: transparent; color: var(--muted-2); cursor: pointer; border-radius: 7px;
    opacity: 0; transition: opacity var(--transition), background var(--transition), color var(--transition);
}
.wf-card:hover .wf-card-del { opacity: 1; }
.wf-card-del:hover { background: rgba(248,113,113,.18); color: #f87171; }

/* ── Detail: Kopf + Fortschritt ─────────────────────────────── */
.wf-detail-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin: 14px 0 18px;
}
.wf-detail-head h1 { margin: 0 0 5px; font-size: 24px; font-weight: 900; color: var(--text); }
.wf-detail-desc { margin: 0; color: var(--muted); font-size: 16px; max-width: 640px; line-height: 1.55; }

.wf-progress-wrap { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.wf-progress-bar { flex: 1; height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.wf-progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 99px; transition: width .4s ease; }
.wf-progress-label { font-size: 16px; font-weight: 700; color: var(--muted); flex-shrink: 0; }

/* ── Detail: Lektionen (Akkordeon) ──────────────────────────── */
.wf-lessons { display: flex; flex-direction: column; gap: 12px; }
.wf-lesson {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-md); overflow: hidden;
    transition: border-color var(--transition);
}
.wf-lesson.is-done { border-color: rgba(74,222,128,.4); }
.wf-lesson-head {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px; cursor: pointer;
    user-select: none;
}
.wf-lesson-head:hover { background: var(--surface-2); }
.wf-lesson-num {
    flex-shrink: 0; width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center; border-radius: 50%;
    background: var(--surface-3); color: var(--muted); font-size: 16px; font-weight: 800;
    transition: background var(--transition), color var(--transition);
}
.wf-lesson.is-done .wf-lesson-num { background: #4ade80; color: #0b3d1f; }
.wf-lesson-title { flex: 1; font-size: 16px; font-weight: 700; color: var(--text); }
.wf-lesson-check {
    flex-shrink: 0; width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center; border-radius: 50%;
    border: 2px solid var(--line-strong); color: transparent;
    transition: all var(--transition);
}
.wf-lesson.is-done .wf-lesson-check { background: #4ade80; border-color: #4ade80; color: #0b3d1f; }
.wf-lesson-toggle {
    flex-shrink: 0; width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border: none; background: transparent; color: var(--muted-2); cursor: pointer; border-radius: 7px;
    transition: transform var(--transition);
}
.wf-lesson[data-collapsed="false"] .wf-lesson-toggle { transform: rotate(180deg); }

/* Body auf-/zuklappen */
.wf-lesson-body {
    padding: 0 18px;
    max-height: 0; overflow: hidden;
    transition: max-height .35s ease, padding .35s ease;
}
.wf-lesson[data-collapsed="false"] .wf-lesson-body {
    max-height: 2000px; padding: 4px 18px 18px;
}
.wf-lesson-video { margin-bottom: 16px; }
.wf-lesson-video video {
    width: 100%; max-height: 460px; border-radius: var(--radius-md);
    background: #000; display: block;
}
.wf-lesson-text {
    color: var(--text-2, var(--muted)); font-size: 16px; line-height: 1.7;
    margin-bottom: 18px; white-space: normal;
}

.wf-lesson-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wf-done-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px; border-radius: 8px;
    border: 1px solid var(--line-strong); background: var(--surface-2);
    color: var(--text); font-size: 16px; font-weight: 700; font-family: inherit; cursor: pointer;
    transition: all var(--transition);
}
.wf-done-btn svg { color: var(--muted-2); transition: color var(--transition); }
.wf-done-btn:hover { border-color: rgba(74,222,128,.5); }
.wf-done-btn.is-done {
    background: rgba(74,222,128,.15); border-color: rgba(74,222,128,.5); color: #4ade80;
}
.wf-done-btn.is-done svg { color: #4ade80; }

.wf-lesson-admin { display: flex; gap: 6px; }
.wf-lesson-edit, .wf-lesson-del {
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); background: var(--surface-2);
    color: var(--muted); cursor: pointer; border-radius: 7px;
    transition: all var(--transition);
}
.wf-lesson-edit:hover { border-color: var(--line-strong); color: var(--text); }
.wf-lesson-del:hover { background: rgba(248,113,113,.18); border-color: rgba(248,113,113,.4); color: #f87171; }

/* ── Workflow-Modals ────────────────────────────────────────── */
.wf-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.6);
    z-index: 200; backdrop-filter: blur(2px);
}
.wf-modal {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
    z-index: 201; width: 92%; max-width: 540px;
    max-height: 90vh; overflow-y: auto;
}
.wf-modal-inner {
    background: var(--surface); border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
}
.wf-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.wf-modal-head strong { font-size: 16px; font-weight: 800; color: var(--text); }
.wf-modal-close {
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    border: none; background: transparent; color: var(--muted); cursor: pointer; border-radius: 7px;
}
.wf-modal-close:hover { background: var(--surface-3); color: var(--text); }
.wf-modal-body { padding: 20px; }
.wf-label { display: block; margin-bottom: 6px; margin-top: 14px; color: var(--muted); font-size: 16px; font-weight: 800; text-transform: uppercase; }
.wf-label:first-child { margin-top: 0; }
.wf-input {
    width: 100%; padding: 10px 12px;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
    color: var(--text); font-size: 16px; font-family: inherit; outline: none;
    box-sizing: border-box;
}
textarea.wf-input { resize: vertical; line-height: 1.5; }
.wf-input:focus { border-color: rgba(var(--brand-rgb),.5); box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.12); }
.wf-file { padding: 8px; font-size: 16px; color: var(--muted); cursor: pointer; }
.wf-file::-webkit-file-upload-button, .wf-file::file-selector-button {
    margin-right: 10px; padding: 6px 12px; border-radius: 6px;
    border: 1px solid var(--line-strong); background: var(--surface-3);
    color: var(--text); font-size: 16px; font-weight: 700; cursor: pointer;
}
.wf-video-hint { margin-top: 8px; }
.wf-check { display: inline-flex; align-items: center; gap: 7px; font-size: 16px; color: var(--muted); cursor: pointer; }
.wf-check input { width: 15px; height: 15px; accent-color: var(--brand); }

.wf-upload-progress { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.wf-upload-bar { flex: 1; height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.wf-upload-fill { height: 100%; width: 0; background: var(--brand); border-radius: 99px; transition: width .15s linear; }
#wfUploadPct { font-size: 16px; font-weight: 800; color: var(--muted); min-width: 38px; text-align: right; }

.wf-modal-msg { margin-top: 14px; padding: 10px 13px; border-radius: 8px; font-size: 16px; font-weight: 700;
    background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.3); color: #f87171; }

@media (max-width: 640px) {
    .wf-lesson-actions { flex-direction: column; align-items: stretch; }
    .wf-lesson-admin { justify-content: flex-end; }
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD (index.php)
   ═══════════════════════════════════════════════════════════════ */

/* Mitarbeiter-Umschalter im Hero */
.dash-staff-switch {
    position: relative; z-index: 2;
    display: inline-flex; align-items: center; gap: 10px; margin-top: 18px;
}
.dash-staff-switch label { font-size: 16px; color: var(--muted); font-weight: 700; }
.dash-staff-switch select {
    padding: 8px 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px; color: #fff; font-size: 16px; font-weight: 700; font-family: inherit; cursor: pointer; outline: none;
}
.dash-staff-switch select option { background: var(--surface); color: var(--text); }

/* Laufender Timer Banner */
.dash-running {
    display: flex; align-items: center; gap: 16px;
    margin: 22px 0 0;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(var(--brand-rgb),.18), rgba(var(--brand-rgb),.06));
    border: 1px solid rgba(var(--brand-rgb),.35);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition), transform var(--transition);
}
.dash-running:hover { border-color: rgba(var(--brand-rgb),.6); transform: translateY(-1px); }
.dash-running-pulse {
    flex-shrink: 0; width: 12px; height: 12px; border-radius: 50%;
    background: var(--brand); box-shadow: 0 0 0 0 rgba(var(--brand-rgb),.6);
    animation: dashPulse 1.6s infinite;
}
@keyframes dashPulse {
    0%   { box-shadow: 0 0 0 0 rgba(var(--brand-rgb),.5); }
    70%  { box-shadow: 0 0 0 10px rgba(var(--brand-rgb),0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--brand-rgb),0); }
}
.dash-running-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dash-running-label { font-size: 16px; font-weight: 800; text-transform: uppercase; color: var(--brand-2); }
.dash-running-info strong { font-size: 16px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-running-info small { font-size: 16px; color: var(--muted); }
.dash-running-time { flex-shrink: 0; font-size: 22px; font-weight: 900; color: var(--text); font-variant-numeric: tabular-nums; }

/* Zwei-Spalten-Layout */
.dash-cols {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px;
    align-items: start;
}
@media (max-width: 900px) { .dash-cols { grid-template-columns: 1fr; } }

.dash-block {
    min-width: 0;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 20px;
}
.dash-block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dash-block-head h2 { margin: 0; font-size: 17px; font-weight: 800; color: var(--text); }
.dash-block-link { font-size: 16px; font-weight: 700; color: var(--muted); transition: color var(--transition); }
.dash-block-link:hover { color: var(--brand-2); }

.dash-subhead {
    font-size: 16px; font-weight: 800; text-transform: uppercase;
    color: var(--muted-2); margin: 16px 0 8px;
}
.dash-subhead:first-child { margin-top: 0; }
.dash-subhead-warn { color: #f87171; }

/* Aufgaben-Zeile */
.dash-task, .dash-note {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 14px; margin-bottom: 8px;
    background: var(--surface-2); border: 1px solid var(--line);
    border-radius: var(--radius-md);
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.dash-task:hover, .dash-note:hover { border-color: var(--line-strong); background: var(--surface-3); transform: translateX(2px); }
.dash-task.is-overdue, .dash-note.is-overdue { border-left: 3px solid #f87171; }

.dash-task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dash-task-name { font-size: 16px; font-weight: 400; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-task-sub { font-size: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-task-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.dash-task-date { font-size: 16px; font-weight: 700; color: var(--muted-2); }
.dash-date-warn { color: #f87171; }
.dash-task-hours { font-size: 16px; font-weight: 800; color: var(--brand-2); min-width: 42px; text-align: right; }

/* Notiz-Zeile */
.dash-note-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dash-note-cust { font-size: 16px; font-weight: 800; color: var(--text); }
.dash-note-text { font-size: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-note-date { flex-shrink: 0; font-size: 16px; font-weight: 700; color: var(--muted-2); }

/* Leerzustand je Block */
.dash-empty {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 28px 16px; text-align: center; color: var(--muted-2);
}
.dash-empty svg { color: var(--muted-2); opacity: .6; }
.dash-empty p { margin: 0; font-size: 16px; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════════
   AUSWERTUNG – Plan vs. Ist (auswertung.php)
   ═══════════════════════════════════════════════════════════════ */
.av-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.av-head h1 { margin: 0 0 4px; font-size: 24px; font-weight: 900; color: var(--text); }
.av-head p { margin: 0; color: var(--muted); font-size: 16px; }
.av-month-nav { display: flex; align-items: center; gap: 12px; }
.av-month-label { font-size: 16px; font-weight: 800; color: var(--text); min-width: 130px; text-align: center; }

.av-section { margin-bottom: 30px; }
.av-section-title { margin: 0 0 12px; font-size: 16px; font-weight: 800; color: var(--text); }

.av-table-wrap {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); overflow: hidden;
}
.av-table { width: 100%; border-collapse: collapse; }
.av-table th, .av-table td { padding: 13px 18px; text-align: left; font-size: 16px; }
.av-table thead th {
    background: var(--surface-2); color: var(--muted-2);
    font-size: 16px; font-weight: 800; text-transform: uppercase;
    border-bottom: 1px solid var(--line);
}
.av-table tbody tr { border-bottom: 1px solid var(--line); transition: background var(--transition); }
.av-table tbody tr:hover { background: var(--surface-2); }
.av-table tbody tr:last-child { border-bottom: none; }
.av-table tfoot td { border-top: 2px solid var(--line-strong); font-weight: 800; color: var(--text); background: var(--surface-2); }
.av-name a { color: var(--text); font-weight: 700; transition: color var(--transition); }
.av-name a:hover { color: var(--brand-2); }
.av-muted { color: var(--muted); }
.av-strong { color: var(--text); font-weight: 800; }
.ta-r { text-align: right !important; }

.av-bar-col { width: 220px; }
.av-bar-track {
    display: inline-block; vertical-align: middle;
    width: calc(100% - 52px); height: 7px;
    background: var(--surface-3); border-radius: 99px; overflow: hidden;
}
.av-bar-fill { height: 100%; border-radius: 99px; transition: width .35s ease; }
.av-bar-ok   { background: #4ade80; }
.av-bar-near { background: #f59e0b; }
.av-bar-low  { background: #28B8DA; }
.av-bar-over { background: #f87171; }
.av-bar-none { background: var(--surface-3); }
.av-bar-pct { display: inline-block; width: 44px; text-align: right; font-size: 16px; font-weight: 800; color: var(--muted); vertical-align: middle; }

/* ═══════════════════════════════════════════════════════════════
   AUFGABEN-ÜBERSICHT (aufgaben.php)
   ═══════════════════════════════════════════════════════════════ */
.af-head { margin-bottom: 18px; }
.af-head h1 { margin: 0 0 4px; font-size: 24px; font-weight: 900; color: var(--text); }
.af-head p { margin: 0; color: var(--muted); font-size: 16px; }

.af-filter {
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    margin-bottom: 18px; padding: 14px 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
}
.af-filter-group { display: flex; align-items: center; gap: 8px; }
.af-filter-group label { font-size: 16px; font-weight: 800; color: var(--muted-2); text-transform: uppercase; }
.af-filter-group select {
    padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--line);
    border-radius: 8px; color: var(--text); font-size: 16px; font-weight: 700; font-family: inherit; cursor: pointer; outline: none;
}
.af-check { display: inline-flex; align-items: center; gap: 7px; font-size: 16px; font-weight: 700; color: var(--muted); cursor: pointer; }
.af-check input { width: 16px; height: 16px; accent-color: var(--brand); }
.af-assignees { color: var(--muted); font-size: 16px; }
.af-row:hover { background: rgba(var(--brand-rgb),.05) !important; }

/* ═══════════════════════════════════════════════════════════════
   ZEITERFASSUNG-AUSWERTUNG (zeiterfassung.php)
   ═══════════════════════════════════════════════════════════════ */
.ze-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.ze-head h1 { margin: 0 0 4px; font-size: 24px; font-weight: 900; color: var(--text); }
.ze-head p { margin: 0; color: var(--muted); font-size: 16px; }
.ze-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Monat/Jahr Umschalter */
.ze-toggle { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.ze-toggle-btn {
    padding: 7px 16px; border-radius: 7px; font-size: 16px; font-weight: 700;
    color: var(--muted); transition: all var(--transition);
}
.ze-toggle-btn.active { background: var(--brand); color: #fff; }
.ze-toggle-btn:not(.active):hover { color: var(--text); }

.ze-nav { display: inline-flex; align-items: center; gap: 10px; }
.ze-range { font-size: 16px; font-weight: 800; color: var(--text); min-width: 120px; text-align: center; }

.ze-staff select {
    padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--line);
    border-radius: 8px; color: var(--text); font-size: 16px; font-weight: 700; font-family: inherit; cursor: pointer; outline: none;
}

/* Gesamtsumme */
.ze-total {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px; margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(var(--brand-rgb),.14), rgba(var(--brand-rgb),.04));
    border: 1px solid rgba(var(--brand-rgb),.3); border-radius: var(--radius-lg);
}
.ze-total span { font-size: 16px; font-weight: 700; color: var(--muted); }
.ze-total strong { font-size: 28px; font-weight: 900; color: var(--text); font-variant-numeric: tabular-nums; }

.ze-section { margin-bottom: 28px; }
.ze-section-title { margin: 0 0 14px; font-size: 16px; font-weight: 800; color: var(--text); }

/* Balkendiagramm Zeitverlauf */
.ze-chart {
    display: flex; align-items: flex-end; gap: 4px;
    height: 200px; padding: 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    overflow-x: auto;
}
.ze-bar-wrap { flex: 1; min-width: 18px; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.ze-bar-col { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.ze-bar {
    width: 100%; max-width: 38px; min-height: 0;
    background: linear-gradient(180deg, var(--brand-2), var(--brand));
    border-radius: 5px 5px 0 0; transition: height .4s ease, opacity var(--transition);
}
.ze-bar-wrap:hover .ze-bar { opacity: .8; }
.ze-bar-label { font-size: 16px; font-weight: 700; color: var(--muted-2); white-space: nowrap; }

/* Zwei-Spalten (Kunde / Mitarbeiter) */
.ze-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .ze-cols { grid-template-columns: 1fr; } }

.ze-row { margin-bottom: 14px; }
.ze-row:last-child { margin-bottom: 0; }
.ze-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.ze-row-name { font-size: 16px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.ze-row-name:hover { color: var(--brand-2); }
.ze-row-val { font-size: 16px; font-weight: 800; color: var(--muted); flex-shrink: 0; }
.ze-row-track { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.ze-row-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 99px; transition: width .4s ease; }
.ze-fill-alt { background: linear-gradient(90deg, #28B8DA, #5fd4ec); }

/* ═══════════════════════════════════════════════════════════════
   GROBKOSTENPLAN-EDITOR (gkp-create.php)
   ═══════════════════════════════════════════════════════════════ */
.gkp-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .gkp-wrap { grid-template-columns: 1fr; } }

/* Linke Spalte */
.gkp-side {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 16px;
    position: sticky; top: 20px;
}
.gkp-side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.gkp-side-head h2 { margin: 0; font-size: 16px; font-weight: 800; color: var(--text); }
.gkp-side-head .si-btn { padding: 7px 12px; font-size: 16px; }

.gkp-plan-list { display: flex; flex-direction: column; gap: 6px; }
.gkp-empty-hint { font-size: 16px; color: var(--muted); margin: 8px 0; }
.gkp-plan-item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 11px 12px; border-radius: var(--radius-md);
    background: var(--surface-2); border: 1px solid var(--line);
    transition: all var(--transition);
}
.gkp-plan-item:hover { border-color: var(--line-strong); background: var(--surface-3); }
.gkp-plan-item.active { border-color: rgba(var(--brand-rgb),.55); background: rgba(var(--brand-rgb),.08); }
.gkp-plan-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gkp-plan-title { font-size: 16px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gkp-plan-recip { font-size: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.gkp-status { flex-shrink: 0; font-size: 16px; font-weight: 800; padding: 3px 8px; border-radius: 99px; text-transform: uppercase; }
.gkp-status-entwurf       { background: var(--surface-3); color: var(--muted); }
.gkp-status-gesendet      { background: rgba(40,184,218,.16); color: #28B8DA; }
.gkp-status-angesehen     { background: rgba(245,158,11,.16); color: #f59e0b; }
.gkp-status-unterzeichnet { background: rgba(74,222,128,.16); color: #4ade80; }

/* Rechte Spalte */
.gkp-main { min-width: 0; }
.gkp-placeholder {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 50px 30px; text-align: center;
}
.gkp-placeholder h1 { margin: 0 0 8px; font-size: 22px; font-weight: 900; color: var(--text); }
.gkp-placeholder p { margin: 0; color: var(--muted); font-size: 16px; }

.gkp-editor { display: flex; flex-direction: column; gap: 14px; }
.gkp-editor-meta { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .gkp-editor-meta { grid-template-columns: 1fr; } }
.gkp-meta-field { display: flex; flex-direction: column; gap: 5px; }
.gkp-meta-field label { font-size: 16px; font-weight: 800; color: var(--muted-2); text-transform: uppercase; }
.gkp-meta-field input {
    padding: 9px 12px; background: var(--surface); border: 1px solid var(--line);
    border-radius: 8px; color: var(--text); font-size: 16px; font-family: inherit; outline: none;
}
.gkp-meta-field input:focus { border-color: rgba(var(--brand-rgb),.5); box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.12); }

/* Toolbar */
.gkp-toolbar {
    display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
    padding: 8px 10px; position: sticky; top: 0; z-index: 5;
}
.gkp-tool {
    min-width: 34px; height: 32px; padding: 0 10px;
    border: 1px solid var(--line); background: var(--surface-2);
    color: var(--text); font-size: 16px; font-family: inherit; cursor: pointer; border-radius: 6px;
    transition: all var(--transition);
}
.gkp-tool:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.gkp-tool-sep { width: 1px; height: 22px; background: var(--line-strong); margin: 0 4px; }

/* Editierbares Dokument – heller Papier-Look */
.gkp-doc-scroll {
    background: #6b7280; border-radius: var(--radius-md); padding: 24px;
    max-height: calc(100vh - 240px); overflow-y: auto;
}
/* Das weiße Blatt: Wrapper bekommt Papier-Optik (Inhalt + Footer zusammen) */
.gkp-doc-scroll > .gkp-doc {
    background: #fff; border-radius: 4px;
    box-shadow: 0 4px 24px rgba(0,0,0,.3);
    max-width: 760px; margin: 0 auto;
    padding: 40px 44px;
}
.gkp-editable {
    color: #1a1a1a; outline: none; min-height: 200px;
    border-radius: 4px;
}
.gkp-editable:focus { box-shadow: 0 0 0 2px rgba(var(--brand-rgb),.35); }
/* Nicht-editierbarer Vorschaubereich (Unterschrift + Footer) leicht abgesetzt */
.gkp-nonedit { opacity: .92; }
.gkp-nonedit:before {
    content: "Vorschau – wird nicht bearbeitet"; display: block;
    font-size: 16px; color: #b3b9c4; text-transform: uppercase;
    margin: 18px 0 4px; text-align: center;
}
/* Sektionen im Editor hervorheben + Steuer-Buttons */
.gkp-editable [data-gkp-section] { position: relative; border: 1px dashed transparent; border-radius: 6px; transition: border-color .15s; padding-right: 4px; }
.gkp-editable [data-gkp-section]:hover { border-color: rgba(241,99,52,.4); }
.gkp-sec-tools {
    position: absolute; top: 6px; right: 6px; display: flex; gap: 4px;
    opacity: 0; transition: opacity .15s;
}
.gkp-editable [data-gkp-section]:hover .gkp-sec-tools { opacity: 1; }
.gkp-sec-btn {
    width: 24px; height: 24px; border-radius: 5px; border: 1px solid #d0d4db;
    background: #fff; color: #555; font-size: 16px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center; padding: 0;
    transition: all .12s;
}
.gkp-sec-btn:hover { background: #f3f4f6; color: #1a1a1a; }
.gkp-sec-del:hover { background: #f87171; border-color: #f87171; color: #fff; }

/* Aktionen */
.gkp-editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.gkp-save-state { font-size: 16px; font-weight: 700; color: var(--muted); }
.gkp-save-state.saved { color: #4ade80; }
.gkp-save-state.dirty { color: #f59e0b; }
.gkp-action-btns { display: flex; align-items: center; gap: 10px; }
.gkp-del-btn {
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
    border-radius: 8px; cursor: pointer; transition: all var(--transition);
}
.gkp-del-btn:hover { background: rgba(248,113,113,.18); border-color: rgba(248,113,113,.4); color: #f87171; }

/* ── GKP: Kunden-Link / Share-Bereich (gkp-create.php) ──────── */
.gkp-share {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-md); padding: 16px;
}
.gkp-share-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.gkp-share-title { font-size: 16px; font-weight: 800; color: var(--text); }
.gkp-share-hint { margin: 0 0 12px; font-size: 16px; color: var(--muted); }
.gkp-share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.gkp-share-row input {
    flex: 1; min-width: 200px; padding: 9px 12px;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
    color: var(--text); font-size: 16px; font-family: inherit; outline: none;
}
.gkp-share-row .si-btn-ghost { padding: 9px 16px; white-space: nowrap; }
.gkp-signed-info { margin: 12px 0 0; font-size: 16px; color: #4ade80; font-weight: 600; }
.gkp-signed-info strong { color: var(--text); }

/* ══════════════════════════════════════════════════════════════
   FORMULARE – kanonische Steuerelemente (CI)
   Bisher nur im Design-Doc beschrieben, hier global implementiert.
   Verwendbar in jedem Modul:  class="input" / "select" / "label"
   ══════════════════════════════════════════════════════════════ */
.input,
.select,
textarea.input {
    width: 100%;
    padding: 10px 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    line-height: 1.4;
    outline: none;
    color-scheme: dark;
    transition: border-color var(--transition), box-shadow var(--transition);
}
textarea.input { resize: vertical; min-height: 64px; }
.input:focus,
.select:focus,
textarea.input:focus {
    border-color: rgba(var(--brand-rgb), .5);
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .12);
}
.input::placeholder { color: var(--muted-2); }
.input:disabled, .select:disabled { opacity: .6; cursor: not-allowed; }

/* Datums-/Zahlenfelder: native Picker im Dark-Theme + Brand-Icon */
.input[type="date"],
.input[type="number"] { color-scheme: dark; }
.input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(48%) sepia(72%) saturate(2200%) hue-rotate(353deg) brightness(96%) contrast(95%);
    cursor: pointer;
}
.input[type="number"]::-webkit-outer-spin-button,
.input[type="number"]::-webkit-inner-spin-button { opacity: .55; }

/* Select: eigener Chevron statt nativem Pfeil */
.select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b8b8ae' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    cursor: pointer;
}
.select option { background: var(--surface); color: var(--text); }

.label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;

}
.label .req { color: var(--brand); }

/* ══════════════════════════════════════════════════════════════
   EINNAHMEN / AUSGABEN  (einausgaben.php)
   ══════════════════════════════════════════════════════════════ */
.ea-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
.ea-head h1 { margin: 0 0 4px; font-size: clamp(26px, 3vw, 34px); font-weight: 900; }
.ea-head p { margin: 0; color: var(--muted); font-size: 16px; }
.ea-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ea-period { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 22px 0 6px; }
.ea-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.ea-preset { padding: 7px 14px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface-2); color: var(--muted); font-size: 16px; font-weight: 400; cursor: pointer; transition: background var(--transition), color var(--transition), border-color var(--transition); }
.ea-preset:hover { border-color: var(--line-strong); color: var(--text); }
.ea-preset.active { border-color: rgba(var(--brand-rgb), .55); background: var(--brand-soft); color: var(--brand-2); }
.ea-range { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ea-range .input { width: auto; min-width: 150px; }
.ea-range span { color: var(--muted-2); font-size: 16px; }
.ea-meta { color: var(--muted-2); font-size: 16px; margin: 2px 0 0; }
.ea-meta strong { color: var(--text); }

.ea-stat-net { color: var(--text); }
.ea-stat-sub { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: auto; }
.ea-stat-sub .row { display: flex; justify-content: space-between; align-items: baseline; }
.ea-stat-sub .row span { color: var(--muted-2); font-size: 16px; font-weight: 700; }
.ea-stat-sub .row strong { font-size: 18px; font-weight: 900; }
.box .ea-pct { font-size: 16px; font-weight: 800; color: var(--muted-2); }
.ea-pos { color: var(--ok); } .ea-neg { color: var(--danger); }

.ea-card-title { margin: 0 0 16px; font-size: 16px; font-weight: 400; }
.ea-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; margin-top: 18px; }
.ea-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-soft); padding: 22px; }

.ea-chart { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding-top: 8px; }
.ea-chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.ea-chart-bars { display: flex; align-items: flex-end; gap: 4px; height: 150px; width: 100%; justify-content: center; }
.ea-bar { width: 14px; border-radius: 6px 6px 0 0; min-height: 2px; transition: height .35s var(--ease); }
.ea-bar-inc { background: linear-gradient(180deg, var(--accent-teal), #017a5f); }
.ea-bar-exp { background: linear-gradient(180deg, var(--brand-2), var(--brand)); }
.ea-chart-lbl { font-size: 16px; font-weight: 400; color: var(--muted-2); white-space: nowrap; }
.ea-legend { display: flex; gap: 16px; margin-top: 14px; }
.ea-legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 16px; font-weight: 400; color: var(--muted); }
.ea-dot { width: 10px; height: 10px; border-radius: 3px; }
.ea-dot-inc { background: #4ade80; } .ea-dot-exp { background: #f0846b; }

.ea-vrow { margin-bottom: 14px; }
.ea-vrow:last-child { margin-bottom: 0; }
.ea-vrow-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.ea-vrow-name { font-size: 16px; font-weight: 400; color: var(--text); }
.ea-vrow-val { font-size: 16px; font-weight: 400; color: var(--muted); }
.ea-vtrack { height: 8px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.ea-vfill { height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

.ea-beleg-link { display: inline-flex; align-items: center; gap: 5px; color: var(--brand); font-weight: 400; font-size: 16px; }
.ea-beleg-link:hover { color: var(--brand-2); }
.ea-del { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; transition: color var(--transition), border-color var(--transition); }
.ea-del:hover { color: var(--danger); border-color: rgba(248,113,113,.4); }
.ea-amt-pos { color: var(--ok); font-weight: 400; }
.ea-amt-neg { color: var(--danger); font-weight: 400; }
.ea-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.ea-toolbar .ea-export { margin-left: auto; display: flex; gap: 8px; }

.ea-dz { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 26px; border: 2px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--surface-2); text-align: center; cursor: pointer; transition: background var(--transition), border-color var(--transition); margin-bottom: 14px; }
.ea-dz:hover, .ea-dz.drag { border-color: rgba(var(--brand-rgb), .55); background: var(--brand-soft); }
.ea-dz svg { color: var(--brand); }
.ea-dz strong { font-size: 16px; color: var(--text); }
.ea-dz small { color: var(--muted-2); font-size: 16px; }
.ea-dz-status { font-size: 16px; font-weight: 700; color: var(--brand-2); min-height: 16px; }
.ea-hint { font-size: 16px; color: var(--muted-2); margin: 0 0 14px; }
.ea-preview { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 16px; }
.ea-preview-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.ea-preview-name { font-size: 16px; font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ea-preview-body img { display: block; max-width: 100%; max-height: 280px; margin: 0 auto; }
.ea-preview-body embed, .ea-preview-body iframe { width: 100%; height: 300px; border: 0; display: block; }
.ea-field { margin-bottom: 14px; }
.ea-field-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
.ea-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.ea-seg button { padding: 9px 14px; border: 0; background: transparent; color: var(--muted); font-size: 16px; font-weight: 400; cursor: pointer; transition: background var(--transition), color var(--transition); }
.ea-seg button.active { background: var(--brand); color: #fff; }
.ea-alert { display: none; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.3); color: var(--danger); font-size: 16px; font-weight: 400; margin-top: 6px; }
.ea-alert.show { display: block; }
.ea-usage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0; }
.ea-usage .u { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); }
.ea-usage .u span { display: block; color: var(--muted-2); font-size: 16px; font-weight: 400; margin-bottom: 4px; }
.ea-usage .u strong { font-size: 20px; font-weight: 900; }
.ea-test-result { font-size: 16px; font-weight: 400; margin-left: 8px; }
.ea-keybox { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid rgba(74,222,128,.3); background: rgba(74,222,128,.10); border-radius: var(--radius-sm); color: var(--ok); font-size: 16px; font-weight: 400; margin-bottom: 14px; }

@media (max-width: 900px) { .ea-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .ea-field-row { grid-template-columns: 1fr; } }

/* ── Einnahmen/Ausgaben · Übersicht v2 (Charts, KPIs, Tabelle) ── */
.ea-cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 0 22px; min-height: 46px;
    border: 0; border-radius: var(--radius-pill); cursor: pointer;
    color: #fff; font-size: 16px; font-weight: 400; font-family: inherit;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 14px 34px rgba(var(--brand-rgb), .28);
    transition: transform var(--ease) .18s;
}
.ea-cta:hover { transform: translateY(-2px); color: #fff; }
.ea-btn-show {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 18px; min-height: 42px;
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    background: var(--surface-2); color: var(--text);
    font-size: 16px; font-weight: 400; font-family: inherit; cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}
.ea-btn-show:hover { background: var(--surface-3); color: var(--text); }

/* KPI-Kacheln */
.ea-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.ea-kpi { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-soft); padding: 20px 22px; }
.ea-kpi-top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.ea-kpi-label { color: var(--muted); font-size: 16px; font-weight: 400; text-transform: uppercase; }
.ea-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: var(--radius-pill); font-size: 16px; font-weight: 400; }
.ea-badge-info   { background: rgba(40,184,218,.14);  color: var(--info);   border: 1px solid rgba(40,184,218,.32); }
.ea-badge-ok     { background: rgba(74,222,128,.13);  color: var(--ok);     border: 1px solid rgba(74,222,128,.32); }
.ea-badge-danger { background: rgba(248,113,113,.13); color: var(--danger); border: 1px solid rgba(248,113,113,.32); }
.ea-kpi-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ea-kpi-col span { display: block; color: var(--muted-2); font-size: 16px; font-weight: 400; text-transform: uppercase; margin-bottom: 4px; }
.ea-kpi-col strong { font-size: clamp(20px, 2vw, 26px); font-weight: 900; color: var(--text); }

/* Karten-Kopf + Toggle */
.ea-section { margin-top: 18px; }
.ea-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 6px; }
.ea-card-head .ea-card-title { margin: 0; }
.ea-card-sub { color: var(--muted-2); font-size: 16px; margin: 0 0 14px; }
.ea-tg { display: inline-flex; background: var(--surface-3); border-radius: var(--radius-pill); padding: 3px; gap: 2px; }
.ea-tg button { padding: 6px 16px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--muted); font-size: 16px; font-weight: 400; font-family: inherit; cursor: pointer; transition: background var(--transition), color var(--transition); }
.ea-tg button.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }

/* Chart */
.ea-chart-host { width: 100%; margin-top: 6px; }
.ea-chart-host svg { display: block; width: 100%; }

/* Vendor */
.ea-vcount { color: var(--muted-2); font-size: 16px; font-weight: 400; }
.ea-vlist .ea-vrow { cursor: pointer; padding: 6px; margin: 0 -6px 8px; border-radius: var(--radius-sm); transition: background var(--transition); }
.ea-vlist .ea-vrow:hover { background: var(--surface-2); }
.ea-vsum { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.ea-vsum span { font-size: 16px; font-weight: 800; color: var(--text); }
.ea-vsum strong { font-size: 16px; font-weight: 900; color: var(--text); }

/* Tabelle */
.ea-tbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ea-search-wrap { position: relative; display: flex; align-items: center; flex: 1 1 240px; min-width: 200px; }
.ea-search-wrap svg { position: absolute; left: 12px; color: var(--muted-2); pointer-events: none; }
.ea-search { width: 100%; padding: 10px 12px 10px 34px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text); font-size: 16px; font-family: inherit; outline: none; transition: border-color var(--transition), box-shadow var(--transition); }
.ea-search:focus { border-color: rgba(var(--brand-rgb),.5); box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.12); }
.ea-search::placeholder { color: var(--muted-2); }
.ea-tbar .ea-export { margin-left: auto; display: flex; gap: 8px; }

.ea-vfilter { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 7px 12px; border: 1px solid rgba(var(--brand-rgb),.4); background: var(--brand-soft); border-radius: var(--radius-pill); color: var(--text); font-size: 16px; font-weight: 400; }
.ea-vfilter strong { color: var(--brand-2); }
.ea-vfilter button { border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.ea-vfilter button:hover { color: var(--text); }

.ea-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.ea-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.ea-table thead th.ea-th { padding: 13px 16px; background: rgba(255,255,255,.025); color: var(--muted); font-size: 16px; font-weight: 400; text-transform: uppercase; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ea-th.ta-r { text-align: right; }
.ea-th.sortable { cursor: pointer; user-select: none; }
.ea-th.sortable:hover { color: var(--text); }
.ea-th.sortable::after { content: ''; display: inline-block; width: 0; height: 0; margin-left: 6px; vertical-align: middle; opacity: .35; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; }
.ea-th.sortable[aria-sort="ascending"]::after { border-top: 0; border-bottom: 5px solid var(--brand); opacity: 1; }
.ea-th.sortable[aria-sort="descending"]::after { border-top: 5px solid var(--brand); opacity: 1; }
.ea-table tbody td.ea-td { padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--text); vertical-align: top; }
.ea-table tbody tr.ea-row { transition: background var(--transition); }
.ea-table tbody tr.ea-row:hover { background: rgba(255,255,255,.03); }
.ea-table tbody tr:last-child td.ea-td { border-bottom: 0; }
.ea-td-desc { color: var(--text-soft); max-width: 360px; }
.ea-td-vendor { font-weight: 400; }
.ea-td.ta-r { text-align: right; white-space: nowrap; }
.ea-typebadge { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: var(--radius-pill); font-size: 16px; font-weight: 400; border: 1px solid; }
.ea-typebadge.is-inc { color: var(--ok); border-color: rgba(74,222,128,.4); background: rgba(74,222,128,.08); }
.ea-typebadge.is-exp { color: var(--danger); border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.08); }
.ea-nofile { color: var(--muted-2); }
.ea-dellink { border: 0; background: transparent; color: var(--muted-2); font-size: 16px; font-weight: 400; font-family: inherit; cursor: pointer; padding: 4px 2px; transition: color var(--transition); }
.ea-dellink:hover { color: var(--danger); text-decoration: underline; }
.ea-norows td { padding: 28px 16px; text-align: center; color: var(--muted-2); font-size: 16px; }
.ea-tfoot { display: flex; justify-content: flex-end; padding: 12px 4px 0; color: var(--muted-2); font-size: 16px; font-weight: 400; }

@media (max-width: 900px) { .ea-kpis { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .ea-kpi-cols { grid-template-columns: 1fr 1fr; } }
