/* IQ-EET – mobile-first, bez frameworku */
:root {
  --ink: #1d2433; --muted: #5b6475; --line: #e3e6ec; --bg: #f5f7fa; --card: #fff;
  --accent: #2f5bd3; --accent-ink: #fff; --ok: #1f7a4d; --ok-bg: #e7f6ee;
  --warn: #8a5300; --warn-bg: #fff4e0; --err: #b42318; --err-bg: #fdecea;
  --radius: 12px; --tab-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg); padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 16px); }
main { max-width: 640px; margin: 0 auto; padding: 12px 16px; }
main.narrow { max-width: 380px; padding-top: 12vh; }
a { color: var(--accent); }
h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 24px 4px 8px; }

.top { position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 1px solid var(--line);
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; display: flex; align-items: baseline; gap: 12px; }
.top h1 { font-size: 18px; margin: 0; }
.brand { font-weight: 800; color: var(--accent); text-decoration: none; letter-spacing: -.02em; }
.brand.big { font-size: 34px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 10px 0; }
label { display: block; font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.label { display: block; font-size: 14px; color: var(--muted); margin: 0 0 6px; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; font: inherit; color: var(--ink);
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-height: 46px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
input.big { font-size: 24px; font-weight: 700; }
input[type=file] { padding: 9px; }
label.check { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 15px; margin: 12px 4px; }
label.check input { width: 22px; height: 22px; min-height: 0; margin: 0; flex: none; }
small.err, .err { color: var(--err); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; }

.row { display: flex; gap: 8px; align-items: center; }
.row input { flex: 1; }
.row.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn.block { display: flex; width: 100%; margin: 10px 0; }
.btn.big { min-height: 56px; font-size: 18px; }
.btn:disabled { opacity: .6; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.actions .btn, .actions form { flex: 1 1 30%; }
.actions form .btn { width: 100%; }

/* segmentový přepínač z radio buttonů */
.seg { display: flex; background: #e9edf3; border-radius: 10px; padding: 3px; gap: 3px; margin: 6px 0 12px; }
.seg label { flex: 1; margin: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 10px 4px; border-radius: 8px; font-size: 14px; color: var(--ink); font-weight: 600; }
.seg input:checked + span { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.12); color: var(--accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.seg.small span { padding: 7px 4px; }

.flash { border-radius: 10px; padding: 10px 12px; margin: 10px 0; font-size: 14px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.warn { background: var(--warn-bg); color: var(--warn); }
.flash.err { background: var(--err-bg); color: var(--err); }

.month { display: flex; align-items: center; justify-content: space-between; margin: 4px 0; text-transform: capitalize; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 12px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.stats span { display: block; font-size: 12px; }
.stats b { font-size: 16px; }

.list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list li { display: flex; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list li > a:first-child { flex: 1; display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; color: inherit; text-decoration: none; }
.list small { display: block; }
.list .right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.list .edit { padding: 12px 14px; text-decoration: none; color: var(--muted); border-left: 1px solid var(--line); display: flex; align-items: center; }
.list .empty { padding: 20px 14px; color: var(--muted); display: block; }

.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #eef1f5; color: var(--muted); font-weight: 600; }
.badge.potvrzeno, .badge.overeno { background: var(--ok-bg); color: var(--ok); }
.badge.ceka { background: var(--warn-bg); color: var(--warn); }
.badge.odmitnuto { background: var(--err-bg); color: var(--err); }

.amount { font-size: 34px; font-weight: 800; margin: 2px 0 8px; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 8px 0 0; font-size: 15px; }
dt { color: var(--muted); }
dd { margin: 0; }

.b2b { display: none; }
form.firma .b2b { display: block; }

.qr { text-align: center; padding: 8px 0 4px; }
.qr svg { width: 220px; height: 220px; }
.guide ol { padding-left: 20px; margin: 0; }
.guide li { margin: 0 0 8px; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; background: var(--card);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; color: var(--muted); text-decoration: none; gap: 2px; }
.tabbar a .ico { display: flex; align-items: center; justify-content: center; height: 26px; }
.tabbar a.on { color: var(--accent); font-weight: 600; }
.tabbar a.plus .ico { background: var(--accent); color: #fff; width: 34px; height: 34px; border-radius: 50%; }
.tabbar a.plus .ico svg { width: 20px; height: 20px; stroke-width: 2.2; }
.tabbar a.plus.on { color: var(--accent); }
.ico svg { display: block; }

body.login { padding-bottom: 0; }

@media (min-width: 900px) {
  main { max-width: 760px; padding-top: 20px; }
  /* na počítači: navigace jako horní lišta přes celou šířku, hlavička stránky pod ní – nic se nepřekrývá */
  :root { --nav-h: 56px; }
  .tabbar { top: 0; bottom: auto; height: var(--nav-h); justify-content: flex-end; gap: 2px;
    border-top: 0; border-bottom: 1px solid var(--line); padding: 0 16px; }
  .tabbar a { flex: none; height: var(--nav-h); padding: 0 12px; flex-direction: row; font-size: 14px; gap: 8px; }
  .tabbar a .ico svg { width: 18px; height: 18px; }
  .tabbar a.plus .ico { width: 26px; height: 26px; }
  .tabbar a.plus .ico svg { width: 16px; height: 16px; }
  body { padding-top: var(--nav-h); padding-bottom: 24px; }
  .top { top: var(--nav-h); }
}

/* administrace */
.top .small-btn, .small-btn { min-height: 34px; padding: 0 10px; font-size: 14px; }
.top .small-btn .ico svg { width: 18px; height: 18px; }
.top { align-items: center; }
.top h1 { flex: 1; }
.impersonace { display: flex; gap: 10px; align-items: center; justify-content: space-between;
  background: #fff4d6; color: #7a5200; border-bottom: 1px solid #f0d58a; padding: 8px 14px; font-size: 14px; }
.impersonace form { margin: 0; }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 20px; font-weight: 700; letter-spacing: .04em;
  background: #fff; border: 1px dashed var(--line); border-radius: 10px; padding: 10px; text-align: center; user-select: all; }
.badge.blok { background: var(--err-bg); color: var(--err); }
.danger { border-color: var(--err-bg); }
.btn.danger { color: var(--err); border-color: var(--err); }
table.audit { width: 100%; border-collapse: collapse; font-size: 14px; }
table.audit td { border-bottom: 1px solid var(--line); padding: 8px 6px; vertical-align: top; }
[hidden] { display: none !important; }
/* Akce – výběr dokladů v přehledu */
.list .vyber { display: flex; align-items: center; padding: 0 14px; border-left: 1px solid var(--line); cursor: pointer; }
.list .vyber input { width: 22px; height: 22px; margin: 0; }
.akce-stitek { display: inline-block !important; margin-top: 4px; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: #e8eefc; color: var(--accent); font-weight: 600; }
.zarazeni .row select { flex: 1; }
details.card summary { cursor: pointer; font-weight: 600; }
/* Rychlý doklad */
.rychly .row .btn { flex: 1; }
.rychly input.big { font-size: 24px; text-align: center; }
.pre { white-space: pre-line; }

/* ---------- Veřejný web ---------- */
body.web { padding-bottom: 0; background: #fff; }
.web .wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.web-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: calc(env(safe-area-inset-top) + 10px) 20px 10px; background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.web-top .brand { font-size: 22px; }
.web-top nav { display: flex; align-items: center; gap: 16px; font-size: 15px; }
.web-top nav a:not(.btn) { color: var(--ink); text-decoration: none; }
.web-top .btn { min-height: 38px; }
@media (max-width: 520px) { .web-top nav a[href$="#cenik"] { display: none; } }
.hero { background: linear-gradient(160deg, #eef3ff 0%, #fff 70%); padding: 56px 0 40px; }
.hero h1 { font-size: clamp(30px, 6vw, 52px); line-height: 1.08; letter-spacing: -.025em; margin: 6px 0 16px; max-width: 760px; }
.hero .lead { font-size: clamp(17px, 2.4vw, 20px); max-width: 680px; color: #2a3346; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; color: var(--accent); background: #e3ebff;
  padding: 4px 10px; border-radius: 999px; margin: 0; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 8px; }
.web-main section { margin: 44px auto; }
.nadpis { font-size: clamp(22px, 3.4vw, 30px); text-transform: none; letter-spacing: -.015em; color: var(--ink); margin: 0 0 14px; }
.web .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; align-items: stretch; }
.karty .card ul, .tarif ul { margin: 8px 0 0; padding-left: 20px; }
.karty .ano { border-top: 4px solid var(--ok); }
.karty .ne { border-top: 4px solid #c4cad6; }
.funkce .card span, .kroky span, .eet-off span { display: block; color: var(--muted); margin-top: 4px; }
.kroky { list-style: none; counter-reset: k; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.kroky li { counter-increment: k; background: var(--bg); border-radius: var(--radius); padding: 16px 16px 16px 58px; position: relative; }
.kroky li::before { content: counter(k); position: absolute; left: 16px; top: 14px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; display: grid; place-items: center; }
.eet-test fieldset { border: 0; padding: 0; margin: 0 0 10px; }
.eet-test legend { font-weight: 600; margin-bottom: 2px; }
.eet-test label.check { margin: 6px 4px; }
.vysledek { margin-top: 8px; padding: 14px; border-radius: 10px; background: var(--bg); font-weight: 600; }
.vysledek.ano { background: var(--warn-bg); color: var(--warn); }
.vysledek.ne { background: var(--ok-bg); color: var(--ok); }
.tarif { position: relative; display: flex; flex-direction: column; }
.tarif .cena { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 0; }
.tarif .cena small { font-size: 14px; font-weight: 600; color: var(--muted); }
.tarif.doporuceny { border: 2px solid var(--accent); box-shadow: 0 6px 24px rgba(47,91,211,.12); }
.tarif .badge { position: absolute; top: -11px; right: 12px; background: var(--accent); color: #fff; }
.zavadeci { background: #e3ebff; border-radius: 10px; padding: 10px 14px; }
.eet-off { border-left: 4px solid var(--warn); margin-top: 14px; }
.obory { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.faq details summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 0; color: #2a3346; }
.zaver { text-align: center; padding: 40px 20px; background: var(--bg); border-radius: 16px; }
.zaver h2 { font-size: 26px; text-transform: none; letter-spacing: -.01em; color: var(--ink); margin: 0 0 16px; }
.web-foot { border-top: 1px solid var(--line); padding: 28px 20px calc(env(safe-area-inset-bottom) + 28px); max-width: 1040px; margin: 0 auto;
  display: grid; gap: 10px; color: var(--muted); font-size: 14px; }
.web-foot-links { display: flex; flex-wrap: wrap; gap: 16px; }
.web-form { padding-top: 6vh; }
.web-form h1 { margin: 0 0 4px; }
.past { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.web .text { max-width: 720px; }
.web .text h2 { text-transform: none; letter-spacing: 0; color: var(--ink); font-size: 18px; }
/* Průvodce nastavením EET */
.pruvodce { list-style: none; padding: 0; margin: 0; counter-reset: p; }
.pruvodce li { counter-increment: p; }
.pruvodce li b::before { content: counter(p) ". "; }
.pruvodce li.hotovo { opacity: .7; }
.pruvodce .btn { margin-top: 4px; }
.akce-stitek.storno { background: var(--err-bg); color: var(--err); }
