/* =========================================================================
   tikx.me – Design-System (Mobile First, helles + dunkles Farbschema)
   Eine Datei für App, öffentliche Seiten und Anmeldeseiten (Identity).
   ========================================================================= */

:root {
    --primary: #0f766e;
    --primary-600: #0d9488;
    --primary-50: #e6f4f2;
    --primary-contrast: #ffffff;
    --danger: #dc2626;
    --danger-50: #fef2f2;
    --success: #16a34a;
    --success-50: #f0fdf4;
    --warn-50: #fffbeb;
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-2: #f1f3f5;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
    --radius: 16px;
    --radius-sm: 10px;
    --topbar-h: 56px;
    --bottomnav-h: 64px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary: #2dd4bf;
        --primary-600: #14b8a6;
        --primary-50: #0f2e2b;
        --primary-contrast: #042f2e;
        --danger: #f87171;
        --danger-50: #3a1616;
        --success: #4ade80;
        --success-50: #0f2a18;
        --warn-50: #2e2410;
        --bg: #0b1016;
        --surface: #121a23;
        --surface-2: #1a2430;
        --text: #e5e9ef;
        --muted: #93a1b3;
        --border: #243140;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4);
        color-scheme: dark;
    }
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { line-height: 1.2; margin: 0 0 .5rem; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
h4, h5 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
.muted, .text-muted { color: var(--muted); }
.small, small { font-size: .85rem; }
.hide { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.icon { flex-shrink: 0; vertical-align: middle; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: .75rem; }
.row-flex { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.spacer { flex: 1; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.center { text-align: center; }

.brand { font-weight: 800; font-size: 1.25rem; color: var(--text); letter-spacing: -.02em; text-decoration: none !important; }
.brand span { color: var(--primary); }
.brand-sm { font-size: 1rem; }

/* ---------- App-Rahmen ---------- */
.shell { min-height: 100dvh; }
.topbar {
    position: sticky; top: 0; z-index: 20;
    height: var(--topbar-h);
    display: flex; align-items: center; gap: 1rem;
    padding: 0 1rem;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(1.5) blur(12px);
    border-bottom: 1px solid var(--border);
}
.topbar .brand { margin-right: auto; }
.page {
    max-width: 760px;
    margin: 0 auto;
    padding: 1rem 1rem calc(var(--bottomnav-h) + var(--safe-bottom) + 1.5rem);
}
.page-wide { max-width: 1100px; }

.account { display: flex; align-items: center; gap: .25rem; }
.account form { margin: 0; }
.account-link { display: flex; align-items: center; gap: .5rem; color: var(--text); text-decoration: none !important; }
.account-name { display: none; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; color: var(--muted); }
.avatar-sm {
    width: 32px; height: 32px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--primary-50); color: var(--primary); font-weight: 700; font-size: .9rem;
}

/* Untere Navigationsleiste (Handy) */
.bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    display: flex; justify-content: space-around;
    height: calc(var(--bottomnav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: saturate(1.5) blur(12px);
    border-top: 1px solid var(--border);
}
.bottomnav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--muted); font-size: .72rem; font-weight: 600; text-decoration: none !important;
}
.bottomnav a.active { color: var(--primary); }
.topnav { display: none; }

@media (min-width: 820px) {
    .bottomnav { display: none; }
    .topnav { display: flex; gap: .25rem; margin-right: auto; }
    .topnav a {
        display: flex; align-items: center; gap: .4rem;
        padding: .45rem .8rem; border-radius: 999px;
        color: var(--muted); font-weight: 600; font-size: .92rem; text-decoration: none !important;
    }
    .topnav a:hover { background: var(--surface-2); color: var(--text); }
    .topnav a.active { background: var(--primary-50); color: var(--primary); }
    .topbar .brand { margin-right: 1rem; }
    .account-name { display: inline; }
    .page { padding-bottom: 3rem; padding-top: 1.5rem; }
}

/* ---------- Seitenkopf ---------- */
.page-head { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.page-head .spacer { flex: 1; }
.back { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-weight: 600; margin-bottom: .75rem; }

/* ---------- Flächen ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    margin-bottom: 1rem;
}
.card-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: .75rem; }
.section-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 1.5rem 0 .6rem; }

/* ---------- Knöpfe ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    min-height: 44px; padding: .6rem 1.1rem;
    border-radius: 12px; border: 1px solid transparent;
    font: inherit; font-weight: 650; font-size: .95rem; line-height: 1.2;
    cursor: pointer; text-decoration: none !important; white-space: nowrap;
    transition: background .15s, border-color .15s, transform .05s;
    background: var(--surface-2); color: var(--text);
}
.btn:active { transform: scale(.98); }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--primary-contrast); }
.btn-primary:hover { background: var(--primary-600); }
.btn-ghost, .btn-link, .btn-secondary, .btn-outline-secondary, .btn-outline-primary { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover, .btn-secondary:hover, .btn-outline-secondary:hover, .btn-outline-primary:hover { background: var(--surface-2); }
.btn-link { border-color: transparent; color: var(--primary); padding-left: .25rem; padding-right: .25rem; }
.btn-danger, .btn-outline-danger { background: transparent; border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.btn-danger:hover, .btn-outline-danger:hover { background: var(--danger-50); }
.btn-danger.solid { background: var(--danger); color: #fff; }
.btn-sm { min-height: 36px; padding: .4rem .8rem; font-size: .88rem; border-radius: 10px; }
.btn-lg { min-height: 52px; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; }
.btn-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px;
    border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.btn-icon:hover { background: var(--surface-2); color: var(--text); }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.actions > .btn { flex: 1 1 auto; }

/* ---------- Formulare ---------- */
label, .label { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); margin: .75rem 0 .3rem; }
.field:first-child > label { margin-top: 0; }
.input, .form-control, input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=date], input[type=search], textarea, select {
    width: 100%;
    min-height: 46px;
    padding: .65rem .85rem;
    font: inherit; font-size: 16px; /* 16px verhindert das Auto-Zoomen auf iOS */
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; }
input[type=color] { width: 44px; height: 44px; padding: 2px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.input:focus, .form-control:focus, input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}
.input-group { display: flex; align-items: stretch; }
.input-group .prefix {
    display: flex; align-items: center; padding: 0 .75rem;
    border: 1px solid var(--border); border-right: 0; border-radius: 12px 0 0 12px;
    background: var(--surface-2); color: var(--muted); font-size: .95rem; white-space: nowrap;
}
.input-group .prefix + input { border-radius: 0 12px 12px 0; }
.input-row { display: flex; gap: .5rem; }
.input-row > * { flex: 1; min-width: 0; }
.input-row > .narrow { flex: 0 0 34%; }
.hint { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.checkbox, .form-check { display: flex; align-items: center; gap: .5rem; margin: .75rem 0; }
.checkbox label, .form-check label { margin: 0; color: var(--text); font-weight: 500; display: flex; align-items: center; gap: .5rem; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--primary); }
.validation-message, .field-validation-error, .text-danger { color: var(--danger); font-size: .85rem; }
.validation-summary-errors ul, .text-danger ul { margin: .25rem 0; padding-left: 1.1rem; }
.invalid { border-color: var(--danger) !important; }

/* ---------- Hinweise ---------- */
.alert { padding: .8rem 1rem; border-radius: 12px; margin-bottom: 1rem; border: 1px solid var(--border); background: var(--surface-2); }
.alert-success { background: var(--success-50); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.alert-danger, .alert-error { background: var(--danger-50); border-color: color-mix(in srgb, var(--danger) 35%, transparent); color: var(--danger); }
.alert-info, .alert-warning { background: var(--warn-50); }
.badge {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .15rem .55rem; border-radius: 999px;
    background: var(--primary-50); color: var(--primary);
    font-size: .8rem; font-weight: 700; white-space: nowrap;
}
.badge-muted { background: var(--surface-2); color: var(--muted); }

/* ---------- Listen ---------- */
.list { display: flex; flex-direction: column; gap: .6rem; }
.item {
    display: flex; align-items: center; gap: .75rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: .8rem .9rem; box-shadow: var(--shadow);
    color: var(--text); text-decoration: none !important;
}
a.item:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.item-main { flex: 1; min-width: 0; }
.item-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-sub { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .75rem; }
.item-meta > span { display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; }
.avatar {
    width: 48px; height: 48px; border-radius: 50%; flex: 0 0 48px;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    background: var(--primary); color: #fff; font-weight: 700;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.link-icon {
    width: 42px; height: 42px; border-radius: 12px; flex: 0 0 42px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-50); color: var(--primary);
}

.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty .icon { color: var(--primary); margin-bottom: .5rem; }
.empty h2 { color: var(--text); }

/* ---------- Erstellen-Box ---------- */
.composer { padding: 1rem; }
.composer .url-row { display: flex; gap: .5rem; }
.composer .url-row input { flex: 1; min-width: 0; }
.toggle-link { background: none; border: 0; padding: .5rem 0 0; color: var(--primary); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; }
.created {
    border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent);
    background: var(--primary-50);
}
.created .short { font-size: 1.3rem; font-weight: 800; word-break: break-all; }

/* ---------- Statistik ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin-bottom: 1rem; }
@media (min-width: 620px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem .9rem; }
.stat b { display: block; font-size: 1.5rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .8rem; }
.chart { width: 100%; height: 140px; display: block; }
.chart rect { fill: var(--primary); }
.chart rect.zero { fill: var(--border); }
.chart text { fill: var(--muted); font-size: 10px; }

.qr-box { display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.qr-box img { width: 220px; height: 220px; background: #fff; padding: 10px; border-radius: 12px; border: 1px solid var(--border); image-rendering: pixelated; }
.big-link { font-size: 1.35rem; font-weight: 800; word-break: break-all; }

/* ---------- Tabs / Segmente ---------- */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; padding: .45rem .9rem; border-radius: 9px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- Karten-Editor ---------- */
.editor { display: grid; gap: 1rem; }
@media (min-width: 980px) {
    .editor { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
    .editor .preview-col { position: sticky; top: calc(var(--topbar-h) + 1rem); }
    .editor .only-mobile { display: none; }
}
@media (max-width: 979px) {
    .editor .preview-col.hidden-mobile, .editor .form-col.hidden-mobile { display: none; }
}
.photo-row { display: flex; align-items: center; gap: 1rem; }
.photo-pick {
    position: relative; width: 88px; height: 88px; border-radius: 50%; flex: 0 0 88px;
    background: var(--surface-2); border: 2px dashed var(--border);
    display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; color: var(--muted);
}
.photo-pick img { width: 100%; height: 100%; object-fit: cover; }
.cover-pick {
    position: relative; height: 96px; border-radius: 12px; margin-top: .75rem;
    background: var(--surface-2) center/cover no-repeat; border: 2px dashed var(--border);
    display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; overflow: hidden;
}
.photo-pick input, .cover-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.swatches { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--text); }
.link-edit { border: 1px solid var(--border); border-radius: 12px; padding: .6rem; margin-bottom: .6rem; background: var(--surface-2); display: flex; flex-direction: column; gap: .45rem; }
.link-edit-row { display: flex; gap: .5rem; align-items: center; }
.link-edit-row input[type=text] { flex: 1; min-width: 0; }
.link-edit-tools { display: flex; align-items: center; gap: .25rem; }
.link-edit-tools .btn-icon:disabled { opacity: .3; cursor: default; }
.savebar {
    position: sticky; bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + .5rem); z-index: 10;
    display: flex; gap: .5rem; align-items: center;
    padding: .6rem; border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px);
    border: 1px solid var(--border); box-shadow: var(--shadow);
}
@media (min-width: 820px) { .savebar { bottom: 1rem; } }
.savebar .btn-primary { flex: 1; }

/* ---------- Visitenkarte (öffentlich + Vorschau) ---------- */
.vcard-page { min-height: 100dvh; padding: 0 0 2rem; background: var(--bg); }
.vcard {
    --accent: #0f766e;
    max-width: 440px; margin: 0 auto;
    background: var(--surface); color: var(--text);
    border-radius: 0 0 28px 28px; overflow: hidden;
    box-shadow: var(--shadow);
    padding-bottom: 1.25rem;
}
@media (min-width: 480px) { .vcard-page { padding-top: 2rem; } .vcard { border-radius: 28px; } }
.vcard-cover {
    height: 150px;
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #111827));
    background-size: cover; background-position: center;
}
.vcard-photo {
    width: 124px; height: 124px; margin: -62px auto .75rem; border-radius: 50%;
    border: 5px solid var(--surface); overflow: hidden;
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 2.4rem; font-weight: 700;
    position: relative;
}
.vcard-photo img { width: 100%; height: 100%; object-fit: cover; }
.vcard-head { text-align: center; padding: 0 1.25rem; }
.vcard-name { font-size: 1.55rem; margin: 0 0 .15rem; }
.vcard-job { color: var(--muted); }
.vcard-company { font-weight: 650; }
.vcard-bio { margin: .9rem 0 0; color: var(--text); white-space: pre-line; }
.vcard-cta { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; padding: 1.1rem 1.25rem .4rem; }
.vcard-cta a, .vcard-cta button {
    display: flex; flex-direction: column; align-items: center; gap: .3rem;
    padding: .7rem .25rem; border-radius: 14px; border: 0;
    background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent);
    font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; text-decoration: none !important;
}
.vcard-save {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    margin: .6rem 1.25rem; min-height: 52px; border-radius: 14px;
    background: var(--accent); color: #fff !important; font-weight: 700; text-decoration: none !important;
}
.vcard-list { padding: .25rem 1.25rem; }
.vcard-row {
    display: flex; align-items: center; gap: .85rem; padding: .75rem 0;
    border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important;
}
.vcard-row:last-child { border-bottom: 0; }
.vcard-row .icon { color: var(--accent); }
.vcard-row small { display: block; color: var(--muted); font-size: .75rem; }
.vcard-row .val { min-width: 0; overflow-wrap: anywhere; }
/* Link-Knöpfe im Linktree-Stil (Farbe kommt je Knopf aus dem style-Attribut) */
.vcard-links { display: flex; flex-direction: column; gap: .6rem; padding: .9rem 1.25rem .15rem; }
.vcard-links a {
    position: relative; display: flex; align-items: center; justify-content: center;
    min-height: 54px; padding: .6rem 3rem; border-radius: 14px;
    background: var(--accent); color: #fff;
    font-weight: 700; font-size: 1rem; text-align: center; text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.12); transition: transform .08s, filter .15s;
}
.vcard-links a:hover { filter: brightness(1.06); }
.vcard-links a:active { transform: scale(.98); }
.vcard-links a .icon { position: absolute; left: 1rem; }
.vcard-qr { margin: 1rem 1.25rem 0; }
.vcard-qr summary { cursor: pointer; color: var(--muted); font-weight: 600; text-align: center; list-style: none; }
.vcard-qr summary::-webkit-details-marker { display: none; }
.vcard-qr img { display: block; margin: .75rem auto 0; width: 220px; background: #fff; padding: 10px; border-radius: 12px; }
.vcard-foot { max-width: 440px; margin: 1rem auto 0; text-align: center; font-size: .85rem; color: var(--muted); padding: 0 1rem; }
.vcard-owner { display: flex; gap: .5rem; justify-content: center; margin: 1rem 1.25rem 0; flex-wrap: wrap; }
.preview-frame { border-radius: 28px; overflow: hidden; border: 1px solid var(--border); background: var(--bg); }
.preview-frame .vcard { border-radius: 0; box-shadow: none; }

/* ---------- Öffentliche Seiten ---------- */
.public { min-height: 100dvh; display: flex; flex-direction: column; }
.public > main { flex: 1; }
.public-top {
    display: flex; align-items: center; gap: .75rem;
    max-width: 1100px; width: 100%; margin: 0 auto; padding: .9rem 1rem;
}
.public-top .brand { margin-right: auto; }
.public-top nav { display: flex; gap: .5rem; }
.public-footer {
    display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
    max-width: 1100px; width: 100%; margin: 2rem auto 0; padding: 1.5rem 1rem calc(1.5rem + var(--safe-bottom));
    border-top: 1px solid var(--border); font-size: .9rem;
}
.public-footer div { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }
.public-footer nav { display: flex; gap: 1rem; }
.public-footer nav a { color: var(--muted); }
.prose { max-width: 760px; margin: 0 auto; padding: 1rem; }
.prose h2, .prose h3, .prose h4 { margin-top: 1.5rem; }

.hero { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 1rem; display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.1fr .9fr; padding-top: 3.5rem; } }
.hero h1 { font-size: clamp(2rem, 7vw, 3.3rem); letter-spacing: -.03em; margin-bottom: 1rem; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 34rem; }
.hero .cta { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero .cta .btn { min-width: 170px; }
.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art .vcard { width: 100%; max-width: 330px; border-radius: 28px; transform: rotate(2deg); }
.hero-art .pill {
    position: absolute; left: 0; bottom: 18%;
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
    border-radius: 14px; padding: .6rem .85rem; font-weight: 700; display: flex; gap: .5rem; align-items: center;
    transform: rotate(-3deg);
}
.features { max-width: 1100px; margin: 2rem auto 0; padding: 0 1rem; display: grid; gap: 1rem; }
@media (min-width: 760px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature .link-icon { margin-bottom: .75rem; }
.steps { max-width: 1100px; margin: 2.5rem auto 0; padding: 0 1rem; }
.steps ol { display: grid; gap: .75rem; padding: 0; list-style: none; counter-reset: s; }
@media (min-width: 760px) { .steps ol { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1rem 1rem 3.2rem; position: relative; }
.steps li::before {
    content: counter(s); position: absolute; left: 1rem; top: 1rem;
    width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--primary); color: var(--primary-contrast);
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem;
}

/* ---------- Anmeldeseiten (ASP.NET Identity) ---------- */
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 1rem; }
.auth-wrap .card { padding: 1.5rem; }
.auth-wrap h1 { font-size: 1.5rem; }
.form-group { margin-bottom: .25rem; }
.row { display: flex; flex-wrap: wrap; gap: 1rem; }
.row > [class*=col-] { flex: 1 1 100%; min-width: 0; }
@media (min-width: 768px) {
    .row > .col-md-3 { flex: 0 0 calc(25% - 1rem); }
    .row > .col-md-9 { flex: 1 1 0; }
    .row > .col-md-6 { flex: 1 1 calc(50% - 1rem); }
}
.manage { display: grid; gap: 1rem; }
@media (min-width: 820px) { .manage { grid-template-columns: 220px minmax(0, 1fr); align-items: start; } }
.nav-pills { display: flex; gap: .35rem; overflow-x: auto; padding: 0; margin: 0; list-style: none; scrollbar-width: none; }
.nav-pills::-webkit-scrollbar { display: none; }
@media (min-width: 820px) { .nav-pills { flex-direction: column; } }
.nav-pills .nav-link {
    display: block; padding: .55rem .85rem; border-radius: 10px; white-space: nowrap;
    color: var(--muted); font-weight: 600; text-decoration: none !important;
}
.nav-pills .nav-link.active { background: var(--primary-50); color: var(--primary); }
.nav-pills .nav-link:hover { background: var(--surface-2); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table-wrap { overflow-x: auto; }
dl { margin: 0; }

/* ---------- Blazor-Fehlerleiste ---------- */
#blazor-error-ui {
    display: none; position: fixed; left: 1rem; right: 1rem; bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 1rem); z-index: 1000;
    padding: .8rem 1rem; border-radius: 12px; background: #fef3c7; color: #78350f; box-shadow: var(--shadow);
}
#blazor-error-ui .dismiss { cursor: pointer; float: right; }
#blazor-error-ui .reload { margin-left: .5rem; font-weight: 700; }
.blazor-error-boundary { padding: 1rem; border-radius: 12px; background: var(--danger-50); color: var(--danger); }
.blazor-error-boundary::after { content: "Hier ist etwas schiefgelaufen. Bitte die Seite neu laden."; }

/* Kurze Rückmeldung (Kopiert, Gespeichert) */
.toast {
    position: fixed; left: 50%; bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 1rem); transform: translateX(-50%);
    z-index: 1000; background: var(--text); color: var(--bg); padding: .6rem 1rem; border-radius: 999px;
    font-weight: 600; font-size: .92rem; box-shadow: var(--shadow); animation: toast-in .2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (min-width: 820px) { .toast, #blazor-error-ui { bottom: 1.5rem; } }

/* ---------- Mehrfachauswahl in der Link-Liste ---------- */
.select-all { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 .6rem .9rem; color: var(--muted); font-size: .88rem; font-weight: 600; cursor: pointer; }
.select-all input, .item-check { width: 20px; height: 20px; flex: 0 0 20px; accent-color: var(--primary); cursor: pointer; margin: 0; }
.item-selected { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.btn-icon-danger:hover { background: var(--danger-50); color: var(--danger); }
.bulkbar {
    position: sticky; bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + .5rem); z-index: 15;
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    margin-top: 1rem; padding: .6rem .8rem; border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px);
    border: 1px solid var(--border); box-shadow: 0 6px 24px rgba(15, 23, 42, .15);
}
@media (min-width: 820px) { .bulkbar { bottom: 1rem; } }

/* ---------- tikx.me Pro ---------- */
.pro-badge {
    display: inline-flex; align-items: center; padding: .1rem .5rem; border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff;
    font-size: .7rem; font-weight: 800; letter-spacing: .06em; vertical-align: middle;
}
.pro-hint { border-color: color-mix(in srgb, #f59e0b 45%, var(--border)); background: color-mix(in srgb, #f59e0b 7%, var(--surface)); }
/* ---------- Tarife / Preise ---------- */
.pricing { max-width: 1100px; margin: 2.5rem auto 0; padding: 0 1rem; }
.page .pricing { padding: 0; margin-top: 0; }
.tarife { display: grid; gap: 1rem; margin-top: 1rem; }
@media (min-width: 640px) { .tarife { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tarife { grid-template-columns: repeat(4, 1fr); } .page .tarife { grid-template-columns: repeat(2, 1fr); } }
.tarif { position: relative; display: flex; flex-direction: column; margin-bottom: 0; }
.tarif h3 { margin: 0 0 .25rem; }
.tarif ul { padding-left: 1.1rem; margin: .5rem 0 1rem; flex: 1; }
.tarif li { margin-bottom: .35rem; }
.tarif-preis { font-size: 1.7rem; font-weight: 800; line-height: 1.2; }
.tarif-preis small { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); }
.tarif-hervor { border: 2px solid var(--primary); }
.tarif-aktuell { border: 2px solid #f59e0b; }
.tarif-flag {
    position: absolute; top: -.7rem; right: 1rem; padding: .15rem .6rem; border-radius: 999px;
    background: var(--primary); color: var(--primary-contrast); font-size: .72rem; font-weight: 800;
}
.tarif-aktuell .tarif-flag { background: #f59e0b; color: #fff; }
.usage { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: .75rem; margin-top: .5rem; font-size: .9rem; }
.usage-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.usage-fill { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.usage-fill.voll { background: #f59e0b; }
.usage-text { color: var(--muted); white-space: nowrap; }
.admin-user { flex-wrap: wrap; }
.admin-tarif { width: auto; min-height: 38px; padding: .35rem .6rem; }
.admin-limits { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem; margin-top: .5rem; }
.admin-limits label { margin: 0; font-size: .8rem; }
.admin-limits input { width: 110px; min-height: 38px; padding: .35rem .6rem; }
