:root {
    --bg: #060a08;
    --bg2: #0a100d;
    --panel: rgba(18, 27, 22, 0.78);
    --panel-solid: #101813;
    --panel2: #16211b;
    --line: rgba(255, 255, 255, 0.075);
    --line2: rgba(255, 255, 255, 0.14);
    --text: #eaf3ee;
    --muted: #8a9b92;
    --a1: #7dffbd;
    --a2: #2fd68a;
    --a3: #12a56a;
    --neg: #ff5b5b;
    --warn: #ffc857;
    --blue: #5cc8ff;
    --violet: #a78bfa;
    --r: 18px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    background:
        radial-gradient(1100px 600px at 12% -12%, rgba(47, 214, 138, 0.13), transparent 62%),
        radial-gradient(900px 500px at 105% 8%, rgba(92, 200, 255, 0.07), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a { color: var(--a1); }
::selection { background: rgba(125, 255, 189, 0.3); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }

.ic { width: 1.25em; height: 1.25em; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ------------------------------------------------------------------ Buttons / Felder */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); border-radius: 12px; padding: 9px 15px; font-weight: 600;
    transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.2s;
}
.btn:hover { border-color: rgba(125, 255, 189, 0.4); background: rgba(125, 255, 189, 0.06); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--a1), var(--a2)); color: #04130c; border-color: transparent; box-shadow: 0 8px 24px rgba(47, 214, 138, 0.28); }
.btn-primary:hover { filter: brightness(1.06); background: linear-gradient(135deg, var(--a1), var(--a2)); border-color: transparent; }
.btn-danger { color: var(--neg); }
.btn-danger:hover { border-color: rgba(255, 91, 91, 0.5); background: rgba(255, 91, 91, 0.08); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 10px; }
.btn-block { width: 100%; }

.field { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
.input, .select {
    width: 100%; background: rgba(0, 0, 0, 0.32); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; outline: none; color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus { border-color: var(--a2); box-shadow: 0 0 0 3px rgba(47, 214, 138, 0.16); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.err { color: var(--neg); min-height: 20px; font-size: 13px; }
.ok { color: var(--a1); font-size: 13px; }

/* ------------------------------------------------------------------ Anmeldung */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr); }
.hero { position: relative; overflow: hidden; padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); }
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; animation: drift 16s ease-in-out infinite alternate; }
.hero::before { width: 520px; height: 520px; left: -140px; top: -120px; background: radial-gradient(circle, rgba(47, 214, 138, 0.55), transparent 65%); }
.hero::after { width: 480px; height: 480px; right: -120px; bottom: -160px; background: radial-gradient(circle, rgba(92, 200, 255, 0.35), transparent 65%); animation-delay: -6s; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.12); } }
.hero > * { position: relative; z-index: 1; }
.hero .brand img { height: 56px; }
.hero h1 { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.05; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero h1 span { background: linear-gradient(120deg, var(--a1), var(--a2) 55%, var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 16px; max-width: 520px; margin: 0; }
.perks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 30px; max-width: 560px; }
.perk { display: flex; gap: 12px; align-items: center; padding: 13px 15px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); backdrop-filter: blur(6px); font-weight: 600; }
.perk .ic { color: var(--a1); }
.hero .foot { color: var(--muted); font-size: 12.5px; }
.login-side { display: grid; place-items: center; padding: 32px; }
.login-card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 34px 30px; backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.login-card h2 { margin: 0 0 4px; font-size: 24px; }
.login-card .sub { margin: 0 0 22px; color: var(--muted); }
.login-card form { display: grid; gap: 14px; }
.hintbox { margin-top: 18px; padding: 13px 15px; border-radius: 14px; background: rgba(125, 255, 189, 0.07); border: 1px solid rgba(125, 255, 189, 0.18); color: #cfe9dc; font-size: 13px; }
.hintbox code { background: rgba(0, 0, 0, 0.35); padding: 1px 7px; border-radius: 7px; color: var(--a1); font-weight: 700; }

/* ------------------------------------------------------------------ Geruest */
.app { min-height: 100vh; display: grid; grid-template-columns: 268px minmax(0, 1fr); }
.side {
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 20px 14px 16px;
    background: linear-gradient(180deg, rgba(14, 22, 18, 0.92), rgba(8, 13, 10, 0.92)); border-right: 1px solid var(--line); backdrop-filter: blur(10px); z-index: 20;
}
.side .brand { padding: 4px 10px 18px; }
.side .brand img { height: 42px; }
.nav { display: grid; gap: 4px; }
.nav a {
    display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 13px; color: #b9c8c0; text-decoration: none; font-weight: 600;
    transition: background 0.15s, color 0.15s; position: relative;
}
.nav a:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.nav a.on { background: linear-gradient(90deg, rgba(47, 214, 138, 0.2), rgba(47, 214, 138, 0.04)); color: var(--a1); }
.nav a.on::before { content: ''; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--a1); box-shadow: 0 0 14px var(--a1); }
.side .sp { flex: 1; }
.userchip { display: flex; align-items: center; gap: 11px; padding: 11px; border-radius: 15px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.userchip .meta { min-width: 0; flex: 1; }
.userchip .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userchip .un { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; color: #04130c; background: linear-gradient(135deg, var(--a1), var(--a2)); flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.iconbtn { border: 0; background: transparent; color: var(--muted); padding: 8px; border-radius: 10px; display: grid; place-items: center; }
.iconbtn:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 14px; padding: 18px 30px 6px; }
.top h1 { margin: 0; font-size: 26px; letter-spacing: -0.01em; }
.top .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.top .sp { flex: 1; }
.burger { display: none; }
.live { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.live.on { color: var(--a1); }
.live.on i { background: var(--a1); box-shadow: 0 0 0 0 rgba(125, 255, 189, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(125, 255, 189, 0); } 100% { box-shadow: 0 0 0 0 rgba(125, 255, 189, 0); } }
#view { padding: 14px 30px 48px; width: min(1360px, 100%); animation: rise 0.35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ Karten */
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; backdrop-filter: blur(10px); position: relative; }
.card h3 { margin: 0 0 14px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.card h3 .sp { flex: 1; }
.card.pad0 { padding: 0; overflow: hidden; }
.stack { display: grid; gap: 16px; }
.mt { margin-top: 16px; }

.kpi { overflow: hidden; }
.kpi::after { content: ''; position: absolute; right: -40px; top: -40px; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, var(--kc, rgba(47, 214, 138, 0.22)), transparent 70%); }
.kpi .lbl { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
.kpi .val { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 10px 0 4px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12.5px; color: var(--muted); }
.delta { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.delta.up { color: var(--a1); }
.delta.down { color: var(--neg); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: rgba(125, 255, 189, 0.12); color: var(--a1); }
.chip.warn { background: rgba(255, 200, 87, 0.14); color: var(--warn); }
.chip.bad { background: rgba(255, 91, 91, 0.14); color: var(--neg); }
.chip.muted { background: rgba(255, 255, 255, 0.07); color: var(--muted); }
.chip.blue { background: rgba(92, 200, 255, 0.13); color: var(--blue); }
.chip.violet { background: rgba(167, 139, 250, 0.14); color: var(--violet); }

.tabs { display: inline-flex; gap: 4px; padding: 4px; background: rgba(0, 0, 0, 0.3); border-radius: 12px; border: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 6px 13px; border-radius: 9px; color: var(--muted); font-weight: 700; font-size: 12.5px; }
.tabs button.on { background: linear-gradient(135deg, var(--a1), var(--a2)); color: #04130c; }
.tabs button:not(.on):hover { color: var(--text); }

.bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--a2), var(--a1)); transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.bar.warn i { background: linear-gradient(90deg, #ff9f43, var(--warn)); }
.bar.bad i { background: linear-gradient(90deg, #ff3b3b, var(--neg)); }
.bar.blue i { background: linear-gradient(90deg, #3b8bff, var(--blue)); }
.barrow { display: grid; gap: 6px; margin-bottom: 14px; }
.barrow .t { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.barrow .t b { color: var(--text); font-variant-numeric: tabular-nums; }

.empty { color: var(--muted); padding: 26px 8px; text-align: center; }
.empty .ic { width: 38px; height: 38px; opacity: 0.55; display: block; margin: 0 auto 10px; }
.hdr-note { color: var(--muted); font-size: 13px; margin: 0 0 14px; }

/* ------------------------------------------------------------------ Diagramme */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .gl { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 11px; }
.chart .line { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.chart .hov { stroke: rgba(255, 255, 255, 0.25); stroke-dasharray: 4 4; }
.chart .tip { position: absolute; pointer-events: none; min-width: 150px; padding: 10px 12px; border-radius: 12px; background: rgba(10, 16, 13, 0.96); border: 1px solid var(--line2); box-shadow: var(--shadow); font-size: 12.5px; transform: translate(-50%, -110%); opacity: 0; transition: opacity 0.12s; z-index: 5; }
.chart .tip.on { opacity: 1; }
.chart .tip .d { color: var(--muted); margin-bottom: 4px; }
.chart .tip .r { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.chart .tip .r i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend input { display: none; }
.legend input:not(:checked) + i { opacity: 0.25; }
.donutwrap { display: grid; place-items: center; gap: 16px; }
.donut { position: relative; width: 190px; height: 190px; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut .mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut .mid small { color: var(--muted); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.donut .mid b { font-size: 20px; font-variant-numeric: tabular-nums; }
.dlegend { display: grid; gap: 8px; width: 100%; }
.dlegend div { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.dlegend i { width: 10px; height: 10px; border-radius: 3px; }
.dlegend span { color: var(--muted); }
.dlegend b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ Ausweis / Identitaet */
.idcard {
    position: relative; overflow: hidden; border-radius: 22px; padding: 22px 24px; display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center;
    background: linear-gradient(135deg, rgba(47, 214, 138, 0.2), rgba(18, 165, 106, 0.05) 45%, rgba(92, 200, 255, 0.08)), var(--panel-solid);
    border: 1px solid rgba(125, 255, 189, 0.22); box-shadow: var(--shadow);
}
.idcard::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.02) 0 2px, transparent 2px 12px); pointer-events: none; }
.idcard .portrait { width: 96px; height: 96px; border-radius: 24px; overflow: hidden; background: linear-gradient(135deg, var(--a1), var(--a3)); display: grid; place-items: center; font-size: 38px; font-weight: 800; color: #04130c; border: 2px solid rgba(255, 255, 255, 0.2); }
.idcard .portrait img { width: 100%; height: 100%; object-fit: cover; }
.idcard h2 { margin: 0 0 6px; font-size: 26px; letter-spacing: -0.01em; }
.idcard .facts { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 12px; }
.idcard .facts div { font-size: 12px; color: var(--muted); }
.idcard .facts b { display: block; color: var(--text); font-size: 14px; margin-top: 2px; }
.idcard .right { text-align: right; position: relative; z-index: 1; }
.idcard .right img { height: 48px; opacity: 0.9; }

.kv { display: grid; gap: 0; }
.kv div { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.kv div:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { text-align: right; }

/* ------------------------------------------------------------------ Listen / Tabellen */
.list { display: grid; }
.row { display: flex; align-items: center; gap: 13px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .ttl { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sm { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .amt { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt.pos { color: var(--a1); }
.amt.neg { color: var(--neg); }
.rico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); color: var(--muted); flex: none; }
.rico.pos { background: rgba(125, 255, 189, 0.12); color: var(--a1); }
.rico.neg { background: rgba(255, 91, 91, 0.12); color: var(--neg); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input, .toolbar .select { width: auto; min-width: 190px; padding: 9px 12px; }
.toolbar .sp { flex: 1; }

.acctiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.acct { padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(145deg, color-mix(in srgb, var(--ac, #2fd68a) 22%, transparent), rgba(255, 255, 255, 0.02)); position: relative; overflow: hidden; }
.acct .n { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.acct .n i { width: 9px; height: 9px; border-radius: 50%; background: var(--ac, #2fd68a); box-shadow: 0 0 10px var(--ac, #2fd68a); }
.acct .b { font-size: 26px; font-weight: 800; margin-top: 10px; font-variant-numeric: tabular-nums; }
.acct .s { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ------------------------------------------------------------------ Inventar */
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; }
.item { position: relative; border-radius: 16px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); padding: 14px 10px 12px; text-align: center; transition: transform 0.15s, border-color 0.15s, background 0.15s; }
.item:hover { transform: translateY(-3px); border-color: rgba(125, 255, 189, 0.35); background: rgba(125, 255, 189, 0.05); }
.item .img { height: 64px; display: grid; place-items: center; margin-bottom: 8px; }
.item .img img { max-width: 64px; max-height: 64px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); }
.item .img .ph { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(125, 255, 189, 0.18), rgba(255, 255, 255, 0.05)); color: var(--a1); font-weight: 800; font-size: 18px; }
.item .nm { font-size: 12.5px; font-weight: 600; line-height: 1.25; min-height: 31px; overflow: hidden; }
.item .w { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.item .cnt { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, 0.55); border: 1px solid var(--line2); padding: 1px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 800; }

/* ------------------------------------------------------------------ Fahrzeuge */
.cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.car { padding: 18px; }
.car .head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.car .model { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.plate {
    display: inline-block; margin-top: 8px; padding: 4px 14px 4px 22px; border-radius: 7px; background: #f1f1e9; color: #14202e; font-weight: 800; letter-spacing: 0.14em;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; border: 2px solid #14202e; position: relative; font-size: 14px;
}
.plate::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 11px; background: #1d4ed8; border-radius: 4px 0 0 4px; }
.car .odo { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

/* ------------------------------------------------------------------ Telefon */
.phonegrid { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 16px; align-items: start; }
.convlist { max-height: 620px; overflow: auto; }
.conv { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: center; }
.conv:hover { background: rgba(255, 255, 255, 0.04); }
.conv.on { background: rgba(47, 214, 138, 0.1); }
.cav { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #04130c; flex: none; }
.thread { display: flex; flex-direction: column; gap: 8px; padding: 18px; max-height: 620px; overflow: auto; }
.bub { max-width: 74%; padding: 9px 13px; border-radius: 17px; background: var(--panel2); border: 1px solid var(--line); align-self: flex-start; word-break: break-word; white-space: pre-wrap; }
.bub.me { align-self: flex-end; background: linear-gradient(135deg, rgba(47, 214, 138, 0.32), rgba(18, 165, 106, 0.22)); border-color: rgba(125, 255, 189, 0.25); }
.bub .t { color: var(--muted); font-size: 11px; margin-top: 3px; }
.bub img { max-width: 220px; border-radius: 10px; display: block; margin-bottom: 4px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.photo { position: relative; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: #0a100d; border: 1px solid var(--line); cursor: zoom-in; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.photo:hover img { transform: scale(1.05); }
.photo .star { position: absolute; top: 8px; right: 8px; color: var(--warn); }
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.note { padding: 16px; border-radius: 16px; background: rgba(255, 200, 87, 0.06); border: 1px solid rgba(255, 200, 87, 0.18); white-space: pre-wrap; word-break: break-word; max-height: 240px; overflow: auto; }
.note small { display: block; color: var(--muted); margin-bottom: 6px; }

.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.78); display: grid; place-items: center; z-index: 60; padding: 20px; animation: rise 0.2s both; }
.modal-bg img { max-width: min(92vw, 960px); max-height: 88vh; border-radius: 16px; }
.modal { width: min(440px, 100%); background: var(--panel-solid); border: 1px solid var(--line2); border-radius: 20px; padding: 24px; }
.modal h2 { margin: 0 0 10px; }
.modal .btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* ------------------------------------------------------------------ Skeleton / Toast */
.skel { border-radius: 14px; background: linear-gradient(100deg, rgba(255, 255, 255, 0.04) 30%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.04) 70%); background-size: 220% 100%; animation: sh 1.3s infinite; }
@keyframes sh { to { background-position: -120% 0; } }
#toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 80; }
.toast { background: var(--panel-solid); border: 1px solid var(--line2); border-left: 3px solid var(--a2); border-radius: 12px; padding: 11px 15px; max-width: 360px; box-shadow: var(--shadow); animation: rise 0.25s both; }
.toast.bad { border-left-color: var(--neg); }

/* ------------------------------------------------------------------ Mobil */
@media (max-width: 1180px) {
    .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .g21 { grid-template-columns: minmax(0, 1fr); }
    .phonegrid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
    .login { grid-template-columns: 1fr; }
    .hero { padding: 28px 24px; border-right: 0; border-bottom: 1px solid var(--line); gap: 26px; }
    .perks { grid-template-columns: 1fr; }
    .app { grid-template-columns: 1fr; }
    .side { position: fixed; left: 0; top: 0; width: 280px; transform: translateX(-102%); transition: transform 0.25s; box-shadow: var(--shadow); }
    .side.open { transform: none; }
    .burger { display: grid; }
    .top { padding: 14px 16px 4px; }
    #view { padding: 12px 16px 40px; }
    .g4, .g3, .g2 { grid-template-columns: minmax(0, 1fr); }
    .idcard { grid-template-columns: auto 1fr; }
    .idcard .right { display: none; }
    .kpi .val { font-size: 26px; }
}
@media (max-width: 520px) {
    .kpi .val { font-size: 23px; }
    .top h1 { font-size: 21px; }
}
