/* ==========================================================
   HarKhil Question Bank — Modern Enterprise Design System
   Sleek Dark Glassmorphism, Micro-Interactions, Precision Typography
   ========================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Color Palette */
  --admin-bg-body: #060911;
  --admin-bg-sidebar: #0a0f1d;
  --admin-bg-card: rgba(15, 23, 42, 0.7);
  --admin-bg-card-hover: rgba(26, 38, 66, 0.8);
  --admin-border: rgba(255, 255, 255, 0.08);
  --admin-border-hover: rgba(56, 189, 248, 0.35);
  --admin-border-focus: #38bdf8;
  
  --admin-text-main: #f8fafc;
  --admin-text-muted: #94a3b8;
  --admin-text-subtle: #64748b;
  
  --admin-accent-cyan: #38bdf8;
  --admin-accent-indigo: #6366f1;
  --admin-accent-emerald: #10b981;
  --admin-accent-amber: #f59e0b;
  --admin-accent-rose: #f43f5e;
  --admin-accent-purple: #c084fc;

  --admin-card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --admin-modal-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.9), 0 0 35px rgba(56, 189, 248, 0.15);
}

[data-theme="light"] {
  --admin-bg-body: #f8fafc;
  --admin-bg-sidebar: #ffffff;
  --admin-bg-card: rgba(255, 255, 255, 0.9);
  --admin-bg-card-hover: #f1f5f9;
  --admin-border: rgba(0, 0, 0, 0.08);
  --admin-border-hover: rgba(2, 132, 199, 0.35);
  --admin-border-focus: #0284c7;
  --admin-text-main: #0f172a;
  --admin-text-muted: #64748b;
  --admin-text-subtle: #94a3b8;
  --admin-card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--admin-bg-body);
  background-image: 
    radial-gradient(at 100% 0%, rgba(56, 189, 248, 0.06) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(99, 102, 241, 0.05) 0px, transparent 50%);
  color: var(--admin-text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--admin-accent-cyan);
}

/* Layout */
.admin-sidebar {
  width: 270px;
  background-color: var(--admin-bg-sidebar);
  border-right: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.admin-main {
  margin-left: 270px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-header {
  height: 68px;
  background: rgba(10, 15, 29, 0.8);
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(16px);
}

.admin-content {
  padding: 32px;
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* Sidebar Elements */
.sidebar-brand {
  padding: 22px 24px;
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--admin-border);
}

.sidebar-menu {
  list-style: none;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--admin-text-muted);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--admin-text-main);
  transform: translateX(3px);
}

.sidebar-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(99, 102, 241, 0.08) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.1);
}

.sidebar-badge {
  margin-left: auto;
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Page Headers */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--admin-text-main);
}

.page-subtitle {
  font-size: 0.86rem;
  color: var(--admin-text-muted);
  margin-top: 4px;
}

/* Cards & Glass Containers */
.data-table-card, .metric-card {
  background: var(--admin-bg-card);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  box-shadow: var(--admin-card-shadow);
  backdrop-filter: blur(16px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 24px;
}

.data-table-card:hover, .metric-card:hover {
  border-color: var(--admin-border-hover);
}

.card-header, .table-header-bar {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--admin-border);
  background: rgba(255, 255, 255, 0.01);
}

.card-title, .table-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.metric-card {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 0;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(56, 189, 248, 0.2);
}

.metric-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  flex-shrink: 0;
}

.metric-icon.blue { background: rgba(56, 189, 248, 0.12); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.25); }
.metric-icon.emerald { background: rgba(16, 185, 129, 0.12); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.25); }
.metric-icon.amber { background: rgba(245, 158, 11, 0.12); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.25); }
.metric-icon.purple { background: rgba(168, 85, 247, 0.12); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.25); }

.metric-value {
  font-family: var(--font-heading);
  font-size: 1.95rem;
  font-weight: 800;
  color: var(--admin-text-main);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.metric-label {
  font-size: 0.82rem;
  color: var(--admin-text-muted);
  margin-top: 4px;
  font-weight: 500;
}

/* Custom Table Styles */
.custom-table, .admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.custom-table thead th, .admin-table thead th {
  padding: 14px 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--admin-text-muted);
  border-bottom: 1px solid var(--admin-border);
  background: rgba(255, 255, 255, 0.015);
}

.custom-table tbody td, .admin-table tbody td {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--admin-text-main);
  vertical-align: middle;
}

.custom-table tbody tr:hover, .admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Buttons */
.primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
  color: #020617;
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.4);
}

.table-action-btn, .btn-sm-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--admin-border);
  color: var(--admin-text-main);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.table-action-btn:hover, .btn-sm-action:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: #38bdf8;
  color: #38bdf8;
  transform: translateY(-1px);
}

.btn-approve { background: #10b981; color: #fff; border-color: #10b981; }
.btn-reject { background: #f43f5e; color: #fff; border-color: #f43f5e; }

/* Form Inputs & Controls */
.form-input, input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  padding: 11px 14px;
  background: rgba(10, 15, 29, 0.85);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  color: var(--admin-text-main);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--admin-accent-cyan) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2) !important;
}

/* Badges & Pills */
.badge, .badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-status.approved, .badge-status.verified {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.badge-status.pending {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.badge-status.rejected {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #f43f5e;
}

/* Live Pulse Indicator */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 20px;
  font-size: 0.75rem;
  color: #10b981;
  font-weight: 700;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulseAnim 2s infinite;
}

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

/* Modal Backdrops & Overlays */
.vault-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 16, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
}

.vault-modal-card {
  background: #0d121f;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  width: 100%;
  max-width: 540px;
  padding: 26px;
  box-shadow: var(--admin-modal-shadow);
  animation: modalScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.96) translateY(-8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
