/* VALESTO – štýly podľa AVESYS HUB, s farbou a logom VALESTO (#0033A0).
   Rozloženie: bočný panel + pracovná plocha; pod 760 px hlavička s logom a spodná lišta. */

@font-face { font-family: "Exo 2"; src: url("../fonts/exo2-regular.5950799cbada.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("../fonts/exo2-medium.ccebc5c25199.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("../fonts/exo2-semibold.7ef9afcea8e0.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("../fonts/exo2-bold.f5d6bf20466d.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("../fonts/exo2-extrabold.55c569157b8d.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

/* ---------- tokeny ---------- */
:root {
  --ink-900: #0E1114; --ink-800: #1B2026; --ink-700: #2C333B; --ink-500: #6A737D; --ink-400: #949CA5;
  --ink-300: #C3C9CF; --ink-200: #DFE3E7; --ink-100: #EEF1F3; --white: #FFFFFF;
  --valesto: #0033A0; --valesto-700: #00287D; --valesto-300: #6F95E8; --valesto-50: #EAF0FB;
  --success-600: #1E7F4E; --success-100: #DDF2E6; --warning-600: #9A6700; --warning-100: #FBEFCF;
  --danger-600: #C4302B; --danger-100: #FBE1E0; --info-600: #1F6F7A; --info-100: #DDF0F2;

  --radius-sm: 6px; --radius-md: 10px; --radius-pill: 999px;
  --shadow-2: 0 4px 14px rgba(14,17,20,.08), 0 1px 3px rgba(14,17,20,.06);
  --font-sans: "Exo 2", system-ui, -apple-system, "Segoe UI", sans-serif;

  --bg: #F3F5F7; --surface: var(--white); --surface-2: var(--ink-100); --line: var(--ink-200); --line-strong: var(--ink-300);
  --fg: var(--ink-900); --fg-2: var(--ink-700); --muted: var(--ink-500);
  --accent: var(--valesto); --accent-hover: var(--valesto-700); --accent-text: var(--valesto); --accent-tint: var(--valesto-50); --on-accent: var(--white);
  --focus-ring: 0 0 0 3px rgba(0,51,160,.3);
  --ok: var(--success-600); --ok-bg: var(--success-100); --warn: var(--warning-600); --warn-bg: var(--warning-100);
  --bad: var(--danger-600); --bad-bg: var(--danger-100); --info: var(--info-600); --info-bg: var(--info-100);
  --bottomnav-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418; --surface: #181C21; --surface-2: #20262D; --line: #2A3138; --line-strong: #3A434C;
    --fg: var(--ink-100); --fg-2: var(--ink-300); --muted: var(--ink-400);
    --accent: #2F5FD0; --accent-hover: #4372E0; --accent-text: var(--valesto-300); --accent-tint: #15224A;
    --focus-ring: 0 0 0 3px rgba(111,149,232,.45);
    --ok: #5BC48C; --ok-bg: #15301F; --warn: #E0B341; --warn-bg: #33290F; --bad: #F0736E; --bad-bg: #3A1A19; --info: #5FC0CC; --info-bg: #12303A;
    color-scheme: dark;
  }
}

/* ---------- základ ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-sans); font-size: 15px; line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.ic { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
.muted { color: var(--muted); font-size: 13px; }
.error { color: var(--bad); font-size: 13px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--surface); color: var(--fg); padding: 8px 12px; border-radius: var(--radius-sm); }
.skip:focus { top: 8px; }

/* ---------- logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.brand img { height: 44px; width: auto; display: block; flex: none; }
.brand-t { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--muted); }

/* ---------- rozloženie ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: auto; background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; padding: 18px 12px; }
.side .brand { padding: 0 8px 18px; }
.side-nav { display: grid; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; color: var(--fg-2); padding: 9px 10px; border-radius: 8px;
  text-decoration: none; font-weight: 500; border: 0; background: transparent; text-align: left; cursor: pointer; }
.nav-h { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 16px 10px 4px; }
.nav-item .ic { opacity: .8; }
a.nav-item:hover, button.nav-item:hover { background: var(--surface-2); color: var(--fg); }
.nav-item[aria-current="page"] { background: var(--accent-tint); color: var(--accent-text); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.nav-item[aria-current="page"] .ic { opacity: 1; }
.nav-item.is-soon { color: var(--muted); cursor: default; }
.soon { margin-left: auto; flex: none; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill); padding: 1px 6px; color: var(--muted); }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding: 14px 8px 2px; display: grid; gap: 10px; }
.side-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.side-user b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user span { font-size: 12px; color: var(--muted); }
.side-user .avatar { color: var(--white); font-size: 13px; }
.side-links { display: flex; flex-wrap: wrap; gap: 2px; }
.side-links form { margin: 0; }
.side-links .nav-item { width: auto; padding: 6px 8px; font-size: 13px; gap: 6px; }
.side-links .ic { width: 15px; height: 15px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--valesto); color: var(--white); display: grid; place-items: center;
  font-weight: 700; font-size: 13px; flex: none; }
.m-avatar { display: none; text-decoration: none; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 12px 28px; min-height: 62px;
  border-bottom: 1px solid var(--line); background: var(--surface); }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; min-width: 0; flex: 1; }
.crumbs b { color: var(--fg); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-head { display: none; }
.content { flex: 1; padding: 26px 28px 40px; max-width: 1280px; width: 100%; }
.bottomnav { display: none; }

/* ---------- hlavička stránky ---------- */
.page-h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.page-h h1 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); font-weight: 700; }

/* ---------- tlačidlá ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: var(--radius-sm);
  font-weight: 600; cursor: pointer; border: 1.5px solid transparent; white-space: nowrap; font-size: 16px; line-height: 1; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-brand { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-brand:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* ---------- panely a riadky ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); min-width: 0; }
.panel + .panel { margin-top: 18px; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-h h2 { font-size: 15px; font-weight: 700; }
.panel-h .count { color: var(--muted); font-weight: 500; font-size: 13px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { border-top: 1px solid var(--line); }
.rows > li:first-child { border-top: 0; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; padding: 12px 18px; align-items: center; color: inherit; text-decoration: none; }
a.row:hover { background: var(--surface-2); }
.row-t { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.row-s { color: var(--muted); font-size: 13px; min-width: 0; }
.row-r { grid-row: span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.empty { padding: 40px 18px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--fg); font-size: 16px; margin-bottom: 4px; }
.menu-list .row { grid-template-columns: auto minmax(0, 1fr) auto; }
.menu-list .row .ic { color: var(--accent-text); }
.menu-list .row-t small { display: block; font-weight: 400; font-size: 12px; white-space: normal; }
.menu-list .is-soon { color: var(--muted); }
.menu-list .is-soon .ic { color: var(--muted); }
.menu-list form { margin: 0; }
.menu-list button.row { width: 100%; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; color: inherit; }
.menu-list button.row:hover { background: var(--surface-2); }
.menu-list .menu-h { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 14px 16px 6px; font-weight: 600; }

/* ---------- správy ---------- */
.messages { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.msg { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-md); font-weight: 600;
  background: var(--info-bg); border: 1px solid color-mix(in srgb, var(--info) 30%, transparent); }
.msg .ic { color: var(--info); }
.msg-success { background: var(--ok-bg); } .msg-success .ic { color: var(--ok); }
.msg-warning { background: var(--warn-bg); } .msg-warning .ic { color: var(--warn); }
.msg-error { background: var(--bad-bg); } .msg-error .ic { color: var(--bad); }

/* ---------- formuláre ---------- */
.form-panel { padding: 20px; display: grid; gap: 16px; max-width: 520px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea {
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding: 0 14px; height: 48px; font-size: 16px;
  background: var(--surface); color: var(--fg); width: 100%; max-width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--fg); box-shadow: var(--focus-ring); outline: none; }
.field.has-error input { border-color: var(--bad); }
.field .help { color: var(--muted); font-size: 13px; }
.field .help ul { margin: 4px 0 0; padding-left: 18px; }
.form-errors { margin: 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--bad-bg); color: var(--bad); font-weight: 600; }

/* ---------- pripomienky ---------- */
.pripomienka-btn { position: fixed; right: 20px; bottom: 20px; z-index: 15; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px;
  border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; box-shadow: var(--shadow-2); }
.pripomienka-btn:hover { background: var(--accent-hover); }
.form-panel + .panel { margin-top: 18px; }
.pripomienka-text { white-space: normal; font-weight: 500; }
.row-p { grid-column: 1 / -1; margin: 4px 0 0; color: var(--fg-2); font-size: 14px; }
.je-vyriesena .row { opacity: .65; }
.pripomienka-vybavit { display: flex; gap: 8px; padding: 0 18px 12px; }
.pripomienka-vybavit input { flex: 1; min-width: 0; height: 36px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding: 0 10px; background: var(--surface); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 15px; }
.btn-outline { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn-outline:hover { background: var(--surface-2); }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 3px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.field textarea { min-height: 110px; height: auto; padding: 12px 14px; resize: vertical; }

/* ---------- prihlásenie ---------- */
.login-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--valesto); }
.login { width: 100%; max-width: 380px; }
.login .panel { padding: 28px 24px; display: grid; gap: 14px; box-shadow: var(--shadow-2); }
.login-logo { width: 160px; height: auto; justify-self: center; }
.login h1 { font-size: 22px; font-weight: 700; }
.login h1 + .muted { margin: -10px 0 0; }
.login .btn { width: 100%; }

/* ---------- mobil ---------- */
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .topbar { padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); min-height: 56px; }
  .crumbs { display: none; }
  .m-head { display: flex; align-items: center; min-width: 0; flex: 1; }
  .m-head .brand img { height: 36px; }
  .m-avatar { display: grid; }
  .content { padding: 16px 16px calc(var(--bottomnav-h) + 24px + env(safe-area-inset-bottom)); }
  .page-h { margin-bottom: 14px; }
  .page-h h1 { font-size: 22px; }
  .panel-h { padding: 12px 14px; }
  .row { padding: 12px 14px; }
  .form-panel { max-width: none; }
  .bottomnav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--line); }
  .bn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600;
    color: var(--muted); text-decoration: none; }
  .bn .ic { width: 22px; height: 22px; }
  .bn[aria-current="page"] { color: var(--accent-text); }
  .bn.is-soon { opacity: .45; }
  .pripomienka-btn { right: 12px; bottom: calc(var(--bottomnav-h) + 12px + env(safe-area-inset-bottom)); height: 40px; padding: 0 14px; }
  .pripomienka-btn span { display: none; }
  .pripomienka-btn { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .pripomienka-vybavit { padding: 0 14px 12px; }
}
