:root {
  --ink: #1c140f;
  --paper: #f3ecdf;
  --cream: #fbf6ee;
  --gold: #d4b07a;
  --leaf: #1c4d36;
  --ketchup: #c5362b;
  --muted: #655c53;
  --line: rgba(28, 20, 15, 0.14);
  --display: "Bricolage Grotesque", Georgia, sans-serif;
  --sans: "Figtree", "Segoe UI", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.45; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1 { font-family: var(--display); font-weight: 560; letter-spacing: -0.04em; font-size: 2.4rem; margin: 0 0 0.8rem; }
h2 { font-family: var(--display); font-size: 1.4rem; margin: 0 0 0.6rem; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 230px 1fr; }
.side {
  background: var(--ink);
  color: var(--cream);
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand { text-decoration: none; padding: 0.3rem 0.5rem 0.8rem; }
.brand strong { display: block; font-family: var(--display); font-size: 1.7rem; letter-spacing: -0.04em; }
.brand span { color: var(--gold); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; }
.side nav { display: flex; flex-direction: column; gap: 0.15rem; }
.side nav a {
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
}
.side nav a.is-on { background: var(--gold); color: var(--ink); }
.side nav b {
  background: var(--ketchup);
  color: white;
  border-radius: 999px;
  min-width: 1.3rem;
  text-align: center;
  font-size: 0.8rem;
  padding: 0.05rem 0.35rem;
}
.side nav a.is-on b { background: var(--ink); color: var(--gold); }
.side-link, .who a { color: #f0c56a; }
.who { margin-top: auto; padding: 0.8rem 0.5rem 0.2rem; font-size: 0.92rem; }
.main { padding: 1.3rem 1.2rem 3rem; max-width: 980px; }
.flash { padding: 0.7rem 0.8rem; border-radius: 10px; }
.flash-ok { background: #e4f0e6; }
.flash-bad { background: #f8d9d4; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.7rem; margin: 0.8rem 0 1.2rem; }
.stat, .card, .ticket {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem;
}
.stat b { display: block; font-family: var(--display); font-size: 1.8rem; font-weight: 560; letter-spacing: -0.03em; }
.stat span, .muted { color: var(--muted); font-size: 0.9rem; }
.stat .cmp { margin-top: 0.35rem; font-size: 0.82rem; color: var(--muted); }
.delta { font-weight: 700; padding: 0.05rem 0.35rem; border-radius: 6px; }
.delta.up { color: var(--leaf); background: rgba(28, 77, 54, 0.1); }
.delta.down { color: var(--ketchup); background: rgba(197, 54, 43, 0.1); }
.delta.flat { color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 130px; margin-top: 0.6rem; }
.bars .bar {
  flex: 1;
  background: linear-gradient(180deg, #e7c98a, #1c140f);
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  position: relative;
}
.bars .bar span {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--cream);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
  opacity: 0;
  margin-bottom: 4px;
  pointer-events: none;
}
.bars .bar:hover span, .bars .bar:focus-within span { opacity: 1; }
.barx { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.75rem; margin-top: 0.35rem; }
.donuts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-bottom: 0.7rem; }
.donut-box { display: flex; align-items: center; gap: 1.1rem; margin-top: 0.6rem; }
.donut-chart { width: 168px; height: 168px; position: relative; flex: 0 0 168px; }
.donut-ring { width: 100%; height: 100%; border-radius: 50%; }
.donut-hole {
  position: absolute;
  inset: 22%;
  background: white;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.donut-hole b { font-family: var(--display); font-size: 1.35rem; line-height: 1.1; font-weight: 560; }
.donut-hole span { font-size: 0.72rem; color: var(--muted); }
.donut-legend { flex: 1; min-width: 0; }
.donut-legend .lg {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.donut-legend .lg:last-child { border-bottom: 0; }
.donut-legend .lg i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.donut-legend .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend .pct { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.donut-legend .ct { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.sheet-wrap { overflow-x: auto; }
.sheet { width: 100%; border-collapse: collapse; }
.sheet th, .sheet td { text-align: left; padding: 0.65rem 0.45rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.sheet th { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.sheet td.num, .sheet th.num { text-align: right; font-variant-numeric: tabular-nums; }
.sheet .row-actions { justify-content: flex-end; }
.sheet .row-actions form { display: inline; }
.pill {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.pill.on { color: var(--leaf); border-color: rgba(28, 77, 54, 0.35); background: rgba(28, 77, 54, 0.08); }
.pill.off { color: var(--ketchup); border-color: rgba(197, 54, 43, 0.35); }
.card { margin: 0 0 1rem; }
.stack { display: flex; flex-direction: column; gap: 0.7rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.field, .check { display: flex; flex-direction: column; gap: 0.3rem; }
.check { flex-direction: row; align-items: center; gap: 0.5rem; }
.field span { color: var(--muted); font-size: 0.9rem; }
input, select, textarea {
  width: 100%;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  min-height: 44px;
}
.check input {
  width: 1.15rem;
  height: 1.15rem;
  min-height: 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--ink);
}
textarea { min-height: 5rem; }
.actions, .row-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.btn, button {
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: transparent;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn.solid, button.solid { background: var(--ink); color: var(--cream); }
.btn.gold {
  background: var(--gold);
  border-color: #b8925c;
  color: var(--ink);
  font-weight: 650;
  box-shadow: 0 1px 0 rgba(28, 20, 15, 0.16);
}
.btn.gold:hover { background: #e4c79a; }
.btn.danger { color: var(--ketchup); border-color: var(--ketchup); }
.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}
.row.is-off { opacity: 0.55; }
.row h3 { margin: 0; font-family: var(--display); font-size: 1.35rem; font-weight: 560; }
.row p { margin: 0.2rem 0 0; color: var(--muted); }
.tickets { display: grid; gap: 0.7rem; }
.ticket-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.ticket .code { font-family: var(--display); font-size: 1.7rem; margin: 0; }
.st { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; }
.st-neu { color: var(--ketchup); }
.st-arbeit { color: #9a6b08; }
.st-fertig { color: var(--leaf); }
.st-abgeholt, .st-storno { color: var(--muted); }
.filters { display: flex; gap: 0.8rem; margin-bottom: 0.8rem; }
.filters a { color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.filters a.is-on { color: var(--ink); border-color: var(--ink); }
.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  padding: 0.35rem 0.9rem 0.35rem 0.4rem;
  cursor: pointer;
}
.switch i { width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--ketchup); display: block; }
.switch.on i { background: var(--leaf); }
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.4rem;
  background: radial-gradient(circle at 15% 10%, rgba(224, 161, 26, 0.2), transparent 36%), var(--ink);
  color: var(--cream);
}
.login-card { width: min(420px, 100%); background: var(--cream); color: var(--ink); border-radius: 18px; padding: 1.3rem; }
.login-card h1 { margin-top: 0; }
.hint { color: var(--muted); }

.style-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.style-card {
  position: relative;
  display: grid;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem;
  cursor: pointer;
  background: var(--cream);
}
.style-card:has(input:checked) { box-shadow: inset 0 0 0 2px var(--ink); }
.style-card:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.style-card input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
}
.style-swatches { display: flex; height: 36px; border-radius: 8px; overflow: hidden; }
.style-swatches span { flex: 1; }
.style-card strong { font-family: var(--display); font-size: 1.25rem; }
.style-card > span:last-child { color: var(--muted); font-size: 0.88rem; }

.hours-row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}
.hours-row .day { font-weight: 650; }
.hours-row .times {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.4rem;
  align-items: center;
}
.hours-row .times span { text-align: center; color: var(--muted); }
.page-slide {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.2rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.page-slide h3, .card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
}
.thumb {
  width: 180px;
  height: 112px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--paper);
}
.field .hint, .field span + span { font-size: 0.82rem; }
.seo-count { font-weight: 650; color: var(--ink); }
.seo-count.is-long { color: var(--ketchup); }
.seo-preview, .seo-share {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  font-family: Arial, Helvetica, sans-serif;
}
.seo-preview { padding: 0.95rem 1.05rem 1.05rem; }
.seo-preview p, .seo-share p { margin: 0; }
.seo-url { color: #202124; font-size: 0.84rem; }
.seo-preview .seo-title {
  color: #1a0dab;
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0.15rem 0 0.2rem;
}
.seo-desc { color: #4d5156; font-size: 0.92rem; line-height: 1.4; }
.seo-share { display: grid; grid-template-columns: 168px minmax(0, 1fr); overflow: hidden; }
.seo-share img { width: 100%; height: 126px; object-fit: cover; display: block; }
.seo-share div { padding: 0.75rem 0.9rem; min-width: 0; }
.seo-share .seo-title { font-weight: 650; margin: 0.2rem 0; color: var(--ink); }

@media (max-width: 800px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .style-grid { grid-template-columns: 1fr; }
  .side, .main, .side nav, .stats { min-width: 0; }
  .side { position: sticky; height: auto; z-index: 5; }
  .side nav { flex-direction: row; overflow-x: auto; }
  .side nav a { white-space: nowrap; }
  .who { margin-top: 0.4rem; }
  .stats, .grid-3 { grid-template-columns: 1fr 1fr; }
  .donuts, .form-grid { grid-template-columns: 1fr; }
  .hours-row { grid-template-columns: 1fr; }
  .seo-share { grid-template-columns: 1fr; }
  .seo-share img { height: 160px; }
  .donut-box { flex-direction: column; align-items: flex-start; }
  .row { grid-template-columns: 1fr; }
  .ticket-head { flex-wrap: wrap; }
}
