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

/* ─── 1. TOKENS ─────────────────────────────────────────────── */
:root {
    --status-color:        #fff;
    --bg:                  #0b0d10;
    --surface:             #12161c;
    --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: Arial, Helvetica, 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: var(--muted-2);
    font-size: 10px; font-weight: 900;
    letter-spacing: .1em;
    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: var(--muted);
    font-size: 14px; font-weight: 700;
    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: var(--muted-2);
    transition: color var(--transition);
}
.nav-link:hover .nav-icon { color: var(--muted); }

.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); }

/* 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; }

.nav-sub .nav-link {
    padding-left: 40px;
    font-size: 13px; font-weight: 600;
    color: var(--muted-2);
}
.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: var(--muted-2); font-size: 13px; }

/* ─── 5. MAIN CONTENT ───────────────────────────────────────── */
.main-wrap {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    transition: margin-left var(--transition);
    display: flex;
    flex-direction: column;
}
.main-wrap.collapsed { margin-left: var(--sidebar-collapsed-w); }

/* Page Stage */
#cstage {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 42px 32px 70px 32px;
    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;
    letter-spacing: -.055em;
}
.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: 13px;
}
.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: 13px; 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; letter-spacing: -.03em; }
.statusoverview small  { position: relative; z-index: 2; display: block; margin-top: 8px; color: var(--muted-2); font-size: 12px; 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: 11px;
    font-weight: 900; letter-spacing: .09em;
    text-transform: uppercase;
}
.project-card h2 {
    margin: 0; color: var(--text);
    font-size: 22px; line-height: 1.2;
    font-weight: 900; letter-spacing: -.025em;
}
.project-time            { flex: 0 0 auto; padding: 10px 14px; text-align: right; }
.project-time span       { display: block; color: var(--muted-2); font-size: 11px; 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: 11px; font-weight: 900; letter-spacing: .06em; 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: 14px; 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: 11px;
    font-weight: 900; white-space: nowrap;
}
.time-cell strong { display: block; color: var(--text); font-size: 14px; font-weight: 900; }
.time-cell small  { display: block; margin-top: 3px; color: var(--muted-2); font-size: 11px; 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: 11px; font-weight: 900; letter-spacing: .09em; 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: 15px; }

.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: 13px; font-weight: 800;
}
.total-recorded-time-inner strong { color: var(--text); font-size: 15px; }

.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: 12px; 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; }

    .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: 15px; }
    .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: 11px; 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: 10px;
    font-weight: 900;
    color: var(--muted-2);
    letter-spacing: .04em;
}

/* ─── 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: 13px;
    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: 15px !important;
    font-weight: 900 !important;
    letter-spacing: -.02em;
}
.price-unit {
    color: var(--muted);
    font-size: 12px;
    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: 12px;
    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: 12px; }
    .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: 14px;
    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: 13px;
    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: 13px;
    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: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    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: 10px; }
.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: 13px;
    font-weight: 600;
    color: var(--text);
    vertical-align: middle;
    white-space: nowrap;
}
.dt-td-id    { color: var(--muted-2); font-size: 12px; 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: 11px;
    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: 14px;
    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: 13px;
    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: 13px;
    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: 13px;
    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: 13px; 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: 10px; font-weight: 900;
    letter-spacing: .06em; 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: 10px; }
.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: 13px; 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: 11px !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: 12px; 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: 12px; 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: 12px; 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); letter-spacing: -.02em;
}
.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: 14px; 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: 14px; font-weight: 700; }
.si-file-drop input[type="file"] { font-size: 13px; 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: 12px; font-family: inherit; font-weight: 700;
    outline: none;
}
.si-hint { color: var(--muted); font-size: 13px; 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: 11px;
    font-weight: 900;
    color: var(--muted-2);
    letter-spacing: .06em;
    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: 11px; 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: 13px; 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: 13px; 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: 11px; 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: 12px; font-weight: 800; }
.si-group-stat strong { color: var(--text); font-size: 24px; font-weight: 900; letter-spacing: -.03em; }
.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: 14px; 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: 11px; 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: 10px; font-weight: 900;
    color: var(--muted-2);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.si-group-metric strong {
    font-size: 15px; font-weight: 900;
    color: var(--text);
}
.si-group-metric small {
    font-size: 10px; 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: 13px; font-weight: 700;
    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: 13px; font-weight: 800; 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: 10px; font-weight: 900;
    letter-spacing: .06em; 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: 10px; }
.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: 13px; font-weight: 600;
    color: var(--text);
    vertical-align: middle;
}
.crm-td-id      { color: var(--muted-2); font-size: 11px; width: 44px; }
.crm-td-company { font-weight: 800; }
.crm-td-date    { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.crm-company-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
}
.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;
}
.crm-progress-bar {
    flex: 1; height: 6px;
    background: rgba(40,184,218,.55);
    border-radius: 99px;
    min-width: 2px; max-width: 120px;
    transition: width .3s ease;
}
.crm-progress-bar.crm-progress-mid  { background: rgba(245,158,11,.7); }
.crm-progress-bar.crm-progress-warn { background: rgba(248,113,113,.8); }
.crm-progress-label { font-size: 11px; font-weight: 800; color: var(--muted); flex-shrink: 0; }
.crm-no-budget { color: var(--muted-2); font-size: 12px; }

.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: 11px; font-weight: 900;
    letter-spacing: .08em; 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: 12px; font-weight: 800;
    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: 13px; font-family: inherit; font-weight: 600;
    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: 12px; }
}
