/* =====================================================================
   Team Frankenhöhe · 3D Umsatz-Radar – Stylesheet
   Helles Cockpit · Weiß / Hellgrau / Anthrazit / Gold
   ===================================================================== */

:root{
    --bg:            #f3f5f9;
    --bg-2:          #ffffff;
    --surface:       #ffffff;
    --surface-2:     #f7f9fc;
    --surface-3:     #eef2f7;
    --line:          #dfe1e4;
    --line-soft:     #ebeced;

    --gold:          #b8912f;
    --gold-bright:   #c99a34;
    --gold-deep:     #9a7522;

    --text:          #1e1f22;
    --muted:         #5b5e63;
    --muted-2:       #888c91;

    --green:         #1f9d63;
    --green-soft:    rgba(31,157,99,.12);
    --red:           #d1435b;
    --red-soft:      rgba(209,67,91,.11);
    --orange:        #bf7a1c;
    --orange-soft:   rgba(191,122,28,.13);
    --blue:          #2f6fb0;
    --blue-soft:     rgba(47,111,176,.11);
    --gold-soft:     rgba(184,145,47,.13);

    --radius:        18px;
    --radius-sm:     12px;
    --shadow:        0 18px 40px -26px rgba(20,20,22,.30);
    --shadow-soft:   0 8px 24px -18px rgba(20,20,22,.22);

    --sidebar-w:     248px;
    --font: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
    font-family:var(--font);
    background:
        radial-gradient(1200px 600px at 85% -12%, rgba(184,145,47,.08), transparent 60%),
        radial-gradient(900px 520px at -10% 8%, rgba(47,111,176,.06), transparent 55%),
        var(--bg);
    color:var(--text);
    -webkit-font-smoothing:antialiased;
    line-height:1.45;
    font-size:15px;
}
a{color:inherit;text-decoration:none}
h1,h2,h3{margin:0;font-weight:650;letter-spacing:-.01em}

/* ------------------------------------------------------------------ App shell */
.app-shell{display:flex;min-height:100vh}

.sidebar{
    width:var(--sidebar-w);flex:0 0 var(--sidebar-w);
    background:linear-gradient(180deg,var(--bg-2),var(--bg));
    border-right:1px solid var(--line-soft);
    padding:22px 16px;position:sticky;top:0;height:100vh;
    display:flex;flex-direction:column;gap:18px;
}
.brand{display:flex;align-items:center;gap:12px}
.brand.center{flex-direction:column;text-align:center;gap:10px}
.brand-badge{
    width:42px;height:42px;border-radius:12px;flex:0 0 42px;
    display:grid;place-items:center;font-weight:800;font-size:16px;color:#1a1206;
    background:linear-gradient(135deg,var(--gold-bright),var(--gold-deep));
    box-shadow:0 6px 18px -8px rgba(217,180,106,.6);letter-spacing:-.02em;
}
.brand-badge.sm{width:32px;height:32px;flex-basis:32px;font-size:13px;border-radius:9px}
.brand-badge.lg{width:60px;height:60px;flex-basis:60px;font-size:22px;border-radius:16px}
.brand-text{display:flex;flex-direction:column;line-height:1.1}
.brand-name{font-weight:700;font-size:14px}
.brand-sub{color:var(--gold);font-size:12px;letter-spacing:.06em;text-transform:uppercase}

.side-nav{display:flex;flex-direction:column;gap:4px;margin-top:6px}
.side-link{
    display:flex;align-items:center;gap:12px;padding:11px 12px;border-radius:11px;
    color:var(--muted);font-weight:550;font-size:14px;transition:.15s;
}
.side-link:hover{background:var(--surface);color:var(--text)}
.side-link.active{background:var(--gold-soft);color:var(--gold-bright)}
.side-link .ic{width:20px;height:20px;display:grid;place-items:center}
.side-link .ic svg{width:19px;height:19px}

.side-foot{margin-top:auto;display:flex;flex-direction:column;gap:12px}
.side-user{display:flex;align-items:center;gap:11px;padding:10px;background:var(--surface);border-radius:12px}
.avatar{width:36px;height:36px;border-radius:10px;background:var(--surface-3);display:grid;place-items:center;font-weight:700;color:var(--gold)}
.side-user-text{display:flex;flex-direction:column;line-height:1.15;overflow:hidden}
.su-name{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.su-role{font-size:11px;color:var(--muted-2)}
.logout{font-size:13px;color:var(--muted);padding:9px;text-align:center;border:1px solid var(--line);border-radius:10px}
.logout:hover{color:var(--red);border-color:var(--red)}

.main{flex:1;min-width:0;display:flex;flex-direction:column}
.content{padding:26px 30px 60px;max-width:1180px;width:100%;margin:0 auto}

/* Mobile Topbar */
.topbar{display:none}

/* ------------------------------------------------------------------ Hero */
.page-hero{
    display:flex;justify-content:space-between;align-items:flex-end;gap:18px;
    margin-bottom:22px;flex-wrap:wrap;
}
.page-hero.compact{align-items:center}
.hello{color:var(--muted);margin:0 0 2px;font-size:14px}
.hero-name{font-size:26px;font-weight:750;letter-spacing:-.02em}
.hero-sub{color:var(--muted);margin:4px 0 0;font-size:14px}
.hero-actions{display:flex;gap:10px;flex-wrap:wrap}

/* ------------------------------------------------------------------ Buttons */
.btn{
    display:inline-flex;align-items:center;justify-content:center;gap:6px;
    padding:11px 18px;border-radius:12px;font-weight:600;font-size:14px;
    border:1px solid transparent;cursor:pointer;transition:.15s;white-space:nowrap;
    font-family:inherit;
}
.btn-gold{background:linear-gradient(135deg,var(--gold-bright),var(--gold-deep));color:#1a1206;box-shadow:0 8px 20px -10px rgba(217,180,106,.55)}
.btn-gold:hover{filter:brightness(1.06);transform:translateY(-1px)}
.btn-ghost{background:var(--surface);border-color:var(--line);color:var(--text)}
.btn-ghost:hover{border-color:var(--gold);color:var(--gold-bright)}
.btn-green{background:var(--green-soft);border-color:rgba(70,197,138,.45);color:var(--green)}
.btn-green:hover{background:rgba(70,197,138,.22)}
.btn-danger{background:var(--red-soft);border-color:rgba(240,97,109,.4);color:var(--red)}
.btn-danger:hover{background:rgba(240,97,109,.2)}
.btn-text{background:transparent;color:var(--muted)}
.btn-text:hover{color:var(--text)}
.btn-block{width:100%}
.btn-sm{padding:8px 13px;font-size:13px;border-radius:10px}
.btn-xs{padding:6px 10px;font-size:12px;border-radius:9px}

/* ------------------------------------------------------------------ Sections */
.section{margin:26px 0}
.section-title{font-size:16px;font-weight:650;color:var(--text);margin-bottom:14px;display:flex;align-items:center;gap:9px}
.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.section-head .section-title{margin:0}
.link-more{color:var(--gold);font-size:13px;font-weight:600}
.count-pill{font-size:12px;font-weight:700;padding:3px 10px;border-radius:999px;background:var(--surface-3);color:var(--muted)}
.count-pill.red{background:var(--red-soft);color:var(--red)}
.count-pill.orange{background:var(--orange-soft);color:var(--orange)}
.count-pill.gold{background:var(--gold-soft);color:var(--gold-bright)}

.dot{width:9px;height:9px;border-radius:50%;display:inline-block}
.dot-red{background:var(--red)}.dot-orange{background:var(--orange)}
.dot-gold{background:var(--gold)}.dot-neutral{background:var(--muted-2)}

/* ------------------------------------------------------------------ Tiles */
.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px}
.tile{
    background:linear-gradient(160deg,var(--surface-2),var(--surface));
    border:1px solid var(--line-soft);border-radius:var(--radius);
    padding:18px 18px 16px;position:relative;overflow:hidden;box-shadow:var(--shadow-soft);
}
.tile::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--muted-2)}
.tile.tone-gold::before{background:linear-gradient(var(--gold-bright),var(--gold-deep))}
.tile.tone-green::before{background:var(--green)}
.tile.tone-red::before{background:var(--red)}
.tile.tone-orange::before{background:var(--orange)}
.tile.tone-blue::before{background:var(--blue)}
.tile-label{color:var(--muted);font-size:12.5px;font-weight:550;text-transform:uppercase;letter-spacing:.04em}
.tile-value{font-size:28px;font-weight:750;margin-top:8px;letter-spacing:-.02em;line-height:1.1}
.tile.tone-gold .tile-value{color:var(--gold-bright)}
.tile.tone-green .tile-value{color:var(--green)}
.tile.tone-blue .tile-value{color:var(--blue)}
.tile-sub{color:var(--muted-2);font-size:12px;margin-top:6px}

/* ------------------------------------------------------------------ Opp cards */
.card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}
.opp-card{
    background:linear-gradient(160deg,var(--surface-2),var(--surface));
    border:1px solid var(--line-soft);border-radius:var(--radius);
    padding:16px;display:flex;flex-direction:column;gap:12px;box-shadow:var(--shadow-soft);
    position:relative;overflow:hidden;
}
.opp-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:transparent}
.opp-card.wv-red::before{background:var(--red)}
.opp-card.wv-orange::before{background:var(--orange)}
.opp-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.opp-name{font-size:16px;font-weight:700}
.opp-theme{color:var(--muted);font-size:13px;margin-top:3px;display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.opp-metrics{display:flex;gap:18px;padding:10px 0;border-top:1px solid var(--line-soft);border-bottom:1px solid var(--line-soft)}
.metric{display:flex;flex-direction:column}
.m-val{font-size:18px;font-weight:700;letter-spacing:-.01em}
.m-val.green{color:var(--green)}
.m-lbl{font-size:11px;color:var(--muted-2);margin-top:2px}
.opp-wv{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}
.opp-wv strong{color:var(--text)}
.wv-dot{width:8px;height:8px;border-radius:50%;background:var(--muted-2)}
.wv-red .wv-dot{background:var(--red)}.wv-orange .wv-dot{background:var(--orange)}
.opp-next{margin:0;font-size:13px;color:var(--muted);line-height:1.4}
.next-label{color:var(--gold);font-weight:600}
.opp-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:2px}

/* Badges & chips */
.badge{font-size:11.5px;font-weight:650;padding:4px 10px;border-radius:999px;white-space:nowrap}
.badge-gold{background:var(--gold-soft);color:var(--gold-bright)}
.badge-green{background:var(--green-soft);color:var(--green)}
.badge-orange{background:var(--orange-soft);color:var(--orange)}
.badge-blue{background:var(--blue-soft);color:var(--blue)}
.badge-muted{background:var(--surface-3);color:var(--muted-2)}
.chip{font-size:11px;font-weight:600;padding:2px 8px;border-radius:7px;background:var(--surface-3);color:var(--muted)}
.chip-3d{background:var(--blue-soft);color:var(--blue)}
.chip-gold{background:var(--gold-soft);color:var(--gold-bright)}

/* ------------------------------------------------------------------ Rank list */
.rank-list{display:flex;flex-direction:column;gap:8px}
.rank-row{display:flex;align-items:center;gap:14px;background:var(--surface);border:1px solid var(--line-soft);
    border-radius:var(--radius-sm);padding:12px 14px;transition:.15s}
.rank-row:hover{border-color:var(--gold);transform:translateX(2px)}
.rank-no{width:26px;height:26px;border-radius:8px;background:var(--gold-soft);color:var(--gold-bright);
    display:grid;place-items:center;font-weight:750;font-size:13px;flex:0 0 26px}
.rank-main{display:flex;flex-direction:column;flex:1;min-width:0}
.rank-name{font-weight:650;font-size:14px}
.rank-sub{color:var(--muted-2);font-size:12px}
.rank-val{font-weight:750;font-size:18px;color:var(--gold-bright)}
.rank-val small{font-size:11px;color:var(--muted-2);margin-left:3px;font-weight:600}

/* ------------------------------------------------------------------ Board */
.board{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px;align-items:start}
.month-col{background:linear-gradient(160deg,var(--surface-2),var(--surface));
    border:1px solid var(--line-soft);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow-soft)}
.month-col.current{border-color:rgba(217,180,106,.4);box-shadow:0 0 0 1px rgba(217,180,106,.15),var(--shadow-soft)}
.month-summary{list-style:none;cursor:pointer;padding:16px 16px 14px;position:relative;border-bottom:1px solid var(--line-soft)}
.month-summary::-webkit-details-marker{display:none}
.month-top{display:flex;justify-content:space-between;align-items:baseline}
.month-name{font-size:16px;font-weight:750}
.month-col.current .month-name{color:var(--gold-bright)}
.month-count{font-size:12px;color:var(--muted-2)}
.month-figures{display:flex;gap:16px;margin-top:12px}
.mf{display:flex;flex-direction:column}
.mf-v{font-size:16px;font-weight:700}
.mf-v.green{color:var(--green)}.mf-v.blue{color:var(--blue)}
.mf-l{font-size:10.5px;color:var(--muted-2);text-transform:uppercase;letter-spacing:.03em}
.month-prov{display:flex;gap:16px;margin-top:10px;padding-top:10px;border-top:1px dashed var(--line-soft)}
.mp{display:flex;flex-direction:column}
.mp-l{font-size:10.5px;color:var(--muted-2);text-transform:uppercase}
.mp-v{font-size:13px;font-weight:700}
.mp-v.gold{color:var(--gold-bright)}.mp-v.green{color:var(--green)}
.month-toggle{position:absolute;right:16px;top:18px;width:9px;height:9px;border-right:2px solid var(--muted);
    border-bottom:2px solid var(--muted);transform:rotate(45deg);transition:.2s}
details[open] .month-toggle{transform:rotate(-135deg)}
.month-body{padding:14px;display:flex;flex-direction:column;gap:12px}
.month-body .opp-card{background:var(--surface)}

/* ------------------------------------------------------------------ Forms */
.card-form{background:linear-gradient(160deg,var(--surface-2),var(--surface));
    border:1px solid var(--line-soft);border-radius:var(--radius);padding:22px;box-shadow:var(--shadow-soft)}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.field{display:flex;flex-direction:column;gap:7px}
.field.span-2{grid-column:1 / -1}
.field-label{font-size:12.5px;font-weight:600;color:var(--muted)}
.field-label em{color:var(--gold);font-style:normal}
.field .opt,.opt{color:var(--muted-2);font-weight:400;font-size:11px}
input,select,textarea{
    width:100%;padding:11px 13px;background:var(--bg-2);border:1px solid var(--line);
    border-radius:11px;color:var(--text);font-size:14px;font-family:inherit;transition:.15s;
}
textarea{resize:vertical}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--gold);box-shadow:0 0 0 3px var(--gold-soft)}
input::placeholder,textarea::placeholder{color:var(--muted-2)}
select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%239aa3ad' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat:no-repeat;background-position:right 13px center;padding-right:34px}
input[type=checkbox]{width:auto}
.form-section-title{font-size:14px;color:var(--gold);margin:22px 0 12px;font-weight:650}
.form-section-title:first-child{margin-top:0}
.form-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px;padding-top:18px;border-top:1px solid var(--line-soft)}
.delete-form{margin-top:16px}
.hint-note{color:var(--muted-2);font-size:12px;margin-top:16px;font-style:italic}

/* Switch */
.switch-field{flex-direction:column}
.switch{position:relative;display:inline-block;width:50px;height:28px}
.switch input{opacity:0;width:0;height:0;position:absolute}
.slider{position:absolute;inset:0;background:var(--surface-3);border:1px solid var(--line);border-radius:999px;cursor:pointer;transition:.2s}
.slider::before{content:"";position:absolute;height:20px;width:20px;left:3px;top:3px;background:var(--muted);border-radius:50%;transition:.2s}
.switch input:checked + .slider{background:var(--gold-soft);border-color:var(--gold)}
.switch input:checked + .slider::before{transform:translateX(22px);background:var(--gold-bright)}

/* Provision preview */
.prov-preview{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:18px}
.prov-preview>div{flex:1;min-width:200px;background:var(--surface);border:1px solid var(--line-soft);border-radius:var(--radius-sm);padding:14px 16px;display:flex;flex-direction:column;gap:5px}
.pp-lbl{font-size:12px;color:var(--muted)}
.pp-val{font-size:20px;font-weight:750}
.pp-val.gold{color:var(--gold-bright)}.pp-val.green{color:var(--green)}

/* ------------------------------------------------------------------ Filters */
.filters{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:20px;
    background:var(--surface);border:1px solid var(--line-soft);border-radius:var(--radius);padding:14px}
.filters input,.filters select{width:auto;min-width:130px;flex:0 1 auto}
.filters input[type=search]{min-width:180px}
.chk{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--muted);white-space:nowrap}

/* ------------------------------------------------------------------ Table */
.table-wrap{overflow-x:auto;border:1px solid var(--line-soft);border-radius:var(--radius);background:var(--surface)}
.data-table{width:100%;border-collapse:collapse;font-size:13.5px}
.data-table th{text-align:left;padding:13px 14px;color:var(--muted);font-weight:600;font-size:12px;
    text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid var(--line);white-space:nowrap}
.data-table td{padding:12px 14px;border-bottom:1px solid var(--line-soft);vertical-align:middle}
.data-table tr:last-child td{border-bottom:none}
.data-table tr:hover td{background:var(--surface-2)}
.data-table .num{text-align:right;font-variant-numeric:tabular-nums;font-weight:600}
.data-table .strong{font-weight:650}
.data-table .green{color:var(--green)}
.wv-cell.wv-red{color:var(--red);font-weight:600}
.wv-cell.wv-orange{color:var(--orange);font-weight:600}
.row-off{opacity:.5}
.row-actions{display:flex;gap:6px;align-items:center;white-space:nowrap}
.inline{display:inline}
.mobile-cards{display:none}

/* ------------------------------------------------------------------ Flash & empty */
.flash{padding:13px 16px;border-radius:12px;margin-bottom:16px;font-size:14px;border:1px solid transparent}
.flash-success{background:var(--green-soft);border-color:rgba(70,197,138,.35);color:var(--green)}
.flash-error{background:var(--red-soft);border-color:rgba(240,97,109,.35);color:var(--red)}
.flash-warn{background:var(--orange-soft);border-color:rgba(240,167,85,.35);color:var(--orange)}
.empty{background:var(--surface);border:1px dashed var(--line);border-radius:var(--radius);
    padding:26px;text-align:center;color:var(--muted)}
.empty.sm{padding:16px;font-size:13px}
.empty a{color:var(--gold);font-weight:600}
.danger-text{color:var(--red);font-size:13px}
code{background:var(--bg-2);padding:2px 7px;border-radius:6px;font-size:13px;color:var(--gold-bright)}

/* ------------------------------------------------------------------ Auth */
.auth-body{display:grid;place-items:center;min-height:100vh;padding:20px}
.auth-card{width:100%;max-width:420px;background:linear-gradient(160deg,var(--surface-2),var(--surface));
    border:1px solid var(--line-soft);border-radius:24px;padding:34px 30px;box-shadow:var(--shadow)}
.auth-title{font-size:20px;margin-top:6px;text-align:center}
.subtitle{color:var(--muted);font-size:13px;text-align:center;margin:4px 0 0;line-height:1.4}
.auth-form{display:flex;flex-direction:column;gap:16px;margin-top:24px}
.install-box{margin-top:8px;display:flex;flex-direction:column;gap:12px;font-size:14px;color:var(--muted)}
.install-box strong{color:var(--text)}

/* ------------------------------------------------------------------ Tabbar (mobile) */
.tabbar{display:none}

/* ================================================================== Responsive */
@media (max-width:900px){
    .sidebar{display:none}
    .topbar{
        display:flex;align-items:center;justify-content:space-between;
        padding:12px 16px;border-bottom:1px solid var(--line-soft);
        background:var(--bg-2);position:sticky;top:0;z-index:40;
    }
    .topbar-brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:15px}
    .topbar-logout{width:38px;height:38px;border-radius:11px;background:var(--surface);display:grid;place-items:center;color:var(--muted)}
    .topbar-logout svg{width:20px;height:20px}
    .content{padding:18px 16px 96px}
    .hero-name{font-size:22px}
    .form-grid{grid-template-columns:1fr}
    .board{grid-template-columns:1fr}
    .card-grid{grid-template-columns:1fr}

    /* Tabelle aus, Karten an */
    .table-wrap{display:none}
    .mobile-cards{display:grid}

    .tabbar{
        display:flex;position:fixed;left:0;right:0;bottom:0;z-index:50;
        background:rgba(255,255,255,.92);backdrop-filter:blur(14px);
        border-top:1px solid var(--line-soft);padding:6px 4px calc(6px + env(safe-area-inset-bottom));
        justify-content:space-around;
    }
    .tab{display:flex;flex-direction:column;align-items:center;gap:3px;padding:6px 4px;
        color:var(--muted-2);font-size:10px;font-weight:600;flex:1;min-width:0;border-radius:10px}
    .tab .ic svg{width:22px;height:22px}
    .tab.active{color:var(--gold-bright)}
    .tab-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}

    .filters{flex-direction:column;align-items:stretch}
    .filters input,.filters select{width:100%;min-width:0}
    .prov-preview>div{min-width:100%}
}

@media (max-width:520px){
    .tiles{grid-template-columns:1fr 1fr}
    .tile-value{font-size:22px}
    .page-hero{align-items:flex-start}
    .hero-actions{width:100%}
    .hero-actions .btn{flex:1}
    .tab-label{font-size:9px}
}

/* JS-Highlight beim automatischen Uebernehmen der Einheiten */
.flash-hint{animation:hintPulse 1.2s ease}
@keyframes hintPulse{
    0%{box-shadow:0 0 0 0 var(--gold-soft);border-color:var(--gold)}
    50%{box-shadow:0 0 0 4px var(--gold-soft);border-color:var(--gold-bright)}
    100%{box-shadow:0 0 0 0 transparent}
}

/* ==================================================================
   Kunde -> Block -> Produkt Modell (Erweiterung)
   ================================================================== */

.chip-typ{background:var(--gold-soft);color:var(--gold-bright)}
.green{color:var(--green)}
.hero-link{color:var(--gold-bright);border-bottom:1px solid transparent}
.hero-link:hover{border-bottom-color:var(--gold)}
.section-link{font-size:13px;color:var(--muted);white-space:nowrap}
.section-link:hover{color:var(--gold-bright)}
.hint-note{color:var(--muted-2);font-size:12.5px;margin:10px 0 0}
.hint-note a{color:var(--gold-bright)}

/* Kundenliste */
.kunden-list{display:flex;flex-direction:column;gap:10px}
.kunde-row{display:flex;align-items:center;gap:14px;background:var(--surface);
    border:1px solid var(--line-soft);border-radius:var(--radius-sm);padding:14px 16px;transition:border-color .15s,transform .1s}
.kunde-row:hover{border-color:var(--gold);transform:translateY(-1px)}
.kr-main{flex:1;min-width:0}
.kr-name{font-weight:650;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.kr-sub{color:var(--muted);font-size:12.5px;margin-top:3px}
.kr-progress{height:5px;background:var(--surface-3);border-radius:999px;margin-top:9px;overflow:hidden}
.kr-progress span{display:block;height:100%;background:linear-gradient(90deg,var(--gold-deep),var(--gold-bright));border-radius:999px}
.kr-arrow{color:var(--muted-2);font-size:22px;line-height:1}

/* Beratungsstrecke (Kundenakte) */
.strecke{display:flex;flex-direction:column;gap:8px}
.strecke-row{display:flex;align-items:center;gap:12px;background:var(--surface);
    border:1px solid var(--line-soft);border-radius:var(--radius-sm);padding:12px 14px;
    position:relative;transition:border-color .15s,transform .1s}
.strecke-row:hover{border-color:var(--gold);transform:translateY(-1px)}
.strecke-row.wv-red{border-left:3px solid var(--red)}
.strecke-row.wv-orange{border-left:3px solid var(--orange)}
.sr-order{width:24px;height:24px;flex:none;display:grid;place-items:center;border-radius:8px;
    background:var(--surface-3);color:var(--muted);font-size:12px;font-weight:700}
.sr-main{flex:1;min-width:0}
.sr-title{display:block;font-weight:600}
.sr-sub{display:block;color:var(--muted-2);font-size:12px;margin-top:2px}
.sr-ke{color:var(--muted);font-size:13px;white-space:nowrap}

/* Produkte im Block */
.produkt-list{display:flex;flex-direction:column;gap:8px;margin-bottom:18px}
.produkt-row{display:flex;align-items:center;gap:12px;background:var(--surface);
    border:1px solid var(--line-soft);border-radius:var(--radius-sm);padding:11px 14px;flex-wrap:wrap}
.pr-main{flex:1;min-width:180px}
.pr-thema{font-weight:600}
.pr-sub{display:block;color:var(--muted-2);font-size:12px;margin-top:2px}
.pr-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}

.produkt-form{background:linear-gradient(160deg,var(--surface-2),var(--surface));
    border:1px solid var(--line);border-radius:var(--radius);padding:18px}
.form-sub{font-size:14px;font-weight:600;color:var(--gold-bright);margin:0 0 12px}

/* Prompt: naechsten Block einplanen */
.next-prompt{display:flex;align-items:center;gap:12px;flex-wrap:wrap;
    background:var(--gold-soft);border:1px solid rgba(217,180,106,.4);
    border-radius:var(--radius-sm);padding:12px 16px;margin-bottom:18px}
.next-prompt span{color:var(--text)}

/* Inline "Block hinzufuegen" */
.inline-add{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.inline-add select,.inline-add input{padding:10px 12px;background:var(--surface);
    border:1px solid var(--line);border-radius:10px;color:var(--text)}

/* Disclosure (details/summary) */
.disclosure summary{cursor:pointer;color:var(--muted);font-weight:600;font-size:14px;
    padding:10px 0;list-style:none}
.disclosure summary::-webkit-details-marker{display:none}
.disclosure summary::before{content:"▸ ";color:var(--gold)}
.disclosure[open] summary::before{content:"▾ "}

/* Board */
.board{display:flex;flex-direction:column;gap:14px}
.board-col{background:var(--surface);border:1px solid var(--line-soft);border-radius:var(--radius);overflow:hidden}
.board-head{cursor:pointer;display:flex;justify-content:space-between;align-items:center;
    padding:14px 18px;list-style:none;background:var(--surface-2)}
.board-head::-webkit-details-marker{display:none}
.bh-month{font-weight:650;color:var(--gold-bright)}
.bh-meta{color:var(--muted);font-size:12.5px}
.board-body{padding:14px 18px;display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px}
.board-empty{color:var(--muted-2);grid-column:1/-1;margin:0}

/* Horizontales 12-Monats-Board */
.board-h{display:flex;gap:14px;overflow-x:auto;padding:4px 2px 14px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
.board-hcol{flex:0 0 300px;max-width:300px;background:var(--surface);border:1px solid var(--line-soft);
    border-radius:var(--radius);box-shadow:var(--shadow-soft);display:flex;flex-direction:column;scroll-snap-align:start;overflow:hidden}
.board-hhead{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;
    border-bottom:1px solid var(--line-soft);background:var(--surface-2);position:sticky;top:0}
.board-hbody{padding:14px;display:flex;flex-direction:column;gap:12px;min-height:60px}
@media(max-width:640px){.board-hcol{flex-basis:82vw;max-width:82vw}}

/* Filterleiste */
.filter-bar{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-bottom:18px}
.filter-search{flex:1;min-width:200px;padding:11px 14px;background:var(--surface);
    border:1px solid var(--line);border-radius:12px;color:var(--text)}
.filter-chips{display:flex;gap:8px;flex-wrap:wrap}
.fchip{padding:8px 14px;border-radius:999px;background:var(--surface);border:1px solid var(--line);
    color:var(--muted);font-size:13px;font-weight:600}
.fchip:hover{border-color:var(--gold);color:var(--gold-bright)}
.fchip.active{background:var(--gold-soft);border-color:var(--gold);color:var(--gold-bright)}

/* Wiedervorlage-Titel Farbpunkte */
.wv-title-ueberfaellig::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--red)}
.wv-title-heute::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--orange)}
.wv-title-woche::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--gold)}
.wv-title-spaeter::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--muted-2)}

/* Monatsnavigation (Zahltag) */
.month-nav{display:flex;align-items:center;gap:8px}
.month-nav input[type=month]{padding:8px 12px;background:var(--surface);border:1px solid var(--line);
    border-radius:10px;color:var(--text)}

/* Zahltag-Zeilen */
.zt-rows{display:flex;flex-direction:column;gap:10px;margin-bottom:6px}
.zt-row{display:grid;grid-template-columns:1fr auto 130px;gap:14px;align-items:center;
    background:var(--surface);border:1px solid var(--line-soft);border-radius:var(--radius-sm);padding:12px 16px}
.zt-label{font-weight:600}
.zt-hint{display:block;color:var(--muted-2);font-size:11.5px;font-weight:400;margin-top:2px}
.zt-calc{color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.zt-row input{padding:9px 11px;background:var(--bg-2);border:1px solid var(--line);border-radius:9px;
    color:var(--text);width:100%;text-align:right}
.zt-total{display:flex;justify-content:space-between;align-items:center;margin-top:20px;
    padding:16px 20px;background:linear-gradient(135deg,rgba(217,180,106,.16),rgba(217,180,106,.06));
    border:1px solid rgba(217,180,106,.4);border-radius:var(--radius-sm)}
.zt-total span{font-weight:600;color:var(--muted)}
.zt-total strong{font-size:26px;color:var(--gold-bright);font-variant-numeric:tabular-nums}

@media(max-width:560px){
    .zt-row{grid-template-columns:1fr auto;grid-template-areas:"l c" "i i"}
    .zt-row .zt-label{grid-area:l}.zt-row .zt-calc{grid-area:c}.zt-row input{grid-area:i}
    .form-grid{grid-template-columns:1fr}
}

/* Prognose-Tabelle (Zahltag) */
.prognose-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;margin-top:12px;
    border:1px solid var(--line-soft);border-radius:var(--radius-sm)}
.prognose{width:100%;border-collapse:collapse;font-size:13px;min-width:560px}
.prognose th,.prognose td{padding:10px 12px;text-align:right;white-space:nowrap;
    border-bottom:1px solid var(--line-soft)}
.prognose thead th{color:var(--muted);font-weight:600;background:var(--surface-2)}
.prognose th:first-child,.prognose td:first-child{text-align:left;position:sticky;left:0;
    background:var(--surface);z-index:1}
.prognose thead th:first-child{background:var(--surface-2)}
.prognose .pz-label{color:var(--muted)}
.prognose td.ist,.prognose th.ist{background:var(--gold-soft);color:var(--gold-bright)}
.prognose .pz-total td{font-weight:700;color:var(--text);border-top:2px solid var(--line);border-bottom:none}
.prognose .pz-total td.ist{color:var(--gold-bright)}

.chip-art{background:var(--blue-soft);color:var(--blue)}

.pz-input{width:96px;padding:6px 8px;background:var(--bg-2);border:1px solid var(--line);
    border-radius:8px;color:var(--text);text-align:right;font-size:12.5px}
.pz-input:focus{border-color:var(--gold);outline:none}

/* Bedingungs-/Hinweisboxen (Erfolgsprovision, EG-Bonus) */
.cond-box{margin-top:10px;padding:12px 14px;border-radius:var(--radius-sm);font-size:13.5px;line-height:1.5;
    border:1px solid var(--line);background:var(--surface-2)}
.cond-box strong{font-weight:650}
.cond-box .cond-sub{display:block;margin-top:6px;color:var(--muted);font-size:12.5px}
.cond-ok{border-color:rgba(31,157,99,.4);background:var(--green-soft)}
.cond-warn{border-color:rgba(191,122,28,.4);background:var(--orange-soft)}

/* --- Ansprache-Panel --- */
.anspr-panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
    box-shadow:var(--shadow);padding:18px 20px;margin:18px 0}
.anspr-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.anspr-title{margin:0;font-size:16px;font-weight:700;color:var(--text)}
.anspr-kanal{font-size:13px;color:var(--muted-2)}
.anspr-select{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:var(--radius-sm);
    background:var(--surface-2);color:var(--text);font-size:14px;margin-bottom:12px}
.anspr-text{white-space:pre-wrap;background:var(--surface-2);border:1px solid var(--line-soft);
    border-radius:var(--radius-sm);padding:14px 16px;font-size:14.5px;line-height:1.6;color:var(--text)}
.anspr-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px}
.anspr-hint{font-size:12.5px;color:var(--muted-2);flex-basis:100%}
.anspr-hint a{color:var(--gold-bright)}
.btn-wa{background:#25d366;color:#08331b;border-color:#25d366;font-weight:650}
.btn-wa:hover{filter:brightness(1.04)}

/* Einwandbehandlung-Akkordeon */
.einwand-accordion{margin-top:14px;border-top:1px solid var(--line-soft);padding-top:12px}
.einwand-accordion>summary{cursor:pointer;font-weight:600;font-size:13.5px;color:var(--gold-bright);list-style:none}
.einwand-accordion>summary::-webkit-details-marker{display:none}
.einwand-accordion>summary::before{content:"▸ ";color:var(--gold)}
.einwand-accordion[open]>summary::before{content:"▾ "}
.einwand-list{margin-top:10px;display:flex;flex-direction:column;gap:6px}
.einwand-item{border:1px solid var(--line-soft);border-radius:10px;background:var(--surface-2);padding:8px 12px}
.einwand-item>summary{cursor:pointer;font-weight:600;font-size:13.5px;color:var(--text);list-style:none}
.einwand-item>summary::-webkit-details-marker{display:none}
.einwand-item>summary::before{content:"+ ";color:var(--muted-2)}
.einwand-item[open]>summary::before{content:"– "}
.einwand-item p{margin:8px 0 2px;font-size:13.5px;line-height:1.55;color:var(--muted)}

/* --- Vorlagen-Editor --- */
.vorlage-group{display:flex;flex-direction:column;gap:16px;margin-top:12px}
.vorlage-item{border:1px solid var(--line-soft);border-radius:var(--radius-sm);background:var(--surface-2);padding:12px 14px}
.vorlage-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.vorlage-label{font-weight:600;font-size:14px;color:var(--text)}
.vorlage-item textarea{width:100%;border:1px solid var(--line);border-radius:10px;background:var(--surface);
    color:var(--text);font:inherit;font-size:14px;line-height:1.55;padding:10px 12px;resize:vertical}
.vorlage-actions{display:flex;gap:8px;margin-top:8px}
.badge-gold{background:var(--gold-soft);color:var(--gold-bright);font-size:11px;font-weight:650;
    padding:2px 8px;border-radius:999px}

/* --- Empfehlungsliste --- */
.ref-list{display:flex;flex-direction:column;gap:6px;margin-top:6px}
.ref-item{display:flex;align-items:center;justify-content:space-between;gap:10px;
    border:1px solid var(--line-soft);border-radius:10px;background:var(--surface-2);
    padding:10px 14px;color:var(--text);text-decoration:none;transition:.12s}
.ref-item:hover{background:var(--surface-3)}
.ref-name{font-weight:600;font-size:14px}
.ref-typ{font-size:12px;color:var(--muted-2)}

/* --- Potenzial-Pool --- */
.pool-quick .pool-inline{display:flex;gap:8px;margin-top:8px}
.pool-quick .pool-inline select{flex:1}
.pool-thema-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
.pool-thema-sum{font-size:13px;color:var(--muted-2);font-weight:600;white-space:nowrap}
.pool-list{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.pool-item{display:flex;align-items:center;justify-content:space-between;gap:10px;
    border:1px solid var(--line-soft);border-radius:10px;background:var(--surface-2);
    padding:10px 14px;color:var(--text);text-decoration:none;transition:.12s}
.pool-item:hover{background:var(--surface-3)}
.pool-name{font-weight:600;font-size:14px}
.pool-meta{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--muted-2);white-space:nowrap}
.badge-muted{background:var(--surface-3);color:var(--muted-2);font-size:11px;font-weight:650;
    padding:2px 8px;border-radius:999px;border:1px solid var(--line-soft)}

/* --- Potenzial-Check --- */
.check-list{display:flex;flex-direction:column;gap:4px;margin-top:8px}
.check-row{display:flex;align-items:center;justify-content:space-between;gap:12px;
    padding:9px 12px;border:1px solid var(--line-soft);border-radius:10px;background:var(--surface-2)}
.check-row.is-done{opacity:.55}
.check-info{display:flex;align-items:center;gap:10px;min-width:0}
.check-thema{font-weight:600;font-size:14px}
.check-ke{font-size:12px;color:var(--muted-2)}
.check-hint{font-size:12px;color:var(--muted-2)}
.check-choice{display:flex;gap:6px;flex-shrink:0}
.check-choice label{cursor:pointer}
.check-choice input{position:absolute;opacity:0;width:0;height:0}
.check-choice .ch{display:inline-block;padding:5px 10px;border-radius:999px;font-size:12.5px;font-weight:600;
    border:1px solid var(--line);color:var(--muted-2);background:var(--surface);transition:.12s;user-select:none}
.check-choice input:checked + .ch-yes{background:#e7f6ec;border-color:#48b06a;color:#1c7a3e}
.check-choice input:checked + .ch-no{background:#fdeaea;border-color:#d9534f;color:#b23b37}
.check-choice input:checked + .ch-skip{background:var(--surface-3);border-color:var(--line);color:var(--text)}

/* Badge rot (abgelehnt) */
.badge-red{background:#fdeaea;color:#b23b37;border:1px solid #f2c4c2}

/* Durchschnitts-KE-Raster im Profil */
.themake-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px;margin:10px 0}
.themake-item{display:flex;align-items:center;justify-content:space-between;gap:8px;
    border:1px solid var(--line-soft);border-radius:10px;background:var(--surface-2);padding:6px 10px}
.themake-thema{font-size:13px;color:var(--text)}
.themake-item input{width:70px;text-align:right;border:1px solid var(--line);border-radius:8px;
    padding:5px 8px;background:var(--surface);color:var(--text);font:inherit;font-size:13px}

/* Board-Kopf: geplant vs. umgesetzt */
.bh-pipe{color:var(--muted-2)}
.bh-done{color:#1c7a3e;font-weight:650}

/* --- Ansprache-Themen-Reiter --- */
.anspr-tabs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.anspr-tab{border:1px solid var(--line);background:var(--surface);color:var(--muted-2);
    padding:6px 13px;border-radius:999px;font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:.12s}
.anspr-tab:hover{border-color:var(--gold);color:var(--text)}
.anspr-tab.is-active{background:var(--gold);border-color:var(--gold);color:#1a1400}

/* --- Monatsziele --- */
.ziel-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin-bottom:14px}
.ziel-card{border:1px solid var(--line-soft);border-radius:var(--radius);background:var(--surface-2);padding:14px 16px}
.ziel-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:8px}
.ziel-head > span:first-child{font-size:13px;color:var(--muted-2);font-weight:600}
.ziel-val{font-weight:700;font-size:15px}
.ziel-bar{height:8px;border-radius:999px;background:var(--surface-3);overflow:hidden}
.ziel-bar > span{display:block;height:100%;background:linear-gradient(90deg,var(--gold),var(--gold-bright));border-radius:999px}
.ziel-sub{margin-top:6px;font-size:12px;color:var(--muted-2)}
