/* ============================================================
   PayFlow v2 — Premium Design System
   Inspired by Stripe + Linear — Arabic/English SaaS
   ============================================================ */

/* ── Google Fonts ────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ───────────────────────────────── */
:root {
  /* Brand */
  --brand: #4f46e5;
  --brand-hover: #4338ca;
  --brand-active: #3730a3;
  --brand-light: #eef2ff;
  --brand-subtle: rgba(79, 70, 229, 0.06);
  --brand-glow: rgba(79, 70, 229, 0.15);

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --text-muted: #94a3b8;
  --text-white: #f1f5f9;

  /* Sidebar */
  --sidebar-bg: #070d18;
  --sidebar-surface: #0d1525;
  --sidebar-hover: rgba(255, 255, 255, 0.05);
  --sidebar-active-bg: rgba(79, 70, 229, 0.12);
  --sidebar-text: rgba(148, 163, 184, 0.8);
  --sidebar-text-hover: #f1f5f9;
  --sidebar-width: 260px;

  /* Surfaces */
  --surface-page: #f6f8fa;
  --surface-card: #ffffff;
  --surface-elevated: #ffffff;
  --border-default: #e2e8f0;
  --border-light: #f1f5f9;
  --border-hover: #cbd5e1;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.03);
  --shadow-md: 0 1px 3px 0 rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-xl: 0 10px 15px -3px rgb(0 0 0 / 0.06), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-card: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 2px 4px rgba(0, 0, 0, 0.03), 0 4px 8px rgba(0, 0, 0, 0.03);
  --shadow-card-hover: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.04), 0 12px 24px rgba(0, 0, 0, 0.06);

  /* Status */
  --success: #059669;
  --success-bg: #ecfdf5;
  --success-border: rgba(5, 150, 105, 0.2);
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: rgba(217, 119, 6, 0.2);
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: rgba(220, 38, 38, 0.2);
  --info: #0284c7;
  --info-bg: #f0f9ff;

  /* Borders radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Transitions */
  --transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── BASE ────────────────────────────────────────── */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--surface-page);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[dir="rtl"] body,
[dir="rtl"] * {
  font-family: 'Inter', system-ui, 'Noto Naskh Arabic', Tahoma, sans-serif;
}

/* ── Alpine cloak ────────────────────────────────── */
[x-cloak] { display: none !important; }

/* ── SIDEBAR ─────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  background-image: linear-gradient(180deg, #070d18 0%, #0b1525 100%);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  z-index: 10;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 70% 0%, rgba(79, 70, 229, 0.06), transparent 60%);
  pointer-events: none;
}

.sidebar-logo-wrap {
  padding: 1.25rem 1rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-logo-wrap .logo-box {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--brand), #818cf8);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.sidebar-logo-wrap .logo-text h1 {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}

.sidebar-logo-wrap .logo-text p {
  font-size: 0.65rem;
  color: rgba(148, 163, 184, 0.6);
  margin-top: 1px;
  font-weight: 400;
}

.sidebar-nav {
  flex: 1;
  padding: 0.5rem 0.5rem;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

.nav-section {
  padding: 0.25rem 0.5rem 0.15rem;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.35);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.75rem;
  border-radius: 7px;
  color: var(--sidebar-text);
  font-size: 0.82rem;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
  margin-bottom: 1px;
  position: relative;
}

.sidebar-link:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-hover);
}

.sidebar-link.active {
  background: var(--sidebar-active-bg);
  color: #e0e7ff;
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5px;
  height: 18px;
  background: var(--brand);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px rgba(79, 70, 229, 0.4);
}

[dir="rtl"] .sidebar-link.active::before {
  left: auto;
  right: 0;
  border-radius: 3px 0 0 3px;
}

.sidebar-link .link-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.6;
}

.sidebar-link:hover .link-icon,
.sidebar-link.active .link-icon {
  opacity: 0.9;
}

.sidebar-footer {
  padding: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 1;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.15);
}

/* ── TOP BAR ─────────────────────────────────────── */
.top-bar {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-default);
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 5;
}

.top-bar-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.top-bar .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand);
}

/* ── MAIN AREA ───────────────────────────────────── */
.main-area {
  flex: 1;
  overflow-y: auto;
  padding: 2rem 2.5rem;
}

@media (max-width: 767px) {
  .main-area {
    padding: 1rem 1rem;
  }
}

/* ── CARDS ───────────────────────────────────────── */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
}

.card-header {
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-header h2,
.card-header h3 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.card-body {
  padding: 1.35rem;
}

.card-body.p-0 {
  padding: 0;
}

/* ── STAT CARDS ──────────────────────────────────── */
.stat-card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: default;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--brand), #818cf8);
  opacity: 0;
  transition: var(--transition);
}

.stat-card:hover::after {
  opacity: 1;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 1px;
}

/* ── QUICK ACTION CARDS ──────────────────────────── */
.action-card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1rem 1.15rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--brand-subtle);
}

.action-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.action-card-arrow {
  color: var(--text-muted);
  opacity: 0;
  transition: var(--transition);
  margin-left: auto;
}

.action-card:hover .action-card-arrow {
  opacity: 1;
  transform: translateX(2px);
}

[dir="rtl"] .action-card:hover .action-card-arrow {
  transform: translateX(-2px);
}

/* ── TABLES ──────────────────────────────────────── */
.table-container {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-header {
  padding: 0.7rem 0.85rem;
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.table-cell {
  padding: 0.7rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: var(--transition);
}

table.w-full tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.1s ease;
}

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

table.w-full tbody tr:hover {
  background: #f8fafc;
}

/* ── BUTTONS ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
  outline: none;
  position: relative;
}

.btn:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand);
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  box-shadow:
    0 1px 2px rgba(79, 70, 229, 0.15),
    0 2px 4px rgba(79, 70, 229, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  transform: translateY(-1px);
  box-shadow:
    0 4px 8px rgba(79, 70, 229, 0.25),
    0 8px 16px rgba(79, 70, 229, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-primary:active {
  background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
  transform: translateY(0);
  box-shadow:
    0 1px 2px rgba(79, 70, 229, 0.2),
    inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: white;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: var(--border-hover);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow:
    0 1px 2px rgba(220, 38, 38, 0.15),
    0 2px 4px rgba(220, 38, 38, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-1px);
  box-shadow:
    0 4px 8px rgba(220, 38, 38, 0.25),
    0 8px 16px rgba(220, 38, 38, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--text-tertiary);
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm);
}

.btn-ghost:hover {
  background: #f1f5f9;
  color: var(--text-primary);
}

/* ── FORM INPUTS ─────────────────────────────────── */
.form-group {
  margin-bottom: 1.1rem;
}

.form-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

.form-input {
  width: 100%;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-primary);
  background: white;
  transition: var(--transition);
  outline: none;
  font-family: inherit;
}

.form-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.form-input:hover {
  border-color: var(--border-hover);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.7rem center;
  padding-left: 1.8rem;
  padding-right: 0.8rem;
}

[dir="rtl"] select.form-input {
  background-position: right 0.7rem center;
  padding-left: 0.8rem;
  padding-right: 1.8rem;
}

/* ── BADGES ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.55rem;
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.5;
  border: 1px solid transparent;
}

.badge-success { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.badge-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-primary { background: var(--brand-light); color: var(--brand); }
.badge-gray { background: #f1f5f9; color: #64748b; }

/* ── DIVIDER ─────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid #f1f5f9;
  margin: 1.5rem 0;
}

/* ── SECTION TITLE ───────────────────────────────── */
.section-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: -0.01em;
}

/* ── SALARY SUMMARY ──────────────────────────────── */
.salary-summary {
  background: var(--brand-light);
  border: 1px solid #c7d2fe;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  margin-top: 0.6rem;
}

/* ── TOAST ───────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 500;
  color: white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition-slow);
  backdrop-filter: blur(8px);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success { background: linear-gradient(135deg, #059669, #10b981); }
.toast-error { background: linear-gradient(135deg, #dc2626, #ef4444); }

[dir="rtl"] .toast {
  right: auto;
  left: 1.5rem;
}

/* ── BREADCRUMB ──────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb a:hover {
  color: var(--text-secondary);
}

.breadcrumb .sep {
  color: #d1d5db;
}

.breadcrumb .current {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── AUTH PAGES ──────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0b1120 0%, #141d33 50%, #0b1120 100%);
  padding: 2rem 1rem;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.06), transparent 70%);
  top: -200px;
  right: -150px;
}

.auth-page::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.04), transparent 70%);
  bottom: -150px;
  left: -150px;
}

.auth-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 2.25rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.03);
  position: relative;
  z-index: 1;
}

.auth-logo-box {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--brand), #818cf8);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin: 0 auto 0.85rem;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.auth-title {
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.5rem;
}

/* ── SPINNER ─────────────────────────────────────── */
.spinner {
  border: 2.5px solid #f1f5f9;
  border-top: 2.5px solid var(--brand);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  animation: spin 0.65s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

[dir="rtl"] .spinner {
  animation: spin-rtl 0.65s linear infinite;
}

@keyframes spin-rtl {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

/* ── EMPTY STATE ─────────────────────────────────── */
.empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.4;
}

/* ── LIVE INDICATOR ──────────────────────────────── */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: #d97706;
}

.live-indicator::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f59e0b;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── ANIMATIONS ──────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.35s ease-out forwards;
}

/* ── MOBILE SIDEBAR ──────────────────────────────── */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.mobile-nav-panel {
  position: fixed;
  inset-y: 0;
  left: 0;
  z-index: 50;
  width: 280px;
  background: var(--sidebar-bg);
  background-image: linear-gradient(180deg, #070d18 0%, #0b1525 100%);
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.4);
}

[dir="rtl"] .mobile-nav-panel {
  left: auto;
  right: 0;
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 767px) {
  .stat-card { padding: 0.85rem 0.95rem; }
  .stat-value { font-size: 1.3rem; }
  .card-body { padding: 1rem; }
  .card-header { padding: 0.85rem 1rem; }
  .auth-card { padding: 1.5rem; }
  .toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    text-align: center;
    border-radius: 10px;
  }
  .btn { min-height: 40px; }
  .form-input { font-size: 16px !important; }
}

/* ── SCROLLBAR ───────────────────────────────────── */
.main-area::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.main-area::-webkit-scrollbar-track {
  background: transparent;
}

.main-area::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* ── CHECKBOX ────────────────────────────────────── */
input[type="checkbox"] {
  accent-color: var(--brand);
  width: 16px;
  height: 16px;
  border-radius: 4px;
  cursor: pointer;
}

/* ── MONO NUMBERS ────────────────────────────────── */
.font-mono {
  font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
  font-feature-settings: 'tnum';
  letter-spacing: -0.01em;
}

/* ── MISC ────────────────────────────────────────── */
.sticky-side {
  position: sticky;
  top: 1rem;
}

.page-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

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