/* ==============================================================================
   🎬 SyncStream Enterprise Super Admin Console CSS (v2.2 Kino Dark Slate Neon)
   Comprehensive, High-Performance, Fully Responsive, Mobile-Ready Admin Design System
   ============================================================================== */

:root {
  --bg-base: #07090e;
  --bg-surface: #0c0f18;
  --bg-card: rgba(16, 20, 32, 0.75);
  --bg-card-hover: rgba(22, 28, 45, 0.85);
  --bg-elevated: rgba(25, 33, 54, 0.9);
  --bg-input: rgba(10, 13, 22, 0.7);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-glow: rgba(54, 80, 253, 0.4);

  --accent-primary: #3650fd;
  --accent-secondary: #6366f1;
  --accent-neon: #38bdf8;
  --accent-glow: rgba(54, 80, 253, 0.35);

  --color-green: #10b981;
  --color-green-glow: rgba(16, 185, 129, 0.3);
  --color-amber: #f59e0b;
  --color-amber-glow: rgba(245, 158, 11, 0.3);
  --color-red: #ef4444;
  --color-red-glow: rgba(239, 68, 68, 0.3);
  --color-purple: #a855f7;
  --color-teal: #14b8a6;
  --color-tg: #24a1de;
  --color-bale: #00b294;

  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-family: 'Vazirmatn', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  --header-height: 68px;
  --sidebar-width: 260px;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-elevated: 0 16px 48px rgba(0, 0, 0, 0.6);
}

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

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-family);
  direction: rtl;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  font-size: 13.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Ambient Glow */
.admin-bg-glow {
  position: fixed;
  top: -240px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 650px;
  background: radial-gradient(circle, rgba(54, 80, 253, 0.14) 0%, rgba(168, 85, 247, 0.06) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

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

.toast {
  background: rgba(15, 20, 34, 0.95);
  border: 1px solid var(--border-medium);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 260px;
  max-width: 420px;
}

.toast.success {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 8px 24px var(--color-green-glow);
}
.toast.error {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 8px 24px var(--color-red-glow);
}
.toast.warning {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 8px 24px var(--color-amber-glow);
}

/* ==============================================================================
   LOGIN OVERLAY
   ============================================================================== */
.admin-login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 14, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  box-shadow: var(--shadow-elevated), 0 0 32px var(--accent-glow);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  text-align: center;
  backdrop-filter: blur(16px);
}

.shield-badge {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(54, 80, 253, 0.25), rgba(168, 85, 247, 0.25));
  border: 1px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #818cf8;
}
.shield-badge svg {
  width: 32px;
  height: 32px;
}

.login-header h1 {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.login-header p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 24px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: right;
}

/* ==============================================================================
   FORM CONTROLS & INPUTS
   ============================================================================== */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-group input,
.input-group select,
.input-group textarea,
.search-input,
.filter-select,
.input-control {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #ffffff;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus,
.search-input:focus,
.filter-select:focus,
.input-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-glow);
  background: rgba(14, 18, 30, 0.9);
}

.form-row {
  display: flex;
  gap: 12px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 13px;
}
.btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 4px 18px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 13px;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--border-medium);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 12.5px;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border-color: var(--border-medium);
}

.btn-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-amber);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  font-family: inherit;
  font-size: 12.5px;
}
.btn-warning:hover {
  background: var(--color-amber);
  color: #000;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-red);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  font-family: inherit;
  font-size: 12.5px;
}
.btn-danger:hover {
  background: var(--color-red);
  color: #fff;
}

.btn-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-green);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  font-family: inherit;
  font-size: 12.5px;
}
.btn-success:hover {
  background: var(--color-green);
  color: #000;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
}
.btn-icon svg {
  width: 15px;
  height: 15px;
}
.btn-icon:hover {
  color: #ffffff;
  border-color: var(--border-medium);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}
.btn-icon.text-danger:hover {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.15);
}
.btn-icon.text-success:hover {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.15);
}

.action-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ==============================================================================
   LAYOUT: TOPBAR & SIDEBAR
   ============================================================================== */
.admin-layout {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.admin-topbar {
  height: var(--header-height);
  background: rgba(12, 16, 26, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-sidebar-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-sidebar-toggle svg {
  width: 20px;
  height: 20px;
}

.brand-shield {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(54, 80, 253, 0.3), rgba(168, 85, 247, 0.3));
  border: 1px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
}
.brand-shield svg {
  width: 20px;
  height: 20px;
}

.brand-text h2 {
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
}

.badge-enterprise {
  background: linear-gradient(135deg, #3650fd, #a855f7);
  color: white;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  letter-spacing: 0.5px;
}

.server-status-pill {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}

.status-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-green);
  box-shadow: 0 0 8px var(--color-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

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

.live-clock {
  font-family: monospace;
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.admin-profile-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.admin-username {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
}

.role-chip {
  background: rgba(54, 80, 253, 0.25);
  color: #93c5fd;
  border: 1px solid rgba(54, 80, 253, 0.4);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}
.role-chip.finance {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}
.role-chip.support {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

/* ==============================================================================
   SIDEBAR & NAVIGATION
   ============================================================================== */
.admin-body {
  display: flex;
  flex: 1;
}

.admin-sidebar {
  width: var(--sidebar-width);
  background: rgba(12, 15, 24, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--border-subtle);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9.5px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: right;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
  width: 100%;
}
.nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}
.nav-item:hover svg {
  color: var(--accent-neon);
}

.nav-item.active {
  background: rgba(54, 80, 253, 0.14);
  color: #ffffff;
  border-color: rgba(54, 80, 253, 0.3);
  border-right: 3px solid var(--accent-primary);
}
.nav-item.active svg {
  color: var(--accent-neon);
}

.pill-count {
  margin-right: auto;
  background: rgba(255, 255, 255, 0.1);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  color: #cbd5e1;
}
.pill-count.text-amber {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.35);
  animation: pulse 2s infinite;
}
.pill-count.text-green {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.pill-count.text-purple {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc !important;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.sidebar-footer {
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==============================================================================
   MAIN CONTENT & TABS
   ============================================================================== */
.admin-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease;
}
.tab-pane.active {
  display: block;
}

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

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-header h3 svg {
  width: 22px;
  height: 22px;
  color: var(--accent-neon);
}

/* ==============================================================================
   METRIC CARDS GRID
   ============================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.22s ease;
}
.metric-card:hover {
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.metric-icon svg {
  width: 22px;
  height: 22px;
}

.glow-blue {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.glow-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.glow-green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.glow-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.glow-red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.metric-content {
  flex: 1;
}

.metric-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.metric-value {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.metric-subtitle {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ==============================================================================
   CARDS & PANELS
   ============================================================================== */
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 10px;
}

.card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title svg {
  width: 18px;
  height: 18px;
  color: var(--accent-neon);
}

/* ==============================================================================
   TABLES & LISTS
   ============================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(10, 13, 22, 0.5);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 13px;
  min-width: 650px;
}

.admin-table th {
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 14px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

.admin-table tbody tr {
  transition: background 0.15s ease;
}
.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
}

/* Pagination Bar */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 0 4px;
  flex-wrap: wrap;
  gap: 10px;
}

/* Status & Role Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}
.badge-status.success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-green);
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.badge-status.warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-amber);
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.badge-status.danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-red);
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.badge-status.info {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.badge-messenger {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-messenger.telegram {
  background: rgba(36, 161, 222, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(36, 161, 222, 0.35);
}
.badge-messenger.bale {
  background: rgba(0, 178, 148, 0.15);
  color: #2dd4bf;
  border: 1px solid rgba(0, 178, 148, 0.35);
}
.badge-messenger.web {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.badge-tier {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  text-transform: uppercase;
  display: inline-block;
}
.badge-tier.free { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; }
.badge-tier.pro { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); }
.badge-tier.bronze { background: rgba(180, 83, 9, 0.2); color: #f59e0b; border: 1px solid rgba(180, 83, 9, 0.4); }
.badge-tier.silver { background: rgba(148, 163, 184, 0.25); color: #e2e8f0; border: 1px solid rgba(148, 163, 184, 0.4); }
.badge-tier.gold { background: rgba(234, 179, 8, 0.2); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.4); }
.badge-tier.vip { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
.badge-tier.enterprise { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }

/* Switch Controls (Toggles) */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  transition: all 0.2s;
}
.toggle-row:hover {
  border-color: var(--border-medium);
  background: rgba(255, 255, 255, 0.04);
}

.toggle-info {
  flex: 1;
  padding-left: 16px;
}
.toggle-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  display: block;
}
.toggle-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.3s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  right: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-glow);
}
input:checked + .slider:before {
  transform: translateX(-22px);
}

/* ==============================================================================
   MODALS
   ============================================================================== */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.admin-modal-card {
  width: 100%;
  max-width: 680px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-elevated);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
}

.admin-modal-card.modal-sm {
  max-width: 460px;
}
.admin-modal-card.modal-lg {
  max-width: 900px;
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.15s;
}
.modal-close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* User 360 Specs List */
.server-specs-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.spec-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.spec-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* Receipt Photo Preview */
.receipt-photo-container {
  width: 100%;
  max-height: 380px;
  background: #000;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  position: relative;
}
.receipt-photo-img {
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.2s;
}
.receipt-photo-img:hover {
  transform: scale(1.02);
}

/* ==============================================================================
   RESPONSIVE DESIGN (TABLETS & PHONES)
   ============================================================================== */
@media (max-width: 900px) {
  .btn-sidebar-toggle {
    display: inline-flex;
  }

  .admin-sidebar {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    right: 0;
    z-index: 999;
    transform: translateX(100%);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.7);
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
    backdrop-filter: blur(4px);
    display: none;
  }
  .sidebar-backdrop.active {
    display: block;
  }

  .admin-content {
    padding: 16px;
  }

  .server-specs-list {
    grid-template-columns: 1fr;
  }

  .topbar-actions .live-clock {
    display: none;
  }
}

@media (max-width: 600px) {
  .admin-topbar {
    padding: 0 12px;
  }

  .badge-enterprise {
    display: none;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions #admin-restart-btn {
    display: none;
  }
}

/* ==============================================================================
   USER TICKETS HISTORY TIMELINE
   ============================================================================== */
.tickets-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket-timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ticket-timeline-card:hover {
  border-color: var(--border-medium);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.ticket-timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 8px;
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.timeline-query-box {
  background: rgba(0, 0, 0, 0.25);
  border-right: 3px solid var(--accent-primary);
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-bright);
  margin-bottom: 8px;
  word-break: break-word;
}

.timeline-reply-box {
  background: rgba(16, 185, 129, 0.08);
  border-right: 3px solid var(--neon-green);
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.6;
  color: #a7f3d0;
  word-break: break-word;
}

.timeline-reply-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #6ee7b7;
  margin-bottom: 4px;
}
