/* ================================================================
   VPP PORTAL — Skupni stili (Shared CSS for all pages)
   Temni način (dark mode) — antracitna tema (anthracite theme)
   Standard: standard/grafika.md (G1–G9)
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #0f1117;
  color: #dce3f0;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

[hidden] { display: none !important; }

/* ================================================================
   GLAVA APLIKACIJE (Application header) — orodna vrstica (G5)
   Brand | Nav | Semafor (središče) | uporabnik + Izpis
   ================================================================ */
.app-header {
  background: #090d14;
  color: white;
  display: grid;
  /* Levo (brand+nav) | središče (semafor) | desno (user+izpis) — G5/G6 */
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  padding: 0 14px;
  height: 52px;
  border-bottom: 1px solid #1e2740;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

.app-header .brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: nowrap;
  color: #93c5fd;
}

/* Levo: brand + navigacija */
.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  justify-self: start;
}

/* Središče: samo semafor */
.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
}

/* Desno: kratek uporabnik + izpis */
.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  justify-self: end;
  min-width: 0;
}

.header-user {
  font-size: 0.82rem;
  font-weight: 600;
  color: #60a5fa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

/* Semafor nivo 0 — glava (G6); +50 % večji za vidnost alarma */
.header-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #1e2740;
  background: rgba(15, 17, 23, 0.65);
}

.header-status .status-light {
  width: 18px;
  height: 18px;
}

.status-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #2a3045;
  opacity: 0.35;
  transition: opacity 0.15s, box-shadow 0.15s, background 0.15s;
}

/* Semafor v vrsticah Status tabele */
.status-row-lights {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  vertical-align: middle;
}
.status-row-lights .status-light {
  width: 11px;
  height: 11px;
}

/* Drill-down Status */
.status-tree-table .status-expand {
  width: 28px;
  border: none;
  background: transparent;
  color: #93c5fd;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}
.status-tree-table .status-expand:hover { color: #fff; }
.status-tree-table .status-expand.is-empty {
  visibility: hidden;
  pointer-events: none;
}
.status-tree-table .indent-1 { padding-left: 8px; }
.status-tree-table .indent-2 { padding-left: 28px; }
.status-tree-table .indent-3 { padding-left: 52px; }

/* Hierarhija barv vrstic: nivo1 temnomoder → nivo2 svetlejši → nivo3 še svetlejši (besedilo ostane berljivo) */
.status-tree-table tbody tr.status-nivo-1 {
  background: #121a2e;
}
.status-tree-table tbody tr.status-nivo-1:hover {
  background: #162238;
}
.status-tree-table tbody tr.status-nivo-2 {
  background: #1a2740;
}
.status-tree-table tbody tr.status-nivo-2:hover {
  background: #1e2e4a;
}
.status-tree-table tbody tr.status-nivo-3 {
  background: #243554;
}
.status-tree-table tbody tr.status-nivo-3:hover {
  background: #2a3c5c;
}
.status-tree-table tbody tr.status-nivo-2 td,
.status-tree-table tbody tr.status-nivo-3 td {
  border-top-color: rgba(148, 163, 184, 0.08);
}

.status-light.zelena  { background: #22c55e; }
.status-light.rumena  { background: #f59e0b; }
.status-light.rdeca   { background: #ef4444; }

.status-light.is-active {
  opacity: 1;
}

.status-light.zelena.is-active  { box-shadow: 0 0 10px rgba(34,197,94,0.85); }
.status-light.rumena.is-active  { box-shadow: 0 0 10px rgba(245,158,11,0.85); }
.status-light.rdeca.is-active   { box-shadow: 0 0 10px rgba(239,68,68,0.85); }

/* Legacy single-light class (če še kje obstaja) */
.status-light.zelena:not(.is-active):only-child,
.status-light.rumena:not(.is-active):only-child,
.status-light.rdeca:not(.is-active):only-child {
  opacity: 1;
}

/* ================================================================
   GLAVNA NAVIGACIJA (Main navigation)
   ================================================================ */
.main-nav {
  display: flex;
  gap: 2px;
}

.main-nav .nav-btn {
  background: transparent;
  color: rgba(255,255,255,0.68);
  border: none;
  padding: 8px 15px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
  /* Skupno za <a> in <button> (shared for <a> and <button>) */
  text-decoration: none;
  display: inline-block;
  line-height: normal;
}

.main-nav .nav-btn:hover { background: rgba(255,255,255,0.09); color: white; }

.main-nav .nav-btn.active {
  background: rgba(96,165,250,0.14);
  color: #93c5fd;
  border-bottom: 2px solid #3b82f6;
}

/* ================================================================
   GUMB ZA IZHOD (Exit button)
   ================================================================ */
.exit-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 5px 13px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.18s;
  white-space: nowrap;
}

.exit-btn:hover { background: rgba(255,255,255,0.1); color: white; }

/* ================================================================
   PRIJAVNI ZASLON (Login screen)
   ================================================================ */
.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #0f1117;
}

.login-card {
  width: 100%;
  max-width: 370px;
  background: #1a1f2e;
  border-radius: 14px;
  padding: 36px 32px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55);
  border: 1px solid #242b3d;
}

.login-card h1 {
  margin-top: 0;
  font-size: 1.4rem;
  text-align: center;
  color: #93c5fd;
}

.login-card label {
  display: block;
  margin: 14px 0 5px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #94a3b8;
}

.login-mode-title {
  margin: 0 0 8px;
  color: #94a3b8;
  font-size: 0.84rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.login-card input {
  width: 100%;
  padding: 10px 12px;
  background: #0f1117;
  border: 1px solid #2a3045;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #dce3f0;
}

.login-card input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

.btn-login {
  width: 100%;
  margin-top: 20px;
  padding: 11px;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.18s;
  letter-spacing: 0.3px;
}

.btn-login:hover { background: #1d4ed8; }

.btn-sso {
  margin-top: 10px;
  background: #1f2937;
  border: 1px solid #2a3045;
}

.btn-sso:hover { background: #111827; }

.btn-sso-personal {
  background: #1a2540;
  border-color: #2a3555;
}

.btn-sso-personal:hover { background: #131d32; }

.sso-hint {
  font-size: 0.77rem;
  color: #6b7a9e;
  margin-top: 6px;
  text-align: center;
  line-height: 1.4;
}

.error {
  color: #f87171;
  margin-top: 10px;
  min-height: 20px;
  font-size: 0.88rem;
}

/* ================================================================
   SSO ERROR PANEL — vidno, strukturirano, z navodili za zunanje uporabnike
   (lastnike sončnih elektrarn, ki nimajo tehničnega znanja)
   ================================================================ */
.sso-error-panel {
  margin-top: 14px;
  padding: 14px 16px;
  border: 2px solid #f87171;
  border-radius: 10px;
  background: #2a1f1f;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.sso-error-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.sso-error-icon {
  font-size: 1.1rem;
}

.sso-error-head strong {
  color: #fca5a5;
  font-size: 1.02rem;
}

.sso-error-msg {
  color: #e5e7eb;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 10px;
}

.sso-steps {
  background: #1f2937;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 8px 0;
}

.sso-steps-title {
  font-weight: 600;
  color: #93c5fd;
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.sso-steps-list {
  margin: 0;
  padding-left: 18px;
  color: #d1d5db;
  font-size: 0.82rem;
  line-height: 1.45;
}

.sso-steps-list li {
  margin-bottom: 4px;
}

.sso-tech {
  margin: 8px 0 4px;
}

.sso-tech summary {
  cursor: pointer;
  color: #9ca3af;
  font-size: 0.78rem;
  user-select: none;
}

.sso-tech-content {
  margin-top: 6px;
  padding: 8px;
  background: #111827;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.72rem;
  color: #9ca3af;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 120px;
  overflow: auto;
}

.sso-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.sso-error-actions .btn-login {
  flex: 1 1 auto;
  min-width: 140px;
  padding: 8px 10px;
  font-size: 0.82rem;
}

.sso-error-actions .btn-secondary {
  background: #374151;
  color: #e5e7eb;
  border: 1px solid #4b5563;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
}

.sso-error-actions .btn-secondary:hover {
  background: #4b5563;
}

.sso-support-hint {
  margin: 10px 0 0;
  font-size: 0.74rem;
  color: #9ca3af;
  line-height: 1.35;
  border-top: 1px solid #3f3f46;
  padding-top: 8px;
}

/* ================================================================
   VSEBINSKI DEL (Content area) — gostota (G4)
   ================================================================ */
.app-content {
  padding: 0;
  max-width: none;
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

/* Dashboard / vpogled: polna višina pod glavo */
#view-dashboard {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#view-dashboard .app-content,
.app-content.measure-page {
  flex: 1;
  min-height: 0;
}

.page-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #93c5fd;
  margin: 0;
  padding: 10px 14px 0;
}

/* Stari status-bar skrit, če še obstaja v HTML (status je v glavi) */
.status-bar { display: none !important; }

.status-text { font-weight: 600; font-size: 0.92rem; color: #c8d0e0; }

.greeting { font-weight: 600; color: #60a5fa; font-size: 0.88rem; }

/* ================================================================
   MREŽA 2×2 — paneli, ne kartice (G3, G8)
   gap 1px = hairline ločitev; ozadje reže = ločilna črta
   ================================================================ */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1px;
  background: #1e2740;
  flex: 1;
  min-height: calc(100vh - 52px);
  width: 100%;
}

@media (max-width: 820px) {
  .charts-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    min-height: auto;
  }
  .chart-pane,
  .chart-card {
    min-height: 260px;
  }
}

/* .chart-pane = standardno ime; .chart-card ohranjen kot sinonim */
.chart-pane,
.chart-card {
  background: #0f1117;
  border-radius: 0;
  padding: 10px 12px 8px;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.chart-pane:hover,
.chart-card:hover {
  box-shadow: none;
  background: #11141c;
}

.chart-pane h2,
.chart-card h2 {
  margin: 0;
  font-size: 0.88rem;
  color: #c8d0e0;
  font-weight: 700;
  line-height: 1.2;
}

.chart-subtitle {
  font-size: 0.7rem;
  color: #4a5568;
  margin: 1px 0 6px;
  line-height: 1.2;
}

.pane-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  flex-shrink: 0;
}

.pane-head-titles {
  min-width: 0;
}

.value-row {
  display: flex;
  gap: 12px;
  margin-bottom: 4px;
  flex-wrap: wrap;
  flex-shrink: 0;
  align-items: flex-end;
}

.value-badge { display: flex; flex-direction: column; gap: 0; }

.value-badge .vb-label {
  font-size: 0.65rem;
  color: #4a5568;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.35px;
}

.value-badge .vb-value { font-size: 1.15rem; font-weight: 700; line-height: 1.15; }

.value-badge .vb-unit { font-size: 0.65rem; color: #4a5568; }

.chart-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 100px;
  width: 100%;
}

/* ================================================================
   LOKACIJSKA VRSTICA (Location bar) – Vpogled — gosta, brez kartice
   ================================================================ */
.location-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 12px;
  background: #0c0f16;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid #1e2740;
  box-shadow: none;
  flex-shrink: 0;
}

.location-bar label { font-weight: 600; font-size: 0.85rem; margin: 0; white-space: nowrap; color: #94a3b8; }

.location-bar select {
  background: #0f1117;
  border: 1px solid #2a3045;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 0.85rem;
  color: #dce3f0;
}

.location-bar select:focus { outline: none; border-color: #3b82f6; }

/* Merilna stran z lokacijo: mreža pod layer-jem */
.app-content.measure-page .charts-grid {
  min-height: calc(100vh - 52px - 41px);
}

/* ================================================================
   POD-NAVIGACIJA (Sub-navigation) – Administracija
   ================================================================ */
.sub-nav {
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0 8px;
  border-bottom: 1px solid #1e2740;
  background: #0c0f16;
  flex-shrink: 0;
}

.sub-nav .tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 14px;
  margin-bottom: -1px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  color: #4a5568;
  border-radius: 0;
  transition: all 0.16s;
}

.sub-nav .tab-btn:hover { color: #c8d0e0; background: #1e2436; }

.sub-nav .tab-btn.active { color: #60a5fa; border-bottom-color: #3b82f6; }

/* ================================================================
   INFORMACIJSKI BLOK (ne “kartica” — standard grafika G3)
   ================================================================ */
.app-content:not(.measure-page) {
  padding: 0;
}

.info-card {
  background: transparent;
  border-radius: 0;
  padding: 12px 14px 16px;
  border: none;
  border-bottom: 1px solid #1e2740;
  box-shadow: none;
  margin-bottom: 0;
}

.info-card h3 { margin: 0 0 2px; color: #93c5fd; font-size: 0.95rem; }

.info-card .card-desc { font-size: 0.8rem; color: #4a5568; margin: 0 0 10px; }

/* ================================================================
   TABELE (Tables)
   ================================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #1a1f2e;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.data-table th {
  background: #0d1526;
  color: #94a3b8;
  padding: 11px 14px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid #1e2740;
}

.data-table td {
  padding: 9px 14px;
  border-bottom: 1px solid #1e2436;
  font-size: 0.88rem;
  vertical-align: middle;
  color: #c8d0e0;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #1e2436; }

/* ================================================================
   OZNAKE (Badges)
   ================================================================ */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-admin   { background: #1e3a5f; color: #93c5fd; }
.badge-user    { background: #1e2436; color: #94a3b8; }
.badge-ok      { background: #14532d; color: #86efac; }
.badge-warning { background: #422006; color: #fcd34d; }
.badge-danger  { background: #4c1d1d; color: #f87171; }

/* ================================================================
   GUMBI (Buttons)
   ================================================================ */
.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #15803d;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  margin-bottom: 14px;
  transition: background 0.18s;
}

.btn-add:hover { background: #166534; }

.btn-sm {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.16s;
}

.btn-save   { background: #1e3a5f; color: #60a5fa; }
.btn-save:hover { background: #1e4080; }

.btn-danger { background: #4c1d1d; color: #f87171; }
.btn-danger:hover { background: #7f1d1d; }

.permissions-role-select {
  background: #0f1117;
  border: 1px solid #2a3045;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 0.88rem;
  color: #dce3f0;
}

.btn-run {
  width: 100%;
  padding: 8px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 7px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.18s;
}

.btn-run:hover { background: #1d4ed8; }

/* ================================================================
   MREŽA PROCEDUR (Procedures grid)
   ================================================================ */
.procedures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 4px;
}

.db-progress-wrap {
  width: 100%;
  margin-top: 14px;
}

.db-progress-scale {
  display: flex;
  justify-content: space-between;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.db-progress-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  border: 1px solid #2a3045;
  background: #0f1117;
  overflow: hidden;
}

.db-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #2563eb 0%, #22c55e 100%);
  transition: width 0.35s ease;
}

.db-progress-percent {
  margin-top: 6px;
  text-align: right;
  color: #c8d0e0;
  font-size: 0.82rem;
  font-weight: 700;
}

.proc-card {
  background: #1e2436;
  border: 1px solid #2a3045;
  border-radius: 10px;
  padding: 16px;
}

.proc-icon { font-size: 1.7rem; margin-bottom: 7px; }
.proc-name { font-weight: 700; font-size: 0.92rem; color: #c8d0e0; margin-bottom: 4px; }
.proc-desc { font-size: 0.8rem; color: #4a5568; margin-bottom: 12px; }

/* ================================================================
   LOGI (Log table)
   ================================================================ */
.log-info    { color: #60a5fa; font-weight: 600; }
.log-warning { color: #fbbf24; font-weight: 600; }
.log-error   { color: #f87171; font-weight: 600; }

.filter-bar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }

.filter-bar select, .filter-bar input {
  background: #0f1117;
  border: 1px solid #2a3045;
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 0.88rem;
  color: #dce3f0;
}

.filter-bar select:focus, .filter-bar input:focus { outline: none; border-color: #3b82f6; }

.filter-bar input { flex: 1; min-width: 160px; }

/* ================================================================
   MODAL (Modal overlay)
   ================================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 200;
  justify-content: center;
  align-items: center;
}

.modal-overlay.open { display: flex; }

.modal {
  background: #1a1f2e;
  border-radius: 14px;
  padding: 28px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 72px rgba(0,0,0,0.6);
  border: 1px solid #242b3d;
}

.modal h2 { margin: 0 0 18px; color: #93c5fd; font-size: 1.1rem; }

.modal label { display: block; margin: 10px 0 4px; font-weight: 600; font-size: 0.88rem; color: #94a3b8; }

.modal input, .modal select {
  width: 100%;
  padding: 9px 11px;
  background: #0f1117;
  border: 1px solid #2a3045;
  border-radius: 7px;
  font-size: 0.92rem;
  color: #dce3f0;
}

.modal input:focus, .modal select:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.18); }

.modal-actions { display: flex; gap: 10px; margin-top: 18px; justify-content: flex-end; }

.btn-modal-save {
  background: #2563eb;
  color: white;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.18s;
}

.btn-modal-save:hover { background: #1d4ed8; }

.btn-modal-delete {
  background: #7f1d1d;
  color: #fca5a5;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.18s;
}

.btn-modal-delete:hover { background: #991b1b; color: #fff; }

.btn-cancel {
  background: #1e2436;
  color: #94a3b8;
  border: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}

.btn-cancel:hover { background: #2a3045; color: #dce3f0; }

/* ================================================================
   OBVESTILO (Toast notification)
   ================================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #15803d;
  color: white;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  z-index: 300;
  transform: translateY(80px);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
  pointer-events: none;
}

.toast.show { transform: translateY(0); opacity: 1; }

/* ================================================================
   RESPONZIVNOST (Responsive)
   ================================================================ */
@media (max-width: 600px) {
  .app-header { padding: 0 12px; }
  .main-nav .nav-btn { padding: 7px 9px; font-size: 0.82rem; }
  .app-content { padding: 14px; }
  .charts-grid { gap: 14px; }
}

/* ================================================================
   BAZA — razdeljena postavitev (Database split-view layout)
   ================================================================ */
.baza-layout {
  display: flex;
  gap: 18px;
  min-height: 400px;
}

.baza-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #1a1f2e;
  border-radius: 12px;
  border: 1px solid #242b3d;
  overflow-y: auto;
  max-height: 540px;
}

.baza-sidebar-title {
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #4a5568;
  border-bottom: 1px solid #242b3d;
}

.baza-table-item {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-left: 2px solid transparent;
  text-align: left;
  padding: 9px 14px;
  font-size: 0.85rem;
  color: #c8d0e0;
  cursor: pointer;
  border-bottom: 1px solid #1e2436;
  transition: background 0.15s, color 0.15s;
  font-family: 'Segoe UI', Arial, sans-serif;
}

.baza-table-item:hover { background: #1e2436; color: #93c5fd; }

.baza-table-item.active {
  background: rgba(96,165,250,0.1);
  color: #60a5fa;
  border-left-color: #3b82f6;
}

.baza-main { flex: 1; min-width: 0; }

.baza-query-box {
  background: #0f1117;
  border: 1px solid #2a3045;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.9rem;
  color: #60a5fa;
  margin-bottom: 10px;
}

.baza-result-info {
  font-size: 0.8rem;
  color: #4a5568;
  margin-bottom: 10px;
}

.baza-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  color: #4a5568;
  font-size: 0.95rem;
  border: 2px dashed #242b3d;
  border-radius: 12px;
}

@media (max-width: 700px) {
  .baza-layout { flex-direction: column; }
  .baza-sidebar { width: 100%; max-height: 200px; }
}
