/* ============================================================
   MEDICAL LAB DASHBOARD — style.css
   Cairo font, RTL, dark sidebar + clean white content
   ============================================================ */

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

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

:root {
  /* Sidebar */
  --sb-bg:        #12152b;
  --sb-border:    rgba(255,255,255,0.06);
  --sb-text:      #8a8faf;
  --sb-text-active: #c8cbdf;
  --sb-accent:    rgba(99,102,241,0.18);
  --sb-accent-text: #a5b4fc;
  --sb-width:     230px;

  /* Page */
  --page-bg:      #f0f2f7;
  --topbar-bg:    #ffffff;
  --topbar-border:#e8eaf2;

  /* Cards & surfaces */
  --card-bg:      #ffffff;
  --card-border:  #e8eaf2;
  --card-radius:  12px;

  /* Text */
  --text-primary:   #1a1d2e;
  --text-secondary: #4b4f6b;
  --text-muted:     #9095b5;

  /* Brand */
  --primary:        #6366f1;
  --primary-hover:  #4f46e5;
  --primary-light:  #a5b4fc;
  --primary-bg:     rgba(99,102,241,0.08);

  /* Status colors */
  --status-pending-bg:   #fef9ee;
  --status-pending-text: #b45309;
  --status-pending-border:#fde68a;
  --status-pending-dot:  #f59e0b;

  --status-reviewed-bg:   #eff6ff;
  --status-reviewed-text: #1d4ed8;
  --status-reviewed-border:#bfdbfe;
  --status-reviewed-dot:  #3b82f6;

  --status-attended-bg:   #f0fdf4;
  --status-attended-text: #15803d;
  --status-attended-border:#bbf7d0;
  --status-attended-dot:  #22c55e;

  --status-noshow-bg:   #fef2f2;
  --status-noshow-text: #b91c1c;
  --status-noshow-border:#fecaca;
  --status-noshow-dot:  #ef4444;

  /* Misc */
  --border-radius: 8px;
  --transition:    0.15s ease;
  --font:          'Cairo', 'Segoe UI', sans-serif;
  --topbar-h:      58px;
}

html { font-size: 15px; }

body {
  font-family: var(--font);
  background: var(--page-bg);
  color: var(--text-primary);
  direction: rtl;
  min-height: 100vh;
  margin-right: var(--sb-width);
  transition: margin-right var(--transition);
}

a { text-decoration: none; color: inherit; }
button, input, select, textarea { font-family: var(--font); }
img { max-width: 100%; display: block; }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0; right: 0;
  width: var(--sb-width);
  height: 100vh;
  background: var(--sb-bg);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--transition);
}

.sidebar-logo {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--sb-border);
}

.sidebar-logo img {
  width: 100%;
  max-width: 140px;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.sidebar-logo .lab-name {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 6px;
}

.sidebar-logo .lab-sub {
  color: var(--sb-text);
  font-size: 11px;
  margin-top: 2px;
}

.sidebar-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(99,102,241,0.12);
  color: var(--sb-accent-text);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 10px;
  margin-top: 10px;
}

.sidebar-status::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #6ee7b7;
  flex-shrink: 0;
}

/* Nav sections */
.nav-section { padding: 14px 10px 6px; flex: 1; }

.nav-section-label {
  color: #3d4166;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 8px;
  margin-bottom: 4px;
  margin-top: 8px;
}

.nav-section-label:first-child { margin-top: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: var(--border-radius);
  color: var(--sb-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  margin-bottom: 1px;
  position: relative;
}

.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--sb-text-active);
}

.nav-item.active {
  background: var(--sb-accent);
  color: var(--sb-accent-text);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--primary-light);
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  width: 17px; height: 17px;
  flex-shrink: 0;
  opacity: 0.8;
}

.nav-badge {
  margin-right: auto;
  background: rgba(239,68,68,0.2);
  color: #fca5a5;
  border-radius: 20px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 600;
}

/* Sidebar footer / user */
.sidebar-footer { padding: 12px 14px; border-top: 1px solid var(--sb-border); }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name { color: #c8cbdf; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { color: var(--sb-text); font-size: 10px; margin-top: 1px; }

.logout-btn {
  color: var(--sb-text);
  padding: 5px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  display: flex;
}
.logout-btn:hover { color: #fca5a5; background: rgba(239,68,68,0.1); }

/* Mobile toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 14px; right: 14px;
  z-index: 200;
  background: var(--sb-bg);
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.sidebar-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  backdrop-filter: blur(2px);
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.main-wrapper { min-height: 100vh; display: flex; flex-direction: column; }

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

.topbar-left { display: flex; flex-direction: column; gap: 1px; }
.topbar-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.topbar-sub { font-size: 11px; color: var(--text-muted); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* Main content */
.main-content { padding: 22px 24px; flex: 1; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.page-title { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.page-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stat-card-body { flex: 1; min-width: 0; }
.stat-label { font-size: 11px; color: var(--text-muted); font-weight: 500; margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-change { font-size: 11px; color: #22c55e; margin-top: 5px; font-weight: 500; }
.stat-change.warn { color: #f59e0b; }
.stat-change.danger { color: #ef4444; }

.stat-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 18px; height: 18px; }
.si-blue   { background: #eff6ff; color: #3b82f6; }
.si-green  { background: #f0fdf4; color: #22c55e; }
.si-amber  { background: #fffbeb; color: #f59e0b; }
.si-red    { background: #fef2f2; color: #ef4444; }
.si-purple { background: #f5f3ff; color: #8b5cf6; }

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

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

.card-title { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.card-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.table-wrapper { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table thead th {
  background: #f8f9fc;
  padding: 10px 16px;
  text-align: right;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
}

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

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

.table tbody tr:hover td { background: #fafbff; }

/* ============================================================
   TOOLBAR / FILTERS
   ============================================================ */
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 7px 12px;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
  transition: border-color var(--transition);
}

.search-box:focus-within { border-color: var(--primary); }

.search-icon { color: var(--text-muted); display: flex; align-items: center; flex-shrink: 0; }

.search-box input {
  background: none;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text-primary);
  width: 100%;
}

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

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--border-radius);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--card-border);
}
.btn-ghost:hover { background: var(--page-bg); color: var(--text-primary); }

.btn-danger {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}
.btn-danger:hover { background: #dc2626; border-color: #dc2626; }

.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-icon { padding: 8px; }

.btn-submit { padding: 10px 28px; font-size: 14px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full-width { grid-column: 1 / -1; }

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

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

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

.input-icon-wrapper { position: relative; }
.input-icon {
  position: absolute;
  right: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: flex;
}
.input-icon-wrapper .form-control { padding-right: 36px; }

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

.form-hint { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   STATUS PILLS
   ============================================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}

.pill::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pill-pending {
  background: var(--status-pending-bg);
  color: var(--status-pending-text);
  border-color: var(--status-pending-border);
}
.pill-pending::before { background: var(--status-pending-dot); }

.pill-reviewed {
  background: var(--status-reviewed-bg);
  color: var(--status-reviewed-text);
  border-color: var(--status-reviewed-border);
}
.pill-reviewed::before { background: var(--status-reviewed-dot); }

.pill-attended {
  background: var(--status-attended-bg);
  color: var(--status-attended-text);
  border-color: var(--status-attended-border);
}
.pill-attended::before { background: var(--status-attended-dot); }

.pill-noshow {
  background: var(--status-noshow-bg);
  color: var(--status-noshow-text);
  border-color: var(--status-noshow-border);
}
.pill-noshow::before { background: var(--status-noshow-dot); }

/* Status select (inline in table) */
.status-select {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font);
  border: 1px solid transparent;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.status-select.status-pending  { background: var(--status-pending-bg);  color: var(--status-pending-text);  border-color: var(--status-pending-border); }
.status-select.status-reviewed { background: var(--status-reviewed-bg); color: var(--status-reviewed-text); border-color: var(--status-reviewed-border); }
.status-select.status-attended { background: var(--status-attended-bg); color: var(--status-attended-text); border-color: var(--status-attended-border); }
.status-select.status-no_show  { background: var(--status-noshow-bg);   color: var(--status-noshow-text);   border-color: var(--status-noshow-border); }

/* ============================================================
   CONFIDENCE BAR (OCR)
   ============================================================ */
.conf-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 110px;
}

.conf-track {
  flex: 1;
  height: 5px;
  background: #eef0f8;
  border-radius: 3px;
  overflow: hidden;
}

.conf-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.conf-high { background: #22c55e; }
.conf-mid  { background: #f59e0b; }
.conf-low  { background: #ef4444; }

.conf-val {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 32px;
  text-align: left;
}

/* ============================================================
   IMAGE THUMBNAIL
   ============================================================ */
.img-thumb {
  width: 36px; height: 36px;
  border-radius: 7px;
  border: 1px solid var(--card-border);
  object-fit: cover;
  cursor: pointer;
  transition: transform var(--transition);
  background: var(--page-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 16px;
  overflow: hidden;
}
.img-thumb:hover { transform: scale(1.05); }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-top: 1px solid var(--card-border);
  flex-wrap: wrap;
  gap: 8px;
}

.pagination-info { font-size: 12px; color: var(--text-muted); }

.pagination-pages { display: flex; gap: 4px; }

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash-container {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 280px;
  max-width: 440px;
  width: 90%;
}

.flash-msg {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  animation: flashIn 0.3s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

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

.flash-success { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.flash-danger  { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.flash-info    { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }

.flash-close {
  background: none; border: none;
  cursor: pointer; color: inherit;
  opacity: 0.6; font-size: 14px;
  padding: 0; line-height: 1;
  flex-shrink: 0;
}
.flash-close:hover { opacity: 1; }

/* ============================================================
   DELETE MODAL
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.4);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 32px 28px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-icon {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #fef2f2;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  color: #ef4444;
}

.modal-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.modal-body  { font-size: 13px; color: var(--text-muted); line-height: 1.7; margin-bottom: 24px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; }

/* ============================================================
   DETAIL PANELS (for inquiry view)
   ============================================================ */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.detail-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 18px;
  border-bottom: 1px solid #f5f6fb;
}

.detail-row:nth-child(odd) { border-left: 1px solid #f5f6fb; }

.detail-label { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.detail-value { font-size: 13px; color: var(--text-primary); font-weight: 500; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  margin-right: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #0e1122;
}

.login-bg {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 70% 60% at 20% 50%, rgba(99,102,241,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 50% 70% at 80% 30%, rgba(139,92,246,0.08) 0%, transparent 60%),
    #0e1122;
}

.login-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
}

.login-container {
  position: relative; z-index: 1;
  width: 100%; max-width: 400px;
  padding: 1rem;
}

.login-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 36px 32px;
  backdrop-filter: blur(10px);
  animation: loginAppear 0.4s ease;
}

@keyframes loginAppear {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 28px;
}

.login-brand-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.login-brand-name {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.login-brand-name span { color: var(--primary-light); }

.login-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.login-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 28px;
}

.login-card .form-group label { color: rgba(255,255,255,0.6); }

.login-card .form-control {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: #fff;
}

.login-card .form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.login-card .form-control::placeholder { color: rgba(255,255,255,0.25); }
.login-card .input-icon { color: rgba(255,255,255,0.3); }

.login-footer-text {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

.login-footer-text a { color: var(--primary-light); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--sb-bg);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 14px;
  font-size: 12px;
}

.site-footer a {
  color: #38bdf8;
  font-weight: 600;
  border: 1px solid rgba(56,189,248,0.3);
  padding: 2px 8px;
  border-radius: 4px;
  transition: background var(--transition);
}

.site-footer a:hover { background: rgba(56,189,248,0.1); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  :root { --sb-width: 0px; }

  body { margin-right: 0; }

  .sidebar {
    transform: translateX(100%);
  }

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

  .sidebar-overlay.open { display: block; }

  .sidebar-toggle { display: flex; }

  .main-content { padding: 16px; }

  .topbar { padding: 0 16px 0 60px; }

  .stats-grid { grid-template-columns: 1fr 1fr; }

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

  .form-group.full-width { grid-column: 1; }

  .page-header { margin-top: 8px; }

  .detail-grid { grid-template-columns: 1fr; }
  .detail-row:nth-child(odd) { border-left: none; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search-box { max-width: 100%; }
}