/* AELYX Operations Portal — shared theme (light default + dark overrides) */

/* Smooth, tasteful transitions when switching theme / hovering surfaces */
body, .kpi, .panel, .card, .pcard, .note, table, th, td, input, select, textarea,
.cin, .dinput, .sidebar, .navbtn, .urow, .doccol, .docitem, .act, .actions,
.hcard, .alert, .recitem, .audit, .stub, .frame-actions, .addcard, .row {
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

/* ============ DARK THEME ============ */
[data-theme="dark"]{
  color-scheme: dark;
  --bg:#0f172a; --line:#334155; --mute:#94a3b8;
}

[data-theme="dark"] body{ background:#0f172a; color:#e2e8f0; }

/* Surfaces */
[data-theme="dark"] .kpi,
[data-theme="dark"] .panel,
[data-theme="dark"] .card,
[data-theme="dark"] .pcard,
[data-theme="dark"] .note,
[data-theme="dark"] .sidebar,
[data-theme="dark"] .actions,
[data-theme="dark"] .doccol,
[data-theme="dark"] table,
[data-theme="dark"] .stub,
[data-theme="dark"] .hcard,
[data-theme="dark"] .frame-actions{
  background:#1e293b; color:#e2e8f0; border-color:#334155;
}
[data-theme="dark"] .addcard{ background:#172033; border-color:#334155; color:#94a3b8; }

/* Headings / brand text that used the dark navy ink */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] .brand,
[data-theme="dark"] .pcard .nm,
[data-theme="dark"] .ph-name,
[data-theme="dark"] .card h3,
[data-theme="dark"] .docitem .dt{ color:#e2e8f0; }

/* Muted text */
[data-theme="dark"] .hint2,
[data-theme="dark"] .psub,
[data-theme="dark"] .pcard .meta,
[data-theme="dark"] .docitem .dd,
[data-theme="dark"] .card p,
[data-theme="dark"] .un span,
[data-theme="dark"] .rp,
[data-theme="dark"] .ap{ color:#94a3b8; }

/* Panel headers / separators */
[data-theme="dark"] .panel .ph{ border-color:#334155; color:#e2e8f0; }

/* Tables */
[data-theme="dark"] th{ background:#0b1220; color:#cbd5e1; }
[data-theme="dark"] td{ border-color:#22304a; }
[data-theme="dark"] tr.over td{ background:#3a1d1d; }

/* Inputs */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .cin,
[data-theme="dark"] .dinput{ background:#0f1b2d; color:#e2e8f0; border-color:#334155; }

/* Rows, list items, hovers */
[data-theme="dark"] .row{ border-color:#22304a; }
[data-theme="dark"] .row.phase{ background:#172033; }
[data-theme="dark"] .alert,
[data-theme="dark"] .recitem,
[data-theme="dark"] .urow,
[data-theme="dark"] .docitem,
[data-theme="dark"] .audit,
[data-theme="dark"] .act{ border-color:#22304a; }
[data-theme="dark"] .row:hover,
[data-theme="dark"] .act:hover,
[data-theme="dark"] .navbtn:hover,
[data-theme="dark"] .pcard:hover{ background:#243349; }

/* Portal sidebar nav */
[data-theme="dark"] .sidebar{ background:#111c30; border-color:#334155; }
[data-theme="dark"] .navbtn{ color:#e2e8f0; }
[data-theme="dark"] .navbtn.on{ background:#0c2b2a; color:#2dd4bf; }
[data-theme="dark"] .navsec{ color:#64748b; }

/* Small buttons inside the user/admin rows */
[data-theme="dark"] .urow select,
[data-theme="dark"] .urow button{ background:#0f1b2d; color:#e2e8f0; border-color:#334155; }

/* Progress bars */
[data-theme="dark"] .pbar{ background:#0f1b2d; }
[data-theme="dark"] .pbar .ptxt{ color:#e2e8f0; }

/* KPI value accents (keep them vivid on dark) */
[data-theme="dark"] .kpi .v{ color:#e2e8f0; }
[data-theme="dark"] .kpi.teal .v{ color:#2dd4bf; }
[data-theme="dark"] .kpi.green .v{ color:#34d399; }
[data-theme="dark"] .kpi.amber .v{ color:#fbbf24; }
[data-theme="dark"] .kpi.red .v{ color:#f87171; }

/* Hub sub-task label ink */
[data-theme="dark"] .lab.sub{ color:#cbd5e1; }

/* Login card */
[data-theme="dark"] .card .sub,
[data-theme="dark"] .foot{ color:#94a3b8; }

/* The teal accent line on notes stays teal */
[data-theme="dark"] .note{ border-left-color:#0D9488; }

/* Gentle shadow lift on cards in both themes */
.pcard{ box-shadow:0 1px 2px rgba(0,0,0,.04); }
[data-theme="dark"] .pcard{ box-shadow:0 1px 2px rgba(0,0,0,.4); }
