/* Farben: dunkel als Standard, helles Schema über prefers-color-scheme */
:root {
    --bg: #0b0b10;
    --bg-2: #12121a;
    --surface: rgba(255, 255, 255, .04);
    --surface-solid: #15151d;
    --surface-hover: rgba(255, 255, 255, .07);
    --border: rgba(255, 255, 255, .09);
    --border-strong: rgba(255, 255, 255, .16);
    --text: #f4f4f7;
    --muted: #9b9bab;
    --faint: #6b6b7b;
    --accent: #8b7bff;
    --accent-2: #4fd1c5;
    --accent-3: #f472b6;
    --accent-text: #ffffff;
    --accent-soft: rgba(139, 123, 255, .14);
    --ok: #4ade80;
    --ok-soft: rgba(74, 222, 128, .12);
    --error: #f87171;
    --error-soft: rgba(248, 113, 113, .12);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, .12);
    --input: rgba(255, 255, 255, .05);
    --aurora-opacity: .55;
    --radius: 20px;
    --radius-sm: 12px;
    --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    color-scheme: dark;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #f7f7fb;
        --bg-2: #ffffff;
        --surface: rgba(255, 255, 255, .72);
        --surface-solid: #ffffff;
        --surface-hover: rgba(255, 255, 255, .95);
        --border: rgba(20, 20, 40, .08);
        --border-strong: rgba(20, 20, 40, .16);
        --text: #12121a;
        --muted: #5d5d6e;
        --faint: #8a8a99;
        --accent: #6d5dfc;
        --accent-2: #0ea5a0;
        --accent-3: #db2777;
        --accent-soft: rgba(109, 93, 252, .1);
        --ok: #15803d;
        --ok-soft: #dcfce7;
        --error: #b91c1c;
        --error-soft: #fee2e2;
        --warn: #a16207;
        --warn-soft: #fef3c7;
        --input: #ffffff;
        --aurora-opacity: .35;
        color-scheme: light;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -.025em; font-weight: 650; }
p { margin: 0; }
[hidden] { display: none !important; }

.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; }
.muted { color: var(--muted); }
.eyebrow {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent);
}
.gradient {
    background: linear-gradient(100deg, var(--accent) 0%, var(--accent-3) 50%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.glass {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font: inherit;
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--accent-3)));
    color: var(--accent-text);
    box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn-primary:hover { box-shadow: 0 12px 32px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-glass, .btn-ghost {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text);
}
.btn-glass:hover, .btn-ghost:hover { background: var(--surface-hover); }
.btn-danger { background: transparent; border-color: color-mix(in srgb, var(--error) 50%, transparent); color: var(--error); }
.btn-danger:hover { background: var(--error-soft); }
.btn-small { padding: 7px 14px; font-size: .85rem; }
.btn-block { width: 100%; }

/* Formulare */
.form { display: grid; gap: 16px; }
.form label { display: block; font-size: .875rem; font-weight: 550; color: var(--text); }
.form label > input:not([type=checkbox]):not([type=radio]), .form label > select, .form label > textarea { margin-top: 8px; }
.opt { color: var(--faint); font-weight: 400; font-size: .8rem; margin-left: 4px; }
.row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
input[type=text], input[type=email], input[type=password], input[type=date], select, textarea {
    display: block;
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    font-size: .95rem;
    color: var(--text);
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color .15s ease, box-shadow .15s ease;
}
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}
textarea { resize: vertical; min-height: 120px; }
::placeholder { color: var(--faint); }
.form .check { display: flex; align-items: center; gap: 12px; font-weight: 500; cursor: pointer; }

/* Schalter statt Checkbox */
.switch input { appearance: none; -webkit-appearance: none; margin: 0; flex-shrink: 0; width: 42px; height: 24px; border-radius: 999px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }

.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: var(--input);
    border: 1px solid var(--border);
}
.segmented label { margin: 0; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
    display: block;
    text-align: center;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: .875rem;
    color: var(--muted);
    transition: background .15s, color .15s;
}
.segmented input:checked + span { background: var(--surface-solid); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    border: 1px solid transparent;
}
.notice .icon { margin-top: 2px; }
.notice.ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.notice.error { background: var(--error-soft); color: var(--error); border-color: color-mix(in srgb, var(--error) 25%, transparent); }
.notice.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.notice a { color: inherit; font-weight: 600; }

/* Hintergrund-Leuchten */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span {
    position: absolute;
    width: 60vmax;
    height: 60vmax;
    border-radius: 50%;
    filter: blur(90px);
    opacity: var(--aurora-opacity);
    animation: drift 24s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { background: var(--accent); top: -30vmax; left: -15vmax; }
.aurora span:nth-child(2) { background: var(--accent-3); top: -25vmax; right: -25vmax; opacity: calc(var(--aurora-opacity) * .6); animation-delay: -8s; }
.aurora span:nth-child(3) { background: var(--accent-2); bottom: -40vmax; left: 20vmax; opacity: calc(var(--aurora-opacity) * .5); animation-delay: -16s; }
.aurora::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
    opacity: .5;
}
@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(6vmax, 4vmax) scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
    .aurora span { animation: none; }
    html { scroll-behavior: auto; }
    .reveal { animation: none !important; }
}

/* Öffentliche Seite */
.site-nav {
    max-width: 1120px;
    margin: 0 auto;
    padding: 20px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; text-decoration: none; letter-spacing: -.01em; }
.logo-mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
}
.nav-link { color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 500; }
.nav-link:hover { color: var(--text); }

.page { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

.hero { padding: clamp(56px, 12vw, 140px) 0 clamp(48px, 8vw, 96px); text-align: center; animation: reveal .8s ease both; }
.pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 12px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: .85rem;
    color: var(--muted);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-3) 22%, transparent); }
.hero h1 { font-size: clamp(2.5rem, 7.5vw, 5.25rem); margin: 28px auto 24px; max-width: 14em; font-weight: 700; letter-spacing: -.04em; }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 36em; margin: 0 auto; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }

.bento { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.tile {
    position: relative;
    padding: 28px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    display: grid;
    gap: 12px;
    align-content: start;
    transition: border-color .2s, transform .2s;
    animation: reveal .8s ease both;
}
.tile:nth-child(2) { animation-delay: .08s; }
.tile:nth-child(3) { animation-delay: .16s; }
.tile:nth-child(4) { animation-delay: .24s; }
.tile:hover { border-color: var(--border-strong); }
.tile h2 { font-size: 1.2rem; }
.tile p { color: var(--muted); font-size: .95rem; }
.tile .eyebrow { color: var(--accent); font-size: .75rem; }
.tile-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    margin-bottom: 4px;
}
.tile-icon .icon { width: 22px; height: 22px; }
.tile .countdown { margin-top: 4px; color: var(--text) !important; }
.countdown strong { font-size: 2rem; letter-spacing: -.03em; margin-right: 4px; }

.tile-wide { grid-column: 1 / -1; }
.tile-domain {
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
    align-items: center;
    overflow: hidden;
}
.tile-domain::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(120deg, var(--accent), transparent 40%, transparent 60%, var(--accent-2));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.tile-domain > div:first-child { display: grid; gap: 10px; }
.tile .domain-name { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; letter-spacing: -.03em; color: var(--text) !important; word-break: break-all; line-height: 1.15; }
.price-box {
    display: grid;
    gap: 6px;
    padding: 24px;
    border-radius: 16px;
    background: var(--input);
    border: 1px solid var(--border);
}
.price-box .btn { margin-top: 12px; }
.price { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }

.contact {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: clamp(24px, 5vw, 64px);
    align-items: start;
    padding: clamp(64px, 10vw, 120px) 0 32px;
    scroll-margin-top: 24px;
}
.contact-intro { display: grid; gap: 14px; position: sticky; top: 32px; }
.contact-intro h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.mail-link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); text-decoration: none; font-weight: 550; margin-top: 8px; }
.mail-link:hover { text-decoration: underline; }
.form-card { padding: clamp(20px, 4vw, 32px); display: grid; gap: 16px; }

.site-foot {
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 16px 48px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: var(--faint);
    font-size: .85rem;
    border-top: 1px solid var(--border);
}
.site-foot a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.site-foot a:hover { color: var(--text); }

@keyframes reveal {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 860px) {
    .bento { grid-template-columns: 1fr; }
    .hero h1 br { display: none; }
    .tile-domain, .contact { grid-template-columns: 1fr; }
    .contact-intro { position: static; }
}

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 400px; padding: 36px 32px; display: grid; gap: 20px; animation: reveal .6s ease both; }
.login-card .logo-mark { width: 44px; height: 44px; border-radius: 12px; font-size: 1.2rem; }
.login-card h1 { font-size: 1.6rem; }
.login-foot { text-align: center; font-size: .875rem; }
.login-foot a { color: var(--muted); text-decoration: none; }
.login-foot a:hover { color: var(--text); }

/* Admin */
.admin { background: var(--bg); }
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 20px 14px;
    background: var(--bg-2);
    border-right: 1px solid var(--border);
}
.sidebar .logo { padding: 4px 8px; font-size: .95rem; }
.sidebar .logo span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-nav { display: grid; gap: 2px; }
.side-nav a, .side-foot a, .side-foot button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
    font: inherit;
    font-size: .9rem;
    font-weight: 500;
    background: none;
    border: 0;
    width: 100%;
    cursor: pointer;
    text-align: left;
}
.side-nav a:hover, .side-foot a:hover, .side-foot button:hover { background: var(--surface-hover); color: var(--text); }
.side-nav a.active { background: var(--accent-soft); color: var(--text); }
.side-nav a.active .icon { color: var(--accent); }
.count {
    margin-left: auto;
    min-width: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: .72rem;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
}
.side-foot { margin-top: auto; display: grid; gap: 2px; border-top: 1px solid var(--border); padding-top: 12px; }
.side-foot form { margin: 0; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: .85rem; color: var(--muted); }
.avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .8rem; text-transform: uppercase; }

.main { padding: clamp(20px, 4vw, 40px); display: grid; gap: 20px; align-content: start; max-width: 1180px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head h1 { font-size: 1.75rem; }
.page-head p { color: var(--muted); margin-top: 6px; font-size: .95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form { margin: 0; }

.panel { background: var(--surface-solid); border: 1px solid var(--border); border-radius: 16px; padding: clamp(18px, 3vw, 24px); overflow-x: auto; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { font-size: 1.05rem; letter-spacing: -.01em; }
.panel-head a { color: var(--accent); text-decoration: none; font-size: .875rem; font-weight: 550; display: inline-flex; align-items: center; gap: 6px; }
.panel .form { max-width: 720px; }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }

.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat {
    padding: 18px 20px;
    border-radius: 16px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    display: grid;
    gap: 10px;
}
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .85rem; }
.stat-top .icon { color: var(--faint); }
.stat strong { font-size: 1.75rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat.highlight { background: linear-gradient(135deg, var(--accent-soft), transparent), var(--surface-solid); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }

.status-list { list-style: none; margin: 0; padding: 0; display: grid; }
.status-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: .925rem; }
.status-list li:last-child { border-bottom: 0; }
.status-list span { color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.on { background: var(--ok-soft); color: var(--ok); }
.tag.off { background: var(--surface-hover); color: var(--muted); }

.filters { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-solid); border: 1px solid var(--border); }
.filters a { padding: 6px 14px; border-radius: 8px; font-size: .85rem; font-weight: 500; color: var(--muted); text-decoration: none; }
.filters a:hover { color: var(--text); }
.filters a.active { background: var(--accent-soft); color: var(--text); }

.messages { display: grid; gap: 8px; }
.message { border: 1px solid var(--border); border-radius: 12px; background: var(--bg); transition: border-color .15s; }
.message:hover { border-color: var(--border-strong); }
.message[open] { border-color: var(--border-strong); }
.message summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.message summary::-webkit-details-marker { display: none; }
.message.unread summary::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.message:not(.unread) summary strong { font-weight: 500; color: var(--muted); }
.message summary time { margin-left: auto; font-size: .8rem; color: var(--faint); }
.message-body { padding: 4px 16px 16px; display: grid; gap: 12px; }
.message-body p { overflow-wrap: anywhere; font-size: .95rem; }
.badge { font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--surface-hover); color: var(--muted); }
.badge-domain { background: var(--accent-soft); color: var(--accent); }
.offer { font-weight: 650; color: var(--ok); font-variant-numeric: tabular-nums; }

.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th { color: var(--faint); font-weight: 500; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.table tr:last-child td { border-bottom: 0; }
.table a { color: var(--accent); text-decoration: none; }
.ok-text { color: var(--ok); }
.error-text { color: var(--error); }
.empty { color: var(--muted); text-align: center; padding: 32px 0; display: grid; gap: 8px; justify-items: center; }
.empty .icon { width: 28px; height: 28px; color: var(--faint); }

@media (max-width: 860px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: sticky; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--border); z-index: 5; }
    .sidebar .logo { flex: 1; }
    .side-nav { order: 3; width: 100%; display: flex; overflow-x: auto; gap: 4px; scrollbar-width: none; }
    .side-nav a { width: auto; white-space: nowrap; }
    .side-foot { margin: 0; border: 0; padding: 0; display: flex; }
    .side-foot a, .side-foot button { width: auto; padding: 8px; }
    .side-foot .label, .user-chip { display: none; }
    .message summary time { margin-left: 0; width: 100%; }
}
