/* Druckstation – N's Hotel. Markenfarben wie scripts/ui.py */
:root {
  --navy: #1a2855;
  --mid: #2e4490;
  --light: #4a6ab0;
  --silver: #8aabdd;
  --ice: #f0f3fa;
  --ink: #1b2233;
  --muted: #5f6b85;
  --line: #d9e0ee;
  --card: #ffffff;
  --ok: #1f8a5b;
  --ok-bg: #e6f5ee;
  --warn: #9a6200;
  --warn-bg: #fff4dc;
  --err: #b42318;
  --err-bg: #fdecea;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ice);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; }
a { color: var(--mid); }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 1100px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* Kopfzeile */
.demo-banner {
  background: #ffcc33; color: #3d2c00; text-align: center; font-weight: 700;
  font-size: 13px; padding: 6px 12px; letter-spacing: .02em;
}
.top { background: var(--navy); color: #fff; }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.logo { height: 34px; width: auto; display: block; }
.top-title { font-weight: 600; opacity: .9; }
.langs { display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.langs a {
  color: #fff; text-decoration: none; font-size: 13px; font-weight: 600;
  padding: 6px 7px; border-radius: 8px; opacity: .7;
}
.langs a.on { background: rgba(255,255,255,.16); opacity: 1; }

main.wrap { padding-top: 20px; padding-bottom: 8px; }
.foot { color: var(--muted); font-size: 14px; text-align: center; padding: 16px 16px 32px; }

/* Startseite */
.hero { padding: 8px 2px 4px; }
.hero h1 { font-size: 30px; color: var(--navy); }
.lead { font-size: 17px; color: var(--muted); margin: 0 0 14px; }
.steps { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.steps li { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.num {
  flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--mid); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin: 0 0 16px; box-shadow: 0 1px 2px rgba(26,40,85,.05);
}
.card h2 { font-size: 18px; color: var(--navy); }

.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 2px dashed var(--silver); border-radius: 12px; background: var(--ice);
  padding: 26px 14px; text-align: center; cursor: pointer; min-height: 150px;
}
.drop:hover, .drop:focus-within { border-color: var(--mid); }
.drop-icon { width: 40px; height: 40px; fill: var(--mid); }
.drop-title { font-weight: 700; font-size: 18px; color: var(--navy); word-break: break-word; }
.hint { color: var(--muted); font-size: 14px; }
.upload .btn { margin-top: 14px; }
.busy { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); margin: 12px 0 0; }

.prices dl { margin: 0 0 10px; }
.prices dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.prices dl > div:last-child { border-bottom: 0; }
.prices dt { color: var(--ink); }
.prices dd { margin: 0; font-weight: 700; white-space: nowrap; }
.prices small { font-weight: 400; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--navy);
  font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 10px;
  text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--mid); border-color: var(--mid); color: #fff; }
.btn.primary:hover { background: var(--navy); }
.btn.big { width: 100%; font-size: 18px; padding: 15px 18px; }
.btn.small { font-size: 14px; padding: 7px 12px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.linkbtn {
  background: none; border: 0; color: var(--muted); font: inherit; text-decoration: underline;
  cursor: pointer; padding: 8px; display: inline-block; margin-top: 4px;
}

/* Hinweise */
.alert {
  background: var(--err-bg); color: var(--err); border: 1px solid #f4c7c1;
  border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; font-weight: 500;
}
.note {
  background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 12px 14px;
  margin: 0 0 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
}

/* Auftrag */
.order-no { color: var(--muted); font-weight: 600; margin: 0 0 10px; font-size: 14px; letter-spacing: .03em; }
.file { display: flex; align-items: center; gap: 14px; }
.file-badge {
  flex: 0 0 48px; height: 58px; border-radius: 8px; background: var(--navy); color: #fff;
  font-size: 12px; font-weight: 700; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px;
}
.file-info { display: flex; flex-direction: column; min-width: 0; }
.file-name { word-break: break-word; }

fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 700; color: var(--navy); margin-bottom: 8px; padding: 0; }
.choice { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.choice input { width: 20px; height: 20px; accent-color: var(--mid); margin: 0; }
.text {
  width: 100%; font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  margin-top: 4px; background: #fff;
}
.text:focus, .stepper input:focus { outline: 2px solid var(--silver); border-color: var(--mid); }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; }
.segmented span {
  display: flex; flex-direction: column; gap: 2px; border: 2px solid var(--line); border-radius: 12px;
  padding: 12px; height: 100%;
}
.segmented small { color: var(--muted); }
.segmented input:checked + span { border-color: var(--mid); background: var(--ice); }
.segmented input:focus-visible + span { outline: 2px solid var(--silver); }

.inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.inline legend { float: left; margin: 0; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stepper button {
  width: 46px; height: 44px; border: 0; background: var(--ice); color: var(--navy);
  font-size: 22px; font-weight: 700; cursor: pointer;
}
.stepper input {
  width: 56px; height: 44px; border: 0; text-align: center; font: inherit; font-weight: 700;
  -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.total {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px;
}
.total span { font-weight: 600; }
.total strong { font-size: 26px; color: var(--navy); }
.min-note { margin: 2px 0 0; text-align: right; }
.options .btn.big { margin: 14px 0 8px; }

/* Status */
.state { text-align: center; padding: 28px 18px; }
.state h1 { font-size: 21px; color: var(--navy); }
.state .btn { margin-top: 10px; }
.state-icon {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; display: flex;
  align-items: center; justify-content: center; font-size: 34px; font-weight: 700;
  background: var(--ice); color: var(--mid);
}
.state.ok .state-icon { background: var(--ok-bg); color: var(--ok); }
.state.err .state-icon { background: var(--err-bg); color: var(--err); }
.amount { font-size: 34px; font-weight: 800; color: var(--navy); margin: 8px 0 16px; }

.spinner {
  width: 18px; height: 18px; border-radius: 50%; display: inline-block;
  border: 3px solid var(--silver); border-top-color: var(--mid); animation: spin .9s linear infinite;
}
.spinner.big { width: 56px; height: 56px; border-width: 5px; margin: 0 auto 16px; display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* Rezeption */
.admin main.wrap { padding-top: 24px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; border-top: 4px solid var(--silver); }
.tile h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tile .big { font-size: 22px; font-weight: 700; color: var(--navy); margin: 0 0 6px; }
.tile p { margin: 0 0 6px; overflow-wrap: anywhere; }
.tile.ok { border-top-color: var(--ok); }
.tile.warn { border-top-color: #e0a100; }
.tile.err { border-top-color: var(--err); }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.jobs { width: 100%; border-collapse: collapse; font-size: 14px; }
.jobs th, .jobs td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.jobs th { background: var(--ice); color: var(--navy); font-weight: 700; white-space: nowrap; }
.jobs tr:last-child td { border-bottom: 0; }
.fname { max-width: 260px; word-break: break-word; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--ice); color: var(--muted); white-space: nowrap; }
.badge.s-printed { background: var(--ok-bg); color: var(--ok); }
.badge.s-paid, .badge.s-printing { background: #e7edfb; color: var(--mid); }
.badge.s-awaiting_payment, .badge.s-uploaded { background: var(--warn-bg); color: var(--warn); }
.badge.s-print_error, .badge.s-payment_mismatch { background: var(--err-bg); color: var(--err); }
.err-text { color: var(--err); }
code { background: var(--ice); padding: 1px 5px; border-radius: 5px; }

/* QR-Plakat (A4) */
.poster-body { background: #e9edf5; }
.poster-tools { display: flex; gap: 10px; justify-content: center; padding: 16px; }
.poster {
  width: 210mm; min-height: 297mm; margin: 0 auto 24px; background: #fff; padding: 16mm 16mm 12mm;
  display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--navy);
}
.poster-logo { height: 22mm; width: auto; margin-bottom: 8mm; }
.poster h1 { font-size: 40pt; margin: 0 0 6mm; }
.poster h1 span { display: block; font-size: 15pt; font-weight: 500; color: var(--light); margin-top: 2mm; }
.poster-qr svg { width: 95mm; height: 95mm; display: block; }
.poster-url { font-size: 11pt; color: var(--muted); margin: 2mm 0 8mm; word-break: break-all; }
.poster-steps { list-style: none; padding: 0; margin: 0 0 7mm; text-align: left; font-size: 15pt; }
.poster-steps li { margin: 0 0 3mm; display: flex; align-items: baseline; gap: 4mm; }
.poster-steps b {
  flex: 0 0 9mm; height: 9mm; border-radius: 50%; background: var(--mid); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13pt;
}
.poster-steps em { color: var(--muted); font-style: normal; font-size: 12pt; margin-left: 2mm; }
.poster-prices { display: flex; flex-direction: column; gap: 1mm; font-size: 14pt; margin-bottom: 5mm; }
.poster-pay { font-size: 12pt; color: var(--muted); margin: 0 0 5mm; }
.poster-langs { list-style: none; padding: 0; margin: auto 0 0; font-size: 10pt; color: var(--muted); }

@media print {
  @page { size: A4; margin: 0; }
  .no-print { display: none !important; }
  .poster-body { background: #fff; }
  .poster { margin: 0; box-shadow: none; min-height: 0; height: 296mm; overflow: hidden; break-after: avoid; }
}

@media (max-width: 380px) {
  .logo { height: 28px; }
  .langs { gap: 0; }
  .langs a { padding: 6px 4px; font-size: 12px; }
  .hero h1 { font-size: 26px; }
  .segmented { grid-template-columns: 1fr; }
}
