/* GastroCMS – Backend */
:root {
  --brand: #C8321E;
  --ink: #1F2328;
  --ink-2: #4A5058;
  --ink-3: #6E747C;
  --line: #E3E5E8;
  --bg: #F5F6F7;
  --card: #FFFFFF;
  --ok: #1C7C43;
  --ok-bg: #E4F4EA;
  --warn: #8A5A00;
  --warn-bg: #FFF3D9;
  --bad: #A3261A;
  --bad-bg: #FDECEA;
  --r: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.6rem; font-weight: 750; letter-spacing: -0.01em; }
h2 { font-size: 1.125rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }
a { color: color-mix(in srgb, var(--brand) 85%, #000); }
svg { width: 1.2em; height: 1.2em; fill: currentColor; flex: none; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .875em; }
code { background: #EEF0F2; padding: 1px 6px; border-radius: 5px; }
.muted { color: var(--ink-3); }
.small { font-size: .8125rem; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 32px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, #000); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px;
  border-radius: 10px; border: 1px solid var(--brand); background: var(--brand); color: #fff; font: inherit; font-weight: 650;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { filter: brightness(.92); }
.btn-ghost { background: #fff; color: var(--ink); border-color: #CFD3D8; }
.btn-ghost:hover { background: #F0F1F3; filter: none; }
.btn-lg { min-height: 48px; padding: 10px 22px; font-size: 1rem; }
.btn-sm { min-height: 34px; padding: 5px 12px; font-size: .875rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 9px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: #ECEEF0; color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: default; background: transparent; }
.icon-btn.danger:hover, .danger { color: var(--bad); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); text-decoration: underline; cursor: pointer; }
.link-btn.danger { color: var(--bad); }

/* ---------- Layout ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 256px; flex: none; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side-head { display: flex; gap: 12px; align-items: center; padding: 18px 16px; border-bottom: 1px solid var(--line); }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; flex: none; }
.brand-mark-lg { width: 56px; height: 56px; font-size: 1.6rem; border-radius: 16px; margin: 0 auto 14px; }
.side-name { min-width: 0; }
.side-name strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-name a { font-size: .8125rem; color: var(--ink-3); text-decoration: none; }
.side-name a:hover { color: var(--ink); }
.side-nav { padding: 10px; display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 550; }
.side-nav a:hover { background: #F2F3F5; color: var(--ink); }
.side-nav a.active { background: color-mix(in srgb, var(--brand) 10%, #fff); color: color-mix(in srgb, var(--brand) 85%, #000); }
.side-nav svg { opacity: .8; }
.side-nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; padding: 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.main { flex: 1; min-width: 0; }
.mtop { display: none; }
.content { max-width: 1080px; padding: 28px 32px 80px; display: grid; gap: 20px; }
@media (max-width: 960px) {
  .side { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .2s ease; }
  .side.open { box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .side.open { transform: none; }
  .side-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 45; }
  .mtop { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; background: #fff; border-bottom: 1px solid var(--line); }
  .content { padding: 20px 16px 96px; }
}

/* ---------- Bausteine ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.card > h2 { margin-bottom: 4px; }
.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 10px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; }
.page-head p { margin-top: 4px; max-width: 62ch; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-block; font-size: .875rem; color: var(--ink-3); text-decoration: none; margin-bottom: 6px; }
.back:hover { color: var(--ink); }
.section-h { margin-top: 12px; font-size: 1.25rem; }
.grid-dash { display: grid; gap: 20px; }
@media (min-width: 860px) { .grid-dash { grid-template-columns: 1fr 1fr; align-items: start; } }
.split { display: grid; gap: 20px; }
@media (min-width: 960px) { .split { grid-template-columns: 1.3fr 1fr; align-items: start; } }
.form-layout { display: grid; gap: 20px; }
.form-narrow { max-width: 560px; }

.alert { padding: 12px 16px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); font-weight: 550; }
.alert-bad { background: var(--bad-bg); color: var(--bad); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.alert ul { margin: 6px 0 0; padding-left: 20px; font-weight: 400; }

.badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; vertical-align: 2px; }
.badge-soft { background: var(--warn-bg); color: var(--warn); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 650; background: #ECEEF0; color: var(--ink-2); vertical-align: 1px; }
.pill-ok, .pill-erledigt { background: var(--ok-bg); color: var(--ok); }
.pill-warn, .pill-zahlung { background: var(--warn-bg); color: var(--warn); }
.pill-neu { background: var(--brand); color: #fff; }
.pill-bestaetigt { background: #E3EDFB; color: #1D4F91; }
.pill-unterwegs { background: #EEE8FB; color: #5434A4; }
.pill-storniert { background: var(--bad-bg); color: var(--bad); }

/* ---------- Formulare ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field > legend { font-weight: 600; font-size: .875rem; color: var(--ink-2); }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { margin-bottom: 8px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], input:not([type]), select, textarea {
  font: inherit; font-size: 16px; width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid #CDD1D6; border-radius: 9px; background: #fff; color: var(--ink);
}
@media (min-width: 960px) { input, select, textarea { font-size: 15px !important; } }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
input[type=file] { font: inherit; font-size: .875rem; }
.w-xs { max-width: 90px; } .w-sm { max-width: 160px; } .w-md { max-width: 380px; }
.grid-2 { display: grid; gap: 16px; }
.grid-3 { display: grid; gap: 16px; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  .span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; }
}
.grid-name { display: grid; grid-template-columns: 90px 1fr; gap: 12px; }
.grid-hl { display: grid; gap: 12px; }
@media (min-width: 640px) { .grid-hl { grid-template-columns: 1fr 2fr; } }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.unit { display: flex; align-items: center; gap: 8px; }
.unit input { max-width: 140px; }
.inline-input { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.color-input { display: flex; gap: 8px; }
.color-input input[type=color] { width: 52px; height: 42px; padding: 3px; border: 1px solid #CDD1D6; border-radius: 9px; background: #fff; cursor: pointer; }
.color-input input[type=text] { max-width: 130px; font-family: ui-monospace, monospace; }
.sticky-save { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 0; background: linear-gradient(to top, var(--bg) 70%, transparent); }

.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1px solid #CDD1D6; background: #fff; font-weight: 600; cursor: pointer; }
.seg input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--brand); }

.choice-list { display: grid; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice input { margin-top: 3px; accent-color: var(--ink); width: 18px; height: 18px; }
.choice small { display: block; color: var(--ink-3); font-size: .8125rem; }

.chip-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; }
.chip-check span { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1px solid #CDD1D6; font-weight: 600; font-size: .875rem; cursor: pointer; background: #fff; }
.chip-check input:checked + span { background: color-mix(in srgb, var(--brand) 12%, #fff); border-color: var(--brand); color: color-mix(in srgb, var(--brand) 85%, #000); }
.chip-check input:focus-visible + span { outline: 3px solid var(--brand); }

/* Schalter */
.switch { position: relative; display: inline-block; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #C9CDD2; transition: background .15s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.switch-row small { display: block; font-size: .8125rem; }

/* Bild-Upload */
.image-row { display: flex; gap: 14px; align-items: flex-start; }
.image-preview { width: 88px; height: 88px; border-radius: 10px; background: #EEF0F2 center/cover; display: grid; place-items: center; overflow: hidden; flex: none; border: 1px solid var(--line); }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-preview span { font-size: .75rem; color: var(--ink-3); }
.image-ctrl { display: grid; gap: 8px; min-width: 0; }

/* ---------- Übersicht ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 860px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; text-decoration: none; color: inherit; display: grid; gap: 2px; }
.stat span { color: var(--ink-3); font-size: .8125rem; font-weight: 600; }
.stat strong { font-size: 1.75rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.stat small { color: var(--ink-3); }
.stat-hot { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, #fff); }
.status-list, .checks { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; }
.status-list li { display: grid; gap: 2px; padding: 12px 0 12px 18px; border-bottom: 1px solid var(--line); position: relative; }
.status-list li:last-child { border-bottom: 0; }
.status-list li::before { content: ""; position: absolute; left: 0; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.status-list li.warn::before { background: #D18A00; }
.status-list span { color: var(--ink-2); }
.checks li { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.check-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #CDD1D6; display: grid; place-items: center; font-size: .75rem; font-weight: 800; flex: none; }
.checks li.ok .check-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.checks li.ok { color: var(--ink-3); }

/* ---------- Bestellungen ---------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--brand); }
.tabs .count { font-size: .75rem; color: var(--ink-3); margin-left: 4px; }
.order-list { display: grid; gap: 10px; }
.order-row { display: flex; gap: 16px; justify-content: space-between; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; border-left: 4px solid #CDD1D6; }
.order-row.status-neu { border-left-color: var(--brand); }
.order-row.status-bestaetigt { border-left-color: #2F6FC5; }
.order-row.status-unterwegs { border-left-color: #7650C9; }
.order-row.status-erledigt, .order-row.status-storniert { opacity: .7; }
.order-main { min-width: 0; text-decoration: none; color: inherit; flex: 1; display: grid; gap: 3px; }
.order-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.order-who { font-weight: 550; }
.order-side { display: grid; justify-items: end; gap: 4px; text-align: right; flex: none; }
.order-side strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .order-row { flex-direction: column; } .order-side { justify-items: start; text-align: left; grid-auto-flow: column; align-items: center; } }
.empty-state { background: #fff; border: 1px dashed #CDD1D6; border-radius: var(--r); padding: 40px 20px; text-align: center; display: grid; gap: 4px; }
.table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.table td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tfoot td { border-bottom: 0; padding: 6px; }
.table .total td { font-weight: 750; font-size: 1.05rem; border-top: 2px solid var(--ink); }
.qty-cell { width: 44px; font-weight: 750; }
.num-cell { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.note { font-size: .875rem; color: var(--brand); font-weight: 600; margin-top: 2px; }
.kv { display: grid; grid-template-columns: 100px 1fr; gap: 8px 12px; margin: 12px 0 0; }
.kv dt { color: var(--ink-3); font-size: .875rem; }
.kv dd { margin: 0; }
.status-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { padding: 7px 12px; border-radius: 999px; border: 1px solid #CDD1D6; background: #fff; font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.print-only { display: none; }
.new-order-bar { position: fixed; z-index: 60; left: 50%; top: 16px; transform: translateX(-50%); background: var(--brand); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.25); text-decoration: none; }
@media print {
  .side, .mtop, .page-head .btn, .card:not(.print-area), .alert, .sticky-save { display: none !important; }
  .content { padding: 0; }
  .card { border: 0; padding: 0; }
  .print-only { display: block; margin-top: 16px; }
  body { background: #fff; font-size: 14pt; }
}

/* ---------- Speisekarte ---------- */
.menu-cat { padding: 0; overflow: hidden; }
.menu-cat.is-off { opacity: .7; }
.menu-cat-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 16px 16px 12px 20px; border-bottom: 1px solid var(--line); background: #FAFBFB; }
.menu-cat-head h2 { font-size: 1.15rem; }
.row-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.row-actions form { margin: 0; }
.admin-items { list-style: none; margin: 0; padding: 0; }
.admin-items li { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 0; border-bottom: 1px solid var(--line); }
.admin-items li:target { background: color-mix(in srgb, var(--brand) 7%, #fff); }
.admin-items li.is-off .ai-main { opacity: .5; }
.admin-items li.is-soldout .ai-name, .admin-items li.is-soldout .ai-price { color: var(--ink-3); }
.ai-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 0 10px 20px; text-decoration: none; color: inherit; }
.ai-main:hover .ai-name { text-decoration: underline; }
.ai-main img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; }
.ai-num { width: 32px; flex: none; color: var(--ink-3); font-weight: 650; font-variant-numeric: tabular-nums; }
.ai-name { flex: 1; min-width: 0; font-weight: 600; }
.ai-name small { display: block; font-weight: 400; }
.ai-price { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.add-row { display: block; padding: 12px 20px; text-decoration: none; font-weight: 600; }
.add-row:hover { background: #FAFBFB; }
.more { position: relative; }
.more summary { list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more-menu { position: absolute; right: 0; top: 100%; z-index: 20; min-width: 170px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 6px; display: grid; }
.more-menu button { width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 7px; font: inherit; cursor: pointer; }
.more-menu button:hover { background: #F2F3F5; }
details.card > summary { cursor: pointer; }

.variant-rows, [data-zone-rows] { display: grid; gap: 8px; }
.variant-row { display: grid; grid-template-columns: 1fr 120px 38px; gap: 8px; align-items: center; }
.zones-table { display: grid; gap: 8px; }
.zt-head, .zt-row { display: grid; grid-template-columns: 90px 1fr 110px 100px 38px; gap: 8px; align-items: center; }
.zt-head { font-size: .75rem; font-weight: 700; color: var(--ink-3); }
@media (max-width: 640px) {
  .zt-head { display: none; }
  .zt-row { grid-template-columns: 1fr 1fr 38px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .zt-row input:nth-child(2) { grid-column: 2 / 4; grid-row: 1; }
  .zt-row input:nth-child(1) { grid-row: 1; }
}
.zones-table > .btn, .variants-editor > .btn { justify-self: start; }
.variants-editor { display: grid; gap: 10px; }

/* Bestellwege */
.method-title { display: flex; gap: 12px; align-items: flex-start; }
.m-ico { width: 36px; height: 36px; border-radius: 10px; flex: none; background: #ECEEF0 center/20px no-repeat; }
.m-wa { background-color: #1FA855; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2z'/%3E%3C/svg%3E"); }
.m-cash { background-color: #3C7A4E; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M2 6h20v12H2V6zm2 2v8h16V8H4zm8 1.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5z'/%3E%3C/svg%3E"); }
.m-pp { background-color: #003087; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M7.5 21H4l2.8-18h6.4c3.2 0 5.3 1.8 4.8 5-.6 3.8-3.2 5.4-6.6 5.4H9.2L7.5 21z'/%3E%3C/svg%3E"); }
.m-stripe { background-color: #635BFF; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M2 6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6zm2 2v2h16V8H4z'/%3E%3C/svg%3E"); }
.copy { cursor: copy; word-break: break-all; }

/* Öffnungszeiten */
.hours-grid { display: grid; }
.hours-row { display: grid; grid-template-columns: 110px auto 1fr; gap: 8px 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hours-row:last-child { border-bottom: 0; }
.hours-row.is-closed .hr { opacity: .35; pointer-events: none; }
.hr { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.range { display: inline-flex; align-items: center; gap: 6px; }
.range input { width: 118px; }
.hcopy { grid-column: 3; justify-self: start; font-size: .8125rem; }
@media (max-width: 700px) {
  .hours-row { grid-template-columns: 1fr auto; }
  .hr, .hcopy { grid-column: 1 / -1; }
}

/* Urlaub */
.vac-state { padding: 14px 18px; border-radius: var(--r); background: #ECEEF0; }
.vac-active { background: var(--warn-bg); color: var(--warn); }
.vac-upcoming { background: #E3EDFB; color: #1D4F91; }
.preview-box { position: sticky; top: 20px; }
.vac-preview { margin-top: 8px; background: #fff; border-radius: 18px; padding: 26px 22px; text-align: center; box-shadow: 0 18px 50px -18px rgba(0,0,0,.35); display: grid; gap: 12px; }
.vp-dates { display: flex; justify-content: center; gap: 8px; }
.vp-dates span:not(:empty) { padding: 8px 14px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 10%, #fff); font-weight: 800; font-size: 1.05rem; }
.vac-preview h3 { font-size: 1.4rem; }
.vac-preview p { color: var(--ink-2); white-space: pre-line; }
.vp-btn { display: block; padding: 12px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 700; }

/* Import */
.dropzone { position: relative; border: 2px dashed #C3C8CE; border-radius: var(--r); padding: 28px 16px; text-align: center; background: #FAFBFB; }
.dropzone.drag { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, #fff); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone label { display: grid; gap: 2px; pointer-events: none; }
.dz-name { display: block; margin-top: 8px; font-weight: 650; }
.code { background: #1F2328; color: #E6E8EA; padding: 16px; border-radius: 10px; overflow-x: auto; font-size: .8125rem; line-height: 1.5; margin: 12px 0; }
.preview-cats { display: grid; gap: 6px; }
.preview-cats details { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.preview-cats summary { cursor: pointer; }
.preview-items { list-style: none; padding: 0; margin: 8px 0 0; }
.preview-items li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px solid var(--line); font-size: .875rem; }

/* ---------- Anmeldung / Setup ---------- */
.auth-page { min-height: 100vh; background: var(--bg); }
.login { max-width: 400px; margin: 0 auto; padding: 12vh 20px 40px; text-align: center; display: grid; gap: 14px; }
.login form { text-align: left; }
.setup { max-width: 760px; margin: 0 auto; padding: 40px 20px 80px; display: grid; gap: 20px; }
.setup-head { display: flex; gap: 16px; align-items: center; }
.setup-head h1 { font-size: 1.75rem; }
.setup .brand-mark { width: 52px; height: 52px; font-size: 1.4rem; border-radius: 14px; }
.setup-form { display: grid; gap: 20px; }
.setup .card { display: grid; gap: 16px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checklist .ok { color: var(--ok); } .checklist .bad { color: var(--bad); font-weight: 700; }

/* ---------- Design ---------- */
.theme-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.theme-card { position: relative; display: grid; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; background: #fff; transition: border-color .15s, box-shadow .15s; }
.theme-card:hover { border-color: #B9BEC4; }
.theme-card:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.theme-card input { position: absolute; opacity: 0; }
.theme-card:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }
.theme-shot { position: relative; display: block; aspect-ratio: 16 / 10; background: #ECEEF0; border-bottom: 1px solid var(--line); }
.theme-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.theme-current { position: absolute; top: 8px; left: 8px; background: var(--ink); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.theme-info { display: grid; gap: 2px; padding: 12px 14px 4px; }
.theme-info small { color: var(--ink-3); font-size: .8125rem; line-height: 1.4; }
.theme-preview { padding: 4px 14px 12px; font-size: .8125rem; font-weight: 650; justify-self: start; }
.favicon-row { display: flex; }
.fav-tab { display: inline-flex; align-items: center; gap: 10px; min-width: 240px; max-width: 100%; padding: 10px 16px; border-radius: 12px 12px 0 0; background: #fff; border: 1px solid var(--line); border-bottom: 0; box-shadow: 0 -1px 0 #ECEEF0 inset; }
.fav-icon { width: 20px; height: 20px; flex: none; display: grid; place-items: center; }
.fav-icon img { width: 20px; height: 20px; object-fit: contain; }
.fav-letter { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.fav-title { font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-preview="logo"] img, [data-preview="favicon"] img { object-fit: contain; padding: 6px; }
[data-preview="logo"] { width: 160px; background: repeating-conic-gradient(#E9EBEE 0% 25%, #F7F8F9 0% 50%) 50% / 16px 16px; }
.serp { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; max-width: 600px; font-family: Arial, sans-serif; }
.serp-url { font-size: 12px; color: #4D5156; }
.serp-title { font-size: 19px; color: #1A0DAB; line-height: 1.3; }
.serp-desc { font-size: 13px; color: #4D5156; line-height: 1.5; }
.privacy-table th { text-align: left; font-size: .8125rem; color: var(--ink-3); padding: 8px 6px; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .privacy-table td:nth-child(2), .privacy-table th:nth-child(2) { display: none; } }
.contrast-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; background: #E3EDFB; color: #1D4F91; font-size: .875rem; }
.swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0,0,0,.15); display: inline-block; }

/* ---------- Lizenzserver ---------- */
:root { --brand: #3346D3; }
.side-nav a { padding: 10px 14px; }
.keybox code { font-size: 1.15rem; padding: 10px 14px; display: inline-block; letter-spacing: .04em; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; }
.action-row form { margin: 0; }
.btn-danger { background: #B3261E; border-color: #B3261E; color: #fff; }
.btn-ok { background: #1C7C43; border-color: #1C7C43; color: #fff; }
.pill-aktiv { background: var(--ok-bg); color: var(--ok); }
.pill-bald { background: #E3EDFB; color: #1D4F91; }
.pill-kulanz { background: var(--warn-bg); color: var(--warn); }
.pill-abgelaufen, .pill-gesperrt { background: var(--bad-bg); color: var(--bad); }
.stat-warn { border-color: #2F6FC5; }
.warn-text { color: var(--warn); font-weight: 600; }
.table-wrap { padding: 0; overflow-x: auto; }
.lic-table th { text-align: left; font-size: .8125rem; color: var(--ink-3); padding: 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.lic-table td { padding: 12px 10px; }
.lic-table a { text-decoration: none; color: var(--ink); }
.lic-table a:hover strong { text-decoration: underline; }
.events { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; font-size: .875rem; }
.events li { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
