/* ===== LUMA Creative paleta — rovnaká ako iTask, nech appky vyzerajú ako rodina ===== */
:root {
  --ivory: var(--luma-paper);
  --ivory-soft: #efeae1;
  --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);
  --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);
}

* { 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(--ivory);
  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; }
.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: 44px; 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(--ivory); }
.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);
}
.nav-item .dot {
  margin-left: auto; width: 9px; height: 9px; border-radius: 50%;
  background: var(--grey); flex-shrink: 0;
}
.nav-item .dot[data-stav="ok"] { background: var(--low); }
.nav-item .dot[data-stav="nasadzuje"] { background: var(--gold); }
.nav-item .dot[data-stav="chyba"] { background: var(--crit); }
/* 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; }
.sidebar-foot { 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(--ivory);
  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; }

/* ===== Obsah ===== */
.content { flex: 1; padding: 30px 40px 60px; max-width: 1200px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 26px; }
.topbar h1 {
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: 34px; color: var(--night); letter-spacing: -0.5px;
}
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.auto {
  display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--grey);
  background: var(--white); border-radius: 10px; padding: 10px 14px;
  box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap;
}
.auto input { accent-color: var(--gold-deep); width: 15px; height: 15px; }
.last-sync { margin-top: 20px; font-size: 12.5px; }

/* ===== Tlačidlá ===== */
.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(--night); box-shadow: 0 6px 18px -6px rgba(224, 169, 63, 0.7);
}
.btn-gold:hover { transform: translateY(-1px); }
.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(--ivory); }
.btn-dark:hover { background: var(--night-2); }
.btn-sm { padding: 7px 12px; font-size: 13px; }

/* ===== Dlaždice ===== */
.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(--night); 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, #fff6e2, #faecc8); }
.stat.zle .num { color: var(--crit); }
/* Prebiehajúce nasadenie — zlaté číslo a pomalý dych, nech si ho oko všimne
   aj bez toho, aby človek na stránku pozeral. */
.stat.nasadza { box-shadow: var(--shadow), inset 0 0 0 1px rgba(245,196,94,0.55); }
.stat.nasadza .num { color: var(--gold); animation: puls 1.6s ease-in-out infinite; }

/* „Čo práve beží“ — zhrnutie posledného nasadenia nad históriou. Menšie a
   pokojnejšie než dlaždice hore: je to popis stavu, nie počítadlo. */
/* Zhora poriadny odstup: nad blokom stoja karty prebiehajúcich nasadení a ich
   tieň sa rozlieva dole — bez neho by doň eyebrow vlieval. */
.beh-panel { margin: 30px 0 22px; }
.beh-panel .eyebrow {
  display: block; color: var(--gold-deep);
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600;
}
.beh-panel h2 { font-family: "Fraunces", serif; font-size: 22px; font-weight: 600; margin: 4px 0 14px; }
.beh-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.beh-karta {
  background: var(--white); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: inset 0 0 0 1px var(--line);
}
.beh-lbl { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--grey); }
.beh-hod { font-family: "Fraunces", serif; font-size: 26px; font-weight: 600; color: var(--night); line-height: 1.2; margin-top: 6px; }
.beh-hod .mono { font-size: 22px; }
.beh-sub { font-size: 12.5px; color: var(--grey); margin-top: 6px; }
.beh-popis { font-size: 14px; color: var(--ink); margin-top: 14px; }

@media (max-width: 900px) { .beh-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .beh-grid { grid-template-columns: 1fr; } }

/* Záloha */
.zaloha-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .zaloha-form { grid-template-columns: 1fr; } }

/* Výpis behu — terminálovo, aby bolo vidieť, že je to surový výstup skriptu
   a nie prerozprávaný stav. */
.log-box {
  background: var(--night); color: #d8d5cc; border-radius: var(--radius);
  padding: 14px 16px; max-height: 420px; overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.55;
}
.log-riadok { white-space: pre-wrap; word-break: break-word; }
.log-riadok.zle { color: #ff9b95; }
.log-riadok.nadpis { color: var(--gold); font-weight: 600; margin-top: 6px; }

/* ===== Projekt ===== */
.projekt { margin-bottom: 34px; }
.projekt-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.projekt-head h2 { font-family: "Fraunces", serif; font-size: 24px; font-weight: 600; color: var(--night); }
/* Stav projektu a servera nesie farebná bodka (.luma-stav z identity). */
.projekt-head .luma-stav, .server-head .luma-stav { margin-right: 2px; }
/* Adresa webu ako bublina — nie holý odkaz v texte. */
.projekt-web {
  font-size: 13px; color: #2b6cb0; text-decoration: none;
  background: var(--white); border-radius: 999px; padding: 5px 14px;
  box-shadow: inset 0 0 0 1px var(--line); transition: all 0.15s;
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.projekt-web::before { content: "🔗 "; opacity: .7; }
.projekt-web:hover { background: var(--ivory-soft); box-shadow: inset 0 0 0 1px var(--gold); color: #1f4f80; }
.tag {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 12px;
}
.tag-hlavny { background: linear-gradient(120deg, var(--glow-1), var(--gold)); color: #6b4c05; }
.tag-odvodeny { background: var(--ivory-soft); color: #6b5d3e; box-shadow: inset 0 0 0 1px var(--line); }

/* ===== Zoznam prostredí ===== */
.env-list { display: flex; flex-direction: column; gap: 10px; }
.env-row {
  background: var(--white); border-radius: 14px; padding: 16px 20px;
  box-shadow: var(--shadow); border-left: 4px solid var(--whisper);
  display: flex; align-items: center; gap: 18px; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.env-row:hover { transform: translateX(2px); box-shadow: 0 18px 44px -16px rgba(40, 35, 20, 0.45); }
.env-row[data-stav="ok"] { border-left-color: var(--low); }
.env-row[data-stav="nasadzuje"] { border-left-color: var(--gold); }
.env-row[data-stav="chyba"] { border-left-color: var(--crit); }

.env-nazov { width: 128px; flex-shrink: 0; }
.env-nazov b { display: block; font-size: 15px; color: var(--night); }
.env-nazov span { font-size: 12px; color: var(--grey); }
.env-main { flex: 1; min-width: 0; }
.env-titul { font-weight: 600; color: var(--night); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.env-sub { font-size: 13px; color: var(--grey); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.env-sub b { color: var(--ink); font-weight: 600; }
.env-prava { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* stav prostredia */
.stav-badge {
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 20px; white-space: nowrap;
}
.stav-badge[data-stav="ok"] { background: #e3f1ea; color: #2f855a; }
.stav-badge[data-stav="nasadzuje"] { background: #fdf3e0; color: #b7791f; }
.stav-badge[data-stav="chyba"] { background: #fae3e2; color: var(--crit); }

/* služby: redis / mongo / cms */
.sluzby { display: flex; gap: 6px; }
.sluzba {
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 8px; background: #ecebe8; color: #6b6760;
}
.sluzba.ok { background: #e3f1ea; color: #2f855a; }
.sluzba.zle { background: #fae3e2; color: var(--crit); }

/* priebeh nasadenia */
.priebeh { margin-top: 10px; }
.priebeh-track { height: 8px; background: var(--ivory-soft); border-radius: 6px; overflow: hidden; }
.priebeh-fill {
  height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--glow-1), var(--gold));
  transition: width 0.6s ease;
}
.priebeh-txt { font-size: 12px; color: var(--gold-deep); font-weight: 600; margin-top: 5px; }
@keyframes puls { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.puls { animation: puls 1.1s ease-in-out infinite; }

/* ===== Stav serverov ===== */
.server-karta {
  background: var(--white); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); margin-bottom: 16px; border-top: 3px solid var(--whisper);
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
}
.server-karta:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -16px rgba(40, 35, 20, 0.45); }
.server-karta[data-stav="ok"] { border-top-color: var(--low); }
.server-karta[data-stav="varovanie"] { border-top-color: var(--gold); }
.server-karta[data-stav="chyba"] { border-top-color: var(--crit); }
.server-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.server-head h2 { font-family: "Fraunces", serif; font-size: 21px; font-weight: 600; color: var(--night); }
.server-prava { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.server-meta {
  display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--grey);
  margin: 16px 0 4px; padding-top: 14px; border-top: 1px solid var(--line);
}
.server-meta b { color: var(--night); }
.server-karta .detail-sec { margin-top: 18px; margin-bottom: 0; }

/* Stav servera jednou bodkou — zelená alebo červená, bez puzdra semaforu. */
.bodka { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.bodka.zelena { background: #5fb98a; box-shadow: 0 0 0 4px rgba(95,185,138,0.18); }
.bodka.cervena { background: #e2564f; box-shadow: 0 0 0 4px rgba(226,86,79,0.18); }

/* Bežiace aplikácie priamo na karte — jedna pod druhou, celý zoznam je v detaile.
   Ukazovateľ nasadenia ide vedľa bubliny, nie pod ňu: riadok tak ostane jeden. */
.app-riadky { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.app-riadok { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
/* Vľavo meno prostredia a pod ním ukazovateľ nasadenia, vpravo jeho komponenty. */
.app-lavy { flex: 0 0 330px; max-width: 100%; display: flex; flex-direction: column; gap: 7px; }
.app-priebeh { width: 100%; min-width: 0; }
.app-priebeh .priebeh-txt { margin-top: 4px; }
.app-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
/* Mriežka, nie voľný rad: názvy, prostredia a počty tak stoja pod sebou
   v stĺpcoch aj vtedy, keď niektorý údaj chýba (prázdna bunka miesto vynechania). */
.app-chip {
  flex: 0 0 auto; width: 100%; min-width: 0;
  display: grid; grid-template-columns: 14px minmax(0, 1fr) 92px 48px;
  align-items: center; gap: 10px;
  background: var(--ivory); border-radius: 999px; padding: 8px 16px;
  box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; color: var(--ink);
}
.app-chip b { color: var(--night); }
.app-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-chip .muted { font-size: 12px; font-variant-numeric: tabular-nums; }
.app-chip-env {
  font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700;
}
/* Z čoho sa prostredie skladá — dlaždice v jednom riadku za bublinou aplikácie.
   Keď sa nezmestia, riadok sa posúva do strany; nikdy sa nezalomí pod seba. */
.komponenty {
  flex: 1 1 0; min-width: 0; display: flex; gap: 6px; align-items: center;
  overflow-x: auto; padding-bottom: 2px;
}
/* V riadku sú dlaždice úsporné — nech sa vedľa seba zmestí aj 5 web nódov
   plus load balancer, CMS, databáza a Redis. V detaile ostávajú normálne veľké. */
.komponenty .komp { padding: 5px 10px; gap: 7px; }
.komponenty .komp-txt b { font-size: 11.5px; letter-spacing: -0.1px; }
.komponenty .komp .check-dot { width: 7px; height: 7px; }
.komponenty::-webkit-scrollbar { height: 5px; }
.komponenty::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.komp {
  display: flex; align-items: center; flex-wrap: wrap; gap: 9px; flex: 0 0 auto;
  background: var(--white); border-radius: 10px; padding: 8px 13px;
  box-shadow: inset 0 0 0 1px var(--line);
}
/* Ukazovateľ pod dlaždicou — kým sa nasadzuje, je pod každou. */
.komp-bar {
  flex: 1 1 100%; height: 4px; margin-top: 2px;
  background: var(--ivory-soft); border-radius: 3px; overflow: hidden;
}
.komp-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--glow-1), var(--gold)); transition: width 0.6s ease; }
/* V detaile idú tie isté dlaždice do mriežky — nie do posuvného riadku. */
.komp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 10px; }
.komp-grid .komp { flex: 1 1 auto; background: var(--white); }
.komp-txt { display: flex; flex-direction: column; line-height: 1.35; }
.komp-txt b { font-size: 13px; color: var(--night); white-space: nowrap; }
.komp-txt span { font-size: 11.5px; color: var(--grey); white-space: nowrap; }
.komp .check-dot { background: var(--low); }
/* Zelená keď odpovedá, červená keď nie. Replika, ktorá sa práve vymieňa, je
   žltá a pulzuje — nie je to porucha, len chvíľa medzi starým a novým. */
.komp[data-stav="nasadzuje"] .check-dot,
.komp[data-nasadza] .check-dot { background: var(--gold); animation: puls 1.1s ease-in-out infinite; }
.komp[data-stav="dole"] .check-dot { background: var(--crit); }
.komp[data-stav="dole"] { box-shadow: inset 0 0 0 1px rgba(217,83,79,0.35); background: #fdf1f0; }
.app-chip .check-dot { background: var(--crit); }
.app-chip[data-stav="ok"] .check-dot { background: var(--low); }
/* Na obrazovke Stav serverov bliká pri nasadení len bodka komponentu — bublina
   aplikácie aj bočné menu sú len prefarbené, nech sa oko nemá čoho chytať. */
.app-chip[data-stav="nasadzuje"] .check-dot { background: var(--gold); }
.app-chip[data-stav="chyba"] { box-shadow: inset 0 0 0 1px rgba(217,83,79,0.35); background: #fdf1f0; }

.check-list { display: flex; flex-direction: column; gap: 8px; }
.check-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: var(--ivory); border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px;
}
.check-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--crit); flex-shrink: 0; }
.check-row[data-ok="true"] .check-dot { background: var(--low); }
.check-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.check-main b { color: var(--night); }
.check-main .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Nadpis skupiny v bočnom menu */
.nav-sep {
  margin: 18px 0 6px; padding: 0 14px;
  font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--grey);
}

/* ===== Detail (modál) ===== */
.detail-sec { margin-bottom: 20px; }
.detail-sec h4 { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 7px 14px; font-size: 14px; }
.kv dt { color: var(--grey); }
.kv dd { color: var(--ink); word-break: break-word; }
.behy-tab { width: 100%; border-collapse: collapse; font-size: 13px; }
.behy-tab th, .behy-tab td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.behy-tab th { color: var(--grey); font-weight: 600; white-space: nowrap; }
.behy-tab tbody tr:hover { background: var(--ivory-soft); }
.tab-scroll { overflow-x: auto; }

/* Prázdny stav aj načítavanie sú spoločné pre celú rodinu (luma-identita.css). */
.loading { display: flex; align-items: center; gap: 14px; padding: 18px 4px; }
.empty { text-align: center; padding: 50px 20px; color: var(--grey); }
.empty .big { font-family: "Fraunces", serif; font-size: 22px; color: var(--night); margin-bottom: 6px; }

/* ===== Produkčné weby =====
   Weby klientov v ostrej prevádzke. Zámerne inak než karty serverov: o týchto
   vieme len to, či adresa odpovedá, takže dlaždica nesmie sľubovať viac. */
.weby-sekcia { margin-top: 34px; }
.weby-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.weby-head h2 {
  font-family: "Fraunces", serif; font-size: 21px; font-weight: 600; color: var(--night);
}
.weby-mriezka {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px;
}
.web-karta {
  display: flex; flex-direction: column; gap: 7px;
  padding: 18px 20px;
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--low);
  text-decoration: none; color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.web-karta:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -18px rgba(40, 35, 20, 0.4); }
.web-karta[data-ok="false"] { border-left-color: var(--crit); }
.web-hlava { display: flex; align-items: center; gap: 9px; font-size: 16px; }
.web-popis { font-size: 13px; line-height: 1.45; }
.web-pata {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; font-size: 12px; margin-top: 2px;
}

@media (max-width: 600px) {
  .weby-mriezka { grid-template-columns: 1fr; }
  .weby-sekcia { margin-top: 26px; }
}

/* ===== Modál ===== */
.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(--ivory); padding: 22px 26px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
}
.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(--ivory); 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 (nahrádza natívny confirm) ===== */
.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(--night); 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; }

/* ===== Formuláre ===== */
.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 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; }

/* ===== Lišta používateľa ===== */
#user-bar { margin-top: auto; 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(--night); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.user-info { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.user-info b { color: var(--ivory); font-size: 14px; }
.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(--ivory); }

/* správa používateľov — tabuľka rovnako ako v iTask */
.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(--night); font-family: "Fraunces", serif; font-weight: 600; }
.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.clen { background: #e3f1ea; color: var(--low); }
.utype-tag { font-size: 11px; padding: 1px 8px; border-radius: 12px; font-weight: 600; background: #efeae1; color: #6b5d3e; }

/* ===== Prihlásenie ===== */
body.login-mode { align-items: center; justify-content: center; background: var(--night); }
body.login-mode .mobile-header, body.login-mode .nav-backdrop { display: none !important; }
#login-screen {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 30%, #2a2a32, var(--night)); z-index: 90;
}
.login-card {
  background: var(--ivory); border-radius: 22px; padding: 40px 36px; width: 360px;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,0.7); text-align: center;
}
.login-brand { margin-bottom: 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
/* Prihlasovacia karta je svetlá, takže značka ide do tmavej varianty wordmarku. */
.login-brand .luma-znacka__luma { color: var(--luma-ink); }
.login-brand .luma-znacka__creative { color: var(--luma-gold-dark); }
.login-brand .brand-sub { color: var(--gold-deep); }
.login-tag { font-family: "Fraunces", serif; font-style: italic; color: var(--grey); margin: 8px 0 26px; }
.login-card .field { text-align: left; }
.login-err { color: var(--crit); font-size: 13px; margin-top: 12px; min-height: 18px; }

/* ===== Toasty ===== */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 80; }
.toast {
  background: var(--night); color: var(--ivory); 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; } }

/* ============================================================
   RESPONZÍVNY DIZAJN — rovnaké body zlomu ako iTask
   ============================================================ */
.mobile-header { display: none; }
.hamburger { display: none; }
.nav-backdrop { display: none; }

@media (max-width: 1024px) {
  .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; }

  .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: 8px; }
  .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 {
    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; }

  /* Na tablete je menej šírky: bublina aplikácie sa zúži a dlaždice komponentov
     sa posúvajú prstom do strany (riadok ostáva jeden). */
  .app-lavy { flex: 0 0 280px; }
  .app-chip { width: 100%; grid-template-columns: 14px minmax(0, 1fr) 84px 44px; }
  .komponenty { -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .server-karta { padding: 20px; }
}

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  /* Riadok prostredia sa na užšom displeji rozloží pod seba — inak by sa
     commit a popis stlačili do nečitateľného prúžku. */
  .env-row { flex-wrap: wrap; gap: 12px; }
  .env-nazov { width: auto; }
  .env-main { flex: 1 1 100%; order: 3; }
  .env-prava { margin-left: auto; }

  /* Bublina aplikácie cez celú šírku, dlaždice pod ňou vo vlastnom riadku —
     vedľa seba by na túto šírku ostal na obe len prúžok. */
  .app-riadok { flex-direction: column; align-items: stretch; gap: 8px; }
  .app-lavy { flex: 1 1 auto; width: 100%; }
  .app-chip { width: 100%; }
  .komponenty { width: 100%; flex: 0 0 auto; }
  .app-priebeh { min-width: 0; width: 100%; }
  .server-head { gap: 12px; }
  .server-prava { margin-left: 0; width: 100%; justify-content: space-between; }
}

@media (max-width: 600px) {
  .content { padding: 18px 16px 40px; padding-top: 72px; }
  .topbar h1 { font-size: 26px; }
  .topbar-actions { gap: 8px; }
  .topbar-actions .btn, .topbar-actions .auto { flex: 1 1 auto; justify-content: center; text-align: center; }
  .stat-grid { gap: 12px; }
  .stat { padding: 18px; }
  .stat .num { font-size: 32px; }
  .projekt-head h2 { font-size: 21px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .modal-overlay { padding: 10px 8px; }
  .modal-head { padding: 18px; }
  .modal-body { padding: 20px 16px; }
  .modal-foot { padding: 14px 16px; flex-wrap: wrap; }
  .toast-wrap { left: 12px; right: 12px; bottom: 12px; }
  .toast { font-size: 13px; }
  .field-row { flex-direction: column; gap: 0; }
  .login-card { width: min(360px, 92vw); padding: 32px 24px; }

  /* Karta servera na mobile */
  .server-karta { padding: 16px; border-radius: 14px; }
  .server-head h2 { font-size: 18px; }
  .server-meta { gap: 6px 14px; font-size: 12.5px; margin: 12px 0 2px; }

  /* Bublina aplikácie: mriežka by na 360 px stlačila názvy — radšej voľné
     zalomenie, nech je čitateľné meno projektu aj prostredie. */
  .app-chip {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
    border-radius: 14px; padding: 10px 14px;
  }
  .app-chip > span:empty { display: none; }
  .komponenty { gap: 6px; }
  .komponenty .komp { padding: 6px 10px; }

  /* Dlaždice v detaile pod seba */
  .komp-grid { grid-template-columns: 1fr; }
  .check-row { flex-wrap: wrap; row-gap: 4px; }
  .check-row .check-main { flex: 1 1 100%; order: 2; }
  .projekt-head { gap: 10px; }
}

@media (max-width: 380px) {
  .stat-grid { grid-template-columns: 1fr; }
}
