/* iSystem — systémové nastavenia rodiny LUMA.
 *
 * Kostra (bočný panel, hlavička stránky, karty, modály, prihlásenie, audit) je
 * prevzatá z iPrice, aby appky rodiny vyzerali ako jedna. Farby prichádzajú
 * z identity LUMA (luma-identita.css).
 *
 * Sekcie špecifické pre iSystem (karta nastavenia) sú na konci.
 */
/* ===== Základ, bočný panel, obsah, navigácia, pohľady ===== */
: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);
}

* { 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;
  display: flex;
  min-height: 100vh;
}

.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); }

/* --- Ľavý bočný panel --- */
.sidebar {
  width: 250px; flex-shrink: 0;
  background: var(--night);
  color: var(--ivory);
  padding: 26px 20px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}
/* Značka v sidebari — SVG a text, nie obrázok (viď luma-znacka.js). */
/* Značka LUMA Creative a pod ňou názov aplikácie — rovnaká zostava ako
   v iServers, nech sa appky rodiny hlásia jednotne. Značka je SVG a text
   (luma-znacka.js), nie obrázok, takže je vždy ostrá a berie farby z identity. */
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.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: 4px;
}
.nav { margin-top: 40px; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  font-family: inherit; font-size: 15px; font-weight: 500;
  color: rgba(250, 247, 242, 0.58);
  background: transparent; border: none; cursor: pointer; text-align: left;
  padding: 11px 14px; border-radius: 10px;
  display: flex; align-items: center; gap: 11px;
  transition: color 0.14s ease, background 0.14s ease;
}
.nav-item .ic { font-size: 15px; opacity: 0.85; }
.nav-item:hover { color: var(--ivory); background: rgba(255, 255, 255, 0.06); }
.nav-item.is-active {
  color: var(--gold);
  background: linear-gradient(100deg, rgba(245, 194, 107, 0.18), rgba(245, 194, 107, 0.05));
  box-shadow: inset 0 0 0 1px rgba(245, 194, 107, 0.25);
}

/* Päta panela — konto používateľa + akcie */
/* Prepínač appiek sedí nad lištou používateľa a odtláča ju k spodku sidebaru. */
#app-switcher { margin-top: auto; padding-bottom: 10px; }
.sidebar-foot {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
/* Konto — avatar s iniciálou, meno a rola pod ním (rovnako ako v iServers).
   Meno býva e-mail, ktorý je na šírku panela dlhý: preto sa oreže tromi
   bodkami. Celé je v `title`, takže sa dá prečítať prejdením myšou. */
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 12px;
  background: var(--luma-ink-2); margin-bottom: 12px;
}
.avatar {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  background: linear-gradient(135deg, var(--peach), var(--gold-deep));
  color: var(--luma-ink); font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.user-info { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.user-info b {
  color: var(--ivory); font-size: 13px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-info span {
  color: var(--gold); font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px;
}
.sidebar-actions { display: flex; flex-direction: column; align-items: stretch; gap: 7px; }
.sidebar-actions .logout-btn { width: 100%; text-align: left; }
/* Motto drží jeden riadok — zalomené uprostred vety vyzerá ako preklep.
   Písmo je preto o kúsok menšie, nech sa do šírky panela zmestí celé. */
.tagline {
  font-family: 'Fraunces', Georgia, serif; font-style: italic;
  font-size: 12.5px; line-height: 1.4; color: var(--ivory);
  white-space: nowrap;
  opacity: 0.85; margin: 18px 0 8px;
}
.sig { font-size: 10px; letter-spacing: 0.12em; color: var(--grey); text-transform: uppercase; }
/* Verzia aplikácie — decentne v päte panela (server ju dosadí z package.json) */
.app-ver {
  display: block; margin-top: 6px;
  font-size: 11px; letter-spacing: 1px;
  color: var(--gold); opacity: 0.75;
}

/* Mobilná horná lišta + hamburger + backdrop — na desktope skryté.
   Zobrazia sa až pod 1024 px, keď sa bočný panel mení na vysúvacie menu. */
.mobile-header { display: none; }
.hamburger { display: none; }
.nav-backdrop { display: none; }

/* --- Obsah vpravo od panela --- */
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content > main { flex: 1 0 auto; }

.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: 999px; 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 (statické podstránky) --- */
a.nav-item { text-decoration: none; }
.nav-item--live { color: var(--gold); }
/* 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; }

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


/* ===== Hero, štatistiky, toolbar, tlačidlá ===== */
/* --- Hero --- */
.hero {
  position: relative; overflow: hidden;
  background: var(--night); color: var(--white);
  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; }
/* Tlačidlá pod textom hera vedľa seba (Audit + Pridať projekt) */
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; align-self: flex-end; }
.hero__actions .hero__cta { align-self: auto; }

/* --- Š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: 999px; 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; }
/* Hero má tmavé pozadie — tam musí byť ghost tlačidlo svetlé, inak splynie. */
.hero .btn--ghost { border-color: rgba(255, 255, 255, 0.32); color: var(--white); }
.hero .btn--ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--gold); color: var(--gold); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #a8412f; }

/* ===== Karta so zoznamom ===== */
/* --- Tabuľka --- */
.table-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}

/* ===== Hlavička tabuľky a triedenie ===== */
.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; }

/* ===== Akcie v riadku, päta zoznamu, stránkovanie, prázdne stavy ===== */
.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: 9px; 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: 8px; 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: 54px 26px; text-align: center; color: var(--grey); }
/* Prázdny stav aj načítavanie sú spoločné pre celú rodinu (luma-identita.css). */
.loading { padding: 34px 20px; text-align: center; }
.loading__text { font-size: 13.5px; color: var(--grey); letter-spacing: 0.02em; }
.empty__title {
  font-family: 'Fraunces', Georgia, serif; font-size: 20px; font-weight: 500;
  color: var(--nadpis); margin-bottom: 6px;
}
.empty__lead { font-size: 14px; color: var(--grey); max-width: 420px; margin: 0 auto; }

/* ===== Modal a formulár ===== */
/* --- 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)); }
/* Stredná šírka pre detail modulu — popis aj formulár s cenou sa do úzkeho
   dialógu nezmestili a polia z neho pretekali. */
.modal__panel--md { width: min(680px, calc(100vw - 36px)); }
.modal__panel--md .form__grid { grid-template-columns: 1fr 1fr; }
.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; }
/* Dvojica polí na vlastnom riadku: široké + úzke (Predmet činnosti + Objednávka). */
.field--duo { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.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 (iba na čítanie) ===== */
/* --- 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 ===== */
.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; }

/* ===== Toast, pätička, prihlásenie ===== */
  display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px;
}
.confirm__text { padding: 0 26px 4px; color: #5c5f66; font-size: 14.5px; }
/* Akcie dialógu — vycentrované. Potvrdzovací dialóg je úzky a otázka v ňom
   stojí v strede, takže tlačidlá pri okraji by pôsobili odtrhnuto. */
.form__actions {
  display: flex; justify-content: center; gap: 10px; margin-top: 22px; flex-wrap: wrap;
}
.confirm__text { text-align: center; }
.confirm__text + .form__actions { padding: 0 26px 26px; }
/* Akcie v detaile (napr. Zmazať / Otvoriť v konfigurátore) ostávajú vpravo —
   detail je široký a v strede by tlačidlá plávali uprostred prázdna. */
.detail > .form__actions { justify-content: flex-end; }

/* --- Toast --- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--night); color: var(--white); 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; }
.login {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 70% -10%, rgba(245, 194, 107, 0.22), transparent 55%),
    var(--night);
}
.login__card {
  position: relative;
  width: min(420px, 100%);
  background: var(--ivory); border-radius: var(--radius);
  box-shadow: 0 40px 90px -30px rgba(14, 17, 22, 0.7);
  padding: 38px 34px 32px;
  display: flex; flex-direction: column; align-items: stretch;
  text-align: center;
  animation: pop 0.2s ease;
}
.login__znacka { display: flex; justify-content: center; margin-bottom: 18px; }
.login__title {
  font-size: 24px; color: var(--nadpis); line-height: 1.2; margin-bottom: 6px;
}
.login__lead { color: var(--grey); font-size: 14px; margin-bottom: 22px; }
.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; }


/* ===== Bočný panel ako vysúvacie menu na úzkych displejoch ===== */

/* ---- Bočný panel ako vysúvacie menu + toolbar na užších displejoch ---- */
@media (max-width: 1024px) {
  /* Panel sa vysúva 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); overflow-y: auto;
  }
  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; }

  /* Fixná horná lišta s hamburgerom a logom */
  .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;
    font-family: 'Fraunces', Georgia, serif; font-size: 20px; font-weight: 500;
    color: var(--nadpis); line-height: 1.1;
  }
  .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; 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); }

  /* Obsah sa posunie pod fixnú lištu */
  .content { padding-top: 58px; }

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


/* ===== Audit používateľov ===== */

/* --- Audit používateľov --- */
.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; }

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

/* Honeypot — pole musí byť pre človeka neviditeľné, ale pre robota "normálne".
   Preto NIE display:none (to niektoré boty preskočia), ale odsunutie mimo obraz. */
.hp {
  position: absolute; left: -9999px; top: -9999px;
  width: 1px; height: 1px; overflow: hidden;
  opacity: 0; pointer-events: none;
}

/* Audit používateľov — rovnaký vzhľad ako v iLead: filtre a obsah v bielej karte. */
.table-card--audit { padding: 18px 20px 20px; }
.audit__filters { padding: 4px 0 14px; border-bottom: 1px solid var(--line); }

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



/* ===== Karta nastavenia (iSystem) =====
   Celá appka je v podstate jeden formulár, preto nemá zoznamy ani tabuľky —
   len kartu s poliami a vysvetlivkami pod nimi. */
.karta {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 24px; max-width: 780px;
}
.karta__hlava {
  display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap;
  padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line);
}
.karta__pozn { font-size: 12.5px; color: var(--grey); line-height: 1.5; flex: 1 1 240px; }
.karta__nadpis {
  font-size: 15px; color: var(--nadpis); margin: 24px 0 10px;
  padding-top: 18px; border-top: 1px solid var(--line);
}
.karta__akcie { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 16px; }
.karta__stav { font-size: 12.5px; color: var(--grey); }
.karta__stav--ok { color: var(--success); font-weight: 600; }
.karta__stav--zle { color: var(--danger); font-weight: 600; }

.btn--sm { padding: 7px 14px; font-size: 12.5px; }

/* Vysvetlivka pod poľom — v tejto appke nesie väčšinu obsahu, preto nie je
   drobným písmom na okraji, ale čitateľným textom pod poľom. */
.hint { font-size: 12.5px; color: var(--grey); line-height: 1.55; margin: -6px 0 18px; }
.hint b { color: var(--ink); font-variant-numeric: tabular-nums; }
.hint code {
  font-size: 12px; padding: 1px 5px; border-radius: 4px;
  background: var(--ivory); border: 1px solid var(--line);
}

.field--inline { flex-direction: column; min-width: 240px; }
.field--check { flex-direction: row; align-items: center; gap: 10px; margin-bottom: 14px; }
.field--check input { width: 17px; height: 17px; accent-color: var(--gold-deep); cursor: pointer; }
.field--check span { font-size: 13.5px; color: var(--ink); }

.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form textarea {
  font-family: inherit; font-size: 13.5px; line-height: 1.55; resize: vertical;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); color: var(--ink); width: 100%;
}

/* Upozornenie na svetlom podklade — na rozdiel od iPrice tu nie je tmavý súhrn. */
.pozor {
  margin: 0 0 18px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--ivory);
}
.pozor--chyba { border-color: rgba(176, 74, 55, 0.35); background: rgba(176, 74, 55, 0.07); }
.pozor__nadpis {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--danger); margin-bottom: 6px;
}
.pozor__text { font-size: 12.5px; color: var(--ink); line-height: 1.55; }

.footer__ver { color: var(--grey); font-size: 12px; margin-left: 10px; }

@media (max-width: 720px) {
  .karta { padding: 18px 16px; }
  .form__grid { grid-template-columns: 1fr; }
}
