/* ================================================================
   DR-247 Online Hospital — Main Stylesheet
   Light / Dark Theme with CSS Custom Properties
   ================================================================ */

/* ── CSS Variables ──────────────────────────────────────────────── */
/* ── Brand Colors: Navy #002060  |  Red #C00000 — matching dr-247.com ── */
:root,
[data-theme="light"] {
  --primary: #002060;        /* Navy */
  --primary-dark: #001240;
  --primary-light: #e8edf8;  /* Very light navy tint */
  --secondary: #0d9e6f;      /* Teal-green */
  --accent: #C00000;         /* Brand red */
  --accent-dark: #8b0000;
  --danger: #C00000;
  --warning: #e67e22;
  --success: #0d9e6f;
  --purple: #7e3af2;
  --gold: #f0c040;

  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-surface: #f2f5fb;
  --bg-card: #ffffff;
  --bg-overlay: rgba(0,0,0,0.5);

  --text-primary: #0f1f3d;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --text-inverse: #ffffff;

  --border: #dde3ed;
  --border-light: #eef2f7;
  --shadow: 0 2px 12px rgba(0,32,96,0.08);
  --shadow-md: 0 4px 24px rgba(0,32,96,0.12);
  --shadow-lg: 0 8px 40px rgba(0,32,96,0.16);

  --nav-bg: rgba(255,255,255,0.97);
  --nav-border: rgba(0,32,96,0.08);
  --nav-shadow: 0 2px 20px rgba(0,32,96,0.10);

  --ticker-medical-bg: #e8edf8;
  --ticker-medical-text: #002060;
  --ticker-nutrition-bg: #e8f5e9;
  --ticker-nutrition-text: #2e7d32;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-full: 999px;

  --transition: 0.2s ease;
  --font: 'Inter', 'Cairo', 'Noto Sans Arabic', sans-serif;
}

[data-theme="dark"] {
  --primary: #4d7ab3;        /* lighter navy for dark mode */
  --primary-dark: #2a5499;
  --primary-light: #1a2a4a;
  --secondary: #26d3a0;
  --accent: #e03030;         /* lighter red for dark mode */
  --accent-dark: #b01a1a;
  --danger: #e03030;
  --warning: #ffa726;
  --success: #66bb6a;
  --purple: #a78bfa;
  --gold: #fde68a;

  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-surface: #1c2128;
  --bg-card: #1e242d;
  --bg-overlay: rgba(0,0,0,0.7);

  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --text-inverse: #0d1117;

  --border: #30363d;
  --border-light: #21262d;
  --shadow: 0 2px 12px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.6);

  --nav-bg: rgba(13,17,23,0.97);
  --nav-border: rgba(48,54,61,0.8);
  --nav-shadow: 0 2px 20px rgba(0,0,0,0.4);

  --ticker-medical-bg: #1a2a4a;
  --ticker-medical-text: #7da8d8;
  --ticker-nutrition-bg: #1b2e1b;
  --ticker-nutrition-text: #a5d6a7;
}

/* ── Reset & Base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}
body.rtl { direction: rtl; }
a { text-decoration: none; color: var(--primary); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }

/* ── Typography ─────────────────────────────────────────────────── */
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--success); }
.text-blue { color: var(--primary); }
.text-yellow { color: var(--gold); }
.text-orange { color: var(--warning); }
.text-purple { color: var(--purple); }
.text-red, .text-danger { color: var(--danger); }
.text-center { text-align: center; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mx-4 { margin-left: 1.5rem; margin-right: 1.5rem; }

/* ── Layout ──────────────────────────────────────────────────────── */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.bg-surface { background: var(--bg-surface); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-badge {
  display: inline-block; padding: 4px 16px; border-radius: var(--radius-full);
  background: var(--primary-light); color: var(--primary); font-size: 0.8rem;
  font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 12px;
}
.section-title { margin-bottom: 12px; }
.section-subtitle { color: var(--text-secondary); font-size: 1.05rem; max-width: 520px; margin: 0 auto; }
.section-footer { text-align: center; margin-top: 40px; }
.highlight { color: var(--primary); }

/* ── Announcement Bar ────────────────────────────────────────────── */
.announcement-bar {
  background: linear-gradient(90deg, #001240, #002060, #8b0000);
  color: #fff; padding: 8px 20px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 0.85rem; font-weight: 500; position: relative;
}
.close-announcement { background: none; border: none; color: #fff; font-size: 1.2rem; line-height: 1; opacity: 0.8; }
.close-announcement:hover { opacity: 1; }

/* ── Navigation ──────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg); border-bottom: 1px solid var(--nav-border);
  box-shadow: var(--nav-shadow); backdrop-filter: blur(12px);
  transition: all var(--transition);
}
.site-navbar .container-xxl {
  gap: 14px;
}
.site-brand {
  display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto;
  min-width: max-content; color: var(--text-primary);
}
.brand-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--primary);
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; white-space: nowrap; }
.brand-dr, .brand-247 { font-size: 1.05rem; font-weight: 800; }
.brand-dr { color: var(--primary); }
.brand-247 { color: var(--accent); }
.brand-text small { font-size: 0.64rem; color: var(--text-muted); white-space: nowrap; }
.site-navbar .navbar-collapse { min-width: 0; }
.site-navbar .navbar-nav { align-items: center; gap: 2px; min-width: 0; }
.site-navbar .nav-link {
  white-space: nowrap; line-height: 1.1; padding: 8px 10px; font-size: 0.88rem;
}
.site-navbar .dropdown-toggle::after { flex: 0 0 auto; }
.site-navbar .dropdown-mega { min-width: min(520px, calc(100vw - 32px)); }
.mega-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mega-heading { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.nav-lang-btn,
.nav-icon-btn,
.nav-user-btn,
.btn-nav-outline,
.btn-nav-primary { white-space: nowrap; flex: 0 0 auto; }
.site-toggler {
  width: 42px; height: 38px; padding: 7px 9px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg-secondary); display: inline-flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.site-toggler span {
  display: block; width: 21px; height: 2px; border-radius: 2px; background: var(--text-primary);
}
.site-toggler:focus { box-shadow: 0 0 0 3px rgba(0,32,96,0.16); }
.nav-container {
  max-width: 1300px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; height: 70px; gap: 20px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; color: var(--text-primary); }
.logo-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--primary);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.1rem;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-dr { font-size: 1.15rem; font-weight: 800; color: var(--primary); }
.logo-247 { font-size: 1.15rem; font-weight: 800; color: var(--accent); }
.logo-text small { font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.nav-menu {
  list-style: none; display: flex; align-items: center; gap: 4px; flex: 1; margin-left: 20px;
}
.nav-link {
  padding: 8px 14px; border-radius: var(--radius-sm); color: var(--text-primary);
  font-weight: 500; font-size: 0.92rem; display: flex; align-items: center; gap: 5px;
  transition: background var(--transition), color var(--transition);
}
.nav-link:hover, .nav-link.active { background: var(--primary-light); color: var(--primary); }
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 280px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 16px; opacity: 0; pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  transition-delay: 0.38s; /* wait before hiding so cursor can reach items */
}
.dropdown:hover .dropdown-menu,
.dropdown .dropdown-menu.show { opacity: 1; pointer-events: all; transform: translateY(0); transition-delay: 0s; }
.dropdown-grid { display: flex; gap: 20px; }
.dropdown-col h4 { font-size: 0.8rem; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.dropdown-col a { display: block; padding: 6px 8px; border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 0.9rem; }
.dropdown-col a:hover { background: var(--primary-light); color: var(--primary); }

.nav-controls { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.header-live-clock {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 108px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(232,237,248,0.92));
  box-shadow: 0 10px 24px rgba(0,32,96,0.08);
}
.clock-face {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #fff 0%, #eef3fb 62%, #d8e2f2 100%);
  border: 2px solid rgba(0,32,96,0.16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.75);
}
.clock-face::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px dashed rgba(0,32,96,0.14);
}
.clock-hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform-origin: center bottom;
  border-radius: 999px;
}
.clock-hand--hour {
  width: 3px;
  height: 9px;
  background: var(--primary);
}
.clock-hand--minute {
  width: 2px;
  height: 12px;
  background: var(--text-primary);
}
.clock-hand--second {
  width: 1.5px;
  height: 13px;
  background: var(--accent);
}
.clock-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.85);
}
.clock-digital {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.header-live-clock--admin {
  background: var(--bg-secondary);
  box-shadow: none;
  min-width: 96px;
}

/* Language Switcher */
.lang-switcher { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px; padding: 7px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-secondary); color: var(--text-primary); font-size: 0.85rem; font-weight: 500;
}
.lang-btn:hover { border-color: var(--primary); }
.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0; width: 180px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  padding: 8px; z-index: 200; display: none;
}
.lang-menu.open { display: grid; }
.lang-option {
  padding: 7px 8px; border-radius: var(--radius-sm); font-size: 0.82rem;
  color: var(--text-secondary); text-align: left;
}
.lang-option:hover, .lang-option.active { background: var(--primary-light); color: var(--primary); }

.theme-toggle {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-secondary);
  color: var(--text-secondary); font-size: 1rem; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.nav-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.user-avatar-btn {
  display: flex; align-items: center; gap: 8px; padding: 5px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-secondary); color: var(--text-primary); font-size: 0.88rem;
}
.user-avatar-btn:hover { border-color: var(--primary); }
.user-menu-wrap { position: relative; }
.user-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0; width: 200px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; z-index: 200; display: none;
}
.user-dropdown.open { display: block; }
.user-dropdown a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 0.9rem;
}
.user-dropdown a:hover { background: var(--bg-surface); color: var(--primary); }
.user-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 6px 0; }

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all var(--transition); }

/* ── News Tickers ────────────────────────────────────────────────── */
.news-tickers-wrapper { position: sticky; top: 70px; z-index: 90; }
.ticker-row {
  display: flex; align-items: center; height: 36px; overflow: hidden; border-bottom: 1px solid var(--border);
}
.ticker-medical { background: var(--ticker-medical-bg); }
.ticker-nutrition { background: var(--ticker-nutrition-bg); }
.ticker-label {
  flex-shrink: 0; padding: 0 16px; font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
  border-right: 1px solid rgba(0,0,0,0.08);
}
.ticker-medical .ticker-label { color: var(--ticker-medical-text); }
.ticker-nutrition .ticker-label { color: var(--ticker-nutrition-text); }
.ticker-track {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}
.ticker-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(55%);
  transition: opacity .55s ease, transform .55s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticker-item.is-active {
  opacity: 1;
  transform: translateY(0);
}
.ticker-medical .ticker-item { color: var(--ticker-medical-text); }
.ticker-nutrition .ticker-item { color: var(--ticker-nutrition-text); }

/* ── Alerts / Flash ──────────────────────────────────────────────── */
.alert {
  display: flex; align-items: center; gap: 10px; padding: 14px 20px;
  border-radius: var(--radius); margin: 12px 0; font-size: 0.92rem;
}
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-danger  { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.alert-warning { background: #fff8e1; color: #e65100; border: 1px solid #ffe082; }
.alert-dismissible { justify-content: space-between; }
.alert-dismissible button { background: none; color: inherit; font-size: 1.1rem; opacity: 0.7; }
[data-theme="dark"] .alert-success { background: #1b2e1b; color: #a5d6a7; border-color: #388e3c; }
[data-theme="dark"] .alert-danger  { background: #2d1a1a; color: #ef9a9a; border-color: #c62828; }
[data-theme="dark"] .alert-warning { background: #2d2414; color: #ffe082; border-color: #e65100; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.92rem;
  border: 2px solid transparent; transition: all var(--transition); cursor: pointer; line-height: 1.3;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-sm { padding: 7px 16px; font-size: 0.85rem; }
.btn-xs { padding: 4px 10px; font-size: 0.78rem; }
.btn-xl { padding: 16px 36px; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,32,96,0.35); }
.btn-outline-primary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.btn-outline-white:hover { background: rgba(255,255,255,0.15); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-danger  { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-outline-success { background: transparent; color: var(--success); border-color: var(--success); }
.btn-outline-success:hover { background: var(--success); color: #fff; }

/* ── Forms ───────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.88rem; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--bg-card); color: var(--text-primary);
  font-size: 0.92rem; font-family: var(--font); transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,32,96,0.12); }
.form-control-sm { padding: 7px 12px; font-size: 0.85rem; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2390a4ae' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-row--between { display: flex; justify-content: space-between; align-items: center; }
.input-icon-right { position: relative; }
.input-icon-right .form-control { padding-right: 44px; }
.input-icon-right button { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.88rem; font-weight: 400; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }
.form-section-title { font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); border-bottom: 1px solid var(--border); padding-bottom: 8px; margin: 28px 0 16px; }
.checkbox-group { display: flex; flex-direction: column; gap: 8px; }
.price-range { width: 100%; accent-color: var(--primary); }
.range-labels { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ── Cards ───────────────────────────────────────────────────────── */
.info-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.info-box {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px;
  border-radius: var(--radius-sm); font-size: 0.9rem;
}
.info-box--blue { background: var(--primary-light); color: var(--primary); border: 1px solid rgba(0,32,96,0.2); }
.info-box i { flex-shrink: 0; margin-top: 2px; }
.info-box p { margin: 4px 0 0; font-size: 0.85rem; color: inherit; opacity: 0.8; }

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 85vh; display: flex; align-items: center;
  background: linear-gradient(135deg, #000e28 0%, #001240 40%, #002060 70%, #1a3a7a 100%);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(255,255,255,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(0,200,83,0.08) 0%, transparent 50%);
}
.hero-content {
  position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 60px 24px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; width: 100%;
}
.hero-text { color: #fff; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
  border-radius: var(--radius-full); font-size: 0.85rem; font-weight: 500; margin-bottom: 20px;
}
.hero-title { color: #fff; margin-bottom: 16px; }
.hero-subtitle { color: rgba(255,255,255,0.85); font-size: 1.05rem; margin-bottom: 32px; max-width: 480px; }
.hero-stats {
  display: flex; gap: 24px; margin-bottom: 32px; flex-wrap: wrap;
}
.hero-stats .stat { text-align: center; }
.hero-stats .stat strong { display: block; font-size: 1.5rem; font-weight: 800; color: #fff; }
.hero-stats .stat span { font-size: 0.8rem; color: rgba(255,255,255,0.7); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-wave { position: absolute; bottom: -2px; left: 0; right: 0; }

/* Hero image / floating cards */
.hero-image { position: relative; display: flex; align-items: center; justify-content: center; }
.hero-card-float { position: relative; }
.hero-phone-mockup {
  width: 220px; height: 400px; background: rgba(255,255,255,0.15); backdrop-filter: blur(12px);
  border-radius: 28px; border: 2px solid rgba(255,255,255,0.3); padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.floating-card {
  position: absolute; background: rgba(255,255,255,0.95); border-radius: var(--radius);
  padding: 10px 16px; display: flex; align-items: center; gap: 12px;
  font-size: 0.82rem; box-shadow: var(--shadow-md); color: var(--text-primary);
  animation: float 3s ease-in-out infinite;
}
[data-theme="dark"] .floating-card { background: rgba(30,36,45,0.95); }
.floating-card i { font-size: 1.2rem; color: var(--primary); }
.floating-card strong { display: block; font-weight: 600; }
.floating-card small { color: var(--text-muted); }
.card-video { top: 30px; right: -60px; animation-delay: 0s; }
.card-ai { top: 140px; left: -80px; animation-delay: 0.5s; }
.card-secure { bottom: 80px; right: -50px; animation-delay: 1s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.phone-header { padding-bottom: 10px; }
.doctor-card-mini { display: flex; align-items: center; gap: 8px; }
.doc-avatar-mini { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg,var(--primary),var(--secondary)); }
.doctor-card-mini strong { display: block; font-size: 0.78rem; font-weight: 700; color: #fff; }
.doctor-card-mini small { display: block; font-size: 0.68rem; color: rgba(255,255,255,0.7); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; margin-left: auto; }
.status-dot.online { background: #69f0ae; box-shadow: 0 0 6px rgba(105,240,174,0.6); animation: pulse 2s infinite; }
.video-preview {
  flex: 1; background: rgba(0,0,0,0.3); border-radius: 12px; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: rgba(255,255,255,0.8); font-size: 0.75rem;
}

/* ── Steps / How It Works ────────────────────────────────────────── */
.steps-grid { display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: wrap; }
.step-card {
  text-align: center; padding: 32px 24px; background: var(--bg-card);
  border-radius: var(--radius); border: 1px solid var(--border); flex: 1; min-width: 160px; max-width: 200px;
  box-shadow: var(--shadow); position: relative;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-num {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 0.82rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.step-icon { font-size: 2rem; color: var(--primary); margin-bottom: 12px; margin-top: 8px; }
.step-card h3 { font-size: 0.95rem; margin-bottom: 8px; }
.step-card p { font-size: 0.82rem; }
.step-arrow { padding: 0 4px; color: var(--primary); font-size: 1.2rem; opacity: 0.5; }

/* ── Specialties ─────────────────────────────────────────────────── */
.specialties-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
.specialty-card {
  background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 20px 12px; text-align: center; color: var(--text-secondary); font-size: 0.82rem;
  font-weight: 500; transition: all var(--transition); display: flex; flex-direction: column;
  align-items: center; gap: 10px;
}
.specialty-card:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); transform: translateY(-2px); }
.spec-icon { font-size: 1.5rem; color: var(--primary); }
.specialty-card--more .spec-icon { color: var(--text-muted); }
.specialty-card--more:hover .spec-icon { color: var(--primary); }

/* ── Doctor Cards ────────────────────────────────────────────────── */
.doctors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.doctor-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: all var(--transition); display: flex; flex-direction: column;
}
.doctor-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.doctor-card-top {
  padding: 24px 20px 0; display: flex; align-items: flex-start; justify-content: space-between;
}
.doctor-avatar-wrap { position: relative; }
.doctor-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary-light); }
.online-badge { position: absolute; bottom: 4px; right: 4px; font-size: 0.55rem; color: var(--success); }
.online-badge-lg { display: inline-flex; align-items: center; gap: 4px; font-size: 0.8rem; color: var(--success); }
.rank-badge {
  padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.rank-gp { background: #e8edf8; color: #002060; }
.rank-specialist { background: #e8eaf6; color: #3949ab; }
.rank-consultant { background: #fff8e1; color: #f57f17; }
.rank-professor { background: #ffebee; color: #c62828; }
.doctor-card-body { padding: 16px 20px; flex: 1; }
.doctor-card-body h3 { font-size: 1rem; margin-bottom: 4px; }
.specialty { color: var(--text-muted); font-size: 0.83rem; display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.doctor-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 10px; }
.doctor-meta span { display: flex; align-items: center; gap: 4px; }
.doctor-languages { display: flex; flex-wrap: wrap; gap: 4px; }
.lang-tag { padding: 2px 8px; border-radius: var(--radius-full); background: var(--primary-light); color: var(--primary); font-size: 0.72rem; font-weight: 600; }
.doctor-card-footer {
  padding: 14px 20px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.price { font-size: 0.9rem; color: var(--text-secondary); }
.price strong { font-size: 1.1rem; color: var(--text-primary); }

/* ── Doctor List View ────────────────────────────────────────────── */
.doctors-page { padding: 40px 0; }
.doctors-layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
.filter-sidebar {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; position: sticky; top: 148px; box-shadow: var(--shadow);
}
.filter-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.filter-header h3 { font-size: 1rem; }
.clear-filters { font-size: 0.82rem; color: var(--danger); }
.filter-group { margin-bottom: 20px; }
.filter-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.search-input-wrap { position: relative; }
.search-input-wrap i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search-input-wrap .form-control { padding-left: 36px; }
.results-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.results-count { font-weight: 600; color: var(--text-secondary); }
.sort-wrap { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; }
.sort-wrap .form-control { width: auto; }
.filter-toggle { display: none; margin-left: auto; }

.doctors-list { display: flex; flex-direction: column; gap: 16px; }
.doctor-list-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; gap: 18px; align-items: flex-start; transition: all var(--transition);
}
.doctor-list-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.doc-list-avatar { position: relative; flex-shrink: 0; }
.doc-list-avatar img { width: 90px; height: 90px; border-radius: var(--radius); object-fit: cover; }
.doc-list-avatar .rank-badge { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); }
.doc-list-info { flex: 1; }
.doc-list-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; flex-wrap: wrap; gap: 8px; }
.doc-list-header h3 { font-size: 1.05rem; }
.doc-list-header h3 a { color: var(--text-primary); }
.doc-list-header h3 a:hover { color: var(--primary); }
.doc-list-rating { display: flex; align-items: center; gap: 4px; font-size: 0.88rem; color: var(--gold); font-weight: 600; }
.doc-list-rating .reviews-count { color: var(--text-muted); font-weight: 400; }
.doc-specialty { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.doc-meta-row { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 8px; }
.doc-meta-row span { display: flex; align-items: center; gap: 4px; }
.doc-bio { font-size: 0.85rem; color: var(--text-muted); margin-top: 8px; }
.doc-list-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.doc-price { text-align: right; }
.doc-price strong { font-size: 1.3rem; color: var(--text-primary); }
.doc-price small { display: block; color: var(--text-muted); font-size: 0.78rem; }

/* ── Doctor Profile ──────────────────────────────────────────────── */
.doctor-profile-page { padding: 40px 0; }
.doc-profile-header {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; display: flex; gap: 28px; margin-bottom: 28px; box-shadow: var(--shadow);
}
.doc-profile-avatar-wrap { position: relative; flex-shrink: 0; }
.doc-profile-avatar { width: 150px; height: 150px; border-radius: var(--radius); object-fit: cover; border: 4px solid var(--primary-light); }
.doc-profile-info { flex: 1; }
.doc-profile-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; flex-wrap: wrap; gap: 16px; }
.doc-profile-price { text-align: right; }
.doc-profile-price strong { font-size: 2rem; color: var(--primary); font-weight: 800; }
.doc-profile-price small { display: block; color: var(--text-muted); font-size: 0.82rem; }
.doc-specialty-label { color: var(--text-secondary); font-size: 1rem; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.doc-profile-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
.meta-item { display: flex; align-items: center; gap: 6px; font-size: 0.88rem; }
.meta-item strong { color: var(--text-primary); font-weight: 700; }
.doc-languages-row { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.doc-profile-bio { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.7; margin-bottom: 16px; }
.doc-profile-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.doc-profile-body { display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
.profile-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab-btn { padding: 10px 20px; border: none; background: none; color: var(--text-muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; font-size: 0.9rem; }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.info-grid > div { }
.info-grid label { display: block; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); }
.info-grid span { font-size: 0.92rem; color: var(--text-primary); }
.bio-full h4 { margin-bottom: 8px; }
.avail-day { margin-bottom: 16px; }
.avail-date { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.avail-slots { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-btn {
  padding: 6px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--primary);
  color: var(--primary); font-size: 0.82rem; font-weight: 600; transition: all var(--transition);
}
.slot-btn:hover { background: var(--primary); color: #fff; }
.reviews-list { display: flex; flex-direction: column; gap: 20px; }
.review-item { padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.review-avatar { width: 40px; height: 40px; border-radius: 50%; }
.review-stars { display: flex; gap: 2px; font-size: 0.8rem; }
.review-date { margin-left: auto; color: var(--text-muted); font-size: 0.8rem; }
.review-text { font-size: 0.9rem; color: var(--text-secondary); }
.booking-cta-card { background: var(--bg-card); border: 2px solid var(--primary); border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: var(--shadow-md); }
.booking-cta-card h3 { margin-bottom: 10px; }
.cta-price { font-size: 2rem; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.cta-price small { font-size: 0.8rem; font-weight: 400; color: var(--text-muted); }
.cta-features { list-style: none; text-align: left; margin: 16px 0; display: flex; flex-direction: column; gap: 8px; }
.cta-features li { font-size: 0.88rem; display: flex; align-items: center; gap: 8px; }
.cta-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 10px; }
.protection-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.protection-list li { font-size: 0.85rem; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }

/* ── Booking Page ────────────────────────────────────────────────── */
.booking-page { padding: 40px 0; }
.booking-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.booking-steps { display: flex; align-items: center; margin-bottom: 32px; }
.booking-steps .step {
  display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
}
.booking-steps .step span {
  width: 28px; height: 28px; border-radius: 50%; background: var(--bg-surface); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 0.78rem;
}
.booking-steps .step.active { color: var(--primary); }
.booking-steps .step.active span { background: var(--primary); border-color: var(--primary); color: #fff; }
.booking-steps .step.completed { color: var(--success); }
.booking-steps .step.completed span { background: var(--success); border-color: var(--success); color: #fff; }
.booking-steps .step-line { flex: 1; height: 2px; background: var(--border); margin: 0 8px; }
.booking-steps .step-line.active { background: var(--primary); }
.booking-steps .step-line.completed { background: var(--success); }
.booking-main { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.booking-section { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.booking-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.booking-section h3 { font-size: 1rem; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.optional { font-size: 0.78rem; color: var(--text-muted); font-weight: 400; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 500; cursor: pointer;
  border: 1.5px solid transparent; transition: all var(--transition);
}
.calendar-day.available { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.calendar-day.available:hover { background: var(--primary); color: #fff; }
.calendar-day.selected { background: var(--primary); color: #fff; }
.calendar-day.disabled { color: var(--text-muted); cursor: default; opacity: 0.4; }
.calendar-day.past { opacity: 0.3; cursor: default; }
.calendar-loading { grid-column: span 7; text-align: center; padding: 20px; color: var(--text-muted); }
.time-slots { display: flex; flex-wrap: wrap; gap: 8px; }
.time-slot {
  padding: 8px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: all var(--transition);
}
.time-slot:hover { border-color: var(--primary); color: var(--primary); }
.time-slot.selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.time-slot.booked { background: var(--bg-surface); color: var(--text-muted); cursor: default; opacity: 0.5; }
.promo-input-row { display: flex; gap: 10px; }
.promo-result { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.88rem; }
.promo-result.success { background: #e8f5e9; color: #2e7d32; }
.promo-result.error { background: #ffebee; color: #c62828; }
.summary-rows { display: flex; flex-direction: column; gap: 10px; }
.summary-row { display: flex; justify-content: space-between; font-size: 0.92rem; }
.summary-row span { color: var(--text-secondary); }
.summary-row--discount { color: var(--success); }
.summary-row--total { font-size: 1.05rem; padding-top: 10px; border-top: 1px solid var(--border); }
.summary-row--total span, .summary-row--total strong { font-weight: 700; font-size: 1.1rem; }
.booking-sidebar { display: flex; flex-direction: column; gap: 16px; }
.doctor-summary-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; }
.booking-doc-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; border: 3px solid var(--primary-light); }
.doc-mini-stats { display: flex; justify-content: center; gap: 14px; font-size: 0.82rem; color: var(--text-muted); margin-top: 8px; }
.price-display { font-size: 1.3rem; font-weight: 800; color: var(--primary); margin-top: 8px; }
.booking-info-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.booking-info-card h4 { margin-bottom: 12px; }
.booking-info-card ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.booking-info-card li { font-size: 0.85rem; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }

/* ── Payment Page ────────────────────────────────────────────────── */
.payment-page { padding: 40px 0; }
.payment-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
.payment-main { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.payment-title { margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
.payment-tabs { display: flex; gap: 0; border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 24px; }
.pay-tab { flex: 1; padding: 12px; font-weight: 600; color: var(--text-secondary); border: none; background: var(--bg-surface); display: flex; align-items: center; justify-content: center; gap: 8px; transition: all var(--transition); }
.pay-tab.active { background: var(--primary); color: #fff; }
.pay-tab-content { display: none; }
.pay-tab-content.active { display: block; }
.card-info-header { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-logos { margin-left: auto; display: flex; gap: 8px; color: var(--text-muted); }
.stripe-card-element { padding: 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); transition: border-color var(--transition); }
.stripe-card-element.StripeElement--focus { border-color: var(--primary); }
.stripe-error { color: var(--danger); font-size: 0.88rem; margin-top: 8px; min-height: 20px; }
.paypal-section { text-align: center; padding: 20px 0; }
.payment-security-note { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.82rem; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.payment-summary { }
.order-summary-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.order-summary-card h3 { margin-bottom: 16px; }

/* ── Video / Waiting Room ────────────────────────────────────────── */
.video-room-page { padding: 60px 0; }
.video-room-card { max-width: 600px; margin: 0 auto; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 48px; text-align: center; box-shadow: var(--shadow-lg); }
.waiting-animation { position: relative; width: 100px; height: 100px; margin: 0 auto 24px; }
.pulse-ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--primary); animation: pulse-ring 2s ease-out infinite; }
.waiting-icon { position: absolute; inset: 10px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #fff; }
@keyframes pulse-ring { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.5); opacity: 0; } }
.countdown { margin: 16px 0; }
.countdown-parts { display: flex; align-items: center; justify-content: center; gap: 8px; }
.count-part { text-align: center; }
.count-part span { display: block; font-size: 2.5rem; font-weight: 800; color: var(--primary); }
.count-part label { font-size: 0.75rem; color: var(--text-muted); }
.count-sep { font-size: 2rem; font-weight: 800; color: var(--primary); padding-bottom: 16px; }
.appointment-mini-info { display: flex; justify-content: center; gap: 20px; color: var(--text-secondary); font-size: 0.9rem; margin: 12px 0; }
.waiting-note { color: var(--text-muted); font-size: 0.85rem; margin-top: 12px; }
.ready-icon { margin-bottom: 16px; }
.zoom-cta { margin: 24px 0; }
.zoom-note { font-size: 0.83rem; color: var(--text-muted); margin-top: 12px; }
.zoom-details { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-top: 16px; }
.zoom-detail { font-size: 0.88rem; }
.zoom-detail span { color: var(--text-muted); }
.appointment-time-display { font-size: 1.2rem; margin: 16px 0; }
.appointment-time-display strong { display: block; font-size: 1.5rem; color: var(--primary); }
.early-icon { margin-bottom: 16px; }
.early-note { color: var(--text-muted); font-size: 0.88rem; margin: 12px 0; }

/* ── Video room medical files panel ─────────────────────────────── */
.zoom-medical-files { margin-top: 24px; padding: 16px; background: var(--bg-surface); border-radius: var(--radius); border: 1px solid var(--border); text-align: left; }
.zoom-medical-files h6 { font-size: .85rem; font-weight: 600; margin-bottom: 12px; }
.zoom-files-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(80px,1fr)); gap: 8px; }
.zoom-file-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--border); border-radius: 6px; text-decoration: none; background: var(--bg-card); transition: .15s; }
.zoom-file-item:hover { border-color: var(--primary); background: var(--primary-soft,#e8f0ff); }
.zoom-file-item img { width: 52px; height: 52px; object-fit: cover; border-radius: 4px; }
.zoom-file-item i { font-size: 1.8rem; color: #C00000; }
.zoom-file-item span { font-size: .66rem; color: var(--text-muted); }

/* ── Dashboard / Patient/Doctor ──────────────────────────────────── */
.dashboard-page { padding: 32px 0; }
.dashboard-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }
.stats-grid { display: grid; gap: 16px; margin-bottom: 28px; }
.stats-grid--4 { grid-template-columns: repeat(4, 1fr); }
.stat-card {
  background: var(--bg-card); border-radius: var(--radius); padding: 20px;
  display: flex; align-items: center; gap: 16px; border: 1px solid var(--border);
  box-shadow: var(--shadow); transition: all var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon { width: 52px; height: 52px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.stat-num { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }
.stat-change { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.stat-card--blue .stat-icon { background: var(--primary-light); color: var(--primary); }
.stat-card--blue .stat-num { color: var(--primary); }
.stat-card--green .stat-icon { background: #e8f5e9; color: var(--success); }
.stat-card--green .stat-num { color: var(--success); }
.stat-card--yellow .stat-icon { background: #fff8e1; color: var(--gold); }
.stat-card--yellow .stat-num { color: var(--gold); }
.stat-card--purple .stat-icon { background: #f3e5f5; color: var(--purple); }
.stat-card--purple .stat-num { color: var(--purple); }
.stat-card--orange .stat-icon { background: #fff3e0; color: var(--accent); }
.stat-card--orange .stat-num { color: var(--accent); }
.stat-card--gold .stat-icon { background: #fff8e1; color: var(--gold); }
.stat-card--gold .stat-num { color: var(--gold); }
[data-theme="dark"] .stat-card--green .stat-icon { background: #1b2e1b; }
[data-theme="dark"] .stat-card--yellow .stat-icon { background: #2d2414; }
[data-theme="dark"] .stat-card--purple .stat-icon { background: #2a1b2e; }
[data-theme="dark"] .stat-card--orange .stat-icon { background: #2d1e0d; }

.dashboard-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
.dashboard-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.section-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.section-header-row h3 { font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.section-header-row a { font-size: 0.85rem; color: var(--primary); }
.appointment-list { display: flex; flex-direction: column; gap: 12px; }
.apt-card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); transition: all var(--transition); }
.apt-card:hover { border-color: var(--primary); }
.apt-avatar img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.apt-info { flex: 1; }
.apt-info strong { display: block; font-size: 0.9rem; }
.apt-info span { font-size: 0.8rem; color: var(--text-muted); }
.apt-time { font-size: 0.8rem; color: var(--primary); display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.apt-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.status-badge { padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.status-pending { background: #fff8e1; color: #f57f17; }
.status-confirmed { background: #e8edf8; color: #002060; }
.status-paid { background: #e8f5e9; color: #2e7d32; }
.status-in_progress { background: #e8eaf6; color: #3949ab; }
.status-completed { background: #e8f5e9; color: #1b5e20; }
.status-cancelled { background: #ffebee; color: #c62828; }
.status-refunded { background: #f3e5f5; color: #6a1b9a; }
.status-no_show { background: #fff3e0; color: #bf360c; }
[data-theme="dark"] .status-pending { background: #2d2414; color: #ffe082; }
[data-theme="dark"] .status-confirmed { background: #1a2a4a; color: #90caf9; }
[data-theme="dark"] .status-paid, [data-theme="dark"] .status-completed { background: #1b2e1b; color: #a5d6a7; }
[data-theme="dark"] .status-cancelled { background: #2d1a1a; color: #ef9a9a; }

.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-action {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--border); color: var(--text-secondary);
  font-size: 0.75rem; font-weight: 600; text-align: center; transition: all var(--transition);
}
.quick-action i { font-size: 1.2rem; color: var(--primary); }
.quick-action:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.quick-action--ai { border-color: var(--purple); }
.quick-action--ai i { color: var(--purple); }
.quick-action--ai:hover { border-color: var(--purple); background: #f3e5f5; color: var(--purple); }
.health-info-card { margin-top: 16px; padding: 14px; background: var(--bg-surface); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.health-info-card h4 { font-size: 0.88rem; margin-bottom: 8px; }
.health-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.health-tag { padding: 3px 10px; border-radius: var(--radius-full); background: #ffebee; color: var(--danger); font-size: 0.78rem; font-weight: 600; }
.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.file-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; text-align: center; }
.file-icon { font-size: 1.8rem; margin-bottom: 8px; }
.file-info strong { display: block; font-size: 0.83rem; margin-bottom: 2px; }
.file-info small { color: var(--text-muted); font-size: 0.75rem; }
.ai-analyzed-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: var(--primary-light); color: var(--primary); border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 600; margin-top: 4px; }

/* ── Pricing ─────────────────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 48px; }
.pricing-card {
  background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px 24px; text-align: center; position: relative; transition: all var(--transition);
}
.pricing-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.pricing-card.popular { border-color: var(--primary); box-shadow: var(--shadow-md); }
.popular-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); padding: 4px 20px; background: var(--primary); color: #fff; border-radius: var(--radius-full); font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.pricing-icon { font-size: 2.5rem; margin-bottom: 16px; }
.pricing-icon.color-blue { color: var(--primary); }
.pricing-icon.color-purple { color: var(--purple); }
.pricing-icon.color-gold { color: var(--gold); }
.pricing-icon.color-red { color: var(--danger); }
.pricing-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.pricing-price { margin-bottom: 20px; }
.pricing-price .currency { font-size: 1rem; vertical-align: super; color: var(--text-secondary); }
.pricing-price .amount { font-size: 3rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.pricing-price .period { font-size: 0.88rem; color: var(--text-muted); }
.pricing-features { list-style: none; text-align: left; margin-bottom: 24px; display: flex; flex-direction: column; gap: 10px; }
.pricing-features li { font-size: 0.88rem; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.pricing-features li i { color: var(--success); flex-shrink: 0; }

.insurance-plans { background: var(--bg-surface); border-radius: var(--radius-lg); padding: 32px; }
.insurance-plans h3 { text-align: center; margin-bottom: 24px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.insurance-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.insurance-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; }
.insurance-card--featured { border-color: var(--primary); box-shadow: var(--shadow-md); }
.insurance-card h4 { margin-bottom: 6px; }
.ins-price { font-size: 1.6rem; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.ins-price small { font-size: 0.82rem; font-weight: 400; color: var(--text-muted); }
.insurance-card p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; }

/* ── AI Section ──────────────────────────────────────────────────── */
.ai-section { background: linear-gradient(135deg, var(--bg-primary) 0%, var(--primary-light) 100%); }
.ai-features-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.ai-feature-list { display: flex; flex-direction: column; gap: 20px; margin: 24px 0 28px; }
.ai-feature { display: flex; gap: 16px; align-items: flex-start; }
.ai-feature-icon { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.ai-feature strong { display: block; margin-bottom: 4px; }
.ai-feature p { font-size: 0.85rem; margin: 0; }
.ai-chat-demo { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.ai-demo-header { padding: 14px 18px; background: var(--primary); color: #fff; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.ai-online { margin-left: auto; font-size: 0.82rem; }
.ai-demo-messages { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.demo-msg { max-width: 80%; padding: 10px 14px; border-radius: var(--radius); font-size: 0.88rem; }
.demo-msg.user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.demo-msg.bot { align-self: flex-start; background: var(--bg-surface); color: var(--text-primary); border-bottom-left-radius: 4px; }
.ai-upload-preview { padding: 12px 18px; background: var(--bg-surface); text-align: center; color: var(--text-muted); font-size: 0.82rem; display: flex; align-items: center; justify-content: center; gap: 8px; border-top: 1px solid var(--border); }

/* ── Testimonials ────────────────────────────────────────────────── */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testimonial-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.testimonial-stars { color: var(--gold); margin-bottom: 12px; }
.testimonial-text { font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 16px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 10px; }
.testimonial-avatar { font-size: 1.5rem; }
.testimonial-author strong { font-size: 0.88rem; }

/* ── Payment Logos ───────────────────────────────────────────────── */
.payment-section { padding: 40px 0; }
.payment-logos { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; margin: 20px 0; }
.payment-logo { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-muted); font-size: 0.8rem; }

/* ── Angel AI Widget ─────────────────────────────────────────────── */
.angel-ai-widget { position: fixed; bottom: 28px; right: 28px; z-index: 500; }
.angel-ai-toggle {
  width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff; font-size: 1.4rem; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 24px rgba(0,32,96,0.4); position: relative;
  transition: transform var(--transition);
}
.angel-ai-toggle:hover { transform: scale(1.08); }
.ai-glow { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(0,32,96,0.3); animation: pulse 2s ease-in-out infinite; }
.ai-badge { position: absolute; top: -4px; right: -4px; background: var(--danger); color: #fff; font-size: 0.6rem; font-weight: 800; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.angel-ai-panel {
  position: absolute; bottom: 72px; right: 0; width: 360px; max-height: 500px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  display: none;
}
.angel-ai-panel.open { display: flex; }
.ai-header { padding: 14px 16px; background: linear-gradient(135deg, var(--primary), var(--purple)); color: #fff; display: flex; align-items: center; gap: 10px; }
.ai-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; }
.ai-header strong { display: block; font-weight: 700; }
.ai-header small { display: block; font-size: 0.72rem; opacity: 0.8; }
.ai-close { margin-left: auto; color: #fff; opacity: 0.8; font-size: 1rem; }
.ai-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ai-msg { display: flex; }
.ai-bubble { max-width: 85%; padding: 9px 13px; border-radius: var(--radius); font-size: 0.88rem; }
.ai-msg--bot .ai-bubble { background: var(--primary-light); color: var(--text-primary); border-bottom-left-radius: 4px; }
.ai-msg--user .ai-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; margin-left: auto; }
.ai-input-row { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
.ai-input-row input { flex: 1; padding: 9px 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--bg-card); color: var(--text-primary); font-family: var(--font); font-size: 0.88rem; }
.ai-input-row input:focus { outline: none; border-color: var(--primary); }
.ai-send { width: 38px; height: 38px; border-radius: var(--radius-sm); background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; }
.ai-typing { display: flex; align-items: center; gap: 4px; padding: 8px 12px; }
.ai-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); animation: typing-dot 1.4s infinite; }
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-dot { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.1); } }

/* ── Footer ──────────────────────────────────────────────────────── */
.footer {
  position: relative;
  margin-top: auto;
  padding: 28px 0 0;
  background:
    radial-gradient(circle at top left, rgba(0,32,96,0.12), transparent 34%),
    radial-gradient(circle at 85% 10%, rgba(192,0,0,0.10), transparent 28%),
    linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
  border-top: 1px solid var(--border);
}
.footer-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0,32,96,0.12);
  border-radius: 28px 28px 0 0;
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(242,245,251,0.92));
  box-shadow: 0 -18px 50px rgba(0,32,96,0.08);
}
.footer-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0,32,96,0.03), transparent 42%, rgba(192,0,0,0.04));
  pointer-events: none;
}
.footer-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.95fr);
  gap: 22px;
  padding: 32px;
}
.footer-brand-panel,
.footer-contact-panel,
.footer-card {
  border: 1px solid rgba(0,32,96,0.08);
  border-radius: 22px;
  background: rgba(255,255,255,0.76);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 34px rgba(0,32,96,0.08);
}
.footer-brand-panel {
  padding: 28px;
  background: linear-gradient(135deg, rgba(0,32,96,0.94), rgba(0,32,96,0.82) 62%, rgba(192,0,0,0.78));
  color: #fff;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  color: inherit;
  margin-bottom: 14px;
}
.footer-logo i { color: #fff; }
.footer-brand-panel p {
  max-width: 560px;
  margin-bottom: 18px;
  font-size: 0.94rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.86);
}
.footer-chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.footer-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}
.footer-social a:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.32);
  color: #fff;
}
.footer-contact-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}
.footer-contact-pills { display: grid; gap: 12px; }
.footer-contact-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 18px;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 0.9rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}
.footer-contact-pill:hover {
  border-color: rgba(0,32,96,0.18);
  color: var(--primary);
  transform: translateY(-1px);
}
.footer-contact-pill i {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
}
.footer-cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 0 32px 26px;
}
.footer-card { padding: 24px; }
.footer-col h4 {
  font-size: 0.83rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col li,
.plan-price { color: var(--text-secondary); font-size: 0.9rem; }
.footer-col li a { color: var(--text-secondary); font-size: 0.9rem; transition: color var(--transition); }
.footer-col li a:hover { color: var(--primary); }
.footer-subsection {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}
.contact-list { display: flex; flex-direction: column; gap: 12px; }
.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.contact-list li i {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 4px;
  width: 15px;
}
.contact-list a { color: var(--text-secondary); }
.contact-list a:hover { color: var(--primary); }
.footer-bottom {
  position: relative;
  z-index: 1;
  padding: 18px 32px 24px;
  border-top: 1px solid rgba(0,32,96,0.08);
}
.footer-bottom .container {
  max-width: none;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.82rem; color: var(--text-muted); }
.footer-bottom-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-bottom-links a { font-size: 0.84rem; color: var(--text-muted); }
.footer-bottom-links a:hover { color: var(--primary); }

[data-theme="dark"] .header-live-clock {
  background: linear-gradient(135deg, rgba(28,33,40,0.96), rgba(22,27,34,0.94));
  border-color: rgba(255,255,255,0.08);
  box-shadow: none;
}
[data-theme="dark"] .clock-face {
  background: radial-gradient(circle at 50% 50%, #293444 0%, #1c2430 70%, #121923 100%);
  border-color: rgba(255,255,255,0.12);
}
[data-theme="dark"] .clock-face::before {
  border-color: rgba(255,255,255,0.10);
}
[data-theme="dark"] .footer-shell {
  border-color: rgba(255,255,255,0.08);
  background: linear-gradient(145deg, rgba(22,27,34,0.96), rgba(13,17,23,0.96));
  box-shadow: 0 -18px 50px rgba(0,0,0,0.35);
}
[data-theme="dark"] .footer-brand-panel,
[data-theme="dark"] .footer-contact-panel,
[data-theme="dark"] .footer-card {
  background: rgba(30,36,45,0.88);
  border-color: rgba(255,255,255,0.06);
  box-shadow: none;
}
[data-theme="dark"] .footer-contact-pill {
  background: rgba(13,17,23,0.82);
  border-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .footer-contact-pill i {
  background: rgba(77,122,179,0.18);
}

/* ── Auth Pages ──────────────────────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: var(--bg-secondary); }
.auth-page--wide .auth-container { max-width: 800px; }
.auth-container { width: 100%; max-width: 900px; display: grid; grid-template-columns: 1fr 380px; gap: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.auth-page--wide .auth-container { grid-template-columns: 1fr; }
.auth-card { background: var(--bg-card); padding: 40px; }
.auth-card--wide { padding: 40px; }
.auth-logo { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; margin-bottom: 24px; }
.auth-logo i { color: var(--primary); }
.auth-title { font-size: 1.6rem; margin-bottom: 6px; }
.auth-subtitle { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 24px; }
.auth-form { }
.auth-divider { text-align: center; position: relative; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--border); }
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.auth-divider span { background: var(--bg-card); padding: 0 12px; color: var(--text-muted); font-size: 0.85rem; }
.auth-alt-btns { display: flex; gap: 10px; }
.auth-alt-btns .btn { flex: 1; }
.auth-login-link { text-align: center; margin-top: 16px; font-size: 0.88rem; color: var(--text-muted); }
.auth-info-panel { background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%); color: #fff; padding: 40px; display: flex; align-items: center; }
.auth-info-panel h2 { color: #fff; font-size: 1.5rem; margin-bottom: 12px; }
.auth-info-panel p { color: rgba(255,255,255,0.8); margin-bottom: 24px; }
.auth-features { display: flex; flex-direction: column; gap: 14px; }
.auth-feature { display: flex; align-items: center; gap: 12px; }
.auth-feature i { width: 36px; height: 36px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.auth-feature span { font-size: 0.9rem; color: rgba(255,255,255,0.9); }
.link-muted { color: var(--text-muted); font-size: 0.85rem; }
.link-muted:hover { color: var(--primary); }
.err-item { display: flex; align-items: center; gap: 6px; font-size: 0.88rem; }

.register-chooser { max-width: 640px; margin: 0 auto; background: var(--bg-card); border-radius: var(--radius-lg); padding: 48px; text-align: center; box-shadow: var(--shadow-lg); }
.register-chooser h1 { margin-bottom: 8px; }
.chooser-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.chooser-card {
  background: var(--bg-surface); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 28px 20px; text-align: center; transition: all var(--transition); color: var(--text-primary);
}
.chooser-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.chooser-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 12px; }
.chooser-card h3 { margin-bottom: 8px; }
.chooser-card p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; }
.chooser-card .btn { pointer-events: none; }

/* ── Admin Styles ────────────────────────────────────────────────── */
.admin-body { display: flex; min-height: 100vh; background: var(--bg-secondary); }
.admin-sidebar {
  width: 260px; background: var(--bg-card); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh;
  overflow-y: auto; z-index: 200; transition: transform var(--transition);
}
.admin-sidebar.collapsed { transform: translateX(-260px); }
.sidebar-logo { padding: 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.sidebar-logo a { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 800; color: var(--primary); }
.sidebar-close { color: var(--text-muted); display: none; }
.sidebar-user { padding: 16px 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.sidebar-avatar { width: 40px; height: 40px; border-radius: 50%; }
.sidebar-user strong { display: block; font-size: 0.9rem; }
.sidebar-user small { color: var(--text-muted); font-size: 0.75rem; }
.sidebar-nav { padding: 12px 8px; flex: 1; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 0.88rem; font-weight: 500; transition: all var(--transition); margin-bottom: 2px;
}
.sidebar-link:hover { background: var(--primary-light); color: var(--primary); }
.sidebar-link.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.sidebar-link i { width: 16px; flex-shrink: 0; }
.sidebar-link.text-danger:hover { background: #ffebee; color: var(--danger); }
.sidebar-divider { border: none; border-top: 1px solid var(--border); margin: 8px 0; }

.admin-main { margin-left: 260px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; transition: margin-left var(--transition); }
.admin-main.expanded { margin-left: 0; }
.admin-topbar { background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 0 24px; height: 64px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
.topbar-left { display: flex; align-items: center; gap: 16px; }
.sidebar-toggle { width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-secondary); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--text-muted); }
.breadcrumb a { color: var(--primary); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.admin-lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}
.admin-lang-option {
  min-width: 42px;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.06em;
}
.admin-lang-option.active {
  background: var(--primary);
  color: #fff;
}
.admin-lang-option:hover { color: var(--primary); }
.admin-lang-option.active:hover { color: #fff; }
.topbar-notif { position: relative; }
.topbar-notif button {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-secondary);
  color: var(--text-secondary); font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  position: relative; transition: all var(--transition);
}
.topbar-notif button:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.notif-badge { position: absolute; top: -4px; right: -4px; width: 18px; height: 18px; background: var(--danger); color: #fff; font-size: 0.62rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.topbar-admin-menu { display: flex; align-items: center; gap: 10px; }
.topbar-avatar { width: 36px; height: 36px; border-radius: 50%; }
.topbar-admin-menu strong { display: block; font-size: 0.88rem; }
.topbar-admin-menu small { color: var(--text-muted); font-size: 0.75rem; }

.admin-content { padding: 24px; flex: 1; }
.admin-dashboard { }
.charts-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 20px; }
.chart-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.chart-card--lg { }
.chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.chart-header h3 { font-size: 0.95rem; display: flex; align-items: center; gap: 8px; }
.chart-header select { font-size: 0.82rem; padding: 5px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-secondary); color: var(--text-primary); }
.chart-wrap { position: relative; }
.admin-section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.admin-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.pending-list { display: flex; flex-direction: column; gap: 12px; }
.pending-item { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pending-avatar { width: 40px; height: 40px; border-radius: 50%; }
.pending-info { flex: 1; }
.pending-info strong { display: block; font-size: 0.88rem; }
.pending-info small { color: var(--text-muted); font-size: 0.78rem; }
.pending-actions { display: flex; gap: 6px; }

/* ── Tables ──────────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th { padding: 12px 14px; text-align: left; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); border-bottom: 2px solid var(--border); white-space: nowrap; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-light); color: var(--text-secondary); }
.data-table tr:hover td { background: var(--bg-surface); }
.data-table tr:last-child td { border-bottom: none; }

/* ── Empty States ────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state i { margin-bottom: 12px; opacity: 0.4; display: block; }
.empty-state p { margin-bottom: 12px; }
.empty-state--sm { padding: 24px; }
.empty-state--sm i { font-size: 2rem; }

/* ── Success Page ────────────────────────────────────────────────── */
.success-page { padding: 60px 0; display: flex; align-items: center; justify-content: center; min-height: 70vh; }
.success-card { max-width: 600px; margin: 0 auto; background: var(--bg-card); border-radius: var(--radius-lg); padding: 48px; text-align: center; box-shadow: var(--shadow-lg); }
.success-icon { font-size: 5rem; color: var(--success); margin-bottom: 20px; }
.success-icon i { display: block; }
.success-subtitle { color: var(--text-muted); margin-bottom: 24px; }
.booking-details-card { background: var(--bg-surface); border-radius: var(--radius); padding: 20px; text-align: left; margin-top: 20px; }
.booking-details-card h3 { margin-bottom: 14px; }
.detail-rows { display: flex; flex-direction: column; gap: 10px; }
.detail-row { display: flex; justify-content: space-between; font-size: 0.9rem; }
.detail-row span { color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

/* ── Page Header ─────────────────────────────────────────────────── */
.page-header { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; padding: 48px 0; margin-bottom: 0; }
.page-header h1 { color: #fff; display: flex; align-items: center; gap: 12px; }
.page-header p { color: rgba(255,255,255,0.8); margin-top: 8px; }

/* ── Pagination ──────────────────────────────────────────────────── */
.pagination-wrap { display: flex; justify-content: center; margin-top: 32px; }
.pagination { display: flex; gap: 4px; list-style: none; }
.pagination a, .pagination span { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1px solid var(--border); color: var(--text-secondary); font-size: 0.88rem; font-weight: 600; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active a, .pagination .active span { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Animations ──────────────────────────────────────────────────── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.animate-fadeInUp { animation: fadeInUp 0.6s ease forwards; }
.animate-fadeInLeft { animation: fadeInLeft 0.6s ease forwards; }
.animate-fadeInRight { animation: fadeInRight 0.6s ease forwards; }
.animate-bounce { animation: bounce 1s ease; }
@keyframes bounce { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-section-grid { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
}

@media (min-width: 1200px) {
  .site-navbar .navbar-collapse { display: flex !important; }
  .site-navbar .navbar-toggler { display: none !important; }
}

@media (max-width: 1199.98px) {
  .site-navbar .navbar-collapse {
    position: absolute; top: calc(100% + 1px); left: 12px; right: 12px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 12px; max-height: calc(100vh - 132px); overflow-y: auto;
  }
  .site-navbar .navbar-nav { align-items: stretch; gap: 4px; }
  .site-navbar .nav-link { justify-content: space-between; width: 100%; padding: 11px 12px; white-space: normal; }
  .site-navbar .dropdown-menu {
    position: static; min-width: 0; width: 100%; box-shadow: none; border-radius: var(--radius-sm);
    opacity: 1; pointer-events: auto; transform: none; margin-top: 6px; padding: 10px;
  }
  .site-navbar .dropdown-menu:not(.show) { display: none; }
  .site-navbar .dropdown-menu.show { display: block; }
  .mega-grid { grid-template-columns: 1fr; }
  .site-navbar .d-flex.align-items-center {
    width: 100%; align-items: stretch !important; justify-content: stretch; gap: 8px !important; margin-top: 8px;
  }
  .site-navbar .nav-lang-btn,
  .site-navbar .btn-nav-outline,
  .site-navbar .btn-nav-primary,
  .site-navbar .nav-user-btn { min-height: 40px; justify-content: center; }
  .site-navbar .lang-menu {
    position: static !important; width: 100%; max-height: 240px; overflow-y: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-top: 6px;
  }
  .site-navbar .lang-menu.show { display: grid; opacity: 1; pointer-events: auto; transform: none; }
}

@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-image { display: none; }
  .doctors-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: fixed; top: 0; left: -320px; height: 100vh; z-index: 300; transition: left var(--transition); border-radius: 0; }
  .filter-sidebar.open { left: 0; }
  .filter-toggle { display: flex; }
  .doc-profile-header { flex-direction: column; }
  .doc-profile-body { grid-template-columns: 1fr; }
  .doc-profile-sidebar { order: -1; }
  .booking-layout, .payment-layout { grid-template-columns: 1fr; }
  .booking-sidebar, .payment-summary { order: -1; }
  .auth-container { grid-template-columns: 1fr; }
  .auth-info-panel { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .stats-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer-hero { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .testimonials-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr 1fr; }
  .insurance-grid { grid-template-columns: 1fr; }
  .ai-features-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-menu { display: none; position: fixed; top: 70px; left: 0; right: 0; background: var(--nav-bg); border-top: 1px solid var(--border); flex-direction: column; padding: 16px; gap: 4px; z-index: 150; box-shadow: var(--shadow-md); }
  .nav-menu.open { display: flex; }
  .hamburger { display: flex; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
  .steps-grid { flex-direction: column; }
  .step-arrow { transform: rotate(90deg); }
  .doctor-list-card { flex-direction: column; }
  .doc-list-actions { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  .admin-sidebar { transform: translateX(-260px); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .sidebar-close { display: flex; }
  .angel-ai-panel { width: 320px; right: -8px; }
  .booking-steps { overflow-x: auto; padding-bottom: 8px; }
  .header-live-clock { min-width: auto; padding: 6px 9px; }
  .clock-digital { display: none; }
  .footer-shell { border-radius: 24px 24px 0 0; }
  .footer-hero, .footer-grid, .footer-bottom { padding-left: 20px; padding-right: 20px; }
  .topbar-right { gap: 8px; }
}

@media (max-width: 480px) {
  .stats-grid--4 { grid-template-columns: 1fr 1fr; }
  .specialties-grid { grid-template-columns: repeat(3, 1fr); }
  .testimonials-grid, .pricing-grid { grid-template-columns: 1fr; }
  .auth-alt-btns { flex-direction: column; }
  .chooser-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(3, 1fr); }
  .hero-cta { flex-direction: column; }
  .news-tickers-wrapper { font-size: 0.78rem; }
  .ticker-label { display: none; }
  h1 { font-size: 1.6rem; }
  .site-navbar .container-xxl { padding-left: 12px; padding-right: 12px; }
  .brand-icon { width: 34px; height: 34px; }
  .brand-dr, .brand-247 { font-size: 0.96rem; }
  .brand-text small { font-size: 0.56rem; max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
  .site-toggler { width: 38px; height: 36px; }
  .site-navbar .navbar-collapse { left: 8px; right: 8px; }
  .site-navbar .d-flex.align-items-center { flex-direction: column; }
  .site-navbar .lang-menu { grid-template-columns: 1fr; }
  .footer-brand-panel, .footer-contact-panel, .footer-card { border-radius: 18px; }
  .footer-cta-row { flex-direction: column; }
  .footer-cta-row .btn { width: 100%; }
  .footer-contact-pill span { overflow: hidden; text-overflow: ellipsis; }
  .admin-topbar { padding: 0 12px; }
  .topbar-admin-menu small { display: none; }
}

/* ── RTL Support ────────────────────────────────────────────────── */
[dir="rtl"] .navbar-nav { flex-direction: row; padding-right: 0; }
[dir="rtl"] .navbar .me-auto { margin-left: auto !important; margin-right: 0 !important; }
[dir="rtl"] .navbar .d-flex.align-items-center { flex-direction: row; }
[dir="rtl"] .site-brand,
[dir="rtl"] .sidebar-logo a,
[dir="rtl"] .sidebar-user,
[dir="rtl"] .topbar-admin-menu { flex-direction: row-reverse; }
[dir="rtl"] .brand-text,
[dir="rtl"] .dropdown-menu,
[dir="rtl"] .dropdown-item,
[dir="rtl"] .mega-heading,
[dir="rtl"] .data-table th,
[dir="rtl"] .data-table td { text-align: right; }
[dir="rtl"] .dropdown-menu { left: auto; right: 0; }
[dir="rtl"] .dropdown-menu-end { right: auto !important; left: 0 !important; }
[dir="rtl"] .dropdown-toggle::after { margin-right: .255em; margin-left: 0; }
[dir="rtl"] .nav-lang-btn .fa-globe,
[dir="rtl"] .sidebar-link i,
[dir="rtl"] .breadcrumb span { margin-left: .35rem; margin-right: 0; }
[dir="rtl"] .header-live-clock { flex-direction: row-reverse; }
[dir="rtl"] .hero-text { text-align: right; }
[dir="rtl"] .hero-stats { direction: rtl; }
[dir="rtl"] .step-arrow i { transform: scaleX(-1); }
[dir="rtl"] .footer-grid { direction: rtl; }
[dir="rtl"] .footer-contact-pill,
[dir="rtl"] .footer-contact-pills,
[dir="rtl"] .footer-chip-row { direction: rtl; }
[dir="rtl"] .admin-sidebar { left: auto; right: 0; border-right: none; border-left: 1px solid var(--border); }
[dir="rtl"] .admin-sidebar.collapsed { transform: translateX(260px); }
[dir="rtl"] .admin-main { margin-left: 0; margin-right: 260px; }
[dir="rtl"] .admin-main.expanded { margin-right: 0; }
[dir="rtl"] .topbar-left,
[dir="rtl"] .topbar-right,
[dir="rtl"] .breadcrumb,
[dir="rtl"] .pending-item,
[dir="rtl"] .section-header-row,
[dir="rtl"] .chart-header { flex-direction: row-reverse; }
[dir="rtl"] .sidebar-link { flex-direction: row; }
[dir="rtl"] .sidebar-link i { margin-left: 0; margin-right: 0; }

/* ── RTL: Stat cards ── */
[dir="rtl"] .stat-card { flex-direction: row-reverse; }

/* ── RTL: Doctor / Assistant profile ── */
[dir="rtl"] .doc-profile-header { flex-direction: row-reverse; }
[dir="rtl"] .doc-profile-body { direction: rtl; }
[dir="rtl"] .doc-profile-body > * { direction: ltr; }
[dir="rtl"] .doc-profile-top { flex-direction: row-reverse; }
[dir="rtl"] .doc-specialty-label,
[dir="rtl"] .doc-languages-row,
[dir="rtl"] .meta-item { flex-direction: row-reverse; }
[dir="rtl"] .doc-profile-meta { direction: rtl; }
[dir="rtl"] .doc-profile-cta { flex-direction: row-reverse; }
[dir="rtl"] .doc-mini-stats { direction: rtl; }
[dir="rtl"] .doc-profile-price { text-align: left; }
[dir="rtl"] .info-grid { direction: rtl; }
[dir="rtl"] .info-grid > * { direction: ltr; text-align: right; }

/* ── RTL: Booking page ── */
[dir="rtl"] .booking-layout { direction: rtl; }
[dir="rtl"] .booking-layout > * { direction: ltr; }
[dir="rtl"] .booking-steps { direction: rtl; }
[dir="rtl"] .booking-section h3 i,
[dir="rtl"] .booking-sidebar h4 i { margin-left: .4rem; margin-right: 0; }
[dir="rtl"] .promo-input-row { flex-direction: row-reverse; }
[dir="rtl"] .summary-row { text-align: right; }
[dir="rtl"] .doc-summary-card { text-align: right; }

/* ── RTL: Register / Auth pages ── */
[dir="rtl"] .chooser-card { text-align: right; }
[dir="rtl"] .auth-form .form-section-title { text-align: right; }
[dir="rtl"] .auth-form label { text-align: right; display: block; }

@media (max-width: 900px) {
  [dir="rtl"] .filter-sidebar { left: auto; right: -320px; }
  [dir="rtl"] .filter-sidebar.open { right: 0; }
}

@media (max-width: 768px) {
  [dir="rtl"] .admin-sidebar { transform: translateX(260px); }
  [dir="rtl"] .admin-sidebar.open { transform: translateX(0); }
  [dir="rtl"] .admin-main { margin-right: 0; }
  [dir="rtl"] .angel-ai-panel { right: auto; left: -8px; }
}

/* ── Login Required Modal ───────────────────────────────────────── */
.login-modal-content {
    border-radius: 20px;
    border: none;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,32,96,.25);
}
.login-modal-icon {
    background: linear-gradient(135deg, var(--primary, #002060) 0%, #1a3a7a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}
.login-modal-icon-ring {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    border: 3px solid rgba(255,255,255,.35);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: #fff;
    animation: modalIconPulse 2s ease-in-out infinite;
}
@keyframes modalIconPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(255,255,255,.25); }
    50%      { box-shadow: 0 0 0 14px rgba(255,255,255,0); }
}
.login-modal-body {
    padding: 28px 32px 32px;
    background: var(--bg-card, #fff);
}
.login-modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary, #002060);
    margin-bottom: 10px;
}
.login-modal-text {
    color: var(--text-secondary, #6c757d);
    font-size: .95rem;
    margin-bottom: 24px;
    line-height: 1.6;
}
.login-modal-btn-primary {
    background: linear-gradient(135deg, var(--primary, #002060) 0%, #1a3a7a 100%);
    border: none;
    font-weight: 600;
    letter-spacing: .3px;
    transition: transform .15s, box-shadow .15s;
}
.login-modal-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,32,96,.3);
}
[data-theme="dark"] .login-modal-body { background: var(--bg-card); }
[data-theme="dark"] .login-modal-title { color: var(--primary); }

/* ================================================================
   DR-247 Admin — DataTables + RTL + UI Polish  v20260508-1
   ================================================================ */

/* ── Admin body font ─────────────────────────────────────────────── */
.admin-body {
  font-family: 'Inter', 'Cairo', sans-serif;
}
[dir="rtl"] .admin-body,
[dir="rtl"] .admin-sidebar,
[dir="rtl"] .admin-topbar,
[dir="rtl"] .admin-content {
  font-family: 'Cairo', 'Inter', sans-serif;
  text-align: right;
}
/* Admin text directions */
[dir="rtl"] .admin-content h1,
[dir="rtl"] .admin-content h2,
[dir="rtl"] .admin-content h3,
[dir="rtl"] .admin-content h4,
[dir="rtl"] .admin-content p,
[dir="rtl"] .admin-content label,
[dir="rtl"] .admin-content th,
[dir="rtl"] .admin-content td,
[dir="rtl"] .admin-content .form-label,
[dir="rtl"] .admin-content .text-muted {
  text-align: right;
  direction: rtl;
}
[dir="rtl"] .admin-page-header { flex-direction: row-reverse; }
[dir="rtl"] .modal-header, [dir="rtl"] .modal-footer { flex-direction: row-reverse; }
[dir="rtl"] .modal-body { text-align: right; }
[dir="rtl"] .input-group { flex-direction: row-reverse; }
[dir="rtl"] .input-group .btn { border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important; }
[dir="rtl"] .input-group input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; }
[dir="rtl"] .badge { direction: ltr; }
[dir="rtl"] .d-flex.gap-1,
[dir="rtl"] .d-flex.gap-2 { flex-direction: row-reverse; }

/* ── Sidebar RTL collapsed states ────────────────────────────────── */
[dir="rtl"] .admin-sidebar.collapsed-rtl { transform: translateX(260px); }
[dir="rtl"] .admin-main.expanded-rtl { margin-right: 0 !important; }

/* ── Admin card improvement ──────────────────────────────────────── */
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.admin-page-header { margin-bottom: 1.5rem; }
.admin-page-header h2 { font-size: 1.35rem; font-weight: 700; color: var(--text-primary); }

/* ── DataTables Override ─────────────────────────────────────────── */
.dataTables_wrapper .dataTables_filter input {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.875rem;
  margin-left: 6px;
}
[dir="rtl"] .dataTables_wrapper .dataTables_filter input { margin-left: 0; margin-right: 6px; }
.dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 28px 4px 8px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.875rem;
  margin: 0 4px;
}
.dataTables_wrapper .dataTables_info { font-size: 0.82rem; color: var(--text-muted); padding-top: 6px; }
.dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 4px 10px !important;
  border-radius: var(--radius-sm) !important;
  font-size: 0.82rem;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border) !important;
  background: var(--bg-surface) !important;
  margin: 2px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--primary-light) !important;
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  opacity: 0.4 !important;
  cursor: default !important;
}
/* Dark mode DT */
[data-theme="dark"] .dataTables_wrapper .dataTables_filter input,
[data-theme="dark"] .dataTables_wrapper .dataTables_length select {
  background: var(--bg-surface);
  border-color: var(--border);
  color: var(--text-primary);
}
/* DT processing indicator */
.dataTables_wrapper .dataTables_processing {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 10px 20px;
  font-size: 0.85rem;
  color: var(--primary);
}

/* ── Table Row polish ────────────────────────────────────────────── */
.table thead th {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  background: var(--bg-surface);
}
.table tbody td {
  font-size: 0.88rem;
  color: var(--text-secondary);
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light);
}
.table-hover tbody tr:hover td { background: var(--bg-surface); }

/* ── Code badge ──────────────────────────────────────────────────── */
.fs-code {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.88rem;
  font-family: 'Courier New', monospace;
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* ── Btn xs ──────────────────────────────────────────────────────── */
.btn-xs { padding: 3px 8px !important; font-size: 0.78rem !important; }

/* ── SweetAlert2 RTL support ─────────────────────────────────────── */
[dir="rtl"] .swal2-popup {
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  text-align: right;
}
[dir="rtl"] .swal2-actions { flex-direction: row-reverse; }
[dir="rtl"] .swal2-timer-progress-bar-container { direction: rtl; }

/* ── Admin topbar improvements ───────────────────────────────────── */
.admin-topbar { box-shadow: 0 1px 4px rgba(0,32,96,0.06); }
.topbar-left .breadcrumb { font-size: 0.82rem; font-weight: 500; }
.topbar-left .breadcrumb a { font-weight: 600; }
[data-theme="dark"] .admin-topbar { box-shadow: 0 1px 0 var(--border); }
[data-theme="dark"] .sidebar-link.text-danger:hover { background: rgba(224,48,48,0.15) !important; color: var(--danger) !important; }
[data-theme="dark"] .topbar-admin-menu strong { color: var(--text-primary); }
[data-theme="dark"] .admin-sidebar { background: var(--bg-card); border-color: var(--border); }
[dir="rtl"] .notif-badge { right: auto; left: -4px; }

/* ── Modal improvements ──────────────────────────────────────────── */
.modal-content {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  background: var(--bg-card);
}
.modal-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  background: var(--bg-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-title { font-weight: 700; font-size: 1rem; color: var(--text-primary); }
.modal-body { padding: 1.5rem; }
.modal-footer { border-top: 1px solid var(--border); padding: 1rem 1.5rem; background: var(--bg-surface); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
[data-theme="dark"] .modal-content { background: var(--bg-card); }
[data-theme="dark"] .modal-header, [data-theme="dark"] .modal-footer { background: var(--bg-surface); }

/* ── Form controls in admin ──────────────────────────────────────── */
.admin-content .form-control,
.admin-content .form-select {
  border-color: var(--border);
  background: var(--bg-surface);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}
.admin-content .form-control:focus,
.admin-content .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,32,96,0.1);
  background: var(--bg-card);
}
[data-theme="dark"] .admin-content .form-control,
[data-theme="dark"] .admin-content .form-select {
  background: var(--bg-surface);
  border-color: var(--border);
  color: var(--text-primary);
}

/* ── Dark mode operational screens ───────────────────────────────── */
[data-theme="dark"] .admin-card,
[data-theme="dark"] .dashboard-section,
[data-theme="dark"] .video-room-card,
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .data-table,
[data-theme="dark"] .table {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border);
}

[data-theme="dark"] .table > :not(caption) > * > *,
[data-theme="dark"] .data-table th,
[data-theme="dark"] .data-table td {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

[data-theme="dark"] .table thead th,
[data-theme="dark"] .data-table thead th,
[data-theme="dark"] .appointment-mini-info,
[data-theme="dark"] .zoom-details,
[data-theme="dark"] .filter-tabs {
  background: var(--bg-surface);
  border-color: var(--border);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] textarea,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] input[type="number"] {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border);
}

[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] textarea::placeholder,
[data-theme="dark"] input::placeholder { color: var(--text-muted); }

[data-theme="dark"] .filter-tab,
[data-theme="dark"] .dropdown-item,
[data-theme="dark"] .btn-outline-secondary,
[data-theme="dark"] .btn-outline-primary {
  color: var(--text-primary);
  border-color: var(--border);
}

[data-theme="dark"] .filter-tab.active,
[data-theme="dark"] .dropdown-item.active,
[data-theme="dark"] .dropdown-item:hover {
  background: var(--primary-light);
  color: var(--text-primary);
}

[data-theme="dark"] .alert-success,
[data-theme="dark"] .alert-warning,
[data-theme="dark"] .alert-danger {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border);
}

/* ── Backend polish: reports and legal pages ─────────────────────── */
.report-kpi { display: flex; align-items: center; gap: 12px; min-height: 96px; padding: 16px; }
.report-kpi-icon { width: 42px; height: 42px; border-radius: var(--radius-sm); display: grid; place-items: center; color: var(--primary); background: var(--primary-light); flex: 0 0 auto; }
.report-kpi span { display: block; color: var(--text-muted); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; }
.report-kpi strong { display: block; color: var(--text-primary); font-size: 1.35rem; line-height: 1.1; margin-top: 4px; }
.report-panel h5 { color: var(--text-primary); font-weight: 700; }
.legal-lang-panel { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; height: 100%; }
.legal-page-header { background: var(--primary); color: #fff; }
.legal-page-container { max-width: 900px; }
.legal-content { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(20px, 4vw, 36px); color: var(--text-secondary); line-height: 1.9; box-shadow: var(--shadow); white-space: normal; }

/* ── Appointment redesign ────────────────────────────────────────── */
.appointment-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 22px 0; }
.appointment-summary-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; align-items: center; gap: 12px; color: var(--text-primary); box-shadow: var(--shadow); text-align: left; }
.appointment-summary-card i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--primary-light); color: var(--primary); }
.appointment-summary-card span { flex: 1; font-weight: 700; }
.appointment-summary-card strong { font-size: 1.35rem; }
.appointment-summary-card.active { border-color: var(--primary); box-shadow: var(--shadow-md); }
.appointment-tab-content { display: none; }
.appointment-tab-content.active { display: block; }
.appointment-board { display: grid; gap: 16px; }
.appointment-card-v2 { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.appointment-card-main { display: flex; gap: 16px; align-items: flex-start; }
.appointment-doctor-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.appointment-card-info { flex: 1; min-width: 0; }
.appointment-card-info h3 { margin: 0; font-size: 1.05rem; }
.appointment-card-info p { margin: 4px 0 0; color: var(--text-muted); font-size: 0.88rem; }
.appointment-meta-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.appointment-meta-grid span { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; color: var(--text-secondary); font-size: 0.82rem; display: flex; align-items: center; gap: 7px; }
.appointment-progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 14px; }
.appointment-progress-step { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 0.76rem; }
.appointment-progress-step span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border); background: var(--bg-surface); font-weight: 700; }
.appointment-progress-step.done { color: var(--success); }
.appointment-progress-step.done span { background: var(--success); color: #fff; border-color: var(--success); }
.appointment-card-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.appointment-rating { color: var(--gold); font-size: 0.95rem; }
.rating-modal { position: fixed; inset: 0; background: var(--bg-overlay); display: none; align-items: center; justify-content: center; z-index: 1100; padding: 20px; }
.rating-modal.open { display: flex; }
.rating-dialog { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; max-width: 420px; width: 100%; box-shadow: var(--shadow-lg); text-align: center; }
.star-rating { display: flex; justify-content: center; gap: 8px; margin: 12px 0 18px; }
.star-btn { color: var(--gold); font-size: 2rem; line-height: 1; }
[dir="rtl"] .appointment-summary-card { text-align: right; }
.dev-payment-card { display: flex; justify-content: space-between; align-items: center; gap: 14px; background: var(--bg-surface); border: 1px dashed var(--primary); border-radius: var(--radius); padding: 14px; }

@media (max-width: 768px) {
  .appointment-summary-grid { grid-template-columns: 1fr; }
  .appointment-card-main { flex-direction: column; }
  .appointment-meta-grid { grid-template-columns: 1fr; }
  .appointment-progress { grid-template-columns: 1fr; }
  .appointment-card-actions { justify-content: flex-start; }
}
