/*
 * Expediční kiosek (expedice.hooray.cz) — monitor na výšku, čtečka čárových kódů + myš.
 * Tmavé téma, velké cíle. Žádné externí fonty/ikony; žádný inline style v HTML (style-src 'self').
 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: #121a26; color: #f4f6f8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
}
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: 0; }
button:disabled { opacity: 0.4; cursor: not-allowed; }
.x-hidden { display: none !important; }
.x-muted { color: #6f7b89; font-size: 0.9rem; }
h1, h2 { margin: 0; }

.x-screen { display: none; height: 100%; }
.x-screen.show { display: flex; flex-direction: column; }

/* ── Registrace / zamítnuto ──────────────────────────────────────────────── */
.x-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.x-center h1 { font-size: 2rem; margin-bottom: 12px; }
.x-center p { color: #aab4c0; max-width: 520px; line-height: 1.45; }
.x-spinner { width: 54px; height: 54px; border: 5px solid #2a3647; border-top-color: #4f8cff; border-radius: 50%; animation: x-spin 1s linear infinite; margin-bottom: 20px; }
@keyframes x-spin { to { transform: rotate(360deg); } }

/* ── PIN ─────────────────────────────────────────────────────────────────── */
.x-pin-wrap { margin: auto; display: flex; flex-direction: column; align-items: center; padding: 3vh 4vw; width: min(520px, 100%); }
.x-pin-brand { font-size: 1.1rem; letter-spacing: 0.35em; color: #6f7b89; font-weight: 700; }
.x-pin-title { font-size: 2rem; font-weight: 700; margin-top: 2vh; }
.x-dots { display: flex; gap: 18px; margin: 3vh 0 1.5vh; }
.x-dot { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #5c6978; transition: background 0.12s, border-color 0.12s; }
.x-dot.on { background: #4f8cff; border-color: #4f8cff; }
.x-dots.error .x-dot { border-color: #ff5c5c; }
.x-dots.error .x-dot.on { background: #ff5c5c; }
.x-dots.shake { animation: x-shake 0.4s; }
@keyframes x-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.x-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; width: 100%; margin-top: 2vh; }
.x-keypad.busy { pointer-events: none; opacity: 0.6; }
.x-key { height: clamp(72px, 10vh, 110px); font-size: 2.2rem; font-weight: 600; background: #1f2b3d; border-radius: 16px; }
.x-key:active { background: #2d3d57; }
.x-key--fn { background: #172131; color: #aab4c0; }
.x-pin-hint { margin-top: 2.5vh; color: #6f7b89; font-size: 0.9rem; }

.x-msg { min-height: 1.5em; margin: 4px 0; text-align: center; font-size: 1.05rem; color: #ff8a8a; }
.x-msg.info { color: #aab4c0; }
.x-msg.ok { color: #6be08c; }
.x-msg.warn { color: #ffcf66; }

/* ── Hlavní obrazovka ────────────────────────────────────────────────────── */
.x-main { padding: 0; }
.x-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; background: #0d141e; border-bottom: 1px solid #263246; }
.x-top-op { font-weight: 700; font-size: 1.1rem; }
.x-top-mid { display: flex; align-items: center; gap: 12px; color: #aab4c0; font-size: 0.9rem; }
.x-top-right { display: flex; align-items: center; gap: 14px; }
.x-idle { color: #6f7b89; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.x-conn { display: inline-flex; align-items: center; gap: 6px; }
.x-conn-dot { width: 10px; height: 10px; border-radius: 50%; background: #3ecf6e; }
.x-conn--offline .x-conn-dot { background: #ff5c5c; }
.x-mockbadge { display: none; background: #b8860b; color: #000; font-weight: 800; padding: 2px 8px; border-radius: 6px; font-size: 0.8rem; }
.x-mockbadge.show { display: inline-block; }

.x-scanrow { padding: 14px 20px 0; }
.x-scanlabel { display: block; font-size: 0.85rem; color: #aab4c0; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.08em; }
.x-scan { width: 100%; height: 76px; font-size: 2.2rem; font-weight: 700; padding: 0 20px; background: #0d141e; border: 4px solid #4f8cff; border-radius: 14px; outline: none; letter-spacing: 0.04em; }
.x-scan:focus { box-shadow: 0 0 0 5px rgba(79, 140, 255, 0.3); }
.x-scan:disabled { opacity: 0.6; }
.x-msg--main { padding: 0 20px; text-align: left; min-height: 1.6em; }

.x-content { flex: 1; overflow-y: auto; padding: 8px 20px 16px; }
.x-empty { height: 100%; min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #4a586a; }
.x-empty-icon { font-size: 4rem; letter-spacing: 0.1em; }
.x-empty-text { font-size: 1.4rem; margin-top: 12px; }

.x-card { background: #182233; border-radius: 14px; padding: 14px 18px; margin-bottom: 12px; }
.x-h { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; color: #aab4c0; margin-bottom: 10px; }
.x-h-sub { color: #6f7b89; font-weight: 400; text-transform: none; letter-spacing: 0; margin-left: 6px; }
.x-hint { color: #6f7b89; font-size: 0.85rem; margin-top: 8px; }

.x-choice-list { display: flex; flex-direction: column; gap: 10px; }
.x-choice { text-align: left; background: #223049; border-radius: 12px; padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; }
.x-choice:hover, .x-choice:focus { background: #2b3d5d; outline: 2px solid #4f8cff; }
.x-choice-t { font-weight: 700; font-size: 1.25rem; }
.x-choice-s { color: #aab4c0; font-size: 0.95rem; }

/* hlavička objednávky + stav */
.x-head { display: flex; gap: 14px; align-items: stretch; margin: 6px 0 12px; }
.x-head-main { flex: 1; }
.x-ordno { font-size: 2.2rem; font-weight: 800; line-height: 1.1; }
.x-origin { margin-top: 6px; color: #aab4c0; font-size: 1.05rem; }
.x-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #2a3647; margin-right: 6px; font-size: 0.9rem; color: #f4f6f8; }
.x-status { flex: 0 0 44%; border-radius: 14px; padding: 12px 16px; display: flex; flex-direction: column; justify-content: center; }
.x-status--ok { background: #12462a; border: 3px solid #3ecf6e; }
.x-status--bad { background: #511a1a; border: 3px solid #ff5c5c; }
.x-status-label { font-size: 1.5rem; font-weight: 800; }
.x-status-sub { margin-top: 4px; font-size: 0.95rem; opacity: 0.9; }

/* problémy */
.x-problems { background: #511a1a; border: 3px solid #ff5c5c; border-radius: 14px; padding: 12px 18px; margin-bottom: 12px; }
.x-problems h3, .x-warnings h3 { margin: 0 0 6px; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; }
.x-problems ul, .x-warnings ul { margin: 0; padding-left: 22px; }
.x-problems li { font-size: 1.15rem; font-weight: 600; margin: 3px 0; }
.x-warnings { background: #4a3b10; border: 2px solid #e0b030; border-radius: 14px; padding: 10px 18px; margin-bottom: 12px; }
.x-warnings li { margin: 2px 0; }

/* dobírka */
.x-cod { border-radius: 14px; padding: 16px 20px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.x-cod--yes { background: #e8590c; color: #fff; }
.x-cod--no { background: #182233; color: #aab4c0; font-size: 1.1rem; padding: 10px 18px; }
.x-cod--unknown { background: #7a5a00; color: #fff; }
.x-cod-t { font-size: 1.6rem; font-weight: 900; letter-spacing: 0.1em; }
.x-cod-amt { font-size: 3rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.x-cod .x-btn { background: rgba(0, 0, 0, 0.3); }

/* položky */
.x-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.x-item { display: flex; align-items: center; gap: 16px; background: #223049; border: 3px solid transparent; border-radius: 12px; padding: 10px 16px; cursor: pointer; user-select: none; -webkit-user-select: none; }
.x-item:hover { background: #2a3b58; }
.x-item.on { background: #12462a; border-color: #3ecf6e; }
.x-item-check { flex: 0 0 44px; height: 44px; border-radius: 10px; border: 3px solid #5c6978; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 900; color: transparent; }
.x-item.on .x-item-check { background: #3ecf6e; border-color: #3ecf6e; color: #07260f; }
.x-item-qty { flex: 0 0 auto; min-width: 70px; text-align: center; font-size: 1.6rem; font-weight: 700; color: #aab4c0; font-variant-numeric: tabular-nums; }
.x-item-qty--big { font-size: 4.2rem; line-height: 1; font-weight: 900; color: #ffd43b; min-width: 120px; }
.x-item.on .x-item-qty--big { color: #ffe680; }
.x-item-main { flex: 1; min-width: 0; }
.x-item-name { font-size: 1.3rem; font-weight: 700; overflow-wrap: anywhere; }
.x-item-meta { color: #aab4c0; font-size: 0.95rem; margin-top: 2px; overflow-wrap: anywhere; }
.x-item-addons { color: #c8d1dc; font-size: 0.95rem; margin-top: 2px; }

/* doprava */
.x-carrier-hint { color: #aab4c0; font-size: 0.95rem; margin-bottom: 8px; }
.x-carrier-hint .x-override { color: #ffcf66; font-weight: 700; }
.x-row { display: flex; gap: 14px; margin-bottom: 10px; }
.x-row > * { flex: 1; min-width: 0; }
.x-field { display: flex; flex-direction: column; gap: 4px; }
.x-field-l { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: #aab4c0; }
.x-select, .x-input { height: 56px; padding: 0 12px; background: #0d141e; border: 2px solid #34435b; border-radius: 10px; width: 100%; }
.x-select:focus, .x-input:focus { outline: none; border-color: #4f8cff; }
.x-input--weight { font-size: 1.6rem; font-weight: 700; text-align: center; }
.x-input.bad { border-color: #ff5c5c; }
.x-pickup { background: #223049; border-radius: 10px; padding: 8px 14px; margin-bottom: 10px; }
.x-stepper { display: flex; align-items: center; gap: 8px; }
.x-step { width: 64px; height: 56px; border-radius: 10px; background: #2a3b58; font-size: 2rem; font-weight: 700; }
.x-step:active { background: #3a4f74; }
.x-step-val { flex: 1; text-align: center; font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* adresa */
.x-addr { font-size: 1.25rem; line-height: 1.45; }
.x-addr-name { font-weight: 700; font-size: 1.4rem; }
.x-addr-line { overflow-wrap: anywhere; }
.x-addr-contact { color: #aab4c0; font-size: 1rem; margin-top: 4px; }

/* kontrola adresy */
.x-acheck { margin-top: 10px; }
.x-ac { padding: 8px 12px; border-radius: 10px; font-size: 1.05rem; margin-bottom: 6px; overflow-wrap: anywhere; }
.x-ac--info { color: #aab4c0; }
.x-ac--ok { color: #6fdc8c; padding-left: 0; font-size: 0.95rem; }
.x-ac--warn { background: #3a2f10; border: 2px solid #ffcf66; color: #ffe29a; }
.x-ac--bad { background: #511a1a; border: 2px solid #ff5c5c; color: #ffb3b3; }
.x-ac-sugs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.x-ac-sug { background: #1f4fa8; color: #fff; }
.x-ac-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.x-ac-edit { display: grid; grid-template-columns: 90px 160px 1fr; gap: 8px; }
.x-ac-edit .x-in-street { grid-column: 1 / -1; }
.x-ac-f { display: block; }

/* už expedováno */
.x-card--shipped { border: 3px solid #ffcf66; background: #3a2f10; }
.x-shp { padding: 8px 0; border-top: 1px solid #5c4a1a; }
.x-shp:first-child { border-top: 0; }
.x-shp-t { font-size: 1.2rem; font-weight: 700; }
.x-shp-s { color: #d8c89a; font-size: 0.95rem; margin: 2px 0; overflow-wrap: anywhere; }
.x-shp-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.x-shp-prev { margin-top: 10px; color: #d8c89a; font-size: 0.9rem; }
.x-shp-prev-h { font-weight: 700; margin-bottom: 4px; }

/* spodní lišta */
.x-foot { display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: #0d141e; border-top: 1px solid #263246; }
.x-foot-info { flex: 1; color: #aab4c0; font-size: 1rem; }
.x-foot-info .bad { color: #ff8a8a; font-weight: 700; }
.x-ship { flex: 0 0 52%; height: clamp(90px, 12vh, 130px); border-radius: 18px; font-size: 3rem; font-weight: 900; letter-spacing: 0.05em; background: #2f9e44; color: #fff; }
.x-ship:disabled { background: #2a3647; color: #6f7b89; opacity: 1; }
.x-ship.busy { background: #5c6978; }

/* tlačítka */
.x-btn { min-height: 52px; padding: 0 22px; border-radius: 12px; font-weight: 700; background: #2a3b58; }
.x-btn:hover:not(:disabled) { filter: brightness(1.15); }
.x-btn--ghost { background: transparent; border: 2px solid #34435b; color: #aab4c0; }
.x-btn--yes { background: #2f9e44; color: #fff; }
.x-btn--no { background: #c92a2a; color: #fff; }
.x-btn--danger { background: #c92a2a; color: #fff; }
.x-btn--warn { background: #b8860b; color: #fff; }

/* modaly */
.x-modal { position: fixed; inset: 0; background: rgba(5, 9, 15, 0.82); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.x-modal-box { background: #182233; border-radius: 18px; padding: 28px; width: min(640px, 100%); max-height: 92vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.x-modal-title { font-size: 1.9rem; font-weight: 800; text-align: center; }
.x-modal-method { font-size: 1.5rem; text-align: center; background: #0d141e; border-radius: 10px; padding: 14px; overflow-wrap: anywhere; color: #ffd43b; font-weight: 700; }
.x-modal-text { color: #c8d1dc; line-height: 1.45; }
.x-modal-actions { display: flex; flex-direction: column; gap: 12px; }
.x-modal-actions .x-btn { min-height: 80px; font-size: 1.5rem; }
.x-modal-box--done { text-align: center; }
.x-done-icon { font-size: 5rem; font-weight: 900; color: #3ecf6e; line-height: 1; }
.x-done-icon.bad { color: #ff5c5c; }
.x-done-title { font-size: 2rem; font-weight: 800; }
.x-done-sub { color: #aab4c0; }
.x-done-list { text-align: left; background: #0d141e; border-radius: 10px; padding: 10px 16px; overflow-wrap: anywhere; font-size: 1.05rem; }
.x-done-push { color: #aab4c0; min-height: 1.4em; }
.x-done-push.ok { color: #6be08c; }
.x-done-push.bad { color: #ff8a8a; font-weight: 700; }

/* ── F4-b: QZ Tray stav, záložky, Odeslané zásilky, stav tisku ───────────── */
.x-qz { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: #aab4c0; font-size: 0.9rem; padding: 4px 8px; border-radius: 8px; border: 1px solid #263246; }
.x-qz .x-conn-dot { background: #3ecf6e; }
.x-qz--off .x-conn-dot { background: #ff5c5c; }
.x-qz--busy .x-conn-dot { background: #ffcf66; }
.x-qz--warn .x-conn-dot { background: #ffcf66; }

.x-tabs { display: flex; gap: 8px; padding: 10px 20px 0; }
.x-tab { min-height: 48px; padding: 0 22px; border-radius: 10px 10px 0 0; background: #172131; color: #aab4c0; font-weight: 700; border-bottom: 3px solid transparent; }
.x-tab.active { background: #1f2b3d; color: #f4f6f8; border-bottom-color: #4f8cff; }

.x-listview { display: none; flex: 1; flex-direction: column; overflow: hidden; padding: 12px 20px 16px; }
.x-view-list .x-listview { display: flex; }
.x-view-list .x-scanrow, .x-view-list #x-main-msg, .x-view-list .x-content, .x-view-list #x-foot { display: none; }
.x-lf { display: grid; grid-template-columns: 2fr 1.2fr 1fr 1fr 1.2fr; gap: 10px; align-items: end; }
.x-lf .x-input, .x-lf .x-select { height: 48px; }
.x-lf-q .x-input { border-color: #4f8cff; border-width: 3px; font-weight: 700; }
.x-ls-wrap { flex: 1; overflow-y: auto; margin-top: 6px; }
.x-ls-head, .x-ls-row { display: grid; grid-template-columns: 1.1fr 0.9fr 1fr 0.9fr 1.7fr 0.5fr 1fr 0.5fr; gap: 8px; align-items: center; padding: 8px 10px; }
.x-ls-head { position: sticky; top: 0; background: #121a26; color: #6f7b89; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.x-ls-row { width: 100%; text-align: left; background: #182233; border-radius: 8px; margin-bottom: 4px; font-size: 0.95rem; min-height: 52px; }
.x-ls-row:hover { background: #20304a; }
.x-ls-row > span { overflow-wrap: anywhere; }
.x-ls-no { font-weight: 800; }
.x-ls-st-bad { color: #ff8a8a; font-weight: 700; }
.x-ls-st-ok { color: #6be08c; }
.x-ls-pr-no { color: #ffcf66; font-weight: 700; }
.x-ls-more { text-align: center; padding: 8px 0; }
.x-ls-empty { color: #6f7b89; text-align: center; padding: 30px; }

.x-done-print { min-height: 1.4em; color: #aab4c0; }
.x-done-print.ok { color: #6be08c; }
.x-done-print.bad { color: #ff8a8a; font-weight: 700; }
.x-done-print.warn { color: #ffcf66; font-weight: 700; }
