/*
 * portal.css — Muladhara Wellness Client Portal
 * v8 — No burger/drawer. Bottom nav only. Planner, Packages tabs.
 * No external dependencies.
 */

/* ═══════════════════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════════════════ */
:root {
  /* Brand */
  --crimson:    #b70d13;
  --crimson-d:  #8a0a0f;
  --crimson-s:  rgba(183,13,19,.07);
  --crimson-s2: rgba(183,13,19,.14);
  --gold:       #c8973a;
  --gold-s:     rgba(200,151,58,.12);
  --gold-d:     #a87828;

  /* Status */
  --green:   #16a34a;  --green-s:  rgba(22,163,74,.10);
  --amber:   #d97706;  --amber-s:  rgba(217,119,6,.10);
  --blue:    #2563eb;  --blue-s:   rgba(37,99,235,.10);
  --red:     #dc2626;  --red-s:    rgba(220,38,38,.10);

  /* Warm surfaces */
  --cream:       #faf8f5;
  --cream2:      #f4f1ec;
  --cream3:      #ede9e2;
  --warm-white:  #ffffff;
  --charcoal:    #1a1a1a;
  --text:        #2c2825;
  --text2:       #4a4540;
  --text3:       #8a8480;
  --stone:       #6b6560;
  --border:      #e8e2da;
  --border2:     #d8d0c8;

  /* Typography */
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, serif;

  /* Surfaces (used in dashboard + component cards) */
  --surface:  #ffffff;
  --surface2: var(--cream2);

  /* Layout — rem so they scale with user font preferences */
  --topbar-h:      3.75rem;   /* 60px @ 16px base */
  --sidebar-w:     15rem;     /* 240px */
  --bottom-nav-h:  4.5rem;    /* 72px — comfortable touch target */
  --page-max:      40rem;     /* ~640px */
  --page-max-wide: 60rem;     /* ~960px */

  /* Shape — rem scales with base font */
  --r-xs: 0.375rem;  /* ~6px  */
  --r-sm: 0.625rem;  /* ~10px */
  --r:    0.875rem;  /* ~14px */
  --r-lg: 1.25rem;   /* ~20px */
  --r-xl: 1.75rem;   /* ~28px */

  /* Shadows — px only: sub-pixel precision */
  --shadow-xs: 0 1px 4px rgba(100,80,60,.07);
  --shadow-sm: 0 2px 10px rgba(100,80,60,.08), 0 1px 3px rgba(100,80,60,.04);
  --shadow:    0 4px 24px rgba(100,80,60,.10), 0 2px 6px rgba(100,80,60,.05);
  --shadow-lg: 0 12px 48px rgba(100,80,60,.14), 0 4px 14px rgba(100,80,60,.06);
}

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════ */
@keyframes portalFadeUp {
  from { opacity: 0; transform: translateX(-50%) translateY(0.5rem); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 100%; /* 16px base — readable on all devices */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  height: 100%;
}
body {
  font-family: var(--font-body);
  background: var(--cream);
  /* Warm ambient light from brand colours — barely visible, purely atmospheric */
  background-image:
    radial-gradient(ellipse at 18% 8%,  rgba(200,151,58,.07) 0%, transparent 52%),
    radial-gradient(ellipse at 88% 92%, rgba(183,13,19,.04)  0%, transparent 52%);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--crimson); }
button { font-family: var(--font-body); }

:focus-visible { outline: 2px solid var(--crimson); outline-offset: 2px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.2;
}

/* ═══════════════════════════════════════════════════════════
   AUTH PAGE — LOGIN / REGISTER
   ═══════════════════════════════════════════════════════════ */
.auth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100dvh;
}

/* Hero panel (left half — desktop only) */
.auth-hero-panel {
  background: var(--charcoal);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 5vw, 3.5rem);
  overflow: hidden;
}
.auth-hero-gradient {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(183,13,19,.18) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(200,151,58,.12) 0%, transparent 40%);
  pointer-events: none;
}
.mandala-svg {
  position: absolute; right: -5rem; top: 50%;
  transform: translateY(-50%);
  width: clamp(17.5rem, 35vw, 26.25rem);
  height: clamp(17.5rem, 35vw, 26.25rem);
  opacity: .04; pointer-events: none;
}
.logo-emblem { display: inline-flex; align-items: center; gap: 0.75rem; }
.logo-mark {
  width: 2.75rem; height: 2.75rem;
  background: var(--crimson); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-display); color: #fff;
  font-size: 1.05rem; font-weight: 600; line-height: 1.2;
}
.logo-text span {
  display: block; font-family: var(--font-body);
  font-size: .6rem; font-weight: 300; letter-spacing: .2em;
  text-transform: uppercase; color: rgba(255,255,255,.45); margin-top: 0.125rem;
}
.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  color: #fff; line-height: 1.15; font-weight: 400; margin-bottom: 1rem;
}
.hero-tagline em { font-style: italic; color: var(--gold); }
.hero-desc {
  color: rgba(255,255,255,.5); font-weight: 300;
  line-height: 1.8; font-size: .92rem; max-width: 23.75rem;
}
.feature-pills { display: flex; flex-direction: column; gap: 0.5rem; }
.feature-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  border-radius: 6.25rem; padding: 0.45rem 1rem;
  color: rgba(255,255,255,.6); font-size: .8rem; width: fit-content;
}
.feature-pill .fp-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0;
}

/* Form panel (right half / full mobile) */
.auth-form-panel {
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1.5rem, 5vw, 3rem) clamp(1.25rem, 5vw, 2.5rem);
  background: var(--cream);
  min-height: 100dvh;
}
.auth-form-box {
  width: 100%; max-width: 27.5rem;
}

/* Mobile-only header (shown when hero is hidden) */
.auth-mobile-header {
  display: none;
  align-items: center; gap: 0.625rem;
  margin-bottom: 1.75rem;
}
.auth-mobile-logo {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--crimson); display: flex;
  align-items: center; justify-content: center; font-size: 1.2rem;
}
.auth-mobile-biz {
  font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: var(--text);
}
.auth-mobile-sub {
  font-size: .65rem; color: var(--text3); letter-spacing: .12em;
  text-transform: uppercase; display: block; margin-top: 0.0625rem;
}

/* Tabs */
.auth-form-tabs {
  display: flex; background: var(--warm-white);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 0.25rem; margin-bottom: 1.75rem; gap: 0.25rem;
}
.auth-tab-btn {
  flex: 1; padding: 0.625rem 0.5rem; border-radius: 0.4375rem; border: none;
  background: transparent; font-family: var(--font-body);
  font-size: .9rem; font-weight: 500; color: var(--stone);
  cursor: pointer; transition: all .2s; min-height: 2.5rem;
}
.auth-tab-btn.active {
  background: var(--crimson); color: #fff;
  box-shadow: 0 2px 10px rgba(183,13,19,.28);
}
.auth-heading {
  font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2rem);
  color: var(--charcoal); margin-bottom: 0.25rem; font-weight: 600;
}
.auth-sub {
  color: var(--stone); font-size: .88rem; margin-bottom: 1.5rem; font-weight: 300;
}
.auth-form-section { display: none; }
.auth-form-section.active { display: block; }
.auth-divider {
  text-align: center; color: var(--stone); font-size: .82rem;
  margin-top: 1.25rem; font-weight: 300;
}
.auth-divider a { color: var(--crimson); text-decoration: none; font-weight: 500; }
.auth-pending-note {
  background: var(--crimson-s); border-left: 3px solid var(--crimson);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 0.625rem 0.875rem; font-size: .82rem; color: var(--stone);
  margin-bottom: 1.125rem; line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════
   PORTAL SHELL — TOPBAR + BOTTOM NAV
   ═══════════════════════════════════════════════════════════ */

/* Topbar */
.portal-topbar {
  position: sticky; top: 0; z-index: 200;
  height: var(--topbar-h);
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  display: flex; align-items: center;
  padding: 0 1.25rem; gap: 0.75rem;
}
.portal-logo {
  display: flex; align-items: center; gap: 0.625rem;
  text-decoration: none; flex: 1; min-width: 0;
}
.portal-logo-mark {
  width: 2.25rem; height: 2.25rem; border-radius: var(--r-sm);
  background: var(--crimson); display: flex;
  align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(183,13,19,.3);
}
.portal-logo-name {
  font-family: var(--font-display); font-size: .95rem;
  font-weight: 600; color: var(--text); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.portal-logo-sub {
  display: block; font-family: var(--font-body);
  font-size: .58rem; color: var(--text3);
  text-transform: uppercase; letter-spacing: .12em; font-weight: 400;
}
.portal-topbar-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.portal-avatar-btn {
  width: 2.25rem; height: 2.25rem; border-radius: var(--r-sm);
  background: var(--crimson-s); border: 1.5px solid var(--crimson-s2);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: .78rem; font-weight: 700;
  color: var(--crimson); transition: all .15s; text-decoration: none;
}
.portal-avatar-btn:hover { background: var(--crimson); color: #fff; }
.portal-notif-btn {
  width: 2.25rem; height: 2.25rem; border-radius: var(--r-sm);
  background: none; border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); cursor: pointer; transition: all .15s;
  position: relative; text-decoration: none;
}
.portal-notif-btn:hover { background: var(--cream2); color: var(--text2); }
.notif-dot {
  position: absolute; top: 5px; right: 5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--crimson); border: 2px solid var(--warm-white);
}
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 1.1rem; height: 1.1rem; border-radius: 99px;
  background: var(--crimson); color: #fff;
  font-size: .58rem; font-weight: 700; font-family: var(--font-body);
  display: flex; align-items: center; justify-content: center;
  padding: 0 .25rem; border: 2px solid var(--warm-white);
  line-height: 1; pointer-events: none;
}

/* Profile dropdown */
.portal-profile-wrap { position: relative; }
.portal-profile-dropdown {
  display: none; position: absolute; top: calc(100% + 0.5rem); right: 0;
  min-width: 13rem; background: var(--warm-white);
  border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow-lg); z-index: 500;
  overflow: hidden;
}
.portal-profile-dropdown.open { display: block; animation: ppd-in .15s ease; }
@keyframes ppd-in { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.ppd-user { display:flex; align-items:center; gap:.625rem; padding:.75rem 1rem; }
.ppd-avatar {
  width: 2.25rem; height: 2.25rem; border-radius: var(--r-sm); flex-shrink: 0;
  background: var(--crimson-s); border: 1.5px solid var(--crimson-s2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: .78rem; font-weight: 700; color: var(--crimson);
}
.ppd-info { min-width:0; }
.ppd-name { font-size:.82rem; font-weight:600; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ppd-sub  { font-size:.68rem; color:var(--text3); margin-top:.1rem; }
.ppd-divider { height:1px; background:var(--border); margin:.25rem 0; }
.ppd-item {
  display: flex; align-items: center; gap:.625rem;
  padding: .6rem 1rem; font-size:.82rem; color:var(--text2);
  text-decoration: none; transition: background .12s, color .12s;
}
.ppd-item:hover { background: var(--cream2); color: var(--text); }
.ppd-item svg { color:var(--text3); flex-shrink:0; }
.ppd-item:hover svg { color:var(--text2); }
.ppd-item--danger { color:var(--red); }
.ppd-item--danger svg { color:var(--red); }
.ppd-item--danger:hover { background:var(--red-s); color:var(--red); }

/* Bottom nav */
.portal-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(250,248,245,.93);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(200,151,58,.18);
  box-shadow: 0 -6px 32px rgba(100,80,60,.10), 0 -1px 0 rgba(200,151,58,.1);
  border-radius: 1.375rem 1.375rem 0 0;
  display: flex; align-items: stretch;
}
.p-bn-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.2rem;
  padding: 0.625rem 0.25rem 0.5rem; text-decoration: none;
  color: var(--text3); font-size: .68rem; font-weight: 500;
  letter-spacing: .04em;
  transition: color .18s, transform .14s;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body); position: relative;
  min-width: 0; -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.p-bn-item:active { transform: scale(0.9); }
.p-bn-item svg {
  width: 1.5rem; height: 1.5rem; stroke-width: 1.7; flex-shrink: 0;
  position: relative; z-index: 1;
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), stroke-width .18s;
}
.p-bn-item span { position: relative; z-index: 1; transition: all .18s; }
.p-bn-item.active { color: var(--crimson); }
.p-bn-item.active svg {
  stroke-width: 2.2;
  transform: translateY(-3px) scale(1.13);
}
.p-bn-item.active span {
  font-weight: 700;
  font-family: var(--font-display);
  font-size: .72rem;
  letter-spacing: .05em;
}
/* Gradient pill behind active icon */
.p-bn-item.active::before {
  content: ''; position: absolute;
  top: 0.3rem; left: 50%; transform: translateX(-50%);
  width: 3.25rem; height: 2.25rem;
  background: linear-gradient(135deg, rgba(200,151,58,.2) 0%, rgba(183,13,19,.14) 100%);
  border-radius: 0.875rem;
  box-shadow: 0 2px 10px rgba(183,13,19,.08);
}
/* Dot indicator below active label */
.p-bn-item.active::after {
  content: '';
  position: absolute;
  bottom: 0.3rem; left: 50%; transform: translateX(-50%);
  width: 0.25rem; height: 0.25rem;
  border-radius: 50%;
  background: var(--crimson);
  opacity: .55;
}

/* ═══════════════════════════════════════════════════════════
   PAGE WRAPPER
   ═══════════════════════════════════════════════════════════ */
.portal-page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 1.5rem 1.125rem calc(var(--bottom-nav-h) + 1.25rem + env(safe-area-inset-bottom, 0px));
  min-height: calc(100dvh - var(--topbar-h));
}

/* ═══════════════════════════════════════════════════════════
   ANNOUNCEMENT BANNER
   ═══════════════════════════════════════════════════════════ */
.portal-announcement {
  background: linear-gradient(135deg, var(--gold-s), rgba(200,151,58,.06));
  border: 1px solid rgba(200,151,58,.3); border-radius: var(--r);
  padding: 0.75rem 1rem; margin-bottom: 1rem;
  font-size: .83rem; color: var(--gold-d); line-height: 1.55;
}

/* ═══════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════ */
.p-card {
  background: var(--warm-white); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  overflow: hidden; margin-bottom: 0.875rem;
}
.p-card-head {
  padding: 0.875rem 1.125rem; border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, var(--cream), var(--cream2));
  display: flex; align-items: center; justify-content: space-between; gap: 0.625rem;
}
.p-card-title {
  font-family: var(--font-display); font-size: 1.08rem;
  font-weight: 600; color: var(--text);
}
.p-card-body { padding: 1.125rem; }

/* Payment alert */
.payment-alert-card {
  background: linear-gradient(135deg, #fff8f0, #fff5e8);
  border: 1.5px solid rgba(217,119,6,.3); border-radius: var(--r-lg);
  padding: 1.125rem; margin-bottom: 0.875rem; box-shadow: var(--shadow-sm);
}
.payment-alert-title {
  font-family: var(--font-display); font-size: 1.05rem;
  font-weight: 600; color: #92400e; margin-bottom: 0.25rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.payment-alert-desc { font-size: .83rem; color: #b45309; line-height: 1.55; margin-bottom: 0.875rem; }
.payment-alert-amount {
  font-family: var(--font-display); font-size: 1.45rem;
  font-weight: 700; color: #92400e; margin-bottom: 0.75rem;
}

/* Session hero card */
.session-hero-card {
  background: linear-gradient(135deg, var(--charcoal), #2a2018);
  border-radius: var(--r-xl); padding: 1.375rem 1.375rem 1.25rem;
  margin-bottom: 0.875rem; position: relative; overflow: hidden;
}
.session-hero-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(200,151,58,.15), transparent 50%);
  pointer-events: none;
}
.session-hero-eyebrow {
  font-size: .65rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 0.625rem;
  display: flex; align-items: center; gap: 0.375rem;
}
.session-hero-eyebrow .live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
  animation: pulseDot 1.8s ease infinite;
}
@keyframes pulseDot { 0%,100%{opacity:1} 50%{opacity:.3} }
.session-hero-service {
  font-family: var(--font-display); font-size: clamp(1.4rem, 4vw, 1.7rem);
  font-weight: 600; color: #fff; line-height: 1.2; margin-bottom: 0.375rem;
}
.session-hero-time { font-size: .87rem; color: rgba(255,255,255,.6); margin-bottom: 1rem; }
.session-hero-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Package card */
.package-card {
  background: var(--warm-white); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.125rem; margin-bottom: 0.875rem;
  box-shadow: var(--shadow-sm);
}
.package-label {
  font-size: .62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--text3); margin-bottom: 0.375rem;
}
.package-name {
  font-family: var(--font-display); font-size: 1.1rem;
  font-weight: 600; color: var(--text); margin-bottom: 0.875rem;
}
.package-progress-track {
  height: 0.4375rem; background: var(--cream3); border-radius: 4px;
  overflow: hidden; margin-bottom: 0.5rem;
}
.package-progress-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--crimson), var(--gold));
  transition: width .7s cubic-bezier(.4,0,.2,1);
}
.package-stats {
  display: flex; justify-content: space-between;
  font-size: .78rem; color: var(--text3); margin-bottom: 0.75rem;
}
.package-stat-val { font-weight: 700; color: var(--text); }

/* ═══════════════════════════════════════════════════════════
   SESSION ROWS
   ═══════════════════════════════════════════════════════════ */
.p-session-row {
  display: flex; align-items: center; gap: 0.875rem;
  padding: 0.8rem 1.125rem; border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.p-session-row:last-child { border-bottom: none; }
.p-session-row:hover { background: var(--cream); }
.p-session-date-col { text-align: center; flex-shrink: 0; width: 2.75rem; }
.p-session-day {
  font-size: .62rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text3); font-weight: 600;
}
.p-session-num {
  font-family: var(--font-display); font-size: 1.45rem;
  font-weight: 600; color: var(--text); line-height: 1;
}
.p-session-info { flex: 1; min-width: 0; }
.p-session-service {
  font-size: .88rem; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.p-session-time { font-size: .75rem; color: var(--text3); margin-top: 0.125rem; }
.p-session-badge { flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════ */
.p-badge {
  display: inline-flex; align-items: center; padding: 0.2rem 0.625rem;
  border-radius: 1.25rem; font-size: .7rem; font-weight: 600; white-space: nowrap;
}
.p-badge-green  { background: var(--green-s);  color: var(--green); }
.p-badge-blue   { background: var(--blue-s);   color: var(--blue); }
.p-badge-amber  { background: var(--amber-s);  color: var(--amber); }
.p-badge-red    { background: var(--red-s);    color: var(--red); }
.p-badge-grey   { background: var(--cream3);   color: var(--text3); }
.p-badge-gold   { background: var(--gold-s);   color: var(--gold-d); }

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */
.p-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4375rem;
  padding: 0.6875rem 1.375rem; border-radius: var(--r-sm);
  font-family: var(--font-body); font-size: .88rem; font-weight: 600;
  cursor: pointer; border: none; text-decoration: none;
  transition: all .18s cubic-bezier(.4,0,.2,1);
  white-space: nowrap; min-height: 2.75rem;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  letter-spacing: .01em;
}
.p-btn-primary {
  background: var(--crimson); color: #fff;
  box-shadow: 0 2px 14px rgba(183,13,19,.28);
}
.p-btn-primary:hover { background: var(--crimson-d); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(183,13,19,.35); }
.p-btn-primary:active { transform: translateY(0); }
.p-btn-gold { background: var(--gold); color: #1a0e00; box-shadow: 0 2px 12px rgba(200,151,58,.3); }
.p-btn-gold:hover { filter: brightness(1.07); transform: translateY(-1px); }
.p-btn-ghost { background: var(--warm-white); color: var(--text2); border: 1.5px solid var(--border2); }
.p-btn-ghost:hover { background: var(--cream2); border-color: var(--border); }
.p-btn-sm { padding: 0.4375rem 0.875rem; font-size: .8rem; min-height: 2.25rem; }
.p-btn-full { width: 100%; }
.p-btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ═══════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════ */
.p-field { margin-bottom: 1.125rem; }
.p-field:last-child { margin-bottom: 0; }
.p-label {
  display: block; font-size: .72rem; font-weight: 600;
  color: var(--text2); margin-bottom: 0.4375rem;
  text-transform: uppercase; letter-spacing: .07em;
}
.p-input {
  width: 100%; padding: 0.75rem 0.875rem;
  border: 1.5px solid var(--border2); border-radius: var(--r-sm);
  font-family: var(--font-body); font-size: .92rem;
  color: var(--text); background: var(--warm-white);
  transition: border-color .15s, box-shadow .15s; outline: none;
  -webkit-appearance: none; appearance: none;
  min-height: 2.875rem;
}
.p-input:focus { border-color: var(--crimson); box-shadow: 0 0 0 3px var(--crimson-s); }
.p-input::placeholder { color: var(--text3); }
textarea.p-input { resize: vertical; min-height: 6rem; }
select.p-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a8480' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.875rem center;
  padding-right: 2.375rem; cursor: pointer;
}
.p-input-wrap { position: relative; }
.p-input-wrap .p-input { padding-right: 2.875rem; }
.p-input-eye {
  position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 0.375rem;
  color: var(--text3); display: flex; align-items: center;
  transition: color .15s;
}
.p-input-eye:hover { color: var(--text2); }
.p-hint { font-size: .74rem; color: var(--text3); margin-top: 0.3125rem; line-height: 1.5; }

/* Feedback boxes */
.p-error-box {
  background: var(--red-s); border: 1px solid rgba(220,38,38,.25);
  color: #7f1d1d; border-radius: var(--r-sm);
  padding: 0.6875rem 0.875rem; font-size: .85rem; margin-bottom: 1rem; line-height: 1.55;
}
.p-success-box {
  background: var(--green-s); border: 1px solid rgba(22,163,74,.25);
  color: #14532d; border-radius: var(--r-sm);
  padding: 0.6875rem 0.875rem; font-size: .85rem; margin-bottom: 1rem; line-height: 1.55;
}

/* ═══════════════════════════════════════════════════════════
   OTP INPUT
   ═══════════════════════════════════════════════════════════ */
.otp-grid {
  display: flex; gap: 0.625rem; justify-content: center; margin: 1.75rem 0;
}
.otp-digit {
  width: 3.25rem; height: 3.875rem; border: 1.5px solid var(--border2);
  border-radius: var(--r-sm); font-size: 1.6rem; font-weight: 700;
  color: var(--text); text-align: center; background: var(--warm-white);
  transition: border-color .15s, box-shadow .15s; outline: none;
  font-family: var(--font-display); -webkit-appearance: none;
}
.otp-digit:focus { border-color: var(--crimson); box-shadow: 0 0 0 3px var(--crimson-s); }

/* ═══════════════════════════════════════════════════════════
   PROFILE INFO ROWS
   ═══════════════════════════════════════════════════════════ */
.p-info-row {
  display: flex; align-items: baseline; gap: 0.75rem;
  padding: 0.625rem 0; border-bottom: 1px solid var(--border);
}
.p-info-row:last-child { border-bottom: none; }
.p-info-label {
  font-size: .68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text3); min-width: 6rem; flex-shrink: 0;
}
.p-info-val { font-size: .88rem; color: var(--text2); word-break: break-word; flex: 1; }

/* ═══════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════ */
.p-empty {
  text-align: center; padding: 3.25rem 1.5rem; color: var(--text3);
}
.p-empty-icon { font-size: 2.6rem; margin-bottom: 0.875rem; }
.p-empty-title {
  font-family: var(--font-display); font-size: 1.15rem;
  color: var(--text2); margin-bottom: 0.375rem;
}
.p-empty-sub { font-size: .84rem; line-height: 1.65; max-width: 17.5rem; margin: 0 auto; }

/* ═══════════════════════════════════════════════════════════
   INVOICE / PAYMENT
   ═══════════════════════════════════════════════════════════ */
.p-invoice-card {
  background: var(--warm-white); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.p-invoice-head {
  background: var(--charcoal); padding: 1.25rem 1.375rem;
  display: flex; justify-content: space-between; align-items: flex-start;
}
.p-invoice-brand { font-family: var(--font-display); font-size: .96rem; color: var(--gold); font-weight: 600; }
.p-invoice-num   { font-size: .72rem; color: rgba(255,255,255,.4); margin-top: 0.125rem; }
.p-invoice-label { font-size: 1rem; font-weight: 800; color: #fff; letter-spacing: .1em; text-transform: uppercase; }
.p-invoice-body  { padding: 1.125rem 1.375rem; }
.p-invoice-row   { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: .85rem; gap: 0.75rem; }
.p-invoice-row:last-child { border-bottom: none; }
.p-invoice-row.total {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 700;
  color: var(--crimson); border-top: 1.5px solid var(--border2);
  margin-top: 0.25rem; padding-top: 0.75rem;
}
.p-invoice-lbl { color: var(--text3); }
.p-invoice-val  { font-weight: 600; color: var(--text); text-align: right; }

/* ═══════════════════════════════════════════════════════════
   ALERTS / INFO BOXES
   ═══════════════════════════════════════════════════════════ */
.p-alert { padding: 0.75rem 1rem; border-radius: var(--r-sm); font-size: .85rem; margin-bottom: 0.875rem; line-height: 1.55; }
.p-alert-info   { background: var(--blue-s);  border: 1px solid rgba(37,99,235,.2);  color: #1e3a8a; }
.p-alert-warn   { background: var(--amber-s); border: 1px solid rgba(217,119,6,.2);  color: #78350f; }
.p-alert-green  { background: var(--green-s); border: 1px solid rgba(22,163,74,.2);  color: #14532d; }

/* ═══════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════ */
.p-spinner {
  width: 1.125rem; height: 1.125rem; border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .65s linear infinite; display: inline-block; flex-shrink: 0;
}
.p-spinner-dark {
  border-color: rgba(44,40,37,.2); border-top-color: var(--crimson);
}
@keyframes spin { to { transform: rotate(360deg); } }

.p-mt-2 { margin-top: 0.5rem; }
.p-mt-3 { margin-top: 0.875rem; }
.p-mb-0 { margin-bottom: 0; }
.p-text-center { text-align: center; }
.p-text-sm { font-size: .8rem; }
.p-text-muted { color: var(--text3); }
.p-gap-2 { display: flex; gap: 0.5rem; }
.p-divider { height: 1px; background: var(--border); margin: 1.25rem 0; }

/* ═══════════════════════════════════════════════════════════
   SECTION HEADER (inside pages)
   ═══════════════════════════════════════════════════════════ */
.p-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.75rem; gap: 0.5rem;
}
.p-section-title {
  font-family: var(--font-display); font-size: 1.05rem;
  font-weight: 600; color: var(--text);
}

/* ═══════════════════════════════════════════════════════════
   STAT ROW (dashboard summary)
   ═══════════════════════════════════════════════════════════ */
.p-stat-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem; margin-bottom: 0.875rem;
}
.p-stat-box {
  background: var(--warm-white); border: 1px solid var(--border);
  border-radius: var(--r); padding: 0.875rem 0.75rem;
  text-align: center; box-shadow: var(--shadow-xs);
}
.p-stat-val {
  font-family: var(--font-display); font-size: clamp(1.35rem, 3vw, 1.6rem);
  font-weight: 700; color: var(--text); line-height: 1;
}
.p-stat-lbl {
  font-size: .65rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text3); margin-top: 0.25rem; font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   ANNOUNCEMENT WRAPPER
   ═══════════════════════════════════════════════════════════ */
.portal-announcement-wrap {
  padding: 0 1rem;
  max-width: var(--page-max);
  margin: 0.75rem auto 0;
}

/* ═══════════════════════════════════════════════════════════
   ANIMATION HELPERS
   ═══════════════════════════════════════════════════════════ */
@keyframes portalFadeIn { from { opacity: 0 } to { opacity: 1 } }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE SMALL  ≤ 23.75em (≈380px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 23.75em) {
  html { font-size: 93.75%; } /* ~15px on default browser */
  .portal-page { padding-left: 0.875rem; padding-right: 0.875rem; }
  .session-hero-card { padding: 1rem 1rem 0.875rem; }
  .otp-digit { width: 2.75rem; height: 3.5rem; font-size: 1.4rem; }
  .otp-grid { gap: 0.5rem; }
  .p-stat-row { gap: 0.5rem; }
  .p-invoice-head { padding: 1rem; }
  .p-invoice-body { padding: 0.875rem 1rem; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — TABLET  ≥ 40em (≈640px)
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 40em) {
  :root { --page-max: 45rem; }
  .portal-page { padding-left: 1.5rem; padding-right: 1.5rem; }
  .p-card-head { padding: 1rem 1.375rem; }
  .p-card-body { padding: 1.375rem; }
  .session-hero-card { padding: 1.625rem 1.75rem 1.5rem; }
  .p-session-row { padding: 0.875rem 1.375rem; }
  .p-stat-row { gap: 0.875rem; }
  .p-stat-box { padding: 1rem 0.875rem; }
  .auth-form-box { max-width: 28.75rem; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — DESKTOP  ≥ 64em (≈1024px)
   No sidebar — same burger/drawer/bottom-nav as mobile
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 64em) {
  :root {
    --page-max: 72rem;
    --topbar-h: 3.75rem;
  }

  /* Auth: restore split layout */
  .auth-split { grid-template-columns: 1fr 1fr; }
  .auth-hero-panel { display: flex; }
  .auth-mobile-header { display: none !important; }

  /* Sidebar always hidden — burger menu on all screen sizes */
  .portal-sidebar { display: none !important; }

  /* Content: centred, no sidebar offset */
  .portal-page {
    max-width: var(--page-max);
    padding-left: 1.75rem;
    padding-right: 1.75rem;
    padding-bottom: 2.5rem;
  }
  .portal-announcement-wrap {
    max-width: var(--page-max);
    padding-left: 1.75rem; padding-right: 1.75rem;
  }

  /* Two-column grid for some sections */
  .p-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
  .p-two-col .p-card { margin-bottom: 0; }
  .p-stat-row { gap: 1rem; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — LARGE DESKTOP  ≥ 80em (≈1280px)
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 80em) {
  :root { --page-max: 52.5rem; }
  .portal-page { padding-left: 2rem; padding-right: 2rem; }
  .portal-announcement-wrap { padding-left: 2rem; padding-right: 2rem; }
}

/* ═══════════════════════════════════════════════════════════
   AUTH PAGE — MOBILE OVERRIDE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 63.9375em) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-hero-panel { display: none; }
  .auth-mobile-header { display: flex; }
  .auth-form-panel {
    padding-top: clamp(1.5rem, 6vw, 3rem);
    align-items: flex-start;
    min-height: 100dvh;
  }
  .auth-form-box { padding-bottom: 2rem; }
}

/* ═══════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════ */
@media print {
  .portal-topbar, .portal-bottom-nav, .portal-sidebar { display: none !important; }
  .portal-page { padding: 0; max-width: 100%; margin: 0; }
}
