/* =====================================================
   Dog Education App — CSS v5 (Nav-Fix)
   ===================================================== */

:root {
    --gold:         #c9973e;
    --gold-light:   #f0e2c8;
    --gold-dark:    #7a5820;
    --surface:      #ffffff;
    --surface-alt:  #faf7f2;
    --text:         #1a1a1a;
    --text-sub:     #5c5650;
    --muted:        #8a8278;
    --line:         #e4dbd0;
    --line-mid:     #d5c9b8;
    --danger:       #b42318;
    --danger-bg:    #fff1f2;
    --danger-line:  #fecdd3;
    --success:      #0f6d3c;
    --success-bg:   #ecfdf3;
    --success-line: #c7efd7;
    --info-bg:      #eff6ff;
    --info-text:    #1e40af;
    --r-xl: 28px; --r-lg: 20px; --r-md: 14px; --r-sm: 10px; --r-pill: 999px;
    --shadow-sm: 0 2px 8px rgba(30,20,10,.07);
    --shadow-md: 0 8px 24px rgba(30,20,10,.10);
    --shadow-lg: 0 16px 48px rgba(30,20,10,.13);
    --t: .16s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    /* Hintergrund am html-Element — scrollt NICHT mit */
    background:
        radial-gradient(ellipse at top left, rgba(201,151,62,.13) 0%, transparent 30%),
        linear-gradient(175deg, #f8f4ed 0%, #f0ebe0 100%);
    background-attachment: fixed;
    min-height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: transparent;
    -webkit-font-smoothing: antialiased;
    /* Padding-bottom = Navhöhe + Safe Area — der Browser scrollt darunter */
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 20px));
    min-height: 100vh;
}

body.has-bottom-nav,
body.has-admin-bottom-nav {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 20px));
}

a { color: var(--gold-dark); text-decoration: none; }

a:hover { text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible,
button:focus-visible,
.button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
label:focus-within,
.quick-link:focus-visible,
.bnav-item:focus-visible {
    outline: 3px solid rgba(201,151,62,.35);
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── App-Content: zentrierter Karten-Wrapper ── */
.app-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 16px calc(96px + env(safe-area-inset-bottom, 0px)) 16px;
    min-height: 100vh;
}

.has-bottom-nav .app-wrap,
.has-admin-bottom-nav .app-wrap {
    padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
}


/* ── Weiße Karte (Hauptcontainer der Seite) ── */
.page-card {
    background: rgba(255,255,255,.93);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,.8);
    border-radius: var(--r-xl);
    padding: 24px;
    box-shadow: var(--shadow-lg);
}

.auth-page .page-card { max-width: 1100px; }

/* Auth */
.auth-page .app-wrap { max-width: 1100px; }
.auth-page .page-card { margin-top: 20px; }

/* ── Bottom Nav — wirklich fix am Viewport-Boden ── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    /* Padding für iPhone Home-Indikator */
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(250,248,244,.94);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-top: 1px solid rgba(0,0,0,.07);
    box-shadow: 0 -4px 20px rgba(20,15,8,.08);
    transform: translateY(var(--bottom-nav-keyboard-offset, 0px));
    transition: transform .18s ease, box-shadow var(--t), background var(--t), color var(--t);
    will-change: transform;
}


body.keyboard-open .bottom-nav {
    transform: translateY(calc(100% + env(safe-area-inset-bottom, 0px) + 24px));
    opacity: 0;
    pointer-events: none;
    box-shadow: none;
}

.bnav-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    max-width: 600px;
    margin: 0 auto;
}

.bnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px;
    border-radius: 14px;
    color: #8a7e70;
    text-decoration: none;
    transition: background var(--t), color var(--t);
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.bnav-item:hover { background: rgba(201,151,62,.08); color: var(--gold-dark); }

.bnav-item--on {
    color: var(--gold-dark);
    background: rgba(201,151,62,.1);
}

.bnav-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.bnav-item--on .bnav-icon { stroke-width: 2.2; }

.bnav-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1;
}

/* ── Typography ── */
.kicker, .brand-kicker, .section-kicker {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold-dark);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-top: 5px; }
h2 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; }
h3 { font-size: 1rem; font-weight: 700; }
p  { line-height: 1.65; margin-top: 6px; }
.text-muted { color: var(--text-sub); font-size: .93rem; }
.consent-title { color: var(--text); font-weight: 700; }
.consent-text { color: var(--text-sub); font-size: .93rem; }

.screen-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }

/* ── Alerts ── */
.alert { border-radius: var(--r-md); padding: 13px 15px; margin: 12px 0 0; border: 1px solid transparent; font-size: .94rem; line-height: 1.5; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: var(--success-line); }
.alert-error   { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-line); }

/* ── Panels ── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm); }
.panel + .panel, .panel + .hero-card, .hero-card + .panel { margin-top: 14px; }
.panel-narrow { max-width: 640px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }

/* ── Hero card ── */
.hero-card { border-radius: var(--r-lg); padding: 22px; background: linear-gradient(160deg,#fff 0%,#faf6ef 100%); border: 1px solid var(--line); box-shadow: var(--shadow-sm); margin-bottom: 14px; }
.hero-card-dark {
    background: radial-gradient(ellipse at top right,rgba(201,151,62,.25) 0%,transparent 35%), linear-gradient(160deg,#1c1812 0%,#252118 100%);
    border-color: rgba(255,255,255,.06); color: #fff;
}
.hero-card__eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .72; }
.hero-card__value { font-size: clamp(3rem,8vw,4.5rem); font-weight: 800; letter-spacing: -.06em; line-height: .95; margin-top: 10px; }
.hero-card__subline { margin-top: 6px; font-size: .97rem; opacity: .78; }
.hero-card__footer { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.compact-hero { margin-bottom: 0; }

/* ── Pills ── */
.pill, .text-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; }
.pill-gold { background: var(--gold-light); color: var(--gold-dark); }
.text-chip { background: rgba(255,255,255,.12); color: rgba(255,255,255,.88); border: 1px solid rgba(255,255,255,.14); }

/* ── Grids ── */
.stats-grid  { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; margin-bottom: 14px; }
.admin-grid  { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 14px; margin-bottom: 14px; }
.quick-grid  { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 10px; }
.quick-grid-single { grid-template-columns: 1fr; }

/* ── Quick links ── */
.quick-link { display: block; border-radius: var(--r-md); padding: 14px; background: linear-gradient(160deg,#fdfaf5 0%,#f7f2e8 100%); border: 1px solid var(--line); color: var(--text); transition: transform var(--t), box-shadow var(--t); }
.quick-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.quick-link__title { display: block; font-weight: 700; font-size: .95rem; }
.quick-link__text  { display: block; margin-top: 4px; color: var(--text-sub); font-size: .86rem; line-height: 1.4; }
.quick-link-muted  { background: linear-gradient(160deg,#f7f7f5 0%,#f2f2f0 100%); }
.quick-link-with-icon { display: flex; align-items: center; gap: 12px; }
.quick-link__icon { width: 42px; height: 42px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: rgba(201,151,62,.12); color: var(--gold-dark); border: 1px solid rgba(201,151,62,.18); flex-shrink: 0; }
.quick-link-muted .quick-link__icon { background: rgba(120,120,110,.08); color: var(--text-sub); border-color: rgba(120,120,110,.12); }
.quick-link__icon svg { width: 20px; height: 20px; }
.quick-link__content { min-width: 0; }

/* ── Info boxes ── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); gap: 9px; margin-top: 14px; }
.info-box { border-radius: var(--r-sm); padding: 13px; background: var(--surface-alt); border: 1px solid var(--line); }
.info-box__value { margin-top: 4px; font-size: 1.5rem; font-weight: 800; letter-spacing: -.04em; }

/* ── Labels / mini values ── */
.panel-label, .mini-label { color: var(--muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.mini-value { margin-top: 4px; font-size: 1.1rem; font-weight: 700; letter-spacing: -.02em; }
.split-info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.stat-panel { background: linear-gradient(160deg,#fff 0%,#faf7f2 100%); }
.stat-value { margin-top: 6px; font-size: 2rem; font-weight: 800; letter-spacing: -.05em; }

/* ── Detail rows ── */
.detail-list { display: grid; }
.detail-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.detail-row:last-child { border-bottom: none; padding-bottom: 0; }
.detail-row span { color: var(--text-sub); }

/* ── Helper boxes ── */
.helper-box { border-radius: var(--r-md); padding: 13px 15px; background: #faf3e2; border: 1px solid #e8d9af; color: #5a4218; font-size: .92rem; line-height: 1.5; }
.helper-box-soft { background: var(--surface-alt); border-color: var(--line); color: var(--text-sub); }
.helper-box-inline { margin-top: 14px; }
.helper-box strong { display: block; font-weight: 700; margin-bottom: 2px; }

/* ── Buttons ── */
button, .button {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 12px 18px; border: none; border-radius: var(--r-md);
    background: var(--gold); color: #fff; font-size: .96rem; font-weight: 700;
    cursor: pointer; text-decoration: none; letter-spacing: .01em;
    transition: transform var(--t), background var(--t), box-shadow var(--t);
    box-shadow: 0 1px 3px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.15);
    -webkit-tap-highlight-color: transparent;
}
button:hover, .button:hover { background: #b5842e; transform: translateY(-1px); box-shadow: 0 5px 16px rgba(201,151,62,.28); }
button:active, .button:active { transform: translateY(0); }
.button-secondary { background: var(--surface-alt); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.button-secondary:hover { background: #eee8de; box-shadow: none; }
.button-danger { background: var(--danger); color: #fff; }
.button-danger:hover { background: #9d1e14; }
.button-small { padding: 8px 12px; font-size: .84rem; border-radius: var(--r-sm); }
.button-full { width: 100%; }
button[disabled], .button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.action-inline { white-space: nowrap; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }

/* ── Forms ── */
.form { display: grid; gap: 14px; margin-top: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-spaced { margin-top: 18px; }

label { display: block; font-size: .87rem; font-weight: 700; color: var(--text); margin-bottom: 5px; }

input[type="text"], input[type="email"], input[type="password"],
input[type="date"], input[type="number"], select, textarea {
    width: 100%; padding: 12px 13px; border-radius: var(--r-md);
    border: 1.5px solid var(--line-mid); background: #fff;
    font-size: .96rem; color: var(--text); outline: none;
    transition: border-color var(--t), box-shadow var(--t);
    appearance: none; -webkit-appearance: none;
    font-family: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,151,62,.14); }
.required-star, label .required-star, legend .required-star, .choice-control__title .required-star { color: #c9973e !important; margin-left: 4px; font-weight: 800; display: inline-block; line-height: 1; }
[hidden] { display: none !important; }
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a8278' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center; padding-right: 34px; cursor: pointer;
}
.form-footer-note { margin-top: 16px; font-size: .89rem; color: var(--text-sub); }
.legal-note { margin-top: 14px; font-size: .84rem; color: var(--text-sub); line-height: 1.5; }
.legal-note a { font-weight: 700; }
.legal-note--tight { margin-top: 10px; }
.legal-note--compact { margin-top: 8px; font-size: .8rem; }
.legal-note--panel { margin-top: 16px; }
.search-form { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-bottom: 14px; }

.field-help { margin-top: 6px; font-size: .84rem; color: var(--muted); line-height: 1.45; }
.fieldset-reset { margin: 0; padding: 0; border: 0; min-width: 0; }
.legend-label { display: block; font-size: .87rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.choice-list { display: flex; flex-direction: column; gap: 10px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice-control {
    position: relative;
    display: block;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.choice-control input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
.choice-control__box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 52px;
    padding: 12px 14px;
    border: 1.5px solid var(--line-mid);
    border-radius: var(--r-md);
    background: #fff;
    transition: border-color var(--t), box-shadow var(--t), background var(--t), transform var(--t);
}
.choice-control__box::before {
    content: '';
    width: 20px;
    height: 20px;
    margin-top: 1px;
    flex-shrink: 0;
    border: 2px solid var(--line-mid);
    background: #fff;
    transition: inherit;
}
.choice-control--checkbox .choice-control__box::before { border-radius: 6px; }
.choice-control--radio .choice-control__box::before { border-radius: 50%; }
.choice-control__title { display: block; font-size: .93rem; font-weight: 600; line-height: 1.45; color: var(--text); }
.choice-control__text { display: block; margin-top: 3px; font-size: .84rem; color: var(--text-sub); line-height: 1.45; font-weight: 400; }
.choice-control:hover .choice-control__box {
    border-color: var(--gold);
    box-shadow: 0 4px 14px rgba(201,151,62,.08);
}
.choice-control input:checked + .choice-control__box {
    border-color: var(--gold);
    background: var(--gold-light);
    box-shadow: 0 0 0 3px rgba(201,151,62,.14);
}
.choice-control--checkbox input:checked + .choice-control__box::before {
    border-color: var(--gold);
    background: var(--gold);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 6l2.2 2.2L10 2.5' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}
.choice-control--radio input:checked + .choice-control__box::before {
    border-color: var(--gold);
    box-shadow: inset 0 0 0 5px var(--gold);
}
.choice-control--danger input:checked + .choice-control__box {
    border-color: var(--danger);
    background: #fff6f7;
    box-shadow: 0 0 0 3px rgba(180,35,24,.10);
}
.choice-control--danger input:checked + .choice-control__box::before {
    border-color: var(--danger);
    background-color: var(--danger);
}
.choice-control input:focus-visible + .choice-control__box {
    outline: 3px solid rgba(201,151,62,.28);
    outline-offset: 3px;
}
.profile-step {
    padding: 0;
    overflow: hidden;
}
.profile-step > summary { list-style: none; }
.profile-step > summary::-webkit-details-marker { display: none; }
.profile-step__summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
    padding: 18px 18px 14px;
}
.profile-step__summary h2 { margin: 0; font-size: 1.05rem; }
.profile-step__summary .text-muted { margin: 4px 0 0; }
.profile-step__chevron {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--surface-alt);
    color: var(--text-sub);
    border: 1px solid var(--line);
    transition: transform var(--t), background var(--t), color var(--t);
}
.profile-step__chevron svg { width: 18px; height: 18px; }
.profile-step[open] > .profile-step__summary .profile-step__chevron {
    transform: rotate(180deg);
    background: var(--gold-light);
    color: var(--gold-dark);
}
.dog-card-panel[open] > .dog-card-panel__summary .profile-step__chevron {
    transform: rotate(180deg);
    background: var(--gold-light);
    color: var(--gold-dark);
}
.profile-step__body { padding: 0 18px 18px; }
.profile-step--accent {
    border: 1px solid rgba(201,151,62,.45);
    background: linear-gradient(180deg, rgba(240,226,200,.32), #fff 24%);
    box-shadow: 0 8px 22px rgba(122,88,32,.06);
}
.profile-step--accent .profile-step__summary {
    border-bottom: 1px solid rgba(201,151,62,.18);
}
.profile-step--accent .profile-step__summary h2 {
    color: var(--gold-dark);
}
.submit-bar { display: grid; gap: 10px; margin-top: 18px; }
.submit-note { font-size: .84rem; color: var(--muted); text-align: center; line-height: 1.45; }
@media (max-width: 680px) {
    .choice-grid { grid-template-columns: 1fr; }
    .request-amount-grid { grid-template-columns: 1fr; }
}

/* ── Tables ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; margin-top: 6px; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 700px; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid #f0e8da; }
.data-table thead th { position: sticky; top: 0; z-index: 1; background: #faf5ec; color: var(--text-sub); font-size: .76rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.data-table tbody tr:hover td { background: #faf3e8; }
.data-table tbody tr:last-child td { border-bottom: none; }

.table-tag { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: var(--r-pill); background: var(--gold-light); color: var(--gold-dark); font-size: 11px; font-weight: 700; white-space: nowrap; }
.delta-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 86px; padding: 5px 10px; border-radius: var(--r-pill); font-size: 11px; font-weight: 800; }
.delta-negative { background: #fef2e0; color: #7a5820; }
.delta-positive { background: #dcfce7; color: #166534; }

/* ── Auth layout ── */
.auth-shell { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 18px; align-items: stretch; }
.auth-brand-card, .auth-form-card { border-radius: var(--r-lg); padding: 28px; border: 1px solid var(--line); }
.auth-brand-card { background: radial-gradient(ellipse at top right,rgba(201,151,62,.22) 0%,transparent 30%), linear-gradient(160deg,#1a1611 0%,#242018 100%); color: #fff; border-color: rgba(255,255,255,.05); }
.auth-brand-card .kicker, .auth-brand-card .brand-kicker, .auth-brand-card .text-muted { color: rgba(255,255,255,.62); }
.auth-brand-card--admin { background: radial-gradient(ellipse at top right,rgba(201,151,62,.15) 0%,transparent 25%), linear-gradient(160deg,#111 0%,#1c1c1c 100%); }
.auth-form-card { background: var(--surface); }
.auth-form-card h2 { margin-top: 6px; }
.brand-logo { width: 90px; height: auto; display: block; margin-bottom: 18px; }
.hero-copy { font-size: .98rem; color: rgba(255,255,255,.78); line-height: 1.65; margin-top: 8px; }
.feature-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.feature-chip { padding: 7px 12px; border-radius: var(--r-pill); background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.09); font-size: .86rem; color: rgba(255,255,255,.83); }

/* ── Admin topbar ── */
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.admin-topbar__group { display: flex; gap: 7px; flex-wrap: wrap; }
.admin-pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 15px; border-radius: var(--r-pill); background: var(--surface-alt); border: 1px solid var(--line); color: var(--text-sub); font-size: .87rem; font-weight: 700; text-decoration: none; transition: background var(--t), color var(--t), border-color var(--t); }
.admin-pill svg { width: 16px; height: 16px; flex-shrink: 0; }
.admin-pill:hover { background: #eee8de; color: var(--text); border-color: var(--line-mid); }
.admin-pill.active { background: var(--gold); border-color: var(--gold); color: #fff; }

.admin-bottom-nav { z-index: 1100; }
.admin-bottom-nav .bnav-inner { max-width: 620px; }
.admin-bottom-nav .bnav-item { gap: 4px; padding: 8px 3px; }
.admin-bottom-nav .bnav-label { font-size: 10px; }
.admin-bottom-nav .bnav-icon { width: 22px; height: 22px; }
.admin-bnav-inner { grid-template-columns: repeat(5, 1fr); }

.admin-dashboard-summary { display: grid; gap: 14px; }
.admin-dashboard-summary__section { display: grid; gap: 12px; padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); }
.admin-dashboard-summary__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.section-head--tight { margin-bottom: 0; }
.admin-dashboard-summary__grid .dash-tile { min-width: 0; }
.admin-dashboard-summary__grid .dash-tile__label { font-size: .82rem; }
.admin-dashboard-summary__grid .dash-tile__main { font-size: 1.32rem; line-height: 1.15; }
.admin-dashboard-summary__grid .dash-tile__sub { font-size: .72rem; }
.admin-dashboard-summary__section .section-head { margin-bottom: 0; }
.admin-dashboard-summary__grid .dash-tile { align-items: center; text-align: center; }
.admin-dashboard-summary__grid .dash-tile__label,
.admin-dashboard-summary__grid .dash-tile__sub { width: 100%; }

/* ── Booking card list (Historie) ── */
.month-divider { padding: 6px 0 4px; display: flex; align-items: center; gap: 10px; }
.month-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.month-divider span { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

.booking-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; margin-top: 7px; display: flex; align-items: flex-start; gap: 12px; transition: transform var(--t), box-shadow var(--t), border-color var(--t); }
.booking-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: var(--line-mid); }
.history-sections { display: grid; gap: 18px; }
.history-section { background: transparent; border: 0; border-radius: 0; padding: 0; }
.history-section__list { display: grid; gap: 14px; position: relative; }

.bc-icon { width: 42px; height: 42px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.03); }
.bc-icon svg { width: 18px; height: 18px; }
.bc-icon.checkin { background: #fef3c7; color: #b45309; }
.bc-icon.kauf    { background: #dcfce7; color: #166534; }
.bc-icon.korr    { background: #dbeafe; color: #1d4ed8; }
.bc-icon.storno  { background: var(--danger-bg); color: var(--danger); }

.bc-body { flex: 1; min-width: 0; }
.bc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bc-title { font-size: 15px; font-weight: 800; line-height: 1.25; color: #111111; }
.bc-date  { font-size: 11px; color: var(--muted); margin-top: 2px; }
.bc-sub   { display: flex; align-items: center; gap: 5px; margin-top: 4px; flex-wrap: wrap; }
.bc-tag   { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: var(--r-pill); background: var(--gold-light); color: var(--gold-dark); }
.bc-tag.blue { background: var(--info-bg); color: var(--info-text); }
.bc-hint  { font-size: 11px; color: var(--muted); }
.bc-meta-line { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.bc-footer-line { margin-top: 10px; display: flex; justify-content: flex-start; }
.bc-date-badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: var(--r-pill); background: rgba(201,151,62,.08); color: var(--text-sub); font-size: 11px; font-weight: 600; }

.bc-right { text-align: right; flex-shrink: 0; }
.delta { font-size: 11px; font-weight: 800; padding: 6px 10px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; line-height: 1.2; }
.delta.neg { background: #fef3c7; color: #b45309; }
.delta.pos { background: #dcfce7; color: #166534; }
.delta.adj { background: #dbeafe; color: #1d4ed8; }
.delta.rest { background: #f3f4f6; color: #6b7280; }

.history-timeline-item { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 14px; align-items: stretch; }
.history-timeline-item__line { position: relative; display: flex; justify-content: center; }
.history-timeline-item__line::before { content: ''; position: absolute; top: 0; bottom: -14px; left: 50%; width: 1px; transform: translateX(-50%); background: linear-gradient(180deg, rgba(212,201,185,.85) 0%, rgba(228,219,208,.35) 100%); }
.history-section__list .history-timeline-item:last-child .history-timeline-item__line::before { bottom: 22px; }
.history-timeline-item__dot { position: relative; z-index: 1; display: block; width: 12px; height: 12px; margin-top: 18px; border-radius: 999px; border: 2px solid rgba(255,255,255,.95); box-shadow: 0 0 0 3px rgba(255,255,255,.65); }
.history-timeline-item__dot.checkin { background: #b45309; }
.history-timeline-item__dot.kauf { background: #166534; }
.history-timeline-item__dot.korr { background: #1d4ed8; }
.history-timeline-item__dot.storno { background: var(--danger); }

.history-timeline-card { background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-sm); overflow: hidden; }
.history-timeline-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; width: 100%; }
.history-timeline-card__head-main { display: flex; align-items: flex-start; gap: 12px; min-width: 0; flex: 1; }
.history-timeline-card__head-main > div:last-child { min-width: 0; }
.history-timeline-copy { min-width: 0; }
.history-timeline-card__date { margin-top: 4px; font-size: 12px; font-weight: 400; color: #6b7280; }
.history-timeline-card__context { margin-top: 3px; font-size: 12px; font-weight: 400; color: #6b7280; line-height: 1.45; }
.history-timeline-card__subtitle { margin-top: 4px; font-size: 13px; color: var(--text-sub); line-height: 1.5; }
.history-timeline-card__compact-meta { display: none; }
.history-timeline-card__side { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.history-meta-grid { margin-top: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.history-meta-item { padding: 10px 11px; border-radius: 15px; background: #fff; border: 1px solid var(--line); min-width: 0; }
.history-details[open] .history-timeline-card { background: #fff; }
.history-meta-item__label { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.history-meta-item__value { font-size: 13px; color: var(--text); line-height: 1.45; word-break: break-word; }
.history-details { margin-top: 0; }
.history-details__summary {
    display: block;
    cursor: pointer;
    list-style: none;
    color: var(--text-sub);
    padding: 14px 16px 8px;
}
.history-details__summary::-webkit-details-marker { display: none; }
.history-details__chevron {
    width: 100%;
    height: 18px;
    margin: 8px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #9ca3af;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
}
.history-details__chevron svg {
    width: 14px;
    height: 14px;
    margin-top: -1px;
}
.history-details[open] .history-details__chevron {
    transform: rotate(180deg);
}
.history-details__body { display: block; padding: 0 16px 16px; }

/* ── Summary strip ── */
.summary-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-bottom: 14px; }
.sum-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 11px 13px; }
.sum-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.sum-value { font-size: 1.5rem; font-weight: 800; letter-spacing: -.04em; margin-top: 2px; }
.sum-value.pos { color: #166534; }
.sum-value.neg { color: var(--gold-dark); }
.sum-value.neutral { color: var(--text); }

/* ── Filter chips ── */
.filter-row { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.filter-chip { display: inline-flex; align-items: center; justify-content: center; padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 600; color: var(--text-sub); cursor: pointer; transition: all var(--t); white-space: nowrap; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; box-shadow: none; appearance: none; font-family: inherit; line-height: 1.2; }
.filter-chip:hover { background: var(--gold-light); border-color: var(--gold); color: var(--gold-dark); }
.filter-chip.active { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .app-wrap { padding: 12px 12px 0; }
    .has-bottom-nav .app-wrap,
    .has-admin-bottom-nav .app-wrap { padding: 12px 12px calc(104px + env(safe-area-inset-bottom, 0px)); }
    .page-card { border-radius: var(--r-lg); padding: 16px; }
    .form-grid, .split-info, .search-form { grid-template-columns: 1fr; }
    .data-table { min-width: 640px; }
    .admin-topbar { flex-direction: column; align-items: stretch; }
    .admin-topbar .admin-pill { justify-content: center; }
    .admin-bottom-nav { padding-left: 8px; padding-right: 8px; }
    .admin-bottom-nav .bnav-inner { max-width: none; gap: 2px; }
    .admin-bottom-nav .bnav-item { padding: 7px 2px; }
    .admin-bottom-nav .bnav-label { font-size: 9px; }
    .admin-bottom-nav .bnav-icon { width: 20px; height: 20px; }
    .admin-dashboard-summary__grid { gap: 8px; }
    .admin-dashboard-summary__grid .dash-tile { padding: 10px 10px; border-radius: 16px; }
    .admin-dashboard-summary__grid .dash-tile__label { font-size: .75rem; }
    .admin-dashboard-summary__grid .dash-tile__main { font-size: 1.06rem; }
    .admin-dashboard-summary__grid .dash-tile__sub { font-size: .66rem; line-height: 1.25; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .summary-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
    .sum-card { padding: 10px 10px; min-width: 0; }
    .sum-label { font-size: 9px; letter-spacing: .05em; }
    .sum-value { font-size: 1.2rem; }
    
    .filter-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
        margin-right: -2px;
    }
    .filter-row::-webkit-scrollbar { display: none; }
    .history-timeline-item { grid-template-columns: 12px minmax(0,1fr); gap: 8px; }
    .history-timeline-card { border-radius: 18px; }
    .history-timeline-card__head { gap: 10px; }
    .history-timeline-card__head-main { gap: 10px; }
    .history-timeline-card__date { font-size: 11px; }
    .history-timeline-card__context { font-size: 11px; }
    .history-details__summary { padding: 12px 12px 8px; }
    .history-details__chevron { height: 16px; margin-top: 7px; }
    .history-details__chevron svg { width: 13px; height: 13px; }
    .history-details__body { padding: 0 12px 12px; }
    .history-timeline-item__dot { margin-top: 16px; }
    .history-meta-grid { grid-template-columns: 1fr; gap: 8px; }
    .history-meta-item { padding: 9px 10px; border-radius: 13px; }
    .bc-icon { width: 36px; height: 36px; border-radius: 12px; }
    .bc-icon svg { width: 16px; height: 16px; }
    .history-timeline-card__side { gap: 5px; }
    .history-timeline-card__side .delta { width: auto; text-align: center; padding: 5px 8px; font-size: 11px; }
    .history-timeline-card__side .delta.rest { padding: 5px 8px; }
    .profile-step__summary { padding: 16px 16px 12px; }
    .profile-step__body { padding: 0 16px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}


/* ── Dashboard Stat-Kacheln ── */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.dash-tile {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 88px;
}

.dash-tile__label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--muted);
    margin-bottom: 6px;
}

.dash-tile__main {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
    word-break: break-word;
}

.dash-tile__main--big {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1;
}

.dash-tile__sub {
    font-size: .78rem;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.3;
}

/* Schmal: 1 Spalte, horizontal */
@media (max-width: 400px) {
    .dash-stats {
        grid-template-columns: 1fr;
    }
    .dash-tile {
        flex-direction: row;
        align-items: center;
        min-height: unset;
        gap: 12px;
        padding: 12px 14px;
    }
    .dash-tile__label {
        min-width: 110px;
        flex-shrink: 0;
        margin-bottom: 0;
    }
    .dash-tile__main {
        flex: 1;
    }
    .dash-tile__main--big {
        font-size: 1.4rem;
    }
    .dash-tile__sub {
        display: none;
    }
}

/* ── Check-in Erfolgsseite ── */
.checkin-success-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    min-height: 60vh;
    gap: 12px;
}

.checkin-success-icon-big {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--success-bg);
    border: 3px solid var(--success-line);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    animation: pop-in .35s cubic-bezier(.34,1.56,.64,1) both;
}

.checkin-success-icon-big svg {
    width: 44px;
    height: 44px;
    stroke: var(--success);
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: draw-check .4s .2s ease forwards;
}

@keyframes pop-in {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

@keyframes draw-check {
    to { stroke-dashoffset: 0; }
}

.checkin-success-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--success);
    margin: 0;
}

.checkin-success-location {
    font-size: .95rem;
    color: var(--muted);
    margin: 0;
}

.checkin-success-units {
    font-size: 1rem;
    color: var(--text-sub);
    margin: 4px 0 0;
}

.checkin-success-home {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    color: var(--text-sub);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--t);
}

.checkin-success-home:hover {
    background: var(--bg-2);
    color: var(--text);
}

/* ── Enhanced form UX ── */
.hidden { display: none !important; }
.field-group { position: relative; }
.field-group.is-invalid input,
.field-group.is-invalid select,
.field-group.is-invalid textarea,
.field-group.is-invalid .choice-control__box,
.field-group.is-invalid .choice-grid {
    border-color: var(--danger-line) !important;
}
.field-group.is-invalid input,
.field-group.is-invalid select,
.field-group.is-invalid textarea {
    box-shadow: 0 0 0 3px rgba(180, 35, 24, .1) !important;
}
.field-error {
    margin-top: 6px;
    font-size: .84rem;
    line-height: 1.4;
    color: var(--danger);
    font-weight: 600;
}
.field-group .field-error.hidden { display: none; }
.request-amount-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.request-amount-card .choice-control__box {
    min-height: 88px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}
.request-amount-card .choice-control__box::before {
    margin-top: 0;
}
.request-amount-card .choice-control__title {
    font-size: 1.08rem;
    line-height: 1.2;
}
.request-amount-card .choice-control__text { display: none; }

.sticky-submit-bar {
    position: static;
    z-index: auto;
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    background: rgba(255,255,255,.96);
    box-shadow: var(--shadow-md);
    margin-top: 18px;
}
.request-amount-submit {
    margin-top: 4px;
}
.request-amount-submit .legend-label {
    display: block;
}
.submit-status-title {
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: -.01em;
}
.progress-head {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
}
.progress-count {
    min-width: 70px;
    text-align: right;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gold-dark);
    letter-spacing: -.04em;
}
.progress-track {
    width: 100%;
    height: 10px;
    background: #efe7da;
    border-radius: var(--r-pill);
    overflow: hidden;
    margin-top: 12px;
}
.progress-track span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--gold), #e1b86a);
    border-radius: inherit;
    transition: width var(--t);
}
.progress-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.progress-step {
    padding: 10px 12px;
    border-radius: var(--r-md);
    background: var(--surface-alt);
    border: 1px solid var(--line);
    font-size: .82rem;
    font-weight: 700;
    color: var(--text-sub);
}
.progress-step.is-done {
    background: var(--success-bg);
    border-color: var(--success-line);
    color: var(--success);
}
.request-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.request-steps-note {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}
.request-step-note {
    padding: 12px 14px;
    border-radius: var(--r-md);
    background: var(--surface-alt);
    border: 1px solid var(--line);
    font-size: .88rem;
    color: var(--text-sub);
    line-height: 1.45;
}
.request-step-note strong {
    color: var(--text);
    margin-right: 4px;
}
.choice-control__title a { text-decoration: underline; }
.choice-control__title a:hover { color: var(--text); }
.inline-stat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.scan-help-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.scan-help-card {
    padding: 14px;
    border-radius: var(--r-md);
    background: var(--surface);
    border: 1px solid var(--line);
}
.scan-help-card strong {
    display: block;
    margin-bottom: 4px;
}
.manual-token-panel {
    margin-top: 14px;
    padding: 14px;
    border-radius: var(--r-md);
    background: var(--surface-alt);
    border: 1px solid var(--line);
}
.qr-scanner-shell {
    display: grid;
    gap: 12px;
}
.qr-scanner-preview {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    background: #000;
    aspect-ratio: 4 / 3;
}
.qr-scanner-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.qr-scanner-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.qr-scanner-overlay::before {
    content: '';
    position: absolute;
    inset: 12%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 18px;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.22);
}
.qr-scanner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.qr-scanner-actions .button {
    flex: 1 1 220px;
}
.qr-scanner-status {
    margin: 0;
}
.checkin-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.checkin-status-card {
    padding: 14px;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    background: var(--surface-alt);
}
.checkin-status-card strong {
    display: block;
    margin-bottom: 4px;
}
.checkin-success-next {
    margin-top: 6px;
    font-size: .92rem;
    color: var(--muted);
}
@media (max-width: 680px) {
    .sticky-submit-bar {
        bottom: calc(78px + env(safe-area-inset-bottom, 14px));
        padding: 12px;
    }
    .progress-head,
    .request-summary-grid,
    .request-steps-note,
    .scan-help-grid,
    .checkin-status-grid,
    .progress-steps {
        grid-template-columns: 1fr;
    }
    .qr-scanner-actions {
        flex-direction: column;
    }
    .progress-count {
        text-align: left;
        min-width: 0;
    }
}


/* ── Premium polish v5 ── */
.page-card,
.panel,
.quick-link,
.dash-tile,
.info-box,
.sum-card,
.choice-control__box,
.button,
button {
    animation: surface-in .28s ease both;
}

@keyframes surface-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.admin-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-hero-card { overflow: hidden; }
.admin-hero-grid { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.admin-hero-actions { margin-top: 0; }
.admin-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.admin-kpi-inline { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.stack-list { display: grid; gap: 10px; }
.compact-list { display: grid; gap: 10px; }
.compact-list--dense { gap: 8px; }
.compact-list__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.compact-list__item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    border-color: var(--line-mid);
    text-decoration: none;
}
.compact-list__item--static:hover { transform: none; }
.compact-list__aside { text-align: right; }
.compact-list__meta { margin-top: 4px; font-size: .82rem; color: var(--muted); }
.premium-hero-card { position: relative; overflow: hidden; }
.premium-hero-card::after,
.admin-hero-card::after {
    content: '';
    position: absolute;
    inset: auto -40px -40px auto;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
    pointer-events: none;
}
.premium-next-step-panel {
    background: linear-gradient(160deg,#fff 0%,#fbf7f0 100%);
    border-color: #eadcc6;
}
.request-intro-box { margin-top: 0; }
.section-jump-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.section-jump-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: var(--r-pill);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text-sub);
    font-size: .84rem;
    font-weight: 700;
    text-decoration: none;
}
.section-jump-nav a:hover {
    background: var(--gold-light);
    border-color: var(--gold);
    color: var(--gold-dark);
    text-decoration: none;
}
.history-search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 12px;
}
.request-summary-panel,
.request-progress-panel,
.premium-next-step-panel,
.admin-hero-card {
    scroll-margin-top: 16px;
}

@media (max-width: 900px) {
    .admin-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .history-search-row,
    .admin-hero-grid { grid-template-columns: 1fr; }
    .history-search-row { grid-template-columns: 1fr; }
    .compact-list__item,
    .compact-list__aside { text-align: left; }
    .compact-list__item { align-items: flex-start; }
    .compact-list__aside { width: 100%; }
    .section-jump-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ── Admin UX polish v7 ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: var(--r-pill);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.status-badge.is-success { background: #dcfce7; color: #166534; }
.status-badge.is-warn { background: #fef3c7; color: #92400e; }
.status-badge.is-danger { background: #fee2e2; color: #991b1b; }
.admin-customer-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.table-cell-stack { display: grid; gap: 4px; }
.customer-meta-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.customer-table-desktop { display: block; }
.mobile-customer-list { display: none; }
.mobile-customer-card {
    display: block;
    padding: 10px 12px;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    margin-top: 8px;
    box-shadow: var(--shadow-sm);
}
.mobile-customer-card:hover { text-decoration: none; }
.mobile-customer-card--compact {
    padding: 9px 10px;
    border-radius: 14px;
}
.mobile-customer-card__line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}
.mobile-customer-card__line + .mobile-customer-card__line {
    margin-top: 6px;
}
.mobile-customer-card__line--top {
    margin-bottom: 2px;
}
.mobile-customer-card__holder,
.mobile-customer-card__dog,
.mobile-customer-card__validity {
    min-width: 0;
    overflow-wrap: anywhere;
}
.mobile-customer-card__holder {
    font-size: .9rem;
    line-height: 1.2;
    color: var(--text);
}
.mobile-customer-card__dog {
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-sub);
    text-align: right;
}
.mobile-customer-card__validity {
    font-size: .76rem;
    line-height: 1.25;
    color: var(--text-sub);
}
.mobile-customer-card__amount-badge {
    flex-shrink: 0;
}
@media (max-width: 860px) {
    .admin-customer-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .customer-table-desktop { display: none; }
    .mobile-customer-list { display: block; }
    .status-badge { padding: 4px 8px; font-size: 10px; }
}
@media (max-width: 680px) {
    .admin-customer-stats { grid-template-columns: 1fr; }
}


.customer-name-link {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}
.customer-name-link:hover,
.customer-name-link:focus-visible {
    color: var(--gold-dark);
    text-decoration: underline;
}
@media (max-width: 680px) {
    .history-section { padding: 0 0 10px; }
    .bc-top { flex-direction: column; }
    .bc-right { text-align: left; }
}


/* ── PWA / App-ähnliche Installation ── */
.pwa-install-sheet {
    position: fixed;
    left: max(16px, env(safe-area-inset-left));
    right: max(16px, env(safe-area-inset-right));
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 90;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border-radius: 24px;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(18,18,20,.96);
    color: #fff;
    box-shadow: 0 18px 44px rgba(0,0,0,.22);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    backdrop-filter: blur(12px);
}
.pwa-install-sheet.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.pwa-install-sheet__icon img {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: block;
    box-shadow: 0 8px 18px rgba(0,0,0,.22);
}
.pwa-install-sheet__body {
    min-width: 0;
}
.pwa-install-sheet__body strong {
    display: block;
    font-size: .98rem;
    line-height: 1.3;
    margin-bottom: 4px;
}
.pwa-install-sheet__body p {
    margin: 0;
    color: rgba(255,255,255,.82);
    font-size: .88rem;
    line-height: 1.5;
}
.pwa-install-sheet__actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
}
.pwa-install-sheet__actions .button,
.pwa-install-sheet__actions .button-secondary {
    flex: 1;
    justify-content: center;
}
.pwa-install-sheet__actions .button-secondary {
    background: rgba(255,255,255,.08);
    color: #fff;
    border-color: rgba(255,255,255,.14);
}

@media (min-width: 721px) {
    .pwa-install-sheet {
        left: auto;
        right: 24px;
        bottom: 24px;
        width: min(420px, calc(100vw - 48px));
    }
}

@media (max-width: 680px) {
    .pwa-install-sheet {
        bottom: calc(88px + env(safe-area-inset-bottom));
        border-radius: 22px;
        padding: 14px;
    }
    .pwa-install-sheet__icon img {
        width: 52px;
        height: 52px;
        border-radius: 15px;
    }
}


.auth-remember-simple { display: inline-flex; align-items: center; gap: 10px; margin-top: .35rem; font-size: .95rem; font-weight: 600; color: var(--text); cursor: pointer; }
.auth-remember-simple input { width: 18px; height: 18px; margin: 0; accent-color: var(--gold-dark); }
.auth-remember-note { margin: -4px 0 0; font-size: .84rem; color: var(--text-sub); }
.dashboard-history-list { gap: 10px; }
.history-timeline-item--plain .history-timeline-item__line::before { bottom: -10px; }
.dashboard-history-list .history-timeline-item:last-child .history-timeline-item__line::before { bottom: 18px; }


/* ── Install guide on dashboard ── */
.install-guide-step { border: 1px solid var(--line); border-radius: var(--r-lg); background: linear-gradient(160deg,#fff 0%,#fbf7f0 100%); }
.install-guide-step .profile-step__summary { padding-bottom: 16px; }
.install-guide-intro { margin: 0 0 12px; color: var(--text); line-height: 1.55; }
.install-guide-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; color: var(--text-sub); line-height: 1.55; }
.install-guide-steps li { padding-left: 2px; }
.install-guide-actions { margin-top: 14px; }
.pwa-guide-status { margin-bottom: 12px; }

@media (max-width: 680px) {
    .install-guide-step .profile-step__summary { padding: 16px 16px 12px; }
    .install-guide-step .profile-step__body { padding: 0 16px 16px; }
}

.dashboard-top-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.dashboard-top-stat { min-height: 0; padding: 11px 13px; display: flex; flex-direction: row; align-items: baseline; justify-content: space-between; gap: 12px; }
.dashboard-top-stat .dash-tile__label { font-size: .9rem; margin: 0; text-transform: none; letter-spacing: 0; color: var(--text-sub); line-height: 1.25; }
.dashboard-top-stat .dash-tile__main { font-size: .9rem; line-height: 1.25; min-height: 0; display: block; text-align: right; white-space: nowrap; flex-shrink: 0; }
.dashboard-top-stat .dash-tile__sub { display: none; }
.dashboard-hero-card { margin-bottom: 14px; }
.dashboard-hero-grid { display: grid; gap: 18px; align-items: stretch; grid-template-columns: minmax(0, 1fr); }
.dashboard-hero-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dashboard-hero-copy h2 { margin: 0 0 6px; font-size: clamp(1.2rem, 3vw, 1.65rem); }
.dashboard-hero-copy p { margin: 0; color: rgba(255,255,255,.78); line-height: 1.6; max-width: 54ch; }
.dashboard-hero-actions { margin-top: 2px; }
.dash-tile--compact { min-height: 0; }
.dashboard-hero-footer { gap: 8px; flex-wrap: wrap; }
.text-chip-warn { background: rgba(255,120,50,.22); color: #ffcba4; border-color: rgba(255,120,50,.3); }
.hero-card__value--word { font-size: clamp(2.1rem, 7vw, 3.1rem); }
.dashboard-history-panel .section-head { margin-bottom: 14px; }
.install-guide-panel[hidden] { display: none !important; }
.install-guide-status strong { display: block; margin-bottom: 4px; }
@media (max-width: 640px) {
  .dashboard-hero-card {
    padding: 18px 16px;
  }
  .dashboard-hero-grid {
    gap: 14px;
  }
  .hero-card__eyebrow {
    font-size: .72rem;
    letter-spacing: .12em;
  }
  .hero-card__value {
    font-size: clamp(2.5rem, 12vw, 3.25rem);
    margin-top: 6px;
  }
  .hero-card__subline {
    font-size: .9rem;
    line-height: 1.4;
  }
  .dashboard-hero-copy h2 {
    font-size: 1.08rem;
    line-height: 1.25;
    max-width: 18ch;
  }
  .dashboard-hero-copy p {
    max-width: none;
    font-size: .92rem;
    line-height: 1.5;
  }
  .dashboard-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }
  .dashboard-hero-actions .button,
  .dashboard-hero-actions .button-secondary {
    width: 100%;
  }
  .dashboard-top-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .dash-tile--compact {
    padding: 11px 13px;
    min-height: 0;
  }
  .dash-tile--compact .dash-tile__label {
    font-size: .9rem;
    margin: 0;
  }
  .dash-tile--compact .dash-tile__main {
    font-size: .9rem;
    line-height: 1.25;
  }
  .dash-tile--compact .dash-tile__main--big {
    font-size: 1.55rem;
  }
  .dash-tile--compact .dash-tile__sub {
    display: none;
  }
  .dashboard-top-stat {
    min-height: 0;
    padding: 10px 12px;
    gap: 10px;
  }
  .dashboard-top-stat .dash-tile__label {
    font-size: .88rem;
    margin: 0;
  }
  .dashboard-top-stat .dash-tile__main {
    font-size: .88rem;
    min-height: 0;
  }
  .dashboard-top-stat .dash-tile__sub {
    display: none;
  }
  .dashboard-hero-footer,
  .hero-card__footer {
    gap: 6px;
  }
  .dashboard-hero-footer .pill,
  .dashboard-hero-footer .text-chip,
  .hero-card__footer .pill,
  .hero-card__footer .text-chip {
    max-width: 100%;
    white-space: normal;
    line-height: 1.35;
  }
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }
  .section-head .button {
    width: 100%;
  }
}
@media (max-width: 400px) {
  .dashboard-top-stats {
    grid-template-columns: 1fr;
  }
  .dashboard-top-stat {
    padding: 10px 12px;
  }
  .dashboard-top-stat .dash-tile__main {
    min-height: 0;
  }
  .dashboard-hero-copy h2 {
    max-width: none;
  }
  .dash-tile--compact .dash-tile__main--big {
    font-size: 1.45rem;
  }
}


.dashboard-carousel { margin-bottom: 14px; }
.dashboard-carousel__track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 0; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-right: 0; }
.dashboard-carousel__track::-webkit-scrollbar { display: none; }
.dashboard-carousel__slide { flex: 0 0 100%; width: 100%; scroll-snap-align: start; margin-bottom: 0; }
.dashboard-carousel__dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.dashboard-carousel__dot { width: 8px; height: 8px; border-radius: 999px; border: 0; background: rgba(15,23,42,.18); padding: 0; }
.dashboard-carousel__dot.is-active { background: #c8a460; }
.dashboard-hero-copy--light p { color: var(--text-sub); }
@media (min-width: 900px) {
  .dashboard-carousel__track { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .dashboard-carousel__slide { flex-basis: auto; }
}


.request-form {
    display: block;
    margin-top: 18px;
}
.request-step {
    margin-bottom: 14px !important;
}
.request-form .request-step + .request-step {
    margin-top: 0 !important;
}
.request-step .profile-step__body {
    padding-top: 0;
}
.dashboard-status-lines {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}
.dashboard-status-line {
    display: flex;
    align-items: center;
    gap: 9px;
    line-height: 1.5;
    font-size: .96rem;
}
.dashboard-status-line svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}
.hero-card-dark .dashboard-status-line {
    color: rgba(255,255,255,.86);
}
.dashboard-hero-copy--light .dashboard-status-line,
.hero-card:not(.hero-card-dark) .dashboard-status-line {
    color: var(--text-sub);
}
@media (max-width: 680px) {
    .dashboard-status-line { font-size: .92rem; }
}

.admin-inline-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--r-pill);
    background: var(--surface-alt);
    border: 1px solid var(--line);
    color: var(--text-sub);
    font-size: 12px;
    font-weight: 700;
}
.admin-neutral-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: var(--r-pill);
    background: #f7f3ec;
    color: var(--text-sub);
    border: 1px solid var(--line);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-dashboard-compact-list {
    display: grid;
    gap: 8px;
}
.admin-dashboard-compact-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}
.admin-dashboard-compact-item__main {
    min-width: 0;
    flex: 1 1 auto;
}
.admin-dashboard-compact-item__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.admin-dashboard-compact-item__title {
    min-width: 0;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    overflow-wrap: anywhere;
}
.admin-dashboard-compact-item__meta {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-sub);
    white-space: nowrap;
}
.admin-dashboard-compact-item__subline {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    color: var(--text-sub);
    font-size: 12px;
    flex-wrap: wrap;
}
.admin-dashboard-compact-item__dot {
    color: rgba(15,23,42,.25);
}
.admin-dashboard-compact-item__side {
    flex-shrink: 0;
}
@media (max-width: 720px) {
    .admin-dashboard-compact-item {
        padding: 9px 10px;
        gap: 8px;
        border-radius: 14px;
    }
    .admin-dashboard-compact-item__title-row {
        align-items: flex-start;
    }
    .admin-dashboard-compact-item__title {
        font-size: 14px;
    }
    .admin-dashboard-compact-item__meta,
    .admin-dashboard-compact-item__subline {
        font-size: 11px;
    }
}
@media (max-width: 520px) {
    .admin-dashboard-compact-item {
        flex-direction: column;
        align-items: stretch;
    }
    .admin-dashboard-compact-item__title-row {
        gap: 8px;
    }
    .admin-dashboard-compact-item__side {
        align-self: flex-start;
    }
    .admin-dashboard-compact-item .status-badge,
    .admin-dashboard-compact-item .admin-neutral-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
}
.admin-customer-table {
    min-width: 980px;
}
.table-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    font: inherit;
}
.table-sort-link:hover,
.table-sort-link:focus-visible {
    color: var(--gold-dark);
    text-decoration: none;
}
.table-sort-link.is-active {
    color: var(--text);
}
.table-sort-link__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(201,151,62,.12);
    color: var(--gold-dark);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}
@media (max-width: 720px) {
    .admin-inline-note {
        width: 100%;
        justify-content: center;
    }
}

.admin-customer-profile-panel {
    margin-bottom: 14px;
}
.admin-customer-status {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.admin-neutral-badge--vip {
    background: rgba(201,151,62,.14);
    color: var(--gold-dark);
    border-color: rgba(201,151,62,.28);
}
.admin-vip-form {
    margin: 0;
}
.admin-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.admin-profile-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    padding: 16px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .04);
}
.admin-profile-card h3 {
    margin: 0 0 12px;
    font-size: 1rem;
}
.admin-profile-list {
    display: grid;
    gap: 10px;
    margin: 0;
}
.admin-profile-list div {
    display: grid;
    grid-template-columns: minmax(120px, 160px) 1fr;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(15,23,42,.06);
}
.admin-profile-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}
.admin-profile-list dt {
    margin: 0;
    color: var(--text-sub);
    font-weight: 700;
}
.admin-profile-list dd {
    margin: 0;
    color: var(--text);
}
.history-details__actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.history-details__inline-form {
    margin: 0;
}
@media (max-width: 900px) {
    .admin-profile-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 720px) {
    .admin-customer-status {
        width: 100%;
        justify-content: flex-start;
    }
    .admin-profile-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}


.admin-customer-page,
.admin-customer-page .panel,
.admin-customer-page .history-section__list,
.admin-customer-page .history-timeline-card,
.admin-customer-page .profile-step__body,
.admin-customer-page .dash-tile,
.admin-customer-page .admin-profile-card {
    min-width: 0;
}
.admin-customer-top-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 14px 0 0;
}
.admin-customer-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}
.admin-customer-section-grid--spaced {
    margin-top: 14px;
}
.admin-customer-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.admin-customer-page input[type="number"] {
    width: 100%;
    min-height: 48px;
    padding: 12px 13px;
    font-size: 1rem;
    line-height: 1.2;
}
.admin-customer-expired-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}
.admin-customer-page .screen-header {
    gap: 12px;
}
.admin-customer-page .panel form,
.admin-customer-page .panel .field-group,
.admin-customer-page .panel .helper-box,
.admin-customer-page .panel .alert,
.admin-customer-page .history-meta-item,
.admin-customer-page .admin-profile-list dd,
.admin-customer-page .admin-profile-list dt {
    min-width: 0;
}
.admin-customer-page .panel .helper-box,
.admin-customer-page .history-meta-item__value,
.admin-customer-page .admin-profile-list dd,
.admin-customer-page .dash-tile__main {
    overflow-wrap: anywhere;
    word-break: break-word;
}
@media (max-width: 900px) {
    .admin-customer-top-stats,
    .admin-customer-section-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 720px) {
    .admin-customer-page .page-card,
    .admin-customer-page .panel,
    .admin-customer-page .profile-step__body,
    .admin-customer-page .history-details__body {
        overflow: visible;
    }
    .admin-customer-page .screen-header {
        flex-direction: column;
        align-items: stretch;
    }
    .admin-customer-page .screen-header > .button,
    .admin-customer-page .screen-header > a.button {
        width: 100%;
    }
    .admin-customer-top-stats,
    .admin-customer-section-grid,
    .admin-customer-form-row,
    .admin-customer-page .history-meta-grid {
        grid-template-columns: 1fr;
    }
    .admin-customer-top-stats .dash-tile,
    .admin-customer-page .panel,
    .admin-customer-page .admin-profile-card {
        padding-left: 14px;
        padding-right: 14px;
    }
    .admin-customer-page .button-row,
    .admin-customer-page .history-details__actions,
    .admin-customer-page .admin-customer-status {
        flex-direction: column;
        align-items: stretch;
    }
    .admin-customer-page .button-row > *,
    .admin-customer-page .history-details__actions > *,
    .admin-customer-page .admin-customer-status > * {
        width: 100%;
        min-width: 0;
    }
    .admin-customer-page .history-details__actions .button,
    .admin-customer-page .button-row .button,
    .admin-customer-page .admin-customer-status .button {
        width: 100%;
    }
    .admin-customer-page .history-timeline-card__head {
        flex-direction: column;
        align-items: stretch;
    }
    .admin-customer-page .history-timeline-card__side {
        align-items: flex-start;
    }
}
@media (max-width: 420px) {
    .admin-customer-page .panel,
    .admin-customer-page .admin-profile-card,
    .admin-customer-page .history-details__summary,
    .admin-customer-page .history-details__body,
    .admin-customer-page .profile-step__summary,
    .admin-customer-page .profile-step__body {
        padding-left: 12px;
        padding-right: 12px;
    }
    .admin-customer-page .panel,
    .admin-customer-page .admin-profile-card {
        border-radius: 18px;
    }
    .admin-customer-page input[type="number"],
    .admin-customer-page input[type="text"],
    .admin-customer-page select,
    .admin-customer-page textarea {
        min-height: 52px;
        font-size: 16px;
    }
}

@media (max-width: 400px) {
    .admin-dashboard-summary__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }
    .admin-dashboard-summary__grid .dash-tile {
        flex-direction: column !important;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-height: 84px;
        padding: 10px 8px;
    }
    .admin-dashboard-summary__grid .dash-tile__label {
        min-width: 0;
        margin-bottom: 0;
        font-size: .64rem;
        letter-spacing: .04em;
        line-height: 1.2;
    }
    .admin-dashboard-summary__grid .dash-tile__main {
        flex: 0 1 auto;
        width: 100%;
        font-size: .98rem;
        line-height: 1.05;
        text-align: center;
        word-break: normal;
    }
    .admin-dashboard-summary__grid .dash-tile__main--big {
        font-size: 1.14rem;
    }
    .admin-dashboard-summary__grid .dash-tile__sub {
        display: none;
    }
    .admin-bottom-nav .bnav-label {
        font-size: 8.5px;
    }
    .admin-bottom-nav .bnav-item {
        padding: 7px 1px;
    }
}


.screen-header--admin-dashboard {
  align-items: flex-start;
  gap: 14px;
}

.admin-dashboard-sync-actions {
  display: grid;
  gap: 8px;
  justify-items: flex-end;
  align-self: center;
}

@media (max-width: 760px) {
  .screen-header--admin-dashboard {
    gap: 12px;
  }

  .admin-dashboard-sync-actions {
    width: 100%;
    justify-items: stretch;
    align-self: stretch;
  }

  .admin-dashboard-sync-actions .button {
    width: 100%;
  }
}

.data-table--compact th,
.data-table--compact td {
  padding: 10px 12px;
  font-size: .92rem;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .admin-expiry-preview .table-wrap {
    margin-left: -2px;
    margin-right: -2px;
  }

  .data-table--compact th,
  .data-table--compact td {
    padding: 9px 10px;
    font-size: .88rem;
    white-space: nowrap;
  }
}


/* ── Historie Filter: mobil kompakter ── */
.history-filter-panel--compact {
    padding: 12px;
}
.history-filter-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.history-filter-scroll::-webkit-scrollbar { display: none; }
.filter-chip--compact {
    padding: 8px 12px;
    min-height: 0;
    font-size: .86rem;
    line-height: 1.1;
}
.history-filter-advanced {
    margin-top: 10px;
    border-top: 1px solid var(--line);
    padding-top: 10px;
}
.history-filter-advanced summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    color: var(--text-sub);
    font-size: .9rem;
    font-weight: 700;
}
.history-filter-advanced summary::-webkit-details-marker { display: none; }
.history-filter-advanced__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.history-filter-advanced__chevron {
    width: 24px;
    height: 24px;
    background: var(--surface-alt);
    color: var(--text-sub);
    border-color: var(--line);
}
.history-filter-advanced__chevron svg {
    width: 14px;
    height: 14px;
}
.history-filter-advanced[open] .history-filter-advanced__chevron {
    transform: rotate(180deg);
    background: var(--gold-light);
    color: var(--gold-dark);
}
.history-filter-advanced__state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--gold-soft);
    color: var(--gold-dark);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.history-filter-select-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.history-filter-select {
    display: grid;
    gap: 5px;
}
.history-filter-select span {
    color: var(--muted);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.history-filter-select select {
    width: 100%;
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    padding: 0 12px;
    font: inherit;
    font-size: .94rem;
}
.history-filter-summary {
    margin-top: 10px;
    font-size: .82rem;
}

/* ── QR Admin: mobil suchbar & gruppiert ── */
.qr-admin-toolbar__controls {
    display: grid;
    gap: 10px;
}
.qr-admin-search input {
    width: 100%;
    min-height: 48px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    padding: 0 16px;
    font: inherit;
}
.qr-type-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.qr-type-filters::-webkit-scrollbar { display: none; }
.qr-sync-form { display: flex; }
.qr-sync-form .button { width: 100%; }
.qr-section__summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
}
.qr-section__summary::-webkit-details-marker { display: none; }
.qr-section__body { margin-top: 12px; }
.qr-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 16px;
}
.qr-card {
    padding: 18px;
}
.qr-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.qr-card__header h3 {
    margin-top: 4px;
    line-height: 1.2;
}
.qr-card__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f3f4f6;
    color: var(--text-sub);
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
}
.qr-card__status.is-active {
    background: var(--success-bg);
    color: var(--success);
}
.qr-card__image-button {
    border: 0;
    background: #fff;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    cursor: zoom-in;
    border-radius: 8px;
}
.qr-card__image {
    width: min(100%, 490px);
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 4px;
    border: 16px solid #fff;
    display: block;
    margin: 0 auto;
    background: #fff;
    image-rendering: pixelated;
}
.qr-lightbox[hidden] { display: none; }
.qr-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.qr-lightbox__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(0,0,0,.62);
}
.qr-lightbox__panel {
    position: relative;
    width: min(94vw, 720px);
    padding: 18px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(0,0,0,.35);
    text-align: center;
}
.qr-lightbox__image {
    width: min(86vw, 640px);
    max-height: min(78vh, 640px);
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #fff;
    image-rendering: pixelated;
}
.qr-lightbox__close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    background: #111827;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}
body.qr-lightbox-open { overflow: hidden; }
.qr-card__fallback,
.qr-card__empty {
    margin-top: 10px;
}
.qr-card__details {
    margin-top: 12px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}
.qr-card__details summary {
    list-style: none;
    cursor: pointer;
    color: var(--gold-dark);
    font-weight: 700;
}
.qr-card__details summary::-webkit-details-marker { display: none; }
.qr-card__details-body { margin-top: 10px; }
.qr-card__url {
    word-break: break-all;
}

@media (max-width: 760px) {
    .history-filter-select-grid {
        grid-template-columns: 1fr;
    }
    .history-filter-scroll .filter-chip,
    .qr-type-filters .filter-chip {
        flex: 0 0 auto;
    }
    .history-filter-panel--compact {
        padding: 10px;
    }
    .filter-chip--compact {
        padding: 7px 10px;
        font-size: .82rem;
    }
    .qr-card-grid {
        grid-template-columns: 1fr;
    }
    .qr-card {
        padding: 14px;
        border-radius: 18px;
    }
    .qr-card__image {
        width: min(100%, 360px);
        border-width: 14px;
    }
}

/* Mehrere Hunde */
.dog-manager { display:flex; flex-direction:column; gap:12px; }
.dog-add-btn { align-self:flex-start; }
.dog-card-panel { border-color: var(--line); background: #fff; }
.dog-card-panel__summary-actions { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.dog-card-panel__summary { align-items:center; }
.dog-card-panel__title { margin:0; font-size:1rem; }
.dog-card-panel__toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
.dog-default-toggle { display:inline-flex; align-items:center; gap:10px; font-weight:600; color:var(--text); }
.dog-default-toggle input[type="radio"] { width:18px; height:18px; accent-color: var(--gold-dark); }
.admin-dog-list { display:grid; gap:12px; }
.admin-dog-card { border:1px solid var(--line); border-radius:var(--r-lg); background:#fff; padding:14px; display:flex; flex-direction:column; gap:12px; }
.admin-dog-card__head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.admin-profile-list--dense { gap:10px 18px; }
.admin-profile-card--dogs { grid-column: span 2; }

@media (max-width: 760px) {
  .dog-card-panel__toolbar { align-items:stretch; }
  .dog-default-toggle { width:100%; }
  .dog-remove-btn,
  .dog-add-btn { width:100%; }
  .admin-profile-card--dogs { grid-column: span 1; }
}


.analytics-page .page-hero.panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.analytics-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.analytics-cluster-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.analytics-cluster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.analytics-mini-list {
  display: grid;
  gap: 10px;
}
.analytics-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.analytics-mini-row span { color: var(--text-sub); }
.analytics-mini-row strong { font-size: 1rem; }
.analytics-table th,
.analytics-table td { white-space: nowrap; }
.analytics-table td:first-child,
.analytics-table th:first-child { white-space: normal; }
.admin-bnav-inner { grid-template-columns: repeat(6, 1fr); }
.admin-bottom-nav .bnav-label { font-size: 9px; }
@media (max-width: 920px) {
  .analytics-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .analytics-page .page-hero.panel {
    flex-direction: column;
    align-items: stretch;
  }
  .analytics-kpi-grid,
  .analytics-cluster-grid { grid-template-columns: 1fr; }
  .analytics-mini-row { padding: 9px 10px; }
  .admin-bottom-nav .bnav-label { font-size: 8px; }
  .admin-bottom-nav .bnav-item { padding: 6px 1px; }
  .admin-bottom-nav .bnav-icon { width: 19px; height: 19px; }
}
