/* ================================================================
   SHIFAJO Design System v3
   Healthcare SaaS — Clean, structured, clinical-grade UI
   ================================================================ */

/* ── Design Tokens ── */
:root {
  --rg-primary: #0066ff;
  --rg-primary-hover: #0052cc;
  --rg-primary-light: rgba(0,102,255,0.08);
  --rg-primary-subtle: rgba(0,102,255,0.05);
  --rg-secondary: #F59E0B;
  --rg-secondary-hover: #D97706;
  --rg-secondary-light: #FEF3C7;
  --rg-danger: #EF4444;
  --rg-danger-light: #FEF2F2;
  --rg-warning: #F59E0B;
  --rg-warning-light: #FFFBEB;
  --rg-success: #10B981;
  --rg-success-light: #ECFDF5;
  --rg-info: #3B82F6;
  --rg-info-light: #EFF6FF;

  --rg-dark: #0b1a30;
  --rg-gray-900: #1e293b;
  --rg-gray-800: #27272A;
  --rg-gray-700: #3F3F46;
  --rg-gray-600: #475569;
  --rg-gray-500: #64748b;
  --rg-gray-400: #94a3b8;
  --rg-gray-300: #cbd5e1;
  --rg-gray-200: #e2e8f0;
  --rg-gray-100: #f1f5f9;
  --rg-gray-50: #f8fafc;
  --rg-white: #FFFFFF;

  --rg-surface: #f1f5f9;
  --rg-card: #FFFFFF;
  --rg-border: #cbd5e1;
  --rg-border-strong: #94a3b8;
  --rg-text: #1e293b;
  --rg-text-secondary: #475569;
  --rg-text-muted: #64748b;

  --rg-font: 'Inter', system-ui, -apple-system, sans-serif;
  --rg-font-dari: 'Noto Sans Arabic', 'Geeza Pro', 'Helvetica Neue', Arial, 'Segoe UI', Tahoma, sans-serif;
  --rg-font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  --rg-radius-xs: 3px;
  --rg-radius-sm: 3px;
  --rg-radius: 4px;
  --rg-radius-lg: 4px;
  --rg-radius-xl: 4px;
  --rg-radius-2xl: 4px;
  --rg-radius-full: 9999px;

  --rg-shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --rg-shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --rg-shadow: 0 1px 3px rgba(0,0,0,.08);
  --rg-shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --rg-shadow-lg: 0 8px 24px rgba(0,0,0,.1);
  --rg-shadow-xl: 0 16px 48px rgba(0,0,0,.12);

  --rg-transition: .15s ease;
  --rg-transition-slow: .25s ease;

  --rg-sidebar-w: 220px;
  --rg-sidebar-collapsed-w: 60px;
  --rg-header-h: 50px;
  --rg-mobile-nav-h: 56px;
}

/* ── Base Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--rg-font);
  font-size: 12px;
  color: var(--rg-text);
  background: var(--rg-surface);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[dir="rtl"] body { font-family: var(--rg-font-dari), var(--rg-font); }

a { color: var(--rg-primary); text-decoration: none; transition: color var(--rg-transition); }
a:hover { color: var(--rg-primary-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--rg-primary);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.3; color: var(--rg-gray-900); }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }
h5 { font-size: .875rem; }
h6 { font-size: .8125rem; }

/* ================================================================
   LAYOUT — SIDEBAR (white, flat, grouped)
   ================================================================ */
.rg-wrapper {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

.rg-sidebar {
  width: var(--rg-sidebar-w);
  background: var(--rg-dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 1200;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform .25s ease, width .25s ease;
  border-inline-end: none;
}

.rg-sidebar-brand {
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #071222;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.rg-sidebar-brand .brand-icon {
  width: 36px;
  height: 36px;
  background: var(--rg-primary);
  border-radius: var(--rg-radius-xl);
  display: grid;
  place-items: center;
  font-size: 16px;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}

.rg-sidebar-brand .brand-logo { width: 100%; height: 100%; object-fit: cover; }
.rg-sidebar-brand .brand-name {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.02em;
}

.rg-nav { padding: 8px 12px; flex: 1; }

.rg-nav-section {
  padding: 6px 8px 4px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(148,163,184,0.6);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-block: 12px 2px;
}

.rg-nav-section:first-child { margin-block-start: 0; }

.rg-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  border-radius: 0;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 400;
  transition: all .15s ease;
  cursor: pointer;
  margin-block-end: 0;
  text-decoration: none;
  position: relative;
}

.rg-nav-item i { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.rg-nav-item:hover { color: #ffffff; background: #162a45; text-decoration: none; }

.rg-nav-item.active {
  color: #fff;
  background: var(--rg-primary);
  font-weight: 500;
  box-shadow: none;
}

.rg-nav-item.active i { color: #fff; }

.rg-nav-item.active::before { display: none; }

html[dir="rtl"] .rg-nav-item.active::before { display: none; }

.rg-nav-item .badge {
  margin-inline-start: auto;
  background: var(--rg-danger);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: var(--rg-radius-full);
  color: #fff;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
}

.rg-nav-item.active .badge { background: rgba(255,255,255,.3); }

.rg-sidebar-footer {
  padding: 12px 16px;
  display: flex;
  justify-content: center;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.rg-sidebar-collapse-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: #94a3b8;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 14px;
  transition: all .2s ease;
}

.rg-sidebar-collapse-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }

html[dir="rtl"] .rg-sidebar-collapse-btn i { transform: rotate(180deg); }

.rg-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-radius: 0;
  transition: background .2s ease;
  cursor: pointer;
  background: #071222;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.rg-sidebar-user:hover { background: #162a45; }

.rg-sidebar-user .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--rg-radius-full);
  background: #334155;
  color: #cbd5e1;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.rg-sidebar-user .user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rg-sidebar-user .user-name { font-size: 12px; font-weight: 600; color: #f8fafc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rg-sidebar-user .user-role { font-size: 11px; color: #64748b; }

/* ================================================================
   LAYOUT — MAIN CONTENT
   ================================================================ */
.rg-main {
  flex: 1;
  margin-inline-start: var(--rg-sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: margin var(--rg-transition);
}

.rg-header {
  height: var(--rg-header-h);
  background: #003399;
  border-block-end: none;
  display: flex;
  align-items: center;
  padding: 0 15px;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.rg-header .page-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  flex: 1;
  color: #ffffff;
  letter-spacing: -.01em;
}

.rg-header-actions { display: flex; align-items: center; gap: 6px; }

.rg-header-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.15);
  cursor: pointer;
  transition: all .2s ease;
  position: relative;
}

.rg-header-btn:hover { background: rgba(255,255,255,0.25); color: #fff; border-color: rgba(255,255,255,0.35); }
.rg-header-btn .notif-dot { position: absolute; top: 4px; inset-inline-end: 4px; width: 8px; height: 8px; background: var(--rg-danger); border-radius: 50%; border: 2px solid #003399; }

/* User chip in header (WellMedic+ style) */
.rg-header-user-chip { margin-inline-start: 8px; }

.rg-header-user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 16px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--rg-radius-full);
  background: rgba(255,255,255,0.15);
  cursor: pointer;
  font-family: inherit;
  transition: all .2s ease;
}

.rg-header-user-btn:hover { border-color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.25); }

.rg-header-user-name {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rg-header-user-role {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  display: none;
}

@media (min-width: 1024px) {
  .rg-header-user-role { display: block; }
  .rg-header-user-btn { flex-direction: row; }
  .rg-header-user-name + .rg-header-user-role { margin-inline-start: -6px; }
}

.rg-header-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.rg-header-user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.rg-header-user-chevron { font-size: 12px; color: rgba(255,255,255,0.6); }

.hamburger {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: var(--rg-radius);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  color: #ffffff;
}

.rg-sticky-banner { position: sticky; top: var(--rg-header-h, 60px); z-index: 99; margin: 0 20px; border-radius: 0 0 var(--rg-radius-lg) var(--rg-radius-lg); }
.rg-content { padding: 12px; flex: 1; }
.rg-content-wide { max-width: 1120px; margin: 0 auto; width: 100%; }

/* Page header bar */
.rg-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block-end: 20px;
}

.rg-page-header h1, .rg-page-header h2 { margin: 0; }
.rg-page-header-sub { font-size: 12.5px; color: var(--rg-text-muted); margin-block-start: 2px; }
.rg-page-header-actions { display: flex; gap: 6px; align-items: center; }

/* Persistent banners */
.rg-persistent-banners { display: flex; flex-direction: column; }

.rg-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 20px;
  font-size: 12.5px;
  font-weight: 500;
}

.rg-banner-content { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.rg-banner-warning { background: #92400E; color: #fff; }
.rg-banner-info { background: var(--rg-primary); color: #fff; }
.rg-banner-danger { background: #991B1B; color: #fff; }

@media (max-width: 768px) {
  .rg-banner { padding: 8px 16px; font-size: 12px; flex-wrap: wrap; }
  .rg-banner .btn { width: 100%; justify-content: center; margin-block-start: 4px; }
}

#sidebarOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 1100;
}

#sidebarOverlay.active { display: block; }

/* ================================================================
   CARDS
   ================================================================ */
.rg-card {
  background: var(--rg-card);
  border-radius: var(--rg-radius);
  border: 1px solid var(--rg-border);
  box-shadow: none;
  padding: 12px;
  margin-block-end: 12px;
  transition: box-shadow var(--rg-transition);
}

.rg-card:hover { box-shadow: none; }

.rg-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: 12px;
  gap: 10px;
  padding-block-end: 10px;
  border-block-end: 1px solid var(--rg-gray-100);
}

.rg-card-title { font-size: 13px; font-weight: 600; color: var(--rg-primary); }
.rg-card-subtitle { font-size: 12px; color: var(--rg-text-secondary); margin-block-start: 2px; }

/* Stat Cards — left-border accent + shadow */
.rg-stat-card {
  background: var(--rg-card);
  border-radius: var(--rg-radius);
  border: 1px solid var(--rg-border);
  border-inline-start: none;
  padding: 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: none;
  transition: box-shadow .2s ease;
}

.rg-stat-card:hover { box-shadow: none; transform: none; }

.rg-stat-card.primary { border-inline-start-color: var(--rg-primary); }
.rg-stat-card.success { border-inline-start-color: var(--rg-success); }
.rg-stat-card.warning { border-inline-start-color: var(--rg-warning); }
.rg-stat-card.danger { border-inline-start-color: var(--rg-danger); }
.rg-stat-card.info { border-inline-start-color: var(--rg-info); }

.rg-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--rg-radius);
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}

.rg-stat-icon.primary { background: var(--rg-primary-light); color: var(--rg-primary); }
.rg-stat-icon.success { background: var(--rg-success-light); color: var(--rg-success); }
.rg-stat-icon.warning { background: var(--rg-warning-light); color: var(--rg-secondary-hover); }
.rg-stat-icon.danger { background: var(--rg-danger-light); color: var(--rg-danger); }
.rg-stat-icon.info { background: var(--rg-info-light); color: var(--rg-info); }

.rg-stat-value { font-size: 20px; font-weight: 700; color: var(--rg-gray-900); line-height: 1; letter-spacing: -.02em; margin-top: 2px; }
.rg-stat-label { font-size: 11px; color: var(--rg-text-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 500; }
.rg-stat-change { font-size: 11px; }
.rg-stat-change.up { color: var(--rg-success); }
.rg-stat-change.down { color: var(--rg-danger); }

/* ================================================================
   BUTTONS
   ================================================================ */
.rg-btn, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--rg-radius);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
  height: 32px;
}

.rg-btn:hover, .btn:hover { text-decoration: none; transform: none; }
.rg-btn:active, .btn:active { transform: none; }
.rg-btn:disabled, .rg-btn.disabled, .btn:disabled, .btn.disabled { opacity: .45; cursor: not-allowed; transform: none; }

.rg-btn-primary, .btn-primary { background: var(--rg-primary); color: #fff; box-shadow: none; }
.rg-btn-primary:hover, .btn-primary:hover { background: var(--rg-primary-hover); box-shadow: none; color: #fff; }

.rg-btn-secondary, .btn-secondary { background: var(--rg-gray-100); color: var(--rg-gray-700); border-color: var(--rg-border); }
.rg-btn-secondary:hover, .btn-secondary:hover { background: var(--rg-gray-200); color: var(--rg-gray-900); }

.rg-btn-success, .btn-success { background: var(--rg-success); color: #fff; }
.rg-btn-success:hover, .btn-success:hover { background: #059669; color: #fff; }

.rg-btn-danger, .btn-danger { background: var(--rg-danger); color: #fff; }
.rg-btn-danger:hover, .btn-danger:hover { background: #DC2626; color: #fff; }

.rg-btn-warning, .btn-warning { background: var(--rg-warning); color: #fff; }
.rg-btn-warning:hover, .btn-warning:hover { background: var(--rg-secondary-hover); color: #fff; }

.rg-btn-info, .btn-info { background: var(--rg-info); color: #fff; }
.rg-btn-info:hover, .btn-info:hover { background: #2563EB; color: #fff; }

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

.rg-btn-outline-secondary, .btn-outline-secondary { background: transparent; color: var(--rg-gray-600); border-color: var(--rg-border); }
.rg-btn-outline-secondary:hover, .btn-outline-secondary:hover { background: var(--rg-gray-100); color: var(--rg-gray-900); border-color: var(--rg-border-strong); }

.btn-outline-danger { background: transparent; color: var(--rg-danger); border-color: var(--rg-danger); }
.btn-outline-danger:hover { background: var(--rg-danger); color: #fff; }

.rg-btn-ghost, .btn-ghost { background: transparent; color: var(--rg-gray-600); border-color: transparent; }
.rg-btn-ghost:hover, .btn-ghost:hover { background: var(--rg-gray-100); color: var(--rg-gray-900); }

.rg-btn-sm, .btn-sm { padding: 4px 10px; font-size: 11px; height: 28px; }
.rg-btn-lg, .btn-lg { padding: 8px 16px; font-size: 13px; height: 36px; border-radius: var(--rg-radius); }
.rg-btn-icon, .btn-icon { width: 38px; height: 38px; padding: 0; }
.rg-btn-icon.sm, .btn-icon.sm { width: 30px; height: 30px; }
.btn-pill { border-radius: var(--rg-radius-full); }
.btn-rounded { border-radius: var(--rg-radius-full); }
.w-100.btn, .btn.w-100, .rg-btn.w-100 { width: 100%; }

/* ================================================================
   FORMS
   ================================================================ */
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #475569;
  margin-block-end: 3px;
}

.form-control, .form-select {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--rg-border);
  border-radius: var(--rg-radius);
  font-size: 12px;
  font-family: inherit;
  color: var(--rg-text);
  background: #ffffff;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  line-height: 1.5;
  height: 32px;
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--rg-primary);
  box-shadow: 0 0 0 1px rgba(0,102,255,.1);
  background: var(--rg-white);
}

.form-control::placeholder { color: var(--rg-gray-400); }
.form-control-sm, .form-select-sm { padding: 4px 8px; font-size: 11px; height: 26px; border-radius: var(--rg-radius); }
.form-text { font-size: 12px; color: var(--rg-text-secondary); margin-block-start: 4px; }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check-input { width: 18px; height: 18px; accent-color: var(--rg-primary); border-radius: var(--rg-radius-sm); }

textarea.form-control { resize: vertical; min-height: 60px; height: auto; }
.input-group { display: flex; }
.input-group .form-control { border-start-end-radius: 0; border-end-end-radius: 0; }
.input-group .btn { border-start-start-radius: 0; border-end-start-radius: 0; }
.has-error .form-control { border-color: var(--rg-danger); background: #FEF2F2; }
.has-error .form-label { color: var(--rg-danger); }
.help-block { font-size: 12px; color: var(--rg-danger); margin-block-start: 4px; }

/* Icon-prefix inputs */
.input-icon-wrap {
  position: relative;
}

.input-icon-wrap .input-icon {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--rg-gray-400);
  pointer-events: none;
  z-index: 1;
}

.input-icon-wrap .form-control.has-icon {
  padding-inline-start: 42px;
}

.input-icon-wrap .input-icon-end {
  position: absolute;
  inset-inline-end: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--rg-gray-400);
  border-radius: var(--rg-radius-lg);
  font-size: 16px;
  z-index: 1;
}

.input-icon-wrap .input-icon-end:hover { color: var(--rg-gray-700); }

/* Form section grouping */
.rg-form-section {
  border: 1px solid var(--rg-border);
  border-radius: var(--rg-radius);
  padding: 12px;
  margin-block-end: 12px;
  background: #ffffff;
}

.rg-form-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--rg-primary);
  text-transform: none;
  letter-spacing: normal;
  margin-block-end: 10px;
  padding-block-end: 4px;
  border-block-end: 1px solid #f1f5f9;
}

.form-group { margin-block-end: 10px; }

/* ================================================================
   TABLES (clean, minimal, no stripes)
   ================================================================ */
.rg-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rg-table-wrap table, .rg-table-wrap .table { width: 100%; min-width: 100%; }

.rg-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 12px;
}

.rg-table thead th {
  background: #f1f5f9;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  text-transform: none;
  letter-spacing: normal;
  text-align: start;
  border-block-end: 1px solid var(--rg-border);
  white-space: nowrap;
}

.rg-table tbody td {
  padding: 8px 10px;
  border-block-end: 1px solid #f1f5f9;
  vertical-align: middle;
}

.rg-table tbody tr:hover { background: var(--rg-gray-50); }
.rg-table tbody tr:last-child td { border-block-end: none; }

.ah-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ah-table { width: 100%; border-collapse: collapse; border-spacing: 0; font-size: 12px; }
.ah-table thead th { background: #f1f5f9; padding: 8px 10px; font-size: 12px; font-weight: 600; color: #475569; text-transform: none; letter-spacing: normal; text-align: start; border-block-end: 1px solid var(--rg-border); white-space: nowrap; }
.ah-table tbody td { padding: 8px 10px; border-block-end: 1px solid #f1f5f9; vertical-align: middle; }
.ah-table tbody tr:hover { background: var(--rg-gray-50); }
.ah-table tbody tr:last-child td { border-block-end: none; }

/* ================================================================
   BADGES (square-ish, compact)
   ================================================================ */
.badge, .rg-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: .01em;
}

.badge-success, .rg-badge-success { background: var(--rg-success-light); color: #065F46; }
.badge-warning, .rg-badge-warning { background: var(--rg-warning-light); color: #92400E; }
.badge-danger, .rg-badge-danger { background: var(--rg-danger-light); color: #991B1B; }
.badge-info, .rg-badge-info { background: var(--rg-info-light); color: #1E40AF; }
.badge-secondary, .rg-badge-secondary { background: var(--rg-gray-100); color: var(--rg-gray-600); }
.badge-primary, .rg-badge-primary { background: var(--rg-primary-light); color: var(--rg-primary); }
.badge-active { background: var(--rg-success-light); color: #065F46; }
.badge-trial { background: var(--rg-info-light); color: #1E40AF; }
.badge-expired { background: var(--rg-danger-light); color: #991B1B; }
.badge-suspended { background: var(--rg-warning-light); color: #92400E; }
.badge-completed { background: var(--rg-success-light); color: #065F46; }
.badge-pending { background: var(--rg-gray-100); color: var(--rg-gray-600); }
.badge-in_progress { background: var(--rg-warning-light); color: #92400E; }

/* ================================================================
   ALERTS (icon + text, subtle bg)
   ================================================================ */
.rg-alert, .ah-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--rg-radius-lg);
  font-size: 12.5px;
  line-height: 1.45;
  margin-block-end: 10px;
  border: 1px solid transparent;
}

.rg-alert.success, .ah-alert.success { background: var(--rg-success-light); color: #065F46; border-color: #A7F3D0; }
.rg-alert.error, .ah-alert.error { background: var(--rg-danger-light); color: #991B1B; border-color: #FECACA; }
.rg-alert.warning, .ah-alert.warning { background: var(--rg-warning-light); color: #92400E; border-color: #FDE68A; }
.rg-alert.info, .ah-alert.info { background: var(--rg-info-light); color: #1E40AF; border-color: #BFDBFE; }

.rg-alert a, .ah-alert a { color: inherit; text-decoration: underline; font-weight: 600; }

/* ================================================================
   DROPDOWN (clean, sharp)
   ================================================================ */
.rg-dropdown, .ah-dropdown { position: relative; display: inline-flex; }

.rg-dropdown-menu, .ah-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  inset-inline-end: 0;
  min-width: 180px;
  background: var(--rg-white);
  border: 1px solid var(--rg-border);
  border-radius: var(--rg-radius-lg);
  box-shadow: var(--rg-shadow-md);
  padding: 4px;
  z-index: 1000;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}

.rg-dropdown-menu.open, .ah-dropdown-menu.open { display: block; }

.rg-dropdown-item, .ah-dropdown-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--rg-radius);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--rg-gray-700);
  cursor: pointer;
  transition: background var(--rg-transition);
  border: none;
  background: none;
  width: 100%;
  text-align: start;
  font-family: inherit;
}

.rg-dropdown-item:hover, .ah-dropdown-item:hover { background: var(--rg-gray-100); color: var(--rg-gray-900); }
.rg-dropdown-sep, .ah-dropdown-sep { height: 1px; background: var(--rg-gray-100); margin: 2px 0; }

/* ================================================================
   MODAL (clean dialog, no rounded corners)
   ================================================================ */
.rg-modal-overlay, .ah-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.rg-modal-overlay.open, .ah-modal-overlay.open,
.rg-modal-overlay.active, .ah-modal-overlay.active { display: flex; }

.rg-modal, .ah-modal {
  background: var(--rg-white);
  border-radius: var(--rg-radius-2xl);
  border: 1px solid var(--rg-border);
  box-shadow: var(--rg-shadow-xl);
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
}

.rg-modal-sm, .ah-modal-sm { max-width: 400px; }

.rg-modal-hdr, .ah-modal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-block-end: 1px solid var(--rg-border);
}

.rg-modal-hdr h3, .ah-modal-hdr h3 { font-size: 13px; font-weight: 700; }

.rg-modal-close, .ah-modal-close {
  width: 28px;
  height: 28px;
  border-radius: var(--rg-radius);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  color: var(--rg-gray-400);
  display: grid;
  place-items: center;
}

.rg-modal-close:hover, .ah-modal-close:hover { background: var(--rg-gray-100); color: var(--rg-gray-900); }

.rg-modal-body, .ah-modal-body { padding: 16px; }

/* ================================================================
   AVATARS
   ================================================================ */
.rg-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--rg-radius-full);
  background: var(--rg-primary-light);
  color: var(--rg-primary);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.rg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rg-avatar.sm, .rg-avatar-sm { width: 28px; height: 28px; font-size: 11px; border-radius: var(--rg-radius-full); background: var(--rg-primary-light); color: var(--rg-primary); display: grid; place-items: center; font-weight: 600; flex-shrink: 0; overflow: hidden; }
.rg-avatar.lg, .rg-avatar-lg { width: 48px; height: 48px; font-size: 18px; }

/* ================================================================
   EMPTY STATE
   ================================================================ */
.rg-empty-state, .ah-empty-state {
  text-align: center;
  padding: 28px 16px;
  color: var(--rg-text-secondary);
  border: 1px dashed var(--rg-gray-300);
  border-radius: var(--rg-radius-lg);
  font-size: 13px;
}

.rg-empty-icon, .ah-empty-icon { font-size: 28px; margin-block-end: 8px; color: var(--rg-gray-300); }
.rg-empty-state h4, .ah-empty-state h4 { color: var(--rg-gray-600); margin-block-end: 4px; font-size: 13px; }

/* ================================================================
   PROGRESS
   ================================================================ */
.rg-progress, .ah-progress {
  height: 6px;
  background: var(--rg-gray-200);
  border-radius: var(--rg-radius-full);
  overflow: hidden;
}

.rg-progress-bar, .ah-progress-bar {
  height: 100%;
  border-radius: var(--rg-radius-full);
  transition: width .3s ease;
  background: var(--rg-primary);
}

.rg-progress-bar.success, .ah-progress-bar.success { background: var(--rg-success); }
.rg-progress-bar.danger, .ah-progress-bar.danger { background: var(--rg-danger); }
.rg-progress-bar.warning, .ah-progress-bar.warning { background: var(--rg-warning); }

/* ================================================================
   MOBILE BOTTOM NAV (pill-style with dot indicator)
   ================================================================ */
.mobile-nav {
  display: none;
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  height: calc(var(--rg-mobile-nav-h) + env(safe-area-inset-bottom, 0px));
  background: var(--rg-white);
  border-block-start: 1px solid var(--rg-border);
  z-index: 1100;
  padding: 0 4px env(safe-area-inset-bottom, 0px);
  align-items: center;
  justify-content: space-around;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 14px;
  border-radius: var(--rg-radius-full);
  color: var(--rg-gray-400);
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--rg-transition);
  position: relative;
}

.mobile-nav-item i { font-size: 18px; }

.mobile-nav-item.active {
  color: var(--rg-primary);
  background: var(--rg-primary-light);
}

.mobile-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--rg-primary);
  border-radius: 50%;
}

.mobile-nav-item .mob-badge { position: absolute; top: 0; inset-inline-end: 8px; width: 6px; height: 6px; background: var(--rg-danger); border-radius: 50%; }

/* ================================================================
   FLASH MESSAGES
   ================================================================ */
.rg-flash-wrap, .ah-flash-wrap {
  position: fixed;
  top: 12px;
  inset-inline-end: 12px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 360px;
}

/* ================================================================
   LANDING PAGE (clean, structured)
   ================================================================ */
.rg-land-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--rg-white);
  border-block-end: 1px solid var(--rg-border);
  padding: 0 24px;
}

.rg-land-nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 24px;
}

.rg-land-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.rg-land-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--rg-radius);
  overflow: hidden;
}

.rg-land-logo-icon img { width: 100%; height: 100%; object-fit: contain; }

.rg-land-logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--rg-gray-900);
  letter-spacing: -.01em;
}

.rg-land-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline-start: auto;
}

.rg-land-links a, .rg-land-links button {
  padding: 6px 12px;
  border-radius: var(--rg-radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--rg-gray-600);
  text-decoration: none;
  transition: all var(--rg-transition);
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.rg-land-links a:hover, .rg-land-links button:hover { color: var(--rg-gray-900); background: var(--rg-gray-100); text-decoration: none; }

.rg-land-cta-btn {
  background: var(--rg-primary) !important;
  color: #fff !important;
  font-weight: 600 !important;
  border-radius: var(--rg-radius) !important;
}

.rg-land-cta-btn:hover { background: var(--rg-primary-hover) !important; }

/* Hero */
.rg-land-hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.rg-land-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--rg-primary-light);
  color: var(--rg-primary);
  border-radius: var(--rg-radius-sm);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  margin-block-end: 16px;
}

.rg-land-hero h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--rg-gray-900);
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-block-end: 16px;
}

.rg-land-hero h1 span { color: var(--rg-primary); }

.rg-land-hero-desc {
  font-size: 1rem;
  color: var(--rg-text-secondary);
  line-height: 1.6;
  max-width: 480px;
  margin-block-end: 24px;
}

.rg-land-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.rg-land-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--rg-radius);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--rg-transition);
}

.rg-land-hero-cta.primary { background: var(--rg-primary); color: #fff; }
.rg-land-hero-cta.primary:hover { background: var(--rg-primary-hover); color: #fff; text-decoration: none; }
.rg-land-hero-cta.secondary { background: var(--rg-white); color: var(--rg-gray-700); border: 1px solid var(--rg-border); }
.rg-land-hero-cta.secondary:hover { background: var(--rg-gray-50); border-color: var(--rg-border-strong); text-decoration: none; }

.rg-land-hero-points { display: flex; gap: 16px; margin-block-start: 20px; flex-wrap: wrap; }
.rg-land-hero-point { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--rg-text-secondary); }
.rg-land-hero-point i { color: var(--rg-success); font-size: 14px; }

.rg-land-hero-visual { position: relative; min-height: 360px; }

/* Feature sections */
.rg-land-section { max-width: 1080px; margin: 0 auto; padding: 64px 24px; }
.rg-land-section-alt { background: var(--rg-gray-50); }
.rg-land-section-alt .rg-land-section { padding: 64px 24px; }

.rg-land-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rg-gray-900);
  text-align: center;
  margin-block-end: 8px;
}

.rg-land-section-sub {
  font-size: .9375rem;
  color: var(--rg-text-secondary);
  text-align: center;
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.rg-land-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.rg-land-feature-card {
  background: var(--rg-white);
  border: 1px solid var(--rg-border);
  border-radius: var(--rg-radius-lg);
  padding: 20px;
  transition: border-color var(--rg-transition);
}

.rg-land-feature-card:hover { border-color: var(--rg-primary); }

.rg-land-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--rg-radius);
  display: grid;
  place-items: center;
  font-size: 18px;
  margin-block-end: 12px;
}

.rg-land-feature-card h4 { font-size: 14px; margin-block-end: 6px; }
.rg-land-feature-card p { font-size: 13px; color: var(--rg-text-secondary); line-height: 1.55; }

/* Steps */
.rg-land-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.rg-land-step { text-align: center; position: relative; }

.rg-land-step-num {
  width: 36px;
  height: 36px;
  border-radius: var(--rg-radius-full);
  background: var(--rg-primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
}

.rg-land-step::after {
  content: '';
  position: absolute;
  top: 18px;
  inset-inline-start: calc(50% + 24px);
  inset-inline-end: calc(-50% + 24px);
  height: 1px;
  background: var(--rg-gray-300);
}

.rg-land-step:last-child::after { display: none; }
.rg-land-step h5 { font-size: 13px; margin-block-end: 4px; }
.rg-land-step p { font-size: 12px; color: var(--rg-text-secondary); line-height: 1.5; }

/* Pricing */
.rg-land-plans-tabs {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-block-end: 32px;
  background: var(--rg-gray-100);
  border-radius: var(--rg-radius);
  padding: 3px;
  width: fit-content;
  margin-inline: auto;
}

.rg-land-plan-tab {
  padding: 6px 16px;
  border-radius: var(--rg-radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--rg-gray-600);
  border: none;
  background: none;
  cursor: pointer;
  transition: all var(--rg-transition);
  font-family: inherit;
}

.rg-land-plan-tab.active { background: var(--rg-white); color: var(--rg-gray-900); box-shadow: var(--rg-shadow-xs); }

.rg-land-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  max-width: 840px;
  margin: 0 auto;
}

.rg-land-plan-card {
  background: var(--rg-white);
  border-radius: var(--rg-radius-lg);
  border: 1px solid var(--rg-border);
  padding: 24px 20px;
  text-align: center;
  transition: border-color var(--rg-transition);
}

.rg-land-plan-card:hover { border-color: var(--rg-primary); }

.rg-land-plan-card.featured {
  border-color: var(--rg-primary);
  border-width: 2px;
  position: relative;
}

.rg-land-plan-card.featured h4, .rg-land-plan-card.featured .rg-land-plan-price { color: var(--rg-gray-900); }

.rg-land-plan-popular {
  display: inline-block;
  background: var(--rg-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--rg-radius-sm);
  margin-block-end: 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.rg-land-plan-name { font-size: 13px; font-weight: 600; margin-block-end: 6px; }
.rg-land-plan-price { font-size: 2rem; font-weight: 700; }
.rg-land-plan-price sub { font-size: .8rem; font-weight: 400; opacity: .6; }

.rg-land-plan-features { list-style: none; text-align: start; margin: 16px 0; }
.rg-land-plan-features li { padding: 5px 0; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.rg-land-plan-features li i { color: var(--rg-success); font-size: 14px; }

/* CTA */
.rg-land-cta {
  background: var(--rg-gray-900);
  padding: 56px 24px;
  text-align: center;
  border-radius: var(--rg-radius-lg);
  max-width: 1080px;
  margin: 0 auto 32px;
}

.rg-land-cta h2 { color: #fff; font-size: 1.5rem; font-weight: 700; margin-block-end: 8px; }
.rg-land-cta p { color: rgba(255,255,255,.6); font-size: .9375rem; margin-block-end: 24px; }
.rg-land-cta .rg-land-hero-cta.primary { background: var(--rg-primary); }
.rg-land-cta .rg-land-hero-cta.primary:hover { background: var(--rg-primary-hover); }

/* Footer */
.rg-land-footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--rg-text-muted);
}

.rg-land-footer a { color: var(--rg-text-muted); }
.rg-land-footer a:hover { color: var(--rg-primary); }

.plans-section { display: none; }
.plans-section.active { display: block; }

/* ================================================================
   AUTH PAGES — WellMedic+ Inspired
   ================================================================ */

/* Background — centered card on soft gradient */
.rg-auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #E6FAF7 0%, #F0FDFA 30%, #F8FAFC 60%, #E0F2FE 100%);
  padding: 24px;
}

/* Hero panel — hidden by default in new design */
.rg-auth-hero { display: none; }
.rg-auth-panel { display: contents; }

/* Auth card — centered white card */
.rg-auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--rg-white);
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.04);
  padding: 40px 36px;
  position: relative;
}

.rg-auth-card.wide { max-width: 560px; }

/* Auth title & subtitle */
.rg-auth-card .auth-title,
.rg-auth-title {
  font-size: 1.75rem;
  font-weight: 800;
  text-align: center;
  margin-block-end: 6px;
  color: var(--rg-gray-900);
  letter-spacing: -.02em;
}

.rg-auth-card .auth-subtitle,
.rg-auth-subtitle {
  color: var(--rg-text-secondary);
  text-align: center;
  margin-block-end: 28px;
  font-size: 14px;
  line-height: 1.5;
}

/* Close / X button at top-right */
.rg-auth-close-btn {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--rg-gray-100);
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  color: var(--rg-gray-500);
  display: grid;
  place-items: center;
  transition: all .2s ease;
}

.rg-auth-close-btn:hover { background: var(--rg-gray-200); color: var(--rg-gray-900); }

/* Topbar — simplified for auth pages */
.rg-auth-topbar {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(8px);
}

.rg-auth-topbar a, .rg-auth-topbar button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--rg-radius-xl);
  font-size: 13px;
  font-weight: 500;
  color: var(--rg-gray-600);
  text-decoration: none;
  border: 1px solid var(--rg-gray-200);
  background: var(--rg-white);
  cursor: pointer;
  font-family: inherit;
  transition: all .2s ease;
}

.rg-auth-topbar a:hover, .rg-auth-topbar button:hover { background: var(--rg-gray-50); color: var(--rg-gray-900); text-decoration: none; }
.rg-auth-topbar-actions { display: flex; gap: 6px; align-items: center; }

/* Auth form fields */
.rg-auth-field { margin-block-end: 18px; }
.rg-auth-field-tight { margin-block-end: 14px; }

/* Password wrap with icon */
.rg-auth-password-wrap { position: relative; }
.rg-auth-password-wrap input { padding-inline-end: 44px; }

.rg-auth-password-wrap .rg-auth-password-toggle {
  position: absolute;
  inset-inline-end: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--rg-gray-400);
  border-radius: var(--rg-radius-lg);
}

.rg-auth-password-wrap .rg-auth-password-toggle:hover { color: var(--rg-gray-700); }

/* Forgot password link */
.rg-auth-forgot-link {
  display: block;
  text-align: end;
  font-size: 13px;
  color: var(--rg-primary);
  font-weight: 600;
  margin-block-start: 6px;
  text-decoration: none;
}

.rg-auth-forgot-link:hover { text-decoration: underline; }

/* OTP inputs */
.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-block-end: 20px;
}

.otp-inputs input {
  width: 48px;
  height: 54px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  font-family: var(--rg-font-mono);
  border: 1.5px solid var(--rg-gray-200);
  border-radius: var(--rg-radius-xl);
  background: #F8FAFC;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.otp-inputs input:focus {
  outline: none;
  border-color: var(--rg-primary);
  box-shadow: 0 0 0 3px rgba(0,102,255,.1);
  background: var(--rg-white);
}

.otp-inputs input.filled { border-color: var(--rg-primary); background: var(--rg-white); }
.otp-inputs.shake { animation: otpShake .35s ease-in-out; }
@keyframes otpShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Auth divider */
.rg-auth-divider, .auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--rg-gray-400);
  font-size: 13px;
}

.rg-auth-divider::before, .rg-auth-divider::after,
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--rg-gray-200); }

/* Social login section */
.rg-auth-social-label {
  text-align: center;
  font-size: 13px;
  color: var(--rg-text-secondary);
  margin-block-end: 14px;
}

.rg-auth-social-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-block-end: 8px;
}

.rg-auth-social-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--rg-gray-200);
  background: var(--rg-white);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
  color: var(--rg-gray-700);
  font-size: 20px;
}

.rg-auth-social-btn:hover { border-color: var(--rg-primary); background: var(--rg-primary-light); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08); text-decoration: none; }
.rg-auth-social-btn img { width: 22px; height: 22px; }
.rg-auth-social-btn svg { width: 22px; height: 22px; }

/* Google button (full-width variant) */
.rg-auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1.5px solid var(--rg-gray-200);
  border-radius: var(--rg-radius-xl);
  background: var(--rg-white);
  color: var(--rg-gray-700);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s ease;
  font-family: inherit;
  height: 44px;
}

.rg-auth-google-btn:hover { background: var(--rg-gray-50); border-color: var(--rg-gray-300); color: var(--rg-gray-900); text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.06); }

/* Auth note / links */
.rg-auth-note, .auth-note, .auth-note-small { font-size: 14px; color: var(--rg-text-secondary); text-align: center; margin-block-start: 20px; }
.rg-auth-note a, .auth-note a { color: var(--rg-primary); font-weight: 700; text-decoration: none; }
.rg-auth-note a:hover, .auth-note a:hover { text-decoration: underline; }

.rg-auth-step-meta, .auth-step-meta { font-size: 13px; color: var(--rg-text-secondary); text-align: center; margin-block-start: 14px; }

.rg-auth-link-btn, .auth-link-button {
  background: none;
  border: none;
  color: var(--rg-primary);
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  padding: 0;
}

.rg-auth-link-btn:disabled, .auth-link-button:disabled { opacity: .5; cursor: not-allowed; }

.rg-auth-back-btn, .auth-change-button {
  background: none;
  border: none;
  color: var(--rg-text-secondary);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  margin-block-start: 12px;
  display: block;
  width: 100%;
  text-align: center;
}

.rg-auth-legal, .auth-legal-links { display: flex; justify-content: center; gap: 8px; font-size: 11px; color: var(--rg-gray-400); margin-block-start: 24px; }
.rg-auth-legal a, .auth-legal-links a { color: var(--rg-gray-500); font-weight: 500; }
.rg-auth-legal a:hover, .auth-legal-links a:hover { color: var(--rg-primary); }

/* Step indicator dots */
.rg-auth-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-block-end: 24px;
}

.rg-auth-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rg-gray-200);
  transition: all .2s ease;
}

.rg-auth-step-dot.active { background: var(--rg-primary); width: 28px; border-radius: var(--rg-radius-full); }

/* Tabs (Patient/Doctor toggle) */
.rg-auth-tabs {
  display: flex;
  background: var(--rg-gray-100);
  border-radius: var(--rg-radius-full);
  padding: 3px;
  margin-block-end: 24px;
}

.rg-auth-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: none;
  border-radius: var(--rg-radius-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--rg-gray-500);
  cursor: pointer;
  font-family: inherit;
  transition: all .2s ease;
  text-align: center;
}

.rg-auth-tab.active {
  background: var(--rg-white);
  color: var(--rg-gray-900);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* Password strength hint */
.rg-auth-password-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--rg-success);
  margin-block-start: 6px;
}

.rg-auth-password-hint i { font-size: 14px; }

/* Legacy auth aliases */
.auth-field { margin-block-end: 18px; }
.auth-field-tight { margin-block-end: 14px; }
.auth-password-wrap { position: relative; }
.auth-password-wrap input { padding-inline-end: 44px; }
.auth-password-input { width: 100%; }
.auth-password-toggle { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: none; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--rg-gray-400); border-radius: var(--rg-radius-lg); }
.auth-password-toggle:hover { color: var(--rg-gray-700); }
.auth-btn-center { width: 100%; justify-content: center; }
.auth-link-strong { color: var(--rg-primary); font-weight: 700; }
.auth-step-desc { font-size: 14px; color: var(--rg-text-secondary); margin-block-end: 14px; }
.auth-alt-links { margin-block-start: 20px; }
.auth-alt-title { font-size: 13px; color: var(--rg-text-secondary); margin-block-end: 10px; text-align: center; }
.auth-links-grid { display: flex; gap: 8px; justify-content: center; }
.auth-links-grid .btn { flex: 1; }
.auth-alert-left { text-align: start; }
.auth-alert-mono { font-family: var(--rg-font-mono); font-size: 13px; }
.auth-center { text-align: center; }
.auth-subtitle-tight { color: var(--rg-text-secondary); margin-block-end: 20px; text-align: center; }
.auth-google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; }
.auth-back-btn { display: inline-flex; align-items: center; gap: 4px; padding: 10px 20px; font-size: 13px; font-weight: 500; color: var(--rg-text-secondary); text-decoration: none; }
.auth-back-btn:hover { color: var(--rg-primary); }
.otp-logo { font-size: 36px; text-align: center; margin-block-end: 16px; }

/* Phone input */
.phone-input-wrap { display: flex; align-items: center; gap: 0; }
.phone-flag { padding: 10px 12px; background: var(--rg-gray-100); border: 1.5px solid var(--rg-gray-200); border-inline-end: none; border-radius: var(--rg-radius-xl) 0 0 var(--rg-radius-xl); font-size: 14px; font-weight: 500; color: var(--rg-gray-600); white-space: nowrap; height: 44px; display: flex; align-items: center; }
html[dir="rtl"] .phone-flag { border-inline-end: 1.5px solid var(--rg-gray-200); border-inline-start: none; border-radius: 0 var(--rg-radius-xl) var(--rg-radius-xl) 0; }
.phone-input-wrap .form-control { border-start-start-radius: 0; border-end-start-radius: 0; }

/* Auth page responsive */
@media (max-width: 480px) {
  .rg-auth-card { padding: 28px 20px; border-radius: 4px; }
  .rg-auth-card .auth-title, .rg-auth-title { font-size: 1.5rem; }
  .otp-inputs { gap: 6px; }
  .otp-inputs input { width: 42px; height: 48px; font-size: 18px; }
}

/* ================================================================
   PATIENT LAYOUT
   ================================================================ */
.rg-patient-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.rg-patient-topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  margin: 12px 16px 0;
  background: var(--rg-white);
  border: 1px solid var(--rg-border);
  border-radius: var(--rg-radius-lg);
  position: sticky;
  top: 6px;
  z-index: 100;
}

.rg-patient-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: var(--rg-radius);
  color: var(--rg-gray-500);
  font-weight: 500;
  font-size: 12.5px;
  transition: all var(--rg-transition);
  text-decoration: none;
  position: relative;
}

.rg-patient-nav-item:hover { color: var(--rg-gray-900); background: var(--rg-gray-100); text-decoration: none; }
.rg-patient-nav-item.active { color: var(--rg-primary); background: var(--rg-primary-light); }

.rg-patient-content { flex: 1; padding: 16px; }

/* ================================================================
   UTILITY CLASSES
   ================================================================ */
.d-none { display: none !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }
.d-block { display: block !important; }
.d-inline-flex { display: inline-flex !important; }

.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }

.gap-2 { gap: 2px; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

.mt-4 { margin-block-start: 4px; }
.mt-8 { margin-block-start: 8px; }
.mt-10 { margin-block-start: 10px; }
.mt-12 { margin-block-start: 12px; }
.mt-14 { margin-block-start: 14px; }
.mt-16 { margin-block-start: 16px; }
.mt-20 { margin-block-start: 20px; }
.mt-24 { margin-block-start: 24px; }
.mt-32 { margin-block-start: 32px; }
.mb-4 { margin-block-end: 4px; }
.mb-8 { margin-block-end: 8px; }
.mb-12 { margin-block-end: 12px; }
.mb-14 { margin-block-end: 14px; }
.mb-16 { margin-block-end: 16px; }
.mb-20 { margin-block-end: 20px; }
.mb-24 { margin-block-end: 24px; }
.mb-sm { margin-block-end: 8px; }

.p-16 { padding: 16px; }
.p-20 { padding: 20px; }
.p-24 { padding: 24px; }

.text-center { text-align: center; }
.text-end { text-align: end; }
.text-start { text-align: start; }

.text-sm { font-size: 12.5px; }
.text-xs { font-size: 11.5px; }
.text-lg { font-size: 16px; }
.text-muted { color: var(--rg-text-secondary); }
.text-danger { color: var(--rg-danger); }
.text-success { color: var(--rg-success); }
.text-primary { color: var(--rg-primary); }

.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.w-100 { width: 100%; }
.rounded { border-radius: var(--rg-radius); }

/* Grid */
.rg-grid-2, .ah-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rg-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rg-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.rg-grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }

/* Legacy flex utilities */
.ah-flex-row { display: flex; align-items: center; gap: 8px; }
.ah-flex-col { display: flex; flex-direction: column; }
.ah-flex-between { display: flex; align-items: center; justify-content: space-between; }
.ah-flex-center { display: flex; align-items: center; gap: 6px; }
.ah-flex-1 { flex: 1; }
.ah-text-sm { font-size: 12.5px; }
.ah-text-xs { font-size: 11.5px; }
.ah-text-muted-sm { font-size: 12.5px; color: var(--rg-text-secondary); }
.ah-text-muted-xs { font-size: 11.5px; color: var(--rg-text-secondary); }
.ah-fw-700 { font-weight: 700; }
.ah-fw-800 { font-weight: 800; }
.ah-label-xs { font-size: 10px; color: var(--rg-text-muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.ah-code-badge { font-family: var(--rg-font-mono); font-size: 12px; background: var(--rg-gray-100); padding: 2px 8px; border-radius: var(--rg-radius-xs); }
.ah-meta-block { margin-block-end: 16px; }
.ah-row-link { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--rg-radius-lg); border: 1px solid var(--rg-border); margin-block-end: 4px; transition: all var(--rg-transition); cursor: pointer; text-decoration: none; color: inherit; }
.ah-row-link:hover { border-color: var(--rg-primary); background: var(--rg-primary-light); text-decoration: none; }
.ah-row-link-primary:hover { border-color: var(--rg-primary); background: var(--rg-primary-light); }

/* ================================================================
   RESPONSIVE — MOBILE
   ================================================================ */
@media (max-width: 768px) {
  .rg-sidebar, .rg-sidebar.ah-sidebar { transform: translateX(-100%); }
  html[dir="rtl"] .rg-sidebar, html[dir="rtl"] .rg-sidebar.ah-sidebar { transform: translateX(100%); }
  .rg-sidebar.open, .rg-sidebar.ah-sidebar.open { transform: translateX(0) !important; }
  .hamburger { display: grid; }

  .rg-main { margin-inline-start: 0; }
  .rg-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    height: var(--rg-header-h, 60px);
  }
  .rg-content { padding: 12px; padding-block-start: calc(var(--rg-header-h, 60px) + 12px); padding-block-end: calc(var(--rg-mobile-nav-h) + env(safe-area-inset-bottom, 0px) + 12px); }
  .mobile-nav { display: flex; }
  .rg-header-user-name, .rg-header-user-role, .rg-header-user-chevron { display: none; }
  .rg-header-user-btn { padding: 4px; border: none; }
  .rg-sidebar-collapse-btn { display: none; }

  /* Landing */
  .rg-land-hero { grid-template-columns: 1fr; gap: 24px; padding: 40px 20px; }
  .rg-land-hero-visual { display: none; }
  .rg-land-features { grid-template-columns: 1fr; }
  .rg-land-steps { grid-template-columns: 1fr 1fr; }
  .rg-land-step::after { display: none; }
  .rg-land-plans-tabs { flex-wrap: wrap; }
  .rg-land-cta { margin-inline: 12px; }
  .rg-land-links { display: none; }
  .rg-land-menu-toggle { display: grid; }

  /* Auth */
  .rg-auth-shell { grid-template-columns: 1fr; }
  .rg-auth-hero { display: none; }
  .rg-auth-panel { padding: 20px 16px 24px; }

  /* Patient */
  .rg-patient-topnav { display: none; }

  /* Grids */
  .rg-grid-2, .ah-grid-2 { grid-template-columns: 1fr; }
  .rg-grid-3 { grid-template-columns: 1fr; }
  .rg-grid-4 { grid-template-columns: 1fr 1fr; }
  .rg-grid-6 { grid-template-columns: 1fr 1fr; }

  body { overflow-x: hidden; }
}

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

@media (max-width: 768px) {
  .rg-land-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    background: var(--rg-white);
    border: 1px solid var(--rg-border);
    border-radius: var(--rg-radius-lg);
    padding: 8px;
    margin: 4px 12px;
    box-shadow: var(--rg-shadow-md);
    z-index: 50;
  }
  .rg-land-links.open a, .rg-land-links.open button { width: 100%; justify-content: start; padding: 8px 12px; }
}

@media (min-width: 769px) {
  .rg-land-menu-toggle { display: none; }
}

/* ================================================================
   PRINT
   ================================================================ */
@media print {
  .rg-sidebar, .rg-header, .mobile-nav, .no-print,
  .rg-patient-topnav, .hamburger, .rg-flash-wrap, .ah-flash-wrap { display: none !important; }
  .rg-main { margin: 0 !important; }
  .rg-content { padding: 0 !important; }
  body { background: #fff !important; }
  .rg-card { border: 1px solid #ddd !important; }
}

/* ================================================================
   RTL OVERRIDES
   ================================================================ */
html[dir="rtl"] .rg-land-plan-features { text-align: right; }
html[dir="rtl"] .rg-sidebar.open { transform: translateX(0); }

/* ================================================================
   TRIAL BANNER
   ================================================================ */
.rg-trial-banner {
  background: var(--rg-primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--rg-radius);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-block-end: 16px;
  font-size: 13px;
}

.rg-trial-banner a { color: #fff; text-decoration: underline; font-weight: 600; }
.rg-trial-banner-blue { background: var(--rg-info); }
.rg-trial-banner-purple { background: #7C3AED; }
.rg-trial-banner-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; background: rgba(255,255,255,.2); color: #fff; border-radius: var(--rg-radius); font-size: 12px; font-weight: 600; text-decoration: none; border: none; cursor: pointer; font-family: inherit; }
.rg-trial-banner-btn:hover { background: rgba(255,255,255,.3); text-decoration: none; color: #fff; }

/* ================================================================
   SIDEBAR COLLAPSED STATE
   ================================================================ */
body.rg-sidebar-collapsed .rg-sidebar { width: var(--rg-sidebar-collapsed-w); background: var(--rg-dark); }
body.rg-sidebar-collapsed .rg-sidebar .brand-name,
body.rg-sidebar-collapsed .rg-sidebar .rg-nav-section,
body.rg-sidebar-collapsed .rg-sidebar .rg-nav-item span,
body.rg-sidebar-collapsed .rg-sidebar .user-name,
body.rg-sidebar-collapsed .rg-sidebar .user-role { display: none; }
body.rg-sidebar-collapsed .rg-main { margin-inline-start: var(--rg-sidebar-collapsed-w); }
body.rg-sidebar-collapsed .rg-sidebar .rg-nav-item { justify-content: center; padding: 8px; }
body.rg-sidebar-collapsed .rg-sidebar .rg-nav-item i { font-size: 18px; width: auto; }
body.rg-sidebar-collapsed .rg-sidebar .rg-nav-item .badge { display: none; }
body.rg-sidebar-collapsed .rg-sidebar .rg-nav-item.active::before { display: none; }

/* ================================================================
   TABS
   ================================================================ */
.rg-tabs {
  display: flex;
  gap: 0;
  border-block-end: 1px solid var(--rg-border);
  margin-block-end: 16px;
}

.rg-tab {
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--rg-text-muted);
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  border-block-end: 3px solid transparent;
  margin-block-end: -1px;
  transition: color var(--rg-transition);
}

.rg-tab:hover { color: var(--rg-gray-900); }
.rg-tab.active { color: var(--rg-primary); border-block-end-color: var(--rg-primary); font-weight: 600; }

/* ================================================================
   LIST / ROW ITEMS
   ================================================================ */
.rg-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-block-end: 1px solid var(--rg-gray-100);
  transition: background var(--rg-transition);
}

.rg-list-item:hover { background: var(--rg-gray-50); }
.rg-list-item:last-child { border-block-end: none; }

/* ================================================================
   TOOLTIP
   ================================================================ */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--rg-gray-900);
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: var(--rg-radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--rg-transition);
}
[data-tooltip]:hover::after { opacity: 1; }

/* ================================================================
   SKELETON LOADING
   ================================================================ */
.rg-skeleton {
  background: linear-gradient(90deg, var(--rg-gray-100) 25%, var(--rg-gray-200) 50%, var(--rg-gray-100) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: var(--rg-radius-sm);
}

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

/* ================================================================
   DIVIDERS & SEPARATORS
   ================================================================ */
.rg-divider { height: 1px; background: var(--rg-gray-200); margin: 16px 0; }
.rg-divider-sm { margin: 8px 0; }

/* ================================================================
   TAG INPUT / CHIPS
   ================================================================ */
.rg-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--rg-gray-100);
  border-radius: var(--rg-radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--rg-gray-700);
}

.rg-chip-remove {
  width: 14px;
  height: 14px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 10px;
  color: var(--rg-gray-400);
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.rg-chip-remove:hover { background: var(--rg-gray-200); color: var(--rg-gray-700); }

/* ================================================================
   SWITCH / TOGGLE
   ================================================================ */
.rg-switch {
  position: relative;
  width: 36px;
  height: 20px;
  background: var(--rg-gray-300);
  border-radius: var(--rg-radius-full);
  cursor: pointer;
  transition: background var(--rg-transition);
}

.rg-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 16px;
  height: 16px;
  background: var(--rg-white);
  border-radius: 50%;
  transition: transform var(--rg-transition);
}

.rg-switch.active { background: var(--rg-primary); }
.rg-switch.active::after { transform: translateX(16px); }
html[dir="rtl"] .rg-switch.active::after { transform: translateX(-16px); }

/* ================================================================
   STAT GRID (dashboard helper)
   ================================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-block-end: 16px;
}

/* ================================================================
   MISC LEGACY COMPAT
   ================================================================ */
.ah-card { background: var(--rg-card); border-radius: var(--rg-radius); border: 1px solid var(--rg-border); padding: 12px; margin-block-end: 12px; }
.ah-card-header { display: flex; align-items: center; justify-content: space-between; margin-block-end: 10px; gap: 10px; padding-block-end: 4px; border-block-end: 1px solid #f1f5f9; }
.ah-card-title { font-size: 13px; font-weight: 600; color: var(--rg-primary); }
.ah-card-subtitle { font-size: 12px; color: var(--rg-text-secondary); margin-block-start: 2px; }

.ah-alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--rg-radius-lg); font-size: 13px; line-height: 1.5; margin-block-end: 12px; }

.site-error-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.site-error-card { text-align: center; max-width: 400px; }
.site-error-icon-wrap { font-size: 48px; color: var(--rg-gray-300); margin-block-end: 16px; }
.site-error-code { font-size: 48px; font-weight: 700; color: var(--rg-gray-300); }
.site-error-title { font-size: 18px; font-weight: 600; margin-block-end: 8px; }
.site-error-desc { font-size: 13.5px; color: var(--rg-text-secondary); margin-block-end: 20px; line-height: 1.6; }
.site-error-debug-wrap { text-align: start; margin-block-start: 16px; }
.site-error-debug-wrap summary { font-size: 12px; color: var(--rg-text-muted); cursor: pointer; }
.site-error-debug-wrap pre { font-size: 12px; background: var(--rg-gray-100); padding: 12px; border-radius: var(--rg-radius); overflow-x: auto; margin-block-start: 8px; }

/* Workspace selector */
.rg-workspace-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--rg-surface); }
.rg-workspace-card { max-width: 480px; width: 100%; }
