:root {
  --color-plum: #4B1D6D;
  --color-plum-dark: #371353;
  --color-plum-light: #F3EBF9;
  --color-royal-blue: #0E437D;
  --color-royal-blue-dark: #092B52;
  --color-navy: #092B52;
  --color-gold: #D97706;
  --color-white: #FFFFFF;
  --color-border: #E2E8F0;
  --color-text: #0F172A;
  --gradient-accent: linear-gradient(135deg, #0E437D 0%, #4B1D6D 100%);
  --gradient-primary: linear-gradient(135deg, #4B1D6D 0%, #0E437D 100%);
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-full: 9999px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-md: 0 6px 12px -2px rgba(0,0,0,0.06), 0 3px 6px -3px rgba(0,0,0,0.03);
  --shadow-glow: 0 10px 30px rgba(75, 29, 109, 0.25);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --container-max: 1600px;
  --container-padding: 2.5rem;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --indigo: #4f46e5;
  --indigo-light: #eef2ff;
  --amber: #d97706;
  --amber-light: #fef3c7;
  --green: #059669;
  --green-light: #d1fae5;
  --red: #dc2626;
  --red-light: #fee2e2;
  --blue: #2563eb;
  --blue-light: #dbeafe;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background-color: var(--slate-100);
  color: var(--slate-800);
  min-height: 100vh;
}

img { max-width: 100%; height: auto; }
a { text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ================= HEADER (GLASS NAVBAR) ================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  transition: all var(--transition-base);
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 0.75rem;
  width: 100%;
  padding: 0 2.5rem;
  margin: 0 auto;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--slate-900);
  flex-shrink: 0;
  min-width: 0;
}

.nav__logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
}

.nav__logo-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--slate-900);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.nav__logo-subtitle {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-royal-blue);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-600);
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav__link:hover { color: var(--slate-900); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.nav__call-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--slate-700);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  background: var(--slate-100);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
  white-space: nowrap;
}

.nav__call-pill:hover { background: var(--slate-200); }

.nav__toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--slate-900);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ================= BUTTONS (PILL STYLE) ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.85rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-base);
  white-space: nowrap;
}

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

.btn--primary {
  background: var(--gradient-accent);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(75, 29, 109, 0.3);
}

.btn--primary:hover {
  box-shadow: 0 8px 24px rgba(75, 29, 109, 0.4);
  color: var(--color-white);
}

.btn--sm {
  padding: 0.55rem 1.25rem;
  font-size: 0.875rem;
}

/* ================= AUTH CONTAINER ================= */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(135deg, #092B52 0%, #4B1D6D 100%);
}

.auth-card {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  border-radius: 24px;
  padding: 40px 32px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.auth-logo-icon {
  width: 44px;
  height: 44px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--slate-900);
  font-family: var(--font-heading);
}

.auth-subtitle {
  font-size: 13px;
  color: var(--slate-500);
  margin-bottom: 28px;
  line-height: 1.5;
}

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--slate-600);
  margin-bottom: 6px;
  font-family: var(--font-heading);
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}

.form-input:focus {
  border-color: var(--color-plum);
  box-shadow: 0 0 0 3px rgba(75, 29, 109, 0.12);
}

.password-wrapper {
  position: relative;
}
.password-wrapper .form-input {
  padding-right: 44px;
}
.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--slate-400);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s;
}
.password-toggle:hover {
  color: var(--slate-600);
}
.password-toggle .hidden {
  display: none;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--gradient-accent);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(75, 29, 109, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(75, 29, 109, 0.35);
}

.auth-toggle {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--slate-500);
}

.auth-toggle a {
  color: var(--color-plum);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.auth-toggle a:hover { text-decoration: underline; }

/* ================= PORTAL LAYOUT ================= */
.portal-layout {
  max-width: 960px;
  margin: 0 auto;
  padding: 100px 20px 40px;
}

.welcome-banner {
  background: linear-gradient(135deg, #092B52 0%, #371353 50%, #4B1D6D 100%);
  color: white;
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: 0 8px 28px rgba(9, 43, 82, 0.2);
}

.welcome-banner h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
  font-family: var(--font-heading);
}

.welcome-banner p {
  opacity: 0.85;
  font-size: 14px;
  line-height: 1.6;
}

/* ================= CARDS ================= */
.card {
  background: white;
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--slate-200);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.card-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--slate-100);
  font-family: var(--font-heading);
}

.card-icon {
  font-size: 20px;
  line-height: 1;
}

.reminder-section {
  border-left: 5px solid var(--color-plum);
  background: linear-gradient(135deg, var(--color-plum-light), #f8fafc);
}

.progress-box {
  background: linear-gradient(135deg, var(--color-plum-light), #ecfdf5);
  border: 1.5px solid var(--slate-200);
  border-radius: 14px;
  padding: 22px;
  color: var(--slate-700);
  font-size: 14.5px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.reminder-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
}

/* ================= APPOINTMENTS ================= */
.appt-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.appt-card {
  border: 1.5px solid var(--slate-200);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
  gap: 16px;
}

.appt-card:hover {
  border-color: var(--color-plum);
  box-shadow: 0 2px 12px rgba(75, 29, 109, 0.08);
}

.appt-card-left { flex: 1; }

.appt-service {
  font-size: 16px;
  font-weight: 700;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.appt-meta {
  font-size: 13px;
  color: var(--slate-500);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.appt-meta strong { color: var(--slate-700); }

.appt-meta code {
  background: var(--slate-100);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--color-plum);
  font-weight: 700;
}

.appt-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ================= BADGES ================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-confirmed { background: var(--green-light); color: #065f46; }
.badge-completed { background: var(--blue-light); color: #1e40af; }
.badge-cancelled { background: var(--red-light); color: #991b1b; }
.badge-pending { background: var(--amber-light); color: #92400e; }
.badge-no-show { background: var(--slate-100); color: #475569; }

/* ================= ACTION BUTTONS ================= */
.btn-join {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-heading);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.btn-join:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-clinic {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: var(--slate-100);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--slate-600);
  white-space: nowrap;
}

.btn-book {
  display: inline-block;
  padding: 10px 20px;
  background: var(--gradient-accent);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 13px;
  font-family: var(--font-heading);
  transition: all 0.2s;
}

.btn-book:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(75, 29, 109, 0.3);
}

/* ================= MODAL ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: #fff;
  border-radius: 24px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 36px 32px 28px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.2);
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--slate-400);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color .2s;
}

.modal-close-btn:hover { color: var(--slate-800); }

/* Appointment Detail */
.appt-detail-header { text-align: center; margin-bottom: 24px; }

.appt-detail-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 6px;
  font-family: var(--font-heading);
}

.appt-detail-ref {
  font-size: 13px;
  color: var(--slate-500);
  font-family: monospace;
  font-weight: 700;
}

.appt-detail-section { margin-bottom: 22px; }

.appt-detail-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--slate-400);
  margin-bottom: 6px;
}

.appt-detail-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--slate-800);
}

/* Status Timeline */
.status-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 20px 0;
  padding-left: 24px;
  position: relative;
}

.status-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--slate-200);
}

.status-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
  position: relative;
}

.status-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-left: -24px;
  z-index: 1;
  border: 2px solid var(--slate-200);
  background: #fff;
}

.status-dot.done {
  background: var(--color-plum);
  border-color: var(--color-plum);
  box-shadow: 0 0 0 4px rgba(75,29,109,0.15);
}

.status-dot.active {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(217,119,6,0.15);
  animation: pulse 1.5s infinite;
}

.status-dot.future {
  background: #fff;
  border-color: var(--slate-200);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(217,119,6,0.15); }
  50% { box-shadow: 0 0 0 8px rgba(217,119,6,0.08); }
}

.status-step-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--slate-800);
  margin: 0;
}

.status-step-info p {
  font-size: 12px;
  color: var(--slate-500);
  margin: 2px 0 0;
}

.appt-detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* ================= POPUP CARD ================= */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.popup-card {
  background: #fff;
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px 28px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  position: relative;
  animation: popIn 0.2s ease-out;
}

.popup-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: var(--slate-100);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  color: var(--slate-500);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  line-height: 1;
}

.popup-close:hover {
  background: var(--slate-200);
  color: var(--slate-800);
}

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

.hidden { display: none !important; }

/* =========================================================
   VIEW TRANSITIONS
   ========================================================= */
.view-enter {
  animation: viewEnter 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.view-exit {
  animation: viewExit 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes viewEnter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes viewExit {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-12px); }
}

/* Button loading state */
.btn-primary.loading {
  pointer-events: none;
  opacity: 0.7;
}
.btn-primary.loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btnSpin 0.6s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes btnSpin {
  to { transform: rotate(360deg); }
}

/* Session restore preloader */
.session-preloader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--slate-100);
  z-index: 9999;
  transition: opacity 0.3s ease;
}
.session-preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}
.session-preloader .spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--slate-200);
  border-top-color: var(--color-plum);
  border-radius: 50%;
  animation: btnSpin 0.7s linear infinite;
}

/* ================= PORTAL TABS ================= */
.portal-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: white;
  padding: 6px;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.portal-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-500);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-heading);
}

.portal-tab:hover { background: var(--slate-50); color: var(--slate-700); }
.portal-tab.active {
  background: var(--color-plum);
  color: white;
  box-shadow: 0 2px 8px rgba(75,29,109,0.3);
}

.portal-tab-panel { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ================= MEDICAL TAGS ================= */
.medical-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.medical-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}
.tag-red {
  background: rgba(220,38,38,0.08);
  color: #dc2626;
  border: 1px solid rgba(220,38,38,0.15);
}
.tag-blue {
  background: rgba(79,70,229,0.08);
  color: #4f46e5;
  border: 1px solid rgba(79,70,229,0.15);
}

/* ================= PROFILE GRID ================= */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ================= FOOTER ================= */
.footer {
  background: linear-gradient(135deg, #092B52 0%, #371353 100%);
  color: #FFFFFF;
  padding: 5rem 0 2rem;
  border-top: 4px solid var(--color-plum);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-brand__desc {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.875rem;
  margin-top: 1rem;
  line-height: 1.7;
}

.footer-column__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover { color: #FFFFFF; }

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .nav__toggle { display: flex; }
  .nav__right {
    position: fixed;
    top: 72px;
    right: 0;
    width: 280px;
    height: calc(100vh - 72px);
    background: white;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px;
    gap: 1.5rem;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }
  .nav__right--open { transform: translateX(0); }
  .nav__list { flex-direction: column; align-items: flex-start; gap: 0; width: 100%; }
  .nav__list li { width: 100%; }
  .nav__link { display: block; padding: 10px 0; font-size: 0.875rem; width: 100%; }
  .nav__actions { flex-direction: column; width: 100%; gap: 0.75rem; }
  .nav__call-pill { width: 100%; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .portal-layout { padding: 84px 14px 40px; }
  .welcome-banner { padding: 24px; }
  .welcome-banner h1 { font-size: 22px; }
  .card { padding: 20px; }
  .appt-card { flex-direction: column; align-items: flex-start; }
  .appt-right { width: 100%; justify-content: flex-end; }
  .portal-tabs { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
}

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
  .nav__inner { padding: 0 1rem; }
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .portal-layout { padding: 72px 10px 24px; }
  .welcome-banner { padding: 16px; border-radius: 14px; }
  .welcome-banner h1 { font-size: 18px; }
  .welcome-banner p { font-size: 12px; }
  .card { padding: 14px; border-radius: 14px; margin-bottom: 16px; }
  .card-title { font-size: 15px; margin-bottom: 12px; padding-bottom: 10px; }
  .appt-card { padding: 12px 14px; border-radius: 12px; gap: 10px; }
  .appt-service { font-size: 14px; }
  .appt-meta { font-size: 11px; gap: 4px; }
  .badge { padding: 3px 8px; font-size: 10px; }
  .btn, .btn-join, .btn-book, .btn-primary { min-height: 44px; min-width: 44px; padding: 10px 14px; font-size: 13px; }
  .portal-tab { padding: 8px 10px; font-size: 11px; }
  .modal-content { padding: 20px 16px 16px; border-radius: 16px; max-height: 90vh; }
  .modal-close-btn { top: 10px; right: 14px; font-size: 24px; width: 36px; height: 36px; }
  .form-input { padding: 10px 12px; font-size: 14px; }
  .form-label { font-size: 11px; }
  .btn-primary { padding: 12px 14px; font-size: 14px; }
  .auth-card { padding: 20px 16px; border-radius: 16px; }
  .auth-title { font-size: 20px; }
  .nav__right { top: 56px; }
  .nav__logo img { height: 32px !important; }
  .nav__logo-title { font-size: 0.85rem !important; }
  .footer { padding: 2rem 0 1rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .profile-grid { grid-template-columns: 1fr; gap: 10px; }
  .status-timeline { padding-left: 20px; }
  .status-step { gap: 10px; padding: 6px 0; }
  .status-dot { width: 14px; height: 14px; margin-left: -20px; }
  .appt-detail-actions { flex-direction: column; }
  .appt-detail-actions .btn { width: 100%; justify-content: center; }
  .reminder-card { padding: 12px; }
  .progress-box { padding: 16px; font-size: 13px; }
}
