/* ==========================================================================
   TM PAY - MERCHANT CONTROL PANEL PREMIUM FINTECH DESIGN SYSTEM
   Ultra-High Contrast Obsidian Glassmorphism with Buttery-Smooth Animations
   ========================================================================== */

:root {
  /* Obsidian Theme Canvas & Surfaces */
  --bg-canvas: #090d16;
  --bg-card: #0f172a;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #162036;
  --bg-subtle: rgba(30, 41, 59, 0.65);
  --bg-glass: rgba(15, 23, 42, 0.78);

  /* Typography Colors */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  /* Neon & Fintech Accents */
  --accent-blue: #4f46e5;
  --accent-blue-hover: #4338ca;
  --accent-blue-light: rgba(99, 102, 241, 0.15);
  --accent-glow: rgba(79, 70, 229, 0.35);

  --accent-cyan: #06b6d4;
  --accent-sky: #38bdf8;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;

  /* Status Colors */
  --status-verified: #10b981;
  --status-verified-bg: rgba(16, 185, 129, 0.12);
  --status-verified-border: rgba(16, 185, 129, 0.35);

  --status-pending: #f59e0b;
  --status-pending-bg: rgba(245, 158, 11, 0.12);
  --status-pending-border: rgba(245, 158, 11, 0.35);

  --status-rejected: #ef4444;
  --status-rejected-bg: rgba(239, 68, 68, 0.12);
  --status-rejected-border: rgba(239, 68, 68, 0.35);

  --status-info: #38bdf8;
  --status-info-bg: rgba(56, 189, 248, 0.12);

  /* Borders & Dividers */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #4f46e5;
  --border-card: rgba(99, 102, 241, 0.18);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 18px rgba(79, 70, 229, 0.08);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.8), 0 0 30px rgba(79, 70, 229, 0.15);

  /* Typography Fonts */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

/* ================= Global Reset & Animations ================= */

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  background-image: 
    radial-gradient(circle at 12% 15%, rgba(79, 70, 229, 0.09) 0%, transparent 40%),
    radial-gradient(circle at 88% 85%, rgba(16, 185, 129, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.04) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Keyframe Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
}

@keyframes pulseIndigo {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(99, 102, 241, 0);
  }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Links */
a {
  color: #818cf8;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
  color: #a5b4fc;
}

/* Custom Slim Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #090d16;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* ================= Layout Structure ================= */

.app-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: transparent;
}

.page-container {
  padding: 32px 36px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  animation: fadeInUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.public-container {
  max-width: 480px;
  margin: 60px auto;
  padding: 32px;
  width: 100%;
  box-sizing: border-box;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ================= Top Navigation Bar ================= */

.top-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 36px;
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 40;
  transition: all 0.2s ease;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu-btn {
  display: none;
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 20px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
  background: #334155;
  color: #fff;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-color);
  padding: 6px 14px 6px 8px;
  border-radius: var(--radius-full);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-profile-badge:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

/* ================= Sidebar Navigation ================= */

.sidebar {
  width: 260px;
  background: linear-gradient(180deg, #0d1322 0%, #090d16 100%);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  padding: 20px 22px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.sidebar-logo .brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.logo-badge {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-close-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-subtle);
  padding: 14px 14px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item .nav-icon {
  font-size: 17px;
  opacity: 0.8;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  transform: translateX(3px);
}

.nav-item:hover .nav-icon {
  opacity: 1;
  transform: scale(1.1);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.2), rgba(6, 182, 212, 0.08));
  color: #ffffff;
  font-weight: 700;
  border: 1px solid rgba(79, 70, 229, 0.35);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #4f46e5, #06b6d4);
  box-shadow: 0 0 10px #4f46e5;
}

.nav-item.active .nav-icon {
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(79, 70, 229, 0.6));
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  background: rgba(13, 19, 34, 0.5);
}

/* Mobile Sidebar Backdrop */
.mobile-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 22, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 45;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-backdrop.active {
  display: block;
  opacity: 1;
}

/* ================= Cards & Surfaces ================= */

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  overflow: hidden;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 14px 30px -8px rgba(0, 0, 0, 0.7), 0 0 20px rgba(79, 70, 229, 0.1);
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(22, 32, 54, 0.3);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.card-body {
  padding: 24px;
}

.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: rgba(22, 32, 54, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* ================= Real Metrics & Stat Cards ================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.7), 0 0 20px rgba(79, 70, 229, 0.15);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.stat-card:hover .stat-icon {
  transform: scale(1.1) rotate(2deg);
}

.stat-icon.blue {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.2), rgba(6, 182, 212, 0.2));
  color: #818cf8;
  border: 1px solid rgba(79, 70, 229, 0.35);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

.stat-icon.green {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.stat-icon.amber {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.2));
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.stat-icon.red {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.stat-icon.slate {
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.5), rgba(30, 41, 59, 0.5));
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.stat-val {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ================= Tables & Data Displays ================= */

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

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.table th {
  padding: 14px 18px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  background: rgba(22, 32, 54, 0.4);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.table td {
  padding: 16px 18px;
  font-size: 13.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
  transition: background 0.15s ease;
}

.table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.035);
  color: #ffffff;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* ================= Buttons & CTAs ================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #059669);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #4338ca, #047857);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.7);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(51, 65, 85, 0.8);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  border: 1px solid rgba(239, 68, 68, 0.3);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-2px);
  color: #ffffff;
}

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

.btn-block {
  width: 100%;
}

/* ================= Status Badges & Pills ================= */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  text-transform: capitalize;
  letter-spacing: 0.3px;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-verified,
.badge-active {
  background: var(--status-verified-bg);
  color: var(--status-verified);
  border: 1px solid var(--status-verified-border);
}

.badge-pending,
.badge-evidence_detected {
  background: var(--status-pending-bg);
  color: var(--status-pending);
  border: 1px solid var(--status-pending-border);
}

.badge-rejected,
.badge-expired,
.badge-suspended {
  background: var(--status-rejected-bg);
  color: var(--status-rejected);
  border: 1px solid var(--status-rejected-border);
}

.badge-needs_review {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.35);
}

.badge-test {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* ================= Forms & Inputs ================= */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.form-control,
.form-select {
  width: 100%;
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #ffffff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.form-control:focus,
.form-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.3);
  background: #131d33;
}

.form-control::placeholder {
  color: #64748b;
}

.form-control.is-invalid {
  border-color: var(--status-rejected);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

/* Password Toggle Wrapper */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: color 0.2s;
}

.password-toggle-btn:hover {
  color: #ffffff;
}

/* Strength Meter */
.strength-meter {
  height: 5px;
  width: 100%;
  background: #1e293b;
  border-radius: var(--radius-full);
  margin-top: 8px;
  overflow: hidden;
}

.strength-meter-bar {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-text {
  font-size: 11px;
  margin-top: 4px;
  font-weight: 600;
}

/* ================= Code Blocks ================= */

.code-block {
  background: #0b1120;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 16px;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 12.5px;
  overflow-x: auto;
  line-height: 1.6;
  position: relative;
}

.code-inline {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #38bdf8;
}

/* ================= Alerts & Notifications ================= */

.alert {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 0.3s ease;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.alert-info {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99999;
}

.toast {
  background: #0f172a;
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #ffffff;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  animation: fadeInUp 0.25s ease;
}

/* ================= Empty States ================= */

.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 14px;
  opacity: 0.7;
}

.empty-state-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.empty-state-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

/* ================= Modals ================= */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 22, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  display: flex;
  opacity: 1;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: fadeInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: rgba(22, 32, 54, 0.2);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ================= Responsive Rules & Mobile Horizontal Overflow Lock ================= */

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
  position: relative;
  box-sizing: border-box;
  touch-action: pan-y;
  -webkit-text-size-adjust: 100%;
}

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

.app-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.main-content {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.page-container {
  width: 100% !important;
  max-width: 1440px;
  overflow-x: hidden !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.dashboard-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-two-col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 20px;
  margin-bottom: 24px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
  }

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

  .sidebar-close-btn {
    display: block;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .page-container {
    padding: 16px 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .top-navbar {
    padding: 10px 14px;
    gap: 8px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .navbar-actions {
    gap: 8px;
  }

  .user-profile-details {
    display: none !important;
  }

  .user-profile-badge {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
  }

  .avatar {
    width: 32px !important;
    height: 32px !important;
    font-size: 12px !important;
  }

  .nav-hide-mobile {
    display: none !important;
  }

  .dashboard-two-col-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    width: 100% !important;
  }
}

@media (max-width: 640px) {
  .page-container {
    padding: 12px 10px !important;
  }

  .card {
    border-radius: 14px !important;
    margin-bottom: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .card-body,
  .hero-card-body {
    padding: 14px 12px !important;
  }

  .dashboard-hero-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    width: 100% !important;
    gap: 8px !important;
    margin-top: 14px !important;
  }

  .dashboard-hero-actions .btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 10px 8px !important;
    font-size: 12.5px !important;
  }

  .dashboard-hero-actions .btn-hero-primary {
    grid-column: span 2 !important;
  }

  .stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
  }

  .stat-card {
    padding: 12px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
    border-radius: 12px !important;
    min-width: 0 !important;
  }

  .stat-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 15px !important;
    border-radius: 8px !important;
  }

  .stat-val {
    font-size: clamp(1.15rem, 4vw, 1.35rem) !important;
    font-weight: 800 !important;
    word-break: break-word !important;
  }

  .stat-label {
    font-size: 10.5px !important;
    line-height: 1.25 !important;
    color: var(--text-muted) !important;
  }

  .card-header,
  .card-footer {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 12px !important;
  }

  .card-header .btn,
  .card-footer .btn {
    width: auto !important;
    margin-top: 0 !important;
  }

  .table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
  }

  .public-container {
    margin: 16px auto;
    padding: 16px 12px;
    width: 100%;
  }
}

/* Nav & Sidebar Logout Styling */
.btn-nav-logout {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  color: #f87171 !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  padding: 5px 10px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
}

.btn-nav-logout:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

.nav-item-logout:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #ef4444 !important;
}

.btn-sidebar-logout:hover {
  background: rgba(239, 68, 68, 0.35) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

@media (max-width: 380px) {
  .nav-logout-text {
    display: none !important;
  }
  .top-navbar {
    padding: 8px 10px !important;
  }
  .navbar-actions {
    gap: 6px !important;
  }
}

