/* ==========================================================================
   BangerCity Bürgerportal
   ========================================================================== */
:root {
    --bg: #0b0716;
    --bg2: #120b24;
    --panel: rgba(23, 14, 44, .82);
    --panel2: rgba(34, 22, 64, .7);
    --solid: #170f2c;
    --line: rgba(139, 92, 246, .18);
    --line2: rgba(139, 92, 246, .32);
    --text: #f4f1ff;
    --soft: #c9bff0;
    --muted: #9184c2;
    --cyan: #00d4ff;
    --pink: #ff1aff;
    --purple: #8b5cf6;
    --green: #2ee59d;
    --red: #ff3d6e;
    --yellow: #ffc83d;
    --grad: linear-gradient(135deg, #00d4ff 0%, #8b5cf6 55%, #ff1aff 100%);
    --grad-soft: linear-gradient(135deg, rgba(0, 212, 255, .16), rgba(255, 26, 255, .12));
    --radius: 16px;
    --shadow: 0 18px 50px rgba(0, 0, 0, .45);
    --font: 'Inter', system-ui, sans-serif;
    --display: 'Outfit', 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: var(--font); color: var(--text); background: var(--bg); font-size: 14px; line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}
body::before {
    content: ''; position: fixed; inset: 0; z-index: -2;
    background:
        radial-gradient(900px 600px at 0% 0%, rgba(0, 212, 255, .12), transparent 60%),
        radial-gradient(900px 700px at 100% 100%, rgba(255, 26, 255, .10), transparent 60%),
        radial-gradient(700px 500px at 70% 10%, rgba(139, 92, 246, .12), transparent 60%),
        var(--bg);
}
body::after {
    content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .35;
    background-image: linear-gradient(rgba(139, 92, 246, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(139, 92, 246, .07) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}
a { color: var(--cyan); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.soft { color: var(--soft); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .5px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, .3); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------------------------ Buttons & Formulare */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
    border-radius: 11px; border: 1px solid var(--line2); background: rgba(139, 92, 246, .12); color: var(--text);
    font-weight: 600; cursor: pointer; transition: .15s; white-space: nowrap; font-size: 13.5px;
}
.btn:hover { background: rgba(139, 92, 246, .24); border-color: rgba(139, 92, 246, .55); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--grad); border: 0; box-shadow: 0 6px 22px rgba(0, 212, 255, .25), 0 6px 26px rgba(255, 26, 255, .18); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.ghost:hover { background: rgba(255, 255, 255, .05); }
.btn.danger { background: rgba(255, 61, 110, .12); border-color: rgba(255, 61, 110, .4); color: #ff8fab; }
.btn.danger:hover { background: rgba(255, 61, 110, .22); }
.btn.green { background: rgba(46, 229, 157, .12); border-color: rgba(46, 229, 157, .4); color: #8ff5cb; }
.btn.green:hover { background: rgba(46, 229, 157, .22); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn.block { width: 100%; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--soft); cursor: pointer; transition: .15s; }
.icon-btn:hover { background: rgba(139, 92, 246, .16); color: var(--text); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; color: var(--soft); letter-spacing: .2px; }
.input, .select {
    height: 44px; width: 100%; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line2);
    background: rgba(11, 7, 22, .65); outline: none; transition: .15s;
}
.input:focus, .select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 212, 255, .15); }
.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) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.select.sm, .input.sm { height: 34px; font-size: 13px; border-radius: 9px; }
.select.sm { background-position: calc(100% - 16px) 15px, calc(100% - 11px) 15px; }
.input.code { text-align: center; font-family: ui-monospace, Menlo, monospace; font-size: 22px; letter-spacing: 6px; text-transform: uppercase; height: 54px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--soft); cursor: pointer; user-select: none; }
.check input { accent-color: var(--cyan); width: 16px; height: 16px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* ------------------------------------------------------------------ Anmeldung */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero {
    position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 48px;
    background: linear-gradient(180deg, rgba(11, 7, 22, .2), rgba(11, 7, 22, .9)), url('../../assets/images/hero-bg.jpg') center/cover;
    border-right: 1px solid var(--line);
}
.auth-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0, 212, 255, .15), transparent 40%, rgba(255, 26, 255, .15)); pointer-events: none; }
.auth-hero > * { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 14px; }
.auth-brand img { width: 58px; height: 58px; border-radius: 14px; filter: drop-shadow(0 0 18px rgba(0, 212, 255, .45)); }
.auth-brand b { font-family: var(--display); font-size: 22px; letter-spacing: .5px; display: block; }
.auth-brand span { color: var(--soft); font-size: 13px; }
.auth-hero h1 { font-family: var(--display); font-size: 46px; line-height: 1.05; font-weight: 800; max-width: 560px; }
.auth-hero p { color: var(--soft); max-width: 520px; margin-top: 14px; font-size: 15.5px; }
.auth-feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 560px; margin-top: 30px; }
.auth-feat { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 13px; background: rgba(11, 7, 22, .55); border: 1px solid var(--line); }
.auth-feat i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--grad-soft); color: var(--cyan); }
.auth-feat b { font-size: 13px; display: block; }
.auth-feat span { font-size: 12px; color: var(--muted); }
.auth-side { display: grid; place-items: center; padding: 40px 24px; min-width: 0; }
.auth-side > * { min-width: 0; }
.auth-card { width: 100%; max-width: 430px; }
.auth-card h2 { font-family: var(--display); font-size: 28px; margin-bottom: 6px; }
.auth-card .lead { color: var(--muted); margin-bottom: 22px; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 13px; background: rgba(11, 7, 22, .6); border: 1px solid var(--line); margin-bottom: 24px; }
.tab { flex: 1; min-width: 0; text-align: center; padding: 9px 8px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); transition: .15s; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.on { background: var(--grad-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.steps { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 13px; background: rgba(0, 212, 255, .06); border: 1px dashed rgba(0, 212, 255, .3); font-size: 13px; color: var(--soft); }
.steps div { display: flex; gap: 10px; align-items: flex-start; }
.steps b.n { flex-shrink: 0; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 12px; }
kbd { font-family: ui-monospace, Menlo, monospace; background: rgba(255, 255, 255, .08); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; font-size: 12px; color: var(--text); }
.err { color: #ff8fab; background: rgba(255, 61, 110, .1); border: 1px solid rgba(255, 61, 110, .3); padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.okmsg { color: #8ff5cb; background: rgba(46, 229, 157, .1); border: 1px solid rgba(46, 229, 157, .3); padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.back-home { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; margin-top: 22px; }
.back-home:hover { color: var(--text); }

/* ------------------------------------------------------------------ App-Layout */
.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.side {
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px 16px;
    background: linear-gradient(180deg, rgba(18, 11, 36, .95), rgba(11, 7, 22, .95)); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 18px; }
.brand img { width: 40px; height: 40px; border-radius: 11px; filter: drop-shadow(0 0 12px rgba(0, 212, 255, .4)); }
.brand b { font-family: var(--display); font-size: 16.5px; letter-spacing: .4px; display: block; line-height: 1.1; }
.brand span { font-size: 11.5px; color: var(--muted); }
.me-card { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--grad-soft); border: 1px solid var(--line2); margin-bottom: 16px; }
.avatar { position: relative; flex-shrink: 0; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 16px; background: var(--grad); color: #fff; }
.avatar.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
.avatar.lg { width: 84px; height: 84px; border-radius: 22px; font-size: 30px; }
.avatar .dot { position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; background: #5d5480; border: 3px solid var(--solid); }
.avatar .dot.on { background: var(--green); box-shadow: 0 0 10px var(--green); }
.me-card b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-card span { display: block; font-size: 12px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -4px; padding: 0 4px; }
.nav-label { font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #6f639e; padding: 14px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--soft); font-weight: 500; cursor: pointer; transition: .15s; position: relative; }
.nav-item i { width: 18px; text-align: center; color: var(--muted); transition: .15s; }
.nav-item:hover { background: rgba(139, 92, 246, .1); color: var(--text); }
.nav-item.on { background: rgba(0, 212, 255, .08); color: var(--text); box-shadow: inset 0 0 0 1px rgba(0, 212, 255, .22); }
.nav-item.on i { color: var(--cyan); }
.nav-item.on::before { content: ''; position: absolute; left: -4px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--grad); }
.nav-item .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--pink); color: #fff; }
.side-foot { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.server-pill { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 11px; background: rgba(11, 7, 22, .6); border: 1px solid var(--line); font-size: 12.5px; color: var(--soft); }
.server-pill .led { width: 9px; height: 9px; border-radius: 50%; background: #5d5480; }
.server-pill .led.on { background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .5; } }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 18px 34px; background: rgba(11, 7, 22, .7); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(1px)) { .topbar { backdrop-filter: blur(14px); } }
.topbar h1 { font-family: var(--display); font-size: 23px; font-weight: 700; line-height: 1.1; }
.topbar p { color: var(--muted); font-size: 13px; }
.topbar .menu { display: none; }
.content { padding: 28px 34px 50px; width: 100%; max-width: 1480px; }
.content.full { max-width: none; padding: 0; flex: 1; display: flex; }

/* ------------------------------------------------------------------ Karten & Raster */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.mt { margin-top: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card.flat { box-shadow: none; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.card-h h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.card-h h3 i { color: var(--cyan); }
.card-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.kpi { position: relative; overflow: hidden; display: flex; gap: 14px; align-items: center; padding: 18px 20px; }
.kpi .ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.kpi b { display: block; font-family: var(--display); font-size: 23px; font-weight: 700; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi span { color: var(--muted); font-size: 12.5px; }
.kpi::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: currentColor; opacity: .06; }
.c-cyan { color: var(--cyan); } .c-cyan .ic { background: rgba(0, 212, 255, .12); }
.c-pink { color: var(--pink); } .c-pink .ic { background: rgba(255, 26, 255, .12); }
.c-purple { color: var(--purple); } .c-purple .ic { background: rgba(139, 92, 246, .16); }
.c-green { color: var(--green); } .c-green .ic { background: rgba(46, 229, 157, .12); }
.c-yellow { color: var(--yellow); } .c-yellow .ic { background: rgba(255, 200, 61, .12); }
.c-red { color: var(--red); } .c-red .ic { background: rgba(255, 61, 110, .12); }
.kpi b, .kpi span { color: var(--text); } .kpi span { color: var(--muted); }

.hero {
    position: relative; overflow: hidden; padding: 28px; border-radius: 20px; border: 1px solid var(--line2);
    background: linear-gradient(120deg, rgba(0, 212, 255, .14), rgba(139, 92, 246, .12) 45%, rgba(255, 26, 255, .14)), var(--panel);
    display: flex; gap: 22px; align-items: center;
}
.hero::after { content: ''; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px; background: url('../../assets/images/logo.png') center/contain no-repeat; opacity: .07; transform: rotate(-12deg); }
.hero h2 { font-family: var(--display); font-size: 30px; font-weight: 800; line-height: 1.1; }
.hero p { color: var(--soft); margin-top: 6px; }
.hero .row { margin-top: 12px; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 600; background: rgba(139, 92, 246, .16); color: var(--soft); border: 1px solid var(--line); white-space: nowrap; }
.badge.cyan { background: rgba(0, 212, 255, .1); color: #7fe6ff; border-color: rgba(0, 212, 255, .3); }
.badge.green { background: rgba(46, 229, 157, .1); color: #8ff5cb; border-color: rgba(46, 229, 157, .3); }
.badge.red { background: rgba(255, 61, 110, .1); color: #ff8fab; border-color: rgba(255, 61, 110, .3); }
.badge.yellow { background: rgba(255, 200, 61, .1); color: #ffdd85; border-color: rgba(255, 200, 61, .3); }
.badge.pink { background: rgba(255, 26, 255, .1); color: #ff8cff; border-color: rgba(255, 26, 255, .3); }
.badge .led { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--line); min-width: 0; }
.li:last-child { border-bottom: 0; }
.li .ic { width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; background: rgba(139, 92, 246, .14); color: var(--soft); }
.li .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .s { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .amt { font-family: var(--display); font-weight: 700; font-size: 15px; white-space: nowrap; }

.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.kv div span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-bottom: 3px; }
.kv div b { font-weight: 600; font-size: 14.5px; word-break: break-word; }

.bar { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 8px; background: var(--grad); }
.bar.green i { background: linear-gradient(90deg, #1fbf7f, var(--green)); }
.bar.red i { background: linear-gradient(90deg, #d42a5a, var(--red)); }
.bar.yellow i { background: linear-gradient(90deg, #e0a51e, var(--yellow)); }
.bar.cyan i { background: linear-gradient(90deg, #0096c7, var(--cyan)); }
.meter { display: flex; flex-direction: column; gap: 6px; }
.meter .row { justify-content: space-between; font-size: 12.5px; color: var(--soft); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; background: rgba(0, 212, 255, .07); border: 1px solid rgba(0, 212, 255, .22); font-size: 13px; font-weight: 500; }
.chip i { color: var(--cyan); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter { padding: 7px 13px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--soft); cursor: pointer; font-weight: 600; font-size: 12.5px; transition: .15s; }
.filter:hover { color: var(--text); border-color: var(--line2); }
.filter.on { background: var(--grad-soft); color: var(--text); border-color: rgba(0, 212, 255, .35); }
.search { position: relative; }
.search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.search .input { padding-left: 36px; height: 38px; }

.empty { text-align: center; padding: 38px 16px; color: var(--muted); }
.empty i { font-size: 30px; display: block; margin-bottom: 12px; opacity: .6; color: var(--purple); }
.empty b { display: block; color: var(--soft); margin-bottom: 4px; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }
.loading i { font-size: 26px; color: var(--cyan); }
.notice { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: 14px; border: 1px solid rgba(255, 200, 61, .3); background: rgba(255, 200, 61, .07); color: #ffe2a0; margin-bottom: 18px; }
.notice.red { border-color: rgba(255, 61, 110, .35); background: rgba(255, 61, 110, .08); color: #ffb3c6; }
.notice.cyan { border-color: rgba(0, 212, 255, .3); background: rgba(0, 212, 255, .07); color: #a6efff; }
.notice i { font-size: 20px; }

/* ------------------------------------------------------------------ Ausweis */
.idcard {
    position: relative; overflow: hidden; border-radius: 20px; padding: 24px; border: 1px solid rgba(0, 212, 255, .3);
    background: linear-gradient(135deg, rgba(0, 212, 255, .16), rgba(139, 92, 246, .12) 50%, rgba(255, 26, 255, .14)), #140c29;
    box-shadow: var(--shadow);
}
.idcard::before { content: 'SAN ANDREAS'; position: absolute; right: 22px; top: 18px; font-family: var(--display); font-weight: 800; letter-spacing: 4px; font-size: 12px; color: rgba(255, 255, 255, .35); }
.idcard::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 9px); pointer-events: none; }
.idcard .top { font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--soft); margin-bottom: 18px; }
.idcard .body { display: flex; gap: 22px; align-items: flex-start; position: relative; z-index: 1; }
.idcard .photo { width: 104px; height: 128px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); font-family: var(--display); font-size: 38px; font-weight: 800; flex-shrink: 0; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.idcard .name { font-family: var(--display); font-size: 26px; font-weight: 800; line-height: 1.1; margin-bottom: 14px; }
.idcard .kv div span { color: rgba(255, 255, 255, .5); }
.idcard .nr { position: relative; z-index: 1; margin-top: 18px; font-family: ui-monospace, Menlo, monospace; letter-spacing: 3px; color: rgba(255, 255, 255, .55); font-size: 13px; }

/* ------------------------------------------------------------------ Inventar */
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; }
.item { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 16px 10px 12px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line); transition: .15s; }
.item:hover { border-color: rgba(0, 212, 255, .35); transform: translateY(-2px); }
.item img { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .4)); }
.item .ph { width: 56px; height: 56px; display: grid; place-items: center; font-size: 24px; color: var(--purple); }
.item b { font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.item .n { position: absolute; top: 8px; right: 8px; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 8px; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: var(--grad); color: #fff; }
.item .w { font-size: 11px; color: var(--muted); }

/* ------------------------------------------------------------------ Fahrzeuge */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.veh { overflow: hidden; padding: 0; display: flex; flex-direction: column; transition: .15s; }
.veh:hover { border-color: rgba(0, 212, 255, .35); transform: translateY(-2px); }
.veh .pic { position: relative; height: 150px; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 80%, rgba(0, 212, 255, .18), transparent 65%), linear-gradient(180deg, rgba(139, 92, 246, .08), transparent); border-bottom: 1px solid var(--line); }
.veh .pic img { max-width: 88%; max-height: 128px; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .5)); }
.veh .pic .ph { font-size: 52px; color: rgba(139, 92, 246, .45); }
.veh .pic .badge { position: absolute; left: 12px; top: 12px; z-index: 2; }
.plate { position: absolute; right: 12px; top: 12px; font-family: ui-monospace, Menlo, monospace; font-weight: 700; font-size: 12.5px; letter-spacing: 1.5px; padding: 3px 9px; border-radius: 6px; background: #f2f2f7; color: #142a6e; border: 2px solid #142a6e; z-index: 2; }
.veh .info { padding: 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.veh .info h4 { font-family: var(--display); font-size: 18px; line-height: 1.15; }
.veh .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.veh .stats .meter .row { font-size: 11.5px; }
.veh .where { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--soft); }
.veh .where i { color: var(--cyan); }

/* ------------------------------------------------------------------ Karte */
.map { height: 420px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #0f1a2b; isolation: isolate; z-index: 0; }
.map.sm { height: 260px; }
.map.tall { height: 560px; }
.leaflet-container { background: #0f1a2b; font-family: var(--font); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--solid); color: var(--text); border: 1px solid var(--line2); }
.leaflet-popup-content { margin: 12px 14px; font-size: 13px; }
.leaflet-control-zoom a { background: var(--solid) !important; color: var(--text) !important; border-color: var(--line) !important; }
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--grad); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0, 0, 0, .5); border: 2px solid #fff; }
.pin i { transform: rotate(45deg); color: #fff; font-size: 12px; }
.pin.me { background: linear-gradient(135deg, #2ee59d, #00d4ff); }
.zone-label { background: transparent; border: 0; box-shadow: none; color: #fff; font-weight: 700; font-size: 11px; text-shadow: 0 1px 3px #000, 0 0 6px #000; }
.zone-label::before { display: none; }

/* ------------------------------------------------------------------ Tabellen */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; padding: 0 12px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(139, 92, 246, .05); }
.table .who { display: flex; align-items: center; gap: 12px; }
.table .who b { display: block; }
.table .who span { font-size: 12px; color: var(--muted); }
.table-wrap { overflow-x: auto; }

/* ------------------------------------------------------------------ Modal & Toast */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(5, 3, 12, .72); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; background: var(--solid); border: 1px solid var(--line2); border-radius: 18px; padding: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: pop .18s ease-out; }
.modal.wide { max-width: 640px; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal h3 { font-family: var(--display); font-size: 21px; margin-bottom: 6px; }
.modal .desc { color: var(--muted); margin-bottom: 18px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.pick { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; margin-top: 12px; }
.pick .li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.pick .li:hover { border-color: rgba(0, 212, 255, .35); background: rgba(0, 212, 255, .05); }
.pick .li.on { border-color: var(--cyan); background: rgba(0, 212, 255, .1); }
#toasts { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; gap: 12px; align-items: center; min-width: 260px; max-width: 380px; padding: 13px 16px; border-radius: 13px; background: var(--solid); border: 1px solid var(--line2); box-shadow: var(--shadow); animation: pop .2s; font-size: 13.5px; }
.toast i { font-size: 17px; }
.toast.ok i { color: var(--green); }
.toast.err i { color: var(--red); }
.toast.out { opacity: 0; transform: translateY(8px); transition: .3s; }

/* ------------------------------------------------------------------ Tablet-Seite */
.frame { flex: 1; width: 100%; border: 0; min-height: calc(100vh - 77px); background: #0a0d14; }

/* ------------------------------------------------------------------ Mobil */
@media (max-width: 1200px) {
    .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .g-side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 980px) {
    .auth { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
    .app { grid-template-columns: 1fr; }
    .side { position: fixed; z-index: 60; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .2s; }
    .side.open { transform: none; box-shadow: 30px 0 80px rgba(0, 0, 0, .6); }
    .topbar { padding: 14px 18px; }
    .topbar .menu { display: grid; }
    .content { padding: 20px 16px 40px; }
    .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
    .hero { flex-direction: column; align-items: flex-start; }
    .idcard .body { flex-direction: column; }
    .frame { min-height: calc(100vh - 69px); }
}
@media (max-width: 560px) {
    .li { flex-wrap: wrap; }
    .li .grow { flex-basis: calc(100% - 60px); }
    .hero { padding: 22px; }
    .hero h2 { font-size: 25px; }
    .tab { white-space: normal; font-size: 12px; line-height: 1.2; }
    .g4 { grid-template-columns: minmax(0, 1fr); }
    .kv { grid-template-columns: minmax(0, 1fr); }
}
