/* FABULOUS SALES – schwarz/weiß, clean, abgerundet */

:root {
    --bg: #f6f6f5;
    --surface: #ffffff;
    --ink: #0a0a0a;
    --ink-2: #3d3d3d;
    --muted: #8a8a8a;
    --line: #e7e7e5;
    --line-strong: #d4d4d2;
    --focus: rgba(10, 10, 10, .14);
    --error: #0a0a0a;
    --radius-lg: 28px;
    --radius: 16px;
    --radius-sm: 12px;
    --shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 40px -12px rgba(0,0,0,.10);
    --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
}

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

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.55 var(--font);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
h1, h2 { margin: 0; letter-spacing: -.03em; line-height: 1.05; }

/* --- Topbar ---------------------------------------------------------------- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 22px 20px;
}
.topbar form { margin: 0; }
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: .14em;
}
.brand strong { font-weight: 800; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--ink);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0;
    font-size: 16px;
}

/* --- Layout ---------------------------------------------------------------- */
.main {
    flex: 1;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 24px 16px 56px;
}
body:has(.admin) .main, body:has(.admin) .topbar { max-width: 1400px; }

.footer {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    padding: 28px 16px 36px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 20px;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* --- Hero ------------------------------------------------------------------ */
.hero { padding: 4px 4px 32px; }
.hero h1 { font-size: clamp(24px, 6.6vw, 46px); font-weight: 800; line-height: 1.1; }
.eyebrow {
    display: inline-block;
    margin: 0 0 14px;
    padding: 6px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-2);
    background: var(--surface);
}
.lead { font-size: 18px; color: var(--ink-2); margin: 16px 0 0; max-width: 34em; }
.muted { color: var(--muted); }
.h2 { font-size: 32px; font-weight: 800; }

/* --- Card ------------------------------------------------------------------ */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
}
.card-center { text-align: center; padding: 56px 32px; }
.card-center .lead { margin: 12px auto 28px; }
.card-narrow { max-width: 420px; margin: 40px auto 0; }
.card-narrow .muted { margin: 8px 0 24px; }

@media (max-width: 560px) {
    .card { padding: 22px; border-radius: 22px; }
}

/* --- Form ------------------------------------------------------------------ */
.form { display: grid; gap: 22px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

.field { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend {
    font-size: 14px;
    font-weight: 600;
    padding: 0;
    margin-bottom: 0;
}
fieldset.field legend { margin-bottom: 10px; }
.req { color: var(--ink); }
.opt { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 4px; }

input[type="text"], input[type="tel"], input[type="email"], input[type="password"], input[type="search"], textarea {
    width: 100%;
    font: inherit;
    color: var(--ink);
    background: var(--bg);
    border: 1.5px solid transparent;
    border-radius: var(--radius);
    padding: 14px 16px;
    transition: border-color .15s, background .15s, box-shadow .15s;
    appearance: none;
}
textarea { resize: vertical; min-height: 120px; }
input::placeholder, textarea::placeholder { color: #a9a9a7; }
input:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, textarea:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--ink);
    box-shadow: 0 0 0 4px var(--focus);
}
.has-error input, .has-error textarea { border-color: var(--ink); background: var(--surface); }
.field-error {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--error);
    display: flex;
    align-items: center;
    gap: 6px;
}
.field-error::before {
    content: "!";
    display: inline-grid;
    place-items: center;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

/* Chips (Checkbox-Pills) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; font-weight: 500 !important; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1.5px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    font-size: 14px;
    line-height: 1.3;
    transition: background .15s, color .15s, border-color .15s, transform .1s;
    user-select: none;
}
.chip span::before {
    content: "";
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 1.5px solid var(--line-strong);
    flex: none;
    transition: inherit;
}
.chip:hover span { border-color: var(--ink); }
.chip:active span { transform: scale(.97); }
.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip input:checked + span::before {
    border-color: #fff;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4L18 8' fill='none' stroke='%230a0a0a' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/10px no-repeat;
}
.chip input:focus-visible + span { box-shadow: 0 0 0 4px var(--focus); }
.has-error .chip span { border-color: var(--ink-2); }
/* Produkte: kompakte Pills ohne Kreis-Indikator */
.chips-wrap { gap: 6px; }
.chips-wrap .chip span { font-size: 13px; padding: 6px 12px; border-width: 1px; gap: 0; }
.chips-wrap .chip span::before { display: none; }

/* Honeypot */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.fineprint { margin: -6px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }

/* --- Buttons --------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    border-radius: 999px;
    padding: 14px 24px;
    border: 1.5px solid var(--ink);
    cursor: pointer;
    transition: transform .1s, background .15s, color .15s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--focus); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #262626; }
.btn-primary svg { transition: transform .2s; }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-block { width: 100%; padding: 17px 24px; font-size: 16px; }
.btn[disabled] { opacity: .6; pointer-events: none; }

.icon-btn {
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
}
.icon-btn:hover { color: #fff; background: var(--ink); border-color: var(--ink); }

/* --- Alerts ---------------------------------------------------------------- */
.alert, .notice {
    border-radius: var(--radius);
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 22px;
}
.alert { background: var(--ink); color: #fff; }
.notice { background: var(--surface); border: 1px solid var(--line); }

/* --- Danke ----------------------------------------------------------------- */
.check {
    display: grid;
    place-items: center;
    width: 68px; height: 68px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both;
}
.card-center h1 { font-size: 40px; font-weight: 800; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- Admin ----------------------------------------------------------------- */
.admin-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.search { width: 240px !important; padding: 12px 18px !important; border-radius: 999px !important; background: var(--surface) !important; border-color: var(--line) !important; }
.search:focus { border-color: var(--ink) !important; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px 20px;
    font-size: 13px;
    color: var(--muted);
}
.stat span { display: block; font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: -.03em; line-height: 1.1; }
.stat:first-child { background: var(--ink); border-color: var(--ink); color: #bdbdbd; }
.stat:first-child span { color: #fff; }

.list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .list { grid-template-columns: 1fr; } }
.entry {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 22px;
    display: grid;
    gap: 16px;
    align-content: start;
    transition: border-color .15s, box-shadow .15s;
}
.entry:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.entry-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.entry-head form { margin: 0; }
.entry-name { font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 4px; }
.entry-head time { font-size: 13px; }
.entry-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.entry-meta div { background: var(--bg); border-radius: var(--radius-sm); padding: 10px 14px; min-width: 0; }
.entry-meta dt { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.entry-meta dd { margin: 2px 0 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-meta a { text-decoration: none; }
.entry-meta a:hover { text-decoration: underline; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: 4px; width: 100%; }
.tag { font-size: 12.5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-strong); }
.tag-solid { background: var(--ink); color: #fff; border-color: var(--ink); }
.entry-msg {
    margin: 0;
    padding-top: 14px;
    border-top: 1px dashed var(--line-strong);
    color: var(--ink-2);
    font-size: 15px;
    overflow-wrap: anywhere;
}
.empty { padding: 72px 24px; }

/* Ansicht-Umschalter */
.segmented {
    display: inline-flex;
    padding: 4px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
}
.segmented button {
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.segmented button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }

/* Tabellenansicht */
.table-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-wrap.is-empty { display: none; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
    position: sticky;
    top: 0;
    background: var(--surface);
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    padding: 16px 14px 12px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table td {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    line-height: 1.45;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--bg); }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 16px; }
.table td a { text-decoration: none; }
.table td a:hover { text-decoration: underline; }
.table .nowrap { white-space: nowrap; }
.table .strong { font-weight: 600; min-width: 120px; }
.table .col-wide { min-width: 220px; max-width: 360px; overflow-wrap: anywhere; color: var(--ink-2); }
.table .icon-btn { width: 32px; height: 32px; }
.table form { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.no-results { text-align: center; padding: 32px; }

@media (max-width: 560px) {
    .search { width: 100% !important; }
    .admin-actions { width: 100%; }
    .stat { padding: 14px; }
    .stat span { font-size: 24px; }
    .entry-meta { grid-template-columns: 1fr; }
}

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