﻿/* ═══════════════════════════════════════════════════════════
   ACCESS CODE SYSTEM — Sunshine Admin Theme
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700;800;900&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --bg-deep: #f8fafc;
  --bg-panel: rgba(255, 255, 255, 0.92);
  --bg-card: rgba(255, 255, 255, 0.90);
  --bg-input: rgba(255, 255, 255, 0.98);
  --border-dim: rgba(245, 158, 11, 0.18);
  --border-glow: rgba(245, 158, 11, 0.26);
  --sunshine: #f59e0b;
  --sunshine-bright: #fbbf24;
  --sky: #38bdf8;
  --sky-soft: #7dd3fc;
  --coral: #fb7185;
  --mint: #34d399;
  --green: #34d399;
  --green-glow: rgba(52, 211, 153, 0.24);
  --orange: #fb923c;
  --red: #ef4444;
  --text-primary: #102a43;
  --text-secondary: #475569;
  --text-dim: #64748b;
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Poppins', sans-serif;
  --sidebar-width: 260px;
  --header-height: 64px;
  --radius: 18px;
  --radius-sm: 12px;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --glow-sun: 0 0 32px rgba(245, 158, 11, 0.22), 0 0 80px rgba(251, 191, 36, 0.16);
  --glow-sky: 0 0 22px rgba(56, 189, 248, 0.22);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: auto;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.16), transparent 22%),
              radial-gradient(circle at 90% 12%, rgba(56, 189, 248, 0.10), transparent 18%),
              linear-gradient(180deg, #f8fbff 0%, #fff8ec 45%, #fff5e5 100%);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 18% 15%, rgba(251, 191, 36, 0.16), transparent 20%),
              radial-gradient(circle at 78% 8%, rgba(56, 189, 248, 0.12), transparent 16%);
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 45% 85%, rgba(251, 133, 0, 0.08), transparent 28%);
  z-index: 0;
}

/* ── Animated Background ── */
.cyber-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(251, 191, 36, 0.24), transparent 18%),
    radial-gradient(circle at 84% 12%, rgba(56, 189, 248, 0.14), transparent 16%),
    radial-gradient(circle at 60% 70%, rgba(251, 133, 0, 0.10), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 249, 235, 0.96));
}

.cyber-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(245, 158, 11, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.025) 1px, transparent 1px);
  background-size: 70px 70px;
  animation: grid-drift 24s linear infinite;
}

.cyber-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(245, 158, 11, 0.015) 2px,
    rgba(245, 158, 11, 0.015) 4px
  );
  pointer-events: none;
  animation: scanline 12s linear infinite;
}

@keyframes grid-drift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

@keyframes scanline {
  0% { opacity: 0.25; }
  50% { opacity: 0.55; }
  100% { opacity: 0.25; }
}

#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ── Glass Panel ── */
.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(26px) saturate(1.15);
  -webkit-backdrop-filter: blur(26px) saturate(1.15);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  box-shadow: 0 36px 90px rgba(16, 24, 40, 0.08);
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.80), transparent);
  opacity: 0.75;
}

/* ── Typography ── */
.neon-title {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--sunshine-bright), var(--sky-soft));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: glow-pulse 3.2s ease-in-out infinite;
  filter: drop-shadow(0 0 16px rgba(251, 191, 36, 0.28));
}

@keyframes glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 16px rgba(251, 191, 36, 0.28)); }
  50% { filter: drop-shadow(0 0 32px rgba(56, 189, 248, 0.20)); }
}

.subtitle-glow {
  color: var(--text-secondary);
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ── Form Elements ── */
.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.remember-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 1.25rem;
}

.remember-checkbox {
  font-size: 0.95rem;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.remember-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--sunshine);
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-label .icon {
  color: var(--sunshine);
  font-size: 0.75rem;
}

.cyber-input {
  width: 100%;
  padding: 0.95rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.05);
}

.cyber-input::placeholder {
  color: var(--text-dim);
}

.cyber-input:focus {
  border-color: var(--sunshine);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12), var(--glow-sun);
}

.input-wrapper {
  position: relative;
}

.input-wrapper .toggle-pwd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  transition: color var(--transition);
}

.input-wrapper .toggle-pwd:hover {
  color: var(--sunshine);
}

/* ── Buttons ── */
.cyber-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.6rem;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  min-height: 48px;
}

.cyber-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: translateX(-100%);
  transition: transform 0.45s ease;
}

.cyber-btn:hover::before {
  transform: translateX(100%);
}

.cyber-btn-primary {
  background: linear-gradient(135deg, var(--sunshine), var(--coral));
  color: #ffffff;
  box-shadow: var(--glow-sun);
}

.cyber-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 34px rgba(251, 191, 36, 0.30), 0 16px 40px rgba(251, 133, 0, 0.14);
}

.cyber-btn-primary:active {
  transform: translateY(0);
}

.cyber-btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.cyber-btn-ghost {
  background: rgba(255, 255, 255, 0.80);
  border: 1px solid rgba(245, 158, 11, 0.22);
  color: var(--text-primary);
}

.cyber-btn-ghost:hover {
  border-color: var(--sunshine);
  color: var(--sunshine);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.16);
}

.cyber-btn-danger {
  background: linear-gradient(135deg, #fb7185, #ef4444);
  color: white;
}

.cyber-btn-sm {
  padding: 0.55rem 0.95rem;
  font-size: 0.75rem;
}

.cyber-btn-block {
  width: 100%;
}

/* ── Login Page ── */
.login-page {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2.5rem 1.5rem;
}

.login-container {
  width: 100%;
  max-width: 480px;
  animation: fade-up 0.8s ease-out;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-box {
  padding: 2.75rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 40px 100px rgba(16, 24, 40, 0.10);
  position: relative;
  overflow: hidden;
  min-height: 520px;
}

.login-box::before {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.25), transparent 58%);
  top: -70px;
  right: -80px;
  pointer-events: none;
}

.login-box::after {
  content: '';
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18), transparent 62%);
  bottom: -50px;
  left: -50px;
  pointer-events: none;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  width: 82px;
  height: 82px;
  margin: 0 auto 1.25rem;
  position: relative;
}

.login-logo svg {
  width: 100%;
  height: 100%;
  animation: logo-spin 14s linear infinite;
}

@keyframes logo-spin {
  0% { transform: rotate(0deg); filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.3)); }
  50% { transform: rotate(180deg); filter: drop-shadow(0 0 22px rgba(56, 189, 248, 0.22)); }
  100% { transform: rotate(360deg); filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.3)); }
}

.login-title {
  font-size: 1.4rem;
  margin-bottom: 0.45rem;
}

.login-error {
  display: none;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: var(--radius-sm);
  color: #fda4af;
  font-size: 0.9rem;
  text-align: center;
  animation: shake 0.4s ease;
}

.login-error.show {
  display: block;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  75% { transform: translateX(7px); }
}

.login-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sunshine);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.28);
  animation: blink 2s ease-in-out infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ── Dashboard Layout ── */
.dashboard-layout {
  display: flex;
  height: 100vh;
  position: relative;
  z-index: 2;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid rgba(245, 158, 11, 0.18);
  backdrop-filter: blur(18px);
  position: relative;
  z-index: 10;
  box-shadow: 0 10px 40px rgba(16, 24, 40, 0.06);
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 12%, rgba(251, 191, 36, 0.08), transparent 18%);
  pointer-events: none;
}

.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.35), transparent 30%, transparent 70%, rgba(251, 191, 36, 0.28));
  opacity: 0.55;
}

.sidebar-brand {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(245, 158, 11, 0.16);
  position: relative;
  z-index: 1;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--sunshine);
  text-transform: uppercase;
}

.brand-version {
  font-size: 0.74rem;
  color: var(--text-secondary);
  letter-spacing: 0.14em;
  margin-top: 0.35rem;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  margin-bottom: 0.35rem;
  border-radius: calc(var(--radius-sm) + 2px);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  position: relative;
  z-index: 1;
}

.nav-item .nav-icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  transition: var(--transition);
}

.nav-item:hover {
  color: var(--sunshine);
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(245, 158, 11, 0.16);
}

.nav-item.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--sunshine), var(--coral));
  border-color: rgba(245, 158, 11, 0.26);
  box-shadow: inset 3px 0 0 rgba(251, 191, 36, 0.85);
}

.nav-item.active .nav-icon {
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.28));
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(245, 158, 11, 0.16);
  position: relative;
  z-index: 1;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sunshine), var(--coral));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.top-bar {
  height: var(--header-height);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(245, 158, 11, 0.16);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
}

.page-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.page-title span {
  color: var(--sunshine);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.time-display {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.view-container {
  flex: 1;
  overflow-y: auto;
  padding: 1.6rem;
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 244, 226, 0.78));
}

.view-container::-webkit-scrollbar {
  width: 8px;
}

.view-container::-webkit-scrollbar-track {
  background: transparent;
}

.view-container::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.20);
  border-radius: 3px;
}

.view-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
}

.loader-ring {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(245, 158, 11, 0.25);
  border-top-color: var(--sunshine);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── View Common Components ── */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.view-header h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.view-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  padding: 1.35rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(245, 158, 11, 0.14);
  border-radius: var(--radius);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 45px rgba(245, 158, 11, 0.12);
}

.stat-card .stat-icon {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stat-card .stat-trend {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.stat-trend.up {
  color: var(--green);
  background: rgba(52, 211, 153, 0.14);
}

.stat-trend.down {
  color: var(--red);
  background: rgba(239, 68, 68, 0.12);
}

.stat-card.cyan .stat-value { color: var(--sky); }
.stat-card.purple .stat-value { color: var(--coral); }
.stat-card.green .stat-value { color: var(--green); }
.stat-card.orange .stat-value { color: var(--orange); }

/* Data Table */
.data-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th {
  padding: 0.95rem 1rem;
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(255, 248, 233, 0.9);
  border-bottom: 1px solid rgba(245, 158, 11, 0.16);
  white-space: nowrap;
}

.data-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(245, 158, 11, 0.08);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:hover {
  background: rgba(251, 191, 36, 0.08);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-active {
  color: var(--green);
  background: rgba(52, 211, 153, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.22);
}

.badge-inactive {
  color: var(--text-dim);
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.badge-warning {
  color: var(--orange);
  background: rgba(251, 146, 60, 0.16);
  border: 1px solid rgba(251, 146, 60, 0.22);
}

.badge-danger {
  color: var(--red);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.24);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Action buttons in table */
.action-btns {
  display: flex;
  gap: 0.45rem;
}

.action-btn {
  padding: 0.38rem 0.75rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(245, 158, 11, 0.14);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--transition);
}

.action-btn:hover {
  border-color: var(--sunshine);
  color: var(--sunshine);
  background: rgba(255, 255, 255, 1);
}

.action-btn.danger:hover {
  border-color: var(--red);
  color: var(--red);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  width: 100%;
  max-width: 540px;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(245, 158, 11, 0.14);
  border-radius: var(--radius);
  box-shadow: 0 28px 70px rgba(16, 24, 40, 0.10);
  transform: scale(0.96) translateY(12px);
  transition: var(--transition);
}

.modal-overlay.show .modal-box {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.25rem;
  cursor: pointer;
  transition: color var(--transition);
}

.modal-close:hover {
  color: var(--red);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 360px;
}

.search-box input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.4rem;
  background: var(--bg-input);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.04);
}

.search-box input:focus {
  border-color: var(--sunshine);
}

.search-box .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Chart placeholder */
.chart-panel {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  min-height: 260px;
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(245, 158, 11, 0.14);
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.08);
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 180px;
  padding-top: 1rem;
  gap: 0.6rem;
}

.chart-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 70px;
}

.chart-bar {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--sky), rgba(56, 189, 248, 0.22));
  transition: height 1s ease-out;
  position: relative;
  min-height: 4px;
}

.chart-bar.purple {
  background: linear-gradient(180deg, var(--coral), rgba(251, 113, 133, 0.22));
}

.chart-bar-label {
  margin-top: 0.55rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.chart-bar-value {
  position: absolute;
  top: -1.3rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-family: var(--font-display);
  color: var(--sunshine);
  white-space: nowrap;
}

/* Activity feed */
.activity-list {
  list-style: none;
}

.activity-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(245, 158, 11, 0.1);
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.activity-dot.cyan { background: var(--sky); box-shadow: 0 0 10px rgba(56, 189, 248, 0.24); }
.activity-dot.green { background: var(--green); box-shadow: 0 0 10px rgba(52, 211, 153, 0.22); }
.activity-dot.orange { background: var(--orange); }
.activity-dot.red { background: var(--red); }

.activity-content {
  flex: 1;
}

.activity-text {
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Two column layout */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 900px) {
  .grid-2col {
    grid-template-columns: 1fr;
  }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-dim);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.45;
}

/* Toast notification */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.toast {
  padding: 0.95rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  animation: toast-in 0.3s ease;
  backdrop-filter: blur(14px);
  border: 1px solid;
  max-width: 360px;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.08);
}

.toast-success {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.25);
  color: #047857;
}

.toast-error {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.28);
  color: #b91c1c;
}

.toast-info {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.28);
  color: var(--sky);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Code / mono text */
.mono {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--sunshine);
  letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    height: 100%;
    transition: left var(--transition);
    z-index: 100;
  }

  .sidebar.open {
    left: 0;
  }

  .menu-toggle {
    display: flex !important;
  }
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-dim);
  color: var(--text-primary);
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.1rem;
}
