/* Backoffice účetnímu.cz. Barvy, písma a poloměry z public/assets/app.css aplikace, boční menu je vždy tmavé. CSP nedovolí inline styly. */
:root {
  color-scheme:light;
  --bg:#F3F4F6; --surface:#FFFFFF; --surface2:#F1F3F6; --line:#E9EBEF; --line2:#D8DCE2;
  --text:#0E1116; --muted:#5B6470;
  --accent:#FFCC00; --accent-ink:#111111; --accent-hover:#F2C200;
  --pink:#C8077C; --link:#074284;
  --ok:#0A7D55; --ok-bg:#E3F4EC; --warn:#8A5A00; --warn-bg:#FFF4CC; --err:#B42335; --err-bg:#FDECEE;
  --info:#074284; --info-bg:#E4EDF8; --pink-bg:#FBE6F3;
  --shadow:0 1px 2px rgba(14,17,22,.04); --stin:0 18px 48px rgba(14,17,22,.18);
  --radius:14px; --radius-s:10px;
  --mono:ui-monospace,"SF Mono",Menlo,Consolas,"Cascadia Mono","Roboto Mono",monospace;
}
@media (prefers-color-scheme:dark) {
  :root:not([data-tema="den"]) {
    color-scheme:dark;
    --bg:#0B0D10; --surface:#15181D; --surface2:#1E222A; --line:#262B33; --line2:#353B45;
    --text:#EDEFF3; --muted:#9AA3AE; --accent-hover:#FFD633;
    --pink:#FF5CB4; --link:#8FB4FF;
    --ok:#7CE0A8; --ok-bg:#12301F; --warn:#FFD966; --warn-bg:#332A0A; --err:#FF8A9A; --err-bg:#3A1820;
    --info:#8FB4FF; --info-bg:#16263D; --pink-bg:#351428;
    --shadow:none; --stin:0 18px 48px rgba(0,0,0,.6);
  }
}
:root[data-tema="noc"] {
  color-scheme:dark;
  --bg:#0B0D10; --surface:#15181D; --surface2:#1E222A; --line:#262B33; --line2:#353B45;
  --text:#EDEFF3; --muted:#9AA3AE; --accent-hover:#FFD633;
  --pink:#FF5CB4; --link:#8FB4FF;
  --ok:#7CE0A8; --ok-bg:#12301F; --warn:#FFD966; --warn-bg:#332A0A; --err:#FF8A9A; --err-bg:#3A1820;
  --info:#8FB4FF; --info-bg:#16263D; --pink-bg:#351428;
  --shadow:none; --stin:0 18px 48px rgba(0,0,0,.6);
}
@media (prefers-reduced-motion:no-preference) { @view-transition { navigation:auto; } }

*, *::before, *::after { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--bg); color:var(--text); font:14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI Variable Text","Segoe UI",system-ui,sans-serif; -webkit-font-smoothing:antialiased; }
a { color:var(--link); text-decoration:none; }
a:hover { text-decoration:underline; }
h1 { font-size:24px; line-height:1.15; letter-spacing:-.02em; margin:0; font-weight:650; }
h2 { font-size:15px; margin:0; font-weight:600; letter-spacing:-.005em; }
p { margin:0; }
pre { white-space:pre-wrap; margin:0; font-family:var(--mono); }
ul { margin:0; padding:0; list-style:none; }
summary { cursor:pointer; font-weight:550; }
:focus-visible { outline:2px solid var(--pink); outline-offset:2px; }
[hidden] { display:none !important; }

.drobne { font-size:12.5px; color:var(--muted); }
.cislo { font-family:var(--mono); font-variant-numeric:tabular-nums; }
.silne { font-weight:600; }
.velke { font-size:25px; font-weight:600; letter-spacing:-.02em; line-height:1.2; white-space:nowrap; }
.kratit { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.kratit-obal { min-width:0; }
.zalomit { word-break:break-all; }
.chyba-text { color:var(--err); }
.odstup { margin-bottom:14px; }
.odsazeni { margin-top:10px; }
.vradek { display:inline; }

/* rozvržení */
.bo-shell { display:grid; grid-template-columns:236px minmax(0,1fr); min-height:100vh; }
.bo-obsah { min-width:0; padding:0 28px 40px; }
.hlava { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:20px 0 18px; }
.radek { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.radek-tesny { gap:8px; flex-wrap:nowrap; min-width:0; }
.mezi { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.sloupec { display:flex; flex-direction:column; gap:16px; min-width:0; }
.sloupec-male { display:flex; flex-direction:column; gap:8px; min-width:0; }
.sloupec-tesne { display:flex; flex-direction:column; gap:2px; }
.mrizka-2 { display:grid; gap:16px; grid-template-columns:repeat(auto-fit,minmax(min(420px,100%),1fr)); align-items:start; }
.dlazdice { display:grid; gap:12px; grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr)); }
.dlazdice .karta-v { display:flex; flex-direction:column; gap:4px; min-width:0; }
.stroje { display:grid; gap:12px; grid-template-columns:repeat(auto-fit,minmax(min(380px,100%),1fr)); }
.pole-radek { display:grid; gap:10px; grid-template-columns:repeat(auto-fit,minmax(min(170px,100%),1fr)); }

/* boční menu */
.bo-rail { background:#0E1116; color:#FFFFFF; padding:18px 12px; display:flex; flex-direction:column; gap:14px; position:sticky; top:0; height:100vh; overflow-y:auto; }
.rail-znak { display:flex; flex-direction:column; gap:6px; padding:4px 10px 8px; color:#FFFFFF; }
.rail-znak:hover { text-decoration:none; }
.logo { display:block; height:18px; width:auto; }
.rail-znak span, .znacka-text { font:600 10.5px/1 var(--mono); letter-spacing:.14em; color:#FFCC00; }
.rail-sekce { display:flex; flex-direction:column; gap:2px; }
.rail-nadpis { font-size:11.5px; letter-spacing:.04em; color:#C9CED6; padding:8px 10px 4px; }
.rail-odkaz { display:flex; align-items:center; gap:10px; min-height:38px; padding:8px 10px; border-radius:10px; color:#FFFFFF; font-weight:500; transition:background .15s; }
a.rail-odkaz:hover { background:#262B33; text-decoration:none; }
.rail-odkaz.on { background:#C8077C; }
.rail-odkaz svg { flex:none; }
.rail-odkaz.vypnuto { color:#8D95A1; cursor:default; }
.rail-odkaz.vypnuto small { margin-left:auto; font-size:11px; color:#8D95A1; }
.rail-pocet { margin-left:auto; min-width:22px; height:20px; padding:0 6px; display:inline-flex; align-items:center; justify-content:center; border-radius:99px; background:#FFCC00; color:#111111; font:600 11.5px/1 var(--mono); }
.rail-tecka { width:8px; height:8px; border-radius:50%; background:#7CE0A8; flex:none; margin-left:auto; }
.rail-pocet:not([hidden]) + .rail-tecka { margin-left:0; }
.rail-tecka.t-warn { background:#FFCC00; }
.rail-pata { margin-top:auto; border-top:1px solid #262B33; padding:12px 10px 2px; display:flex; flex-direction:column; gap:4px; }
.rail-pata span { font-size:12.5px; color:#C9CED6; }
.rail-pata button { background:none; border:0; padding:0; color:#FFFFFF; font:inherit; font-size:12.5px; cursor:pointer; }
.rail-pata button:hover { text-decoration:underline; }

.spodni { display:none; }

/* karty a tlačítka */
.karta { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); min-width:0; }
.karta-v { padding:16px 18px; }
.karta-hlava { padding:14px 18px 10px; }
.polozka { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:center; padding:11px 18px; border-top:1px solid var(--line); }
p.polozka { display:block; }
.polozka-radek { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 18px; border-top:1px solid var(--line); }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:36px; padding:7px 13px; border-radius:10px; border:1px solid var(--line2); background:var(--surface); color:var(--text);
  font:inherit; font-weight:550; cursor:pointer; transition:background .15s,border-color .15s,transform .08s; white-space:nowrap; }
.btn:hover { background:var(--surface2); text-decoration:none; }
.btn:active { transform:translateY(1px); }
.btn-h { background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
.btn-h:hover { background:var(--accent-hover); border-color:var(--accent-hover); }
.btn-t { background:transparent; border-color:transparent; color:var(--link); }
.btn-m { min-height:30px; padding:4px 10px; font-size:13px; border-radius:8px; }
.btn-velke { min-height:44px; width:100%; }
.btn-nebezpeci { background:var(--err); border-color:var(--err); color:#FFFFFF; }
.btn-nebezpeci:hover { background:var(--err); opacity:.9; }
.odkaz-btn { background:none; border:0; padding:0; color:var(--link); font:inherit; cursor:pointer; text-decoration:underline; }
.ikona-btn { width:38px; height:38px; display:inline-flex; align-items:center; justify-content:center; border-radius:10px; border:1px solid var(--line2); background:var(--surface); color:var(--text); cursor:pointer; }
.ikona-btn:hover { background:var(--surface2); }
.hledat-btn { min-width:280px; justify-content:flex-start; color:var(--muted); font-weight:450; }
kbd { margin-left:auto; font:11.5px var(--mono); }
.seg { display:inline-flex; padding:3px; gap:2px; background:var(--surface2); border-radius:10px; flex-wrap:wrap; }
.seg-b { color:var(--muted); font-weight:550; padding:5px 12px; min-height:30px; border-radius:8px; white-space:nowrap; display:inline-flex; align-items:center; }
.seg-b:hover { color:var(--text); text-decoration:none; }
.seg-b.on { background:var(--surface); color:var(--text); box-shadow:0 1px 2px rgba(14,17,22,.1); }
.chip { display:inline-flex; align-items:center; min-height:32px; padding:4px 12px; border-radius:99px; border:1px solid var(--line2); color:var(--text); font-weight:500; white-space:nowrap; }
.chip:hover { background:var(--surface2); text-decoration:none; }
.chip.on { background:var(--text); border-color:var(--text); color:var(--bg); }
.stitek { display:inline-flex; align-items:center; gap:5px; padding:2px 8px; border-radius:99px; font-size:12px; font-weight:550; white-space:nowrap; background:var(--surface2); color:var(--muted); width:fit-content; }
.s-ok { background:var(--ok-bg); color:var(--ok); }
.s-warn { background:var(--warn-bg); color:var(--warn); }
.s-err { background:var(--err-bg); color:var(--err); }
.s-info { background:var(--info-bg); color:var(--info); }
.s-pink { background:var(--pink-bg); color:var(--pink); }
.tecka { width:8px; height:8px; border-radius:50%; display:inline-block; flex:none; background:var(--muted); }
.t-ok { background:var(--ok); } .t-warn { background:var(--warn); } .t-err { background:var(--err); }
.alert { background:var(--err-bg); color:var(--err); padding:9px 12px; border-radius:var(--radius-s); }
.alert-warn { background:var(--warn-bg); color:var(--warn); }

/* formuláře */
.pole { width:100%; min-height:38px; padding:8px 11px; border-radius:10px; border:1px solid var(--line2); background:var(--surface); color:var(--text); font:inherit; }
.pole:focus { outline:2px solid var(--pink); outline-offset:0; border-color:transparent; }
.pole-male { min-height:34px; padding:5px 10px; width:auto; }
.pole-kod { font-size:22px; letter-spacing:.2em; text-align:center; min-height:52px; }
.popis-pole { display:flex; flex-direction:column; gap:4px; font-size:12.5px; color:var(--muted); font-weight:550; min-width:0; }
.zaskrt { display:flex; align-items:center; gap:8px; }

/* tabulky */
.tab-obal { overflow-x:auto; }
.tab { width:100%; border-collapse:collapse; }
.tab th { text-align:left; font-size:12px; color:var(--muted); font-weight:550; padding:12px 16px 8px; white-space:nowrap; }
.tab td { padding:10px 16px; border-top:1px solid var(--line); vertical-align:top; }
.tab .c { text-align:right; font-family:var(--mono); font-variant-numeric:tabular-nums; white-space:nowrap; }
.tab .soucet td { font-weight:600; }
.tab .vypnuty td { opacity:.6; }
.pravo-plne { color:var(--ok); font-weight:600; }
.upravit { min-width:90px; }
.upravit[open] { min-width:230px; }
.seznam { display:flex; flex-direction:column; gap:4px; margin-top:6px; }

.tab .rozdil td { background:var(--warn-bg); }
.volby { border:0; margin:0; padding:0; min-width:0; flex-wrap:wrap; }

/* pošta a doklady */
.polozka-tesna { min-width:0; overflow-wrap:anywhere; }
.posta-text { font-family:inherit; overflow-wrap:anywhere; }
.posta-pole { font-family:var(--mono); }
.posta-html { width:100%; height:520px; border:1px solid var(--line); border-radius:var(--radius-s); background:#FFFFFF; }
.doklad-nahled { display:block; width:100%; height:auto; border-radius:var(--radius-s); }
.doklad-pdf { width:100%; height:640px; border:1px solid var(--line); border-radius:var(--radius-s); }

/* nástěnka poptávek */
.nastenka { display:grid; grid-template-columns:repeat(5,minmax(200px,1fr)); gap:12px; overflow-x:auto; padding-bottom:6px; align-items:start; }
.sloupec-faze { background:var(--surface2); border-radius:var(--radius); padding:10px; min-height:220px; display:flex; flex-direction:column; gap:8px; transition:outline-color .15s; outline:2px dashed transparent; outline-offset:-2px; }
.sloupec-faze.cil { outline-color:var(--pink); }
.faze-hlava { padding:2px 4px; }
.faze-karty { display:flex; flex-direction:column; gap:8px; flex:1; min-height:60px; }
.poptavka { padding:10px 12px; display:flex; flex-direction:column; gap:4px; align-items:flex-start; }
.poptavka[draggable="true"] { cursor:grab; }
.poptavka.tazena { opacity:.45; }
.poptavka .radek-tesny { flex-wrap:wrap; }

/* modal */
.modal { border:0; border-radius:var(--radius); padding:20px; width:min(560px,calc(100% - 32px)); background:var(--surface); color:var(--text); box-shadow:var(--stin); }
.modal::backdrop { background:rgba(14,17,22,.45); }

/* graf */
.graf { padding:6px 18px 0; }
.graf svg { display:block; width:100%; height:120px; }
.sl { fill:var(--line2); transition:fill .15s; }
.sl:hover, .sl.nyni { fill:var(--pink); }
.graf-osa { padding:6px 18px 12px; }

/* přihlášení */
.vstup { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; background:#0B0D10; }
.vstup-karta { width:min(420px,100%); background:var(--surface); border-radius:var(--radius); padding:28px; display:flex; flex-direction:column; gap:14px; box-shadow:var(--stin); }
.vstup .znacka-text { color:var(--pink); }
.vstup-pata { border-top:1px solid var(--line); padding-top:12px; }
.qr { display:flex; justify-content:center; }
.qr svg { max-width:100%; height:auto; border-radius:var(--radius-s); }
.kody { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 16px; font-size:14px; }

/* hledání přes vše */
.clona { position:fixed; inset:0; background:rgba(14,17,22,.38); border:0; width:100%; cursor:default; animation:objev-clona .18s ease-out; }
.paleta-obal { position:fixed; inset:0; z-index:60; }
.paleta { position:fixed; left:50%; top:12vh; transform:translateX(-50%); width:min(620px,calc(100% - 32px)); background:var(--surface); border-radius:var(--radius); box-shadow:var(--stin); overflow:hidden; color:var(--text); }
.paleta-pole { display:flex; align-items:center; gap:10px; padding:12px 16px; border-bottom:1px solid var(--line); }
.paleta-pole input { flex:1; border:0; background:transparent; font:inherit; font-size:16px; color:var(--text); outline:none; min-width:0; }
.paleta-seznam { max-height:380px; overflow-y:auto; padding:6px; display:flex; flex-direction:column; }
.paleta-b { display:grid; grid-template-columns:72px minmax(0,1fr); gap:10px; align-items:center; padding:9px 10px; border-radius:10px; color:var(--text); }
.paleta-b:hover, .paleta-b.on { background:var(--surface2); text-decoration:none; }
.paleta-b .stitek { justify-content:center; width:auto; }
.paleta-prazdno { padding:14px 10px; }

/* hláška */
.toast { position:fixed; left:50%; bottom:24px; transform:translateX(-50%); z-index:50; background:var(--text); color:var(--bg); padding:10px 14px; border-radius:12px; box-shadow:var(--stin); animation:vyjezd-nahoru .2s ease-out; max-width:calc(100% - 32px); transition:opacity .3s; }
.toast-chyba { background:var(--err); color:#FFFFFF; }
.toast.pryc { opacity:0; }
@media (max-width:760px) { .toast { bottom:72px; } }

/* pohyb */
.vjezd { animation:vjezd .28s ease-out; }
.pulzuje { animation:puls 1.8s ease-in-out infinite; }
@keyframes vyjezd-nahoru { from { transform:translate(-50%,12px); opacity:0; } to { transform:translate(-50%,0); opacity:1; } }
@keyframes objev-clona { from { opacity:0; } to { opacity:1; } }
@keyframes vjezd { from { transform:translateY(8px); opacity:0; } to { transform:none; opacity:1; } }
@keyframes puls { 0%,100% { opacity:1; } 50% { opacity:.35; } }
@media (prefers-reduced-motion:reduce) { .clona,.toast,.vjezd,.pulzuje { animation:none; } }

/* telefon: spodní lišta a větší tlačítka, musí být až za základními pravidly */
@media (max-width:760px) {
  .bo-shell { display:block; }
  .bo-rail { position:static; height:auto; flex-direction:row; align-items:center; padding:12px 16px; }
  .rail-sekce, .rail-pata { display:none; }
  .rail-znak { padding:0; }
  .bo-obsah { padding:0 16px 88px; }
  .hledat-btn { display:none; }
  .hlava { padding:16px 0 12px; }
  .spodni { display:flex; position:fixed; left:0; right:0; bottom:0; z-index:20; border-top:1px solid var(--line); background:var(--surface); padding-bottom:env(safe-area-inset-bottom); }
  .spodni a, .spodni button { flex:1; min-height:56px; border:0; background:transparent; color:var(--muted); font:inherit; font-size:11.5px; font-weight:550; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; cursor:pointer; }
  .spodni a:hover { text-decoration:none; }
  .spodni .on { color:var(--pink); }
  .btn, .pole { min-height:44px; }
  .btn-m { min-height:40px; }
  .stroje, .mrizka-2 { grid-template-columns:minmax(0,1fr); }
}
