
:root {
  --bg:#0a0f1e;
  --surface:#0d1526;
  --surface2:rgba(13,21,38,0.7);
  --border:rgba(34,211,238,0.1);
  --border2:rgba(34,211,238,0.3);
  --cyan:#22d3ee;
  --cyan-dim:rgba(34,211,238,0.12);
  --blue:     #3b82f6;
  --red:      #ef4444;
  --amber:    #f59e0b;
  --green:    #10b981;
  --purple:   #7c6bff;
  --gray:     #4b5563;
  --text:     #e2e8f0;
  --muted:    #64748b;
  --sidebar:  240px;
  --mono:     'JetBrains Mono', monospace;
  --sans:     'Plus Jakarta Sans', sans-serif;
  --glass:    rgba(13,17,40,0.6);
  --glass-border: rgba(255,255,255,0.08);
  --glow-cyan:0 0 20px rgba(34,211,238,0.3);
  --glow-purple: 0 0 20px rgba(124,107,255,0.3);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 15% 15%, rgba(124,107,255,0.35) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 5%, rgba(0,212,170,0.25) 0%, transparent 40%),
    radial-gradient(ellipse at 70% 85%, rgba(59,130,246,0.2) 0%, transparent 45%),
    radial-gradient(ellipse at 5% 75%, rgba(124,107,255,0.2) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0.5) 0%, transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  display: flex;
  min-height: 100vh;
  overflow-x: clip;
}

/* ─── LOGO SPIN ──────────────────────────── */
.logo-icon {
  width: 36px; height: 36px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  perspective: 120px;
}
.logo-icon img {
  width: 36px; height: 36px;
  border-radius: 8px;
  object-fit: cover;
  
  filter: drop-shadow(0 0 6px #00d4aa66);
}
to   { transform: rotateY(360deg); }
}
.logo-icon img:hover {
  animation-duration: 2s;
}

/* ─── SIDEBAR ──────────────────────────────── */
.sidebar {
  width: var(--sidebar);
  min-height: 100vh;
  background: rgba(8,12,30,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(124,107,255,0.2);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 200;
  transition: transform 0.25s ease;
  box-shadow: 4px 0 30px rgba(0,0,0,0.3);
}
.sidebar-logo {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.logo-wrap { display: flex; align-items: center; gap: 10px; }
.logo-text { font-size: 15px; font-weight: 600; }
.logo-sub  { font-size: 10px; color: var(--muted); font-family: var(--mono); margin-top: 1px; }
.sidebar-close {
  display: none;
  background: none; border: none;
  color: var(--muted); font-size: 20px;
  cursor: pointer; padding: 4px;
  line-height: 1;
}
.sidebar-user {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all .25s;
}
.user-card:hover {
  border-color: rgba(0,212,170,0.4);
  background: rgba(0,212,170,0.05);
  box-shadow: 0 0 16px rgba(0,212,170,0.1);
}
.user-avatar {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #00d4aa22, #00d4aa11);
  border: 1px solid #00d4aa44;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; flex-shrink: 0;
  color: var(--cyan); font-family: var(--mono);
  letter-spacing: -0.5px;
}
.user-avatar.admin-av {
  background: linear-gradient(135deg, #a855f722, #a855f711);
  border-color: #a855f744; color: #c084fc;
}
.user-name { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.user-plan {
  font-size: 9px; font-family: var(--mono); font-weight: 700;
  padding: 2px 7px; border-radius: 99px; margin-top: 3px; display: inline-block;
  letter-spacing: .04em; text-transform: uppercase;
}
.plan-free { background: #4b556333; color: var(--muted); }
.plan-pro     { background: #00d4aa22; color: var(--cyan);  }
.plan-admin   { background: #a855f722; color: var(--purple); }
.sidebar-nav {
  flex: 1; padding: 14px 10px;
  display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto;
}
.nav-label {
  font-size: 10px; font-family: var(--mono);
  color: var(--muted); letter-spacing: 1.2px;
  text-transform: uppercase; padding: 10px 10px 5px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 99px;
  color: var(--muted); text-decoration: none;
  font-size: 13px; font-weight: 500;
  transition: all .2s cubic-bezier(.34,1.56,.64,1);
  position: relative; overflow: hidden;
  border: 1px solid transparent;
}
.nav-item::before {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg,rgba(255,255,255,.08) 0%,rgba(255,255,255,0) 60%);
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.nav-item:hover {
  background: rgba(255,255,255,.05);
  color: var(--text);
  border-color: rgba(255,255,255,.08);
  transform: translateX(2px);
}
.nav-item:hover::before { opacity: 1; }
.nav-item.active {
  background: linear-gradient(135deg, rgba(0,212,170,.2), rgba(124,107,255,.15));
  backdrop-filter: blur(10px);
  box-shadow: 0 0 20px rgba(0,212,170,0.15), inset 0 1px 0 rgba(255,255,255,0.1);
  color: #00ffcc; font-weight: 700;
  border-color: rgba(0,212,170,.5);
  box-shadow: 0 0 20px rgba(0,212,170,.25), inset 0 1px 0 rgba(255,255,255,.15);
  text-shadow: 0 0 12px rgba(0,212,170,.6);
}
.nav-item.active::before { opacity: 1; }
.nav-svg {
  font-size: 14px !important;
  font-style: normal;
  width: 16px;
  text-align: center;
  color: inherit;
  opacity: 0.8;
}

.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.ni svg { width: 15px; height: 15px; display: block; }
@keyframes ni-spin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
@keyframes ni-pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.6;transform:scale(.85)} }
@keyframes ni-ping { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.2);opacity:.7} }
@keyframes ni-dash { 0%{stroke-dashoffset:100} 100%{stroke-dashoffset:0} }
.ni-spin svg { animation: ni-spin 6s linear infinite; }
.ni-pulse svg { animation: ni-pulse 2s ease-in-out infinite; }
.ni-ping svg { animation: ni-ping 1.8s ease-in-out infinite; }
.nav-item.active .ni-spin svg { animation-duration: 2s !important; }
.nav-item.active .ni-pulse svg { animation-duration: .8s !important; }
.nav-item.active .ni-ping svg { animation-duration: .8s !important; }
.sidebar-footer { padding: 14px; border-top: 1px solid var(--border); }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px var(--green);
  animation: pulse 2s infinite; display: inline-block;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }
.logout-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-radius: 6px;
  background: transparent; border: 1px solid var(--border);
  color: var(--muted); font-size: 12px; cursor: pointer;
  text-decoration: none; transition: all 0.15s; width: 100%;
  font-family: var(--sans); margin-top: 8px;
}
.logout-btn:hover {
  border-color: rgba(239,68,68,0.4);
  color: var(--red);
  background: rgba(239,68,68,0.06);
}

/* ─── OVERLAY (mobile) ───────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 199;
}
.sidebar-overlay.show { display: block; }

/* ─── MAIN ─────────────────────────────────── */
.main {
  margin-left: var(--sidebar);
  flex: 1; display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}
.topbar {
  height: 56px; background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.hamburger {
  display: none;
  background: none; border: none;
  color: var(--muted); font-size: 20px;
  cursor: pointer; padding: 4px;
  line-height: 1;
}
.topbar-title { font-size: 15px; font-weight: 500; }
.topbar-right {
  display: flex; align-items: center;
  gap: 10px; font-size: 12px; color: var(--muted);
}
.content { padding: 20px 24px; flex: 1; }

/* ─── BADGES ─────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 20px;
  font-size: 11px; font-family: var(--mono); font-weight: 500;
}
.badge-green  { background: #10b98122; color: var(--green); border: 1px solid #10b98133; }
.badge-red    { background: #ef444422; color: var(--red);   border: 1px solid #ef444433; }
.badge-amber  { background: #f59e0b22; color: var(--amber); border: 1px solid #f59e0b33; }
.badge-gray   { background: #4b556322; color: var(--muted); border: 1px solid #4b556333; }
.badge-cyan   { background: var(--cyan-dim); color: var(--cyan); border: 1px solid #00d4aa33; }
.badge-purple { background: #a855f722; color: var(--purple); border: 1px solid #a855f733; }
.badge-blue   { background: #3b82f622; color: var(--blue);  border: 1px solid #3b82f633; }

/* ─── CARDS ─────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
}
.card-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 16px;
  flex-wrap: wrap; gap: 8px;
}
.card-title {
  font-size: 13px; font-weight: 500; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.8px; font-family: var(--mono);
}

/* ─── STAT CARDS ─────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin-bottom: 20px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px;
  position: relative; overflow: hidden; transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--border2); }
.stat-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
}
.stat-card.cyan::before   { background: var(--cyan);   }
.stat-card.green::before  { background: var(--green);  }
.stat-card.red::before    { background: var(--red);    }
.stat-card.amber::before  { background: var(--amber);  }
.stat-card.blue::before   { background: var(--blue);   }
.stat-card.purple::before { background: var(--purple); }
.stat-icon  { font-size: 20px; margin-bottom: 10px; display: block; }
.stat-value { font-size: 28px; font-weight: 600; font-family: var(--mono); line-height: 1; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* ─── TABLE ─────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead tr { border-bottom: 1px solid var(--border); }
thead th {
  text-align: left; padding: 10px 12px;
  font-size: 11px; font-family: var(--mono);
  color: var(--muted); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.5px;
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }
tbody td { padding: 10px 12px; vertical-align: middle; }
.mono  { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); }

/* ─── FORMS ─────────────────────────────── */
.input-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inp {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 14px;
  color: var(--text); font-size: 13px; font-family: var(--sans);
  outline: none; transition: border-color 0.15s; flex: 1; min-width: 0;
}
.inp:focus { border-color: var(--cyan); }
.inp::placeholder { color: var(--gray); }
.btn {
  padding: 9px 20px; border-radius: 99px; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: var(--sans); letter-spacing: -.2px;
  display: inline-flex; align-items: center;
  gap: 6px; white-space: nowrap;
  position: relative; overflow: hidden;
  transition: all .2s cubic-bezier(.34,1.56,.64,1);
}
.btn::before {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg,rgba(255,255,255,.14) 0%,rgba(255,255,255,0) 60%);
  pointer-events: none;
}
.btn::after {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 50%;
  border-radius: 99px 99px 0 0;
  background: linear-gradient(to bottom,rgba(255,255,255,.1),transparent);
  pointer-events: none;
}
.btn:hover { transform: translateY(-2px) scale(1.03); }
.btn:active { transform: scale(.97); }
.btn-primary {
  background: rgba(5,8,20,0.7);
  color: #00d4aa;
  border: 1px solid rgba(0,212,170,0.35);
  box-shadow: 0 0 15px rgba(0,212,170,0.1), inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  z-index: 0;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,212,170,0.15), transparent);
  animation: btn-shimmer 3s ease-in-out infinite;
  pointer-events: none;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(0,212,170,0.08) 0%, transparent 50%);
  pointer-events: none;
}
@keyframes btn-shimmer {
  0% { left: -100%; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: 200%; opacity: 0; }
}
.btn-primary:hover {
  background: rgba(0,212,170,0.08) !important;
  border-color: rgba(0,212,170,0.7) !important;
  box-shadow: 0 0 25px rgba(0,212,170,0.3), 0 0 50px rgba(0,212,170,0.1), inset 0 1px 0 rgba(255,255,255,0.1) !important;
  color: #00ffdd !important;
  transform: translateY(-2px) scale(1.02) !important;
}
.btn-danger {
  background: rgba(239,68,68,.1);
  color: var(--red); border: 1px solid rgba(239,68,68,.25);
  box-shadow: 0 0 16px rgba(239,68,68,.1), inset 0 1px 0 rgba(255,255,255,.06);
}
.btn-danger:hover { box-shadow: 0 0 28px rgba(239,68,68,.25); background: rgba(239,68,68,.16); }
.btn-ghost {
  background: rgba(255,255,255,.05);
  color: var(--text); border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.btn-ghost:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.2); }
.btn-purple {
  background: rgba(124,107,255,.12);
  color: #a89bff; border: 1px solid rgba(124,107,255,.3);
  box-shadow: 0 0 20px rgba(124,107,255,.18), inset 0 1px 0 rgba(255,255,255,.08);
}
.btn-purple:hover { box-shadow: 0 0 30px rgba(124,107,255,.35); background: rgba(124,107,255,.2); }
.btn-success {
  background: rgba(6,214,160,.12);
  color: var(--green); border: 1px solid rgba(6,214,160,.3);
  box-shadow: 0 0 20px rgba(6,214,160,.15), inset 0 1px 0 rgba(255,255,255,.08);
}
.btn-success:hover { box-shadow: 0 0 30px rgba(6,214,160,.3); }
.btn-sm { padding: 6px 14px; font-size: 11px; border-radius: 99px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }

/* ─── UTILS ─────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mt-4   { margin-top: 16px; }
.mt-6   { margin-top: 22px; }
.empty-state {
  text-align: center; padding: 40px 20px;
  color: var(--muted); font-size: 13px;
}
.empty-state .empty-icon { font-size: 36px; margin-bottom: 10px; display: block; }

/* ─── TOAST ──────────────────────────────── */
.toast {
  position: fixed; bottom: 20px; right: 20px;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: 10px; padding: 12px 16px;
  font-size: 13px; color: var(--text);
  z-index: 999; display: none;
  gap: 8px; align-items: center;
  max-width: 300px; box-shadow: 0 8px 32px #00000066;
}
.toast.show { display: flex; }
.toast.ok  { border-color: #10b98144; }
.toast.err { border-color: #ef444444; }

/* ─── MODAL ──────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 300; display: none;
  align-items: center; justify-content: center;
  padding: 16px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 14px; padding: 24px;
  width: 100%; max-width: 400px;
  box-shadow: 0 20px 60px #000000aa;
}
.modal-title { font-size: 16px; font-weight: 600; margin-bottom: 14px; }

/* ─── SCROLLBAR ──────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

/* ════════════════════════════════════════
   MOBILE RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); width: 260px; box-shadow: 4px 0 20px rgba(0,0,0,0.5); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .main { margin-left: 0; }
  .hamburger { display: block; }
  .topbar { padding: 0 16px; }
  #refresh-countdown { display: none; }
  .badge-purple { display: none; }
  .content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 24px; }
  .stat-icon  { font-size: 18px; margin-bottom: 8px; }
  .grid-2 { grid-template-columns: 1fr; gap: 14px; }
  .input-row { flex-direction: column; align-items: stretch; }
  .input-row .btn { width: 100%; justify-content: center; }
  .card { padding: 14px; }
  .card-header { flex-direction: column; align-items: flex-start; }
  .table-wrap { margin: 0 -14px; padding: 0 14px; }
  thead th, tbody td { padding: 8px 10px; }
  .toast { left: 16px; right: 16px; max-width: none; bottom: 16px; }
  .modal { padding: 20px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 22px; }
  .topbar-title { font-size: 14px; }
}

/* ─── MOBILE BOTTOM NAV ──────────────────── */
.mobile-nav {
  display: none;
  position: fixed; bottom: 16px; left: 16px; right: 16px;
  background: rgba(8,12,30,0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(124,107,255,0.25);
  border-radius: 20px;
  padding: 8px 4px max(8px, env(safe-area-inset-bottom));
  z-index: 150;
  justify-content: space-around;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
}
.mobile-nav-item {
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  text-decoration: none; color: var(--muted);
  font-size: 10px; font-family: var(--sans);
  padding: 8px 12px; border-radius: 14px;
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
  min-width: 54px; border: 1px solid transparent;
  font-weight: 600; position: relative;
}
.mobile-nav-item span { font-size: 20px; }
.mobile-nav-item.active {
  color: var(--cyan); font-weight: 700;
  background: linear-gradient(135deg,rgba(0,212,170,.2),rgba(124,107,255,.1));
  border-color: rgba(0,212,170,.3);
  box-shadow: 0 0 16px rgba(0,212,170,.15), inset 0 1px 0 rgba(255,255,255,.1);
}
.mobile-nav-item.active::before {
  content: '';
  position: absolute; top: -1px; left: 20%; right: 20%;
  height: 2px; border-radius: 0 0 4px 4px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}
.mobile-nav-item:hover { color: var(--text); background: rgba(255,255,255,.06); }
@media (max-width: 768px) {
  .mobile-nav { display: flex; }
  .content { padding-bottom: 96px; }
}


/* ── EMOJI ANIMATIONS ─────────────────────── */
10%{transform:rotate(15deg)}
  20%{transform:rotate(-12deg)}
  30%{transform:rotate(10deg)}
  40%{transform:rotate(-8deg)}
  50%{transform:rotate(0)}
}
50%{transform:translateY(-3px)}
}
50%{transform:scale(1.1)}
}
50%{filter:drop-shadow(0 0 12px rgba(0,212,170,0.8))}
}
@keyframes dot-blink {
  0%,100%{opacity:1}
  50%{opacity:0.3}
}
50%{transform:scale(1.15)}
}
#notif-bell {  }
#notif-bell:hover {  }
.badge-purple {  }
.logo-icon img {  }
#countdown-dot { animation: dot-blink 2s ease-in-out infinite; }
.nav-item.active .nav-icon {  }






/* ── SHIMMER ALL BUTTONS ─────────────────── */
.btn-ghost, .btn-purple, .btn-success, .btn-danger, .btn-sm {
  position: relative;
  overflow: hidden;
}
.btn-ghost::before, .btn-purple::before, .btn-success::before, .btn-danger::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  animation: btn-shimmer 4s ease-in-out infinite;
  pointer-events: none;
}
/* Ghost hover upgrade */
.btn-ghost:hover {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.25) !important;
  box-shadow: 0 0 20px rgba(255,255,255,0.05), inset 0 1px 0 rgba(255,255,255,0.1) !important;
  transform: translateY(-2px) scale(1.02) !important;
}
/* Purple hover upgrade */
.btn-purple:hover {
  background: rgba(124,107,255,0.2) !important;
  border-color: rgba(124,107,255,0.6) !important;
  box-shadow: 0 0 25px rgba(124,107,255,0.3), 0 0 50px rgba(124,107,255,0.1) !important;
  transform: translateY(-2px) scale(1.02) !important;
}
/* Danger hover upgrade */
.btn-danger:hover {
  background: rgba(239,68,68,0.15) !important;
  border-color: rgba(239,68,68,0.6) !important;
  box-shadow: 0 0 25px rgba(239,68,68,0.2) !important;
  transform: translateY(-2px) scale(1.02) !important;
}
/* mode-btn shimmer */
.mode-btn {
  position: relative;
  overflow: hidden;
  transition: all .25s cubic-bezier(.34,1.56,.64,1) !important;
}
.mode-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  animation: btn-shimmer 4s ease-in-out infinite;
  pointer-events: none;
}
.mode-btn.active::before {
  background: linear-gradient(90deg, transparent, rgba(124,107,255,0.2), transparent);
}
/* btn-toggle shimmer */
.btn-on, .btn-off, .btn-toggle-on, .btn-toggle-off {
  position: relative;
  overflow: hidden;
  transition: all .2s !important;
}
.btn-on::before, .btn-off::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  animation: btn-shimmer 4s ease-in-out infinite;
  pointer-events: none;
}


@supports not (backdrop-filter: blur(1px)) {
  .sidebar { background: rgba(8,12,30,0.97) !important; }
  .mobile-nav { background: rgba(8,12,30,0.97) !important; }
  .glass-card { background: rgba(13,17,40,0.95) !important; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-primary::before, .btn-ghost::before,
  .btn-purple::before, .btn-danger::before { animation: none !important; }
}

/* ── GLASSMORPHISM UTILITIES ─────────────────── */
.glass {
  background: rgba(13,17,40,0.6) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
}
.glass-card {
  background: rgba(13,17,40,0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06);
  transition: all .25s;
}
.glass-card:hover {
  border-color: rgba(124,107,255,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(124,107,255,0.15), inset 0 1px 0 rgba(255,255,255,0.08);
  transform: translateY(-1px);
}
/* Topbar glass */
.topbar {
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  background: rgba(6,8,24,0.8) !important;
  border-bottom: 1px solid rgba(124,107,255,0.15) !important;
}
/* Section surface glass */
.sl-section, .rot-section, .rot-card, .sl-card {
  background: rgba(13,17,40,0.55) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2) !important;
}
/* Stat cards glow */
.stat-card, .sl-stat {
  background: rgba(13,17,40,0.7) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25) !important;
  transition: all .25s !important;
}
.stat-card:hover, .sl-stat:hover {
  border-color: rgba(0,212,170,0.25) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), var(--glow-cyan) !important;
}
/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(124,107,255,0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(124,107,255,0.5); }
/* Input glass */
input, select, textarea {
  background: rgba(255,255,255,0.04) !important;
  backdrop-filter: blur(8px) !important;
}
/* Animated gradient border on focus */
input:focus, select:focus, textarea:focus {
  border-color: rgba(0,212,170,0.5) !important;
  box-shadow: 0 0 0 3px rgba(0,212,170,0.1) !important;
}
/* ── GLOW PULSE ANIMATION ──────────────────── */
50% { box-shadow: 0 0 25px rgba(0,212,170,0.4); }
}
.system-status.online {
  
}



/* Force glass on all surface elements */
* { box-sizing: border-box; }
[style*="var(--surface)"], [style*="var(--surface2)"] {
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}
.main-content {
  background: transparent !important;
}

/* ── GLASSMORPHISM OVERRIDE KUAT ─────────── */
.main-content > *, .content-wrap > *,
[class*="section"], [class*="card"], [class*="panel"],
[class*="box"], [class*="widget"], [class*="stat"] {
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}
/* Override semua surface warna solid jadi glass */
[style*="background:#0d"], [style*="background: #0d"],
[style*="background:#13"], [style*="background: #13"],
[style*="background:#14"], [style*="background: #14"],
[style*="background:var(--surface)"],
[style*="background: var(--surface)"] {
  background: rgba(13,17,40,0.5) !important;
  backdrop-filter: blur(16px) !important;
}
/* Main area background tembus gradient */
.main-content, .content-wrap, main {
  background: transparent !important;
}
/* Card hover glow */
div[style*="border-radius"]:hover {
  transition: all .3s !important;
}



/* ── Logo flip animation ── */
@keyframes logo-flip {
  0%   { transform: rotateY(0deg); }
  20%  { transform: rotateY(-40deg); }
  50%  { transform: rotateY(180deg); }
  80%  { transform: rotateY(340deg); }
  100% { transform: rotateY(360deg); }
}
.logo-icon img {
  animation: logo-flip 8s ease-in-out infinite !important;
  transform-style: preserve-3d;
  will-change: transform;
}
.logo-icon img:hover {
  animation-duration: 3s !important;
}


/* === SIDEBAR SCROLL FIX V4 (top+bottom anchor) === */
.sidebar {
  display: flex !important;
  flex-direction: column !important;
  position: fixed !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  overflow: hidden !important;
}
.sidebar-logo,
.sidebar-user,
.sidebar-footer {
  flex: 0 0 auto !important;
}
.sidebar-nav {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 20px;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
}
.sidebar-footer {
  background: var(--bg) !important;
  border-top: 1px solid var(--border);
}
@media (max-width: 768px) {
  .logout-btn {
    padding: 12px 14px !important;
    font-size: 14px !important;
  }
}
/* === END SIDEBAR FIX V4 === */

/* ── DESIGN SYSTEM v2 ── */
.stat-value,[id^="s-"]{text-shadow:0 0 18px currentColor}
.card:hover,.stat-card:hover,.mon-card:hover{border-color:rgba(34,211,238,0.3)!important;transition:border-color .2s}
.stat-card{border-color:rgba(34,211,238,0.1)!important}
tbody tr:hover td{background:rgba(34,211,238,0.03)!important}
