/*
 * MietKlar web platform.
 *
 * Plain CSS on purpose: served as is, no build step on deploy. Tokens and
 * components mirror the Rechner (resources/views/rechner/layout.blade.php and
 * its wizard), so the guest calculator and the platform feel like one product.
 */

:root {
    --bg: #f4f7f8;
    --surface: #ffffff;
    --surface-soft: #edf5f4;
    --surface-sunken: #f7fafa;
    --text: #0e1e22;
    --text-muted: #5b7177;
    --brand: #0f766e;
    --brand-deep: #0b5a53;
    --brand-ring: rgba(15, 118, 110, .18);
    --accent: #f59e0b;
    --border: #d6e1e4;
    --border-soft: #e6eef0;
    --danger: #b42318;
    --danger-soft: #fef3f2;
    --warn: #c2410c;
    --warn-soft: #fff7ed;
    --ok: #15803d;
    --ok-soft: #f0fdf4;
    --info: #0b5a53;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 8px 18px rgba(16, 33, 38, 0.08);
    --shadow-lg: 0 24px 60px rgba(16, 33, 38, 0.18);
    --sidebar: 248px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0c1517;
        --surface: #132024;
        --surface-soft: #16302d;
        --surface-sunken: #0f1b1e;
        --text: #e6eff1;
        --text-muted: #93a9ae;
        --brand: #2bb3a6;
        --brand-deep: #5fd0c4;
        --brand-ring: rgba(43, 179, 166, .25);
        --border: #25373b;
        --border-soft: #1c2c30;
        --danger: #f97066;
        --danger-soft: #2d1513;
        --warn: #fb923c;
        --warn-soft: #2b1a0d;
        --ok: #4ade80;
        --ok-soft: #0f2618;
        --info: #5fd0c4;
        --shadow-sm: 0 8px 18px rgba(0, 0, 0, 0.35);
        --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: "Sora", "Avenir Next", "Segoe UI", system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 8%, rgba(15, 118, 110, 0.10), transparent 32%),
        radial-gradient(circle at 88% 12%, rgba(245, 158, 11, 0.06), transparent 28%),
        var(--bg);
    background-attachment: fixed;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
a { color: var(--brand); }
img { max-width: 100%; }
[x-cloak] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* ── Shell ─────────────────────────────────────────────────────────────── */

.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
@media (min-width: 901px) {
    /* The sidebar is sticky; its column keeps the colour on long pages. */
    .shell { background: linear-gradient(to right, color-mix(in srgb, var(--surface) 82%, transparent) var(--sidebar), transparent var(--sidebar)); }
}
.sidebar {
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    display: flex; flex-direction: column; gap: 20px;
    padding: 22px 16px; border-right: 1px solid var(--border-soft);
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.1rem; padding: 0 8px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav { display: grid; gap: 4px; }
.nav a {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
    color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: .95rem;
    transition: background-color .15s, color .15s;
}
.nav a:hover { background: var(--surface-soft); color: var(--text); }
.nav a[aria-current="page"] { background: var(--surface-soft); color: var(--brand-deep); }
.nav svg { width: 20px; height: 20px; flex-shrink: 0; }
.sidebar__cta { margin-top: 4px; }
.sidebar__foot { margin-top: auto; display: grid; gap: 10px; }
.credit-chip {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 10px 12px; border-radius: 10px; background: var(--surface-sunken);
    border: 1px solid var(--border-soft); font-size: .85rem; color: var(--text-muted); text-decoration: none;
}
.credit-chip strong { color: var(--text); font-size: 1rem; }

.main { min-width: 0; display: flex; flex-direction: column; overflow-x: clip; }
.topbar { display: none; }
.content { width: min(1100px, 100%); margin: 0 auto; padding: 28px 32px 64px; flex: 1; }
.page-footer { padding: 18px 32px 28px; font-size: .8rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; }
.page-footer a { color: var(--text-muted); text-decoration: none; }
.page-footer a:hover { color: var(--brand); }

.bottom-nav { display: none; }

@media (max-width: 900px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .topbar {
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        position: sticky; top: 0; z-index: 20; padding: 12px 16px;
        background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--border-soft);
    }
    .content { padding: 18px 16px 112px; }
    .page-footer { padding-bottom: 100px; }
    .bottom-nav {
        display: grid; grid-template-columns: repeat(4, 1fr);
        position: fixed; inset: auto 0 0 0; z-index: 30;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
        background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px);
        border-top: 1px solid var(--border);
    }
    .bottom-nav a {
        display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px;
        font-size: .7rem; font-weight: 600; color: var(--text-muted); text-decoration: none; border-radius: 10px;
    }
    .bottom-nav a[aria-current="page"] { color: var(--brand); }
    .bottom-nav svg { width: 22px; height: 22px; }
    .bottom-nav .bottom-nav__cta svg { background: var(--brand); color: #fff; border-radius: 999px; padding: 4px; width: 30px; height: 30px; margin-top: -4px; }
}

/* ── Typography & page head ────────────────────────────────────────────── */

h1 { font-size: clamp(1.5rem, 3.6vw, 2rem); letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
h2 { font-size: 1.15rem; margin: 0 0 4px; letter-spacing: -0.01em; }
h3 { font-size: 1rem; margin: 0 0 10px; }
.lead { color: var(--text-muted); margin: 6px 0 0; }
.muted { color: var(--text-muted); }
.small { font-size: .85rem; }
.tiny { font-size: .76rem; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); background: var(--surface-soft); border-radius: 999px; padding: 3px 11px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .84rem; color: var(--text-muted); margin-bottom: 8px; }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }

/* ── Surfaces ──────────────────────────────────────────────────────────── */

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; }
.card + .card { margin-top: 16px; }
.card--flush { padding: 0; overflow: hidden; }
.card--soft { background: var(--surface-soft); border-color: transparent; box-shadow: none; }
.card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card__head h2 { margin: 0; }
.stack { display: grid; gap: 16px; }
.stack--lg { display: grid; gap: 24px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: 1fr 1fr; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--addr { grid-template-columns: 1fr 110px; }
.grid--city { grid-template-columns: 120px 1fr; }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .grid--3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid--2, .grid--3 { grid-template-columns: 1fr; } }
.section + .section { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.divider { border: 0; border-top: 1px solid var(--border-soft); margin: 18px 0; }

/* ── Stats ─────────────────────────────────────────────────────────────── */

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .stats--3 { grid-template-columns: 1fr; } .stats--3 .stat { display: flex; justify-content: space-between; align-items: baseline; } .stats--3 .stat__value { margin: 0; } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.stat__label { font-size: .8rem; font-weight: 600; color: var(--text-muted); }
.stat__value { font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat__sub { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.stat--ok .stat__value { color: var(--ok); }
.stat--warn .stat__value { color: var(--warn); }
.stat--danger .stat__value { color: var(--danger); }
.progress { height: 8px; border-radius: 99px; background: var(--surface-sunken); border: 1px solid var(--border-soft); overflow: hidden; margin-top: 12px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #14b8a6); border-radius: 99px; transition: width .4s; }

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid transparent; border-radius: 10px; padding: 10px 18px;
    font: inherit; font-weight: 600; font-size: .94rem; cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background-color .15s, border-color .15s, opacity .15s, color .15s;
}
.btn svg { width: 18px; height: 18px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-deep); }
@media (prefers-color-scheme: dark) { .btn--primary { color: #04201d; } .btn--primary:hover { color: #04201d; } }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger-ghost { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn--danger-ghost:hover { background: var(--danger-soft); }
.btn--link { background: none; border: none; padding: 0; color: var(--brand); font-weight: 600; cursor: pointer; font: inherit; text-decoration: none; }
.btn--link:hover { text-decoration: underline; }
.btn--sm { padding: 7px 12px; font-size: .85rem; border-radius: 9px; }
.btn--lg { padding: 14px 24px; font-size: 1.02rem; }
.btn--block { width: 100%; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); cursor: pointer; }
.icon-btn:hover { color: var(--brand); border-color: var(--brand); }
.icon-btn svg { width: 18px; height: 18px; }

/* ── Forms ─────────────────────────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-size: .86rem; font-weight: 600; }
.field__control { position: relative; display: flex; align-items: center; }
.field input, .field select, .field textarea, .select, .input {
    width: 100%; font: inherit; font-size: 1rem; color: var(--text);
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
    transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus, .select:focus, .input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--danger); }
.field__suffix { position: absolute; right: 13px; color: var(--text-muted); font-size: .92rem; pointer-events: none; }
.field__control:has(.field__suffix) input { padding-right: 48px; }
.field__hint { margin: 0; font-size: .8rem; color: var(--text-muted); }
.field__error { margin: 0; font-size: .82rem; color: var(--danger); font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--brand); width: 18px; height: 18px; flex-shrink: 0; }

.choice { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: var(--surface); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--surface-soft); }
.choice input { margin-top: 4px; accent-color: var(--brand); width: 18px; height: 18px; flex-shrink: 0; }
.choice__title { font-weight: 600; display: block; }
.choice__sub { font-size: .84rem; color: var(--text-muted); display: block; }
.choices { display: grid; gap: 10px; }
.choices--2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .choices--2 { grid-template-columns: 1fr; } }

.segmented { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface-sunken); border: 1px solid var(--border-soft); gap: 2px; flex-wrap: wrap; }
.segmented button, .segmented a { border: 0; background: none; font: inherit; font-size: .86rem; font-weight: 600; color: var(--text-muted); padding: 7px 12px; border-radius: 8px; cursor: pointer; text-decoration: none; }
.segmented [aria-pressed="true"], .segmented [aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(16, 33, 38, .12); }

/* ── Alerts, badges, empty states ──────────────────────────────────────── */

.alert { border-radius: 10px; padding: 12px 16px; font-size: .94rem; display: flex; gap: 10px; align-items: flex-start; }
.alert + .alert { margin-top: 10px; }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.alert--info { background: var(--surface-soft); color: var(--info); }
.alert--error { background: var(--danger-soft); color: var(--danger); }
.alert--warn { background: var(--warn-soft); color: var(--warn); }
.alert--ok { background: var(--ok-soft); color: var(--ok); }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: currentColor; }
.badge--paid { background: var(--ok-soft); color: var(--ok); }
.badge--overdue { background: var(--danger-soft); color: var(--danger); }
.badge--due_soon { background: var(--warn-soft); color: var(--warn); }
.badge--unpaid { background: var(--surface-sunken); color: var(--text-muted); border-color: var(--border-soft); }
.badge--draft { background: var(--surface-sunken); color: var(--text-muted); border-color: var(--border-soft); }
.badge--final { background: var(--surface-soft); color: var(--brand-deep); }
.badge--plain::before { display: none; }
.tag { display: inline-block; margin-left: 6px; font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: 0 7px; vertical-align: 1px; }

.empty { text-align: center; padding: 36px 20px; color: var(--text-muted); }
.empty svg { width: 42px; height: 42px; color: var(--brand); opacity: .7; margin-bottom: 8px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }
.empty p { margin: 0 auto 16px; max-width: 420px; font-size: .92rem; }

/* ── Lists & tables ────────────────────────────────────────────────────── */

.list { display: grid; grid-template-columns: minmax(0, 1fr); }
.list__item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 20px; border-top: 1px solid var(--border-soft); text-decoration: none; color: inherit; }
.list__item:first-child { border-top: 0; }
a.list__item:hover, button.list__item:hover { background: var(--surface-sunken); }
.list__main { flex: 1 1 160px; min-width: 0; }
.list__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list__sub { font-size: .83rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list__end { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 10px; margin-left: auto; }
.list__amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.avatar { width: 40px; height: 40px; border-radius: 11px; background: var(--surface-soft); color: var(--brand-deep); display: grid; place-items: center; font-weight: 700; flex-shrink: 0; font-size: .9rem; }
.avatar svg { width: 20px; height: 20px; }
@media (max-width: 560px) { .list__item { padding: 12px 14px; gap: 10px; flex-wrap: wrap; } .list__end { width: 100%; justify-content: space-between; } .avatar { display: none; } }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--border-soft); text-align: right; vertical-align: middle; }
.table th:first-child, .table td:first-child { text-align: left; }
.table td:not(:first-child) { white-space: nowrap; }
.table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 700; }
.table tfoot td { font-weight: 700; border-bottom: none; }
.table .sub { display: block; font-size: .78rem; color: var(--text-muted); white-space: normal; }
.table .left { text-align: left; }
.table tr.is-selected td { background: var(--surface-soft); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0; }
.facts div { background: var(--surface-sunken); border: 1px solid var(--border-soft); border-radius: 10px; padding: 10px 12px; }
.facts dt { font-size: .76rem; color: var(--text-muted); font-weight: 600; }
.facts dd { margin: 2px 0 0; font-weight: 700; }

/* ── Tabs ──────────────────────────────────────────────────────────────── */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 14px; font-weight: 600; font-size: .94rem; color: var(--text-muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }

/* ── Timeline ──────────────────────────────────────────────────────────── */

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 17px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline li { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding: 8px 0 14px; }
.timeline__dot { width: 36px; height: 36px; border-radius: 99px; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--border); color: var(--text-muted); z-index: 1; }
.timeline__dot svg { width: 17px; height: 17px; }
.timeline__dot--ok { border-color: var(--ok); color: var(--ok); }
.timeline__dot--danger { border-color: var(--danger); color: var(--danger); }
.timeline__dot--brand { border-color: var(--brand); color: var(--brand); }
.timeline__title { font-weight: 600; }
.timeline__meta { font-size: .82rem; color: var(--text-muted); }
.timeline__month { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin: 14px 0 4px 50px; }

/* ── Modal & toasts ────────────────────────────────────────────────────── */

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(8, 20, 23, .48); backdrop-filter: blur(2px); }
.modal__panel { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 24px; }
.modal__panel--wide { width: min(720px, 100%); }
.modal__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.modal__head h2 { margin: 0; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
@media (max-width: 560px) { .modal { place-items: end center; padding: 0; } .modal__panel { border-radius: 18px 18px 0 0; max-height: 92vh; padding-bottom: calc(24px + env(safe-area-inset-bottom)); } }

.toasts { position: fixed; z-index: 80; right: 20px; bottom: 20px; display: grid; gap: 10px; width: min(380px, calc(100% - 32px)); }
.toast { background: var(--text); color: var(--bg); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow-lg); font-size: .92rem; display: flex; gap: 10px; align-items: center; }
.toast--error { background: var(--danger); color: #fff; }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
@media (max-width: 900px) { .toasts { right: 16px; bottom: 92px; } }

/* ── Auth ──────────────────────────────────────────────────────────────── */

.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth__aside {
    background: linear-gradient(150deg, #0f766e, #0b5a53 55%, #083f3a); color: #e8f6f4;
    padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
}
.auth__aside .brand { color: #fff; padding: 0; }
.auth__aside h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.2; letter-spacing: -0.02em; color: #fff; }
.auth__points { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.auth__points li { display: flex; gap: 12px; align-items: flex-start; font-size: .98rem; }
.auth__points svg { width: 22px; height: 22px; flex-shrink: 0; color: #99f6e4; }
.auth__main { display: grid; place-items: center; padding: 32px 20px; }
.auth__card { width: min(420px, 100%); }
.auth__card h1 { margin-bottom: 6px; }
.auth__switch { margin-top: 18px; text-align: center; font-size: .92rem; color: var(--text-muted); }
.auth__mobile-brand { display: none; margin-bottom: 26px; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth__aside { display: none; } .auth__mobile-brand { display: flex; } }

/* ── Abrechnung wizard (shared with the Rechner's markup) ──────────────── */

.stepper { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 20px; position: relative; }
.stepper li { flex: 1; min-width: 0; }
.stepper button { width: 100%; background: none; border: none; padding: 0; font: inherit; text-align: left; cursor: default; color: var(--text-muted); }
.stepper button[data-reachable] { cursor: pointer; }
.stepper__bar { display: block; height: 5px; border-radius: 99px; background: var(--border); margin-bottom: 6px; }
.stepper__label { display: block; font-size: .78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper [data-done] .stepper__bar { background: var(--brand); opacity: .45; }
.stepper [aria-current="step"] .stepper__bar { background: var(--brand); }
.stepper [aria-current="step"] .stepper__label { color: var(--text); }
@media (max-width: 640px) { .stepper__label { display: none; } .stepper [aria-current="step"] .stepper__label { display: block; position: absolute; } .stepper { margin-bottom: 36px; } }

.months { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
@media (max-width: 480px) { .months { grid-template-columns: repeat(4, 1fr); } }
.month { position: relative; }
.month input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.month span { display: block; text-align: center; padding: 10px 0; border: 1px solid var(--border); border-radius: 9px; font-size: .9rem; font-weight: 600; color: var(--text-muted); background: var(--surface); }
.month input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.month input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-ring); }
.month input:disabled + span { opacity: .45; text-decoration: line-through; }

.summary-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 16px; background: var(--surface-soft); border-radius: 10px; margin-top: 16px; font-weight: 600; }

.costs { display: grid; gap: 10px; }
.cost { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.cost--filled { border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.cost__row { display: grid; grid-template-columns: 1fr 160px 200px; gap: 10px; align-items: center; }
.cost__name { font-weight: 600; font-size: .95rem; }
.cost__extra { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); display: grid; gap: 12px; }
.cost .field input, .cost .select { padding: 9px 11px; font-size: .95rem; }
.cost .field__control:has(.field__suffix) input { padding-right: 34px; }
@media (max-width: 640px) { .cost__row { grid-template-columns: 1fr 1fr; } .cost__name { grid-column: 1 / -1; } }
.toggle { display: flex; gap: 10px; align-items: center; font-size: .9rem; cursor: pointer; }
.toggle input { accent-color: var(--brand); width: 18px; height: 18px; }
.cost__hint { margin: 10px 0 0; font-size: .8rem; color: var(--text-muted); line-height: 1.45; }
.cost__name .tag { display: inline-block; margin: 4px 0 0; }
.bases { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.bases summary { cursor: pointer; font-weight: 600; font-size: .95rem; }
.hints { border-left: 4px solid var(--accent); }
.hints ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 8px; font-size: .9rem; color: var(--text-muted); }

.actions { position: sticky; bottom: 0; z-index: 5; margin-top: 20px; padding: 14px 0; background: linear-gradient(to top, var(--bg) 70%, transparent); display: flex; gap: 12px; align-items: center; justify-content: space-between; }
@media (max-width: 900px) { .actions { bottom: 64px; } }
.actions__total { font-size: .9rem; color: var(--text-muted); }
.actions__total strong { display: block; color: var(--text); font-size: 1.1rem; }

.result { text-align: center; padding: 28px 20px; border-radius: var(--radius); margin-bottom: 16px; }
.result--nachzahlung { background: var(--warn-soft); color: var(--warn); }
.result--guthaben, .result--ausgeglichen { background: var(--ok-soft); color: var(--ok); }
.result__label { font-weight: 700; margin: 0; }
.result__amount { font-size: clamp(2.2rem, 8vw, 3rem); font-weight: 800; letter-spacing: -0.03em; margin: 4px 0 0; line-height: 1.1; }

.buy { border: 2px solid var(--brand); }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.pack { position: relative; display: block; border: 1px solid var(--border); border-radius: 12px; padding: 14px; cursor: pointer; background: var(--surface); }
.pack:has(input:checked) { border-color: var(--brand); background: var(--surface-soft); box-shadow: 0 0 0 3px var(--brand-ring); }
.pack input { position: absolute; opacity: 0; }
.pack__credits { font-weight: 800; font-size: 1.1rem; }
.pack__price { color: var(--text-muted); font-size: .9rem; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; margin-bottom: 12px; cursor: pointer; }
.consent input { margin-top: 3px; accent-color: var(--brand); width: 18px; height: 18px; flex-shrink: 0; }

/* ── Dropzone ──────────────────────────────────────────────────────────── */

.dropzone { border: 2px dashed var(--border); border-radius: 12px; padding: 22px; text-align: center; color: var(--text-muted); background: var(--surface-sunken); transition: border-color .15s, background-color .15s; cursor: pointer; display: block; }
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--surface-soft); }
.dropzone svg { width: 30px; height: 30px; color: var(--brand); }
.dropzone input { display: none; }

/* ── Loading ───────────────────────────────────────────────────────────── */

.spinner { width: 16px; height: 16px; border-radius: 99px; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
[wire\:loading], [wire\:loading\.delay] { display: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
