  :root {
    --cream: #faf7f2;
    --dark: #2c2825;
    --rose: #b08070;
    --muted: #7a6e68;
    --border: #e8e0d8;
    --white: #ffffff;
    --success: #3b6d11;
    --success-bg: #eaf3de;
    --warn: #854f0b;
    --warn-bg: #faeeda;
    --info-bg: #e6f1fb;
    --info: #185fa5;
    --danger: #a32d2d;
    --danger-bg: #fcebeb;
  }

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

  body {
    font-family: 'Jost', sans-serif;
    background: var(--cream);
    color: var(--dark);
    font-size: 15px;
    min-height: 100vh;
  }

  /* ── LOGIN SCREEN ── */
  #login-screen {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    padding: 2rem;
  }

  .login-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
  }

  .spa-wordmark {
    font-family: 'Cormorant Garamond', serif;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--rose);
    margin-bottom: 4px;
  }

  .spa-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 300;
    color: var(--dark);
    margin-bottom: 2rem;
    line-height: 1.1;
  }

  .login-label {
    display: block;
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
  }

  .login-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Jost', sans-serif;
    font-size: 15px;
    color: var(--dark);
    background: var(--cream);
    margin-bottom: 1rem;
    outline: none;
    transition: border-color 0.2s;
  }

  .login-input:focus { border-color: var(--rose); }

  .login-btn {
    width: 100%;
    padding: 13px;
    background: var(--dark);
    color: var(--cream);
    border: none;
    border-radius: 8px;
    font-family: 'Jost', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.5rem;
  }

  .login-btn:hover { background: var(--rose); }

  .login-hint {
    font-size: 12px;
    color: var(--muted);
    margin-top: 1rem;
  }

  /* ── PORTAL SHELL ── */
  #portal { display: none; min-height: 100vh; }

  /* Top Nav */
  .portal-nav {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .nav-brand {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 400;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .nav-brand-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--rose);
  }

  .nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }

  .nav-greeting {
    font-size: 13px;
    color: var(--muted);
  }

  .nav-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--rose);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
  }

  .nav-logout {
    font-size: 12px;
    color: var(--muted);
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'Jost', sans-serif;
  }

  .nav-logout:hover { color: var(--dark); }

  /* Sidebar + Content layout */
  .portal-body {
    display: flex;
    min-height: calc(100vh - 60px);
  }

  .sidebar {
    width: 220px;
    min-width: 220px;
    background: var(--white);
    border-right: 1px solid var(--border);
    padding: 2rem 0;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
  }

  .nav-section-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 1.5rem;
    margin-bottom: 8px;
    margin-top: 1.5rem;
  }

  .nav-section-label:first-child { margin-top: 0; }

  .sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 1.5rem;
    font-size: 14px;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
    border-left: 2px solid transparent;
  }

  .sidebar-link:hover { color: var(--dark); background: var(--cream); }
  .sidebar-link.active { color: var(--dark); background: var(--cream); border-left-color: var(--rose); font-weight: 500; }

  .nav-icon { width: 16px; text-align: center; font-size: 14px; }

  /* Main content */
  .portal-main {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
    max-width: 960px;
  }

  .page-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 300;
    color: var(--dark);
    margin-bottom: 0.25rem;
  }

  .page-subtitle {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 2rem;
  }

  /* ── VIEWS ── */
  .view { display: none; }
  .view.active { display: block; }

  /* Stat cards */
  .stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 2rem;
  }

  .stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
  }

  .stat-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
  }

  .stat-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 400;
    color: var(--dark);
    line-height: 1;
  }

  .stat-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
  }

  /* Cards */
  .card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
  }

  .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
  }

  .card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--dark);
  }

  .card-action {
    font-size: 12px;
    color: var(--rose);
    cursor: pointer;
    text-decoration: underline;
    background: none;
    border: none;
    font-family: 'Jost', sans-serif;
  }

  /* Next appointment hero */
  .appt-hero {
    background: var(--dark);
    color: var(--cream);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .appt-hero-label {
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(250,247,242,0.6);
    margin-bottom: 6px;
  }

  .appt-hero-service {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 300;
    margin-bottom: 4px;
  }

  .appt-hero-meta {
    font-size: 13px;
    color: rgba(250,247,242,0.7);
  }

  .appt-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }

  .btn-ghost {
    padding: 9px 20px;
    border: 1px solid rgba(250,247,242,0.3);
    border-radius: 8px;
    background: transparent;
    color: var(--cream);
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.15s;
  }

  .btn-ghost:hover { background: rgba(250,247,242,0.1); }

  .btn-primary {
    padding: 9px 20px;
    background: var(--rose);
    border: 1px solid var(--rose);
    border-radius: 8px;
    color: var(--white);
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.15s;
  }

  .btn-primary:hover { background: #9a6e60; border-color: #9a6e60; }

  .btn-outline {
    padding: 9px 20px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--dark);
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.15s;
  }

  .btn-outline:hover { border-color: var(--rose); color: var(--rose); }

  /* Appointment list items */
  .appt-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
  }

  .appt-row:last-child { border-bottom: none; }

  /* ── Follow-up read-only panel (inline on appointment cards) ── */
  .ro-page { padding: 20px 4px 8px; }
  .ro-lock-banner { display: flex; align-items: center; gap: 10px; background: #f0f5f0; border: 1px solid rgba(122,158,135,0.35); border-radius: 8px; padding: 11px 16px; margin-bottom: 28px; font-size: 0.72rem; letter-spacing: 0.06em; color: #7a9e87; }
  .ro-lock-banner svg { flex-shrink: 0; }
  .ro-section { margin-bottom: 32px; }
  .ro-section-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
  .ro-section-num { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; color: var(--rose-light, #d4a5a5); font-weight: 300; line-height: 1; }
  .ro-section-title { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; font-weight: 500; color: var(--dark); }
  .ro-field { margin-bottom: 14px; }
  .ro-label { font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
  .ro-value { font-size: 0.82rem; color: var(--dark); line-height: 1.6; }
  .ro-value.empty { color: var(--muted); font-style: italic; }
  .ro-mood { display: flex; align-items: center; gap: 10px; }
  .ro-mood-face { font-size: 1.6rem; }
  .ro-mood-label { font-size: 0.78rem; color: var(--dark); letter-spacing: 0.03em; }
  .ro-bar-row { margin-bottom: 14px; }
  .ro-bar-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
  .ro-bar-name { font-size: 0.75rem; color: var(--dark); }
  .ro-bar-val { font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; color: var(--rose); }
  .ro-bar-track { height: 4px; background: var(--border); border-radius: 2px; }
  .ro-bar-fill { height: 100%; background: linear-gradient(90deg, #d4a5a5, #b07a7a); border-radius: 2px; }
  .ro-tags { display: flex; flex-wrap: wrap; gap: 7px; }
  .ro-tag { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 20px; font-size: 0.68rem; letter-spacing: 0.03em; background: #f5ebe8; border: 1px solid #d4a5a5; color: #b07a7a; }
  .ro-tag.zone-focus { background: #f5ebe8; border-color: #d4a5a5; color: #b07a7a; }
  .ro-tag.zone-more  { background: #edf5ed; border-color: #a0caa0; color: #4a8a4a; }
  .ro-tag.zone-less  { background: #e8eef5; border-color: #a0b8d0; color: #7a96b0; }
  .ro-tag.zone-avoid { background: #fdf6e8; border-color: #d4b878; color: #c0a060; }
  .ro-stars { display: flex; gap: 5px; font-size: 1.4rem; }
  .ro-star-lit { color: #c9a96e; }
  .ro-star-dim { color: var(--border); }
  .ro-textarea-val { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; font-size: 0.8rem; color: var(--dark); line-height: 1.7; font-family: 'Jost', sans-serif; font-weight: 300; white-space: pre-wrap; min-height: 60px; }
  .ro-divider { border: none; border-top: 1px solid var(--border); margin: 28px 0; }

  .appt-date-block {
    text-align: center;
    min-width: 44px;
  }

  .appt-month {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rose);
  }

  .appt-day {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    color: var(--dark);
  }

  .appt-info { flex: 1; }

  .appt-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 2px;
  }

  .appt-detail {
    font-size: 12px;
    color: var(--muted);
  }

  .badge {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
  }

  .badge-success { background: var(--success-bg); color: var(--success); }
  .badge-warn { background: var(--warn-bg); color: var(--warn); }
  .badge-info { background: var(--info-bg); color: var(--info); }
  .badge-muted { background: var(--cream); color: var(--muted); border: 1px solid var(--border); }

  /* SOAP Note */
  .soap-section {
    margin-bottom: 1.5rem;
  }

  .soap-letter {
    display: inline-flex;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--rose);
    color: var(--white);
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    margin-right: 10px;
    flex-shrink: 0;
  }

  .soap-heading {
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
  }

  .soap-text {
    font-size: 14px;
    color: var(--dark);
    line-height: 1.7;
    padding-left: 38px;
  }

  /* Progress timeline */
  .timeline-item {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
  }

  .timeline-stem {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 36px;
  }

  .timeline-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--rose);
    border: 2px solid var(--white);
    outline: 1px solid var(--rose);
    flex-shrink: 0;
    margin-top: 4px;
  }

  .timeline-line {
    flex: 1;
    width: 1px;
    background: var(--border);
    margin-top: 4px;
  }

  .timeline-content {
    flex: 1;
    padding-bottom: 1rem;
  }

  .timeline-date {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
  }

  .timeline-service {
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    font-weight: 400;
    color: var(--dark);
    margin-bottom: 6px;
  }

  .timeline-notes {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
  }

  .timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
  }

  .tag {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--cream);
    color: var(--muted);
    border: 1px solid var(--border);
  }

  /* Body map placeholder */
  .body-map-wrap {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .body-figure {
    width: 120px;
    flex-shrink: 0;
  }

  .body-figure svg { width: 100%; }

  .body-legend { flex: 1; min-width: 200px; }

  .legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
  }

  .legend-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .legend-label { font-size: 13px; color: var(--dark); }
  .legend-sub { font-size: 11px; color: var(--muted); }

  /* Membership card */
  .membership-card {
    background: var(--dark);
    color: var(--cream);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
  }

  .membership-tier {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--rose);
    margin-bottom: 6px;
  }

  .membership-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 300;
    margin-bottom: 1.5rem;
  }

  .membership-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .membership-stat-label {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(250,247,242,0.55);
    margin-bottom: 4px;
  }

  .membership-stat-val {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 300;
  }

  /* ── PRINT STYLES ── */
  @media print {
    #login-screen, .portal-nav, .sidebar, .intake-tabs,
    .if-accordion-toggle, .if-edit-btn, .if-save-row,
    .if-sig-clear, .if-print-btn-row { display: none !important; }
    body { background: white; font-size: 13px; }
    .portal-body { display: block; }
    .portal-main { padding: 0; max-width: 100%; }
    .view { display: block !important; }
    .intake-panel { display: block !important; }
    .if-accordion-body { display: block !important; max-height: none !important; overflow: visible !important; }
    .if-section { border: 1px solid #ddd; border-radius: 0; margin-bottom: 0.75rem; break-inside: avoid; }
    .if-check.sel, .if-radio.sel { border-color: #888; background: #f5f5f5; }
    .if-check:not(.sel), .if-radio:not(.sel) { display: none; }
    .if-check-grid, .if-check-grid-3 { grid-template-columns: 1fr 1fr; }
    .if-input, .if-textarea { border: none; background: transparent; padding: 2px 0; }
    .if-locked-sig-img { display: block !important; }
    canvas.if-sig-canvas { display: none !important; }
    .if-locked-overlay { display: none !important; }
    .if-consent { page-break-inside: avoid; }
    .print-only { display: block !important; }
    .print-header { display: flex !important; }
  }

  .print-only { display: none; }

  .print-header {
    display: none;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #ddd;
  }

  /* ── LOCKED STATE (post-save) ── */
  .intake-panel.locked .if-input,
  .intake-panel.locked .if-textarea {
    background: #f4f1ed;
    border-color: #ddd5cc;
    color: var(--muted);
    pointer-events: none;
    cursor: default;
  }

  .intake-panel.locked .if-check,
  .intake-panel.locked .if-radio {
    pointer-events: none;
    cursor: default;
  }

  .intake-panel.locked .if-check:not(.sel),
  .intake-panel.locked .if-radio:not(.sel) { opacity: 0.4; }

  .intake-panel.locked .if-consent-check { pointer-events: none; }
  .intake-panel.locked .if-sig-clear { display: none; }
  .intake-panel.locked canvas.if-sig-canvas { pointer-events: none; cursor: default; }

  .intake-panel.locked .if-initial-input {
    background: #f4f1ed !important;
    border-color: #ddd5cc !important;
    color: var(--dark) !important;
    font-weight: 600;
    pointer-events: none;
  }

  .if-lock-banner {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(59,109,17,0.2);
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 1.25rem;
  }

  .intake-panel.locked .if-lock-banner { display: flex; }
  .if-lock-banner svg { width: 17px; height: 17px; flex-shrink: 0; }

  /* ── ACCORDION SECTIONS ── */
  .if-section {
    overflow: hidden;
  }

  .if-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    padding-bottom: 0.75rem;
    margin-bottom: 0;
  }

  .if-section-header:hover .if-heading { color: var(--rose); }

  .if-section-header-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .if-section-num {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rose);
    min-width: 1.4rem;
  }

  .if-chevron {
    width: 18px; height: 18px;
    color: var(--muted);
    transition: transform 0.22s ease;
    flex-shrink: 0;
  }

  .if-section.open .if-chevron { transform: rotate(180deg); }

  .if-section-body {
    display: none;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    margin-top: 0.75rem;
  }

  .if-section.open .if-section-body { display: block; }

  /* ── PRINT BUTTON ── */
  .if-print-btn-row {
    display: none;
    margin-top: 1.5rem;
  }

  .intake-panel.locked .if-print-btn-row { display: flex; }
  .intake-panel.locked .if-save-row { display: none; }

  .if-print-btn {
    flex: 1;
    padding: 11px;
    background: var(--white);
    color: var(--dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
  }

  .if-print-btn:hover { border-color: var(--rose); color: var(--rose); }
  .if-print-btn svg { width: 15px; height: 15px; }

  /* ── INTAKE TABS ── */
  .intake-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--white);
  }

  .intake-tab {
    flex: 1;
    padding: 11px 20px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
    background: var(--white);
    border: none;
    font-family: 'Jost', sans-serif;
  }

  .intake-tab + .intake-tab { border-left: 1px solid var(--border); }
  .intake-tab:hover { color: var(--dark); background: var(--cream); }
  .intake-tab.active { background: var(--dark); color: var(--cream); }

  .intake-panel { display: none; }
  .intake-panel.active { display: block; }

  /* ── INTAKE FIELD STYLES ── */
  .if-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
  }

  .if-heading {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--dark);
    transition: color 0.15s;
  }

  .if-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
  }

  .if-input, .if-textarea, .if-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Jost', sans-serif;
    font-size: 14px;
    color: var(--dark);
    background: var(--cream);
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
  }

  .if-input:focus, .if-textarea:focus, .if-select:focus { border-color: var(--rose); }
  .if-textarea { resize: vertical; min-height: 72px; line-height: 1.5; }

  .if-row { margin-bottom: 1.1rem; }
  .if-row:last-child { margin-bottom: 0; }

  .if-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  @media (max-width: 700px) { .if-grid-2 { grid-template-columns: 1fr; } }

  .if-divider { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }

  /* ── CHECK / RADIO TILES ── */
  .if-check-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .if-check-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 7px;
  }

  @media (max-width: 700px) {
    .if-check-grid, .if-check-grid-3 { grid-template-columns: 1fr; }
  }

  .if-check, .if-radio {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 13px;
    line-height: 1.3;
    user-select: none;
    background: var(--white);
  }

  .if-check:hover, .if-radio:hover { border-color: var(--rose); background: rgba(176,128,112,0.04); }
  .if-check.sel, .if-radio.sel { border-color: var(--rose); background: rgba(176,128,112,0.07); }

  .if-check input, .if-radio input {
    width: 15px; min-width: 15px; height: 15px;
    accent-color: var(--rose);
    cursor: pointer;
    padding: 0; border: none; background: none;
  }

  .if-yesno { display: flex; gap: 8px; }
  .if-yesno .if-radio { flex: 1; justify-content: center; }

  .if-stack { display: flex; flex-direction: column; gap: 7px; }

  .if-addon-price {
    font-size: 11px; color: var(--rose); font-weight: 500;
    margin-left: auto; white-space: nowrap;
  }

  /* ── INITIALS ROW ── */
  .if-initial-row {
    display: flex; align-items: center; gap: 12px;
    padding: 1rem; background: var(--cream);
    border-radius: 8px; border: 1px solid var(--border);
    margin-top: 1rem;
  }

  .if-initial-label { font-size: 12px; color: var(--muted); flex: 1; line-height: 1.5; }
  .if-initial-input { width: 76px !important; text-align: center; font-weight: 500; letter-spacing: 0.05em; }

  /* ── CONSENT BLOCKS ── */
  .if-consent {
    padding: 1rem 1.25rem;
    background: var(--cream);
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 0.75rem;
  }

  .if-consent-title {
    font-size: 11px; font-weight: 500;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--dark); margin-bottom: 5px;
  }

  .if-consent-text { font-size: 13px; color: var(--muted); line-height: 1.6; }

  .if-consent-check {
    display: flex; align-items: flex-start; gap: 9px;
    margin-top: 0.75rem; cursor: pointer;
  }

  .if-consent-check input {
    width: 15px; min-width: 15px; height: 15px; margin-top: 2px;
    accent-color: var(--rose); padding: 0; border: none; background: none;
  }

  .if-consent-check span { font-size: 13px; color: var(--dark); line-height: 1.5; }

  /* ── SIGNATURE PAD ── */
  .if-sig-wrap {
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--white); overflow: hidden; position: relative;
  }

  .if-sig-hint {
    font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--muted); position: absolute; bottom: 8px; left: 12px;
    pointer-events: none;
  }

  canvas.if-sig-canvas {
    display: block; width: 100%; height: 110px;
    touch-action: none; cursor: crosshair;
  }

  .if-sig-row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: end; }

  .if-sig-clear {
    padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px;
    background: var(--white); color: var(--muted); font-family: 'Jost', sans-serif;
    font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
    cursor: pointer; transition: all 0.15s; white-space: nowrap; align-self: flex-end;
  }

  .if-sig-clear:hover { border-color: var(--rose); color: var(--rose); }

  .if-biz-sig-row { display: flex; gap: 1.5rem; flex-wrap: wrap; }
  .if-biz-sig-field { flex: 1; min-width: 160px; }

  .if-biz-val {
    font-size: 14px; padding: 10px 14px;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--cream); color: var(--muted);
  }

  /* ── SAVE BUTTON ROW ── */
  .if-save-row { display: flex; justify-content: flex-end; margin-top: 1.5rem; gap: 10px; }

  /* Intake form */
  .form-row {
    margin-bottom: 1.25rem;
  }

  .form-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
  }

  .form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Jost', sans-serif;
    font-size: 14px;
    color: var(--dark);
    background: var(--cream);
    outline: none;
    transition: border-color 0.2s;
  }

  .form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--rose); }
  .form-textarea { resize: vertical; min-height: 80px; line-height: 1.6; }

  .form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

  .form-section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--dark);
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
  }

  .checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
  }

  .checkbox-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--rose); }
  .checkbox-row label { font-size: 14px; color: var(--dark); cursor: pointer; }

  /* Modal overlay */
  .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(44,40,37,0.55);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 2rem;
  }

  .modal-overlay.open { display: flex; }

  .modal {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
  }

  .modal-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 1.5rem;
  }

  .modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
  }

  /* Recommendation widget */
  .rec-card {
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
  }

  .rec-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--rose);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    color: var(--white);
  }

  .rec-title { font-size: 14px; font-weight: 500; color: var(--dark); margin-bottom: 4px; }
  .rec-body { font-size: 13px; color: var(--muted); line-height: 1.6; }

  /* Booking calendar placeholder */
  .cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 1.5rem;
  }

  .cal-day-label {
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 4px 0;
  }

  .cal-day {
    text-align: center;
    padding: 8px 4px;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--dark);
    transition: all 0.15s;
  }

  .cal-day:hover { background: var(--cream); }
  .cal-day.empty { color: transparent; pointer-events: none; }
  .cal-day.today { background: var(--dark); color: var(--cream); font-weight: 500; }
  .cal-day.available { background: var(--cream); color: var(--dark); }
  .cal-day.selected { background: var(--rose); color: var(--white); font-weight: 500; }
  .cal-day.unavailable { color: var(--border); pointer-events: none; }

  .time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-bottom: 1.5rem;
  }

  .time-slot {
    padding: 8px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
  }

  .time-slot:hover { border-color: var(--rose); color: var(--rose); }
  .time-slot.selected { background: var(--rose); border-color: var(--rose); color: var(--white); }
  .time-slot.full { color: var(--border); pointer-events: none; }

  /* Reschedule/cancel confirm */
  .appt-confirm-box {
    background: var(--danger-bg);
    border: 1px solid #f7c1c1;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    font-size: 13px;
    color: var(--danger);
    line-height: 1.6;
  }

  .progress-bar-wrap {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
  }

  .progress-bar-fill {
    height: 100%;
    background: var(--rose);
    border-radius: 3px;
    transition: width 0.4s;
  }

 <style id="azs-files-css">
 
/* ── FILES VIEW ─────────────────────────────────────────────── */
 
.files-section {
  margin-bottom: 1.5rem;
}
 
.files-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
 
.files-section-title {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose);
}
 
.files-section-badge {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
 
/* Card that wraps file rows */
.files-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
 
/* ── FILE ROW ── */
.file-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
  position: relative;
}
.file-row:last-child { border-bottom: none; }
.file-row:hover { background: #faf7f2; }
.file-row:hover .file-icon-wrap { border-color: var(--rose); }
 
/* Icon box */
.file-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--cream);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.file-icon-wrap svg { width: 20px; height: 20px; color: var(--muted); }
 
/* Text */
.file-info { flex: 1; min-width: 0; }
.file-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-meta {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
 
/* Right side */
.file-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
 
/* Status badge (small pill) */
.file-pill {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.file-pill-success { background: var(--success-bg); color: var(--success); }
.file-pill-warn    { background: var(--warn-bg);    color: var(--warn);    }
.file-pill-info    { background: var(--info-bg);    color: var(--info);    }
 
/* Action button */
.file-btn {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--dark);
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  text-decoration: none;
}
.file-btn:hover { border-color: var(--rose); color: var(--rose); }
.file-btn svg { width: 13px; height: 13px; }
.file-btn.generating { opacity: 0.55; pointer-events: none; }
 
/* Chevron hint */
.file-chevron {
  color: var(--border);
  flex-shrink: 0;
  transition: color 0.15s;
}
.file-row:hover .file-chevron { color: var(--rose); }
.file-chevron svg { width: 16px; height: 16px; display: block; }
 
/* Empty state inside a card */
.files-empty {
  padding: 2rem;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
 
/* ── SESSION NOTE REVIEW MODAL ──────────────────────────────── */
 
#note-review-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44, 40, 37, 0.55);
  z-index: 400;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem 1rem 3rem;
  overflow-y: auto;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
#note-review-modal.open { display: flex; }
 
.nrm-inner {
  background: var(--cream);
  border-radius: 20px;
  width: 100%;
  max-width: 640px;
  margin: auto;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(44, 40, 37, 0.22);
  animation: nrmSlideUp 0.25s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes nrmSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
 
/* Sticky nav bar */
.nrm-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1;
}
.nrm-nav-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-weight: 400;
  color: var(--dark);
}
.nrm-nav-actions { display: flex; gap: 8px; align-items: center; }
.nrm-close {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-size: 16px;
  transition: all 0.15s;
}
.nrm-close:hover { border-color: var(--rose); color: var(--rose); }
 
/* Header card */
.nrm-header {
  margin: 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
}
.nrm-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.nrm-header-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nrm-header-icon {
  width: 36px; height: 36px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nrm-header-icon svg { width: 18px; height: 18px; color: var(--muted); }
.nrm-doc-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--dark);
  line-height: 1.15;
}
.nrm-status-pill {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nrm-pill-completed { background: var(--success-bg); color: var(--success); }
.nrm-pill-draft     { background: var(--warn-bg);    color: var(--warn); }
 
.nrm-header-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 1.5rem;
}
.nrm-meta-item {}
.nrm-meta-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.nrm-meta-value {
  font-size: 13px;
  color: var(--dark);
  font-weight: 500;
}
 
/* Section cards */
.nrm-sections { padding: 0 1.25rem 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
 
.nrm-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
 
.nrm-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.nrm-section-left { display: flex; align-items: center; gap: 10px; }
.nrm-section-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.nrm-section-dot.complete { background: var(--success); }
.nrm-section-dot.partial  { background: var(--warn); }
 
.nrm-section-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
}
.nrm-section-status {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
 
.nrm-section-body { padding: 1rem 1.25rem; }
 
/* Labeled row inside a section */
.nrm-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.4rem 1rem;
  margin-bottom: 0.65rem;
  align-items: baseline;
}
.nrm-row:last-child { margin-bottom: 0; }
.nrm-row-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}
.nrm-row-value {
  font-size: 13px;
  color: var(--dark);
  line-height: 1.5;
}
 
/* Bullet list */
.nrm-bullets {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 5px;
}
.nrm-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--dark);
  line-height: 1.5;
}
.nrm-bullets li::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--rose);
  flex-shrink: 0;
  margin-top: 7px;
}
 
/* Divider between row groups */
.nrm-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.75rem 0;
}
 
/* Sticky footer */
.nrm-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
}
.nrm-btn-secondary {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--dark);
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.nrm-btn-secondary:hover { border-color: var(--rose); color: var(--rose); }
.nrm-btn-primary {
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: var(--dark);
  color: var(--cream);
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
}
.nrm-btn-primary:hover { background: var(--rose); }
.nrm-btn-primary svg { width: 14px; height: 14px; }
.nrm-btn-primary.no-pdf { opacity: 0.45; pointer-events: none; }
 

/* ── Spinner ── */
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════════════
   SKIN ANALYSIS — modal body styles
   Used in both standalone openSkinAnalysisModal()
   and embedded inside openNoteModal() Skin Analysis section
   ════════════════════════════════════════════════════════════ */

.sa-modal-body {
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Glogau card */
.sa-glogau-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.sa-glogau-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.sa-glogau-text { flex: 1; min-width: 0; }
.sa-glogau-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 2px;
}
.sa-glogau-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* Score section */
.sa-scores-title,
.sa-flags-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.sa-score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.sa-score-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.sa-score-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.sa-score-value {
  font-size: 22px;
  font-weight: 500;
  font-family: 'Cormorant Garamond', serif;
  line-height: 1;
  margin-bottom: 6px;
}
.sa-score-denom {
  font-size: 11px;
  color: var(--muted);
  font-family: 'Jost', sans-serif;
  font-weight: 400;
}
.sa-score-track {
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.sa-score-track--lg {
  height: 7px;
  border-radius: 4px;
}
.sa-score-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* Overall photoaging */
.sa-overall {
  padding: 10px 12px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.sa-overall-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
}
.sa-overall-label {
  font-size: 12px;
  color: var(--muted);
}
.sa-overall-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--dark);
}

/* Clinical findings */
.sa-findings {
  padding: 12px 14px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.sa-findings-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
}
.sa-findings-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

/* Treatment flags */
.sa-flags {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sa-flag-row {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.sa-flag-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
}
.sa-flag-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sa-flag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sa-flag-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
}
.sa-flag-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.sa-flag-detail {
  padding: 0 12px 10px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.sa-flag-finding {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  line-height: 1.4;
}
.sa-flag-rec {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: var(--dark);
  line-height: 1.4;
}

/* Skin Analysis section inside note modal */
.nrm-section--analysis .nrm-section-header {
  border-top: 2px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════
   MEMBERSHIP TAB ADDITIONS
   ═══════════════════════════════════════════════════════════ */

.btn {
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 18px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border-dark);
  background: #fff;
  color: var(--dark);
  transition: all 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { background: var(--cream); border-color: var(--muted); }

.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}
.tab {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 10px 18px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.tab:hover { color: var(--dark); }
.tab.active { color: var(--dark); border-bottom-color: var(--rose); font-weight: 500; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.mem-status-card {
  background: linear-gradient(135deg, #2a2220 0%, #3d3330 100%);
  border: none;
  border-radius: 16px;
  padding: 1.75rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.mem-status-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  border: 1px solid rgba(196,122,90,0.2);
}
.mem-status-card::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -20px;
  width: 220px; height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(196,122,90,0.12);
}
.mem-tier-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d9997e;
  border: 1px solid rgba(196,122,90,0.4);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 1rem;
}
.mem-holder-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 300;
  color: #fff;
  margin-bottom: 0.25rem;
}
.mem-status-active  { font-size:11px;font-weight:500;letter-spacing:0.08em;text-transform:uppercase;color:#7ec99a; }
.mem-status-paused  { font-size:11px;font-weight:500;letter-spacing:0.08em;text-transform:uppercase;color:#f0b472; }
.mem-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.mem-stat label { font-size:10px;font-weight:400;letter-spacing:0.08em;text-transform:uppercase;color:rgba(255,255,255,0.5);display:block;margin-bottom:4px; }
.mem-stat .val   { font-family:'Cormorant Garamond',serif;font-size:1.4rem;font-weight:400;color:#fff; }
.mem-stat .val.tokens { color:#d9997e; }

.token-pip {
  width:38px;height:38px;border-radius:50%;
  border:1.5px solid var(--border);
  display:flex;align-items:center;justify-content:center;
  font-size:11px;font-weight:500;color:var(--muted);
  background:var(--cream);transition:all 0.2s;
  flex-shrink:0;
}
.token-pip.filled { background:var(--rose);border-color:var(--rose);color:#fff; }
.token-pip.warn   { background:var(--warn-bg);border-color:var(--warn);color:var(--warn); }

.mem-spouse-row {
  display:flex;align-items:center;justify-content:space-between;
  padding:0.875rem 1rem;background:var(--cream);
  border:1px solid var(--border);border-radius:8px;margin-top:0.75rem;
}
.mem-spouse-avatar {
  width:34px;height:34px;border-radius:50%;
  background:var(--rose-pale);border:1px solid var(--border-dark);
  display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:500;color:var(--rose);flex-shrink:0;
}
.mem-notice-bar {
  display:flex;align-items:flex-start;gap:10px;padding:1rem;
  background:var(--warn-bg);border:1px solid #e8d0b8;border-radius:8px;
  font-size:13px;color:var(--warn);margin-bottom:1.25rem;
}
.mem-terms-block {
  background:var(--cream);border:1px solid var(--border);border-radius:8px;
  padding:1rem;font-size:13px;color:var(--muted);
  margin-bottom:1.25rem;max-height:160px;overflow-y:auto;line-height:1.7;
}
.mem-terms-block p { margin-bottom:0.75rem; }
.mem-terms-block p:last-child { margin-bottom:0; }
.mem-checkbox-row {
  display:flex;align-items:flex-start;gap:10px;
  margin-bottom:1.25rem;font-size:13px;color:var(--dark);cursor:pointer;
}
.mem-checkbox-row input[type="checkbox"] {
  width:16px;height:16px;accent-color:var(--rose);
  margin-top:2px;flex-shrink:0;cursor:pointer;
}
.mem-modal-backdrop {
  display:none;position:fixed;inset:0;
  background:rgba(42,34,32,0.5);z-index:200;
  align-items:center;justify-content:center;padding:1rem;
}
.mem-modal-backdrop.open { display:flex; }
.mem-modal { background:#fff;border-radius:16px;padding:2rem;max-width:400px;width:100%; }
.mem-modal-title { font-family:'Cormorant Garamond',serif;font-size:1.3rem;font-weight:400;color:var(--dark);margin-bottom:0.75rem; }
.mem-modal-body  { font-size:14px;color:var(--muted);line-height:1.7;margin-bottom:1.5rem; }
.mem-modal-actions { display:flex;gap:10px;justify-content:flex-end; }
.mem-page-btn {
  width:32px;height:32px;border-radius:6px;border:1px solid var(--border);
  background:#fff;font-size:13px;color:var(--dark);cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  font-family:'Jost',sans-serif;transition:all 0.15s;
}
.mem-page-btn:hover  { border-color:var(--muted);background:var(--cream); }
.mem-page-btn.active { background:var(--dark);border-color:var(--dark);color:#fff; }
.mem-page-btn:disabled { opacity:0.35;cursor:default; }
.mem-signup-price {
  font-family:'Cormorant Garamond',serif;font-size:3rem;
  font-weight:300;color:var(--dark);line-height:1;text-align:center;
}
@media(max-width:480px){
  .mem-stats-row { grid-template-columns:repeat(2,1fr); }
}
