/* ==============================================
   نظام الإحصائيات الصحية - الأنماط الرئيسية
   Health Stats System - Main Stylesheet
   ============================================== */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

/* ====== CSS Variables ====== */
:root {
  --bg-main: #0d0f1a;
  --bg-card: #131629;
  --bg-sidebar: #0f1121;
  --bg-navbar: rgba(13, 15, 26, .85);

  --glass-bg: rgba(255, 255, 255, .06);
  --glass-border: rgba(255, 255, 255, .12);

  --accent-1: #6366f1;
  --accent-2: #8b5cf6;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-yellow: #f59e0b;
  --accent-blue: #3b82f6;
  --accent-teal: #14b8a6;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --input-bg: rgba(255, 255, 255, .07);
  --input-border: rgba(255, 255, 255, .12);

  --border: rgba(255, 255, 255, .08);
  --shadow: 0 4px 24px rgba(0, 0, 0, .4);

  --sidebar-w: 260px;
  --navbar-h: 64px;
  --radius: 12px;
  --radius-lg: 18px;
  --transition: .25s ease;
}

/* ====== Light Theme Variables ====== */
[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-navbar: rgba(255, 255, 255, 0.9);

  --glass-bg: rgba(0, 0, 0, 0.04);
  --glass-border: rgba(0, 0, 0, 0.08);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --input-bg: #f1f5f9;
  --input-border: #cbd5e1;

  --border: #e2e8f0;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Tajawal', sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  direction: rtl;
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color var(--transition), color var(--transition);
}

/* Adjust background gradients based on theme */
body {
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(99, 102, 241, .15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(139, 92, 246, .1) 0%, transparent 50%);
}

[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(99, 102, 241, .08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(139, 92, 246, .05) 0%, transparent 50%);
}

a {
  color: var(--accent-1);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-2);
}

img {
  max-width: 100%;
}

/* ====== Layout ====== */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--transition);
}

.main-content {
  margin-right: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.navbar {
  height: var(--navbar-h);
  background: var(--bg-navbar);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-content {
  padding: 28px 28px 24px;
  flex: 1;
}

/* ====== Sidebar ====== */
.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand .brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 10px;
  box-shadow: 0 0 20px rgba(99, 102, 241, .4);
}

.sidebar-brand h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.sidebar-brand p {
  font-size: .75rem;
  color: var(--text-muted);
}

.sidebar-nav {
  padding: 16px 0;
  flex: 1;
}

.nav-section-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 12px 20px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: var(--text-secondary);
  font-size: .9rem;
  font-weight: 500;
  border-right: 3px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.nav-item:hover {
  background: var(--glass-bg);
  color: var(--text-primary);
  border-right-color: var(--accent-1);
}

.nav-item.active {
  background: rgba(99, 102, 241, .15);
  color: var(--accent-1);
  border-right-color: var(--accent-1);
  font-weight: 700;
}

.nav-item .nav-icon {
  font-size: 1.15rem;
  width: 22px;
  text-align: center;
}

.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-user .avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-user .user-info .name {
  font-size: .9rem;
  font-weight: 600;
}

.sidebar-user .user-info .role {
  font-size: .75rem;
  color: var(--text-muted);
  background: var(--glass-bg);
  padding: 1px 8px;
  border-radius: 20px;
  display: inline-block;
  margin-top: 2px;
}

/* ====== Navbar ====== */
.navbar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

/* ====== Impersonation Bar ====== */
.impersonate-bar {
  background: linear-gradient(90deg, rgba(245, 158, 11, .2), rgba(245, 158, 11, .1));
  border-bottom: 1px solid rgba(245, 158, 11, .4);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .9rem;
}

.impersonate-bar .label {
  color: var(--accent-yellow);
  font-weight: 600;
}

.impersonate-bar .btn-exit {
  background: var(--accent-yellow);
  color: #000;
  border: none;
  padding: 6px 16px;
  border-radius: 8px;
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  cursor: pointer;
  font-size: .85rem;
  transition: all var(--transition);
}

.impersonate-bar .btn-exit:hover {
  opacity: .85;
  transform: scale(1.03);
}

/* ====== Theme Toggle Button ====== */
.theme-toggle {
  background: var(--glass-bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: rgba(99, 102, 241, .1);
  color: var(--accent-1);
}

/* ====== Cards ====== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.card-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.card-body {
  padding: 24px;
}

/* ====== Stat Cards ====== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-color, var(--accent-1));
}

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

.stat-card .stat-icon {
  width: 46px;
  height: 46px;
  background: color-mix(in srgb, var(--card-color, var(--accent-1)) 20%, transparent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-card .stat-label {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ====== Tables ====== */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

.data-table th {
  background: rgba(99, 102, 241, .1);
  color: var(--accent-1);
  padding: 13px 16px;
  text-align: right;
  font-weight: 700;
  font-size: .82rem;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:hover {
  background: var(--glass-bg);
}

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

.data-table .total-row td {
  background: rgba(245, 158, 11, .1);
  color: var(--accent-yellow);
  font-weight: 800;
  border-top: 2px solid rgba(245, 158, 11, .3);
}

/* ====== Stats Sheet Table ====== */
.stats-table th {
  font-size: .78rem;
  padding: 10px 12px;
}

.stats-table td {
  padding: 10px 12px;
  font-size: .85rem;
}

.stats-table .count-cell {
  text-align: right;
  font-weight: 700;
  color: var(--text-primary);
}

.stats-table .count-cell.zero {
  color: var(--text-muted);
  font-weight: 400;
}

/* ====== Buttons ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius);
  border: none;
  font-family: 'Tajawal', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, .35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, .5);
  color: #fff;
}

.btn-success {
  background: linear-gradient(135deg, var(--accent-green), #059669);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, .3);
}

.btn-success:hover {
  transform: translateY(-1px);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, var(--accent-red), #dc2626);
  color: #fff;
}

.btn-danger:hover {
  transform: translateY(-1px);
  color: #fff;
}

.btn-warning {
  background: linear-gradient(135deg, var(--accent-yellow), #d97706);
  color: #000;
}

.btn-warning:hover {
  transform: translateY(-1px);
  color: #000;
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, .1);
  color: var(--text-primary);
}

.btn-sm {
  padding: 6px 13px;
  font-size: .82rem;
}

.btn-xs {
  padding: 4px 10px;
  font-size: .78rem;
}

.btn-icon {
  padding: 8px;
  width: 36px;
  height: 36px;
  justify-content: center;
}

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

/* ====== Forms ====== */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  padding: 11px 14px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: 'Tajawal', sans-serif;
  font-size: .95rem;
  transition: all var(--transition);
  width: 100%;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .2);
  background: rgba(99, 102, 241, .05);
}

select.form-control option {
  background: var(--bg-card);
  color: var(--text-primary);
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

.form-control[type="number"] {
  text-align: center;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

/* ====== Alerts ====== */
.alert {
  padding: 13px 18px;
  border-radius: var(--radius);
  font-size: .9rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: rgba(16, 185, 129, .12);
  border: 1px solid rgba(16, 185, 129, .3);
  color: #6ee7b7;
}

.alert-error {
  background: rgba(239, 68, 68, .12);
  border: 1px solid rgba(239, 68, 68, .3);
  color: #fca5a5;
}

.alert-warning {
  background: rgba(245, 158, 11, .12);
  border: 1px solid rgba(245, 158, 11, .3);
  color: #fcd34d;
}

.alert-info {
  background: rgba(59, 130, 246, .12);
  border: 1px solid rgba(59, 130, 246, .3);
  color: #93c5fd;
}

/* ====== Badges ====== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
}

.badge-success {
  background: rgba(16, 185, 129, .2);
  color: #6ee7b7;
}

.badge-danger {
  background: rgba(239, 68, 68, .2);
  color: #fca5a5;
}

.badge-warning {
  background: rgba(245, 158, 11, .2);
  color: #fcd34d;
}

.badge-info {
  background: rgba(59, 130, 246, .2);
  color: #93c5fd;
}

.badge-purple {
  background: rgba(99, 102, 241, .2);
  color: #a5b4fc;
}

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

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  
}

.page-header .breadcrumb {
  font-size: .8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

/* ====== Filter Bar ====== */
.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-bar .form-group {
  min-width: 160px;
}

/* ====== Modal ====== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  width: 90%;
  max-width: 500px;
  transform: scale(.95);
  transition: transform var(--transition);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.modal-overlay.open .modal {
  transform: scale(1);
}

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

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-primary);
}

/* ====== Confirm Delete ====== */
.delete-confirm {
  background: rgba(239, 68, 68, .1);
  border: 1px solid rgba(239, 68, 68, .3);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

/* ====== Search Box ====== */
.search-box {
  position: relative;
}

.search-box input {
  padding-right: 40px !important;
}

.search-box .search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

/* ====== Scrollbar ====== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ====== Empty State ====== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  opacity: .5;
}

.empty-state p {
  font-size: 1rem;
}

/* ====== Pagination ====== */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  margin-top: 20px;
}

.pagination a,
.pagination span {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}

.pagination a:hover {
  background: var(--glass-bg);
  color: var(--text-primary);
}

.pagination .current {
  background: var(--accent-1);
  color: #fff;
  border-color: var(--accent-1);
}

/* ====== Input number centred ====== */
.num-input {
  text-align: center;
  padding: 8px 4px !important;
  width: 80px !important;
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(100%);
  }

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

  .main-content {
    margin-right: 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-content {
    padding: 16px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .page-header h1 {
    font-size: 1.25rem;
  }

  .filter-bar .form-group {
    min-width: 100%;
  }

  .impersonate-bar {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .btn-text {
    display: none;
  }

  .btn-icon-only {
    display: inline-block !important;
  }

  .navbar-actions {
    gap: 8px;
  }

  .btn {
    padding: 8px 12px;
  }

  .navbar-title {
    font-size: 0.95rem;
  }

  .empty-state {
    padding: 40px 10px;
  }
}

/* ====== Export Format Modal ====== */
.export-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.export-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.export-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px 32px 28px;
  width: 90%;
  max-width: 440px;
  transform: scale(.88) translateY(20px);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 25px 80px rgba(0, 0, 0, .5);
  text-align: center;
}

.export-modal-overlay.open .export-modal {
  transform: scale(1) translateY(0);
}

.export-modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.export-modal-subtitle {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.export-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.export-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 16px 22px;
  border-radius: 16px;
  border: 2px solid var(--border);
  background: var(--glass-bg);
  cursor: pointer;
  transition: all .3s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.export-option::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .3s ease;
  border-radius: 14px;
}

.export-option:hover::before {
  opacity: 1;
}

.export-option.excel-opt::before {
  background: linear-gradient(135deg, rgba(16, 185, 129, .1), rgba(5, 150, 105, .05));
}

.export-option.pdf-opt::before {
  background: linear-gradient(135deg, rgba(239, 68, 68, .1), rgba(220, 38, 38, .05));
}

.export-option:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
}

.export-option.excel-opt:hover {
  border-color: var(--accent-green);
}

.export-option.pdf-opt:hover {
  border-color: var(--accent-red);
}

.export-option-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  position: relative;
  z-index: 1;
}

.export-option.excel-opt .export-option-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, .2), rgba(5, 150, 105, .1));
  color: var(--accent-green);
}

.export-option.pdf-opt .export-option-icon {
  background: linear-gradient(135deg, rgba(239, 68, 68, .2), rgba(220, 38, 38, .1));
  color: var(--accent-red);
}

.export-option-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.export-option-ext {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
  background: var(--glass-bg);
  padding: 2px 10px;
  border-radius: 8px;
  position: relative;
  z-index: 1;
}

.export-modal-cancel {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 9px 28px;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  transition: all .25s ease;
}

.export-modal-cancel:hover {
  background: rgba(255, 255, 255, .1);
  color: var(--text-primary);
}

/* Loading overlay for PDF generation */
.pdf-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.pdf-loading-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.pdf-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border);
  border-top-color: var(--accent-1);
  border-radius: 50%;
  animation: pdfSpin 1s linear infinite;
}

@keyframes pdfSpin {
  to { transform: rotate(360deg); }
}

.pdf-loading-text {
  color: #fff;
  font-family: 'Tajawal', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

@media (max-width: 480px) {
  .export-modal {
    padding: 24px 18px 20px;
    max-width: 95%;
  }
  
  .export-options {
    gap: 10px;
  }
  
  .export-option {
    padding: 20px 10px 16px;
  }
  
  .export-option-icon {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }
}