/* ══════════════════════════════════════════
   TrakNet.AI - Circuit Board / Futuristic Theme
   Visible cyan traces on dark navy
   ══════════════════════════════════════════ */

:root {
  --circuit-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cdefs%3E%3Cstyle%3Eline,path%7Bstroke:%2300bcd4;stroke-width:0.8;fill:none;opacity:0.12%7D circle%7Bfill:%2300bcd4;opacity:0.2%7D%3C/style%3E%3C/defs%3E%3Cline x1='0' y1='50' x2='80' y2='50'/%3E%3Cline x1='80' y1='50' x2='80' y2='100'/%3E%3Cline x1='80' y1='100' x2='160' y2='100'/%3E%3Ccircle cx='80' cy='50' r='3'/%3E%3Ccircle cx='80' cy='100' r='3'/%3E%3Ccircle cx='160' cy='100' r='3'/%3E%3Cline x1='200' y1='0' x2='200' y2='70'/%3E%3Cline x1='200' y1='70' x2='300' y2='70'/%3E%3Ccircle cx='200' cy='70' r='3'/%3E%3Cline x1='30' y1='160' x2='120' y2='160'/%3E%3Cline x1='120' y1='160' x2='120' y2='220'/%3E%3Cline x1='120' y1='220' x2='240' y2='220'/%3E%3Ccircle cx='120' cy='160' r='3'/%3E%3Ccircle cx='120' cy='220' r='3'/%3E%3Ccircle cx='240' cy='220' r='3'/%3E%3Cline x1='240' y1='140' x2='240' y2='220'/%3E%3Cline x1='0' y1='260' x2='60' y2='260'/%3E%3Cline x1='60' y1='260' x2='60' y2='300'/%3E%3Ccircle cx='60' cy='260' r='3'/%3E%3Cpath d='M 160 0 L 160 30 L 270 30'/%3E%3Ccircle cx='160' cy='30' r='3'/%3E%3Ccircle cx='270' cy='30' r='3'/%3E%3Cline x1='270' y1='150' x2='300' y2='150'/%3E%3Cline x1='270' y1='150' x2='270' y2='220'/%3E%3Ccircle cx='270' cy='150' r='3'/%3E%3C/svg%3E");
  --glow-cyan: 0 0 15px rgba(0,188,212,0.25), 0 0 5px rgba(0,188,212,0.15);
  --glow-cyan-strong: 0 0 25px rgba(0,188,212,0.35), 0 0 10px rgba(0,188,212,0.25);
  --card-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 0 15px rgba(0,188,212,0.08);
}

/* ── Background circuit pattern ── */
body {
  background-image: var(--circuit-pattern);
  background-size: 300px 300px;
}

.sidebar {
  background-image: var(--circuit-pattern);
  background-size: 300px 300px;
}

/* ── Card glow shadow on ALL cards ── */
.card {
  border: 1px solid rgba(0,188,212,0.12);
  box-shadow: var(--card-shadow);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(to right, transparent, rgba(0,188,212,0.5), transparent);
  border-radius: 2px;
}

.card:hover {
  border-color: rgba(0,188,212,0.2);
  box-shadow: 0 6px 28px rgba(0,0,0,0.35), 0 0 20px rgba(0,188,212,0.12);
}

/* ── Stat cards glow ── */
.stat-card {
  border: 1px solid rgba(0,188,212,0.1);
  box-shadow: var(--card-shadow);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, rgba(0,188,212,0.4), transparent);
}

.stat-card:hover {
  border-color: rgba(0,188,212,0.25);
  box-shadow: var(--glow-cyan-strong), 0 4px 20px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}

/* ── Sidebar glowing border ── */
.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,188,212,0.05), rgba(0,188,212,0.4), rgba(0,188,212,0.05));
  z-index: 1;
}

/* ── Sidebar brand glow separator ── */
.sidebar-brand {
  position: relative;
}

.sidebar-brand::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10px;
  right: 10px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0,188,212,0.6), transparent);
}

/* ── Brand text glow ── */
.sidebar-brand h1 span {
  text-shadow: 0 0 15px rgba(0,188,212,0.6), 0 0 30px rgba(0,188,212,0.3);
}

/* ── Active nav glow bar ── */
.sidebar-nav a.active {
  border-left: 3px solid var(--accent);
  box-shadow: inset 3px 0 12px rgba(0,188,212,0.15);
}

/* ── Sidebar footer glow separator ── */
.sidebar-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10px;
  right: 10px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0,188,212,0.5), transparent);
}

.sidebar-footer {
  position: relative;
}

/* ── Top bar glow bottom border ── */
.top-bar {
  position: relative;
}

.top-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0,188,212,0.4), transparent);
  z-index: 1;
}

/* ── Table header circuit glow ── */
table thead::after {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0,188,212,0.3), transparent);
}

/* ── Button glow on hover ── */
.btn-primary:hover {
  box-shadow: var(--glow-cyan);
}

.btn:active {
  transform: scale(0.97);
}

/* ── Form input focus glow ── */
.form-control:focus {
  box-shadow: 0 0 0 3px rgba(0,188,212,0.15), 0 0 12px rgba(0,188,212,0.1);
}

/* ── Badge glow ── */
.badge-cyan {
  box-shadow: 0 0 10px rgba(0,188,212,0.25);
}

/* ── Donut chart glow ── */
canvas {
  filter: drop-shadow(0 0 15px rgba(0,188,212,0.25));
}

/* ── Modal circuit glow ── */
.modal {
  border: 1px solid rgba(0,188,212,0.2);
  box-shadow: 0 0 50px rgba(0,188,212,0.15), 0 16px 48px rgba(0,0,0,0.5);
}

.modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  border-radius: 12px 12px 0 0;
}

/* ── Quick Create FAB glow ── */
.quick-create {
  box-shadow: 0 0 25px rgba(0,188,212,0.4), 0 4px 16px rgba(0,188,212,0.3);
}

.quick-create:hover {
  box-shadow: 0 0 35px rgba(0,188,212,0.5), 0 6px 24px rgba(0,188,212,0.4);
}

/* ── Login page ── */
.login-page {
  background-image: var(--circuit-pattern);
  background-size: 300px 300px;
}

.login-page::before {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  width: 700px;
  height: 700px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0,188,212,0.12) 0%, transparent 65%);
  pointer-events: none;
}

.login-card {
  border: 1px solid rgba(0,188,212,0.2);
  box-shadow: 0 0 50px rgba(0,188,212,0.15), 0 8px 32px rgba(0,0,0,0.4);
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  border-radius: 12px 12px 0 0;
}

/* ── Tabs active glow ── */
.tab.active {
  box-shadow: 0 2px 10px rgba(0,188,212,0.2);
}

/* ── Pagination active glow ── */
.pagination button.active {
  box-shadow: 0 0 10px rgba(0,188,212,0.3);
}

/* ── Toast glow ── */
.toast.success { box-shadow: 0 0 20px rgba(0,200,83,0.3); }
.toast.error { box-shadow: 0 0 20px rgba(244,67,54,0.3); }
.toast.info { box-shadow: 0 0 20px rgba(0,188,212,0.3); }

/* ── Settings nav active glow ── */
.settings-nav-item.active {
  position: relative;
  box-shadow: inset 3px 0 12px rgba(0,188,212,0.1);
}

/* ── Light mode: softer effects ── */
[data-theme="light"] .card {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08), 0 0 8px rgba(0,188,212,0.05);
}

[data-theme="light"] .card::before {
  background: linear-gradient(to right, transparent, rgba(0,188,212,0.2), transparent);
}

[data-theme="light"] body {
  background-image: none;
}
