/* ==========================================================================
   DROPIN ADMIN MISSION CONTROL - MODERN DESIGN SYSTEM & GLASSMORPHISM
   ========================================================================== */

:root {
  --bg-space: #070A10;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(26, 36, 56, 0.85);
  --bg-modal: #0F172A;
  --border-glass: rgba(255, 255, 255, 0.09);
  --border-glass-bright: rgba(255, 255, 255, 0.18);

  /* Curated Theme Colors */
  --emerald-500: #10B981;
  --emerald-400: #34D399;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --cyan-500: #06B6D4;
  --cyan-400: #22D3EE;
  --cyan-glow: rgba(6, 182, 212, 0.25);
  --amber-500: #F59E0B;
  --amber-400: #FBBF24;
  --amber-glow: rgba(245, 158, 11, 0.25);
  --rose-500: #F43F5E;
  --rose-400: #FB7185;
  --rose-glow: rgba(244, 63, 94, 0.25);
  --violet-500: #8B5CF6;
  --violet-glow: rgba(139, 92, 246, 0.25);

  /* Neutral Text Shades */
  --text-pure: #FFFFFF;
  --text-primary: #F3F4F6;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Elevations & Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.6);
  --shadow-neon-emerald: 0 0 20px rgba(16, 185, 129, 0.35);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-space);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Custom Ambient Lighting */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}
.glow-emerald {
  width: 500px;
  height: 500px;
  top: -150px;
  left: 10%;
  background: radial-gradient(circle, var(--emerald-500), transparent 70%);
}
.glow-cyan {
  width: 450px;
  height: 450px;
  top: 35%;
  right: -100px;
  background: radial-gradient(circle, var(--cyan-500), transparent 70%);
}
.glow-magenta {
  width: 400px;
  height: 400px;
  bottom: -100px;
  left: 30%;
  background: radial-gradient(circle, var(--rose-500), transparent 70%);
  opacity: 0.3;
}

/* Base Typography Utilities */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  color: var(--text-pure);
  letter-spacing: -0.02em;
}
.font-mono { font-family: var(--font-mono); }
.text-emerald { color: var(--emerald-400) !important; }
.text-cyan { color: var(--cyan-400) !important; }
.text-amber { color: var(--amber-400) !important; }
.text-rose { color: var(--rose-400) !important; }
.text-white { color: #FFFFFF !important; }
.text-muted { color: var(--text-muted) !important; }

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.app-layout {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Navigation Bar */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--emerald-500), var(--cyan-500));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #FFFFFF;
  box-shadow: 0 0 20px var(--emerald-glow);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(120deg, #FFFFFF 40%, var(--cyan-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--emerald-400);
  letter-spacing: 0.12em;
}

.nav-metrics-quick {
  display: flex;
  align-items: center;
  gap: 20px;
}

.quick-metric {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.quick-metric.highlight-metric {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Navigation Tabs Bar */
.nav-tabs-bar {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0 32px;
}

.tabs-container {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs-container::-webkit-scrollbar { display: none; }

.tab-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: var(--emerald-400);
  border-bottom-color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.08);
  font-weight: 600;
}

.tab-count-badge {
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.tab-count-badge.badge-green {
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-400);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 28px 32px 60px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   BUTTONS & UI COMPONENTS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald-500), #059669);
  color: #FFFFFF;
  box-shadow: 0 4px 14px var(--emerald-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--emerald-400), #10B981);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-glass-bright);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}
.btn-outline:hover {
  border-color: var(--emerald-400);
  color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.06);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.06);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

.btn-xs {
  padding: 4px 8px;
  font-size: 0.72rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 13px 24px;
  font-size: 0.95rem;
}

.btn-block {
  width: 100%;
}

.btn-danger {
  background: linear-gradient(135deg, var(--rose-500), #E11D48);
  color: #FFFFFF;
  box-shadow: 0 4px 14px var(--rose-glow);
}
.btn-danger:hover {
  background: linear-gradient(135deg, var(--rose-400), #F43F5E);
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.45);
}

/* ==========================================================================
   METRICS GRID (OVERVIEW)
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.metric-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  transition: var(--transition-normal);
  overflow: hidden;
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glass-bright);
  box-shadow: var(--shadow-lg);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}
.card-glow-emerald::before { background: linear-gradient(90deg, var(--emerald-500), var(--cyan-500)); }
.card-glow-cyan::before { background: linear-gradient(90deg, var(--cyan-500), var(--violet-500)); }
.card-glow-amber::before { background: linear-gradient(90deg, var(--amber-500), #EA580C); }
.card-glow-rose::before { background: linear-gradient(90deg, var(--rose-500), #BE123C); }

.metric-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.metric-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.metric-icon-wrap.emerald { background: rgba(16, 185, 129, 0.15); color: var(--emerald-400); }
.metric-icon-wrap.cyan { background: rgba(6, 182, 212, 0.15); color: var(--cyan-400); }
.metric-icon-wrap.amber { background: rgba(245, 158, 11, 0.15); color: var(--amber-400); }
.metric-icon-wrap.rose { background: rgba(244, 63, 94, 0.15); color: var(--rose-400); }

.metric-value-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.metric-main-val {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #FFFFFF;
  line-height: 1;
}

.metric-sub-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.badge-green { background: rgba(16, 185, 129, 0.18); color: var(--emerald-400); }
.badge-cyan { background: rgba(6, 182, 212, 0.18); color: var(--cyan-400); }
.badge-amber { background: rgba(245, 158, 11, 0.18); color: var(--amber-400); }
.badge-rose { background: rgba(244, 63, 94, 0.18); color: var(--rose-400); }

.metric-foot {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Pulse indicators */
.pulse-indicator {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--emerald-400);
  box-shadow: 0 0 10px var(--emerald-400);
  animation: pulseAnim 2s infinite;
}
.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulseAnim 1.8s infinite;
}
.pulse-dot-sm {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.pulse-dot-sm.online {
  background: var(--emerald-400);
  box-shadow: 0 0 8px var(--emerald-400);
  animation: pulseAnim 1.6s infinite;
}
.pulse-dot-sm.offline {
  background: #4B5563;
}

@keyframes pulseAnim {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* ==========================================================================
   PANEL CARDS & SPLIT GRID
   ========================================================================== */
.dashboard-split-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}

.panel-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-glass);
}

.panel-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-header-title h3 {
  font-size: 1.08rem;
  font-weight: 700;
}

.live-tag {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.08em;
}

/* Real-Time Activity Feed */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 6px;
}
.activity-feed::-webkit-scrollbar {
  width: 5px;
}
.activity-feed::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}
.feed-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-glass);
}

.feed-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.feed-icon.join { background: rgba(16, 185, 129, 0.2); color: var(--emerald-400); }
.feed-icon.leave { background: rgba(156, 163, 175, 0.15); color: var(--text-secondary); }
.feed-icon.ban { background: rgba(244, 63, 94, 0.2); color: var(--rose-400); }
.feed-icon.msg { background: rgba(6, 182, 212, 0.2); color: var(--cyan-400); }

.feed-content {
  flex: 1;
  font-size: 0.84rem;
}
.feed-desc {
  color: var(--text-primary);
  margin-bottom: 2px;
}
.feed-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.feed-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Diagnostics list */
.diagnostics-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.diag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
}
.diag-label {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.diag-val {
  color: var(--text-pure);
  font-weight: 600;
}
.quick-actions-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================================================================
   TOOLBAR & DATA TABLES (USERS, SESSIONS, LOGS)
   ========================================================================== */
.toolbar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 22px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.toolbar-title-wrap {
  display: flex;
  flex-direction: column;
}
.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 480px;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}
.search-input {
  padding-left: 40px !important;
  padding-right: 36px !important;
}
.search-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}
.search-clear-btn:hover { color: #FFFFFF; }

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Forms & Inputs */
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-pure);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  padding: 10px 14px;
  outline: none;
  transition: var(--transition-fast);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--emerald-400);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}
.form-select {
  padding-right: 32px;
  cursor: pointer;
}
.form-textarea {
  resize: vertical;
}
.readonly-input {
  background: rgba(255, 255, 255, 0.03);
  color: var(--cyan-400);
  cursor: default;
}

/* Table panel */
.table-panel {
  padding: 0;
  overflow: hidden;
}

.table-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-glass);
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.table-meta-legend {
  display: flex;
  align-items: center;
  gap: 18px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 14px 20px;
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-glass);
  white-space: nowrap;
}

.data-table td {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.86rem;
  vertical-align: middle;
  transition: var(--transition-fast);
}

.data-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.table-loading-cell, .table-empty-cell {
  text-align: center;
  padding: 60px 20px !important;
  color: var(--text-muted);
}
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(16, 185, 129, 0.2);
  border-top-color: var(--emerald-400);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 14px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* User cell representation */
.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: #FFFFFF;
  flex-shrink: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.user-cell-meta {
  display: flex;
  flex-direction: column;
}
.user-cell-alias {
  font-weight: 600;
  color: #FFFFFF;
}
.user-cell-id {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Role Pills */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.role-admin { background: rgba(244, 63, 94, 0.18); color: var(--rose-400); border: 1px solid rgba(244, 63, 94, 0.3); }
.role-moderator { background: rgba(6, 182, 212, 0.18); color: var(--cyan-400); border: 1px solid rgba(6, 182, 212, 0.3); }
.role-vip { background: rgba(245, 158, 11, 0.18); color: var(--amber-400); border: 1px solid rgba(245, 158, 11, 0.3); }
.role-user { background: rgba(156, 163, 175, 0.14); color: var(--text-primary); border: 1px solid rgba(255, 255, 255, 0.08); }

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 600;
}
.status-active { background: rgba(16, 185, 129, 0.15); color: var(--emerald-400); }
.status-banned { background: rgba(244, 63, 94, 0.15); color: var(--rose-400); }
.status-suspended { background: rgba(245, 158, 11, 0.15); color: var(--amber-400); }

/* Device Key Cell */
.device-key-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.device-key-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan-400);
  background: rgba(6, 182, 212, 0.08);
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid rgba(6, 182, 212, 0.2);
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Action Button Groups */
.actions-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.action-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 13px;
}
.action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}
.action-btn.edit-btn:hover { color: var(--cyan-400); border-color: var(--cyan-400); }
.action-btn.ban-btn:hover { color: var(--rose-400); border-color: var(--rose-400); }
.action-btn.kick-btn:hover { color: var(--amber-400); border-color: var(--amber-400); }
.action-btn.delete-btn:hover { color: #EF4444; border-color: #EF4444; }

/* ==========================================================================
   ACTIVE GEO ZONES GRID
   ========================================================================== */
.zones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.zone-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition-normal);
}
.zone-card:hover {
  transform: translateY(-2px);
  border-color: var(--amber-400);
}

.zone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.zone-geohash {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--amber-400);
  display: flex;
  align-items: center;
  gap: 8px;
}

.zone-stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}
.zone-stat-box {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  text-align: center;
}
.zone-stat-val {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #FFFFFF;
}
.zone-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.zone-users-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.zone-user-tag {
  font-size: 0.74rem;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

/* ==========================================================================
   BROADCAST NOTIFICATION VIEW
   ========================================================================== */
.broadcast-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  align-items: start;
}
.broadcast-form-panel {
  padding: 28px;
}
.checkbox-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.custom-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--text-primary);
  cursor: pointer;
}
.custom-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--emerald-500);
}

/* Phone Mockup Frame */
.phone-mockup-frame {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  background: #0B0F19;
  border: 6px solid #1E293B;
  border-radius: 40px;
  padding: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  min-height: 480px;
  position: relative;
}
.phone-notch {
  width: 100px;
  height: 16px;
  background: #1E293B;
  border-radius: var(--radius-full);
  margin: 0 auto 24px;
}
.phone-notification-bubble {
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.notif-app-name {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.notif-body strong {
  display: block;
  font-size: 0.86rem;
  color: #FFFFFF;
  margin-bottom: 2px;
}
.notif-body p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  word-break: break-word;
}

/* ==========================================================================
   MODALS & POPUPS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-dialog {
  background: var(--bg-modal);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  animation: modalScale 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-glass);
}
.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.modal-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.modal-icon-badge.emerald { background: rgba(16, 185, 129, 0.2); color: var(--emerald-400); }
.modal-icon-badge.cyan { background: rgba(6, 182, 212, 0.2); color: var(--cyan-400); }
.modal-icon-badge.amber { background: rgba(245, 158, 11, 0.2); color: var(--amber-400); }

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}
.modal-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
}
.modal-close-btn:hover { color: #FFFFFF; }

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  background: rgba(11, 15, 23, 0.6);
  border-top: 1px solid var(--border-glass);
}

.form-row {
  display: flex;
  gap: 14px;
}
.col-5 { flex: 5; }
.col-6 { flex: 6; }
.col-7 { flex: 7; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.input-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.input-with-action {
  display: flex;
  gap: 8px;
}

/* Theme selector grid */
.theme-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  gap: 8px;
}
.theme-swatch {
  height: 38px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #FFFFFF;
}
.theme-swatch:hover {
  transform: scale(1.08);
}
.theme-swatch.selected {
  border-color: #FFFFFF;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

/* Credential details drawer */
.cred-card {
  background: rgba(11, 15, 23, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cred-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
}
.cred-label { color: var(--text-secondary); }
.cred-val-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cred-instructions {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 0.82rem;
}
.cred-instructions h4 {
  font-size: 0.86rem;
  color: var(--cyan-400);
  margin-bottom: 4px;
}
.cred-instructions code {
  background: rgba(0, 0, 0, 0.4);
  color: var(--cyan-400);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ==========================================================================
   TOAST NOTIFICATION ALERTS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-alert {
  pointer-events: auto;
  min-width: 300px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass-bright);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.86rem;
  animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast-alert.success { border-left: 4px solid var(--emerald-400); }
.toast-alert.error { border-left: 4px solid var(--rose-400); }
.toast-alert.info { border-left: 4px solid var(--cyan-400); }

.toast-icon { font-size: 16px; }
.toast-alert.success .toast-icon { color: var(--emerald-400); }
.toast-alert.error .toast-icon { color: var(--rose-400); }
.toast-alert.info .toast-icon { color: var(--cyan-400); }

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1080px) {
  .dashboard-split-grid {
    grid-template-columns: 1fr;
  }
  .broadcast-layout {
    grid-template-columns: 1fr;
  }
  .phone-mockup-frame {
    display: none;
  }
}

@media (max-width: 768px) {
  .top-nav {
    padding: 12px 18px;
  }
  .main-content {
    padding: 18px 18px 50px;
  }
  .hide-mobile {
    display: none;
  }
  .form-row {
    flex-direction: column;
  }
}
