:root {
  --primary-500: #0d6efd;
  --primary-600: #0b5ed7;
  --surface: #ffffff;
  --muted: #6c757d;
  --bg-auth-start: #0d6efd;
  --bg-auth-end: #6610f2;
}

body {
  font-family: 'Tajawal', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  background-color: #f8f9fa;
}

.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg-auth-start), var(--bg-auth-end));
  display: flex;
  align-items: center;
}

.auth-card {
  max-width: 420px;
}

.card.shadow-soft {
  border: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.brand-badge {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: rgba(13, 110, 253, 0.1);
  color: var(--primary-500);
  border-radius: 12px;
}

.stat-card {
  border: 0 !important;
  box-shadow: 0 10px 20px rgba(13,110,253,0.08);
}
.stat-card .icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 10px;
}
.stat-card .value {
  font-size: 1.5rem;
  font-weight: 800;
}
.text-muted-2 { color: #7c8a9a !important; }

.navbar { box-shadow: 0 4px 14px rgba(0,0,0,0.06); }

/* Public report page styles */
.hero-report {
  background: linear-gradient(135deg, var(--bg-auth-start), var(--bg-auth-end));
}
.hero-report .brand-badge {
  width: 72px; height: 72px; border-radius: 20px;
  background: rgba(255,255,255,.12);
  color: #fff;
}
.hero-report .app-logo {
  width: 96px; height: 96px; object-fit: contain;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,.2));
}
@media (min-width: 992px) {
  .hero-report .app-logo { width: 120px; height: 120px; }
}
.hero-report .title {
  font-weight: 800;
}
.hero-report .lab-name {
  font-weight: 800;
  font-size: 1.75rem;
}
.filter-card {
  background: #ffffffcc;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  border-radius: 16px;
}
.file-card .chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .5rem;
  background: rgba(13,110,253,.08);
  color: var(--primary-600);
  border: 1px solid rgba(13,110,253,.15);
  border-radius: 999px;
  font-size: .85rem;
}
.bg-primary-subtle {
  background: rgba(13,110,253,.08) !important;
}

.patient-header {
  background: linear-gradient(90deg, rgba(13,110,253,.12), rgba(102,16,242,.10));
  border: 1px solid rgba(13,110,253,.15);
  padding: .75rem 1rem;
  border-radius: 14px;
}
.patient-header .patient-name {
  font-weight: 800;
  font-size: 1.1rem;
}
.patient-header .patient-count {
  background: #fff;
  border: 1px solid rgba(13,110,253,.25);
  color: var(--primary-600);
}


/* Region dashboard mobile improvements */
@media (max-width: 576px) {
  .page-actions .btn { width: 100%; }
}

/* Stack table rows on small screens */
@media (max-width: 768px) {
  table.table-stacked thead {
    display: none;
  }
  table.table-stacked tbody tr {
    display: block;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,.04);
    background: #fff;
    margin-bottom: .75rem;
    padding: .5rem .5rem;
  }
  table.table-stacked tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .4rem .5rem !important;
    border: none !important;
  }
  table.table-stacked tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #6c757d;
  }
  table.table-stacked tbody td [class*="btn"] {
    padding: .35rem .5rem;
  }
  table.table-stacked tbody td[data-label="التقارير"],
  table.table-stacked tbody td[data-label="الشكاوى"] {
    align-items: center;
    gap: .5rem;
    flex-wrap: nowrap;
    display: inline-flex;
    width: 100%;
    justify-content: flex-start;
  }
  table.table-stacked tbody td[data-label="التقارير"]::before,
  table.table-stacked tbody td[data-label="الشكاوى"]::before {
    display: none;
  }
  table.table-stacked tbody td[data-label="الاسم"] {
    font-weight: 800;
    font-size: 1.05rem;
  }
  .lab-name-mobile { display: inline-block; line-height: 1.3; }
}

/* Sticky filter on mobile */
@media (max-width: 768px) {
  .filter-sticky {
    position: sticky;
    top: 56px; /* below navbar */
    z-index: 1020;
    background: #f8f9fa;
    padding-top: .5rem;
  }
}

/* Mobile lab cards */
.lab-card { border: 1px solid #e9ecef; }
.lab-card .lab-name { font-weight: 800; font-size: 1.05rem; }
.chip {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .15rem .5rem; border-radius: 999px; font-size: .85rem;
  border: 1px solid rgba(13,110,253,.2); color: var(--primary-600);
  background: rgba(13,110,253,.08);
}
.chip-username { border-color: rgba(25,135,84,.25); color: #198754; background: rgba(25,135,84,.08); }
.chip-muted { border-color: #e1e5ea; color: #6c757d; background: #f8f9fa; }

