/* Luma Creative — Leady CRM · firemný dizajn */
/* Farby prichádzajú z identity LUMA (luma-identita.css, značka B · Vzostup).
   Tu sa len mapujú na názvy, ktoré appka používala už predtým — vďaka tomu
   zmena identity neznamenala prepísať celý súbor. */
:root {
  --gold: var(--luma-gold);
  --gold-deep: var(--luma-gold-dark);
  --peach: var(--luma-gold-light);
  --night: var(--luma-ink);
  --ivory: var(--luma-paper);
  --grey: var(--luma-text-tlmeny);
  --line: var(--luma-linka);
  --white: var(--luma-white);
  --ink: var(--luma-text);
  /* Nadpisy a čísla — v tmavej téme sa zosvetlia, --night je podklad. */
  --nadpis: var(--luma-nadpis);
  --odkaz: var(--luma-odkaz);
  --success: var(--luma-ok);
  --danger: var(--luma-chyba);
  --radius: var(--luma-radius);
  --radius-sm: var(--luma-radius-sm);
  --shadow: var(--luma-tien);
  --shadow-sm: var(--luma-tien-sm);
  /* Tmavý podklad (bočný panel, hlavička, hero, modál, toast) ostáva tmavý
     v OBOCH témach. Text na ňom preto NESMIE brať farbu z `--ivory` ani
     `--white` — tie sa v tmavej téme preklopia na tmavú a text zmizne.
     Preto vlastný token s pevnou svetlou hodnotou. */
  --na-tmavom: rgba(250, 247, 242, 0.92);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 95%; max-width: 95%; margin: 0 auto; padding: 0 28px; }

h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 500; letter-spacing: -0.01em; }
em { font-style: italic; }
a { color: var(--gold-deep); }

/* --- Hlavička --- */
.topbar {
  background: var(--night);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  position: sticky; top: 0; z-index: 20;
}
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 84px;
}
/* Značka — SVG a text, nie obrázok (viď luma-znacka.js). */
.logo { display: flex; align-items: center; }
.logo__img {
  height: 48px; width: auto; display: block;
}
.topbar__meta {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--grey);
  display: flex; align-items: center; gap: 16px;
}
.logout-btn {
  font-family: inherit; font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(250, 247, 242, 0.62);
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0; padding: 7px 15px; cursor: pointer; white-space: nowrap;
  transition: color 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.logout-btn:hover {
  color: var(--nadpis); border-color: transparent;
  background: linear-gradient(135deg, var(--gold), var(--peach));
}

/* --- Navigačné menu --- */
.topnav { display: flex; gap: 4px; align-items: center; }
.topnav__item {
  font-family: inherit; font-size: 14px; font-weight: 500;
  color: rgba(250, 247, 242, 0.58);
  background: transparent; border: none; cursor: pointer;
  padding: 9px 17px; border-radius: 0; white-space: nowrap;
  transition: color 0.14s ease, background 0.14s ease;
}
.topnav__item:hover { color: var(--na-tmavom); }
.topnav__item .ic { font-size: 15px; opacity: 0.8; }
a.topnav__item { text-decoration: none; display: inline-block; }
.topnav__item--live { color: var(--gold); }
.topnav__item[hidden] { display: none; }
.topnav__item.is-active {
  color: var(--nadpis);
  background: linear-gradient(135deg, var(--gold), var(--peach));
}
/* Rozbaľovacie menu Nastavenia (Mail / Správa / Podpis) */
.navdrop { position: relative; }
.navdrop__btn { display: inline-flex; align-items: center; gap: 5px; }
.navdrop__caret { font-size: 10px; opacity: 0.75; }
.navdrop__panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  background: var(--white, #fff); border: 1px solid var(--line, #e7e2d6);
  border-radius: 12px; box-shadow: 0 18px 40px -16px rgba(14, 17, 22, 0.5);
  padding: 6px; min-width: 168px; display: flex; flex-direction: column; gap: 2px;
}
.navdrop__panel[hidden] { display: none; }
/* Otvor aj na hover a nezatváraj pri prechode myšou na položky (mostík cez medzeru) */
.navdrop:hover .navdrop__panel { display: flex; }
.navdrop:hover::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px;
}
.navdrop__item {
  font-family: inherit; font-size: 14px; font-weight: 500; text-align: left;
  color: var(--ink, #1a1a1a); background: none; border: none; cursor: pointer;
  padding: 9px 12px; border-radius: 8px;
}
.navdrop__item:hover { background: var(--ivory, #f6f3ea); }
a.navdrop__item { text-decoration: none; display: block; }
/* Variant bez JS (statické podstránky) — panel sa ukáže pri prejdení myšou */
.navdrop--hover .navdrop__panel { display: none; }
.navdrop--hover:hover .navdrop__panel { display: flex; }

/* --- Bočný panel (ľavé menu) ---
   Trieda .app má len hlavná appka; statické podstránky (Vyhodnotenie)
   ostávajú v pôvodnom rozložení s hornou lištou. */
body.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 250px; flex-shrink: 0;
  background: var(--night);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  padding: 26px 18px 22px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; z-index: 20;
  height: 100vh; overflow-y: auto;
}
.sidebar .logo { display: flex; }
.sidebar .logo .luma-znacka:hover .luma-znacka__creative { color: var(--luma-white); }

.sidebar .topnav {
  margin-top: 34px;
  flex-direction: column; align-items: stretch; gap: 3px;
}
.sidebar .topnav__item {
  width: 100%; text-align: left;
  border-radius: 10px; padding: 11px 14px;
  display: flex; align-items: center; gap: 11px;
}
/* Skryté položky (Audit, Používatelia) musia zostať skryté aj po prepnutí na flex. */
.sidebar .topnav__item[hidden] { display: none; }
.sidebar .navdrop { width: 100%; }
/* Ikona + text vľavo, šípka vpravo cez margin-left: auto. */
.sidebar .navdrop__btn { width: 100%; justify-content: flex-start; gap: 11px; }
.sidebar .navdrop__caret { margin-left: auto; }
.sidebar .navdrop__panel {
  position: static; margin: 2px 0 4px; min-width: 0;
  background: rgba(255, 255, 255, 0.04);
  border: none; box-shadow: none; border-radius: 10px; padding: 4px;
}
/* V bočnom paneli sa podmenu otvára klikom, nie prejdením myšou. */
.sidebar .navdrop:hover .navdrop__panel[hidden] { display: none; }
.sidebar .navdrop__item { color: rgba(250, 247, 242, 0.62); padding: 9px 12px; text-align: left; }
.sidebar .navdrop__item:hover { background: rgba(255, 255, 255, 0.08); color: var(--na-tmavom); }
.sidebar .navdrop__item .ic { font-size: 14px; opacity: 0.8; margin-right: 8px; }

/* Prepínač appiek sedí nad lištou používateľa a odtláča ju k spodku panela. */
.sidebar #app-switcher { margin-top: auto; padding-bottom: 10px; }
.sidebar .topbar__meta {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-direction: column; align-items: stretch; gap: 7px;
}
.sidebar .user-chip {
  font-size: 11px; letter-spacing: 0.1em; line-height: 1.45;
  color: rgba(250, 247, 242, 0.5);
  text-align: left; padding-bottom: 4px; word-break: break-word;
}
.sidebar .user-chip:empty { display: none; }
.sidebar .logout-btn { width: 100%; text-align: left; }
/* Verzia aplikácie v päte bočného panela */
.app-ver {
  display: block; margin-top: 6px;
  font-size: 11px; letter-spacing: 1px;
  color: var(--gold); opacity: 0.75; text-align: left;
}

/* --- Hlavný obsah vedľa panela --- */
.content { flex: 1 1 auto; min-width: 0; padding: 0 28px; }

/* Mobilná lišta + hamburger + stmavené pozadie — na desktope skryté */
.mobile-header { display: none; }
.hamburger { display: none; }
.nav-backdrop { display: none; }

/* --- Pohľady (prepínané menu) --- */
.view { display: none; }
.view--active { display: block; }

/* --- Hlavička podstránky --- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin: 38px 0 22px;
}
.page-head__title { font-size: clamp(30px, 4vw, 42px); color: var(--nadpis); line-height: 1.1; }
.page-head__title em { color: var(--gold-deep); font-style: italic; }
.page-head__lead { color: var(--grey); font-size: 15px; margin-top: 8px; max-width: 560px; }

/* --- Tabuľka mailov --- */
.table-head--mail, .mail-row {
  display: grid;
  grid-template-columns: 0.75fr 1.6fr 1.2fr 1.5fr 0.8fr 0.95fr 0.8fr;
  gap: 12px; align-items: center;
}
.mail-row {
  padding: 15px 26px; border-bottom: 1px solid var(--line);
  transition: background 0.12s ease;
}
.mail-row:last-child { border-bottom: none; }
.mail-row:hover { background: var(--ivory); }
.mail__cell { min-width: 0; font-size: 13.5px; color: var(--ink); }
.mail__num { font-weight: 700; font-size: 13px; color: var(--gold-deep); }
.mail__email {
  font-weight: 600; font-size: 14.5px; color: var(--nadpis);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block;
}
.badge.m-aktivny { background: #e2efe1; color: #3f7a4c; }
.badge.m-pozastaveny { background: #f0eee9; color: #8a8f99; }

/* --- Tabuľka správ --- */
.table-head--msg, .msg-row {
  display: grid;
  grid-template-columns: 0.6fr 1.1fr 1fr 0.7fr 1.3fr 1.7fr 0.8fr;
  gap: 12px; align-items: center;
}
.msg-row {
  padding: 15px 26px; border-bottom: 1px solid var(--line);
  transition: background 0.12s ease;
}
.msg-row:last-child { border-bottom: none; }
.msg-row:hover { background: var(--ivory); }
.msg__cell { min-width: 0; font-size: 13.5px; color: var(--ink); }
.msg__num { font-weight: 700; font-size: 13px; color: var(--gold-deep); }
.msg__nazov {
  font-weight: 600; font-size: 14.5px; color: var(--nadpis);
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.msg__muted {
  color: var(--grey); display: block;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* --- Tabuľka kampaní --- */
.table-head--camp, .camp-row {
  display: grid;
  grid-template-columns: 0.5fr 1.1fr 1.25fr 0.7fr 0.95fr 0.8fr 0.95fr 0.8fr 0.95fr;
  gap: 12px; align-items: center;
}
.camp-row {
  padding: 15px 26px; border-bottom: 1px solid var(--line);
  transition: background 0.12s ease;
}
.camp-row:last-child { border-bottom: none; }
.camp-row:hover { background: var(--ivory); }
.camp__cell { min-width: 0; font-size: 13.5px; color: var(--ink); }
.camp__result { grid-column: 1 / -1; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--grey, #888); font-variant-numeric: tabular-nums; }
.camp__resultlbl { font-weight: 600; color: var(--ink); }
.camp__num { font-weight: 700; font-size: 13px; color: var(--gold-deep); }
.camp__nazov {
  font-weight: 600; font-size: 14.5px; color: var(--nadpis);
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.camp__muted {
  color: var(--grey); display: block;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.badge.k-koncept { background: #f0eee9; color: #8a8f99; }
.badge.k-naplanovana { background: #fdf2dc; color: #b98a2e; }
.badge.k-prebieha { background: linear-gradient(135deg, var(--gold), var(--peach)); color: #5b4413; }
.badge.k-dokoncena { background: #e2efe1; color: #3f7a4c; }
.badge.k-pozastavena { background: #f6e2dd; color: #b14a36; }

/* Tlačidlo spustenia kampane */
.iconbtn--go {
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold), var(--peach));
  color: var(--nadpis);
}
.iconbtn--go:hover {
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold), var(--peach));
  box-shadow: 0 4px 12px -4px rgba(245, 194, 107, 0.95);
}
.launch { padding: 4px 26px 6px; }
.launch__intro { font-size: 14.5px; color: #5c5f66; margin-bottom: 14px; }
.launch__list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.launch__list li {
  display: flex; justify-content: space-between; gap: 14px;
  font-size: 13.5px; padding: 9px 13px;
  background: var(--ivory); border: 1px solid var(--line); border-radius: 9px;
}
.launch__list li > span:first-child { color: var(--grey); }
.launch__list li > span:last-child { color: var(--ink); font-weight: 600; text-align: right; }
.launch__warn { color: var(--danger) !important; }
.launch__leads:not(:empty) { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.launch__result {
  padding: 12px 14px; border-radius: 9px; font-size: 14px;
  background: var(--ivory); border: 1px solid var(--line); color: var(--ink);
}
.launch__result--ok {
  background: #eaf6ec; border-color: #bfe3c6; color: #1f7a32; font-weight: 600;
}
.launch__result--err { background: #fdeceb; border-color: #f3c2bd; color: var(--danger); }
.launch__actions { padding: 16px 26px 26px; }

/* --- Tabuľka podpisov --- */
.table-head--sig, .sig-row {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr 1.2fr 2.4fr 0.8fr;
  gap: 12px; align-items: center;
}
.sig-row {
  padding: 15px 26px; border-bottom: 1px solid var(--line);
  transition: background 0.12s ease;
}
.sig-row:last-child { border-bottom: none; }
.sig-row:hover { background: var(--ivory); }
.sig__cell { min-width: 0; font-size: 13.5px; color: var(--ink); }
.sig__num { font-weight: 700; font-size: 13px; color: var(--gold-deep); }
.sig__nazov { font-weight: 600; font-size: 14.5px; color: var(--nadpis); }
.sig__muted {
  color: var(--grey); display: block;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sig__preview {
  font-size: 13px; color: var(--grey); min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sig__cell--preview { display: flex; align-items: center; gap: 10px; }
.sig__thumb {
  height: 28px; width: auto; max-width: 56px; flex-shrink: 0;
  border-radius: 4px; border: 1px solid var(--line);
}

/* Editor podpisu (text + obrázok v jednom poli) */
.rte {
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--white); overflow: hidden;
}
.rte__toolbar {
  display: flex; gap: 6px; padding: 7px 8px;
  border-bottom: 1px solid var(--line); background: var(--ivory);
}
.rte__btn {
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: 0;
  padding: 6px 11px; cursor: pointer; transition: border-color 0.12s ease, background 0.12s ease;
}
.rte__btn:hover { border-color: var(--gold); background: #fdf6e8; }
.rte__editor {
  min-height: 130px; max-height: 320px; overflow-y: auto;
  padding: 12px 13px; font-size: 14px; color: var(--ink); line-height: 1.5; outline: none;
}
.rte__editor:empty::before { content: attr(data-placeholder); color: #b4afa4; }
.rte__editor:focus { box-shadow: inset 0 0 0 2px rgba(245, 194, 107, 0.25); }
.rte__editor img { max-width: 100%; height: auto; border-radius: 4px; margin: 4px 0; }

/* --- Placeholder pre pripravované sekcie --- */
.placeholder {
  margin: 40px 0 60px; padding: 78px 32px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  text-align: center;
}
.placeholder__icon { font-size: 46px; line-height: 1; }
.placeholder__badge {
  display: inline-block; margin: 16px 0 12px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--gold-deep); background: #fdf2dc;
  border-radius: 999px; padding: 5px 13px;
}
.placeholder h2 {
  font-size: 32px; color: var(--nadpis); margin-bottom: 8px;
}
.placeholder p { color: var(--grey); font-size: 15px; }

/* --- Hero --- */
.hero {
  position: relative; overflow: hidden;
  background: var(--night); color: var(--na-tmavom);
  border-radius: var(--radius);
  margin: 34px 0 26px;
  padding: 12px 40px;
}
.hero__glow {
  position: absolute; right: -50px; top: -120px;
  width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 194, 107, 0.55), transparent 62%);
  pointer-events: none;
}
.eyebrow {
  position: relative;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px;
}
.hero__row {
  position: relative;
  display: flex; align-items: center; gap: 40px;
}
.hero h1 { font-size: clamp(28px, 3.2vw, 38px); line-height: 1.1; flex: 1 1 auto; }
.hero h1 em { color: var(--gold); }
.hero__aside {
  flex: 0 0 440px;
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
}
.hero__lead { color: #c6c8cd; font-size: 14.5px; }
.hero__cta { flex-shrink: 0; padding: 10px 20px; align-self: flex-end; }

/* --- Štatistiky --- */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin-bottom: 24px;
}
.stat {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.stat__num { font-family: 'Fraunces', serif; font-size: 30px; color: var(--nadpis); line-height: 1; }
.stat__label { font-size: 12px; color: var(--grey); margin-top: 7px; letter-spacing: 0.02em; }
.stat--accent { background: linear-gradient(135deg, var(--gold), var(--peach)); border-color: transparent; }
.stat--accent .stat__num, .stat--accent .stat__label { color: var(--nadpis); }

/* --- Toolbar --- */
.toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px;
  align-items: center;
}
/* vynútený zlom — od Segmentu nižšie ide na druhý riadok */
.toolbar__break { flex-basis: 100%; height: 0; margin: 0; }
/* aby sa všetko zmestilo do jedného riadku, selecty sa môžu primerane zúžiť */
.toolbar .select { min-width: 0; }
.toolbar .cinnost { flex: 1 1 220px; min-width: 0; }
#filterMesto { flex: 0 0 auto; }
.search { position: relative; flex: 0 1 560px; }
.search__icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--grey);
}
.search input {
  width: 100%; padding: 12px 14px 12px 42px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); font-size: 14px; font-family: inherit; color: var(--ink);
}
.select {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); font-size: 14px; font-family: inherit; color: var(--ink);
  cursor: pointer; min-width: 150px;
}
/* Viacnásobný filter (kontakty) */
.multi { position: relative; }
.multi__btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-width: 160px; text-align: left;
}
.multi__btn.is-active { border-color: var(--gold); background: #fdf6e8; }
.multi__caret { font-size: 10px; color: var(--grey); }
.multi__panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  min-width: 190px; padding: 6px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.multi__panel[hidden] { display: none; }
.multi__opt {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: 8px; cursor: pointer;
  font-size: 14px; color: var(--ink);
}
.multi__opt:hover { background: #f7f3ea; }
.multi__opt input {
  width: 16px; height: 16px; cursor: pointer; accent-color: var(--gold-deep);
}
.multi__sep { height: 1px; background: var(--line); margin: 5px 8px; }

.search input:focus, .select:focus,
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 194, 107, 0.25);
}

/* --- Tlačidlá --- */
.btn {
  font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 12px 22px; border-radius: 0; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn--gold {
  background: linear-gradient(135deg, var(--gold), var(--peach));
  color: var(--nadpis); box-shadow: 0 10px 24px -12px rgba(245, 194, 107, 0.9);
}
.btn--gold:hover { box-shadow: 0 14px 28px -10px rgba(245, 194, 107, 1); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: #f0ebe1; }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #a8412f; }

/* --- Tabuľka --- */
.table-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.table-head, .lead-row {
  display: grid;
  grid-template-columns: 36px 1fr 2.1fr 0.95fr 1.1fr 1.1fr 1fr 0.9fr 1.45fr 1.65fr 1.25fr 1fr 1.35fr 0.78fr;
  gap: 12px; align-items: center;
}
.pot { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pot--hi { background: #e3f6e6; color: #1b7a34; }
.pot--mid { background: #fdf0d8; color: #9a6b12; }
.pot--lo { background: #eee; color: #777; }
/* Rola v správe používateľov — doteraz chýbali, badge sa renderoval bez pozadia. */
.pot--vys { background: #e3f6e6; color: #1b7a34; }
.pot--str { background: #fdf0d8; color: #9a6b12; }
.col-datum { font-size: 13px; color: var(--ink-soft, #555); white-space: nowrap; }
.col-mesto, .col-kraj, .col-okres { font-size: 13px; color: var(--ink-soft, #555); }
/* Filter Mesto — 2× širší ako bežný select (150px → 300px) */
#filterMesto { min-width: 300px; width: 300px; }
.bulk { display: inline-flex; align-items: center; gap: 6px; }
/* o 50 % užší ako bežný select (~120px) → ~60px */
.bulk__count { width: 120px; text-align: left; padding-left: 6px; padding-right: 6px; }
.bulk__check { display: inline-flex; align-items: center; }
.bulk__check input { width: 17px; height: 17px; accent-color: var(--gold); cursor: pointer; margin: 0; }
.daterange { display: inline-flex; align-items: center; gap: 6px; }
.daterange__label { font-size: 13px; color: var(--grey, #777); white-space: nowrap; }
.daterange__sep { color: var(--grey, #777); }
.daterange input[type="date"] { padding: 6px 8px; }
.col-check { display: flex; align-items: center; justify-content: center; }
.col-check input {
  width: 17px; height: 17px; accent-color: var(--gold); cursor: pointer; margin: 0;
}
.lead-row.is-checked { background: #fbf4e2; }
.lead-row.is-checked:hover { background: #f8eed4; }
.table-head {
  padding: 15px 26px; background: var(--ivory); border-bottom: 1px solid var(--line);
  font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--grey);
}
.col-akcie { text-align: right; }
.col-c { min-width: 0; }

/* Klikateľná hlavička — usporiadanie */
.th { cursor: pointer; user-select: none; transition: color 0.12s ease; }
.th:hover { color: var(--ink); }
.th.is-sorted { color: var(--gold-deep); }
.th__arr { font-style: normal; font-size: 9px; opacity: 0.35; }
.th:hover .th__arr { opacity: 0.7; }
.th.is-sorted .th__arr { opacity: 1; }

/* Hodnota v kontaktnom stĺpci */
.cell-link {
  display: block; font-size: 12.5px; color: #5c5f66; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cell-link:hover { color: var(--gold-deep); text-decoration: underline; }
.cell-empty { color: #cbc7bf; font-size: 13px; }
.lead-row {
  position: relative;
  padding: 16px 26px; border-bottom: 1px solid var(--line);
  transition: background 0.12s ease; cursor: pointer;
}
.lead-row:last-child { border-bottom: none; }
.lead-row:hover { background: var(--ivory); }
/* Úzky pásik na ľavom kraji riadka: zelený = nie je daňový dlžník, červený = je dlžník */
.lead-row::before {
  content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px;
  width: 4px; border-radius: 3px; background: #d7d7d7;
}
.lead-row.is-ok::before { background: #30a46c; }
.lead-row.is-dlznik::before { background: #e5484d; }
.lead__cell { min-width: 0; }
.lead__name { font-weight: 600; font-size: 15px; color: var(--nadpis); }
.lead__addr {
  font-size: 12.5px; color: var(--grey); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lead__person { font-size: 12.5px; color: var(--gold-deep); font-weight: 600; margin-top: 2px; }
.lead__meta { font-size: 12.5px; color: var(--grey); margin-top: 4px; display: none; flex-wrap: wrap; gap: 4px 12px; }
.lead__meta a { color: var(--grey); text-decoration: none; }
.lead__meta a:hover { color: var(--gold-deep); }
.lead__seg { font-size: 13.5px; }
.lead__sub { font-size: 12px; color: var(--grey); }
.lead__typ { font-size: 13px; }
.typ-tag {
  display: inline-block; max-width: 100%; font-size: 11.5px;
  padding: 3px 9px; border-radius: 6px; background: #f3eee3; color: #6b6256;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Stav badge */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px;
  white-space: nowrap;
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.s-nekontaktovane { background: #f0eee9; color: #8a8f99; }
.badge.s-kontaktovane { background: #fdf2dc; color: #b98a2e; }
.badge.s-caka { background: #fbe9d4; color: #b9742e; }
.badge.s-stretnutie { background: #fce6c4; color: #a9761b; }
.badge.s-ponuka { background: linear-gradient(135deg, var(--gold), var(--peach)); color: #5b4413; }
.badge.s-klient { background: #e2efe1; color: #3f7a4c; }
.badge.s-nezaujem { background: #f6e2dd; color: #b14a36; }
.badge.s-nepremna { background: #eae6df; color: #9a8b73; }

/* Akcie */
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.iconbtn {
  border: 1px solid var(--line); background: var(--white);
  width: 34px; height: 34px; border-radius: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--ink); transition: all 0.12s ease;
}
.iconbtn:hover { border-color: var(--gold); background: #fdf6e8; }
.iconbtn--del:hover { border-color: var(--danger); background: #fbeae6; color: var(--danger); }

.table-foot {
  padding: 13px 22px 13px 26px; font-size: 13px; color: var(--grey);
  background: var(--ivory); display: flex; align-items: center;
  justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.foot-info { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sel-count { font-weight: 700; color: var(--gold-deep); }
.pager { display: flex; align-items: center; gap: 6px; }
.pager__btn {
  min-width: 34px; height: 34px; padding: 0 9px;
  border: 1px solid var(--line); background: var(--white);
  border-radius: 0; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ink);
  transition: all 0.12s ease;
}
.pager__btn:hover:not(:disabled):not(.is-active) { border-color: var(--gold); background: #fdf6e8; }
.pager__btn:disabled { opacity: 0.35; cursor: not-allowed; }
.pager__btn.is-active {
  background: linear-gradient(135deg, var(--gold), var(--peach));
  border-color: transparent; color: var(--nadpis); cursor: default;
}
.pager__gap { padding: 0 2px; color: var(--grey); }
.pager-wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pagesize { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--grey); }
.select--sm { height: 34px; padding: 0 26px 0 10px; font-size: 13px; }
.empty { padding: 44px 26px 48px; text-align: center; color: var(--grey); }
.empty__hint { font-size: 13px; margin-top: 4px; opacity: 0.85; }
/* Prázdny stav aj načítavanie sú spoločné pre celú rodinu (luma-identita.css). */
.loading { padding: 34px 20px 36px; text-align: center; color: var(--grey); font-size: 14px; }

/* --- Modal --- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(14, 17, 22, 0.55); backdrop-filter: blur(2px); }
.modal__panel {
  position: relative; background: var(--ivory); border-radius: var(--radius);
  width: min(680px, calc(100vw - 36px)); max-height: calc(100vh - 60px); overflow-y: auto;
  box-shadow: 0 40px 90px -30px rgba(14, 17, 22, 0.7);
  animation: pop 0.18s ease;
}
.modal__panel--sm { width: min(440px, calc(100vw - 36px)); }
.modal__panel--wide { width: min(1280px, calc(100vw - 36px)); }
.modal__panel--wide .detail__grid,
.modal__panel--wide .form__grid { grid-template-columns: 1fr 1fr 1fr; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 26px 16px;
}
.modal__head h2 { font-size: 24px; color: var(--nadpis); }

/* --- Formulár --- */
.form { padding: 0 26px 26px; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field span { font-size: 12.5px; font-weight: 600; color: #5c5f66; letter-spacing: 0.01em; }
.field span i { color: var(--danger); font-style: normal; }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 14px; color: var(--ink);
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--white);
}
.field textarea { resize: vertical; }

/* --- Detail leadu (iba na čítanie) --- */
.detail { padding: 0 26px 4px; }
.detail__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dfield { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.dfield--full { grid-column: 1 / -1; }
/* Dvojica polí vedľa seba na vlastnom riadku (Potenciál + Scoring) */
.dpair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dpair > div { display: flex; flex-direction: column; gap: 5px; }
.field--pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.field--pair > .field { gap: 6px; }
.field .hint { color: var(--grey); font-style: normal; font-weight: 400; font-size: 11px; }
.field input[readonly] { background: var(--ivory, #f6f3ea); color: var(--grey); cursor: default; }
/* Taby v detaile / úprave leadu */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 18px; flex-wrap: wrap; }
.tabs .tab { background: none; border: none; font-family: inherit; font-weight: 600; font-size: 14px; color: var(--grey); padding: 9px 16px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs .tab:hover { color: var(--night, #1a1a1a); }
.tabs .tab.is-active { color: var(--night, #1a1a1a); border-bottom-color: var(--gold, #c79a3a); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
/* Panely uložené na seba → dialóg má rovnakú výšku pri všetkých taboch (= najvyšší tab). */
.tab-panels { display: grid; }
.tab-panels > .tab-panel { grid-area: 1 / 1; display: block; visibility: hidden; }
.tab-panels > .tab-panel.is-active { visibility: visible; }
/* Tabuľka finančných údajov z RÚZ (obrat/zisk po rokoch) */
.fintab { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 16px; }
.fintab th, .fintab td { padding: 7px 10px; border-bottom: 1px solid var(--line, #e7e2d6); text-align: right; font-variant-numeric: tabular-nums; }
.fintab th:first-child, .fintab td:first-child { text-align: left; font-weight: 600; }
.fintab th { color: var(--grey, #888); font-weight: 600; }
/* Loading bar hore — počas načítavania zoznamu leadov */
.loadbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; pointer-events: none; opacity: 0; transition: opacity .2s; overflow: hidden; }
.loadbar.is-active { opacity: 1; }
.loadbar::before { content: ""; position: absolute; top: 0; left: -35%; height: 100%; width: 35%; border-radius: 0 3px 3px 0; background: linear-gradient(90deg, var(--gold, #c79a3a), var(--peach, #f5c26b)); animation: loadbar 1s ease-in-out infinite; }
@keyframes loadbar { 0% { left: -35%; } 100% { left: 100%; } }

/* --- Audit používateľov --- */
/* Pohľad Audit má vlastné odsadenie — obsahom nie je mriežková tabuľka. */
.table-card--audit { padding: 18px 20px 20px; }
.audit__filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 4px 0 14px; border-bottom: 1px solid var(--line);
}
.audit__filters input[type="search"] {
  flex: 1 1 200px; min-width: 0; height: 34px; padding: 0 12px; font-family: inherit; font-size: 13px;
  border: 1px solid var(--line); border-radius: var(--radius-sm, 10px); background: var(--white, #fff); color: var(--ink);
}
.audit__date { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--grey); }
.audit__date input {
  height: 34px; padding: 0 8px; font-family: inherit; font-size: 13px;
  border: 1px solid var(--line); border-radius: var(--radius-sm, 10px); background: var(--white, #fff); color: var(--ink);
}
.audit__note { margin-top: 12px; font-size: 12.5px; color: var(--grey); line-height: 1.5; }
.audit__note code { background: #f4f1ea; border-radius: 5px; padding: 1px 5px; font-size: 12px; }
/* Tabuľka sa posúva vo vlastnom kontajneri, nie celý modál. */
.audit__scroll { overflow-x: auto; margin-top: 14px; }
.audit-tab { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 13px; }
.audit-tab th, .audit-tab td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.audit-tab th { color: var(--grey); font-weight: 600; white-space: nowrap; }
.audit-tab tbody tr:hover { background: var(--ivory); }
.audit__ts { white-space: nowrap; color: var(--grey); font-variant-numeric: tabular-nums; }
.audit-act { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.audit-act--create { background: #e3f6e6; color: #1b7a34; }
.audit-act--update { background: #fdf0d8; color: #9a6b12; }
.audit-act--delete { background: #fbe3e1; color: #b3261e; }
.audit__chg { line-height: 1.5; }
.audit__chg + .audit__chg { margin-top: 3px; }
.audit__fld { font-weight: 600; color: var(--nadpis); }
.audit__from { color: var(--grey); text-decoration: line-through; }
.audit__to { color: var(--nadpis); }
.audit__dash { color: var(--grey); }
.audit__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 14px; }

/* Tabuľka projektov */
.prow { display: grid; grid-template-columns: 56px 1.3fr 1.5fr 120px 84px 112px 1.2fr 76px 104px; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line, #e7e2d6); align-items: center; font-size: 13.5px; cursor: pointer; }
.prow > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Zoznam projektov: vodorovné scrollovanie (doľava/doprava) na úzkych displejoch (tablet/mobil).
   Zvislo (hore/dole) scrolluje samotná stránka. Riadky majú min-šírku, nech sa stĺpce nestlačia. */
#projList { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
#projList .prow { min-width: 900px; }
/* Pásik vľavo: zelený = Support/Live, žltý = Development/Príprava prod/Podpis, červený = ostatné */
.prow:not(.prow--head) { position: relative; }
.prow:not(.prow--head)::before {
  content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px;
  width: 4px; border-radius: 3px; background: #d7d7d7;
}
.prow.is-ok::before { background: #30a46c; }
.prow.is-mid::before { background: #f5a623; }
.prow.is-bad::before { background: #e5484d; }
.prow--head { font-weight: 600; color: var(--grey, #888); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; cursor: default; background: var(--ivory, #f6f3ea); }
.prow:not(.prow--head):hover { background: var(--ivory, #f6f3ea); }
/* Editor položiek projektu (tab Stav) */
.polozka { display: grid; grid-template-columns: 170px 1fr 28px; gap: 8px; align-items: end; padding: 12px 14px; border: 1px solid var(--line, #e7e2d6); border-radius: 12px; margin-bottom: 10px; background: var(--ivory, #f6f3ea); }
.polozka--inter { grid-template-columns: 150px 1fr 130px 150px 1fr 28px; }
.polozka .field { gap: 4px; }
.polozka .field span { font-size: 10.5px; }
.polozka .field input, .polozka .field select { padding: 8px 9px; font-size: 13px; background: var(--white, #fff); }
.polozka__rm { align-self: center; color: #b3261e; }
@media (max-width: 820px) { .polozka, .polozka--inter { grid-template-columns: 1fr 1fr; } }
.dfield__label {
  font-size: 11px; font-weight: 600; color: var(--grey);
  letter-spacing: 0.09em; text-transform: uppercase;
}
.dfield__val {
  font-size: 14px; color: var(--ink); line-height: 1.5;
  padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--ivory); min-height: 42px; display: flex; align-items: center;
  white-space: pre-wrap; word-break: break-word;
}
.detail__actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 20px 26px 26px;
}
.checklist {
  max-height: 168px; overflow-y: auto; padding: 5px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--white);
  display: flex; flex-direction: column; gap: 2px;
}
.checklist__item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 9px; border-radius: 6px; cursor: pointer;
  font-size: 14px; color: var(--ink); transition: background 0.1s ease;
}
.checklist__item:hover { background: #f4f4f6; }
.checklist__item input { width: 16px; height: 16px; accent-color: var(--gold); flex-shrink: 0; }
.checklist__item span { font-size: 14px; font-weight: 500; color: var(--ink); letter-spacing: 0; }
.checklist__item:has(input:checked) {
  background: linear-gradient(135deg, var(--gold), var(--peach));
}
.checklist__item:has(input:checked) span { color: var(--nadpis); }
.checklist__empty { padding: 14px 10px; font-size: 13.5px; color: #8a8d94; }
.campimg { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.campimg__file {
  font-size: 13px; border: 0; padding: 0; background: transparent; border-radius: 0;
}
.campimg__preview {
  max-width: 100%; max-height: 130px; width: auto;
  border: 1px solid var(--line); border-radius: 8px;
}
.campimg__clear { padding: 7px 13px; font-size: 12.5px; }
.leadcount { display: flex; align-items: center; gap: 12px; }
.leadcount input { flex: 0 0 140px; }
.leadcount__max {
  font-size: 13px; font-weight: 600; color: var(--grey);
  background: var(--ivory); border: 1px solid var(--line);
  padding: 9px 13px; border-radius: 8px; white-space: nowrap;
}
.form__actions {
  display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px;
}
.confirm__text { padding: 0 26px 4px; color: #5c5f66; font-size: 14.5px; }
.confirm__text + .form__actions { padding: 0 26px 26px; }

/* --- Toast --- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--night); color: var(--na-tmavom); padding: 13px 22px;
  border-radius: 999px; font-size: 14px; font-weight: 500; z-index: 60;
  box-shadow: var(--shadow); animation: rise 0.22s ease;
}
.toast[hidden] { display: none; }
.toast--ok { border-left: 4px solid var(--gold); }
.toast--err { border-left: 4px solid var(--danger); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 14px); } }

/* --- Footer --- */
.footer {
  padding: 34px 28px 44px; text-align: center;
  font-family: 'Fraunces', serif; font-style: italic; color: var(--grey); font-size: 14px;
}

/* --- Prihlasovacia obrazovka --- */
.hidden { display: none !important; }
/* Dva panely: vľavo formulár na papieri, vpravo vizuál cez celú výšku.
   Vizuál je čistá dekorácia, tak pri úzkom okne zmizne úplne. */
.login {
  position: fixed; inset: 0; z-index: 100;
  display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
  background: var(--ivory);
}
.login__panel {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 40px 28px; overflow-y: auto;
}
.login__hlavicka { width: min(400px, 100%); text-align: center; margin-bottom: 22px; }
.login__card {
  position: relative;
  width: min(400px, 100%);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -34px rgba(14, 17, 22, 0.45);
  padding: 30px 30px 28px;
  display: flex; flex-direction: column; align-items: stretch;
  animation: pop 0.2s ease;
}
.login__znacka { display: flex; justify-content: center; margin-bottom: 14px; }
/* Meno appky ako na ostatných platformách LUMA: názov tučne, „Platforma"
   tlmene a verzia malým horným indexom. */
.login__title {
  font-size: 24px; color: var(--nadpis); line-height: 1.2; margin-bottom: 6px;
  font-weight: 400;
}
.login__title b { font-weight: 700; }
.login__verzia {
  font-size: 11px; font-weight: 600; color: var(--gold-deep);
  vertical-align: super; margin-left: 1px; letter-spacing: 0.02em;
}

.login__vizual { position: relative; overflow: hidden; background: var(--night); }
.login__vizual img {
  width: 100%; height: 100%; object-fit: cover; object-position: center; display: block;
}
/* Spodný prechod drží text čitateľný nad ľubovoľnou časťou fotky. */
.login__vizual::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(14, 17, 22, 0.78) 0%, rgba(14, 17, 22, 0.28) 34%, transparent 62%);
}
.login__vizualtext {
  position: absolute; left: 46px; right: 46px; bottom: 52px; z-index: 1;
}
.login__vizualtext h2 {
  font-size: 27px; line-height: 1.22; color: #fff; margin-bottom: 6px;
}
.login__vizualtext p {
  font-size: 15px; font-style: italic; color: rgba(255, 255, 255, 0.82);
}
.login__field {
  display: flex; flex-direction: column; gap: 6px;
  text-align: left; margin-bottom: 14px;
}
.login__field span {
  font-size: 12.5px; font-weight: 600; color: #5c5f66; letter-spacing: 0.01em;
}
.login__field input {
  font-family: inherit; font-size: 14px; color: var(--ink);
  padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--white);
}
.login__field input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 194, 107, 0.25);
}
.login__error {
  min-height: 18px; margin-bottom: 12px;
  font-size: 13px; font-weight: 600; color: var(--danger); text-align: left;
}
.login__error:empty { margin-bottom: 4px; }
.login__btn { width: 100%; justify-content: center; }

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login__vizual { display: none; }
}

/* ============================================================
   RESPONZIVITA — vrstvený systém (desktop-first)
   > 1500px         plná 14-stĺpcová tabuľka leadov
   ≤ 1500px         laptop / MacBook Air → 9 stĺpcov, kontakt pod názvom
   ≤ 1200px (>820)  malý laptop / tablet naležato → 6 kľúčových stĺpcov
   ≤ 1024px         topbar sa skladá pod seba, toolbar sa zarovná
   ≤ 820px          tablet nastojato / mobil → karty
   ≤ 520px          malý mobil → kompaktné rozostupy
   ============================================================ */

/* ---- Laptop / MacBook Air: zúžená tabuľka leadov (9 stĺpcov) ----
   Kraj, Okres a tri kontaktné stĺpce (web/e-mail/telefón) sa skryjú;
   kontakt sa presunie pod názov leadu (riadok .lead__meta). */
@media (max-width: 1500px) {
  .lead__meta { display: flex; }
  .table-head, .lead-row {
    grid-template-columns: 36px 0.9fr 2.4fr 0.85fr 1fr 0.85fr 1fr 1.25fr 0.7fr;
  }
  .table-head .col-kraj, .lead-row .col-kraj,
  .table-head .col-okres, .lead-row .col-okres,
  .table-head .col-c, .lead-row .col-c { display: none; }
  /* Široký modál: 3 → 2 stĺpce, nech polia nie sú pritesné */
  .modal__panel--wide .form__grid,
  .modal__panel--wide .detail__grid { grid-template-columns: 1fr 1fr; }
}

/* ---- Tablet naležato / malý laptop: len kľúčové stĺpce (6) ---- */
@media (max-width: 1200px) and (min-width: 821px) {
  .table-head, .lead-row {
    grid-template-columns: 36px 2.6fr 1fr 1.1fr 1.25fr 0.7fr;
  }
  .table-head .col-datum, .lead-row .col-datum,
  .table-head .col-pot, .lead-row .col-pot,
  .table-head .col-seg, .lead-row .col-seg { display: none; }
}

/* ---- Bočný panel ako vysúvacie menu + toolbar na užších displejoch ---- */
@media (max-width: 1024px) {
  /* Bočný panel sa schová a vysúva sa zľava cez hamburger */
  .sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; width: 262px; z-index: 60;
    transform: translateX(-100%); transition: transform 0.25s ease;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
  }
  body.nav-open .sidebar { transform: translateX(0); }

  .nav-backdrop {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(14, 17, 22, 0.5); opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease;
  }
  body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }

  /* Horná lišta s hamburgerom a logom (fixná, cez celú šírku) */
  .mobile-header {
    display: flex; align-items: center; gap: 12px;
    position: fixed; top: 0; left: 0; right: 0; z-index: 65;
    height: 58px; padding: 0 14px;
    background: var(--night); box-shadow: 0 2px 16px -6px rgba(0, 0, 0, 0.5);
  }
  .mobile-brand { display: flex; align-items: center; line-height: 0; }
  .mobile-brand .luma-znacka { font-size: 17px; }
  .mobile-brand .luma-znacka__tagline { display: none; }

  .hamburger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; flex-shrink: 0; padding: 0 9px;
    border: none; border-radius: 0; cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
  }
  .hamburger span { display: block; height: 2px; background: var(--gold); border-radius: 2px; transition: 0.25s; }
  body.nav-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .hamburger span:nth-child(2) { opacity: 0; }
  body.nav-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .content { padding: 72px 20px 0; }

  /* Statické podstránky (Vyhodnotenie) majú stále hornú lištu */
  .topbar__inner {
    height: auto; flex-direction: column; gap: 12px;
    padding-top: 12px; padding-bottom: 12px;
  }
  .topbar .topnav { width: 100%; flex-wrap: wrap; justify-content: center; }
  .topbar .topnav__item { padding: 8px 14px; }
  /* Meta (chip + Odhlásiť/Heslo/Používatelia) ostáva viditeľné, len sa zarovná */
  .topbar .topbar__meta { flex-wrap: wrap; justify-content: center; gap: 10px; }
  /* Toolbar: hľadanie cez celý riadok, filtre sa pekne rozložia */
  .search { flex: 1 1 100%; }
  .toolbar .select, .toolbar .multi, .toolbar .cinnost { flex: 1 1 190px; min-width: 0; }
  .toolbar .multi__btn { width: 100%; }
  #filterMesto, #filterKraj { width: auto; min-width: 0; flex: 1 1 190px; }
  .daterange { flex: 1 1 auto; }
}

/* ---- Tablet nastojato / mobil: karty ---- */
@media (max-width: 820px) {
  .wrap { padding: 0 16px; }
  .content { padding: 70px 14px 0; }
  .hero { padding: 26px 22px; }
  .hero__row { flex-direction: column; align-items: flex-start; gap: 18px; }
  .hero__aside { flex: 1 1 auto; }
  /* Leady ako karty */
  .table-head { display: none; }
  .lead-row {
    grid-template-columns: 1fr auto; gap: 8px 14px;
    padding: 16px;
  }
  .lead-row .lead__cell { grid-column: 1; display: block; }
  .lead-row .col-c { display: none; }
  .lead__meta { display: flex; }
  .col-stav { grid-column: 1; }
  .col-akcie { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
  .mail-row { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; }
  .mail-row .mail__cell { grid-column: 1; }
  .mail-row .col-akcie { grid-column: 2; grid-row: 1 / span 6; }
  .sig-row { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; }
  .sig-row .sig__cell { grid-column: 1; }
  .sig-row .col-akcie { grid-column: 2; grid-row: 1 / span 4; }
  .camp-row { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; }
  .camp-row .camp__cell { grid-column: 1; }
  .camp-row .col-akcie { grid-column: 2; grid-row: 1 / span 7; }
  .msg-row { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; }
  .msg-row .msg__cell { grid-column: 1; }
  .msg-row .col-akcie { grid-column: 2; grid-row: 1 / span 5; }
  .page-head { margin: 24px 0 18px; }
  .form__grid,
  .modal__panel--wide .form__grid { grid-template-columns: 1fr; }
  .field--full { grid-column: 1; }
  .detail__grid,
  .modal__panel--wide .detail__grid { grid-template-columns: 1fr; }
  .dfield--full { grid-column: 1; }
  .dpair, .field--pair { grid-template-columns: 1fr; }
  /* Selecty filtra cez celú šírku – 2 v riadku */
  .toolbar .select, .toolbar .multi, .toolbar .cinnost, #filterMesto, #filterKraj { flex: 1 1 calc(50% - 5px); }
}

/* ---- Malý mobil: kompaktné rozostupy ---- */
@media (max-width: 520px) {
  .wrap { padding: 0 12px; }
  .content { padding: 70px 12px 0; }
  .topbar .topbar__meta { font-size: 11px; gap: 8px; }
  .user-chip { width: 100%; text-align: left; }
  .toolbar .select, .toolbar .multi, .toolbar .cinnost, #filterMesto, #filterKraj,
  .bulk, .daterange { flex: 1 1 100%; }
  .daterange { flex-wrap: wrap; }
  .hero { padding: 22px 18px; }
  .stat { padding: 14px 15px; }
  .stat__num { font-size: 26px; }
  /* Modály: menšie vnútorné okraje */
  .modal__head { padding: 18px 18px 12px; }
  .form, .detail { padding: 0 18px 20px; }
  .detail__actions, .form__actions, .launch__actions { padding-left: 18px; padding-right: 18px; }
  .btn { padding: 11px 18px; }
  /* Päta tabuľky: info nad stránkovaním */
  .table-foot { flex-direction: column; align-items: stretch; gap: 10px; }
  .pager-wrap { justify-content: space-between; }
  .pager { flex-wrap: wrap; }
  .toast { left: 16px; right: 16px; transform: none; max-width: none; text-align: center; animation: none; }
}

/* Picker leadu v projekte */
.leadpick { position: relative; }
.leadpick__search { width: 100%; }
.leadpick__results {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,.12); max-height: 280px; overflow: auto; padding: 4px;
}
.leadpick__opt {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--nadpis);
}
.leadpick__opt:hover { background: #fbf4e2; }
.leadpick__mesto { color: var(--grey, #777); }
.leadpick__none { padding: 10px; color: var(--grey, #777); font-size: 14px; }
.leadchip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fbf4e2; border: 1px solid #ecd9a8; border-radius: 999px; padding: 6px 8px 6px 14px;
}
.leadchip__jump { font-weight: 600; color: var(--nadpis); text-decoration: none; }
.leadchip__jump:hover { text-decoration: underline; }
.leadchip__clear { width: 24px; height: 24px; }

/* Našepkávač predmetu činnosti (filter) */
.cinnost { position: relative; display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
.cinnost__field { position: relative; flex: 0 1 240px; min-width: 160px; }
.cinnost__field .select { width: 100%; }
.cinnost__results {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,.12); max-height: 300px; overflow: auto; padding: 4px; min-width: 260px;
}
.cinnost__results[hidden] { display: none; }
.cinnost__opt {
  display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left;
  border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; cursor: pointer;
  font-size: 14px; color: var(--nadpis);
}
.cinnost__opt:hover, .cinnost__opt.is-active { background: #fbf4e2; }
.cinnost__opt .c { color: var(--grey, #777); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.cinnost__none { padding: 10px; color: var(--grey, #777); font-size: 14px; }
.cinnost__chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; }
.cinnost__chips[hidden] { display: none; }
.cinnost__chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 240px;
  background: #fbf4e2; border: 1px solid #ecd9a8; border-radius: 999px; padding: 3px 6px 3px 10px;
  font-size: 13px; color: var(--nadpis);
}
.cinnost__chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cinnost__chip button { border: 0; background: transparent; cursor: pointer; font-size: 13px; line-height: 1; color: var(--grey, #777); padding: 2px; }
.cinnost__chip button:hover { color: var(--nadpis); }

/* Triedenie zoznamu projektov — klikateľná hlavička */
.prow--head .th { cursor: pointer; user-select: none; display: inline-flex; align-items: center; gap: 2px; }
.prow--head .th:hover { color: var(--gold-deep); }
.prow--head .th__arr { font-size: 11px; opacity: .6; }

/* Prepínač témy v hornej lište — rovnaká výška ako tlačidlá vedľa. */
#tema-prepinac { display: flex; align-items: center; }
#tema-prepinac .luma-tema {
  background: var(--white);
  border-color: var(--line);
}
#tema-prepinac .luma-tema__btn { color: var(--grey); }
#tema-prepinac .luma-tema__btn:hover { color: var(--nadpis); background: var(--ivory-soft, var(--line)); }

/* Prepínač témy v hornej lište na užších obrazovkách — nerastie ako tlačidlá
   vedľa neho, drží si svoju šírku a ide ako prvý na riadku. */
@media (max-width: 900px) {
  #tema-prepinac { flex: 0 0 auto; order: -1; }
}
@media (max-width: 600px) {
  #tema-prepinac .luma-tema__btn { width: 34px; height: 30px; font-size: 14px; }
}
