/* ================================================
   نظام التصميم - عيادة د. بشاير
   Design System - Modern Medical Platform
   ================================================ */

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

/* ---------- المتغيرات ---------- */
:root {
  --primary:       #1a56db;
  --primary-dark:  #1341af;
  --primary-light: #e8f0fe;
  --secondary:     #0ea5e9;
  --accent:        #10b981;
  --accent-dark:   #059669;
  --danger:        #ef4444;
  --warning:       #f59e0b;
  --info:          #3b82f6;

  --bg:            #f8fafc;
  --surface:       #ffffff;
  --border:        #e2e8f0;
  --border-light:  #f1f5f9;

  --text-1:        #0f172a;
  --text-2:        #475569;
  --text-3:        #94a3b8;

  --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:     0 4px 12px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg:     0 10px 30px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.06);
  --shadow-xl:     0 20px 50px rgba(0,0,0,.12);

  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --radius-xl:     24px;
  --radius-full:   9999px;

  --font:          'Cairo', 'Segoe UI', 'Tahoma', sans-serif;
  --transition:    all .22s ease;
  --sidebar-w:     260px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-1);
  background: var(--bg);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: var(--primary); transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ---------- Container ---------- */
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 1.5rem; }

/* ================================================  HEADER  ================================================ */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.navbar { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 1rem; }
.nav-logo { display: flex; align-items: center; gap: .6rem; font-size: 1.2rem; font-weight: 700; color: var(--primary); flex-shrink: 0; }
.nav-logo i { font-size: 1.5rem; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: .25rem; }
.nav-links a {
  display: flex; align-items: center; gap: .4rem;
  padding: .5rem .9rem;
  border-radius: var(--radius-md);
  color: var(--text-2); font-size: .92rem; font-weight: 500;
  transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active { background: var(--primary-light); color: var(--primary); }
.nav-links a i { font-size: .85rem; }
.nav-links a.nav-book {
  background: var(--primary); color: #fff !important;
  border-radius: var(--radius-full);
  padding: .45rem 1.1rem;
  font-weight: 600;
}
.nav-links a.nav-book:hover { background: var(--primary-dark); }
.nav-links a.nav-book.active { background: var(--primary-dark); }
.mobile-nav a.active { background: var(--primary-light); color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.user-chip {
  display: flex; align-items: center; gap: .5rem;
  padding: .35rem .75rem .35rem .5rem;
  background: var(--primary-light); border-radius: var(--radius-full);
  font-size: .88rem; font-weight: 600; color: var(--primary);
}
.user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
}
.hamburger { display: none; background: none; border: none; font-size: 1.4rem; color: var(--text-2); padding: .25rem; }
.mobile-nav { display: none; flex-direction: column; padding: 1rem; border-top: 1px solid var(--border); background: var(--surface); gap: .25rem; }
.mobile-nav a { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border-radius: var(--radius-md); color: var(--text-2); font-weight: 500; }
.mobile-nav a:hover { background: var(--primary-light); color: var(--primary); }
.mobile-nav.open { display: flex; }

/* ================================================  FOOTER  ================================================ */
.site-footer { background: #0f172a; color: #94a3b8; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; padding: 3.5rem 0 2.5rem; }
.footer-brand .logo { color: #fff; margin-bottom: .75rem; font-size: 1.2rem; display: flex; align-items: center; gap: .5rem; }
.footer-brand .logo i { color: var(--accent); }
.footer-brand p { font-size: .9rem; line-height: 1.7; color: #64748b; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 1rem; }
.footer-col ul li + li { margin-top: .5rem; }
.footer-col ul a { color: #64748b; font-size: .9rem; }
.footer-col ul a:hover { color: var(--accent); }
.footer-col .contact-item { display: flex; align-items: flex-start; gap: .6rem; font-size: .9rem; margin-bottom: .6rem; color: #64748b; }
.footer-col .contact-item i { color: var(--accent); margin-top: 3px; flex-shrink: 0; }
.social-row { display: flex; gap: .6rem; margin-top: 1rem; }
.social-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.07); color: #94a3b8;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; transition: var(--transition);
}
.social-icon:hover { background: var(--primary); color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 1.25rem 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .85rem; color: #475569;
}
.footer-bottom a { color: #475569; }
.footer-bottom a:hover { color: var(--accent); }

/* ================================================  BUTTONS  ================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .6rem 1.3rem;
  border-radius: var(--radius-md);
  font-size: .9rem; font-weight: 600;
  border: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary  { background: var(--primary);  color: #fff; border-color: var(--primary); }
.btn-primary:hover  { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-success  { background: var(--accent);   color: #fff; border-color: var(--accent); }
.btn-success:hover  { background: var(--accent-dark);  border-color: var(--accent-dark); color: #fff; }
.btn-danger   { background: var(--danger);   color: #fff; border-color: var(--danger); }
.btn-danger:hover   { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn-warning  { background: var(--warning);  color: #fff; border-color: var(--warning); }
.btn-ghost    { background: transparent; color: var(--text-2); border-color: var(--border); }
.btn-ghost:hover    { background: var(--border-light); color: var(--text-1); }
.btn-outline  { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover  { background: var(--primary); color: #fff; }
.btn-white    { background: #fff; color: var(--primary); border-color: #fff; }
.btn-white:hover    { background: var(--primary-light); color: var(--primary-dark); border-color: var(--primary-light); }

.btn-sm  { padding: .38rem .8rem; font-size: .82rem; border-radius: var(--radius-sm); }
.btn-lg  { padding: .8rem 1.8rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-xl  { padding: 1rem 2.2rem; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }
.btn-icon { padding: .5rem; width: 36px; height: 36px; border-radius: var(--radius-md); }

/* ================================================  FORMS  ================================================ */
.form-group { margin-bottom: 1.2rem; }
.form-label { display: block; font-size: .87rem; font-weight: 600; color: var(--text-2); margin-bottom: .45rem; }
.form-label i { margin-left: .3rem; color: var(--primary); }
.form-control {
  width: 100%; padding: .65rem 1rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  font-size: .92rem; color: var(--text-1); background: var(--surface);
  transition: var(--transition); outline: none;
  appearance: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,86,219,.12); }
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(239,68,68,.12); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }
.invalid-feedback { font-size: .82rem; color: var(--danger); margin-top: .3rem; }
.form-hint { font-size: .82rem; color: var(--text-3); margin-top: .3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-check { display: flex; align-items: center; gap: .5rem; }
.form-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; }
.form-check label { font-size: .88rem; color: var(--text-2); margin: 0; }
.input-group { position: relative; }
.input-group-icon { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-group .form-control { padding-right: 2.8rem; }
.input-group .btn-eye { position: absolute; left: .5rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-3); padding: .25rem; }
.input-group .btn-eye:hover { color: var(--text-2); }

/* Password strength */
.pw-strength { height: 4px; background: var(--border); border-radius: 2px; margin-top: .5rem; overflow: hidden; }
.pw-bar { height: 100%; width: 0; transition: width .3s ease; border-radius: 2px; }
.pw-bar.weak   { background: var(--danger);  width: 33%; }
.pw-bar.medium { background: var(--warning); width: 66%; }
.pw-bar.strong { background: var(--accent);  width: 100%; }

/* ================================================  CARDS  ================================================ */
.card { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--border); }
.card-title { font-size: 1.05rem; font-weight: 700; color: var(--text-1); display: flex; align-items: center; gap: .5rem; }
.card-title i { color: var(--primary); }
.card-body { padding: 1.5rem; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); background: var(--border-light); }

/* ================================================  BADGES  ================================================ */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .65rem; border-radius: var(--radius-full);
  font-size: .78rem; font-weight: 600;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-gray    { background: #f1f5f9; color: #475569; }

/* ================================================  ALERTS  ================================================ */
.alert {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .9rem 1.2rem; border-radius: var(--radius-md);
  font-size: .9rem; margin-bottom: 1rem;
  border: 1px solid transparent;
}
.alert i { margin-top: 2px; flex-shrink: 0; }
.alert-success { background: #d1fae5; border-color: #6ee7b7; color: #065f46; }
.alert-danger  { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.alert-warning { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.alert-info    { background: #dbeafe; border-color: #93c5fd; color: #1e40af; }

/* ================================================  TABLES  ================================================ */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table thead { background: var(--border-light); }
.table th {
  padding: .85rem 1rem; font-size: .82rem; font-weight: 700;
  color: var(--text-2); letter-spacing: .02em; white-space: nowrap;
  border-bottom: 1px solid var(--border); text-align: right;
}
.table td { padding: .85rem 1rem; border-bottom: 1px solid var(--border-light); color: var(--text-1); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--border-light); }

/* ================================================  HERO  ================================================ */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1a56db 100%);
  color: #fff; padding: 5rem 0 4rem; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero-content { position: relative; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-full); padding: .35rem .9rem;
  font-size: .82rem; font-weight: 600; color: #93c5fd; margin-bottom: 1.25rem;
}
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 800; line-height: 1.25; margin-bottom: 1.1rem; color: #fff; }
.hero p { font-size: 1.05rem; color: #bfdbfe; line-height: 1.75; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 2.5rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,.15); flex-wrap: wrap; }
.hero-stat-num { font-size: 1.8rem; font-weight: 800; color: #fff; }
.hero-stat-label { font-size: .82rem; color: #93c5fd; margin-top: .2rem; }
.hero-visual {
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 3px solid rgba(255,255,255,.18);
  box-shadow: 0 25px 60px rgba(0,0,0,.35);
  max-height: 650px;
  min-height: 420px;
}
.hero-img {
  width: 100%; height: 100%; min-height: 420px; object-fit: cover; object-position: center top;
  display: block; border-radius: var(--radius-xl);
}

/* ================================================  SECTIONS  ================================================ */
.section { padding: 4.5rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-label {
  display: inline-block; font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--primary); background: var(--primary-light);
  padding: .3rem .8rem; border-radius: var(--radius-full); margin-bottom: .75rem;
}
.section-header h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; color: var(--text-1); }
.section-header p { color: var(--text-2); margin-top: .6rem; max-width: 540px; margin-inline: auto; }

/* Feature cards */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem 1.5rem;
  transition: var(--transition); text-align: center;
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--primary); }
.feature-icon {
  width: 56px; height: 56px; border-radius: var(--radius-md);
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin: 0 auto 1.1rem;
}
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.feature-card p { font-size: .88rem; color: var(--text-2); line-height: 1.65; }

/* Doctor cards */
.doctors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; }
.doctor-card { display: flex; flex-direction: column; transition: var(--transition); }
.doctor-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.doctor-card-img {
  height: 160px;
  background: linear-gradient(135deg, var(--primary-light), #dbeafe);
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; color: var(--primary);
}
.doctor-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.doctor-card-body h3 { font-size: 1rem; font-weight: 700; margin-bottom: .25rem; }
.doctor-specialty { font-size: .85rem; color: var(--primary); font-weight: 600; margin-bottom: .75rem; }
.doctor-meta { font-size: .83rem; color: var(--text-2); display: flex; align-items: center; gap: .4rem; margin-bottom: .3rem; }
.doctor-meta i { color: var(--accent); width: 14px; }
.doctor-card-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--border); }
.doctor-rating { display: flex; align-items: center; gap: .3rem; font-size: .85rem; color: var(--warning); font-weight: 600; }
.doctor-rating span { color: var(--text-2); }

/* Stats */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.25rem; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-icon {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.stat-icon.blue   { background: var(--primary-light); color: var(--primary); }
.stat-icon.green  { background: #d1fae5; color: #059669; }
.stat-icon.orange { background: #fef3c7; color: #d97706; }
.stat-icon.red    { background: #fee2e2; color: #dc2626; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-icon.teal   { background: #ccfbf1; color: #0f766e; }
.stat-info .num { font-size: 1.6rem; font-weight: 800; color: var(--text-1); line-height: 1; }
.stat-info .lbl { font-size: .82rem; color: var(--text-2); margin-top: .2rem; }

/* Steps */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.step-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem 1.5rem;
  text-align: center; transition: var(--transition);
}
.step-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); }
.step-num {
  width: 48px; height: 48px; background: var(--primary); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 800; margin: 0 auto 1.1rem;
}
.step-card h4 { font-size: .97rem; font-weight: 700; margin-bottom: .5rem; }
.step-card p { font-size: .87rem; color: var(--text-2); }

/* Testimonials */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.testimonial-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; }
.stars { color: #f59e0b; font-size: .85rem; margin-bottom: .75rem; }
.testimonial-text { font-size: .92rem; color: var(--text-2); line-height: 1.75; margin-bottom: 1.1rem; }
.testimonial-author { display: flex; align-items: center; gap: .7rem; }
.t-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; flex-shrink: 0;
}
.t-name { font-weight: 700; font-size: .9rem; }
.t-role { font-size: .8rem; color: var(--text-3); }

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, var(--primary), #1341af);
  border-radius: var(--radius-xl); color: #fff;
  padding: 3rem 2.5rem; text-align: center;
}
.cta-banner h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: .75rem; }
.cta-banner p { color: #bfdbfe; margin-bottom: 1.75rem; }

/* ================================================  AUTH PAGES  ================================================ */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(135deg, #f0f7ff 0%, #e8f0fe 100%); }
.auth-wrapper { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-box { width: 100%; max-width: 460px; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); padding: 2.5rem; }
.auth-box-wide { max-width: 560px; }
.auth-logo { text-align: center; margin-bottom: 1.75rem; }
.auth-logo i { font-size: 2.5rem; color: var(--accent); }
.auth-logo h1 { font-size: 1.5rem; font-weight: 800; color: var(--text-1); margin-top: .5rem; }
.auth-logo p { font-size: .9rem; color: var(--text-2); margin-top: .25rem; }
.auth-divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--text-3); font-size: .82rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: .88rem; color: var(--text-2); }
.auth-footer a { font-weight: 600; }

/* User type toggle */
.type-toggle { display: flex; gap: .75rem; margin-bottom: 1.5rem; }
.type-btn {
  flex: 1; padding: .85rem;
  border: 2px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); cursor: pointer; transition: var(--transition); text-align: center;
}
.type-btn i { display: block; font-size: 1.5rem; color: var(--text-3); margin-bottom: .35rem; }
.type-btn .t-title { font-size: .85rem; font-weight: 600; color: var(--text-2); }
.type-btn small { display: block; font-size: .78rem; color: var(--text-3); margin-top: .15rem; }
.type-btn.active { border-color: var(--primary); background: var(--primary-light); }
.type-btn.active i { color: var(--primary); }
.type-btn.active .t-title { color: var(--primary); }

/* ================================================  DASHBOARD  ================================================ */
.dash-layout { display: flex; min-height: calc(100vh - 66px); }
.sidebar {
  width: var(--sidebar-w); background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column; flex-shrink: 0;
  position: sticky; top: 66px; height: calc(100vh - 66px); overflow-y: auto;
}
.sidebar-header { padding: 1.25rem 1.2rem 1rem; border-bottom: 1px solid var(--border); }
.sidebar-user { display: flex; align-items: center; gap: .75rem; }
.sidebar-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.sidebar-username { font-weight: 700; font-size: .92rem; line-height: 1.3; }
.sidebar-role { font-size: .78rem; color: var(--text-3); }
.sidebar-nav { padding: .75rem; flex: 1; }
.sidebar-section-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: .6rem .5rem .3rem; }
.sidebar-link {
  display: flex; align-items: center; gap: .7rem;
  padding: .65rem .85rem; border-radius: var(--radius-md);
  color: var(--text-2); font-size: .9rem; font-weight: 500;
  margin-bottom: .15rem; transition: var(--transition);
}
.sidebar-link i { width: 18px; text-align: center; font-size: .95rem; }
.sidebar-link:hover { background: var(--border-light); color: var(--text-1); }
.sidebar-link.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* Admin sidebar (dark) */
.admin-sidebar {
  width: var(--sidebar-w); background: #0f172a;
  min-height: calc(100vh - 66px); flex-shrink: 0;
  position: sticky; top: 66px; height: calc(100vh - 66px); overflow-y: auto;
}
.admin-sidebar .sidebar-header { background: rgba(255,255,255,.04); border-bottom-color: rgba(255,255,255,.08); }
.admin-sidebar .sidebar-username { color: #f1f5f9; }
.admin-sidebar .sidebar-role { color: #64748b; }
.admin-sidebar .sidebar-section-label { color: #475569; }
.admin-sidebar .sidebar-link { color: #94a3b8; }
.admin-sidebar .sidebar-link:hover { background: rgba(255,255,255,.06); color: #f1f5f9; }
.admin-sidebar .sidebar-link.active { background: rgba(26,86,219,.3); color: #93c5fd; }

/* Dash main */
.dash-main { flex: 1; padding: 2rem; min-width: 0; overflow-x: hidden; }
.dash-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1.75rem; gap: 1rem; flex-wrap: wrap; }
.dash-title { font-size: 1.4rem; font-weight: 800; color: var(--text-1); }
.dash-subtitle { font-size: .87rem; color: var(--text-2); margin-top: .2rem; }

/* Appointment cards */
.appt-card { display: flex; align-items: flex-start; gap: 1rem; padding: 1.25rem; border-bottom: 1px solid var(--border-light); transition: var(--transition); }
.appt-card:last-child { border-bottom: none; }
.appt-card:hover { background: var(--border-light); }
.appt-date-box { min-width: 56px; text-align: center; background: var(--primary-light); border-radius: var(--radius-md); padding: .5rem .4rem; flex-shrink: 0; }
.appt-date-box .month { font-size: .7rem; font-weight: 700; color: var(--primary); text-transform: uppercase; }
.appt-date-box .day { font-size: 1.5rem; font-weight: 800; color: var(--primary); line-height: 1; }
.appt-info { flex: 1; min-width: 0; }
.appt-info h4 { font-size: .95rem; font-weight: 700; margin-bottom: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-meta { font-size: .82rem; color: var(--text-2); display: flex; flex-wrap: wrap; gap: .4rem .8rem; margin-top: .3rem; }
.appt-meta span { display: flex; align-items: center; gap: .3rem; }
.appt-meta i { color: var(--primary); }
.appt-actions { display: flex; gap: .4rem; flex-shrink: 0; flex-wrap: wrap; align-items: flex-start; }

/* Booking wizard */
.wizard-steps {
  display: flex; border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); margin-bottom: 2rem;
}
.wizard-step {
  flex: 1; display: flex; align-items: center; gap: .6rem;
  padding: .9rem 1.2rem; font-size: .85rem; font-weight: 600;
  color: var(--text-3); border-left: 1px solid var(--border);
}
.wizard-step:first-child { border-left: none; }
.step-badge { width: 26px; height: 26px; border-radius: 50%; background: var(--border); color: var(--text-3); display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; flex-shrink: 0; }
.wizard-step.done { color: var(--accent); }
.wizard-step.done .step-badge { background: var(--accent); color: #fff; }
.wizard-step.current { color: var(--primary); background: var(--primary-light); }
.wizard-step.current .step-badge { background: var(--primary); color: #fff; }

/* Time slots */
.time-slots { display: flex; flex-wrap: wrap; gap: .6rem; }
.time-slot {
  padding: .5rem 1rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-md); font-size: .85rem; font-weight: 600;
  color: var(--text-2); cursor: pointer; transition: var(--transition); background: var(--surface);
}
.time-slot:hover { border-color: var(--primary); color: var(--primary); }
.time-slot.selected { background: var(--primary); border-color: var(--primary); color: #fff; }
.time-slot.booked { background: var(--border-light); color: var(--text-3); cursor: not-allowed; }

/* Search */
.search-bar { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.5rem; }
.search-input-wrap { position: relative; flex: 1; min-width: 200px; }
.filter-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filter-btn {
  padding: .4rem .9rem; border-radius: var(--radius-full);
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text-2); font-size: .85rem; font-weight: 500; cursor: pointer; transition: var(--transition);
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Specialty chips */
.spec-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.spec-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .85rem; border-radius: var(--radius-full);
  background: var(--border-light); color: var(--text-2);
  font-size: .83rem; font-weight: 500; cursor: pointer;
  border: 1.5px solid transparent; transition: var(--transition);
}
.spec-chip:hover { background: var(--primary-light); color: var(--primary); }
.spec-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Profile */
.profile-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-lg); padding: 2.5rem; color: #fff;
  display: flex; align-items: center; gap: 2rem; margin-bottom: 1.5rem;
}
.profile-big-avatar {
  width: 90px; height: 90px; border-radius: 50%;
  background: rgba(255,255,255,.2); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; font-weight: 700; border: 3px solid rgba(255,255,255,.4); flex-shrink: 0;
}
.profile-info h2 { font-size: 1.4rem; font-weight: 800; }
.profile-info p { opacity: .85; font-size: .9rem; margin-top: .3rem; }

/* Empty state */
.empty-state { text-align: center; padding: 3.5rem 2rem; color: var(--text-2); }
.empty-state i { font-size: 3.5rem; color: var(--border); margin-bottom: 1rem; display: block; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.empty-state p { font-size: .9rem; }

/* Scroll top */
.scroll-top {
  position: fixed; bottom: 1.5rem; left: 1.5rem;
  width: 42px; height: 42px; background: var(--primary); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); cursor: pointer; opacity: 0; transform: translateY(10px);
  transition: var(--transition); border: none; z-index: 999;
}
.scroll-top.show { opacity: 1; transform: translateY(0); }
.scroll-top:hover { background: var(--primary-dark); }

/* Spinner */
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Utils */
.text-center { text-align: center; }
.text-muted  { color: var(--text-2); }
.text-sm     { font-size: .85rem; }
.text-xs     { font-size: .78rem; }
.mt-1 { margin-top: .5rem; }  .mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.d-flex { display: flex; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }
.fw-bold { font-weight: 700; }

/* ================================================  RESPONSIVE  ================================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dash-layout { flex-direction: column; }
  .sidebar, .admin-sidebar { width: 100%; height: auto; position: static; border-left: none; border-bottom: 1px solid var(--border); }
  .sidebar-nav { display: flex; flex-wrap: wrap; gap: .25rem; }
  .sidebar-section-label { display: none; }
  .dash-main { padding: 1.25rem; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; padding: 2.5rem 0 1.5rem; }
  .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }
  .hero { padding: 3rem 0 2.5rem; }
  .wizard-steps { flex-direction: column; }
  .wizard-step { border-left: none; border-bottom: 1px solid var(--border); }
  .wizard-step:last-child { border-bottom: none; }
  .form-row { grid-template-columns: 1fr; }
  .type-toggle { gap: .5rem; }
  .profile-header { flex-direction: column; text-align: center; }
  .appt-actions { width: 100%; }
}
@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .auth-box { padding: 1.75rem 1.25rem; }
  .card-body { padding: 1.1rem; }
  .dash-main { padding: 1rem; }
  .hero-stats { gap: 1.5rem; }
}
