:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --border: #e3e6ea;
  --text: #1b1f24;
  --muted: #6b7280;
  --brand: #d6303b;
  --brand-dark: #ab242d;
  --ok: #16794c;
  --ok-bg: #e7f6ee;
  --warn: #9a6400;
  --warn-bg: #fdf3dd;
  --err: #b3261e;
  --err-bg: #fceceb;
  --free: #16794c;
  --low: #e08a1e;
  --low-text: #a35c00;
  --full: #b3261e;
  --bonus: #7c3aed;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--brand); }

/* ---------- layout ---------- */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  max-width: 1100px; margin: 0 auto; padding: 7px 16px 0;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.logo {
  font-weight: 700; font-size: 16px; color: var(--brand);
  text-decoration: none; letter-spacing: -.02em; white-space: nowrap; margin-right: auto;
}
.logo span { color: var(--text); font-weight: 500; }
/* Navigace je vlastní řádek pod logem — vejde se i dlouhé menu. */
.nav {
  display: flex; gap: 1px; flex-wrap: wrap;
  order: 3; width: 100%; flex-basis: 100%;
  border-top: 1px solid var(--border); margin-top: 7px; padding: 3px 0;
}
.nav a {
  padding: 5px 9px; border-radius: 6px; text-decoration: none;
  color: var(--muted); font-weight: 500; white-space: nowrap; font-size: 13px;
}
.nav a:hover { background: var(--bg); color: var(--text); }
.nav a.active { background: #fdeaeb; color: var(--brand); }
.userbox { display: flex; align-items: center; gap: 8px; font-size: 13.5px; white-space: nowrap; }
.userbox .who { color: var(--muted); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 20px 16px 60px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
h1 { font-size: 22px; margin: 0 0 2px; letter-spacing: -.02em; }
h2 { font-size: 16px; margin: 0 0 12px; }
.sub { color: var(--muted); font-size: 14px; margin: 0; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.card h2 { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.stat .n { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: 13px; }

/* ---------- flash ---------- */
.flash { padding: 11px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; border: 1px solid transparent; }
.flash.ok { background: var(--ok-bg); color: var(--ok); border-color: #bfe5d1; }
.flash.warn { background: var(--warn-bg); color: var(--warn); border-color: #f3ddaa; }
.flash.err { background: var(--err-bg); color: var(--err); border-color: #f3c9c6; }

/* ---------- calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-title { font-size: 19px; font-weight: 700; text-transform: capitalize; letter-spacing: -.02em; }
.cal-nav { display: flex; gap: 6px; }

.cal { width: 100%; border-collapse: separate; border-spacing: 6px; }
.cal th {
  font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; padding-bottom: 2px;
}
.cal td { width: 14.28%; vertical-align: top; padding: 0; }

.day {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: 8px; min-height: 92px; text-decoration: none; color: inherit;
  position: relative; transition: border-color .12s, box-shadow .12s, transform .12s;
}
.day:hover { border-color: #c9cfd6; box-shadow: var(--shadow); }
.day.empty { background: transparent; border: none; min-height: 0; }
.day.past { opacity: .45; }
.day.weekend { background: #fbfbfc; }
.day.today { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.day.mine {
  background: #e9f7ef; border-color: #46a877; border-width: 2px; padding: 7px;
  box-shadow: inset 4px 0 0 var(--free);
}
.day.mine:hover { border-color: var(--free); }
.day.mine.wait { background: #fdf4e3; border-color: #e0a03a; box-shadow: inset 4px 0 0 #e0a03a; }
.day .mymark {
  display: inline-block; width: 17px; height: 17px; line-height: 17px; text-align: center;
  border-radius: 50%; background: var(--free); color: #fff; font-size: 11px; font-weight: 700;
  margin-right: 5px; vertical-align: 1px;
}
.day.mine.wait .mymark { background: #e0a03a; }
.day.closed { background: #f2f3f5; }

.day .dnum { font-weight: 700; font-size: 15px; }
.day .dname { color: var(--muted); font-size: 11px; margin-left: 3px; }
.day .meter { display: block; height: 7px; background: #e8eaee; border-radius: 4px; margin: 8px 0 7px; overflow: hidden; }
.day .meter i { display: block; height: 100%; border-radius: 4px; background: var(--lvl, var(--free)); transition: width .2s; }

/* tři stupně obsazenosti — zelená / oranžová / červená */
.day.lvl-ok   { --lvl: var(--free); }
.day.lvl-low  { --lvl: var(--low); }
.day.lvl-full { --lvl: var(--full); }
.day.lvl-ok   .info b { color: var(--free); }
.day.lvl-low  .info b { color: var(--low-text); }
.day.lvl-full .info b { color: var(--full); }
.day.lvl-low  { border-color: #f0d9a8; }
.day.lvl-full { border-color: #f1c9c6; }
.day .info { font-size: 12px; color: var(--muted); line-height: 1.35; }
.day .info b { color: var(--free); }
.day .info b.none { color: var(--full); }

.tag {
  display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 5px;
  border-radius: 4px; letter-spacing: .02em; margin-top: 4px;
}
.tag.bonus { background: #f1e9fe; color: var(--bonus); }
.tag.standby { background: #fdeee6; color: #b5510a; }
.day.hasstandby { border-color: #f0c9a8; }
.tag.me { background: #dcf0e5; color: var(--ok); }
.tag.wait { background: #fbedcd; color: var(--warn); }
.tag.closed { background: #e6e8eb; color: var(--muted); }
.tag.custom { background: #e6f0fb; color: #1a5fa8; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1px solid var(--border); }

/* ---------- forms & buttons ---------- */
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
label.inline { display: flex; align-items: center; gap: 7px; font-weight: 500; margin: 6px 0; }
label.inline input { margin: 0; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px;
  font: inherit; font-size: 14px; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid #f4bfc2; border-color: var(--brand); }
textarea { min-height: 150px; resize: vertical; font-family: inherit; }
.field { margin-bottom: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1; min-width: 130px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

.btn {
  display: inline-block; padding: 8px 14px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; text-align: center; white-space: nowrap;
}
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ok:hover { filter: brightness(.93); }
.btn.danger { color: var(--err); border-color: #f0c3c0; }
.btn.danger:hover { background: var(--err-bg); }
.btn.sm { padding: 5px 9px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- tables ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); border-bottom: 1px solid var(--border); padding: 8px 10px; font-weight: 600;
}
table.data td { padding: 9px 10px; border-bottom: 1px solid #f0f1f3; vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tr.off { opacity: .5; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 20px; }
.badge.on { background: var(--ok-bg); color: var(--ok); }
.badge.off { background: #eceef1; color: var(--muted); }
.badge.wait { background: var(--warn-bg); color: var(--warn); }
.badge.admin { background: #f1e9fe; color: var(--bonus); }
.muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

details.inlineform > summary { cursor: pointer; font-size: 13px; color: var(--brand); font-weight: 600; }
details.inlineform > div { padding-top: 10px; }

dialog { border: none; border-radius: var(--radius); padding: 20px; max-width: 420px; width: calc(100% - 32px); box-shadow: 0 12px 40px rgba(16,24,40,.18); }
dialog::backdrop { background: rgba(16,24,40,.45); }

/* ---------- login ---------- */
.login-wrap { max-width: 380px; margin: 8vh auto; padding: 0 16px; }
.login-logo { text-align: center; font-size: 27px; font-weight: 800; color: var(--brand); letter-spacing: -.03em; margin-bottom: 4px; }
.login-sub { text-align: center; color: var(--muted); margin-bottom: 22px; font-size: 14px; }

/* ---------- mobile ---------- */
@media (max-width: 820px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 14px 10px 60px; }
  .card { padding: 14px; }
  .topbar-inner { padding: 7px 12px 0; gap: 8px; }
  .nav { gap: 0; }
  .nav a { padding: 5px 7px; font-size: 12.5px; }
  .userbox .who { display: none; }

  /* kalendář jako seznam */
  .cal, .cal thead, .cal tbody, .cal tr, .cal td, .cal th { display: block; width: auto; }
  .cal { border-spacing: 0; }
  .cal thead { display: none; }
  .cal tr { display: block; }
  .cal td { margin-bottom: 6px; }
  .day { min-height: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 12px; }
  .day.empty { display: none; }
  .day .dnum { font-size: 16px; min-width: 26px; }
  .day .dname { margin-left: 0; }
  .day .meter { width: 74px; height: 6px; margin: 0 10px 0 0; align-self: center; flex: none; }
  .daysrow, .daysrow > td { display: block; width: auto; }
  table.mini, table.mini tbody, table.mini tr, table.mini td { display: block; width: auto; }
  table.mini tr { border-bottom: 1px solid var(--border); padding: 6px 0; }
  table.mini td.right { text-align: left; }
  table.mini td.right .btn-row { justify-content: flex-start !important; }
  .day .info { margin-left: auto; text-align: right; font-size: 13px; }
  .day .tag { margin-top: 0; }
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: auto; }
  table.data tr { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; padding: 6px 4px; }
  table.data td { border: none; padding: 5px 10px; }
  table.data td::before { content: attr(data-l); display: block; font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
  table.data td.right { text-align: left; }
}

/* ---------- zakázkové bloky ---------- */
.blocks tr.mineblock { background: #f0f7f3; }
.blocks .meter { height: 5px; background: #eceef1; border-radius: 3px; overflow: hidden; }
.blocks .meter i { display: block; height: 100%; background: var(--free); }
details.setupbox > summary {
  cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted);
  list-style: none; display: flex; align-items: center; gap: 6px;
}
details.setupbox > summary::before { content: '▸'; color: var(--muted); font-size: 12px; }
details.setupbox[open] > summary::before { content: '▾'; }
details.setupbox > summary::-webkit-details-marker { display: none; }
details.setupbox[open] > summary { color: var(--text); margin-bottom: 4px; }

button.stat.pick {
  cursor: pointer; text-align: left; font: inherit; width: 100%;
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
button.stat.pick:hover { border-color: #c9cfd6; box-shadow: var(--shadow); transform: translateY(-1px); }
button.stat.pick[aria-expanded="true"] { border-color: var(--free); box-shadow: inset 3px 0 0 var(--free); }
.stat .pickhint { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.stat .meter { display: block; height: 7px; background: #e8eaee; border-radius: 4px; overflow: hidden; }
.stat .meter i { display: block; height: 100%; border-radius: 4px; }
.stat .n.good { color: var(--free); }

/* odpočet do zamčení měsíce */
.deadline {
  background: linear-gradient(180deg, #fffdf7, #fdf7e8);
  border: 1px solid #f0d9a8; border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.deadline .dl-main { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.deadline .dl-label { font-size: 13px; color: var(--warn); font-weight: 600; }
.deadline .dl-time { font-size: 20px; letter-spacing: -.02em; color: #7a4d00; }
.deadline .dl-note { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.deadline.urgent { background: linear-gradient(180deg, #fffafa, #fceceb); border-color: #f1c9c6; }
.deadline.urgent .dl-label { color: var(--err); }
.deadline.urgent .dl-time { color: var(--err); }

/* rozbalovací dny kurýra ve statistikách */
.hide { display: none !important; }
.linkbtn {
  background: none; border: none; padding: 0; font: inherit; font-weight: 700;
  color: var(--text); cursor: pointer; text-align: left;
}
.linkbtn:hover { color: var(--brand); }
.linkbtn .caret { color: var(--muted); font-size: 11px; }
.daysrow > td { background: #f7f8fa; padding: 0 !important; }
.daybox { padding: 12px 14px; }
.dayhead { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
table.mini { width: 100%; border-collapse: collapse; background: var(--surface);
             border: 1px solid var(--border); border-radius: 8px; }
table.mini td.dcell { padding: 8px 10px; border-bottom: 1px solid #f0f1f3; font-size: 13px; vertical-align: middle; }
table.mini tr:last-child td.dcell { border-bottom: none; }
table.mini tr.off td.dcell { opacity: .6; }
table.mini td.right { text-align: right; }
/* rozbalený panel akce ať se vejde pod tlačítko a nerozhazuje řádek */
table.mini td.actions { width: 1%; white-space: nowrap; }
table.mini td.actions .btn-row { flex-wrap: nowrap; gap: 8px; }
table.mini td.actions details.inlineform { position: relative; }
table.mini td.actions details.inlineform[open] > div {
  position: absolute; right: 0; top: 100%; z-index: 20; white-space: normal;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; box-shadow: 0 12px 30px rgba(16,24,40,.14);
}

/* proužek u počtu zakázek ve statistikách */
.barline { display: flex; align-items: center; gap: 10px; }
.barline strong { min-width: 22px; text-align: right; font-variant-numeric: tabular-nums; }
.barline .meter { flex: 1; max-width: 160px; height: 7px; background: #e8eaee; border-radius: 4px; overflow: hidden; }
.barline .meter i { display: block; height: 100%; border-radius: 4px; }

/* stupně obsazenosti kdekoliv (bloky, statistiky) */
.meter i.lvl-ok { background: var(--free); }
.meter i.lvl-low { background: var(--low); }
.meter i.lvl-full { background: var(--full); }

.blockpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.pick {
  display: block; border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px;
  cursor: pointer; font-weight: 500; margin: 0; background: var(--surface);
}
.pick:hover { border-color: #c9cfd6; }
.pick:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: #fff7f7; }
.pick.full { background: #fbfbfc; }
.pick input { margin-right: 8px; }
.pick > span { display: inline-flex; flex-direction: column; gap: 2px; vertical-align: top; }
.pick strong { font-size: 16px; letter-spacing: -.01em; }
.pick .muted { font-size: 12.5px; }
.pick .freemark { font-size: 12.5px; color: var(--free); font-weight: 600; }
.pick .fullmark { font-size: 12.5px; color: var(--full); font-weight: 600; }

table.blockedit input[type=text], table.blockedit input[type=number] { max-width: 110px; }
table.blockedit td { padding: 5px 8px; }
@media (max-width: 640px) {
  table.blockedit thead { display: table-header-group; }
  table.blockedit, table.blockedit tbody, table.blockedit tr, table.blockedit td { display: revert; }
  table.blockedit tr { border: none; }
}

/* jména kurýrů přímo u obsazenosti bloku */
.blocknames { display: flex; flex-direction: column; gap: 1px; margin-top: 4px; font-size: 13px; }
.blocknames span { line-height: 1.35; }
.blocknames.muted { font-size: 12.5px; }

/* živý součet limitů bloků */
.blocksum {
  margin-top: 10px; padding: 9px 12px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border); font-size: 14px;
}
.blocksum.changed { background: var(--warn-bg); border-color: #f3ddaa; color: var(--warn); }
.blocksum .muted { margin-left: 6px; font-size: 13px; }

/* akce přímo v řádku bloku */
.blocks td form { display: inline-block; margin: 0; }
.blocks .badge.on { white-space: nowrap; }
@media (max-width: 640px) {
  .blocks td[data-l="Přihlášení"] { padding-top: 8px; }
  .blocks td[data-l="Přihlášení"] .btn { width: 100%; }
}

/* ---------- modul Auta ---------- */
.wrap.wide { max-width: none; }
.vtoolbar { padding: 12px 14px; }
.vtoolbar .btn-row { gap: 6px; }
.vsep { width: 1px; align-self: stretch; background: var(--border); margin: 0 4px; }
.vsnap { position: relative; }
details.vsnap > summary { list-style: none; color: var(--text); }
.vsnap > summary::-webkit-details-marker { display: none; }
.vsnap[open] > div {
  position: absolute; z-index: 30; top: 100%; left: 0; margin-top: 6px; width: 320px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px; box-shadow: 0 12px 30px rgba(16,24,40,.14);
}

.vgridcard { padding: 0; overflow: hidden; }
.vgridcard > .hint, .vgridcard > .vlegend { padding: 0 14px 12px; }
.vscroll { overflow: auto; max-height: calc(100vh - 150px); }
table.vgrid { border-collapse: separate; border-spacing: 0; font-size: 12.5px; min-width: 100%; }
table.vgrid th, table.vgrid td { border-right: 1px solid #eceef1; border-bottom: 1px solid #eceef1; padding: 0; }
table.vgrid thead th {
  position: sticky; top: 0; z-index: 3; background: var(--surface);
  border-bottom: 1px solid var(--border); vertical-align: bottom;
}
table.vgrid tfoot td, table.vgrid tfoot th { position: sticky; bottom: 0; z-index: 2; background: #f7f8fa; border-top: 1px solid var(--border); }
table.vgrid .vday {
  position: sticky; left: 0; z-index: 2; background: var(--surface); text-align: left;
  padding: 4px 8px; white-space: nowrap; font-weight: 600; min-width: 74px;
}
table.vgrid thead .vday, table.vgrid tfoot .vday { z-index: 4; }
table.vgrid .vday a { color: var(--text); text-decoration: none; }
table.vgrid .vday a:hover { color: var(--brand); }
table.vgrid .vday span { color: var(--muted); font-weight: 500; font-size: 11px; margin-left: 3px; }
.vhead { min-width: 76px; max-width: 92px; padding: 6px 4px !important; text-align: center; font-weight: 500; }
.vhead a { color: inherit; text-decoration: none; display: block; }
.vhead a:hover strong { color: var(--brand); }
.vhead strong { display: block; font-size: 12.5px; letter-spacing: -.01em; }
.vhead .vo { display: block; font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vhead .vp { display: block; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vhead.own { background: #f7f5fd !important; }
.vhead.inactive { opacity: .55; }
.vf { display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: .03em; padding: 0 4px; border-radius: 3px;
      background: #eef0f3; color: var(--muted); margin-top: 2px; }
.vf.ev { background: #dff3e8; color: var(--ok); }

td.vcnt { text-align: center; font-weight: 700; padding: 0 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.vcnt small { color: var(--muted); font-weight: 500; }
td.vcnt.short { color: var(--err); background: var(--err-bg); }
td.vcnt.short small { color: var(--err); }

td.vc {
  --c: #fff;
  background: var(--c); height: 26px; padding: 0 5px; text-align: center; white-space: nowrap; cursor: pointer;
  max-width: 92px; overflow: hidden; text-overflow: ellipsis; font-weight: 500;
}
td.vc em { color: var(--warn); font-size: 11.5px; }
td.vc:hover, td.vc:focus { outline: 2px solid var(--brand); outline-offset: -2px; }
td.vc.derived {
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 70%, #fff) 0 4px, #fff 4px 9px);
}
td.vc.is-err { box-shadow: inset 0 0 0 2px var(--err); color: var(--err); font-weight: 700; }
td.vc.is-warn { box-shadow: inset 0 0 0 2px #e0a03a; }
td.vc.is-info { background-image: linear-gradient(225deg, #e0a03a 0 7px, transparent 7px); }
table.vgrid.readonly td.vc { cursor: default; }
table.vgrid.readonly td.vc:hover { outline: none; }
td.vc.mine { box-shadow: inset 0 0 0 2px var(--free); font-weight: 800; }
.ownstart { border-left: 2px solid #d9d2f3 !important; }

table.vgrid tr.we .vday, table.vgrid tr.we td.vcnt { background: #f6f7fa; }
table.vgrid tr.past td.vc, table.vgrid tr.past .vday { opacity: .55; }
table.vgrid tr.today .vday { box-shadow: inset 3px 0 0 var(--brand); color: var(--brand); }
table.vgrid tr.flashrow .vday { background: #fff4d6; }
td.vmiss { padding: 2px 6px; white-space: nowrap; min-width: 90px; }
.missname {
  border: 1px solid #f1c9c6; background: var(--err-bg); color: var(--err); border-radius: 4px;
  font: inherit; font-size: 11.5px; font-weight: 600; padding: 0 5px; margin: 1px 2px 1px 0; cursor: pointer;
}
td.vsum { text-align: center; padding: 4px 2px; font-variant-numeric: tabular-nums; }
td.vsum small { color: var(--muted); }
td.vsum.under strong { color: var(--warn); }

.vlegend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12.5px; color: var(--muted); }
.vlegend i { display: inline-block; width: 16px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -2px;
             border: 1px solid rgba(0,0,0,.08); }
.vlegend i.hatch { background: repeating-linear-gradient(135deg, #b9e2b9 0 3px, #fff 3px 7px); }
.vlegend i.corner { background: linear-gradient(225deg, #e0a03a 0 6px, #fff 6px); }
.vstate { display: inline-block; font-size: 11.5px; padding: 1px 6px; border-radius: 4px; border: 1px solid rgba(0,0,0,.06); color: var(--text); }

.sev { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.sev.err { background: var(--err); }
.sev.warn { background: #e0a03a; }
.sev.info { background: #7cc4a0; }
table.vissues td { padding: 5px 10px; }

.cartag {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 4px; margin-left: 6px;
  background: #e8eefb; color: #1a4fa0; text-decoration: none; letter-spacing: .01em; vertical-align: 1px;
}
.cartag.ev { background: #dff3e8; color: var(--ok); }
.cartag.none { background: var(--err-bg); color: var(--err); font-weight: 600; }
.mycars { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.mycar { border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; display: flex; flex-direction: column; gap: 4px; }
.mycar .cartag { margin-left: 0; font-size: 13px; }
.mycar.none { border-color: #f0d9a8; background: #fffaf0; }
.mycar.past { opacity: .5; }
tr.needs td { background: #fffaf0; }

@media (max-width: 640px) {
  .vtoolbar .vsep { display: none; }
  .vscroll { max-height: none; }
  table.vgrid .vday { min-width: 62px; padding: 3px 5px; }
  .vhead { min-width: 64px; }
}
