/* ==========================================================================
   Kurzlink – Design-System
   Aurora-Hintergrund, Glas-Karten, Hell/Dunkel
   ========================================================================== */

:root {
    --font: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
    --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

    --bg: #0a0918;
    --ink: #f2f0ff;
    --ink-2: #c3bfe6;
    --ink-3: #8f8ab5;
    --card-solid: #15132c;
    --glass: rgba(255, 255, 255, .06);
    --glass-2: rgba(255, 255, 255, .10);
    --line: rgba(255, 255, 255, .12);
    --field: rgba(255, 255, 255, .07);
    --brand: #7c6cff;
    --brand-2: #22d3ee;
    --pink: #ff6aa2;
    --ok: #34d399;
    --warn: #fbbf24;
    --danger: #fb7185;
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);
    --glow: 0 0 0 4px rgba(124, 108, 255, .28);
    --b1: #6d4aff;
    --b2: #00b8ff;
    --b3: #ff4f9a;
    --blob-opacity: .5;
    --radius: 18px;
    color-scheme: dark;
}

:root[data-theme="light"] {
    --bg: #f4f2ff;
    --ink: #17142f;
    --ink-2: #4b4870;
    --ink-3: #7a769c;
    --card-solid: #ffffff;
    --glass: rgba(255, 255, 255, .66);
    --glass-2: rgba(255, 255, 255, .9);
    --line: rgba(40, 28, 110, .12);
    --field: rgba(255, 255, 255, .85);
    --ok: #059669;
    --warn: #b45309;
    --danger: #e11d48;
    --shadow: 0 24px 60px -28px rgba(70, 50, 170, .35);
    --glow: 0 0 0 4px rgba(124, 108, 255, .22);
    --blob-opacity: .38;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, .mono { font-family: var(--mono); font-size: .92em; }
:root[data-theme="light"] a { color: #5b4be0; }
::selection { background: rgba(124, 108, 255, .4); }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; border-radius: 6px; }

.muted { color: var(--ink-3); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }

.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.i-inline { width: 1em; height: 1em; margin-right: .35em; opacity: .75; }

/* ---------- Aurora-Hintergrund ---------- */
.aurora {
    position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
    background:
        radial-gradient(1100px 620px at 50% -12%, rgba(124, 108, 255, .22), transparent 62%),
        var(--bg);
}
.aurora::after {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 18%, #000 0%, transparent 72%);
    mask-image: radial-gradient(ellipse 70% 55% at 50% 18%, #000 0%, transparent 72%);
    opacity: .55;
}
.blob {
    position: absolute; width: 52vmax; height: 52vmax; border-radius: 50%;
    filter: blur(90px); opacity: var(--blob-opacity); will-change: transform;
}
.blob-1 { background: var(--b1); top: -22vmax; left: -14vmax; animation: drift-1 26s ease-in-out infinite alternate; }
.blob-2 { background: var(--b2); top: -10vmax; right: -20vmax; width: 44vmax; height: 44vmax; animation: drift-2 30s ease-in-out infinite alternate; }
.blob-3 { background: var(--b3); bottom: -26vmax; left: 22vw; width: 46vmax; height: 46vmax; opacity: calc(var(--blob-opacity) * .7); animation: drift-3 34s ease-in-out infinite alternate; }
.grain {
    position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
@keyframes drift-1 { to { transform: translate3d(14vw, 10vh, 0) scale(1.15); } }
@keyframes drift-2 { to { transform: translate3d(-16vw, 16vh, 0) scale(.9); } }
@keyframes drift-3 { to { transform: translate3d(-12vw, -12vh, 0) scale(1.2); } }

/* ---------- Kopfzeile ---------- */
.topbar { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
    background: color-mix(in srgb, var(--bg) 55%, transparent); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; filter: drop-shadow(0 6px 14px rgba(124, 108, 255, .45)); }
.topnav { display: flex; align-items: center; gap: .35rem; }
.nav-link { color: var(--ink-2); font-weight: 600; font-size: .95rem; padding: .5rem .8rem; border-radius: 10px; }
.nav-link:hover { color: var(--ink); background: var(--glass); text-decoration: none; }
.nav-btn { background: none; border: 0; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; display: inline-flex; gap: .4rem; align-items: center; }
.inline-form { display: inline; margin: 0; }

.icon-btn {
    display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; cursor: pointer;
    background: var(--glass); border: 1px solid var(--line); color: var(--ink-2); transition: .18s;
}
.icon-btn:hover { color: var(--ink); background: var(--glass-2); transform: translateY(-1px); text-decoration: none; }
.icon-btn-danger:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.icon-btn .icon { width: 18px; height: 18px; }
#theme-toggle { margin-left: .35rem; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font: inherit; font-weight: 700; font-size: .95rem; line-height: 1; cursor: pointer;
    padding: .8rem 1.15rem; border-radius: 13px; border: 1px solid transparent; color: var(--ink);
    transition: transform .15s, box-shadow .2s, background .2s, border-color .2s; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 1.1em; height: 1.1em; }
.btn-primary {
    color: #fff; background: linear-gradient(135deg, #7c6cff 0%, #5b8cff 55%, #22d3ee 120%);
    box-shadow: 0 10px 26px -10px rgba(110, 90, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:hover { box-shadow: 0 14px 32px -10px rgba(110, 90, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-ghost { background: var(--glass); border-color: var(--line); }
.btn-ghost:hover { background: var(--glass-2); }
.btn-danger { background: color-mix(in srgb, var(--danger) 16%, transparent); border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); }
.btn-sm { padding: .5rem .75rem; font-size: .85rem; border-radius: 10px; }
.btn-lg { padding: 1rem 1.5rem; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; }

/* ---------- Karten & Glas ---------- */
.glass { background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(18px) saturate(1.25); -webkit-backdrop-filter: blur(18px) saturate(1.25); }
.card { border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }

/* ---------- Formularfelder ---------- */
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field > span { font-size: .85rem; font-weight: 700; color: var(--ink-2); }
.field small { font-weight: 500; color: var(--ink-3); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="datetime-local"], select {
    width: 100%; font: inherit; color: var(--ink); background: var(--field);
    border: 1px solid var(--line); border-radius: 12px; padding: .75rem .9rem; transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--ink-3); opacity: .8; }
input:focus { outline: none; border-color: var(--brand); box-shadow: var(--glow); }
.prefix-input { display: flex; align-items: center; background: var(--field); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: .15s; }
.prefix-input:focus-within { border-color: var(--brand); box-shadow: var(--glow); }
.prefix-input > span { padding: 0 .1rem 0 .9rem; color: var(--ink-3); font-family: var(--mono); font-size: .85rem; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.prefix-input input { border: 0; background: transparent; box-shadow: none; padding-left: .15rem; font-family: var(--mono); font-size: .92rem; }
.check { display: inline-flex; align-items: center; gap: .55rem; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--brand); }
.check-big { font-weight: 700; font-size: 1rem; }
.stack { display: grid; gap: 1rem; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.form-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.form-error {
    display: flex; gap: .5rem; align-items: flex-start; margin: .9rem 0 0; padding: .75rem .95rem; border-radius: 12px; font-weight: 600; font-size: .92rem;
    color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
}
.form-error[hidden] { display: none; }

/* ---------- Hinweise ---------- */
.flash { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; margin-bottom: 1rem; border-radius: 14px; font-weight: 600;
    background: var(--glass); border: 1px solid var(--line); animation: rise .4s both; word-break: break-word; }
.flash span { flex: 1; }
.flash-success { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 11%, var(--glass)); }
.flash-success > .icon { color: var(--ok); }
.flash-error { border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: color-mix(in srgb, var(--danger) 11%, var(--glass)); }
.flash-error > .icon { color: var(--danger); }
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 700; padding: .22rem .6rem; border-radius: 999px;
    background: var(--glass-2); border: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; }
.badge .icon { width: .95em; height: .95em; }
.badge-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.badge-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.badge-off { color: var(--ink-3); }

/* ---------- Hauptbereich ---------- */
.main { flex: 1; padding-block: 2.2rem 4rem; }
.footer { border-top: 1px solid var(--line); padding-block: 1.4rem; font-size: .88rem; color: var(--ink-3); }
.footer-in { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-links { display: inline-flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.footer a { color: var(--ink-2); font-weight: 600; }
.footer a:hover { color: var(--ink); }
.eyebrow { display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 1rem; padding: .35rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
    letter-spacing: .02em; color: var(--ink-2); background: var(--glass); border: 1px solid var(--line); }
.eyebrow .icon { color: var(--brand-2); width: 1em; height: 1em; }

/* ---------- Splash / Hero ---------- */
.hero { text-align: center; padding-top: clamp(1.5rem, 6vh, 4rem); max-width: 860px; margin-inline: auto; }
.hero h1 { font-size: clamp(2.7rem, 8vw, 5.4rem); font-weight: 850; letter-spacing: -.045em; line-height: .98; margin-bottom: 1.2rem; animation: rise .8s .05s both; }
.hero .eyebrow { animation: rise .7s both; }
.grad {
    background: linear-gradient(100deg, #a99bff 0%, #5fb4ff 38%, #22d3ee 62%, #ff7ab6 100%); background-size: 220% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: shine 9s ease-in-out infinite alternate;
}
:root[data-theme="light"] .grad { background-image: linear-gradient(100deg, #5b4be0 0%, #2f7cf0 40%, #0aa8c8 65%, #e0457f 100%); }
@keyframes shine { to { background-position: 100% 0; } }
.lead { max-width: 600px; margin: 0 auto 2rem; font-size: clamp(1.02rem, 2.2vw, 1.2rem); color: var(--ink-2); animation: rise .8s .15s both; }

.shorten { max-width: 760px; margin: 0 auto; animation: rise .8s .25s both; }
.shorten-bar {
    display: flex; align-items: center; gap: .6rem; padding: .5rem .5rem .5rem 1.15rem; border-radius: 22px;
    background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .08); transition: border-color .2s, box-shadow .25s;
}
.shorten-bar:focus-within { border-color: var(--brand); box-shadow: var(--shadow), var(--glow); }
.shorten-icon { color: var(--ink-3); width: 22px; height: 22px; }
.shorten-bar:focus-within .shorten-icon { color: var(--brand-2); }
.shorten-input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 1.08rem; padding: .95rem .25rem; }
.options { margin-top: .9rem; text-align: left; }
.options summary { cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; font-size: .9rem; color: var(--ink-2); padding: .4rem .7rem; border-radius: 10px; list-style: none; }
.options summary::-webkit-details-marker { display: none; }
.options summary:hover { background: var(--glass); }
.options[open] summary { color: var(--ink); }
.options-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: .7rem; padding: 1.1rem; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line); }
.hint { margin: 1rem 0 0; font-size: .92rem; color: var(--ink-3); }
.hint .icon { color: var(--brand-2); margin-right: .35rem; }

.result { max-width: 760px; margin: 1.4rem auto 0; text-align: left; animation: pop .5s cubic-bezier(.2, 1.3, .4, 1) both; }
.result[hidden] { display: none; }
.result-head { display: flex; justify-content: space-between; gap: .6rem; align-items: center; margin-bottom: .6rem; flex-wrap: wrap; }
.result-meta { display: inline-flex; gap: .4rem; }
.result-short { display: block; font-family: var(--mono); font-size: clamp(1.25rem, 4.2vw, 2rem); font-weight: 700; letter-spacing: -.02em; color: var(--ink); word-break: break-all; }
.result-short:hover { text-decoration: none; color: var(--brand-2); }
.result-target { margin: .15rem 0 1.1rem; font-size: .88rem; color: var(--ink-3); word-break: break-all; }
.result-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

.demo { margin: 3.4rem auto 0; max-width: 900px; animation: rise .9s .4s both; }
.demo-card { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 1.2rem; padding: 1.2rem 1.4rem; border-radius: 20px; box-shadow: var(--shadow); }
.demo-from, .demo-to { display: grid; gap: .35rem; min-width: 0; }
.demo-from code { color: var(--ink-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 70%, transparent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-to code { color: var(--ink); font-size: 1.1rem; white-space: nowrap; }
.demo-to b { background: linear-gradient(100deg, #8f80ff, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: pulse-text 2.6s ease-in-out infinite; }
.demo-tag { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.demo-tag-ok { color: var(--ok); }
.demo-arrow { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #7c6cff, #22d3ee); box-shadow: 0 8px 20px -8px rgba(110, 90, 255, .9); }
@keyframes pulse-text { 50% { filter: brightness(1.35); } }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.4rem auto 0; max-width: 1000px; }
.feature { padding: 1.35rem; border-radius: 20px; transition: transform .25s, border-color .25s, background .25s; animation: rise .9s both; }
.feature:nth-child(1) { animation-delay: .5s; } .feature:nth-child(2) { animation-delay: .58s; }
.feature:nth-child(3) { animation-delay: .66s; } .feature:nth-child(4) { animation-delay: .74s; }
.feature:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand) 55%, transparent); background: var(--glass-2); }
.feature h3 { margin-bottom: .35rem; }
.feature p { margin: 0; font-size: .92rem; color: var(--ink-3); }
.feature code { background: var(--glass-2); padding: .05rem .35rem; border-radius: 6px; color: var(--ink-2); }
.feature-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: .9rem; border-radius: 13px; color: #fff; background: linear-gradient(135deg, #7c6cff, #5b8cff); box-shadow: 0 10px 22px -10px rgba(110, 90, 255, .9); }
.feature:nth-child(2) .feature-icon { background: linear-gradient(135deg, #ff7ab6, #ff9a6a); box-shadow: 0 10px 22px -10px rgba(255, 90, 140, .8); }
.feature:nth-child(3) .feature-icon { background: linear-gradient(135deg, #14b8a6, #22d3ee); box-shadow: 0 10px 22px -10px rgba(20, 184, 166, .8); }
.feature:nth-child(4) .feature-icon { background: linear-gradient(135deg, #f59e0b, #fb7185); box-shadow: 0 10px 22px -10px rgba(245, 120, 60, .8); }
.feature-icon .icon { width: 22px; height: 22px; }

.stats { display: flex; justify-content: center; gap: clamp(1.5rem, 6vw, 4.5rem); margin: 3.2rem 0 0; flex-wrap: wrap; animation: rise .9s .8s both; }
.stat { text-align: center; }
.stat strong { display: block; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { font-size: .85rem; color: var(--ink-3); font-weight: 600; }

/* ---------- Dashboard / Admin ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.page-head h1 { margin: 0; }
.page-head .eyebrow { margin-bottom: .7rem; }
.stat-row { display: flex; gap: .7rem; flex-wrap: wrap; }
.stat-chip { display: grid; padding: .65rem 1.1rem; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); min-width: 92px; }
.stat-chip strong { font-size: 1.35rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-chip span { font-size: .78rem; font-weight: 600; color: var(--ink-3); }
.create-card h2 { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.create-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; align-items: end; }
.field-wide { grid-column: 1 / -1; }
.create-submit { grid-column: 1 / -1; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 2rem 0 1rem; }
.list-head h2 { margin: 0; display: flex; align-items: center; gap: .6rem; }
.count { font-size: .8rem; font-weight: 800; padding: .15rem .6rem; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--line); color: var(--ink-2); }
.search { position: relative; width: min(320px, 100%); }
.search .icon { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 18px; height: 18px; }
.search input { padding-left: 2.5rem; }

.link-list { display: grid; gap: .8rem; }
.link-row { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1.1rem 1.3rem; transition: transform .2s, border-color .2s; }
.link-row:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.link-row.status-disabled, .link-row.status-expired { opacity: .72; }
.link-main { min-width: 0; flex: 1; }
.link-title { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-bottom: .15rem; }
.link-short { font-family: var(--mono); font-weight: 700; font-size: 1.12rem; color: var(--ink); word-break: break-all; }
.link-short:hover { color: var(--brand-2); text-decoration: none; }
.link-target, .link-meta { margin: .1rem 0 0; font-size: .86rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; word-break: break-all; }
.link-actions { display: flex; gap: .4rem; flex: none; }
.empty { text-align: center; padding: 3rem 1.5rem; }
.empty-icon { width: 44px; height: 44px; color: var(--ink-3); margin-bottom: .6rem; }
.pager { display: flex; justify-content: center; gap: .4rem; margin-top: 1.6rem; flex-wrap: wrap; }
.pager-item { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 .7rem; border-radius: 11px; font-weight: 700; color: var(--ink-2); background: var(--glass); border: 1px solid var(--line); }
a.pager-item:hover { text-decoration: none; background: var(--glass-2); color: var(--ink); }
.pager-item.is-current { color: #fff; border-color: transparent; background: linear-gradient(135deg, #7c6cff, #5b8cff); }
.pager-item.is-disabled { opacity: .4; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.kpi { display: grid; gap: .1rem; padding: 1.2rem 1.4rem; }
.kpi strong { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi > span:last-child { color: var(--ink-3); font-weight: 600; font-size: .9rem; }
.kpi-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: .5rem; border-radius: 11px; color: #fff; background: linear-gradient(135deg, #7c6cff, #22d3ee); }
.tabs { display: inline-flex; padding: .25rem; gap: .2rem; border-radius: 13px; background: var(--glass); border: 1px solid var(--line); }
.tab { padding: .5rem 1.1rem; border-radius: 10px; font-weight: 700; color: var(--ink-2); }
.tab:hover { text-decoration: none; color: var(--ink); }
.tab.is-active { color: #fff; background: linear-gradient(135deg, #7c6cff, #5b8cff); }
.table-wrap { padding: .4rem; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: .8rem .9rem; }
.table td { padding: .8rem .9rem; border-top: 1px solid var(--line); vertical-align: middle; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.is-blocked td { opacity: .6; }
.actions-col { white-space: nowrap; }
.actions-col .inline-form { margin-right: .3rem; }

/* ---------- Anmeldung & Statusseiten ---------- */
.auth { display: grid; place-items: center; padding-top: 2.5vh; }
.auth-card { width: min(440px, 100%); padding: 2rem; }
.auth-wide .auth-card { width: min(720px, 100%); }
.auth-card h1 { font-size: 1.9rem; }
.auth-card .muted { margin-bottom: 1.4rem; }
.auth-alt { margin: 1.4rem 0 0; text-align: center; color: var(--ink-3); font-size: .93rem; }
.back { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: 1rem; font-weight: 700; font-size: .9rem; }
.i-back { transform: rotate(180deg); }
.state-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 1rem; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #7c6cff, #22d3ee); box-shadow: 0 14px 30px -12px rgba(110, 90, 255, .9); }
.state-icon .icon { width: 30px; height: 30px; }
.state-warn { background: linear-gradient(135deg, #f59e0b, #fb7185); box-shadow: 0 14px 30px -12px rgba(245, 120, 60, .9); }
.error-code { margin: 0; font-size: 5rem; font-weight: 900; line-height: 1; letter-spacing: -.06em;
    background: linear-gradient(135deg, #a99bff, #22d3ee 60%, #ff7ab6); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }

/* ---------- Dialog & Toast ---------- */
.dialog { border: 1px solid var(--line); border-radius: 24px; background: var(--card-solid); color: var(--ink); padding: 1.6rem; width: min(92vw, 380px); text-align: center; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .8); }
.dialog::backdrop { background: rgba(6, 5, 18, .62); backdrop-filter: blur(6px); }
.dialog[open] { animation: pop .35s cubic-bezier(.2, 1.3, .4, 1); }
.dialog h3 { margin-bottom: 1rem; }
.dialog-close { position: absolute; top: .8rem; right: .8rem; margin: 0; }
.qr-frame { display: inline-block; padding: 14px; border-radius: 18px; background: #fff; box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .5); }
.qr-frame canvas { display: block; width: 252px; height: 252px; }
.qr-url { margin: 1rem 0; font-family: var(--mono); font-size: .88rem; color: var(--ink-3); word-break: break-all; }
.dialog-actions { display: flex; justify-content: center; gap: .6rem; }
.toast { position: fixed; left: 50%; bottom: 1.6rem; transform: translateX(-50%); z-index: 50; padding: .7rem 1.2rem; border-radius: 999px; font-weight: 700; font-size: .92rem;
    color: #fff; background: #1f1c3d; border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .7); animation: rise .3s both; }
.toast[hidden] { display: none; }

/* ---------- Animationen ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Responsiv ---------- */
@media (max-width: 920px) {
    .features { grid-template-columns: repeat(2, 1fr); }
    .create-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
    .topbar-in { height: 60px; }
    .nav-btn span { display: none; }
    .hero h1 { letter-spacing: -.04em; }
    .shorten-bar { flex-wrap: wrap; padding: .6rem; border-radius: 20px; }
    .shorten-icon { display: none; }
    .shorten-input { flex-basis: 100%; padding: .7rem .6rem; }
    .shorten-bar .btn { flex: 1; }
    .options-grid, .grid-2, .create-form { grid-template-columns: 1fr; }
    .demo-card { grid-template-columns: 1fr; gap: .8rem; }
    .demo-arrow { transform: rotate(90deg); justify-self: center; }
    .features { grid-template-columns: 1fr; }
    .kpis { grid-template-columns: 1fr; }
    .link-row { flex-direction: column; align-items: stretch; }
    .link-actions { justify-content: flex-end; }
    .auth-card { padding: 1.4rem; }

    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table tr { padding: .6rem .4rem; border-top: 1px solid var(--line); }
    .table td { border: 0; padding: .3rem .6rem; text-align: left !important; display: flex; justify-content: space-between; gap: 1rem; }
    .table td::before { content: attr(data-label); font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); flex: none; padding-top: .15rem; }
    .actions-col { white-space: normal; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
