/* ===== Paleta =====
   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 {
  --ivory: var(--luma-paper);
  --ivory-soft: var(--luma-plocha-2);
  --gold: var(--luma-gold);
  --gold-deep: var(--luma-gold-dark);
  --glow-1: var(--luma-gold-light);
  --glow-2: var(--luma-gold);
  --night: var(--luma-ink);
  --night-2: var(--luma-ink-2);
  --whisper: #e4dfd4;
  --grey: var(--luma-text-tlmeny);
  --ink: var(--luma-text);
  /* Nadpisy a čísla — v tmavej téme sa zosvetlia, --night je podklad. */
  --nadpis: var(--luma-nadpis);
  --odkaz: var(--luma-odkaz);
  --line: var(--luma-linka);
  --white: var(--luma-white);
  --crit: var(--luma-chyba);
  --high: #d97a3a;
  --med: var(--luma-gold);
  --low: var(--luma-ok);
  --shadow: var(--luma-tien);
  --radius: var(--luma-radius);
  /* 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);
  display: flex;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--grey); font-size: 14px; }

/* ===== Sidebar ===== */
.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--night);
  color: var(--na-tmavom);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
/* Značka v sidebari — SVG a text, nie obrázok (viď luma-znacka.js). */
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
/* ===== Značka ako obrázok =====
   Kresba (znacka/zostava-*.png) namiesto poskladaného glyfu s textom.
   Šírka je 100 % panela so stropom, aby sa zostava nerozťahovala do neúmerna
   a zároveň sa na úzkom paneli zmestila celá. */
.brand-odkaz { display: block; }
.brand-logo { display: block; width: 100%; max-width: 186px; height: auto; }
/* Prihlasovacia karta je svetlá a širšia — tam zostava unesie väčší rozmer. */
.brand-logo--prihlasenie { max-width: 220px; margin: 0 auto; }
/* Karta prihlásenia stojí na --ivory, ktoré sa s témou PREKLÁPA (v svetlej je
   krémová, v tmavej takmer čierna). Vykreslia sa preto obe zostavy a CSS ukáže
   tú, ktorej nápis na danom podklade vidno — so svetlým variantom natvrdo by
   „LUMA" v tmavej téme splynulo s pozadím. Bočný panel je tmavý vždy. */
.brand-logo--tmava { display: none; }
:root[data-tema="tmava"] .brand-logo--svetla { display: none; }
:root[data-tema="tmava"] .brand-logo--tmava { display: block; }
@media (prefers-color-scheme: dark) {
  :root[data-tema="auto"] .brand-logo--svetla { display: none; }
  :root[data-tema="auto"] .brand-logo--tmava { display: block; }
}


.brand .luma-znacka:hover .luma-znacka__creative { color: var(--luma-white); }
.brand-sub {
  display: block;
  font-size: 12px; letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 2px;
  padding-left: 2px;
}
.nav { margin-top: 40px; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  background: transparent; border: none; color: #cfcbc0;
  text-align: left; padding: 12px 14px; border-radius: 10px;
  font-size: 15px; display: flex; align-items: center; gap: 12px;
  transition: all 0.15s;
}
.nav-item .ic { font-size: 16px; opacity: 0.8; }
.nav-item:hover { background: var(--night-2); color: var(--na-tmavom); }
.nav-item.active {
  background: linear-gradient(100deg, rgba(245,196,94,0.18), rgba(245,196,94,0.05));
  color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(245,196,94,0.25);
}
.sidebar-foot { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--night-2); }
.tagline {
  font-family: "Fraunces", serif; font-style: italic;
  font-size: 17px; line-height: 1.4; color: var(--na-tmavom);
  opacity: 0.85; margin-bottom: 14px;
}
.sig { font-size: 11px; letter-spacing: 1px; color: var(--grey); text-transform: uppercase; }
.app-ver { display: block; margin-top: 6px; font-size: 11px; letter-spacing: 1px; color: var(--gold); opacity: .75; }

/* ===== Content ===== */
.content { flex: 1; padding: 30px 40px 60px; max-width: 1200px; }
.topbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 30px;
}
.topbar h1 {
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: 34px; color: var(--nadpis); letter-spacing: -0.5px;
}
.topbar-actions { display: flex; gap: 10px; }

/* ===== Buttons ===== */
.btn {
  border: none; border-radius: 10px; padding: 11px 18px;
  font-size: 14px; font-weight: 600; transition: all 0.15s;
}
.btn-gold {
  background: linear-gradient(120deg, var(--glow-2), var(--gold-deep));
  color: var(--nadpis);
  box-shadow: 0 6px 18px -6px rgba(224, 169, 63, 0.7);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(224,169,63,0.8); }
.btn-ghost { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: var(--ivory-soft); }
.btn-dark { background: var(--night); color: var(--na-tmavom); }
.btn-dark:hover { background: var(--night-2); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-danger { background: transparent; color: var(--crit); box-shadow: inset 0 0 0 1px rgba(217,83,79,0.3); }
.btn-danger:hover { background: rgba(217,83,79,0.08); }

/* ===== Cards / Stats ===== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat {
  background: var(--white); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,196,94,0.25), transparent 70%);
}
.stat .num { font-family: "Fraunces", serif; font-size: 40px; font-weight: 600; color: var(--nadpis); line-height: 1; }
.stat .lbl { font-size: 13px; color: var(--grey); margin-top: 8px; text-transform: uppercase; letter-spacing: 1px; }
.stat.accent { background: linear-gradient(130deg, var(--luma-akcent-1), var(--luma-akcent-2)); }
/* Klikacia dlaždica — prepne na zoznam s príslušným filtrom. */
.stat--link { cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.stat--link:hover { transform: translateY(-3px); box-shadow: 0 18px 44px -16px rgba(40, 35, 20, 0.45); }
.stat--link:active { transform: translateY(-1px); }

.panel {
  background: var(--white); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); margin-bottom: 20px;
}
.panel h2 {
  font-family: "Fraunces", serif; font-size: 20px; font-weight: 600;
  color: var(--nadpis); margin-bottom: 4px;
}
.panel .eyebrow { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; }
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* bars */
.bar-row { display: flex; align-items: center; gap: 12px; margin: 12px 0; font-size: 14px; }
.bar-row .bname { width: 110px; flex-shrink: 0; color: var(--ink); }
.bar-track { flex: 1; height: 10px; background: var(--ivory-soft); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--glow-1), var(--gold)); }
.bar-row .bval { width: 28px; text-align: right; font-weight: 600; color: var(--nadpis); }

/* ===== Projects ===== */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.proj-card {
  background: var(--white); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); cursor: pointer; transition: all 0.18s;
  border-top: 3px solid var(--gold);
}
.proj-card:hover { transform: translateY(-3px); }
.proj-card h3 { font-family: "Fraunces", serif; font-size: 19px; color: var(--nadpis); margin-bottom: 6px; white-space: nowrap; }
.proj-card p { font-size: 14px; color: var(--grey); min-height: 38px; }
.proj-url { display: inline-block; max-width: 100%; margin-bottom: 8px; font-size: 13px; color: var(--odkaz); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-url:hover { text-decoration: underline; }
.proj-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.proj-status-badge { flex-shrink: 0; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 12px; letter-spacing: .02em; }
.proj-status-sel { flex-shrink: 0; font: inherit; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); cursor: pointer; }
.proj-status-badge[data-status="Development"], .proj-status-sel[data-status="Development"] { background: #e7f0fb; color: var(--odkaz); }
.proj-status-badge[data-status="Príprava na prod"], .proj-status-sel[data-status="Príprava na prod"] { background: #ede9fb; color: #6b46c1; }
.proj-status-badge[data-status="Test"], .proj-status-sel[data-status="Test"] { background: #fdf3e0; color: #b7791f; }
.proj-status-badge[data-status="Production"], .proj-status-sel[data-status="Production"] { background: #e3f1ea; color: #2f855a; }
.proj-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }
.proj-meta b { color: var(--nadpis); }
.proj-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.proj-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-start; }
.proj-actions .btn-sm { padding: 6px 9px; font-size: 12px; white-space: nowrap; }

/* ===== Bug list ===== */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.filters select, .filters input {
  font-family: inherit; font-size: 14px; padding: 9px 12px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
}

/* Hľadanie stojí nad filtrami vo vlastnom riadku — je to iný druh ovládania
   (voľný text naprieč všetkým) než rozbaľovacie zoznamy pod ním. */
.search-row {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 11px;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.search-row:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(217, 161, 59, 0.14);
}
.search-ic { font-size: 18px; color: var(--grey); line-height: 1; }
.filters .search-input {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  border: none;
  background: transparent;
  font-size: 14.5px;
}
.filters .search-input:focus { outline: none; }
/* Krížik prehliadača by bol druhý vedľa nášho — nechávame len vlastný. */
.filters .search-input::-webkit-search-cancel-button { display: none; }
.search-clear {
  border: none;
  background: transparent;
  color: var(--grey);
  font-size: 20px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 6px;
}
.search-clear:hover { background: var(--ivory-soft); color: var(--ink); }
.bug-list { display: flex; flex-direction: column; gap: 10px; }
.bug-row {
  background: var(--white); border-radius: 12px; padding: 16px 18px;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px;
  cursor: pointer; transition: all 0.15s; border-left: 4px solid var(--line);
}
.bug-row:hover { transform: translateX(2px); }
.bug-row.sev-Kritická { border-left-color: var(--crit); }
.bug-row.sev-Vysoká { border-left-color: var(--high); }
.bug-row.sev-Stredná { border-left-color: var(--med); }
.bug-row.sev-Nízka { border-left-color: var(--low); }
.bug-main { flex: 1; min-width: 0; }
.bug-title { font-weight: 600; color: var(--nadpis); font-size: 15px; }
.bug-sub { font-size: 13px; color: var(--grey); margin-top: 3px; }

/* náklady */
.cost-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.cost-sum { font-size: 15px; color: var(--nadpis); }
.cost-sum b { font-size: 18px; }
.cost-list { display: flex; flex-direction: column; gap: 10px; }
.cost-row { background: var(--white); border-radius: 12px; padding: 14px 18px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px; }
.cost-main { flex: 1; min-width: 0; }
.cost-val { font-weight: 700; color: var(--nadpis); font-size: 16px; }
.cost-sub { font-size: 13px; color: var(--grey); margin-top: 3px; }
.cost-type { font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 12px; background: #efeae1; color: #6b5d3e; flex-shrink: 0; min-width: 96px; text-align: center; }

/* badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 20px;
  white-space: nowrap;
}
.badge-status { background: var(--ivory-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.st-Nová { background: #eef1f5; color: #4a5568; }
.st-Otvorená { background: #fdeedd; color: #b9621a; }
.st-Vriešení, .st-V.riešení { }
.badge[data-st="V riešení"] { background: #e7f0fb; color: var(--odkaz); }
.badge[data-st="Na overenie"] { background: #f3e8fd; color: #7c3aed; }
.badge[data-st="Vyriešená"] { background: #e3f5ea; color: #2f855a; }
.badge[data-st="Zatvorená"] { background: #ecebe8; color: #6b6760; }
.badge[data-st="Znovuotvorená"] { background: #fde6e6; color: #c53030; }
.badge[data-st="Nová"] { background: #eef1f5; color: #4a5568; }
.badge[data-st="Otvorená"] { background: #fdeedd; color: #b9621a; }
.sev { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; }
.sev[data-sev="Kritická"] { background: #fae3e2; color: var(--crit); }
.sev[data-sev="Vysoká"] { background: #fceada; color: var(--high); }
.sev[data-sev="Stredná"] { background: #f8f0d8; color: #a07a18; }
.sev[data-sev="Nízka"] { background: #e3f1ea; color: var(--low); }
.prio { font-size: 12px; font-weight: 700; color: var(--grey); }
.env-badge { background: var(--night); color: var(--gold); }

/* ===== Audit používateľov (modal) ===== */
/* Tabuľka auditu potrebuje viac miesta ako bežný formulárový modal. */
/* Audit — filtre a obsah v bielej karte, rovnako ako v iLead. */
.audit-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px 20px;
}
.audit__filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 0 0 14px; border-bottom: 1px solid var(--line);
}
.audit__filters input[type="search"], .audit__filters select {
  height: 34px; padding: 0 10px; font-family: inherit; font-size: 13px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--ink);
}
.audit__filters input[type="search"] { flex: 1 1 200px; min-width: 0; padding: 0 12px; }
.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: 9px; background: var(--white); color: var(--ink);
}
.audit__note { margin-top: 12px; font-size: 12.5px; color: var(--grey); line-height: 1.5; }
.audit__note code { background: var(--ivory-soft); 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-soft); }
.audit__ts { white-space: nowrap; color: var(--grey); font-variant-numeric: tabular-nums; }
.audit-act { display: inline-block; padding: 2px 9px; border-radius: 3px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.audit-act--create { background: #e3f1ea; color: #2f855a; }
.audit-act--update { background: #f8f0d8; color: #a07a18; }
.audit-act--delete { background: #fae3e2; color: var(--crit); }
.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; }

/* Stránkovanie */
.pager { display: flex; align-items: center; gap: 6px; }
.pager__btn {
  min-width: 30px; height: 30px; padding: 0 8px; font-family: inherit; font-size: 13px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--ink); cursor: pointer;
}
.pager__btn:hover:not(:disabled):not(.is-active) { border-color: var(--gold); background: var(--ivory-soft); }
.pager__btn:disabled { opacity: 0.35; cursor: not-allowed; }
.pager__btn.is-active { border-color: var(--gold-deep); background: var(--gold); color: var(--nadpis); font-weight: 700; }
.pager__gap { padding: 0 2px; color: var(--grey); }

/* Prázdny stav a načítavanie sú spoločné pre celú rodinu (luma-identita.css).
   Tu zostáva len to, čo appka používa na vlastných miestach. */
.loading { display: flex; align-items: center; gap: 14px; padding: 18px 4px; }
/* Počet v nadpise („Riešenia (12)") — tichší než samotný nadpis, aby ho
   dopĺňal, nie prekrikoval. */
.view-count {
  margin-left: 10px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.62em;
  font-weight: 500;
  color: var(--grey);
  vertical-align: middle;
}

.empty { text-align: center; padding: 60px 20px; color: var(--grey); }
.empty .big { font-family: "Fraunces", serif; font-size: 22px; color: var(--nadpis); margin-bottom: 6px; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(26, 26, 31, 0.55);
  backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center;
  padding: 50px 20px; z-index: 50; overflow-y: auto;
}
.modal {
  background: var(--ivory); border-radius: 20px; width: 100%; max-width: 800px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.5); overflow: hidden;
  animation: pop 0.18s ease;
}
@keyframes pop { from { transform: translateY(10px) scale(0.98); opacity: 0; } }
.modal-head {
  background: var(--night); color: var(--na-tmavom); padding: 22px 26px;
  display: flex; justify-content: space-between; align-items: flex-start;
}
.modal-head h2 { font-family: "Fraunces", serif; font-weight: 600; font-size: 22px; }
.modal-head .eyebrow { color: var(--gold); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
.modal-close { background: none; border: none; color: var(--na-tmavom); font-size: 26px; line-height: 1; opacity: 0.7; }
.modal-close:hover { opacity: 1; }
.modal-body { padding: 26px; }
.modal-foot { padding: 18px 26px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); }

/* ===== Potvrdzovací dialóg (Luma dizajn) ===== */
.confirm-overlay {
  position: fixed; inset: 0; background: rgba(26, 26, 31, 0.55);
  backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center;
  padding: 24px; z-index: 70; opacity: 0; transition: opacity 0.15s ease;
}
.confirm-overlay.show { opacity: 1; }
.confirm-card {
  background: var(--ivory); border-radius: 18px; width: 100%; max-width: 420px;
  padding: 28px; box-shadow: 0 30px 80px -20px rgba(0,0,0,0.55);
  transform: translateY(8px) scale(0.98); transition: transform 0.15s ease;
}
.confirm-overlay.show .confirm-card { transform: none; }
.confirm-card .eyebrow { color: var(--gold-deep); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; }
.confirm-title { font-family: "Fraunces", serif; font-weight: 600; font-size: 22px; color: var(--nadpis); margin: 6px 0 10px; }
.confirm-msg { font-size: 14px; color: var(--grey); line-height: 1.5; }
.confirm-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; font-family: inherit; font-size: 14px; padding: 11px 13px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--white); color: var(--ink);
}
.field textarea { resize: vertical; min-height: 78px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,196,94,0.2);
}
.field-row { display: flex; gap: 14px; }
.field-row .field { flex: 1; }

/* bug detail */
.detail-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.detail-created { font-size: 13px; color: var(--grey); margin-bottom: 18px; }
.detail-created b { color: var(--nadpis); font-weight: 600; }
.detail-sec { margin-bottom: 18px; }
.detail-sec h4 { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 6px; }
.detail-sec p { font-size: 14px; color: var(--ink); white-space: pre-wrap; line-height: 1.5; }
.detail-edit {
  width: 100%; font-family: inherit; font-size: 14px; line-height: 1.5; padding: 11px 13px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--white); color: var(--ink);
  resize: vertical; min-height: 70px;
}
.detail-edit:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,196,94,0.2); }

/* lifecycle timeline */
.timeline { border-left: 2px solid var(--whisper); margin-left: 8px; padding-left: 18px; }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before {
  content: ""; position: absolute; left: -25px; top: 3px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 3px var(--ivory);
}
.tl-item .tl-status { font-weight: 600; color: var(--nadpis); font-size: 14px; }
.tl-item .tl-note { font-size: 13px; color: var(--grey); }
.tl-item .tl-time { font-size: 12px; color: var(--grey); }

/* transition control */
.transition-box {
  background: linear-gradient(130deg, var(--luma-akcent-1), var(--luma-akcent-2)); border-radius: 12px;
  padding: 16px; margin-bottom: 18px;
}
.transition-box label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--gold-deep); }
.transition-row { display: flex; gap: 10px; margin-top: 10px; }
.transition-row select { flex: 1; }
.transition-row input { flex: 2; }

/* toast */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 80; }
.toast {
  background: var(--night); color: var(--na-tmavom); padding: 14px 18px; border-radius: 12px;
  box-shadow: var(--shadow); font-size: 14px; border-left: 3px solid var(--gold);
  animation: slide 0.2s ease;
}
.toast.err { border-left-color: var(--crit); }
@keyframes slide { from { transform: translateX(20px); opacity: 0; } }

/* ===== Lišta používateľa ===== */
/* Prepínač appiek sedí nad lištou používateľa a odtláča ich obe k spodku sidebaru. */
#app-switcher { margin-top: auto; padding-bottom: 10px; }
#user-bar { padding-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: var(--night-2); margin-bottom: 4px; }
.avatar {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  background: linear-gradient(135deg, var(--glow-1), var(--gold-deep));
  color: var(--nadpis); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.user-info { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.user-info b {
  color: var(--na-tmavom); font-size: 14px;
  /* E-mail ako meno je dlhší než panel — bez orezania text pretečie
     za pravý okraj panela do obsahu. Celé meno ostáva v `title`. */
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-info span { color: var(--gold); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.user-btn {
  background: transparent; border: none; color: #cfcbc0; text-align: left;
  padding: 9px 12px; border-radius: 9px; font-size: 13px;
}
.user-btn:hover { background: var(--night-2); color: var(--na-tmavom); }

/* správa používateľov — tabuľka rovnako ako v iProject a iLead */
.user-tab { width: 100%; border-collapse: collapse; font-size: 14px; }
.user-tab th, .user-tab td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.user-tab th { color: var(--grey); font-weight: 600; font-size: 13px; white-space: nowrap; }
.user-tab tbody tr:hover { background: var(--ivory-soft); }
.user-tab .btn-sm { padding: 5px 10px; font-size: 12px; }
.users-sub { margin: 22px 0 12px; font-size: 15px; color: var(--nadpis); font-family: "Fraunces", serif; font-weight: 600; }

.user-list { display: flex; flex-direction: column; gap: 8px; }
.user-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--white); border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.user-main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.user-main b { color: var(--nadpis); font-size: 14px; }
.role-tag { font-size: 11px; padding: 1px 8px; border-radius: 12px; width: fit-content; font-weight: 600; }
.role-tag.admin { background: #fceada; color: var(--high); }
.role-tag.tester { background: #e3f1ea; color: var(--low); }
.role-tag.riesitel { background: #e7f0fb; color: var(--odkaz); }
.utype-tag { font-size: 11px; padding: 1px 8px; border-radius: 12px; font-weight: 600; background: #efeae1; color: #6b5d3e; }

.member-list { display: flex; flex-direction: column; gap: 8px; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--white); border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.member-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--gold, #c89b3c); cursor: pointer; }

.type-chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 9px; border-radius: 12px; letter-spacing: .02em; }
.type-chip[data-type="Chyba"] { background: #fdecec; color: #c0392b; }
.type-chip[data-type="Zmena"] { background: #e7f0fb; color: var(--odkaz); }
/* Riešiteľ hneď za typom riešenia — nech je vidno na prvý pohľad, komu patrí. */
.assignee-chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 9px; border-radius: 12px; background: var(--ivory-soft); color: var(--ink); }
.vis-chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 9px; border-radius: 12px; letter-spacing: .02em; }
.vis-chip[data-vis="Interný"] { background: #ece9f5; color: #5b4b8a; }
.vis-chip[data-vis="Externý"] { background: #fdf0e6; color: #b9591f; }
.vis-chip-edit { border: none; cursor: pointer; font-family: inherit; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); transition: filter .15s; }
.vis-chip-edit:hover { filter: brightness(0.95); }
.seq-num { font-variant-numeric: tabular-nums; color: var(--gold-deep); font-weight: 600; opacity: .85; margin-right: 2px; }
.dur-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.dur-input { width: 150px; font-family: inherit; font-size: 14px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); color: var(--ink); }
.dur-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,196,94,0.2); }
.dur-del { width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px; border: 1px solid var(--line); background: var(--white); color: var(--high); cursor: pointer; font-size: 17px; line-height: 1; }
.dur-del:hover { background: #fdecec; }
.dur-total { font-size: 13px; color: var(--grey); font-weight: 600; }

/* prílohy */
.attach-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.attach-thumb { position: relative; width: 92px; height: 92px; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.attach-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; background: var(--ivory-soft); }
.attach-del {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
  border: none; background: rgba(26,26,31,0.75); color: #fff; font-size: 16px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.attach-del:hover { background: var(--crit); }
.attach-add {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 9px 14px; border-radius: 9px; font-size: 13px; font-weight: 600;
  color: var(--gold-deep); background: var(--ivory-soft); box-shadow: inset 0 0 0 1px var(--line);
}
.attach-add:hover { background: #f6eccd; }

/* ===== Login — dva panely: vľavo formulár, vpravo vizuál =====
   Rovnaké usporiadanie ako na ostatných platformách LUMA (iProject).
   Vizuál je čistá dekorácia, tak pri úzkom okne zmizne úplne. */
body.login-mode { background: var(--ivory); }
.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__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-family: "Fraunces", serif;
  font-size: 24px; line-height: 1.2; color: var(--nadpis);
  font-weight: 400;
}
.login__title b { font-weight: 600; }
.login__verzia {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 11px; font-weight: 600; color: var(--gold-deep);
  vertical-align: super; margin-left: 2px; letter-spacing: 0.02em;
}
.login__card {
  width: min(400px, 100%);
  background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 24px 60px -34px rgba(40, 35, 20, 0.45);
  padding: 30px 30px 28px;
  display: flex; flex-direction: column; align-items: stretch;
}
/* Veta o tom, kade sa dnu chodí. Na vstupnej obrazovke je to jediný text, tak
   nesie väčší riadok ako bežný odsek — má sa prečítať, nie preletieť. */
.login__vstup {
  font-size: 14.5px; line-height: 1.6; color: var(--grey);
  text-align: left; margin-bottom: 18px;
}
.login__vstup b { color: var(--ink); font-weight: 600; }
.login__error {
  min-height: 18px; margin-bottom: 12px;
  font-size: 13px; font-weight: 600; color: var(--crit); text-align: left;
}
.login__error:empty { margin-bottom: 4px; }
.login__btn { width: 100%; justify-content: center; }
/* Vstup je odkaz do iLumy, nie tlačidlo formulára. `<a>` treba dorovnať na tvar
   tlačidla — inak zostane inline, podčiarknutý a `width: 100%` naň neplatí. */
a.login__btn { display: block; text-align: center; text-decoration: none; }
/* Honeypot — pre človeka neviditeľné, pre čítačku skryté, pre bota lákavé.
   Zostáva kvôli prihláseniu iLumy, ktoré si formulár kreslí samo (iluma.js). */
.hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

.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(26, 26, 31, 0.78) 0%, rgba(26, 26, 31, 0.28) 34%, transparent 62%);
}
.login__vizualtext { position: absolute; left: 46px; right: 46px; bottom: 52px; z-index: 1; }
.login__vizualtext h2 {
  font-family: "Fraunces", serif; font-weight: 600;
  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);
}

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

/* ============================================================
   RESPONZÍVNY DIZAJN
   • Desktop / MacBook Air  (≥ 1025px) — pevný bočný panel
   • Tablet                 (≤ 1024px) — vysúvacie menu (hamburger)
   • Mobil                  (≤ 600px)  — jeden stĺpec, plnošírkové CTA
   ============================================================ */

/* Mobilná horná lišta + hamburger + backdrop — skryté na desktope */
.mobile-header { display: none; }
.hamburger { display: none; }
.nav-backdrop { display: none; }
body.login-mode .mobile-header, body.login-mode .nav-backdrop { display: none !important; }

/* ---------- Tablet a menšie (≤ 1024px) ---------- */
@media (max-width: 1024px) {
  /* Na mobilnej lište sa značka riadi výškou, nie šírkou lišty. */
  .mobile-brand .brand-logo { width: auto; height: 30px; }
  /* Sidebar ako vysúvací panel zľava */
  .sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; width: 260px; 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(26,26,31,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 logom a názvom (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; gap: 10px; }
  .mobile-brand .luma-znacka { font-size: 17px; }
  .mobile-brand .luma-znacka__tagline { display: none; }
  .mobile-brand .brand-sub { margin-top: 0; color: var(--gold); font-size: 11px; }

  /* Hamburger tlačidlo (vnútri lišty) */
  .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: 10px;
    background: var(--night-2);
  }
  .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 { max-width: none; padding: 24px 28px 48px; padding-top: 78px; }
  .topbar { flex-direction: column; gap: 14px; }
  .topbar h1 { font-size: 30px; }
  .topbar-actions { width: 100%; flex-wrap: wrap; }
  .panel-grid { grid-template-columns: 1fr; }
  .field-row { flex-wrap: wrap; }
}

/* ---------- Tablet portrait a menšie (≤ 900px) ---------- */
@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Mobil (≤ 600px) ---------- */
@media (max-width: 600px) {
  .content { padding: 18px 16px 40px; padding-top: 72px; }
  .topbar h1 { font-size: 26px; }

  /* Akčné tlačidlá cez celú šírku (rovnomerne) */
  .topbar-actions { gap: 8px; }
  .topbar-actions .btn { flex: 1 1 auto; text-align: center; }

  /* Štatistiky – menšie karty */
  .stat-grid { gap: 12px; }
  .stat { padding: 18px; }
  .stat .num { font-size: 32px; }

  /* Projekty na jeden stĺpec */
  .proj-grid { grid-template-columns: 1fr; }
  /* na úzkom mobile radšej zalomiť než pretiecť */
  .proj-foot, .proj-actions { flex-wrap: wrap; }

  /* Filtre cez celú šírku */
  .filters { gap: 8px; }
  .filters select, .filters input { flex: 1 1 100%; width: 100%; }
  /* Dlhý placeholder sa na telefón nezmestí — skráti ho JS cez data-kratky. */
  .search-row { padding: 0 12px; }
  .filters .search-input { padding: 11px 0; font-size: 16px; }
  .search-ic { font-size: 16px; }
  .audit__filters input[type="search"], .audit__filters select, .audit__date { flex: 1 1 100%; width: 100%; }
  .audit__date input { flex: 1 1 auto; min-width: 0; }
  .audit__foot { justify-content: center; }
  .pager { flex-wrap: wrap; justify-content: center; }

  /* Kompaktnejšie riadky */
  .bug-row, .cost-row { padding: 14px; gap: 12px; }

  /* Formuláre: dvojstĺpce a ovládače na seba */
  .field-row { flex-direction: column; gap: 0; }
  .transition-row { flex-direction: column; }
  .transition-row select, .transition-row input { flex: none; width: 100%; }

  /* Detail chyby: riadky s viacerými poľami nech sa zalomia */
  .modal-body [style*="flex"] { flex-wrap: wrap; }

  /* Modál na mobile */
  .modal-overlay { padding: 10px 8px; }
  .modal-head { padding: 18px; }
  .modal-body { padding: 20px 16px; }
  .modal-foot { padding: 14px 16px; flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 auto; }

  /* Toast cez celú šírku */
  .toast-wrap { left: 12px; right: 12px; bottom: 12px; }
  .toast { font-size: 13px; }

  /* Login panel na mobile s menším odsadením */
  .login__panel { padding: 28px 16px; }
  .login__card { padding: 26px 20px 24px; }
}

/* ---------- Veľmi úzke telefóny (≤ 380px) ---------- */
@media (max-width: 380px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* 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; }
}
