/*
 * SLN Mobile UI
 * Die Anwendung ist bewusst als einspaltige Handy-App gestaltet.
 */

:root {
    --app-width: 44rem;
    --app-bg: #f4f1ec;
    --app-surface: #fffdf9;
    --app-surface-muted: #ebe7e1;
    --app-ink: #17191d;
    --app-muted: #6f706f;
    --app-line: rgba(36, 30, 28, 0.12);
    --app-red: var(--club-red, #8f1120);
    --app-red-strong: var(--club-red-strong, #b81628);
    --app-night: #15171c;
    --app-success: #16704a;
    --app-warning: #91600c;
    --app-danger: #a11628;
    --app-radius: 1.25rem;
    --app-radius-sm: 0.875rem;
    --app-shadow: 0 1.2rem 3.5rem rgba(42, 25, 24, 0.09);
    --app-dock-height: 5rem;
}

html {
    min-width: 20rem;
    background: #ded8d1;
    -webkit-text-size-adjust: 100%;
}

html body {
    min-width: 20rem;
    min-height: 100dvh;
    overflow-x: hidden;
    color: var(--app-ink);
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 0.9375rem;
    line-height: 1.5;
    background:
        radial-gradient(circle at 80% -5%, rgba(143, 17, 32, 0.09), transparent 18rem),
        var(--app-bg);
}

body::before {
    content: "";
    position: fixed;
    inset: 0 auto 0 50%;
    z-index: -1;
    width: min(100%, var(--app-width));
    transform: translateX(-50%);
    background: var(--app-bg);
    box-shadow: 0 0 5rem rgba(28, 20, 20, 0.12);
}

body.is-logged-in {
    padding-bottom: calc(var(--app-dock-height) + env(safe-area-inset-bottom) + 1.25rem);
}

body h1,
body h2,
body h3,
body h4 {
    color: var(--app-ink);
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.08;
    text-transform: none;
    text-wrap: balance;
}

body h1 {
    font-size: clamp(2rem, 9vw, 2.8rem);
}

body h2 {
    font-size: clamp(1.45rem, 6vw, 2rem);
}

body h3 {
    font-size: clamp(1.1rem, 4.8vw, 1.35rem);
}

body p {
    text-wrap: pretty;
}

body a,
body button,
body input,
body select,
body textarea,
body summary {
    -webkit-tap-highlight-color: transparent;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 50%;
    z-index: 300;
    padding: 0.75rem 1rem;
    transform: translate(-50%, -180%);
    border-radius: 0.75rem;
    color: #fff;
    background: var(--app-night);
    font-weight: 800;
}

.skip-link:focus {
    transform: translate(-50%, 0);
}

/* App-Leiste */
body .site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    border: 0;
    background: rgba(21, 23, 28, 0.96);
    box-shadow: 0 0.5rem 1.6rem rgba(17, 13, 15, 0.16);
    backdrop-filter: blur(1.25rem);
}

body .site-nav__inner {
    width: min(100%, var(--app-width));
    min-height: 4.25rem;
    margin: 0 auto;
    padding: max(0.65rem, env(safe-area-inset-top)) 1rem 0.65rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
}

body .site-brand {
    min-width: 0;
    gap: 0.7rem;
}

body .site-brand__mark {
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 2.5rem;
    border-radius: 0.8rem;
    font-size: 0.72rem;
    box-shadow: none;
}

body .site-brand__text {
    min-width: 0;
}

body .site-brand__eyebrow {
    margin-bottom: 0.05rem;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.61rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

body .site-brand__title {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body .site-nav__links,
body .site-nav__meta {
    display: none;
}

body .site-nav__toggle {
    width: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.9rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: none;
}

body .site-nav__toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

body .site-nav__toggle-bars {
    gap: 0.28rem;
}

body .site-nav__toggle-bars span {
    width: 1.15rem;
    height: 0.12rem;
}

/* Navigations-Sheet */
body .site-drawer__backdrop:not([hidden]),
body .site-drawer:not([hidden]) {
    display: block;
}

body .site-drawer__backdrop {
    background: rgba(12, 12, 15, 0.62);
    backdrop-filter: blur(0.45rem);
}

body .site-drawer {
    left: 50%;
    width: min(100%, var(--app-width));
    transform: translateX(-50%);
    padding: 0 0 env(safe-area-inset-bottom);
}

body .site-drawer__panel {
    max-height: min(88dvh, 48rem);
    padding: 1.2rem 1rem 1.4rem;
    border: 0;
    border-radius: 1.75rem 1.75rem 0 0;
    background: #f8f5f0;
    box-shadow: 0 -1.5rem 4rem rgba(10, 10, 14, 0.3);
}

body .site-drawer__head {
    position: sticky;
    top: -1.2rem;
    z-index: 2;
    padding: 0.25rem 0 0.8rem;
    background: linear-gradient(#f8f5f0 82%, transparent);
}

body .site-drawer__head h2 {
    margin: 0.2rem 0 0;
    font-size: 1.3rem;
}

body .site-drawer__close {
    min-height: 2.75rem;
    padding: 0 0.9rem;
    color: var(--app-ink);
    background: var(--app-surface-muted);
}

body .site-drawer__section {
    margin-top: 1rem;
}

body .site-drawer__links {
    gap: 0.4rem;
    margin-top: 0.45rem;
}

body .site-drawer__link {
    min-height: 3rem;
    padding: 0.7rem 0.85rem;
    border: 0;
    border-radius: 0.9rem;
    color: var(--app-ink);
    background: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px var(--app-line);
}

body .site-drawer__link::after {
    content: "›";
    color: var(--app-muted);
    font-size: 1.2rem;
}

body .site-drawer__link.is-active {
    color: #fff;
    background: var(--app-red);
    box-shadow: none;
}

body .site-drawer__link.is-active::after,
body .site-drawer__link--ghost::after {
    color: currentColor;
}

body .site-drawer__link--ghost {
    justify-content: space-between;
    background: var(--app-night);
}

/* Daumen-Navigation */
body .mobile-dock {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: max(0.45rem, env(safe-area-inset-bottom));
    z-index: 115;
    width: min(calc(100% - 1rem), calc(var(--app-width) - 1rem));
    min-height: 4.35rem;
    padding: 0.38rem;
    display: grid;
    grid-template-columns: repeat(var(--dock-items, 5), minmax(0, 1fr));
    gap: 0.15rem;
    transform: translateX(-50%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.35rem;
    background: rgba(21, 23, 28, 0.96);
    box-shadow: 0 1rem 2.5rem rgba(10, 8, 11, 0.3);
    backdrop-filter: blur(1.25rem);
}

body .mobile-dock__link {
    min-width: 0;
    min-height: 3.55rem;
    padding: 0.38rem 0.16rem 0.28rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 1rem;
    color: rgba(255, 255, 255, 0.56);
    background: transparent;
    box-shadow: none;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}

body .mobile-dock__link.is-active {
    color: #fff;
    background: var(--app-red);
    box-shadow: 0 0.45rem 1rem rgba(143, 17, 32, 0.3);
}

body .mobile-dock__icon {
    width: 1.3rem;
    height: 1.3rem;
    display: grid;
    place-items: center;
}

body .mobile-dock__icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Gemeinsame Seitenstruktur */
body .container,
body .page-shell,
body .page-shell--wide,
body .auth-shell,
body .supporter-hub,
body .exchange-page,
body .profile-page,
body .merch-page,
body .review-shell,
body .points-shell,
body .logs-shell,
body .faq-shell,
body .faq-admin-shell,
body .pay-page,
body .pp-page,
body .merch-admin,
body .apps-shell,
body .guest-flow,
body .guest-pay {
    width: min(100%, var(--app-width));
    max-width: var(--app-width);
    margin-inline: auto;
    padding: 1rem 1rem 2rem;
}

body .page-shell,
body .supporter-hub {
    padding-top: 1rem;
}

body .page-hero,
body .dashboard-hero,
body .hero,
body .supporter-hero,
body .logs-hero {
    margin: 0 0 0.9rem;
    padding: 1.35rem 1.2rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
    border: 0;
    border-radius: var(--app-radius);
    color: #fff;
    background:
        radial-gradient(circle at 95% 0%, rgba(255, 255, 255, 0.15), transparent 12rem),
        linear-gradient(150deg, #1c1d22 0%, #3b1118 48%, var(--app-red) 120%);
    box-shadow: var(--app-shadow);
}

body .page-hero h1,
body .page-hero h2,
body .dashboard-hero h1,
body .hero h1,
body .supporter-hero h1,
body .logs-hero h1 {
    max-width: 13ch;
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: 0.98;
}

body .page-hero p,
body .dashboard-hero p,
body .hero p,
body .supporter-hero p,
body .logs-hero p {
    max-width: 38rem;
    color: rgba(255, 255, 255, 0.74);
}

body .page-hero__kicker,
body .dashboard-hero__kicker,
body .supporter-hero__eyebrow,
body .logs-eyebrow,
body .panel-kicker {
    padding: 0;
    color: rgba(255, 255, 255, 0.58);
    background: transparent;
    border: 0;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

body .page-panel,
body .block,
body .supporter-panel,
body .supporter-sidecard,
body .supporter-card,
body .supporter-compact-card,
body .logs-panel,
body .assign-panel,
body .review-panel,
body .profile-card,
body .merch-card,
body .pay-card,
body .pp-card {
    padding: 1rem;
    border: 0;
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: inset 0 0 0 1px var(--app-line);
}

body .page-panel + .page-panel,
body .block + .block,
body .logs-panel + .logs-panel {
    margin-top: 0.8rem;
}

body .page-grid,
body .page-grid--sidebar,
body .auth-grid,
body .dashboard-workspace,
body .supporter-layout,
body .supporter-hero,
body .profile-grid,
body .merch-grid,
body .assign-grid,
body .review-grid,
body .settings-split,
body .form-grid,
body .form-grid--2,
body .form-grid--3 {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.8rem;
}

body .auth-hero {
    display: none;
}

body .auth-shell {
    min-height: auto;
    padding-top: 1rem;
}

body .auth-card {
    width: 100%;
    padding: 1.15rem;
    border: 0;
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: inset 0 0 0 1px var(--app-line);
}

body .auth-card h1,
body .auth-card h2 {
    margin: 0 0 0.4rem;
    font-size: clamp(1.7rem, 8vw, 2.25rem);
}

body .dashboard-sidebar,
body .supporter-aside {
    position: static;
}

body .metric-grid,
body .supporter-stats,
body .logs-overview,
body .page-meta,
body .assign-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

body .metric-card,
body .supporter-stat,
body .logs-overview__item,
body .page-meta__item,
body .assign-stat {
    min-width: 0;
    padding: 0.85rem;
    border: 0;
    border-radius: 1rem;
    background: var(--app-surface);
    box-shadow: inset 0 0 0 1px var(--app-line);
}

body .metric-card__value,
body .supporter-stat strong,
body .logs-overview__item strong,
body .page-meta__value,
body .assign-stat strong {
    font-size: clamp(1.3rem, 7vw, 1.8rem);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
}

/* Formulare und Aktionen */
body label {
    color: var(--app-ink);
    font-size: 0.82rem;
    font-weight: 750;
}

body input[type="text"],
body input[type="email"],
body input[type="password"],
body input[type="number"],
body input[type="date"],
body input[type="datetime-local"],
body input[type="file"],
body input[type="search"],
body select,
body textarea {
    min-height: 3.25rem;
    margin: 0.35rem 0 0.85rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--app-line);
    border-radius: var(--app-radius-sm);
    color: var(--app-ink);
    background: #fff;
    box-shadow: none;
    font: inherit;
    font-size: 1rem;
}

body textarea {
    min-height: 7rem;
    resize: vertical;
}

body input:focus,
body select:focus,
body textarea:focus {
    outline: 3px solid rgba(143, 17, 32, 0.16);
    outline-offset: 1px;
    border-color: rgba(143, 17, 32, 0.52);
}

body button,
body .button,
body .btn,
body input[type="submit"] {
    min-height: 3rem;
    padding: 0.75rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 0;
    border-radius: var(--app-radius-sm);
    color: #fff;
    background: var(--app-red);
    box-shadow: none;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    transition: transform 140ms ease, background-color 140ms ease, opacity 140ms ease;
}

body .button--ghost,
body .button--secondary,
body .btn.alt,
body .btn.ghost,
body button.alt,
body button.ghost,
body .reset,
body .page-backlink {
    color: var(--app-ink);
    background: var(--app-surface-muted);
    box-shadow: none;
}

body button:active,
body .button:active,
body .btn:active,
body .mobile-dock__link:active {
    transform: scale(0.97);
}

body button:focus-visible,
body .button:focus-visible,
body .btn:focus-visible,
body a:focus-visible,
body summary:focus-visible {
    outline: 3px solid rgba(184, 22, 40, 0.3);
    outline-offset: 2px;
}

body .toolbar,
body .toolbar__actions,
body .table-actions,
body .inline-actions,
body .form-actions,
body .supporter-actions,
body .supporter-form-inline {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.55rem;
    align-items: stretch;
}

body .toolbar > *,
body .toolbar__actions > *,
body .table-actions > *,
body .inline-actions > *,
body .form-actions > * {
    width: 100%;
}

body .tabs,
body .rangetabs,
body .dashboard-tabs,
body .supporter-tabs,
body .settings-tabs {
    width: calc(100% + 2rem);
    margin-inline: -1rem;
    padding: 0 1rem 0.5rem;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

body .tabs::-webkit-scrollbar,
body .rangetabs::-webkit-scrollbar,
body .supporter-tabs::-webkit-scrollbar {
    display: none;
}

body .tabs a,
body .rangetabs a,
body .dashboard-tab,
body .supporter-tab,
body .settings-tabs a {
    min-height: 2.65rem;
    flex: 0 0 auto;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--app-line);
    border-radius: 0.85rem;
    color: var(--app-ink);
    background: var(--app-surface);
    box-shadow: none;
    scroll-snap-align: start;
    white-space: nowrap;
}

body .tabs a.active,
body .rangetabs a.active,
body .dashboard-tab.is-active,
body .supporter-tab.is-active,
body .settings-tabs a.active {
    color: #fff;
    border-color: var(--app-red);
    background: var(--app-red);
}

/* Tabellen bleiben bedienbar, ohne die Seite zu verbreitern. */
body .table-shell,
body .table-wrap,
body .users-table,
body .supporter-history,
body .csv-preview__table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--app-line);
    border-radius: 1rem;
    background: var(--app-surface);
    box-shadow: none;
    -webkit-overflow-scrolling: touch;
}

body table {
    font-size: 0.82rem;
}

body th,
body td {
    padding: 0.75rem 0.7rem;
    border-color: var(--app-line);
    vertical-align: top;
}

body th {
    color: rgba(255, 255, 255, 0.78);
    background: var(--app-night);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body .logtbl {
    min-width: 37rem;
}

body .log-action-line {
    max-width: 26rem;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

body .filterbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.2rem;
    padding: 0.9rem;
    border-radius: 1rem;
    background: var(--app-surface-muted);
}

body .alert,
body .flash,
body .supporter-message,
body .supporter-note,
body .panel-note,
body .log-empty {
    padding: 0.85rem 0.95rem;
    border-radius: 0.9rem;
    box-shadow: none;
}

/* Login */
body.page-login-simple {
    display: block;
    background:
        radial-gradient(circle at 85% 5%, rgba(184, 22, 40, 0.42), transparent 15rem),
        linear-gradient(180deg, #17181d 0 42%, var(--app-bg) 42% 100%);
}

body.page-login-simple::before {
    display: none;
}

body .login-page {
    width: min(100%, 30rem);
    min-height: 100dvh;
    margin: 0 auto;
    padding: max(4.5rem, 14dvh) 1rem 2rem;
    display: block;
}

body .login-panel {
    width: 100%;
    overflow: hidden;
    border: 0;
    border-radius: 1.5rem;
    background: var(--app-surface);
    box-shadow: 0 1.8rem 5rem rgba(12, 10, 13, 0.28);
}

body .login-panel__header {
    position: relative;
    padding: 1.5rem 1.25rem 0.8rem;
    background: transparent;
}

body .login-panel__header::before {
    content: "SLN";
    width: 2.8rem;
    height: 2.8rem;
    margin-bottom: 1.1rem;
    display: grid;
    place-items: center;
    border-radius: 0.9rem;
    color: #fff;
    background: var(--app-red);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

body .login-panel__meta {
    margin: 0 0 0.35rem;
    color: var(--app-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body .login-panel__header h1 {
    margin: 0;
    color: var(--app-ink);
    font-size: clamp(2rem, 10vw, 2.65rem);
}

body .login-panel__body {
    padding: 0.8rem 1.25rem 1.35rem;
}

body .login-form {
    gap: 0;
}

body .login-form__submit {
    width: 100%;
    margin-top: 0.3rem;
    min-height: 3.35rem;
    background: var(--app-red);
}

body .login-panel__footer {
    margin-top: 0.85rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--app-line);
}

body .login-panel__link {
    color: var(--app-muted);
    font-size: 0.84rem;
    font-weight: 700;
}

/* Spiel- und Ticketkarten */
body .supporter-calendar__strip {
    grid-auto-columns: minmax(16rem, 82vw);
}

body .supporter-game-row__summary {
    grid-template-columns: minmax(0, 1fr) 1.25rem;
    gap: 0.7rem;
    padding: 0.95rem;
}

body .supporter-game-row__quickfacts,
body .supporter-game-row__badges {
    grid-column: 1 / -1;
    justify-content: flex-start;
}

body .supporter-game-row__quickfacts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

body .supporter-game-row__quickfacts span,
body .supporter-badge,
body .supporter-status-pill,
body .badge,
body .pill,
body .chip {
    min-height: 1.85rem;
    padding: 0.32rem 0.55rem;
    border-radius: 0.6rem;
    font-size: 0.72rem;
    font-weight: 750;
}

body .supporter-facts,
body .game-card__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

body .supporter-fact,
body .game-card__fact {
    padding: 0.75rem;
    border-radius: 0.85rem;
}

body .supporter-mobile-actions,
body .supporter-hero__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

body .supporter-mobile-action,
body .supporter-hero__link {
    min-height: 4.5rem;
    padding: 0.8rem;
    border-radius: 1rem;
}

body .site-footer {
    width: min(100%, var(--app-width));
    margin: 1rem auto 0;
    border: 0;
    background: transparent;
}

body .site-footer__inner {
    width: 100%;
    padding: 1.2rem 1rem 1.6rem;
    display: grid;
    justify-items: start;
    gap: 0.8rem;
    color: var(--app-muted);
    font-size: 0.75rem;
    text-align: left;
}

@media (max-width: 23rem) {
    body .site-brand__eyebrow {
        display: none;
    }

    body .site-brand__title {
        font-size: 0.8rem;
    }

    body .metric-grid,
    body .supporter-stats,
    body .logs-overview,
    body .page-meta,
    body .assign-stats,
    body .supporter-mobile-actions,
    body .supporter-hero__links,
    body .supporter-facts,
    body .game-card__facts {
        grid-template-columns: 1fr;
    }
}

@media (hover: hover) and (pointer: fine) {
    body button:hover,
    body .button:hover,
    body .btn:hover {
        transform: translateY(-1px);
        filter: brightness(1.04);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
