/* ═══════════════════════════════════════════════════════════════
   مدار الصحة — Design System
   Aesthetic: Refined Medical Elegance | Deep Teal + Warm Cream
═══════════════════════════════════════════════════════════════ */

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

:root {
  /* Palette */
  --primary:        #0d5c73;
  --primary-light:  #1a8fa8;
  --primary-dark:   #083d4f;
  --accent:         #2ec4b6;
  --accent-warm:    #e8c547;
  --danger:         #e05c5c;
  --success:        #3cba8a;
  --warning:        #f5a623;

  /* Neutrals */
  --bg:             #f4f7f9;
  --bg-card:        #ffffff;
  --bg-section:     #eef3f7;
  --text-primary:   #1a2b35;
  --text-secondary: #4a6572;
  --text-muted:     #8fa3ae;
  --border:         #d8e6ec;

  /* Gradients */
  --grad-primary:   linear-gradient(135deg, #0d5c73 0%, #1a8fa8 50%, #2ec4b6 100%);
  --grad-card:      linear-gradient(145deg, #ffffff 0%, #f0f8fb 100%);
  --grad-hero:      linear-gradient(135deg, #083d4f 0%, #0d5c73 40%, #1a8fa8 75%, #2ec4b6 100%);

  /* Spacing */
  --radius:         14px;
  --radius-lg:      22px;
  --shadow-sm:      0 2px 12px rgba(13,92,115,0.08);
  --shadow-md:      0 6px 28px rgba(13,92,115,0.14);
  --shadow-lg:      0 16px 48px rgba(13,92,115,0.18);
  --shadow-glow:    0 0 30px rgba(46,196,182,0.25);

  /* Transitions */
  --trans:          all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  direction: rtl;
}

body {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-section); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 3px; }

/* ════════════════════════════════════════
   NAVIGATION
════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(8, 61, 79, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(46,196,182,0.2);
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--trans);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
}

.nav-logo .logo-icon {
  width: 42px; height: 42px;
  background: var(--grad-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-glow);
}

.nav-logo .logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.nav-logo .logo-sub {
  font-size: 11px;
  opacity: 0.7;
  font-weight: 300;
  display: block;
  margin-top: -4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: var(--trans);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a:hover, .nav-links a.active {
  background: rgba(46,196,182,0.15);
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-nav-login {
  padding: 8px 20px;
  border: 1px solid rgba(46,196,182,0.5);
  background: transparent;
  color: var(--accent);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: var(--trans);
}

.btn-nav-login:hover {
  background: rgba(46,196,182,0.15);
}

.btn-nav-register {
  padding: 8px 20px;
  background: var(--accent);
  color: var(--primary-dark);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  transition: var(--trans);
}

.btn-nav-register:hover {
  background: #25a99d;
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  width: 24px; height: 2px;
  background: white;
  border-radius: 2px;
  transition: var(--trans);
}

/* ════════════════════════════════════════
   HERO SECTION
════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  background: var(--grad-hero);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 100px 24px 60px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(46,196,182,0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse-glow 4s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(232,197,71,0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse-glow 6s ease-in-out infinite reverse;
}

.hero-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-content .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(46,196,182,0.15);
  border: 1px solid rgba(46,196,182,0.3);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  animation: fadeInDown 0.6s ease;
}

.hero-title {
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 900;
  color: white;
  line-height: 1.15;
  margin-bottom: 20px;
  animation: fadeInUp 0.7s ease 0.1s both;
}

.hero-title .highlight {
  color: var(--accent);
  position: relative;
}

.hero-desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 36px;
  line-height: 1.8;
  font-weight: 300;
  animation: fadeInUp 0.7s ease 0.2s both;
}

.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s ease 0.3s both;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
  animation: fadeInUp 0.7s ease 0.4s both;
}

.hero-stat {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.hero-stat .num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
}

.hero-stat .label {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  font-weight: 400;
}

.hero-visual {
  position: relative;
  animation: fadeInRight 0.8s ease 0.2s both;
}

.hero-card-float {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: white;
}

.glucose-display {
  text-align: center;
  padding: 20px;
  background: rgba(46,196,182,0.1);
  border-radius: var(--radius);
  margin-bottom: 20px;
  border: 1px solid rgba(46,196,182,0.2);
}

.glucose-display .g-num {
  font-size: 4rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}

.glucose-display .g-unit {
  font-size: 14px;
  opacity: 0.7;
  margin-top: 4px;
}

.glucose-display .g-status {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 14px;
  background: rgba(60,186,138,0.2);
  color: #3cba8a;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
}

.mini-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mini-metric {
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 14px;
}

.mini-metric .mm-label {
  font-size: 11px;
  opacity: 0.6;
  display: block;
}

.mini-metric .mm-val {
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  display: block;
  margin-top: 4px;
}

/* ════════════════════════════════════════
   BUTTONS
════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  border: 2px solid transparent;
  transition: var(--trans);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
}

.btn-primary:hover {
  background: #25a99d;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(46,196,182,0.4);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.4);
  color: white;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: white;
  transform: translateY(-2px);
}

.btn-solid {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-solid:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.btn-success {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 17px; }
.btn-block { width: 100%; }

/* ════════════════════════════════════════
   SECTIONS & CARDS
════════════════════════════════════════ */
.section {
  padding: 80px 24px;
}

.section-alt {
  background: var(--bg-section);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(13,92,115,0.08);
  color: var(--primary);
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 14px;
}

.section-title span { color: var(--primary); }

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  font-weight: 300;
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--trans);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: rgba(13,92,115,0.2);
}

.card-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
}

.card-icon.teal { background: rgba(46,196,182,0.12); }
.card-icon.blue { background: rgba(13,92,115,0.1); }
.card-icon.green { background: rgba(60,186,138,0.12); }
.card-icon.orange { background: rgba(245,166,35,0.12); }
.card-icon.red { background: rgba(224,92,92,0.12); }

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.card-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ════════════════════════════════════════
   FORMS
════════════════════════════════════════ */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  background: white;
  color: var(--text-primary);
  transition: var(--trans);
  direction: rtl;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(13,92,115,0.08);
}

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

select.form-control { appearance: none; }

/* ════════════════════════════════════════
   AUTH PAGES
════════════════════════════════════════ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-hero);
  padding: 100px 24px 40px;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(46,196,182,0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.auth-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 44px;
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
  animation: fadeInUp 0.6s ease;
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo .al-icon {
  width: 64px; height: 64px;
  background: var(--grad-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 14px;
  box-shadow: var(--shadow-glow);
}

.auth-logo h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
}

.auth-logo p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-switch a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}

/* ════════════════════════════════════════
   DASHBOARD
════════════════════════════════════════ */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  padding-top: 70px;
}

.sidebar {
  background: var(--primary-dark);
  padding: 28px 16px;
  position: fixed;
  top: 70px;
  right: 0;
  width: 260px;
  height: calc(100vh - 70px);
  overflow-y: auto;
  border-left: 1px solid rgba(46,196,182,0.15);
}

.sidebar-user {
  text-align: center;
  padding: 20px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius);
  margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.08);
}

.user-avatar {
  width: 60px; height: 60px;
  background: var(--grad-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 12px;
  box-shadow: var(--shadow-glow);
}

.sidebar-user .su-name {
  font-size: 16px;
  font-weight: 700;
  color: white;
}

.sidebar-user .su-level {
  font-size: 12px;
  color: var(--accent);
  margin-top: 4px;
}

.points-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(232,197,71,0.15);
  color: var(--accent-warm);
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
}

.sidebar-nav { list-style: none; }

.sidebar-nav li { margin-bottom: 4px; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255,255,255,0.7);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  transition: var(--trans);
}

.sidebar-nav a:hover, .sidebar-nav a.active {
  background: rgba(46,196,182,0.15);
  color: var(--accent);
}

.sidebar-nav .nav-icon { font-size: 18px; min-width: 22px; }

.sidebar-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.3);
  padding: 14px 16px 6px;
  font-weight: 600;
}

.main-content {
  margin-right: 260px;
  padding: 32px 28px;
}

.page-header {
  margin-bottom: 32px;
}

.page-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Dashboard stat cards */
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--trans);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-info .s-val {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-info .s-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-info .s-change {
  font-size: 12px;
  margin-top: 6px;
  font-weight: 600;
}

.change-up { color: var(--danger); }
.change-down { color: var(--success); }
.change-ok { color: var(--success); }

/* Alert banners */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
}

.alert-danger { background: rgba(224,92,92,0.1); color: #c0392b; border: 1px solid rgba(224,92,92,0.25); }
.alert-success { background: rgba(60,186,138,0.1); color: #27ae60; border: 1px solid rgba(60,186,138,0.25); }
.alert-warning { background: rgba(245,166,35,0.1); color: #d68910; border: 1px solid rgba(245,166,35,0.25); }
.alert-info { background: rgba(13,92,115,0.08); color: var(--primary); border: 1px solid rgba(13,92,115,0.15); }

/* ════════════════════════════════════════
   CHARTS
════════════════════════════════════════ */
.chart-container {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.chart-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ════════════════════════════════════════
   TABLES
════════════════════════════════════════ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  background: var(--bg-section);
  padding: 12px 16px;
  text-align: right;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 13px;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-section); }

/* ════════════════════════════════════════
   BADGES & STATUS
════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
}

.badge-normal { background: rgba(60,186,138,0.12); color: var(--success); }
.badge-high { background: rgba(224,92,92,0.12); color: var(--danger); }
.badge-low { background: rgba(245,166,35,0.12); color: var(--warning); }

/* ════════════════════════════════════════
   CHATBOT
════════════════════════════════════════ */
.chatbot-fab {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 58px; height: 58px;
  background: var(--grad-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  z-index: 999;
  transition: var(--trans);
  border: none;
  color: white;
}

.chatbot-fab:hover {
  transform: scale(1.1) rotate(10deg);
}

.chatbot-panel {
  position: fixed;
  bottom: 100px;
  left: 28px;
  width: 340px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 998;
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  animation: slideUp 0.3s ease;
}

.chatbot-panel.open { display: flex; }

.chat-header {
  background: var(--grad-primary);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
}

.chat-avatar {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.chat-header .ch-name { font-weight: 700; font-size: 15px; }
.chat-header .ch-status { font-size: 12px; opacity: 0.8; }

.close-chat {
  margin-right: auto;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 20px;
  cursor: pointer;
  transition: var(--trans);
  padding: 4px;
}

.chat-messages {
  flex: 1;
  max-height: 300px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.msg-bot {
  background: var(--bg-section);
  color: var(--text-primary);
  border-radius: 4px 12px 12px 12px;
  align-self: flex-start;
}

.msg-user {
  background: var(--primary);
  color: white;
  border-radius: 12px 4px 12px 12px;
  align-self: flex-end;
}

.chat-quick-btns {
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid var(--border);
}

.quick-btn {
  padding: 5px 11px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  transition: var(--trans);
}

.quick-btn:hover { background: rgba(13,92,115,0.08); }

.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  direction: rtl;
  transition: var(--trans);
}

.chat-input:focus {
  outline: none;
  border-color: var(--primary-light);
}

.send-btn {
  width: 40px; height: 40px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--trans);
}

.send-btn:hover { background: var(--primary-light); }

/* ════════════════════════════════════════
   NOTIFICATIONS
════════════════════════════════════════ */
.notification-toast {
  position: fixed;
  top: 88px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: white;
  border-radius: var(--radius);
  padding: 14px 22px;
  box-shadow: var(--shadow-lg);
  border-right: 4px solid var(--success);
  z-index: 2000;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: all 0.4s ease;
  min-width: 280px;
  justify-content: center;
}

.notification-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.notification-toast.danger { border-right-color: var(--danger); }
.notification-toast.warning { border-right-color: var(--warning); }

/* ════════════════════════════════════════
   BMI INDICATOR
════════════════════════════════════════ */
.bmi-bar {
  height: 12px;
  background: linear-gradient(to left, #e05c5c 0%, #f5a623 30%, #3cba8a 50%, #f5a623 70%, #e05c5c 100%);
  border-radius: 6px;
  position: relative;
  margin: 16px 0;
}

.bmi-pointer {
  position: absolute;
  top: -4px;
  width: 20px; height: 20px;
  background: white;
  border: 3px solid var(--primary);
  border-radius: 50%;
  transform: translateX(50%);
  transition: left 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-sm);
}

.bmi-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

/* ════════════════════════════════════════
   RISK TEST
════════════════════════════════════════ */
.risk-question {
  background: white;
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  border: 2px solid var(--border);
  transition: var(--trans);
}

.risk-question.answered { border-color: var(--accent); }

.risk-q-text {
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.risk-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.risk-opt {
  padding: 8px 18px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  cursor: pointer;
  font-size: 14px;
  transition: var(--trans);
  background: white;
  font-family: inherit;
  color: var(--text-primary);
}

.risk-opt:hover { border-color: var(--primary-light); color: var(--primary); }
.risk-opt.selected { background: var(--primary); color: white; border-color: var(--primary); }

.risk-result {
  background: var(--grad-primary);
  color: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  display: none;
  animation: fadeInUp 0.5s ease;
}

.risk-result.show { display: block; }

.risk-score {
  font-size: 4rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}

.risk-level {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 8px;
}

/* ════════════════════════════════════════
   DIET & WORKOUT CARDS
════════════════════════════════════════ */
.meal-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  transition: var(--trans);
}

.meal-card:hover { box-shadow: var(--shadow-sm); }

.meal-time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 15px;
}

.meal-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
  color: var(--text-secondary);
}

.meal-item:last-child { border-bottom: none; }

.macros {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.macro-pill {
  flex: 1;
  text-align: center;
  padding: 6px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.macro-p { background: rgba(60,186,138,0.1); color: var(--success); }
.macro-c { background: rgba(13,92,115,0.08); color: var(--primary); }
.macro-f { background: rgba(245,166,35,0.1); color: var(--warning); }

.exercise-card {
  background: white;
  border-radius: var(--radius);
  padding: 18px 20px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--trans);
}

.exercise-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: rgba(13,92,115,0.2);
}

.ex-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(13,92,115,0.08);
  flex-shrink: 0;
}

.ex-info .ex-name { font-weight: 700; font-size: 15px; }
.ex-info .ex-details { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

.ex-duration {
  margin-right: auto;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(13,92,115,0.08);
  padding: 5px 12px;
  border-radius: 50px;
}

/* ════════════════════════════════════════
   HOSPITAL CONTACTS
════════════════════════════════════════ */
.hospital-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: var(--trans);
}

.hospital-card:hover { box-shadow: var(--shadow-sm); }

.hosp-icon {
  width: 46px; height: 46px;
  background: rgba(13,92,115,0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.hosp-name { font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.hosp-phone { color: var(--primary-light); font-size: 14px; font-weight: 600; }
.hosp-location { color: var(--text-muted); font-size: 13px; margin-top: 2px; }

/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 52px 24px 28px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .fb-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: white;
  margin-bottom: 10px;
}

.footer-brand p {
  font-size: 14px;
  opacity: 0.65;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: white;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 8px;
  transition: var(--trans);
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  opacity: 0.55;
}

/* ════════════════════════════════════════
   ANIMATIONS
════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

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

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes spin { to { transform: rotate(360deg); } }

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Loading */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ════════════════════════════════════════
   TABS
════════════════════════════════════════ */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-section);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 24px;
}

.tab-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--trans);
  font-family: inherit;
}

.tab-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeInUp 0.3s ease; }

/* ════════════════════════════════════════
   PROGRESS BAR
════════════════════════════════════════ */
.progress-bar {
  height: 8px;
  background: var(--bg-section);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--grad-primary);
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-content { margin-right: 0; }
}

@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .auth-box { padding: 28px 22px; }
  .footer-grid { grid-template-columns: 1fr; }
  .chatbot-panel { width: calc(100vw - 40px); left: 20px; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; }
  .btn { justify-content: center; }
}
