/* ═══════════════════════════════════════════════════════════════
   PhysioOps Patient Portal — Design System
   "Clinical Warmth" — Dark navy + teal + amber
   Font: Nunito (rounded, friendly, modern health)
═══════════════════════════════════════════════════════════════ */

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

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --navy:        #1a2540;
  --navy-light:  #263561;
  --teal:        #00b4a6;
  --teal-10:     rgba(0,180,166,.10);
  --teal-20:     rgba(0,180,166,.20);
  --amber:       #f59e0b;
  --amber-10:    rgba(245,158,11,.10);
  --green:       #10b981;
  --red:         #ef4444;
  --bg:          #eef0f5;
  --surface:     #ffffff;
  --border:      rgba(0,0,0,.08);
  --text:        #1a2540;
  --muted:       #8b93ad;
  --radius-sm:   10px;
  --radius:      16px;
  --radius-lg:   22px;
  --shadow:      0 4px 24px rgba(26,37,64,.10);
  --shadow-sm:   0 2px 10px rgba(26,37,64,.07);
  --header-h:    64px;
  --nav-h:       68px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 0.92rem;
  overscroll-behavior: none;
}

a { color: inherit; }

/* ── Header ─────────────────────────────────────────────────── */
.portal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--navy);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,.25);
}

.portal-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .85;
  flex-shrink: 0;
}

/* Dual-logo wrapper in portal header */
.portal-logos-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.portal-logo-img {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(255,255,255,0.92);
  border-radius: 6px;
  padding: 3px;
}
.portal-logo-img.no-bg {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.portal-header-text { flex: 1; min-width: 0; }
.portal-header-name {
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.portal-header-sub {
  color: rgba(255,255,255,.5);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .03em;
}

/* Language strip inside header */
.lang-strip {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.lang-btn {
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  text-decoration: none;
  color: rgba(255,255,255,.45);
  transition: all .2s;
  letter-spacing: .02em;
}
.lang-btn.active { background: var(--teal-20); color: var(--teal); }
.lang-btn:hover:not(.active) { color: rgba(255,255,255,.8); }

/* Patient avatar in header */
.header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0,180,166,.5);
  flex-shrink: 0;
  background: var(--navy-light);
}
.header-avatar-placeholder {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.15);
  background: var(--navy-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.4);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ── Content Area ────────────────────────────────────────────── */
.portal-content {
  padding: 16px 16px calc(var(--nav-h) + 20px);
  max-width: 600px;
  margin: 0 auto;
  animation: fadeUp .28s ease both;
}

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

/* ── Bottom Navigation ───────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  z-index: 200;
  box-shadow: 0 -4px 24px rgba(0,0,0,.08);
  /* safe area for notch phones */
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--muted);
  font-size: .6rem;
  font-weight: 700;
  padding: 8px 4px;
  transition: color .2s;
  letter-spacing: .02em;
  text-transform: uppercase;
  position: relative;
}

.bnav-item i { font-size: 1.3rem; transition: transform .2s; }

.bnav-item.active { color: var(--teal); }
.bnav-item.active i { transform: scale(1.12); }
.bnav-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 3px;
  background: var(--teal);
  border-radius: 0 0 4px 4px;
}

/* ── Cards ──────────────────────────────────────────────────── */
.p-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 14px;
}

.p-card-header {
  padding: 11px 16px 10px;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}
.p-card-header i { font-size: .9rem; }

.p-card-body { padding: 0; }

/* ── Section Title ────────────────────────────────────────────── */
.section-title {
  font-size: .67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Welcome Banner ──────────────────────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, var(--navy) 0%, #1f3269 100%);
  border-radius: var(--radius-lg);
  padding: 20px 20px 20px 20px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
/* Decorative circles */
.welcome-banner::before {
  content: '';
  position: absolute;
  right: -25px; top: -35px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.welcome-banner::after {
  content: '';
  position: absolute;
  right: 20px; bottom: -50px;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: var(--teal-20);
}

.welcome-photo {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(0,180,166,.45);
  object-fit: cover;
  flex-shrink: 0;
  z-index: 1;
}
.welcome-no-photo {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255,255,255,.45);
  flex-shrink: 0;
  z-index: 1;
}
.welcome-text { z-index: 1; }
.welcome-name {
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1.1;
}
.welcome-sub {
  font-size: .75rem;
  opacity: .65;
  margin-top: 4px;
  font-weight: 600;
}
.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--teal-20);
  color: var(--teal);
  border-radius: 20px;
  padding: 2px 9px;
  font-size: .65rem;
  font-weight: 800;
  margin-top: 8px;
  letter-spacing: .02em;
}

/* ── Quick Actions ───────────────────────────────────────────── */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.quick-action {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 14px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
  color: var(--text);
}
.quick-action:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--text); }
.quick-action-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.quick-action-label {
  font-weight: 700;
  font-size: .82rem;
  line-height: 1.2;
}

/* ── Appointment Cards ───────────────────────────────────────── */
.appt-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.appt-row:last-child { border-bottom: none; }

.appt-date-box {
  width: 46px; height: 46px;
  background: var(--teal-10);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.appt-date-box .ad-day { font-size: 1.2rem; font-weight: 900; color: var(--teal); line-height: 1; }
.appt-date-box .ad-mon {
  font-size: .5rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--teal);
  letter-spacing: .05em;
}

.appt-info { flex: 1; min-width: 0; }
.appt-time { font-weight: 700; font-size: .9rem; }
.appt-meta { font-size: .72rem; color: var(--muted); font-weight: 600; }

.status-pill {
  font-size: .62rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: .02em;
}
.s-SCHEDULED   { background: #dbeafe; color: #1e40af; }
.s-DONE        { background: #d1fae5; color: #065f46; }
.s-INVOICED    { background: #e0f2fe; color: #0369a1; }
.s-PAID        { background: #d1fae5; color: #065f46; }
.s-LATE_CANCEL { background: #fee2e2; color: #991b1b; }
.s-CANCELLED   { background: #f3f4f6; color: #6b7280; }

/* ── PRO Alert ───────────────────────────────────────────────── */
.form-alert {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1.5px solid rgba(245,158,11,.4);
  border-radius: var(--radius);
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--text);
  transition: transform .15s;
}
.form-alert:hover { transform: translateY(-1px); color: var(--text); }
.form-alert-icon {
  width: 40px; height: 40px;
  background: var(--amber);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.form-alert-label { font-weight: 700; font-size: .88rem; }
.form-alert-sub   { font-size: .72rem; color: var(--muted); font-weight: 600; }

/* ── Exercise Cards ──────────────────────────────────────────── */
.exercise-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 14px;
}
.exercise-card-head {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.exercise-icon-wrap {
  width: 46px; height: 46px;
  background: var(--teal-20);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--teal);
  flex-shrink: 0;
}
.exercise-title  { color: #fff; font-weight: 800; font-size: 1rem; line-height: 1.2; }
.exercise-meta   { color: rgba(255,255,255,.55); font-size: .72rem; font-weight: 600; margin-top: 3px; }

.exercise-body { padding: 16px; }

.exercise-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.ex-stat {
  flex: 1;
  background: var(--bg);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}
.ex-stat .val { font-size: 1.3rem; font-weight: 900; color: var(--teal); line-height: 1; }
.ex-stat .lbl { font-size: .58rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 3px; }

.ex-description {
  font-size: .85rem;
  color: #555;
  margin-bottom: 12px;
  line-height: 1.5;
}

.ex-steps { list-style: none; }
.ex-step {
  display: flex;
  gap: 11px;
  padding: 7px 0;
  font-size: .85rem;
  line-height: 1.45;
  border-bottom: 1px solid var(--border);
}
.ex-step:last-child { border-bottom: none; }
.ex-step-num {
  width: 24px; height: 24px;
  background: var(--teal-10);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 900;
  color: var(--teal);
  flex-shrink: 0;
  margin-top: 1px;
}

.video-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 14px;
  aspect-ratio: 16/9;
  background: #000;
}
.video-wrap iframe { width: 100%; height: 100%; border: none; }

.ex-note {
  background: var(--amber-10);
  border-left: 3px solid var(--amber);
  border-radius: 0 10px 10px 0;
  padding: 10px 13px;
  font-size: .82rem;
  margin-top: 12px;
  color: #7c5e00;
  font-weight: 600;
}

/* ── Feedback Page ───────────────────────────────────────────── */
.feedback-hero {
  background: linear-gradient(150deg, var(--navy) 0%, #0f3460 100%);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.feedback-hero::before {
  content: '★';
  position: absolute;
  font-size: 160px;
  opacity: .035;
  right: -30px; top: -20px;
  line-height: 1;
}
.feedback-hero-title {
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 6px;
}
.feedback-hero-sub {
  font-size: .82rem;
  opacity: .7;
  font-weight: 600;
  margin-bottom: 18px;
}
.feedback-stars {
  display: flex;
  justify-content: center;
  gap: 6px;
  font-size: 2.4rem;
  margin-bottom: 20px;
}
.feedback-star {
  cursor: pointer;
  transition: transform .15s;
  animation: starPop .5s ease both;
}
.feedback-star:hover { transform: scale(1.25); }
.feedback-star:nth-child(1) { animation-delay: .05s; color: #fcd34d; }
.feedback-star:nth-child(2) { animation-delay: .10s; color: #fcd34d; }
.feedback-star:nth-child(3) { animation-delay: .15s; color: #fcd34d; }
.feedback-star:nth-child(4) { animation-delay: .20s; color: #fcd34d; }
.feedback-star:nth-child(5) { animation-delay: .25s; color: #fcd34d; }
@keyframes starPop {
  0%   { opacity: 0; transform: scale(.5) rotate(-20deg); }
  80%  { transform: scale(1.2) rotate(5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

.google-review-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  transition: transform .15s, box-shadow .2s;
}
.google-review-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 36px rgba(0,0,0,.14); color: var(--text); }
.google-logo {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  flex-shrink: 0;
}
.google-btn-text { flex: 1; }
.google-btn-title { font-size: .95rem; font-weight: 800; }
.google-btn-sub   { font-size: .72rem; color: var(--muted); font-weight: 600; margin-top: 2px; }

/* ── Profile / Account Page ──────────────────────────────────── */
.profile-photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 16px;
}
.profile-photo {
  width: 88px; height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--teal);
  box-shadow: 0 4px 20px rgba(0,180,166,.25);
}
.profile-no-photo {
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 4px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  color: var(--muted);
}
.profile-name {
  font-size: 1.2rem;
  font-weight: 900;
  margin-top: 12px;
}
.profile-sub {
  font-size: .78rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 3px;
}

.account-link {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.account-link:last-child { border-bottom: none; }
.account-link:hover { background: var(--bg); color: var(--text); }
.account-link-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.account-link-label { font-weight: 700; font-size: .88rem; }
.account-link-sub   { font-size: .7rem; color: var(--muted); font-weight: 600; }
.account-link-arr   { margin-left: auto; color: var(--muted); font-size: .8rem; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-teal {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--teal);
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: .88rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, transform .15s;
}
.btn-teal:hover { background: #009d91; color: #fff; transform: translateY(-1px); }
.btn-teal.w-full { width: 100%; justify-content: center; }

.btn-amber {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--amber);
  color: #fff;
  border: none;
  padding: 13px 24px;
  border-radius: 12px;
  font-weight: 800;
  font-size: .95rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, transform .15s;
  width: 100%;
  justify-content: center;
}
.btn-amber:hover { background: #d97706; color: #fff; transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: var(--teal);
  border: 1.5px solid var(--teal);
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: .88rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  width: 100%;
  justify-content: center;
}
.btn-ghost:hover { background: var(--teal-10); color: var(--teal); }

/* ── Info Rows (profile details) ─────────────────────────────── */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--muted); font-weight: 600; flex-shrink: 0; margin-right: 12px; }
.info-value { font-weight: 700; text-align: right; }

/* ── Progress Page ───────────────────────────────────────────── */
.progress-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.progress-empty i { font-size: 3rem; opacity: .3; }
.progress-empty p { margin-top: 12px; font-size: .88rem; font-weight: 600; line-height: 1.5; }

/* ── Forms Page ──────────────────────────────────────────────── */
.completed-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.completed-row:last-child { border-bottom: none; }
.completed-name  { font-weight: 700; font-size: .88rem; }
.completed-date  { font-size: .72rem; color: var(--muted); font-weight: 600; }
.score-badge {
  background: var(--navy);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
}

/* ── Invoices ────────────────────────────────────────────────── */
.invoice-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.invoice-row:last-child { border-bottom: none; }
.invoice-num {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.inv-PAID     { background: #d1fae5; color: var(--green); }
.inv-SENT     { background: #dbeafe; color: #1e40af; }
.inv-OVERDUE  { background: #fee2e2; color: var(--red); }
.inv-DRAFT    { background: #f3f4f6; color: #6b7280; }
.inv-PARTIAL  { background: var(--amber-10); color: #92400e; }
.inv-CANCELLED{ background: #f3f4f6; color: #6b7280; }
.invoice-info { flex: 1; }
.invoice-date { font-size: .72rem; color: var(--muted); font-weight: 600; }
.invoice-amount { font-size: 1rem; font-weight: 800; }
.invoice-due { font-size: .7rem; color: var(--muted); }

/* ── Book Page ───────────────────────────────────────────────── */
.slot-day { margin-bottom: 16px; }
.slot-day-label {
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.slot-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.slot-btn {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-weight: 700;
  font-size: .82rem;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
  color: var(--text);
}
.slot-btn:hover   { border-color: var(--teal); background: var(--teal-10); color: var(--teal); }
.slot-btn.selected { border-color: var(--teal); background: var(--teal); color: #fff; }

/* ── Login / Set Password ────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(160deg, var(--navy) 0%, #0f1e40 60%, #162a50 100%);
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
  overflow: hidden;
}
.auth-header {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  padding: 28px 28px 24px;
  text-align: center;
}
.auth-logo {
  width: 64px !important; height: 64px !important;
  max-width: 64px !important; max-height: 64px !important;
  object-fit: contain;
  background: #fff;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  margin-bottom: 12px;
  display: block;
  flex-shrink: 0;
}

/* Dual-logo wrapper in auth card */
.auth-logos-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}
.auth-logo-img {
  width: 64px !important; height: 64px !important;
  max-width: 64px !important; max-height: 64px !important;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  display: block;
  flex-shrink: 0;
}
.auth-title {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 900;
}
.auth-subtitle {
  color: rgba(255,255,255,.6);
  font-size: .78rem;
  font-weight: 600;
  margin-top: 4px;
}
.auth-body { padding: 28px; }

.auth-field { margin-bottom: 18px; }
.auth-label {
  display: block;
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 6px;
}
.auth-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.auth-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-10);
  background: var(--surface);
}
.auth-error {
  background: #fee2e2;
  color: #991b1b;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-hint {
  text-align: center;
  font-size: .75rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 16px;
}

/* ── Documents ───────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--teal);
  background: var(--teal-10);
}
.upload-icon { font-size: 2.5rem; color: var(--muted); opacity: .5; margin-bottom: 10px; }
.upload-label { font-weight: 700; font-size: .9rem; }
.upload-sub   { font-size: .75rem; color: var(--muted); font-weight: 600; margin-top: 4px; }

/* ── Empty States ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 36px 24px;
  color: var(--muted);
}
.empty-state i  { font-size: 2.8rem; opacity: .25; }
.empty-state p  { margin-top: 10px; font-size: .85rem; font-weight: 600; }

/* ── Alert ───────────────────────────────────────────────────── */
.p-alert {
  padding: 12px 15px;
  border-radius: 12px;
  font-size: .82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
}
.p-alert-warn { background: #fef3c7; color: #92400e; border: 1px solid rgba(245,158,11,.3); }
.p-alert-ok   { background: #d1fae5; color: #065f46; border: 1px solid rgba(16,185,129,.3); }
.p-alert-err  { background: #fee2e2; color: #991b1b; border: 1px solid rgba(239,68,68,.3); }

/* ── Utility ─────────────────────────────────────────────────── */
.text-teal   { color: var(--teal); }
.text-amber  { color: var(--amber); }
.text-muted  { color: var(--muted) !important; }
.fw-700      { font-weight: 700; }
.fw-800      { font-weight: 800; }
.fw-900      { font-weight: 900; }
.mt-14       { margin-top: 14px; }
.mb-14       { margin-bottom: 14px; }

/* ── Scrollbar (desktop) ─────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

/* ── HRV Recording ───────────────────────────────────────────── */
.hrv-live-hr-card {
  background: var(--navy);
  color: #fff;
  border-radius: 18px;
  padding: 24px 16px 16px;
  text-align: center;
  margin-bottom: 4px;
}
.hrv-live-hr-value {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  color: #fff;
}
.hrv-live-hr-label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  margin-top: 2px;
}
.hrv-live-rmssd {
  font-size: .8rem;
  font-weight: 700;
  color: var(--teal);
  margin-top: 6px;
}

.hrv-progress-wrap { padding: 0 4px; }
.hrv-progress-bar  { height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; }
.hrv-progress-fill { height: 100%; background: var(--teal); border-radius: 99px; transition: width .5s linear; }

.hrv-phase-banner {
  background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 100%);
  color: #fff;
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: .85rem;
}
.hrv-change-toast {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid rgba(245,158,11,.4);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: .78rem;
  font-weight: 600;
  margin-bottom: 8px;
}

/* ── HRV History list ────────────────────────────────────────── */
.hrv-metric-row {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}
.hrv-metric-cell {
  flex: 1;
  text-align: center;
}
.hrv-metric-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 1px;
}
.hrv-metric-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
}
.hrv-metric-unit {
  font-size: .65rem;
  font-weight: 600;
  color: var(--muted);
}
.hrv-red   { color: var(--red); }
.hrv-amber { color: var(--amber); }
.hrv-green { color: #10b981; }

/* ── Portal button additions ─────────────────────────────────── */
.btn-portal-danger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--red, #ef4444);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 14px 22px;
  font-size: .9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}
.btn-portal-danger:hover { opacity: .92; }

.btn-portal-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
  border-radius: 14px;
  padding: 12px 22px;
  font-size: .9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}
.btn-portal-outline:hover { background: rgba(26,37,64,.05); }

.portal-radio-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
}
.portal-radio-row input { accent-color: var(--teal); }

.portal-select {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
}

.btn-back {
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 5px 10px;
  color: var(--navy);
  text-decoration: none;
  font-size: .9rem;
}
.badge-pill { border-radius: 99px; padding: 2px 8px; font-size: .65rem; font-weight: 700; }
.badge-teal { background: rgba(0,180,166,.15); color: var(--teal); }
.badge-navy { background: rgba(26,37,64,.12); color: var(--navy); }
