:root {
  --bg: #f5f6f8; --card: #fff; --text: #1d2330; --muted: #6b7385; --line: #e2e5eb;
  --accent: #b3262b; --accent-2: #8f1d21; --ok: #1f7a46; --ok-bg: #e7f5ec; --err: #b3262b; --err-bg: #fdeceb;
  --off: #9aa1ae; --row-hover: #f3f6fb;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif; }
a { color: #1f4fa0; text-decoration: none; } a:hover { text-decoration: underline; }
header.top { display: flex; align-items: center; gap: 24px; padding: 0 24px; height: 52px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; color: var(--accent); font-size: 17px; letter-spacing: .3px; }
.brand span { color: var(--muted); font-weight: 400; }
header nav { display: flex; gap: 4px; flex: 1; }
header nav a { padding: 6px 12px; border-radius: 6px; color: var(--text); }
header nav a.on, header nav a:hover { background: var(--bg); text-decoration: none; }
.who { display: flex; gap: 10px; align-items: center; color: var(--muted); }
main { max-width: 1200px; margin: 0 auto; padding: 20px 24px 48px; }
h1 { font-size: 22px; margin: 0 0 14px; } h1 small, h2 small { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 6px; }
h2 { font-size: 16px; margin: 0 0 12px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.head h1, .head h2 { margin-bottom: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-bottom: 18px; }
.card.narrow { max-width: 380px; margin: 60px auto; }
.crumbs { margin: 0 0 6px; color: var(--muted); }
.muted { color: var(--muted); } .mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px; }
table.list { width: 100%; border-collapse: collapse; background: var(--card); }
.card table.list { margin: 0 -4px; width: calc(100% + 8px); }
table.list th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; padding: 8px; border-bottom: 1px solid var(--line); }
table.list td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
main > table.list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
table.list tbody tr[onclick] { cursor: pointer; } table.list tbody tr:hover { background: var(--row-hover); }
tr.off td, tr.off a { color: var(--off); }
.num { text-align: right; } .empty { text-align: center; color: var(--muted); padding: 24px; }
td.note { max-width: 280px; color: var(--muted); }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; background: #eef0f4; color: var(--muted); margin-left: 4px; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.days { color: var(--muted); font-size: 12px; margin-left: 6px; }
dl.grid { display: grid; grid-template-columns: 160px 1fr; gap: 6px 16px; margin: 0; }
dl.grid dt { color: var(--muted); } dl.grid dd { margin: 0; }
form.search { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
form.search input[name=q] { width: 320px; }
input, select, textarea { font: inherit; padding: 7px 9px; border: 1px solid #cdd2db; border-radius: 6px; background: #fff; color: var(--text); width: 100%; }
input[type=checkbox] { width: auto; }
input:focus, select:focus, textarea:focus { outline: 2px solid #c9d6f2; border-color: #7d9bd6; }
input.short { width: 80px; text-align: right; }
button, .btn { font: inherit; padding: 7px 14px; border: 1px solid #cdd2db; border-radius: 6px; background: #fff; color: var(--text); cursor: pointer; display: inline-block; }
button:hover, .btn:hover { background: var(--bg); text-decoration: none; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; } button.primary:hover { background: var(--accent-2); }
button.link { border: 0; background: none; color: #1f4fa0; padding: 0; }
form.form { max-width: 760px; }
.form label, .card.narrow label { display: block; margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.form label input, .form label select, .form label textarea, .card.narrow input { margin-top: 4px; color: var(--text); font-size: 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .row.three { grid-template-columns: 1fr 2fr 1fr; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px 2px; margin: 0 0 14px; }
legend { color: var(--text); font-weight: 600; padding: 0 6px; }
label.chk { display: inline-flex !important; align-items: center; gap: 6px; color: var(--text) !important; font-size: 14px !important; margin: 0 14px 8px 0 !important; }
.checks { margin: 6px 0 14px; } .days-pick { margin-bottom: 12px; }
.actions { display: flex; gap: 16px; align-items: center; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); } .flash.error { background: var(--err-bg); color: var(--err); }
.pager { display: flex; gap: 16px; justify-content: center; padding: 14px; color: var(--muted); }
nav.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
nav.tabs a { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; }
nav.tabs a.on { color: var(--text); border-bottom-color: var(--accent); }
table.edit td { vertical-align: middle; } table.edit tr.new td { background: #fafbfc; }
@media (max-width: 720px) { .row, .row.three, dl.grid { grid-template-columns: 1fr; } form.search input[name=q] { width: 100%; } header.top { padding: 0 12px; gap: 10px; } .who span { display: none; } }
/* v2: prepinace, produkty, objednavky */
nav.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; margin-bottom: 12px; }
nav.seg a { padding: 6px 14px; color: var(--muted); border-right: 1px solid var(--line); }
nav.seg a:last-child { border-right: 0; } nav.seg a.on { background: var(--text); color: #fff; } nav.seg a:hover { text-decoration: none; }
nav.seg a small { opacity: .75; margin-left: 4px; }
form.filters { margin-bottom: 14px; } form.filters select, form.filters input[type=date] { width: auto; }
.tag.d { background: #eef3fb; color: #1f4fa0; } .tag.akce { background: #fff1db; color: #9a5b00; } .tag.err { background: var(--err-bg); color: var(--err); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.primary:hover { background: var(--accent-2); }
td.img { width: 52px; padding: 4px 8px; } td.img img { width: 44px; height: 44px; object-fit: contain; border-radius: 4px; background: #f3f4f6; display: block; }
.ph { width: 44px; height: 44px; border-radius: 4px; background: #f0f1f4; display: block; }
.prod { display: grid; grid-template-columns: 1fr 300px; gap: 18px; } .prod .card { margin-bottom: 18px; }
.imgbox { border: 1px dashed #cdd2db; border-radius: 8px; padding: 10px; margin-bottom: 12px; text-align: center; }
.imgbox img { max-width: 100%; max-height: 220px; display: block; margin: 0 auto 8px; }
.imgbox .none { color: var(--muted); padding: 30px 0; }
.big { font-size: 20px; font-weight: 600; } .sum td { font-weight: 600; border-bottom: 0; }
.stav { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; background: #eef0f4; }
.stav-nova { background: #eef3fb; color: #1f4fa0; } .stav-potvrzena { background: #fff1db; color: #9a5b00; }
.stav-vyrizena { background: var(--ok-bg); color: var(--ok); } .stav-storno, .stav-chyba { background: var(--err-bg); color: var(--err); }
.addline { display: grid; grid-template-columns: 2fr 90px 110px 110px 90px 1.4fr auto; gap: 8px; align-items: end; }
.addline label { margin: 0 !important; }
table.items input { padding: 4px 6px; } table.items input.short { width: 90px; }
.side .card dl.grid { grid-template-columns: 120px 1fr; }
.obj { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
ul.hist { list-style: none; padding: 0; margin: 0; } ul.hist li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
ul.hist li:last-child { border-bottom: 0; }
.prava td select { width: auto; }
@media (max-width: 900px) { .prod, .obj, .addline { grid-template-columns: 1fr; } }
/* e-shop */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.tile .pic { height: 140px; border-radius: 6px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; }
.tile .pic img { max-width: 100%; max-height: 140px; object-fit: contain; }
.tile .name { font-weight: 600; min-height: 2.6em; } .tile .meta { color: var(--muted); font-size: 12px; }
.tile .price b { font-size: 17px; } .tile .stock { font-size: 12px; color: var(--muted); } .tile .stock.ok { color: var(--ok); }
.tile .buy { display: flex; gap: 6px; margin-top: auto; } .tile .buy input { width: 70px; text-align: right; }
.tile .incart { font-size: 12px; color: var(--ok); }
header nav a.cart b { background: var(--accent); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 12px; }
.card.narrow .muted { margin-top: 14px; font-size: 13px; }
.dealerbar { background: #fff6df; color: #6b4a00; font-size: 13px; padding: 7px 24px; border-bottom: 1px solid #f0dca8; }
.dealerbar a { color: #6b4a00; text-decoration: underline; }
table.list tr.on td { background: #fff6df; }
