/* ===========================================================================
   GOD AI — Cloud Control Center  ::  Design System
   Glassmorphism · Cyberpunk · Holographic · Premium Enterprise
   =========================================================================== */

:root {
  --bg: #05060a;
  --bg-1: #080a12;
  --bg-2: #0c0f1a;
  --bg-3: #11141f;
  --panel: rgba(20, 24, 38, 0.55);
  --panel-2: rgba(28, 33, 52, 0.5);
  --glass: rgba(255, 255, 255, 0.04);
  --glass-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #e9edf7;
  --text-soft: #b7bfd2;
  --text-muted: #7e879e;
  --text-faint: #565f78;

  --blue: #29e0ff;
  --blue-2: #38bdf8;
  --purple: #b14bff;
  --purple-2: #a855f7;
  --lime: #b6ff3a;
  --lime-2: #a3e635;
  --silver: #c7d0e0;
  --pink: #ff4d8d;
  --amber: #f7b733;

  --success: #2ee6a8;
  --warning: #f7b733;
  --danger: #ff5470;
  --info: #29e0ff;

  --holo: linear-gradient(120deg, #29e0ff 0%, #b14bff 45%, #ff4d8d 70%, #b6ff3a 100%);
  --holo-soft: linear-gradient(120deg, rgba(41,224,255,0.18), rgba(177,75,255,0.18), rgba(182,255,58,0.14));
  --grad-blue: linear-gradient(135deg, #29e0ff, #38bdf8);
  --grad-purple: linear-gradient(135deg, #c084fc, #7c3aed);
  --grad-lime: linear-gradient(135deg, #d9ff6b, #84cc16);

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;

  --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 0 40px -8px rgba(41, 224, 255, 0.25);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
  --display: 'Orbitron', var(--font);

  --sidebar-w: 268px;
  --topbar-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(41,224,255,0.35); background-clip: padding-box; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

body { position: relative; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); }
.gradient-text {
  background: var(--holo);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* --------------------------------------------------------------- Backgrounds */
#neural-bg {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; opacity: 0.55; pointer-events: none;
}
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora-blob {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.45;
  mix-blend-mode: screen; animation: drift 24s ease-in-out infinite;
}
.aurora-blob.a1 { width: 46vw; height: 46vw; left: -8vw; top: -10vw; background: radial-gradient(circle, #1b6bff, transparent 65%); }
.aurora-blob.a2 { width: 40vw; height: 40vw; right: -8vw; top: 8vh; background: radial-gradient(circle, #8b2bff, transparent 65%); animation-delay: -8s; }
.aurora-blob.a3 { width: 36vw; height: 36vw; left: 30vw; bottom: -14vw; background: radial-gradient(circle, #00c2a8, transparent 65%); animation-delay: -16s; }
@keyframes drift {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(6vw,4vh) scale(1.1); }
  66% { transform: translate(-5vw,-3vh) scale(0.95); }
}

/* ------------------------------------------------------------------ Boot screen */
.boot-screen {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  background: radial-gradient(120% 120% at 50% 0%, #0a0e1c 0%, #05060a 60%);
  transition: opacity 0.6s ease, visibility 0.6s;
}
.boot-screen.gone { opacity: 0; visibility: hidden; }
.boot-logo { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.boot-orb {
  width: 92px; height: 92px; border-radius: 50%;
  background: conic-gradient(from 0deg, #29e0ff, #b14bff, #ff4d8d, #b6ff3a, #29e0ff);
  filter: blur(2px); animation: spin 3.2s linear infinite;
  box-shadow: 0 0 60px rgba(123, 97, 255, 0.55);
  position: relative;
}
.boot-orb::after {
  content: ''; position: absolute; inset: 12px; border-radius: 50%; background: #05060a;
}
.boot-mark { font-family: var(--display); font-weight: 900; font-size: 34px; letter-spacing: 6px; }
.boot-mark span { background: var(--holo); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.boot-tagline { color: var(--text-muted); font-size: 13px; letter-spacing: 1px; }
.boot-bar { width: 220px; height: 4px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: 40%; background: var(--holo); border-radius: 999px; animation: load 1.4s ease-in-out infinite; }
@keyframes load { 0% { transform: translateX(-120%); } 100% { transform: translateX(360%); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ App shell */
.app-root { position: relative; z-index: 1; height: 100dvh; }
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100dvh; }
.shell.collapsed { --sidebar-w: 76px; }

/* Sidebar */
.sidebar {
  position: relative; z-index: 5;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(12,15,26,0.9), rgba(8,10,18,0.92));
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.sidebar-head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; }
.brand-orb {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  background: var(--holo); position: relative; box-shadow: 0 6px 22px rgba(123,97,255,0.45);
  display: grid; place-items: center; font-family: var(--display); font-weight: 900; color: #05060a; font-size: 16px;
}
.brand-name { font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: 2px; line-height: 1; }
.brand-sub { font-size: 10px; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; margin-top: 3px; }
.collapsed .brand-text, .collapsed .nav-label, .collapsed .nav-section-title, .collapsed .side-foot-text { display: none; }
.collapsed .sidebar-head { justify-content: center; padding: 18px 0 14px; }
.collapsed .nav-item { justify-content: center; padding: 11px 0; }

.nav-scroll { flex: 1; overflow-y: auto; padding: 6px 12px 16px; }
.nav-section-title { font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-faint); margin: 16px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; border-radius: var(--r-sm); color: var(--text-soft);
  font-size: 13.5px; font-weight: 500; cursor: pointer; border: 1px solid transparent;
  background: transparent; text-align: left; position: relative; transition: all 0.16s ease;
}
.nav-item .nav-ic { width: 20px; height: 20px; flex-shrink: 0; opacity: 0.85; }
.nav-item:hover { background: var(--glass); color: var(--text); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(41,224,255,0.16), rgba(177,75,255,0.16));
  border-color: rgba(41,224,255,0.3); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 6px 18px -10px rgba(41,224,255,0.6);
}
.nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 999px; background: var(--holo);
}
.nav-item .nav-badge {
  margin-left: auto; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: rgba(255,84,112,0.18); color: #ff8aa3; border: 1px solid rgba(255,84,112,0.3);
}
.collapsed .nav-item .nav-badge { position: absolute; top: 4px; right: 6px; margin: 0; padding: 1px 5px; }

.side-foot { padding: 12px; border-top: 1px solid var(--border); }
.bridge-chip {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--glass); border: 1px solid var(--border); cursor: pointer; width: 100%;
}
.bridge-chip:hover { border-color: var(--border-strong); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 10px currentColor; flex-shrink: 0; }
.dot.online { background: var(--success); }
.dot.pulse { animation: pulse 1.6s ease-in-out infinite; }

/* Topbar */
.main-col { display: flex; flex-direction: column; min-width: 0; height: 100dvh; }
.topbar {
  height: var(--topbar-h); flex-shrink: 0;
  display: flex; align-items: center; gap: 14px; padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(10,13,22,0.7), rgba(10,13,22,0.4));
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.icon-btn {
  width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; cursor: pointer;
  border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--glass); color: var(--text-soft);
  transition: all 0.15s ease; position: relative;
}
.icon-btn:hover { color: #fff; border-color: var(--border-strong); background: var(--glass-strong); }
.icon-btn svg { width: 20px; height: 20px; }
.page-title { display: flex; flex-direction: column; min-width: 0; }
.page-title h1 { font-size: 18px; font-weight: 700; letter-spacing: 0.2px; white-space: nowrap; }
.page-title .crumbs { font-size: 11px; color: var(--text-muted); }
.topbar-search {
  margin-left: auto; display: flex; align-items: center; gap: 9px; min-width: 220px;
  padding: 9px 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--border); color: var(--text-muted);
}
.topbar-search input { border: none; background: transparent; outline: none; width: 100%; font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; color: #05060a; background: var(--grad-blue); cursor: pointer;
  border: 2px solid rgba(255,255,255,0.15);
}

/* Content */
.content { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 24px; scroll-behavior: smooth; }
.content-inner { max-width: 1320px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .ph-title { font-size: 24px; font-weight: 800; letter-spacing: 0.2px; }
.page-head .ph-sub { color: var(--text-muted); font-size: 13.5px; margin-top: 4px; max-width: 720px; }
.page-head .ph-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Mobile */
.menu-toggle { display: none; }
.mobile-nav { display: none; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 60; transform: translateX(-105%);
    transition: transform 0.28s cubic-bezier(.22,1,.36,1); box-shadow: 30px 0 80px rgba(0,0,0,0.6);
  }
  .sidebar.open { transform: translateX(0); }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 55; backdrop-filter: blur(2px); }
  .menu-toggle { display: grid; }
  .topbar-search { display: none; }
  .content { padding: 16px 14px 92px; }
  .mobile-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); gap: 4px; justify-content: space-around;
    background: rgba(8,10,18,0.92); backdrop-filter: blur(20px); border-top: 1px solid var(--border);
  }
  .mobile-nav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px;
    background: none; border: none; color: var(--text-muted); font-size: 10px; cursor: pointer; border-radius: 10px;
  }
  .mobile-nav button.active { color: var(--blue); }
  .mobile-nav button svg { width: 21px; height: 21px; }
}

/* ------------------------------------------------------------------ Cards */
.card {
  background: var(--panel); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px;
  position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.card.glow::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 120% at 0% 0%, rgba(41,224,255,0.1), transparent 40%);
}
.card.holo { border: 1px solid transparent; background:
  linear-gradient(var(--panel), var(--panel)) padding-box,
  var(--holo) border-box; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h3 { font-size: 15px; font-weight: 700; }
.card-h .sub { font-size: 12px; color: var(--text-muted); }
.card-link { font-size: 12px; color: var(--blue); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.card-link:hover { text-decoration: underline; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g6 { grid-template-columns: repeat(6, 1fr); }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
.span4 { grid-column: span 4; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2,1fr); } .g6 { grid-template-columns: repeat(3,1fr); } .g3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 720px) { .g2,.g3,.g4 { grid-template-columns: 1fr; } .g6 { grid-template-columns: repeat(2,1fr); } .span2,.span3,.span4 { grid-column: span 1; } }

/* Stat card */
.stat {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 18px;
  position: relative; overflow: hidden; backdrop-filter: blur(18px);
}
.stat::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent, var(--blue)); opacity: 0.9; }
.stat .stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat .stat-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--border); color: var(--accent, var(--blue)); }
.stat .stat-ic svg { width: 20px; height: 20px; }
.stat .stat-val { font-size: 27px; font-weight: 800; margin-top: 12px; font-variant-numeric: tabular-nums; letter-spacing: -0.5px; }
.stat .stat-label { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.stat .stat-trend { font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; }
.trend-up { color: var(--success); } .trend-down { color: var(--danger); } .trend-flat { color: var(--text-muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--glass); color: var(--text); font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: all 0.15s ease; white-space: nowrap; user-select: none;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { border-color: var(--border-strong); background: var(--glass-strong); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--grad-blue); color: #05060a; border-color: transparent; box-shadow: 0 8px 24px -10px rgba(41,224,255,0.8); }
.btn.primary:hover { box-shadow: 0 10px 30px -8px rgba(41,224,255,0.9); }
.btn.holo { background: var(--holo); color: #05060a; border-color: transparent; font-weight: 700; }
.btn.purple { background: var(--grad-purple); color: #fff; border-color: transparent; }
.btn.lime { background: var(--grad-lime); color: #05060a; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.danger { background: rgba(255,84,112,0.14); border-color: rgba(255,84,112,0.35); color: #ff8aa3; }
.btn.sm { padding: 7px 12px; font-size: 12px; border-radius: 10px; }
.btn.icon { padding: 9px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Pills / badges / chips */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--glass); border: 1px solid var(--border); color: var(--text-soft); }
.pill.active { background: linear-gradient(135deg, rgba(41,224,255,0.2), rgba(177,75,255,0.2)); border-color: rgba(41,224,255,0.35); color: #fff; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge.b-blue { background: rgba(41,224,255,0.14); color: var(--blue); }
.badge.b-purple { background: rgba(177,75,255,0.16); color: #cf9bff; }
.badge.b-lime { background: rgba(182,255,58,0.14); color: var(--lime); }
.badge.b-green { background: rgba(46,230,168,0.14); color: var(--success); }
.badge.b-amber { background: rgba(247,183,51,0.14); color: var(--amber); }
.badge.b-red { background: rgba(255,84,112,0.14); color: var(--danger); }
.badge.b-gray { background: var(--glass); color: var(--text-muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; font-size: 12px; background: var(--glass); border: 1px solid var(--border); cursor: pointer; transition: all 0.14s; }
.chip:hover, .chip.active { border-color: var(--blue); color: #fff; background: rgba(41,224,255,0.1); }

/* Inputs */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--border);
  background: rgba(8,10,18,0.6); color: var(--text); font-size: 14px; outline: none; transition: all 0.15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: rgba(41,224,255,0.5); box-shadow: 0 0 0 3px rgba(41,224,255,0.12); }
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.textarea { resize: vertical; min-height: 84px; font-family: inherit; line-height: 1.55; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-faint); }
.input-icon .input { padding-left: 42px; }

/* Toggle */
.toggle { width: 46px; height: 26px; border-radius: 999px; background: rgba(255,255,255,0.12); position: relative; cursor: pointer; transition: background 0.2s; flex-shrink: 0; border: none; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.toggle.on { background: var(--grad-blue); }
.toggle.on::after { transform: translateX(20px); }

/* Tabs */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--glass); border: 1px solid var(--border); border-radius: var(--r-sm); overflow-x: auto; }
.tabs::-webkit-scrollbar { height: 0; }
.tab { padding: 8px 15px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; white-space: nowrap; transition: all 0.14s; border: none; background: transparent; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--glass-strong); color: #fff; box-shadow: inset 0 0 0 1px var(--border); }

/* Progress */
.progress { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--grad-blue); transition: width 0.6s cubic-bezier(.22,1,.36,1); }
.progress.lime > span { background: var(--grad-lime); }
.progress.purple > span { background: var(--grad-purple); }
.progress.holo > span { background: var(--holo); }
.progress.danger > span { background: linear-gradient(135deg, #ff5470, #ff8aa3); }

/* List rows */
.row-list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-sm);
  border: 1px solid transparent; transition: all 0.14s;
}
.row:hover { background: var(--glass); border-color: var(--border); }
.row .row-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--border); flex-shrink: 0; }
.row .row-main { min-width: 0; flex: 1; }
.row .row-title { font-size: 13.5px; font-weight: 600; }
.row .row-sub { font-size: 12px; color: var(--text-muted); }

.divider { height: 1px; background: var(--border); margin: 16px 0; border: none; }
.muted { color: var(--text-muted); }
.soft { color: var(--text-soft); }
.center { text-align: center; }
.flex { display: flex; }
.col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.fw { flex: 1; } .w-full { width: 100%; }
.t-xs { font-size: 11px; } .t-sm { font-size: 12.5px; } .t-lg { font-size: 16px; }
.fz-700 { font-weight: 700; } .fz-800 { font-weight: 800; }

/* ------------------------------------------------------------------ Charts */
.chart svg { display: block; width: 100%; overflow: visible; }
.spark { width: 100%; height: 38px; }
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { position: relative; flex-shrink: 0; }
.donut .donut-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut .donut-center .dc-val { font-size: 22px; font-weight: 800; }
.donut .donut-center .dc-label { font-size: 10px; color: var(--text-muted); }
.legend { display: flex; flex-direction: column; gap: 8px; }
.legend .li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 130px; }
.bars .bar { flex: 1; border-radius: 6px 6px 0 0; background: var(--grad-blue); position: relative; min-height: 4px; transition: height 0.6s; }
.bars .bar.alt { background: var(--grad-purple); }
.bar-label { display: flex; gap: 8px; margin-top: 8px; }
.bar-label span { flex: 1; text-align: center; font-size: 10px; color: var(--text-faint); }
.gauge-num { font-size: 30px; font-weight: 800; }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--r-sm); border: 1px solid var(--border); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 540px; }
table.tbl th { text-align: left; padding: 12px 14px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-faint); background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border); white-space: nowrap; }
table.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--border); }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover { background: var(--glass); }

/* Avatars */
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #05060a; flex-shrink: 0; }
.av-group { display: flex; }
.av-group .av { margin-left: -8px; border: 2px solid var(--bg-2); }
.av-group .av:first-child { margin-left: 0; }
.av-xl { width: 64px; height: 64px; font-size: 22px; }

/* Kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: 290px; gap: 14px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.kcol { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; }
.kcol-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 13px; font-weight: 700; }
.kcard { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px; margin-bottom: 10px; cursor: grab; transition: all 0.14s; }
.kcard:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.kcard .kt { font-size: 13px; font-weight: 600; margin-bottom: 8px; }

/* Chat / messages */
.chat-wrap { display: flex; flex-direction: column; height: 100%; }
.chat-feed { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 6px 2px; }
.msg { max-width: 84%; padding: 12px 15px; border-radius: 16px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; position: relative; }
.msg.user { align-self: flex-end; background: linear-gradient(135deg, rgba(41,224,255,0.18), rgba(177,75,255,0.18)); border: 1px solid rgba(41,224,255,0.25); border-bottom-right-radius: 5px; }
.msg.ai { align-self: flex-start; background: var(--glass); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.msg .msg-meta { font-size: 10.5px; color: var(--text-muted); margin-top: 6px; display: flex; gap: 8px; align-items: center; }
.msg.thinking { color: var(--text-muted); font-style: italic; align-self: flex-start; }
.typing { display: inline-flex; gap: 4px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); animation: blink 1.2s infinite; }
.typing span:nth-child(2){ animation-delay: 0.2s; } .typing span:nth-child(3){ animation-delay: 0.4s; }
@keyframes blink { 0%,60%,100%{ opacity: 0.25; } 30%{ opacity: 1; } }
.composer { margin-top: 14px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; }
.composer:focus-within { border-color: rgba(41,224,255,0.4); }
.composer textarea { width: 100%; border: none; background: transparent; outline: none; resize: none; color: var(--text); font-size: 14px; line-height: 1.5; max-height: 160px; }
.composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }

/* Terminal */
.terminal { background: #05070d; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; height: 100%; }
.term-tabs { display: flex; align-items: center; gap: 2px; padding: 8px 8px 0; background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border); overflow-x: auto; }
.term-tab { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 9px 9px 0 0; font-size: 12px; font-family: var(--mono); color: var(--text-muted); cursor: pointer; white-space: nowrap; border: 1px solid transparent; border-bottom: none; }
.term-tab.active { background: #05070d; color: var(--lime); border-color: var(--border); }
.term-tab .x { opacity: 0.5; } .term-tab .x:hover { opacity: 1; color: var(--danger); }
.term-body { flex: 1; overflow-y: auto; padding: 14px; font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: #cdd6e6; }
.term-line { white-space: pre-wrap; word-break: break-word; }
.term-line.cmd { color: var(--lime); } .term-line.err { color: var(--danger); } .term-line.sys { color: var(--text-muted); } .term-line.ok { color: var(--success); }
.term-prompt { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.term-prompt .ps { color: var(--blue); font-family: var(--mono); font-size: 13px; }
.term-prompt input { flex: 1; background: transparent; border: none; outline: none; color: #fff; font-family: var(--mono); font-size: 13px; }

/* IDE */
.ide { display: grid; grid-template-columns: 240px 1fr; gap: 0; height: calc(100dvh - var(--topbar-h) - 48px); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--bg-1); }
.ide-files { border-right: 1px solid var(--border); overflow-y: auto; padding: 10px; background: rgba(255,255,255,0.015); }
.ide-file { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 12.5px; color: var(--text-soft); cursor: pointer; }
.ide-file:hover { background: var(--glass); } .ide-file.active { background: var(--glass-strong); color: #fff; }
.ide-file.indent { padding-left: 24px; }
.ide-main { display: flex; flex-direction: column; min-width: 0; }
.ide-tabbar { display: flex; gap: 1px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); overflow-x: auto; }
.ide-tab { padding: 9px 14px; font-size: 12px; font-family: var(--mono); color: var(--text-muted); border-right: 1px solid var(--border); cursor: pointer; white-space: nowrap; }
.ide-tab.active { background: var(--bg-1); color: var(--blue); }
.code { flex: 1; overflow: auto; padding: 16px; font-family: var(--mono); font-size: 13px; line-height: 1.7; tab-size: 2; }
.code .ln { color: var(--text-faint); user-select: none; display: inline-block; width: 30px; text-align: right; margin-right: 16px; }
.tok-key { color: #c084fc; } .tok-str { color: var(--lime); } .tok-fn { color: var(--blue); } .tok-num { color: var(--amber); } .tok-com { color: var(--text-faint); font-style: italic; } .tok-punc { color: var(--text-soft); }

/* ------------------------------------------------------------------ Voice Center */
.voice-stage { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 26px 0; }
.mic-orb { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; position: relative;
  background: radial-gradient(circle at 50% 35%, rgba(41,224,255,0.25), rgba(177,75,255,0.18) 60%, transparent 75%);
  border: 1px solid rgba(41,224,255,0.3); transition: transform 0.2s; }
.mic-orb:hover { transform: scale(1.04); }
.mic-orb svg { width: 52px; height: 52px; color: #fff; z-index: 2; }
.mic-orb .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(41,224,255,0.4); }
.mic-orb.listening .ring { animation: ripple 1.8s ease-out infinite; }
.mic-orb.listening { border-color: var(--lime); box-shadow: 0 0 60px rgba(182,255,58,0.4); }
@keyframes ripple { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.7); opacity: 0; } }
.wave { display: flex; align-items: center; gap: 3px; height: 40px; }
.wave i { width: 3px; background: var(--holo); border-radius: 3px; height: 8px; animation: wv 0.9s ease-in-out infinite; }
.wave i:nth-child(odd){ animation-delay: 0.15s; } .wave i:nth-child(3n){ animation-delay: 0.3s; }
@keyframes wv { 0%,100%{ height: 8px; } 50%{ height: 34px; } }
.pipeline { display: flex; flex-direction: column; gap: 8px; }
.pstep { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--glass); opacity: 0.5; transition: all 0.3s; }
.pstep.active { opacity: 1; border-color: rgba(41,224,255,0.4); background: rgba(41,224,255,0.06); }
.pstep.done { opacity: 1; border-color: rgba(46,230,168,0.3); }
.pstep .pnum { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--glass); flex-shrink: 0; }
.pstep.done .pnum { background: var(--success); color: #05060a; }
.pstep.active .pnum { background: var(--grad-blue); color: #05060a; }

/* APGE prompt builder */
.prompt-out { background: #05070d; border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; max-height: 420px; overflow-y: auto; }
.mode-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.mode-card { padding: 14px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--glass); cursor: pointer; transition: all 0.15s; }
.mode-card:hover { border-color: var(--border-strong); }
.mode-card.active { border-color: rgba(41,224,255,0.5); background: rgba(41,224,255,0.08); }
.mode-card .mc-t { font-weight: 700; font-size: 13.5px; } .mode-card .mc-d { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
@media (max-width: 720px){ .mode-grid { grid-template-columns: repeat(2,1fr); } }

/* Monitoring heatmap */
.heat { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.heat .cell { aspect-ratio: 1; border-radius: 3px; background: rgba(255,255,255,0.05); }
.score-ring { display: grid; place-items: center; }

/* Auth */
.auth-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px; position: relative; z-index: 1; }
.auth-card { width: min(440px, 94vw); background: var(--panel); backdrop-filter: blur(26px); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 32px 28px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.auth-card.holo { border: 1px solid transparent; background: linear-gradient(var(--panel),var(--panel)) padding-box, var(--holo) border-box; }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 22px; }
.auth-logo .brand-orb { width: 56px; height: 56px; border-radius: 16px; font-size: 22px; }
.auth-card h2 { font-size: 22px; font-weight: 800; text-align: center; }
.auth-card .sub { text-align: center; color: var(--text-muted); font-size: 13px; margin-top: 6px; margin-bottom: 22px; }
.oauth-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0; }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 11px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--glass); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.oauth-btn:hover { border-color: var(--border-strong); background: var(--glass-strong); }
.oauth-btn svg { width: 18px; height: 18px; }
.auth-sep { display: flex; align-items: center; gap: 12px; color: var(--text-faint); font-size: 11px; margin: 6px 0 16px; }
.auth-sep::before, .auth-sep::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-foot { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 18px; }
.auth-foot a { color: var(--blue); cursor: pointer; font-weight: 600; }
.otp-row { display: flex; gap: 10px; justify-content: center; margin: 8px 0 4px; }
.otp-row input { width: 48px; height: 56px; text-align: center; font-size: 22px; font-weight: 700; border-radius: var(--r-sm); border: 1px solid var(--border); background: rgba(8,10,18,0.7); color: #fff; outline: none; }
.otp-row input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(41,224,255,0.15); }
.welcome-hero { text-align: center; max-width: 560px; }
.welcome-hero h1 { font-family: var(--display); font-size: clamp(34px, 7vw, 56px); font-weight: 900; letter-spacing: 2px; line-height: 1.05; }
.welcome-hero p { color: var(--text-soft); font-size: 15px; margin: 18px 0 28px; line-height: 1.6; }
.feature-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 28px; }

/* Modal */
.modal-scrim { position: fixed; inset: 0; z-index: 200; background: rgba(3,4,8,0.7); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 20px; animation: fade 0.2s; }
.modal { width: min(560px, 96vw); max-height: 88dvh; overflow-y: auto; background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: var(--r-lg); box-shadow: var(--shadow); animation: pop 0.22s cubic-bezier(.22,1,.36,1); }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-h h3 { font-size: 16px; font-weight: 700; }
.modal-b { padding: 20px; }
.modal-f { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
@keyframes pop { from { transform: scale(0.95) translateY(10px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

/* Toasts */
.toast-root { position: fixed; bottom: 22px; right: 22px; z-index: 300; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast { display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--border-strong); box-shadow: var(--shadow); animation: toastIn 0.3s cubic-bezier(.22,1,.36,1); }
.toast .t-ic { width: 22px; height: 22px; flex-shrink: 0; }
.toast.ok .t-ic { color: var(--success); } .toast.err .t-ic { color: var(--danger); } .toast.info .t-ic { color: var(--blue); } .toast.warn .t-ic { color: var(--warning); }
.toast .t-title { font-size: 13px; font-weight: 700; } .toast .t-msg { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
@keyframes toastIn { from { transform: translateX(30px); opacity: 0; } }
@media (max-width: 600px){ .toast-root { left: 12px; right: 12px; bottom: 92px; max-width: none; } }

/* Voice orb floating */
.voice-fab { position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; border: none;
  background: var(--holo); box-shadow: 0 12px 36px -10px rgba(177,75,255,0.7); color: #05060a; }
.voice-fab svg { width: 26px; height: 26px; }
.voice-fab.listening { animation: pulse 1.2s ease-in-out infinite; }
@media (max-width: 980px){ .voice-fab { bottom: 84px; right: 14px; } }

/* Empty / loaders */
.empty { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty svg { width: 46px; height: 46px; opacity: 0.4; margin-bottom: 12px; }
.skel { background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.09), rgba(255,255,255,0.04)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes pulse { 0%,100%{ box-shadow: 0 0 0 0 rgba(46,230,168,0.5); } 50%{ box-shadow: 0 0 0 8px rgba(46,230,168,0); } }
.view-enter { animation: viewIn 0.32s cubic-bezier(.22,1,.36,1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }
.hover-rise { transition: transform 0.16s ease, border-color 0.16s; }
.hover-rise:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.scanline { position: relative; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); display: inline-block; animation: pulse 1.6s infinite; }
.kbd { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 6px; background: var(--glass); border: 1px solid var(--border); color: var(--text-soft); }

@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.001s !important; transition-duration: 0.001s !important; } }

