/* ============================================================
   QR Platba – styl pokladního terminálu
   Paleta:  ink #0F1B2D · bg #EEF1F4 · accent #00B386
   Číslice: tabulární, "displejový" výraz
   ============================================================ */

:root {
  --ink: #0F1B2D;
  --ink-soft: #2A3B50;
  --bg: #EEF1F4;
  --surface: #FFFFFF;
  --line: #DFE4EA;
  --muted: #5B6B7B;
  --accent: #00B386;
  --accent-dark: #00876A;
  --danger: #D6453D;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 27, 45, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ---- topbar ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: var(--ink);
  color: #fff;
}
.brand {
  font-weight: 700; letter-spacing: 0.02em; font-size: 1.05rem;
  color: #fff; text-decoration: none;
}
.brand::before {
  content: "▰▰"; color: var(--accent); margin-right: 8px; letter-spacing: -2px;
}
.topbar nav { display: flex; gap: 6px; }
.topbar nav a {
  color: #cdd6e0; text-decoration: none; font-size: 0.9rem;
  padding: 6px 12px; border-radius: 999px;
}
.topbar nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* ---- layout ---- */
main {
  max-width: 460px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}
.footer {
  text-align: center; color: var(--muted);
  font-size: 0.78rem; padding: 16px; letter-spacing: 0.04em;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.7rem; font-weight: 600; color: var(--muted);
  margin: 0 0 4px;
}

/* ---- amount display (entry) ---- */
.amount-screen {
  text-align: right;
  padding: 18px 20px;
  background: var(--ink);
  border-radius: 12px;
  color: #fff;
  margin-bottom: 18px;
}
.amount-screen .label {
  text-align: left; color: #8ea0b3; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.12em;
}
.amount-screen .value {
  font-size: 3rem; line-height: 1.1; font-weight: 700;
  display: flex; align-items: baseline; justify-content: flex-end; gap: 8px;
}
.amount-screen .value .ccy { font-size: 1.1rem; color: var(--accent); font-weight: 600; }

/* ---- keypad ---- */
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.key {
  font: inherit; font-size: 1.6rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 18px 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
  color: var(--ink);
  transition: transform .05s ease, background .12s ease;
  user-select: none;
}
.key:hover { background: #F3F6F9; }
.key:active { transform: scale(0.96); background: #E9eef3; }
.key.fn { font-size: 1.2rem; color: var(--muted); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  font: inherit; font-size: 1.05rem; font-weight: 600;
  padding: 16px 20px;
  border: none; border-radius: 12px;
  background: var(--accent); color: #fff;
  cursor: pointer; text-decoration: none;
  transition: background .12s ease, transform .05s ease;
}
.btn:hover { background: var(--accent-dark); }
.btn:active { transform: scale(0.99); }
.btn[disabled] { background: #B7C2cc; cursor: not-allowed; }
.btn.secondary { background: var(--ink); }
.btn.secondary:hover { background: var(--ink-soft); }
.btn.ghost {
  background: transparent; color: var(--muted);
  border: 1px solid var(--line);
}
.btn.ghost:hover { background: #fff; color: var(--ink); }

.actions { margin-top: 16px; display: grid; gap: 10px; }

/* ---- QR display screen ---- */
.terminal {
  background: var(--ink);
  border-radius: 20px;
  padding: 24px;
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow);
}
.terminal .pay-amount {
  font-size: 2.4rem; font-weight: 700; font-variant-numeric: tabular-nums;
  margin: 2px 0 18px;
}
.pay-amount .ccy { color: var(--accent); font-size: 1.1rem; margin-left: 12px; }
.qr-box {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  width: min(300px, 78vw);
  margin: 24px auto;        /* víc prostoru nad i pod QR */
}
.qr-box svg { display: block; width: 100%; height: auto; }

.details {
  text-align: left;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 4px 16px;
  margin-bottom: 18px;
}
.details .row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.details .row:last-child { border-bottom: none; }
.details .k { color: #8ea0b3; font-size: 0.98rem; }
.details .v { font-weight: 600; font-size: 1.08rem; text-align: right; word-break: break-word; }
.details .v.num { font-variant-numeric: tabular-nums; }

/* ---- forms (admin) ---- */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 0.82rem; font-weight: 600;
  color: var(--ink-soft); margin-bottom: 6px;
}
.field .hint { font-weight: 400; color: var(--muted); }
.input {
  width: 100%; font: inherit; font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink);
}
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 80px 1fr 90px; gap: 8px; align-items: end; }

.section-title {
  font-size: 0.95rem; font-weight: 700; margin: 22px 0 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.section-title:first-of-type { margin-top: 4px; }

.iban-preview {
  font-variant-numeric: tabular-nums; font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: #F3F6F9; border: 1px dashed var(--line);
  border-radius: 8px; padding: 10px 12px; color: var(--ink-soft);
  font-size: 0.9rem; word-break: break-all;
}

/* ---- alerts ---- */
.alert {
  border-radius: 10px; padding: 12px 14px; margin-bottom: 16px;
  font-size: 0.9rem;
}
.alert.ok { background: #E3F7F0; color: var(--accent-dark); }
.alert.warn { background: #FFF4E5; color: #9A6400; }
.alert.err { background: #FDE7E6; color: var(--danger); }
.alert a { color: inherit; font-weight: 600; }

.center { text-align: center; }
.mt { margin-top: 16px; }

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

@media (max-width: 380px) {
  .amount-screen .value { font-size: 2.4rem; }
  .key { font-size: 1.4rem; padding: 15px 0; }
}
