/* ELOISA theme for the CALLISTO dashboard: ELOISA Monitor's palette and components.
   Loaded after the page's own <style>, so it only overrides. Remove the <link> to revert. */

:root {
  --bg: #080c10; --bg2: #0d1219; --bg3: #121a24;
  --border: #1e2d3d; --border2: #243548;
  --glass: rgba(13,18,25,0.92); --glass2: rgba(18,26,36,0.75);
  --glow-cyan: rgba(0,229,160,0.12); --glow-purple: rgba(168,85,247,0.10); --glow-border: rgba(0,229,160,0.18);
  --accent: #00e5a0; --accent2: #3b9eff; --accent3: #ff3b5c; --accent4: #f5c518;
  --text: #c8d8e8; --text2: #7a9ab8; --text3: #4a6680;
  --green: #00e5a0; --red: #ff3b5c; --yellow: #f5c518;
  --blue: #3b9eff; --cyan: #06d6f5; --purple: #a855f7; --orange: #ff7b31;
}

html, body { background: var(--bg); color: var(--text); }
body::before { display: none; }

* { scrollbar-width: thin; scrollbar-color: var(--border2) transparent; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
::-webkit-scrollbar-track { background: transparent; }

/* Login */
#login-screen { background: var(--bg); }
.login-box {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 60px rgba(0,229,160,0.06);
}
.login-logo .logo-text { color: var(--green); }
.login-tab.active { color: var(--green); border-bottom-color: var(--green); }
.btn-login { background: var(--green); color: #080c10; border-radius: 6px; }
.btn-login:hover { background: var(--green); opacity: .88; box-shadow: 0 0 20px rgba(0,229,160,0.3); }
.form-group input { background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; }
.form-group input:focus { border-color: var(--green); }

/* Sidebar */
.sidebar {
  background: var(--bg2); border-right: 1px solid var(--border);
  backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none;
}
.sidebar-logo-text { color: var(--green); }
.nav-item { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; color: var(--text3); }
.nav-item:hover { color: var(--text2); background: rgba(0,229,160,0.04); box-shadow: none; }
.nav-item.active {
  color: var(--green); background: rgba(0,229,160,0.08);
  box-shadow: inset 2px 0 0 var(--green); text-shadow: none;
}

/* Page headers */
.page-title { text-shadow: none; font-size: 14px; letter-spacing: .12em; color: var(--text); }
.page-subtitle { color: var(--text3); font-size: 12px; }

/* Stat cards: 2 px colored top border + soft glow, like the Monitor overview */
.stat-card {
  background: var(--bg2); border: 1px solid var(--border); border-top: 2px solid var(--green);
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0,229,160,0.12), 0 0 80px rgba(0,229,160,0.04), inset 0 1px 0 rgba(255,255,255,0.08);
}
.stat-card::before { display: none; }
.stat-card:hover { border-color: var(--border2); }
.stat-card.green  { border-color: var(--border); border-top-color: var(--green);
  box-shadow: 0 0 30px rgba(0,229,160,0.12), 0 0 80px rgba(0,229,160,0.04), inset 0 1px 0 rgba(255,255,255,0.08); }
.stat-card.cyan   { border-color: var(--border); border-top-color: var(--cyan);
  box-shadow: 0 0 30px rgba(6,214,245,0.15), 0 0 80px rgba(6,214,245,0.05), inset 0 1px 0 rgba(255,255,255,0.08); }
.stat-card.blue   { border-color: var(--border); border-top-color: var(--blue);
  box-shadow: 0 0 30px rgba(59,158,255,0.15), 0 0 80px rgba(59,158,255,0.05), inset 0 1px 0 rgba(255,255,255,0.08); }
.stat-card.yellow { border-color: var(--border); border-top-color: var(--yellow);
  box-shadow: 0 0 30px rgba(245,197,24,0.15), 0 0 80px rgba(245,197,24,0.04), inset 0 1px 0 rgba(255,255,255,0.08); }
.stat-label { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: var(--text3); }
.stat-value { font-weight: 600; color: var(--text); }
.stat-sub { font-size: 11px; color: var(--text2); }

/* Panels, tables, client cards */
.table-container, .client-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.client-card:hover { border-color: var(--border2); box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.table-header { border-bottom: 1px solid var(--border); }
.table-title { font-size: 11px; letter-spacing: .1em; color: var(--text2); }
thead tr { border-bottom: 1px solid var(--border); }
thead th { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: var(--text3); }
tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:hover { background: rgba(255,255,255,0.02); }

/* Badges: small rounded tags like the Monitor's */
.badge { border-radius: 4px; font-size: 9px; font-weight: 700; letter-spacing: .05em; }
.badge-answered { background: rgba(0,229,160,0.15); color: var(--green); }
.badge-no_answer, .badge-failed { background: rgba(255,59,92,0.15); color: var(--red); }
.badge-busy { background: rgba(245,197,24,0.15); color: var(--yellow); }
.badge-teams, .badge-teams_primary, .badge-teams_backup, .badge-teams_backup2 { background: rgba(168,85,247,0.15); color: var(--purple); }
.badge-voipms, .badge-voipmsws1, .badge-voipmsws2, .badge-voipmsws3 { background: rgba(0,229,160,0.12); color: var(--green); }
.badge-inbound { background: rgba(6,214,245,0.15); color: var(--cyan); }
.badge-idt { background: rgba(59,158,255,0.15); color: var(--blue); }
.badge-tbitelecom { background: rgba(255,123,49,0.15); color: var(--orange); }

/* Inputs and buttons */
.filter-input, .filter-select { background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; color: var(--text); }
.filter-input:focus, .filter-select:focus { border-color: var(--green); }
.btn-primary { background: var(--green); color: #080c10; border-radius: 6px; }
.btn-primary:hover { background: var(--green); opacity: .88; }
.btn-outline { border-radius: 6px; border-color: var(--border); }
.btn-outline:hover { border-color: var(--green); color: var(--green); }

/* Modals */
.modal-overlay { background: rgba(4,6,9,0.75); }

/* State colors: green fine, yellow watch, orange act soon, red act now. Red and orange are only ever
   set from data, so they keep their meaning. Cyan, blue and purple are for neutral numbers. */
.s-ok   { --c: var(--green);  --c-rgb: 0,229,160; }
.s-warn { --c: var(--yellow); --c-rgb: 245,197,24; }
.s-high { --c: var(--orange); --c-rgb: 255,123,49; }
.s-crit { --c: var(--red);    --c-rgb: 255,59,92; }
.s-info { --c: var(--blue);   --c-rgb: 59,158,255; }
.s-cyan { --c: var(--cyan);   --c-rgb: 6,214,245; }
.s-none { --c: var(--text3);  --c-rgb: 74,102,128; }

/* Colored numbers and more of the palette on the existing cards */
.stat-card.green .stat-value  { color: var(--green); }
.stat-card.cyan .stat-value   { color: var(--cyan); }
.stat-card.blue .stat-value   { color: var(--blue); }
.stat-card.yellow .stat-value { color: var(--yellow); }
#admin-stats-grid .stat-card:nth-child(3) { border-top-color: var(--purple);
  box-shadow: 0 0 30px rgba(168,85,247,0.15), 0 0 80px rgba(168,85,247,0.05), inset 0 1px 0 rgba(255,255,255,0.08); }
#admin-stats-grid .stat-card:nth-child(3) .stat-value { color: var(--purple); }

/* Panels the page draws with inline styles */
div[style*="border-radius:2px"] { border-radius: 10px !important; }
#vitals-strip > div > div { border-radius: 10px; border-top: 2px solid var(--vc) !important; box-shadow: 0 0 24px color-mix(in srgb, var(--vc) 12%, transparent); }
#vitals-strip > div > div:nth-child(1) { --vc: var(--cyan); }
#vitals-strip > div > div:nth-child(2) { --vc: var(--green); }
#vitals-strip > div > div:nth-child(3) { --vc: var(--orange); }
#vitals-strip > div > div:nth-child(4) { --vc: var(--purple); }
#vitals-strip > div > div:nth-child(5) { --vc: var(--blue); }
#vitals-strip > div > div:nth-child(6) { --vc: var(--yellow); }
#vitals-strip > div > div > div:nth-child(2) { color: var(--vc) !important; }
#vitals-strip polyline { stroke: var(--vc); }
#vitals-strip circle { fill: var(--vc); }
#forecast-strip > div { border-radius: 10px; }
#forecast-strip > div > div:nth-child(2) > div { border-radius: 8px; border-top: 2px solid var(--vc); }
#forecast-strip > div > div:nth-child(2) > div:nth-child(1) { --vc: var(--cyan); }
#forecast-strip > div > div:nth-child(2) > div:nth-child(2) { --vc: var(--green); }
#forecast-strip > div > div:nth-child(2) > div:nth-child(3) { --vc: var(--purple); }
#forecast-strip > div > div:nth-child(2) > div:nth-child(4) { --vc: var(--orange); }

/* Sidebar: one color per section, status pill, counts */
#admin-nav [data-sec="overview"]       { --sec: var(--green); }
#admin-nav [data-sec="management"]     { --sec: var(--blue); }
#admin-nav [data-sec="analytics"]      { --sec: var(--purple); }
#admin-nav [data-sec="infrastructure"] { --sec: var(--orange); }
#admin-nav [data-sec="sbc"]            { --sec: var(--cyan); }
#admin-nav .nav-section { color: var(--sec); opacity: .85; font-family: var(--mono); font-size: 9px; }
#admin-nav .nav-item .nav-icon { color: var(--sec); }
#admin-nav .nav-item.active { color: var(--sec); box-shadow: inset 2px 0 0 var(--sec); background: color-mix(in srgb, var(--sec) 9%, transparent); }
.nav-item { position: relative; }
.cc-nav-badge {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  min-width: 18px; padding: 1px 5px; border-radius: 9px; text-align: center;
  background: rgba(var(--c-rgb),0.18); color: var(--c); font-family: var(--mono); font-size: 10px; font-weight: 700;
}
#cc-status-pill {
  display: flex; align-items: center; gap: 7px; margin-top: 10px; padding: 5px 9px; border-radius: 6px; cursor: pointer;
  background: rgba(var(--c-rgb),0.12); border: 1px solid rgba(var(--c-rgb),0.3);
  color: var(--c); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .08em;
}

/* Status banner */
.cc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); flex-shrink: 0; }
#cc-status-pill .cc-dot { width: 8px; height: 8px; }
.s-crit > .cc-dot, .s-high > .cc-dot { animation: cc-pulse 1.4s infinite; }
@keyframes cc-pulse { 50% { opacity: .35; } }
.cc-banner {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px; margin-bottom: 16px; border-radius: 10px;
  background: linear-gradient(90deg, rgba(var(--c-rgb),0.16), rgba(var(--c-rgb),0.03));
  border: 1px solid rgba(var(--c-rgb),0.35); border-left: 3px solid var(--c);
  box-shadow: 0 0 40px rgba(var(--c-rgb),0.12);
}
.cc-banner-main { flex: 1; min-width: 0; }
.cc-banner-title { font-family: var(--mono); font-size: 14px; font-weight: 700; letter-spacing: .1em; color: var(--c); }
.cc-banner-sub { font-size: 12px; color: var(--text2); margin-top: 4px; }
.cc-tallies { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cc-tally { padding: 3px 8px; border-radius: 4px; background: rgba(var(--c-rgb),0.15); color: var(--c); font-family: var(--mono); font-size: 10px; font-weight: 700; white-space: nowrap; }

/* KPI cards */
.cc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.cc-kpi {
  padding: 14px 16px; border-radius: 10px; cursor: pointer; background: var(--bg2);
  border: 1px solid var(--border); border-top: 2px solid var(--c);
  box-shadow: 0 0 30px rgba(var(--c-rgb),0.13), 0 0 80px rgba(var(--c-rgb),0.04), inset 0 1px 0 rgba(255,255,255,0.08);
  transition: transform .15s;
}
.cc-kpi:hover { transform: translateY(-1px); }
.cc-kpi-label { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: var(--text3); }
.cc-kpi-value { font-family: var(--mono); font-size: 24px; font-weight: 700; color: var(--c); margin: 6px 0 4px; }
.cc-kpi-sub { font-size: 11px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Attention list, carriers, traffic */
.cc-grid { display: grid; grid-template-columns: minmax(0,3fr) minmax(0,2fr); gap: 12px; margin-bottom: 20px; align-items: start; }
.cc-panel { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.cc-panel h3 { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--text2); margin: 0 0 12px; }
.cc-panel h3:not(:first-child) { margin-top: 18px; }
.cc-panel h3 small { color: var(--text3); font-weight: 400; letter-spacing: 0; margin-left: 6px; }
.cc-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; margin-bottom: 6px; border-radius: 6px; cursor: pointer;
  background: rgba(var(--c-rgb),0.06); border-left: 2px solid var(--c);
}
.cc-item:hover { background: rgba(var(--c-rgb),0.12); }
.cc-pill { flex-shrink: 0; width: 62px; padding: 2px 0; text-align: center; border-radius: 4px; background: rgba(var(--c-rgb),0.16); color: var(--c); font-family: var(--mono); font-size: 9px; font-weight: 700; margin-top: 1px; }
.cc-item-title { font-size: 13px; font-weight: 600; color: var(--text); }
.cc-item-detail { font-size: 11px; color: var(--text2); margin-top: 2px; }
.cc-more { padding: 6px; text-align: center; cursor: pointer; font-family: var(--mono); font-size: 10px; color: var(--text2); }
.cc-more:hover { color: var(--green); }
.cc-empty { padding: 14px; text-align: center; border-radius: 6px; font-size: 12px; color: var(--c); background: rgba(var(--c-rgb),0.07); }
.cc-carriers { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); gap: 8px; }
.cc-carrier { padding: 10px 11px; border-radius: 8px; cursor: pointer; background: rgba(var(--c-rgb),0.07); border: 1px solid rgba(var(--c-rgb),0.25); border-top: 2px solid var(--c); }
.cc-carrier-name { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-carrier-note { font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--c); margin-top: 3px; }
.cc-carrier-sub { font-size: 10px; color: var(--text3); margin-top: 3px; }
.cc-bars { display: flex; align-items: flex-end; gap: 6px; height: 92px; }
.cc-bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; }
.cc-bar-fill { background: var(--c); border-radius: 3px 3px 0 0; box-shadow: 0 0 10px rgba(var(--c-rgb),0.4); min-height: 3px; flex-shrink: 1; }
.cc-bar-now .cc-bar-fill { opacity: .45; }
.cc-bar-label { font-family: var(--mono); font-size: 8px; color: var(--text3); text-align: center; margin-top: 4px; }
.cc-mix { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; }
.cc-mix-seg { background: var(--c); min-width: 3px; }
.cc-mix-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 10px; color: var(--text2); }
.cc-mix-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--c); margin-right: 5px; }

/* Client cards and findings pick up their state */
.client-card.s-ok, .client-card.s-warn, .client-card.s-high, .client-card.s-crit { border-top: 2px solid var(--c); box-shadow: 0 0 26px rgba(var(--c-rgb),0.12); }
.cc-runway { margin-top: 6px; font-family: var(--mono); font-size: 10px; color: var(--c); }
.cc-quiet { opacity: .6; border-left-color: var(--text3) !important; }
.cc-quiet:hover { opacity: 1; }
.cc-age { display: inline-block; margin-bottom: 10px; padding: 2px 8px; border-radius: 4px; background: rgba(var(--c-rgb),0.15); color: var(--c); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .05em; }

/* Colored edge on call tables */
tbody tr:has(.badge-answered) td:first-child { box-shadow: inset 2px 0 0 var(--green); }
tbody tr:has(.badge-busy) td:first-child { box-shadow: inset 2px 0 0 var(--orange); }
tbody tr:has(.badge-no_answer) td:first-child { box-shadow: inset 2px 0 0 var(--yellow); }
tbody tr:has(.badge-failed) td:first-child { box-shadow: inset 2px 0 0 var(--red); }
.badge-busy { background: rgba(255,123,49,0.15); color: var(--orange); }
.badge-no_answer { background: rgba(245,197,24,0.15); color: var(--yellow); }

@media (max-width: 1100px) {
  .cc-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .cc-grid { grid-template-columns: minmax(0,1fr); }
}
