/* Gridstore — vzhľad podľa identity ASAZ (oranžová + priemyselná sivá, font Poppins) */
:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --ink: #101828;          /* gray-900 */
  --muted: #6a7282;        /* gray-500 */
  --line: #e5e7eb;         /* gray-200 */
  --accent: #fe6e00;       /* ASAZ orange-500 */
  --accent-dark: #f05100;  /* orange-600 */
  --accent-soft: #fff3e9;  /* svetlé oranžové pozadie */
  --dark: #101828;         /* tmavé priemyselné pozadie */
  --dark-2: #1e2939;       /* gray-800 */
  --green: #00a046;
  --green-bg: #e9faf0;
  --red: #fb2c36;          /* red-500 */
  --red-bg: #fef2f2;
  --amber: #f05100;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- hlavička (dva riadky: hore logo+zákazník, dole záložky) ---------- */
.topbar {
  background: var(--dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 3px solid var(--accent);
}
.topbar-main {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 20px;
}
.topbar .logo { display: flex; align-items: center; white-space: nowrap; }
.topbar .logo .brand-logo { height: 48px; width: auto; display: block; }
.topbar .who { margin-left: auto; color: #99a1af; font-size: 13px; text-align: right; white-space: nowrap; }
.topbar .who b { color: #fff; display: block; font-size: 14px; font-weight: 600; }
.topbar button { flex-shrink: 0; }

.client-pick { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.client-pick span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #99a1af; }
.client-pick select {
  background: #1e2939; color: #fff; border: 1px solid #364153; border-radius: 8px;
  padding: 8px 12px; font-weight: 700; font-size: 15px; cursor: pointer;
}
.client-pick select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

.tabs { display: flex; gap: 2px; overflow-x: auto; padding: 0 20px 8px; }
.tabs button {
  background: transparent; border: 0; color: #99a1af; font-size: 14px; font-weight: 600;
  padding: 8px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.tabs button:hover { color: #fff; background: rgba(255,255,255,.08); }
.tabs button.on { color: #fff; background: var(--accent); }

/* horná (všeobecná) časť hlavičky — záložky vedľa loga */
.top-tabs { padding: 0; overflow: visible; margin-left: 6px; }
/* spodný riadok: prepínač zákazníka + zákaznícke záložky */
.tabrow { display: flex; align-items: center; gap: 14px; padding: 0 20px 8px; overflow-x: auto; }
.tabrow .tabs { padding: 0; overflow: visible; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 24px 20px 80px; }

/* ---------- všeobecné prvky ---------- */
h1 { font-size: 23px; margin: 0 0 16px; font-weight: 700; letter-spacing: -.4px; }
h2 { font-size: 16px; margin: 28px 0 10px; font-weight: 600; letter-spacing: -.2px; }
h2:first-child { margin-top: 0; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 20px;
  margin-bottom: 16px;
}

button, .btn {
  font: inherit; font-weight: 600; font-size: 14px;
  border: 0; border-radius: 8px; padding: 9px 16px;
  background: var(--accent); color: #fff; cursor: pointer;
  transition: background .15s, transform .05s;
}
button:hover, .btn:hover { background: var(--accent-dark); }
button:active, .btn:active { transform: translateY(1px); }
button.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
button.ghost:hover { background: #f9fafb; border-color: var(--accent); color: var(--accent-dark); }
button.danger { background: var(--red); }
button.danger:hover { background: #d61f29; }
button.small { padding: 5px 10px; font-size: 13px; }
button:disabled { opacity: .5; cursor: default; }

input, select {
  font: inherit; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink); min-width: 0;
}
input:focus, select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
label.fld { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- prihlásenie ---------- */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-box { width: 360px; max-width: 100%; }
.login-box .card { padding: 28px; }
.login-brand {
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 0 16px; margin-bottom: 12px;
  border-bottom: 3px solid var(--accent);
}
.login-brand .brand-logo { height: 46px; width: auto; }
.login-box h1 { text-align: center; }
.login-box .sub { text-align: center; color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.login-box form { display: flex; flex-direction: column; gap: 12px; }
.login-box input { padding: 12px 14px; font-size: 16px; }
.login-box button { padding: 12px; font-size: 16px; }

/* ---------- zamestnanec ---------- */
.timer-card {
  background: linear-gradient(135deg, #1e2939, #101828);
  color: #fff; border-radius: var(--radius); padding: 26px; margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(16, 24, 40, .18);
  border-left: 5px solid var(--accent);
}
.timer-card .lbl { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 600; }
.timer-card .what { font-size: 22px; font-weight: 700; margin: 6px 0 2px; }
.timer-card .proj { color: #99a1af; font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.timer-card .proj .p-name { color: #fff; font-weight: 700; font-size: 16px; }
.timer-card .proj .p-ord {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent); color: #fff;
  border-radius: 999px; padding: 3px 12px;
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.timer-card .clock {
  font-size: 54px; font-weight: 700; font-variant-numeric: tabular-nums;
  margin: 12px 0 16px; letter-spacing: 2px; color: #fff;
}
.timer-card .pulse {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); margin-right: 8px; animation: pulse 1.6s infinite;
  box-shadow: 0 0 0 0 var(--accent);
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

.idle-card {
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 22px; margin-bottom: 20px; color: var(--muted); text-align: center; font-size: 15px;
}

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; cursor: pointer; text-align: left; font: inherit; color: var(--ink);
  box-shadow: var(--shadow); transition: transform .1s, border-color .15s;
}
.tile:hover { border-color: var(--accent); transform: translateY(-1px); background: #fff; }
.tile.done-tile { cursor: default; background: var(--green-bg); border-color: #bfe8cd; border-style: dashed; box-shadow: none; }
.tile.done-tile:hover { transform: none; border-color: #bfe8cd; background: var(--green-bg); }
.tile.done-tile .t-name { color: #14633a; }
.tile.done-tile .t-sub { color: var(--green); font-weight: 700; }
.tile.done-tile .t-by { color: #14633a; font-size: 12px; margin-top: 3px; opacity: .85; }
.tile .t-name { font-size: 17px; font-weight: 700; }
.tile .t-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.tile .t-mates { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 8px; }
.tile .t-mates:empty { display: none; }
.tile .t-mates .mate {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  color: var(--green); background: var(--green-bg); border-radius: 99px; padding: 2px 9px;
}
.tile.product { border-left: 4px solid var(--accent); }
.tile.task-tile { border-left: 4px solid #8b5cf6; background: #f7f5ff; }
.tile.task-tile:hover { border-color: #8b5cf6; }
.group-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--accent-soft); border: 1px solid #ffd1ad; border-radius: 10px;
  padding: 10px 14px; margin-bottom: 14px; font-size: 14px;
}
.tile.active-now { border-color: var(--accent); background: var(--accent-soft); }
.tile.active-now .t-sub { color: var(--accent-dark); font-weight: 600; }
.back-link {
  background: var(--accent-soft); border: 1.5px solid var(--accent); color: var(--accent-dark);
  font-weight: 700; cursor: pointer; padding: 8px 16px; border-radius: 999px; font-size: 14px; white-space: nowrap;
}
.back-link:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- karty so súhrnom ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.stat .v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .k { color: var(--muted); font-size: 13px; margin-top: 2px; }
.stat.money .v { color: var(--green); }
.stat.loss .v { color: var(--red); }

/* ---------- tabuľky ---------- */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--line); white-space: nowrap;
}
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.actions { text-align: right; white-space: nowrap; }
td .muted, .muted { color: var(--muted); }
tbody tr:hover { background: #f8fafc; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.blue { background: var(--accent-soft); color: var(--accent-dark); }
.badge.gray { background: #f3f4f6; color: var(--muted); }
.badge.amber { background: var(--accent-soft); color: var(--accent-dark); }

.run-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 6px; animation: pulse 1.6s infinite; }
.warn-long { color: var(--red); font-weight: 700; }

.empty { color: var(--muted); text-align: center; padding: 26px 10px; font-size: 14px; }

/* ---------- projekty (správa) ---------- */
.proj-admin { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; background: var(--card); box-shadow: var(--shadow); }
.proj-admin.inactive { opacity: .6; }
.prod-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; background: var(--accent-soft); color: var(--accent-dark);
  border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 600;
}
.chip.off { background: #f3f4f6; color: var(--muted); text-decoration: line-through; }
.tpl-group { margin-bottom: 12px; }
.tpl-group-name {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent-dark); margin-bottom: 6px;
}
.chip button { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; font-size: 13px; opacity: .65; }
.chip button:hover { opacity: 1; background: none; }

/* ---------- kalendár turnusov ---------- */
.cal-legend { display: flex; gap: 14px; margin-bottom: 12px; }
.cal-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink); }
.cal-chip::before { content: ""; width: 14px; height: 14px; border-radius: 4px; }
.cal-chip.work::before { background: #ff8b1a; }
.cal-chip.travel::before { background: #8b5cf6; }
.cal-chip.home::before { background: #3b82f6; }

.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { margin-bottom: 6px; }
.cal-head div { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.cal-cell {
  min-height: 60px; border-radius: 8px; padding: 6px 8px; border: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: space-between;
}
.cal-cell.empty { border: 0; background: transparent; min-height: 0; }
.cal-cell .cal-day { font-weight: 700; font-size: 15px; }
.cal-cell .cal-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .85; }
.cal-cell.work { background: #ffe7d3; border-color: #ffcfa8; color: #9a3d00; }
.cal-cell.travel { background: #ece8fd; border-color: #d6ccfa; color: #5b21b6; }
.cal-cell.home { background: #e0edfd; border-color: #bcd6fb; color: #1e3a8a; }
/* nedeľa = silnejšie zvýraznenie (vždy voľno) */
.cal-cell.home.sun { background: #9bbcef; border-color: #6f9ce6; color: #16306b; }
.cal-head div.sun { color: var(--red); }
.cal-cell.today { outline: 2px solid var(--ink); outline-offset: -2px; }
.cal-cell.holiday { box-shadow: inset 0 3px 0 var(--red); }
.cal-cell .cal-hol {
  font-size: 9px; font-weight: 700; color: var(--red); line-height: 1.05;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.cal-chip.holiday-chip::before { background: var(--red); }
.cal-cell.editable { cursor: pointer; transition: filter .1s; }
.cal-cell.editable:hover { filter: brightness(.95); }
.cal-cell.edited { position: relative; }
.cal-cell.edited::after {
  content: ""; position: absolute; top: 5px; right: 5px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--ink);
}
.cal-chip.edited-chip::before { background: var(--ink); }
.cal-cell.proposed { outline: 2px dashed var(--accent); outline-offset: -2px; }
.rot-actionbar {
  position: sticky; bottom: 16px; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; background: var(--dark); color: #fff;
  padding: 12px 18px; border-radius: 10px; box-shadow: 0 6px 20px rgba(16,24,40,.25);
  border-left: 4px solid var(--accent);
}

/* ---------- matica turnusov (prehľad) ---------- */
table.rot-matrix { border-collapse: separate; border-spacing: 0; }
table.rot-matrix th, table.rot-matrix td { border: 1px solid var(--line); padding: 0; }
table.rot-matrix thead th {
  text-align: center; font-size: 11px; font-weight: 700; color: var(--muted);
  width: 26px; min-width: 26px; padding: 4px 0; line-height: 1.1; background: #f9fafb;
}
table.rot-matrix thead th span { display: block; font-size: 9px; font-weight: 600; opacity: .7; }
table.rot-matrix th.we, table.rot-matrix td.rm.we { background: #f1f3f6; }
table.rot-matrix th.hol { color: var(--red); }
table.rot-matrix th.hol::after { content: " ★"; font-size: 9px; }
table.rot-matrix td.rm.hol { box-shadow: inset 0 3px 0 var(--red); }
table.rot-matrix .sticky {
  position: sticky; left: 0; z-index: 2; background: #fff; text-align: left;
  padding: 6px 12px; white-space: nowrap; font-weight: 600; min-width: 150px;
  box-shadow: 1px 0 0 var(--line);
}
table.rot-matrix thead .sticky { z-index: 3; background: #f9fafb; }
table.rot-matrix .wk-row th.wk {
  font-size: 10px; font-weight: 700; color: var(--accent-dark); letter-spacing: .03em;
  background: var(--accent-soft); border-bottom: 1px solid var(--line); padding: 3px 0;
}
table.rot-matrix .wk-row .sticky { font-size: 11px; color: var(--muted); }
/* zvislé rozdelenie kalendárnych týždňov cez celú tabuľku */
table.rot-matrix .wk-row th.wk + th.wk,
table.rot-matrix th.wk-start,
table.rot-matrix td.wk-start { border-left: 2px solid #475569; }
td.rot-name { cursor: pointer; }
td.rot-name:hover { color: var(--accent-dark); text-decoration: underline; }
td.rot-click { cursor: pointer; }
table.rot-matrix td.rm { height: 30px; position: relative; }
table.rot-matrix td.rm.has-note { cursor: help; }
table.rot-matrix td.rm.has-note::after {
  content: ""; position: absolute; top: 3px; right: 3px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink);
}
table.rot-matrix td.rm.work { background: #ff8b1a; }
table.rot-matrix td.rm.travel { background: #a78bfa; }
table.rot-matrix td.rm.home { background: #cfe0fb; }
table.rot-matrix td.rm.work.we { background: #f08a2c; }
table.rot-matrix td.rm.travel.we { background: #9a7bf0; }
table.rot-matrix td.rm.home.we { background: #bcd2f3; }
/* nedeľa = silnejšia modrá (voľno) + výrazná hlavička */
table.rot-matrix td.rm.home.sun { background: #7ea8e8; }
table.rot-matrix th.sun { color: var(--red); background: #fdeaea; }
/* deň čakajúci na schválenie žiadosti */
table.rot-matrix td.rm.pending { outline: 2px dashed #b45309; outline-offset: -2px; cursor: help; }
table.rot-matrix td.rm.pending::after {
  content: "⏳"; position: absolute; top: 0; left: 1px; font-size: 9px; line-height: 1;
}
.cal-chip.pending-chip::before { background: transparent; border: 2px dashed #b45309; }
/* skutočne odpracovaný deň podľa výkazu (import) — bodka v strede bunky */
table.rot-matrix td.rm.worked .wmark {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 9px; height: 9px; border-radius: 50%;
  background: #101828; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9);
}
/* výkaz v deň mimo plánovanej práce (voľno/cesta/sviatok) — červené zvýraznenie */
table.rot-matrix td.rm.offplan { outline: 2px solid var(--red); outline-offset: -2px; }
table.rot-matrix td.rm.offplan .wmark { background: var(--red); }
.cal-chip.worked-chip::before { background: #101828; border-radius: 50%; }
.cal-chip.offplan-chip::before { background: transparent; border: 2px solid var(--red); border-radius: 50%; }
table.rot-matrix td.num { padding: 4px 10px; text-align: right; font-variant-numeric: tabular-nums; }
table.rot-matrix tbody tr:hover td:not(.rm) { background: #f8fafc; }

.rot-pending {
  margin-top: 12px; padding: 10px 12px; background: var(--accent-soft);
  border-radius: 8px; font-size: 14px; color: var(--accent-dark);
}

@media (max-width: 640px) {
  .cal-cell { min-height: 46px; padding: 4px; }
  .cal-cell .cal-tag { display: none; }
  .cal-head, .cal-grid { gap: 3px; }
}

/* ---------- modal ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal { background: #fff; border-radius: var(--radius); padding: 24px; width: 420px; max-width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.modal:has(.cal-grid) { width: 580px; }
.modal h3 { margin: 0 0 14px; font-size: 17px; }
.modal .row { margin-bottom: 12px; }
.modal .btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ---------- % rozrobenosti produktu ---------- */
.pp-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.pp-quick button { flex: 1 1 auto; }
.pp-row { display: flex; align-items: center; gap: 14px; }
.pp-row #pp-range { flex: 1; accent-color: var(--accent); }
.pp-val { display: flex; align-items: center; gap: 4px; font-weight: 700; color: var(--accent-dark); }
.pp-val #pp-num { width: 66px; text-align: right; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-weight: 700; }

/* ---------- toast ---------- */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 10px;
  font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; z-index: 200; max-width: 90vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--red); }

@media (max-width: 1080px) {
  .topbar .who span.role-note { display: none; }
  .tabs button { padding: 8px 7px; font-size: 13px; }
  .topbar-main { gap: 12px; padding: 8px 12px; }
  .tabs { padding: 0 12px 8px; }
  .topbar .logo .brand-logo { height: 40px; }
  .topbar .who { font-size: 12px; }
}

@media (max-width: 880px) {
  .topbar .who { display: none; }
}

/* ---------------- GRAFY (report) ---------------- */
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.chart-title { font-size: 14px; margin: 0 0 10px; color: var(--muted); font-weight: 600; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 78px; align-items: center; gap: 10px; }
.bar-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: #f1f3f6; border-radius: 6px; height: 18px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 6px; min-width: 3px;
  transition: width .3s ease; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; white-space: nowrap; }
/* zvislé stĺpce (časová os) */
.vbars { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 14px; overflow-x: auto; }
.vbar { flex: 1 1 0; min-width: 38px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.vbar-fill { width: 62%; max-width: 46px; background: var(--accent); border-radius: 6px 6px 0 0; min-height: 3px; transition: height .3s ease; }
.vbar-lbl { font-size: 11px; margin-top: 6px; color: var(--muted); white-space: nowrap; }
.vbar-val { font-size: 11px; font-weight: 600; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
table tr.inactive { opacity: .55; }

@media (max-width: 760px) {
  .chart-grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 104px 1fr 66px; }
}

/* ---------------- PREHĽAD (superadmin dashboard) ---------------- */
.ov-clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ov-client { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; cursor: pointer; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.ov-client:hover { border-color: var(--accent); box-shadow: var(--shadow); background: #fff; }
.ov-client b { font-size: 15px; }
.ov-client-stats { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; font-size: 13px; color: var(--muted); }
#ov-proj tbody tr { cursor: pointer; }
td.num.stale, .num.stale b { color: var(--red); }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--accent-dark); }
th.sortable .si { font-size: 10px; }
table tr.row-on { background: var(--accent-soft); }
.lodging-input { width: 90px; text-align: right; padding: 5px 8px; border: 1px solid var(--line);
  border-radius: 6px; font-size: 13px; font-variant-numeric: tabular-nums; }
.lodging-input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
/* náhľad hesla (ikona oka) */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 42px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; padding: 4px 8px; cursor: pointer; font-size: 16px; line-height: 1; }
.pw-toggle:hover { background: none; }

/* ubytovanie — formulár rozdelenia */
.acc-workers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.acc-wrow { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.acc-wrow input[type="checkbox"] { width: auto; }
.acc-wname { flex: 1; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-amt { width: 90px; text-align: right; padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.acc-amt:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.acc-inv { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 10px; }
@media (max-width: 760px) { .acc-workers { grid-template-columns: 1fr; } }

/* deliaci riadok podľa zákazníka */
table tr.grp-divider td { background: #f1f3f6; border-top: 2px solid var(--ink);
  font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink); padding: 8px 12px; }

/* ---------------- CHAT ---------------- */
.nav-badge {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 2px;
  background: var(--red); color: #fff; border-radius: 9px;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; vertical-align: middle;
}
.chat-layout { display: grid; grid-template-columns: 260px 1fr; gap: 14px; align-items: start; }
.thread-list { padding: 6px; max-height: 70vh; overflow-y: auto; }
.thread {
  display: block; width: 100%; text-align: left; background: #fff; color: var(--ink);
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 10px 12px; cursor: pointer;
}
.thread:hover { background: #f9fafb; }
.thread.on { background: var(--accent-soft); }
.thread.has-unread { font-weight: 600; }
.thread-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.thread-last { color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-card { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.chat-head { padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 700; }
.chat-scroll { flex: 1; min-height: 320px; max-height: 60vh; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 8px; background: #fafbfc; }
.bubble-row { display: flex; }
.bubble-row.mine { justify-content: flex-end; }
.bubble { max-width: 75%; padding: 8px 12px; border-radius: 14px; }
.bubble-row.theirs .bubble { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble-row.mine .bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.bubble-who { font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.bubble-body { white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.bubble-time { font-size: 10px; opacity: .7; margin-top: 3px; text-align: right; }
.chat-composer { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.chat-composer textarea { flex: 1; resize: vertical; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font-family: inherit; font-size: 14px; }
.chat-composer textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.chat-composer button { align-self: stretch; }
.summary-card .summary-body {
  white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 13px;
  background: #fafbfc; border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 8px 0 0; }

@media (max-width: 640px) {
  .topbar-main { padding: 8px 10px; gap: 8px; }
  .tabs { padding: 0 10px 8px; }
  .topbar .logo .brand-logo { height: 32px; }
  .wrap { padding: 16px 12px 60px; }
  .timer-card .clock { font-size: 40px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .chat-layout { grid-template-columns: 1fr; }
}
