/* Shop-Backoffice im Look von geniusbet.cd: dunkler Grund, Limettengruen als Akzent. */
:root {
  --bg: #111111;
  --surface: #1a1a1a;
  --card: #262626;
  --line: #3d3d3d;
  --text: #fafafa;
  --muted: #a6a6a6;
  --accent: #bff932;
  --on-accent: #1a1a1a;
  --danger: #e5484d;
  --success: #46c46b;
  --warn: #f5a623;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--surface);
  color: var(--text);
  font: 15px/1.45 Rubik, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
button, input, select { font: inherit; color: inherit; }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 0 0 10px; }
.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: Consolas, "Roboto Mono", monospace; }

/* Marke */
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; color: var(--accent); letter-spacing: .2px; }
.brand svg { width: 26px; height: 26px; }
.brand small { color: var(--muted); font-weight: 500; font-size: 13px; margin-left: 6px; }

/* Anmeldung */
.login { min-height: 100vh; display: grid; place-items: center; background: var(--bg); padding: 16px; }
.login form { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 28px; }
.login .brand { font-size: 28px; justify-content: center; margin-bottom: 4px; }
.login .brand svg { width: 34px; height: 34px; }
.login p { text-align: center; margin: 0 0 22px; }

label { display: block; margin: 12px 0 4px; color: var(--muted); font-size: 13px; }
input[type=text], input[type=password], input[type=number], select {
  width: 100%; height: 44px; padding: 0 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; outline: none;
}
input:focus, select:focus { border-color: var(--accent); }
.error { color: var(--danger); min-height: 20px; margin-top: 10px; font-size: 14px; }

.btn {
  height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 6px; background: #333; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.small { height: 32px; padding: 0 10px; font-size: 13px; }
.btn.block { width: 100%; height: 46px; margin-top: 20px; }
.btn:disabled { opacity: .45; cursor: default; }

/* Geruest */
.shell { min-height: 100vh; display: grid; grid-template-rows: auto auto 1fr; }
.topbar { background: var(--bg); display: flex; align-items: center; gap: 16px; padding: 10px 20px; }
.topbar .spacer { flex: 1; }
.topbar .who { text-align: right; font-size: 13px; line-height: 1.3; }
.nav { background: var(--accent); display: flex; gap: 2px; padding: 0 12px; overflow-x: auto; }
.nav button {
  background: none; border: 0; color: var(--on-accent); padding: 10px 14px; cursor: pointer; font-weight: 500; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.nav button.active { font-weight: 700; border-bottom-color: var(--on-accent); }
main { padding: 20px; max-width: 1280px; width: 100%; margin: 0 auto; }
.head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.head h1 { margin: 0; flex: 1; }

/* Kennzahlen */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.kpi .label { color: var(--muted); font-size: 13px; }
.kpi .value { font-size: 22px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.kpi.accent .value { color: var(--accent); }
.kpi.warn .value { color: var(--warn); }

/* Tabellen */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 20px; overflow: hidden; }
.panel > h2 { padding: 12px 16px; margin: 0; border-bottom: 1px solid var(--line); }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 16px; border-bottom: 1px solid #323232; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #2c2c2c; }
td.actions { text-align: right; white-space: nowrap; }
td.actions .btn { margin-left: 4px; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }

.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); color: var(--muted); }
.tag.ok { color: var(--success); border-color: var(--success); }
.tag.bad { color: var(--danger); border-color: var(--danger); }
.tag.warn { color: var(--warn); border-color: var(--warn); }
.tag.accent { color: var(--accent); border-color: var(--accent); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select { width: auto; min-width: 150px; height: 40px; }

/* Dialog */
dialog { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 0; width: min(520px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(0, 0, 0, .65); }
dialog form { padding: 22px; }
dialog h2 { font-size: 18px; margin-bottom: 4px; }
dialog .buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
dialog .hint { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
dialog .check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; margin-top: 14px; }
dialog.wide { width: min(760px, calc(100vw - 24px)); }
.rows { margin: 12px 0 0; }
.rows div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px solid #323232; }
.rows div:last-child { border-bottom: 0; }
.rows .big { font-size: 18px; font-weight: 700; }
.lines { margin-top: 12px; border: 1px solid var(--line); border-radius: 6px; }
.lines div { padding: 8px 12px; border-bottom: 1px solid #323232; display: flex; justify-content: space-between; gap: 12px; }
.lines div:last-child { border-bottom: 0; }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--accent); color: var(--on-accent);
  padding: 10px 18px; border-radius: 6px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: calc(100vw - 32px);
}
#toast.show { opacity: 1; }
#toast.bad { background: var(--danger); color: #fff; }

@media (max-width: 640px) {
  main { padding: 14px; }
  .topbar { padding: 10px 14px; }
  .topbar .who { display: none; }
  th, td { padding: 9px 10px; }
}

input[type=checkbox] { width: 18px; height: 18px; min-width: 0 !important; accent-color: var(--accent); }

/* Quotenliste */
.offer th.grp { text-align: center; border-left: 1px solid var(--line); }
.offer .code { font-size: 16px; color: var(--accent); }
.printonly { display: none; }

/* Druck: Quotenliste auf A4, Belege im Bonformat. Schwarz auf Weiss, ohne Bedienelemente. */
#print { display: none; }
.rc { width: 72mm; font: 12px/1.35 Consolas, "Roboto Mono", monospace; color: #000; }
.rc-brand { text-align: center; font: 700 20px/1.2 Rubik, Arial, sans-serif; }
.rc-center { text-align: center; }
.rc-title { text-align: center; font-weight: 700; margin: 8px 0; }
.rc-row { display: flex; justify-content: space-between; gap: 8px; }
.rc-row span:last-child { text-align: right; white-space: nowrap; }
.rc-row.big { font-weight: 700; font-size: 14px; margin: 3px 0; }
.rc hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.rc-sign { margin-top: 34px; border-top: 1px solid #000; padding-top: 3px; font-size: 11px; }

@media print {
  html, body { background: #fff !important; color: #000 !important; }
  .topbar, .nav, .btn, .noprint, #toast, dialog { display: none !important; }
  .printonly { display: inline; }
  .shell { display: block; }
  main { padding: 0; max-width: none; }
  h1 { font-size: 16px; margin: 0 0 4px; }
  .muted { color: #333 !important; }
  .panel { background: #fff; border: 0; margin-bottom: 8px; overflow: visible; }
  .panel > h2 { padding: 4px 0; border-bottom: 2px solid #000; text-transform: capitalize; }
  .scroll { overflow: visible; }
  table { font-size: 11px; }
  th, td { color: #000 !important; padding: 2px 5px; border-bottom: 1px solid #999; }
  thead { display: table-header-group; }
  tr { break-inside: avoid; }
  .offer .code { color: #000; font-size: 13px; }
  .offer th.grp { border-left: 1px solid #999; }
  body.receipt .shell { display: none !important; }
  body.receipt #print { display: block; }
}
