/* ─── Design System ─────────────────────────────────────────────────────────── */
:root {
  --green:       #1a7a5e;
  --green-dark:  #145f49;
  --green-mid:   #2ea882;
  --green-light: #e8f5f0;
  --green-pale:  #f0faf6;
  --bg:          #fafaf8;
  --bg-2:        #f2f2ee;
  --surface:     #ffffff;
  --border:      #e4e4de;
  --border-2:    #d0d0c8;
  --text-1:      #1a1a18;
  --text-2:      #5a5a52;
  --text-3:      #9a9a90;
  --red:         #dc2626;
  --red-light:   #fef2f2;
  --amber:       #d97706;
  --amber-light: #fffbeb;
  --blue:        #2563eb;
  --blue-light:  #eff6ff;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:   0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:   0 8px 24px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.06);
  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   16px;
  --radius-xl:   20px;
}

/* ─── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
input, select, textarea, button { font-family: inherit; }

/* ─── Typography ─────────────────────────────────────────────────────────────── */
h1, h2, h3 { font-family: 'DM Serif Display', Georgia, serif; line-height: 1.2; }
.text-sm  { font-size: 13px; }
.text-xs  { font-size: 11px; }
.text-muted { color: var(--text-2); }
.fw-600   { font-weight: 600; }
.text-center { text-align: center; }

/* ─── Layout ─────────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  cursor: pointer; border: 2px solid transparent; transition: all .15s ease;
  line-height: 1; white-space: nowrap; text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary  { background: var(--green); color: #fff; border-color: var(--green); }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); text-decoration: none; }
.btn-outline  { background: transparent; color: var(--green); border-color: var(--green); }
.btn-outline:hover { background: var(--green-light); text-decoration: none; }
.btn-ghost    { background: transparent; color: var(--text-2); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-2); color: var(--text-1); text-decoration: none; }
.btn-danger   { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; text-decoration: none; }
.btn-sm       { padding: 7px 14px; font-size: 13px; }
.btn-xs       { padding: 4px 10px; font-size: 12px; border-radius: 4px; }
.btn-lg       { padding: 14px 28px; font-size: 16px; border-radius: var(--radius); }
.btn-full     { width: 100%; }
.btn-text     { background: none; border: none; color: var(--green); font-size: 14px; cursor: pointer; padding: 0; }
.btn-text:hover { text-decoration: underline; }

/* ─── Forms ──────────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-1); }
.field .optional { color: var(--text-3); font-weight: 400; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.field-link { font-size: 12px; color: var(--green); margin-top: 2px; align-self: flex-end; }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; color: var(--text-1);
  background: var(--surface); transition: border-color .15s;
  -webkit-appearance: none; appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(26,122,94,.1);
}
input.input-disabled, input:disabled { background: var(--bg-2); color: var(--text-3); cursor: not-allowed; }
textarea { resize: vertical; min-height: 80px; }
.input-pw { position: relative; }
.input-pw input { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 16px; padding: 4px; color: var(--text-3);
}
.pw-toggle:hover { color: var(--text-1); }
.pw-strength { height: 4px; border-radius: 2px; background: var(--border); margin-top: 6px; overflow: hidden; }
.pw-strength::after { content:''; display:block; height:100%; border-radius:2px; transition: width .3s, background .3s; }
.pw-strength[data-strength="1"]::after { width:25%; background: var(--red); }
.pw-strength[data-strength="2"]::after { width:50%; background: var(--amber); }
.pw-strength[data-strength="3"]::after { width:75%; background: var(--green-mid); }
.pw-strength[data-strength="4"]::after { width:100%; background: var(--green); }
.field-check { flex-direction: row; align-items: flex-start; }
.check-label { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; cursor: pointer; font-weight: 400; }
.check-label input[type=checkbox] { width: 16px; height: 16px; margin-top: 2px; cursor: pointer; accent-color: var(--green); flex-shrink: 0; }
.otp-input { letter-spacing: 8px; font-size: 28px; text-align: center; font-weight: 700; }
.select-sm { padding: 4px 8px; font-size: 13px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.file-input { width: 100%; padding: 8px; font-size: 13px; cursor: pointer; }

/* ─── Flash Messages ─────────────────────────────────────────────────────────── */
.flash {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px;
  position: sticky; top: 0; z-index: 100;
}
.flash-success { background: var(--green-light); color: var(--green-dark); border: 1px solid #b6ddd0; }
.flash-error   { background: var(--red-light); color: var(--red); border: 1px solid #fecaca; }
.flash-info    { background: var(--blue-light); color: var(--blue); border: 1px solid #bfdbfe; }
.flash-icon    { font-weight: 700; font-size: 16px; }
.flash-close   { margin-left: auto; background: none; border: none; cursor: pointer; font-size: 18px; opacity: .6; }
.flash-close:hover { opacity: 1; }

/* ─── Badges / Status ─────────────────────────────────────────────────────────── */
.badge            { display: inline-flex; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; text-transform: capitalize; }
.badge-beginner   { background: #dcfce7; color: #15803d; }
.badge-intermediate { background: #fef3c7; color: #92400e; }
.badge-advanced   { background: #fee2e2; color: #991b1b; }
.status-badge     { display: inline-flex; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; text-transform: capitalize; }
.status-active, .status-succeeded { background: #dcfce7; color: #15803d; }
.status-pending   { background: #fef3c7; color: #92400e; }
.status-cancelled, .status-expired, .status-failed { background: #fee2e2; color: #991b1b; }
.status-past_due  { background: #ffedd5; color: #9a3412; }
.status-published { background: #dcfce7; color: #15803d; }
.status-draft     { background: #f3f4f6; color: #6b7280; }
.status-archived  { background: #f3f4f6; color: #6b7280; }
.status-suspended { background: #fee2e2; color: #991b1b; }

/* ─── Data Table ─────────────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { padding: 10px 12px; text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); border-bottom: 2px solid var(--border); }
.data-table td { padding: 12px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-2); }
.empty-cell { text-align: center; padding: 24px; color: var(--text-3); font-size: 14px; }
.actions-cell { display: flex; gap: 6px; }

/* ─── Pagination ─────────────────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 12px; padding: 16px 0 4px; justify-content: center; }
.pg-btn { padding: 6px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; color: var(--text-1); }
.pg-btn:hover { background: var(--bg-2); text-decoration: none; }
.pg-info { font-size: 13px; color: var(--text-2); }

/* ─── Public Nav ─────────────────────────────────────────────────────────────── */
.nav-public { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 200; }
.nav-inner  { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; max-width: 1200px; margin: 0 auto; height: 64px; }
.nav-brand  { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--green); font-weight: 400; display: flex; align-items: center; gap: 6px; text-decoration: none; }
.brand-icon { font-size: 20px; }
.nav-links  { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.nav-link   { font-size: 14px; font-weight: 500; color: var(--text-2); text-decoration: none; }
.nav-link:hover, .nav-link.active { color: var(--green); }
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text-2); border-radius: 2px; }

/* ─── Hero ───────────────────────────────────────────────────────────────────── */
.hero { background: linear-gradient(135deg, var(--green-pale) 0%, var(--surface) 60%); padding: 80px 0 64px; }
.hero-inner { max-width: 680px; margin: 0 auto; padding: 0 24px; text-align: center; }
.hero-tag { display: inline-block; background: var(--green-light); color: var(--green); font-size: 13px; font-weight: 600; padding: 5px 14px; border-radius: 20px; margin-bottom: 20px; text-transform: uppercase; letter-spacing: .06em; }
.hero-title { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 16px; color: var(--text-1); }
.hero-title em { color: var(--green); font-style: normal; }
.hero-sub { font-size: 18px; color: var(--text-2); margin-bottom: 32px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 24px; }
.hero-trust { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.hero-trust span::before { content: ''; }

/* ─── Programs Grid ──────────────────────────────────────────────────────────── */
.programs-section { padding: 64px 0; }
.section-hdr { text-align: center; margin-bottom: 40px; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 10px; }
.section-sub { color: var(--text-2); font-size: 16px; }
.programs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.program-card { background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); transition: transform .2s, box-shadow .2s; }
.program-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.program-card-link { display: block; text-decoration: none; color: inherit; }
.program-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--green-light); }
.program-thumb img { width: 100%; height: 100%; object-fit: cover; }
.program-thumb-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 48px; }
.program-badge { position: absolute; top: 12px; left: 12px; }
.program-body { padding: 20px; }
.program-title { font-size: 17px; margin-bottom: 8px; color: var(--text-1); }
.program-desc { font-size: 14px; color: var(--text-2); line-height: 1.5; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.program-meta { display: flex; gap: 12px; font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.program-price { font-size: 15px; }
.price-from { color: var(--text-3); font-size: 12px; margin-right: 4px; }
.price-val { font-weight: 700; color: var(--green); }

/* ─── How It Works ───────────────────────────────────────────────────────────── */
.how-it-works { background: var(--surface); padding: 64px 0; border-top: 1px solid var(--border); }
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 32px; margin-top: 40px; max-width: 900px; margin-left: auto; margin-right: auto; }
.step { text-align: center; padding: 24px; }
.step-num { width: 48px; height: 48px; border-radius: 50%; background: var(--green); color: #fff; font-family: 'DM Serif Display', serif; font-size: 20px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.step h3 { font-size: 16px; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-2); line-height: 1.6; }


/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.footer-public { background: var(--text-1); padding: 32px 24px; text-align: center; }
.footer-brand { font-family: 'DM Serif Display', serif; font-size: 18px; color: #fff; margin-bottom: 8px; }
.footer-copy { color: #6a6a62; font-size: 13px; }

/* ─── Program Detail ─────────────────────────────────────────────────────────── */
.program-detail-hero { padding: 40px 0; }
.pd-layout { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
.pd-breadcrumb { font-size: 13px; color: var(--text-3); margin-bottom: 12px; }
.pd-breadcrumb a { color: var(--text-3); }
.pd-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin: 10px 0 16px; }
.pd-desc { color: var(--text-2); line-height: 1.7; margin-bottom: 24px; }
.pd-stats { display: flex; gap: 24px; margin-bottom: 32px; }
.pd-stat { text-align: center; }
.pd-stat-val { display: block; font-size: 22px; font-weight: 700; color: var(--green); }
.pd-stat-lbl { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.pd-thumb { width: 100%; border-radius: var(--radius); margin-bottom: 16px; }
.pd-curriculum h3 { font-size: 15px; margin-bottom: 12px; font-family: 'DM Sans', sans-serif; font-weight: 600; }
.curriculum-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.curriculum-phase { padding: 8px 14px; background: var(--green-light); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--green-dark); }
.curriculum-item { padding: 10px 14px; border-top: 1px solid var(--border); display: flex; gap: 10px; font-size: 13px; }
.ci-week { color: var(--text-3); flex-shrink: 0; }
.ci-title { color: var(--text-2); }
.curriculum-more { justify-content: center; color: var(--green); font-weight: 600; }
.pkg-card { background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; position: relative; }
.pkg-popular { border-color: var(--green); }
.pkg-popular-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--green); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 12px; border-radius: 12px; white-space: nowrap; }
.pkg-name { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.pkg-price { font-size: 26px; font-weight: 700; color: var(--green); margin-bottom: 12px; }
.pkg-cycle { font-size: 13px; color: var(--text-2); font-weight: 400; }
.pkg-feat { font-size: 13px; color: var(--text-2); padding: 4px 0; }
.pkg-guarantee { font-size: 12px; color: var(--text-3); text-align: center; line-height: 1.8; }

/* ─── Auth ───────────────────────────────────────────────────────────────────── */
.page-auth { background: var(--bg-2); }
.auth-layout { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-brand { font-family: 'DM Serif Display', serif; font-size: 22px; margin-bottom: 24px; color: var(--green); display: flex; align-items: center; gap: 6px; }
.auth-brand a { color: inherit; text-decoration: none; }
.auth-card { background: var(--surface); border-radius: var(--radius-lg); padding: 32px; width: 100%; max-width: 440px; box-shadow: var(--shadow-md); border: 1px solid var(--border); }
.auth-hdr { margin-bottom: 24px; }
.auth-icon { font-size: 40px; margin-bottom: 12px; }
.auth-title { font-size: 1.8rem; margin-bottom: 6px; }
.auth-sub { font-size: 14px; color: var(--text-2); line-height: 1.5; }
.auth-form .btn { margin-top: 4px; }
.auth-switch { text-align: center; font-size: 14px; color: var(--text-2); margin-top: 20px; }
.admin-badge { background: var(--green-light); color: var(--green); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; font-family: 'DM Sans', sans-serif; }

/* ─── Patient Layout ─────────────────────────────────────────────────────────── */
.page-patient { display: flex; min-height: 100vh; overflow-x: hidden; }
.nav-patient { width: 260px; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 100; }
.nav-patient-brand { padding: 20px 20px 0; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.nav-patient-links { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-patient-footer { padding: 16px 20px; border-top: 1px solid var(--border); }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px; font-size: 14px; font-weight: 500; color: var(--text-2); text-decoration: none; transition: all .1s; }
.nav-item:hover { background: var(--bg-2); color: var(--text-1); text-decoration: none; }
.nav-item.active { background: var(--green-light); color: var(--green); font-weight: 600; }
.ni { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-user-info { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.nav-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.nav-user-name { font-size: 13px; font-weight: 600; }
.nav-user-email { font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.nav-logout { font-size: 13px; color: var(--text-3); text-decoration: none; }
.nav-logout:hover { color: var(--red); }
.patient-main { margin-left: 260px; flex: 1; padding: 32px; min-height: 100vh; }

/* ─── Patient Pages ──────────────────────────────────────────────────────────── */
.page-hdr { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; gap: 16px; }
.page-title { font-size: 1.8rem; }
.section-lbl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 12px; }
.empty-dashboard { text-align: center; padding: 64px 32px; background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border); }
.empty-icon { font-size: 56px; margin-bottom: 16px; }
.empty-dashboard h2 { margin-bottom: 8px; }
.empty-dashboard p { color: var(--text-2); margin-bottom: 24px; }
.dashboard-programs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.dp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow-sm); }
.dp-thumb { width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: var(--green-light); }
.dp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dp-thumb-ph { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 24px; }
.dp-body { flex: 1; min-width: 0; }
.dp-title { font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.dp-sub-info { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.dp-progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.dp-progress-fill { height: 100%; background: var(--green); border-radius: 3px; transition: width .3s; }
.dp-progress-lbl { font-size: 11px; color: var(--text-3); }
.dp-cta { font-size: 13px; font-weight: 600; color: var(--green); white-space: nowrap; flex-shrink: 0; }
.activity-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.activity-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); align-items: center; }
.activity-item:last-child { border-bottom: none; }
.activity-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--green-light); display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.activity-title { font-size: 14px; font-weight: 500; }
.activity-prog { font-size: 12px; color: var(--text-3); }

/* ─── Program View ───────────────────────────────────────────────────────────── */
.prog-view-hdr { margin-bottom: 16px; }
.back-link { font-size: 13px; color: var(--text-3); display: block; margin-bottom: 8px; }
.prog-chip { display: inline-block; background: var(--green-light); color: var(--green); font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 20px; margin-top: 8px; }
.prog-bar-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.prog-bar-track { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.prog-bar-fill { height: 100%; background: var(--green); border-radius: 4px; transition: width .5s; }
.prog-val { font-size: 13px; font-weight: 600; color: var(--green); min-width: 36px; }
.phase-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.ptab { padding: 8px 20px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--surface); font-size: 14px; font-weight: 600; cursor: pointer; color: var(--text-2); transition: all .15s; }
.ptab:hover { border-color: var(--green); color: var(--green); }
.ptab.active { background: var(--green); border-color: var(--green); color: #fff; }
.phase-panel { display: none; }
.phase-panel.active { display: block; }
.week-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin-bottom: 20px; }
.wk-btn { padding: 8px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 500; text-align: center; color: var(--text-2); transition: all .15s; }
.wk-btn:hover { border-color: var(--green); color: var(--green); }
.wk-btn.active { background: var(--green-light); border-color: var(--green); color: var(--green); }
.wn { font-weight: 700; margin-bottom: 2px; }
.wl { font-size: 11px; color: var(--text-3); }
.week-panel { display: none; }
.week-panel.active { display: block; }
.session-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.session-card.done { border-color: var(--green-light); background: var(--green-pale); }
.s-hdr { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; user-select: none; }
.s-hdr:hover { background: var(--bg-2); }
.day-badge { background: var(--green-light); color: var(--green); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; flex-shrink: 0; }
.s-title { flex: 1; font-weight: 600; font-size: 15px; }
.s-check { color: var(--green); font-size: 16px; font-weight: 700; }
.s-arrow { color: var(--text-3); font-size: 12px; transition: transform .2s; }
.s-arrow.open { transform: rotate(180deg); }
.exercises { display: none; padding: 0 16px 16px; }
.exercises.open { display: block; }
.session-desc { font-size: 14px; color: var(--text-2); margin-bottom: 12px; }
.session-actions { display: flex; gap: 8px; }

/* ─── Watch Page ─────────────────────────────────────────────────────────────── */
.page-watch .patient-main { padding: 24px; }
.watch-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; min-width: 0; overflow: hidden; }
.watch-main { margin-left: 260px; flex: 1; padding: 24px; min-height: 100vh; overflow: hidden; }
.video-wrap { background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; min-width: 0; width: 100%; }
.video-player { width: 100%; height: 100%; display: block; }
.watch-meta { padding: 16px 0; }
.watch-breadcrumb { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.watch-breadcrumb a { color: var(--text-3); }
.watch-title { font-size: 1.4rem; margin-bottom: 8px; }
.watch-desc { font-size: 14px; color: var(--text-2); margin-bottom: 16px; }
.watch-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.completed-badge { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: var(--green-light); color: var(--green); border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; }
.watch-sidebar { }
.watch-sidebar-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-bottom: 12px; }
.next-video-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; text-decoration: none; color: inherit; }
.next-video-card:hover { border-color: var(--green); text-decoration: none; }
.nvc-meta { font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.nvc-title { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.nvc-cta { font-size: 13px; color: var(--green); font-weight: 600; }
.sidebar-done { font-size: 14px; color: var(--text-2); text-align: center; padding: 24px; background: var(--green-pale); border-radius: var(--radius); }

/* ─── Account ────────────────────────────────────────────────────────────────── */
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.account-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.account-card-full { grid-column: 1 / -1; }
.account-card-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin-bottom: 20px; }
.sub-item { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; }
.sub-item.sub-active { border-color: var(--green-light); background: var(--green-pale); }
.sub-program { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.sub-meta { font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
.sub-date { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }

/* ─── Checkout ───────────────────────────────────────────────────────────────── */
.checkout-layout { max-width: 500px; margin: 0 auto; padding: 24px 0; }
.checkout-summary { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.co-thumb { width: 72px; height: 72px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.co-program { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.co-pkg { font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.co-price { font-size: 22px; font-weight: 700; color: var(--green); }
.co-cycle { font-size: 13px; color: var(--text-2); font-weight: 400; }
.checkout-trust { display: flex; gap: 20px; justify-content: center; font-size: 12px; color: var(--text-3); margin-top: 16px; }

/* ─── Admin Layout ───────────────────────────────────────────────────────────── */
.page-admin { display: flex; min-height: 100vh; background: var(--bg); }
.nav-admin { width: 240px; background: #111815; border-right: 1px solid #2a2e2b; display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 100; }
.nav-admin-brand { padding: 20px; border-bottom: 1px solid #2a2e2b; }
.nav-admin .nav-brand { color: #fff; font-size: 17px; }
.nav-admin .admin-badge { background: rgba(26,122,94,.3); color: var(--green-mid); }
.nav-admin-links { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-admin .nav-item { color: #9a9e9b; padding: 10px 20px; font-size: 13px; }
.nav-admin .nav-item:hover { background: rgba(255,255,255,.05); color: #e2e8e4; }
.nav-admin .nav-item.active { background: rgba(26,122,94,.15); color: var(--green-mid); }
.nav-admin-footer { padding: 16px 20px; border-top: 1px solid #2a2e2b; }
.nav-admin .nav-user-name { color: #e2e8e4; }
.nav-admin .nav-user-email { color: #6a6e6b; }
.nav-admin .nav-logout { color: #6a6e6b; }
.nav-admin .nav-logout:hover { color: #ef4444; }
.nav-admin .nav-avatar.admin-av { background: var(--green-dark); font-size: 14px; }
.admin-main { margin-left: 240px; flex: 1; padding: 32px; }
.admin-page-hdr { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 16px; }
.admin-page-title { font-size: 1.6rem; }
.admin-date { font-size: 13px; color: var(--text-3); }
.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.admin-card-hdr { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.card-link { font-size: 13px; font-weight: 600; color: var(--green); text-transform: none; letter-spacing: 0; }
.admin-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; gap: 16px; align-items: center; box-shadow: var(--shadow-sm); }
.stat-icon { width: 48px; height: 48px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.stat-val { font-size: 24px; font-weight: 700; font-family: 'DM Serif Display', serif; }
.stat-lbl { font-size: 13px; color: var(--text-2); font-weight: 500; }
.stat-sub { font-size: 12px; color: var(--text-3); }
.mini-patient-list { }
.mpl-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: center; }
.mpl-item:last-child { border-bottom: none; }
.mpl-name { font-size: 14px; font-weight: 600; }
.mpl-email { font-size: 12px; color: var(--text-3); }
.mpl-date { font-size: 12px; color: var(--text-3); margin-left: auto; white-space: nowrap; }
.mini-user { display: flex; gap: 10px; align-items: center; }
.search-form { display: flex; gap: 8px; align-items: center; }
.search-input { padding: 8px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; min-width: 240px; }
.prog-name-cell { display: flex; gap: 12px; align-items: center; }
.table-thumb { width: 48px; height: 36px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.table-thumb-ph { width: 48px; height: 36px; border-radius: 4px; background: var(--green-light); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.admin-form .form-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.form-side { display: flex; flex-direction: column; gap: 16px; }
.current-thumb { width: 100%; border-radius: var(--radius-sm); margin-bottom: 10px; }
.add-pkg-form summary { cursor: pointer; }
.pkg-row { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.detail-row:last-child { border-bottom: none; }
.detail-row span:first-child { color: var(--text-3); font-size: 13px; }
.video-list { display: flex; flex-direction: column; gap: 2px; max-height: 600px; overflow-y: auto; }
.vl-item { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: var(--radius-sm); }
.vl-item:hover { background: var(--bg-2); }
.vl-info { flex: 1; min-width: 0; }
.vl-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vl-file { font-family: monospace; }
.file-drop-zone { border: 2px dashed var(--border-2); border-radius: var(--radius); padding: 32px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; position: relative; }
.file-drop-zone:hover, .file-drop-zone.dz-active { border-color: var(--green); background: var(--green-pale); }
.file-input-hidden { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.dz-icon { font-size: 36px; margin-bottom: 8px; }
.dz-text { font-size: 14px; color: var(--text-2); }
.dz-link { color: var(--green); font-weight: 600; cursor: pointer; }
.dz-file-name { font-size: 12px; color: var(--green); margin-top: 6px; font-weight: 500; }
.upload-progress { margin-bottom: 12px; }
.progress-track { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.progress-fill { height: 100%; background: var(--green); border-radius: 3px; width: 0; transition: width .2s; }
.progress-label { font-size: 12px; color: var(--text-2); }

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .pd-layout, .admin-two-col, .account-grid, .detail-grid, .watch-layout { grid-template-columns: 1fr; }
  .watch-layout { gap: 16px; }
  .watch-title { font-size: 1.1rem; }
  .watch-breadcrumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .watch-actions { flex-direction: column; align-items: stretch; }
  .watch-actions .btn { text-align: center; }
  .steps-grid { grid-template-columns: 1fr; }
  .admin-form .form-grid { grid-template-columns: 1fr; }
  .pd-sidebar { order: -1; }
}
@media (max-width: 768px) {
  .nav-patient, .nav-admin { transform: translateX(-100%); transition: transform .3s; }
  .nav-patient.open, .nav-admin.open { transform: none; }
  .patient-main, .admin-main, .watch-main { margin-left: 0; padding: 16px; }
  .nav-toggle { display: flex; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); padding: 16px 24px; border-bottom: 1px solid var(--border); gap: 12px; }
  .nav-links.open { display: flex; }
  .hero-title { font-size: 2rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .field-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .programs-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .auth-card { padding: 24px 20px; }
  .stats-grid { grid-template-columns: 1fr; }
}
