:root {
  /* Klemmer brand: white background, red + black, gold trim */
  --bg: #FFFFFF; --surface: #FFFFFF;
  --border: rgba(0,0,0,0.08); --border-strong: rgba(0,0,0,0.15);
  --text: #1A1A1A; --text-muted: #777; --text-faint: #AAA;
  --accent: #C8202E; --accent-light: #FBEAEC;
  --gold: #D9A52C; --gold-light: #FBF1D6;
  --danger: #8B1A1A; --radius: 10px; --radius-sm: 6px;
  --g1: #2D5A3D; --g1-light: #EBF2EE;
  --g2: #4A3B8C; --g2-light: #EEEAF8;
  --g3: #C9A84C; --g3-light: #FBF5E6;
  --g4: #A84A2D; --g4-light: #F9EDE9;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; font-size: 15px; }

/* NAV */
nav { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 2rem; background: var(--surface); border-bottom: 2px solid var(--gold); position: sticky; top: 0; z-index: 50; }
.nav-logo { display: flex; align-items: center; gap: 0.6rem; font-family: 'DM Serif Display', serif; font-size: 22px; color: var(--text); letter-spacing: -0.5px; cursor: pointer; }
.nav-logo-img { height: 40px; width: auto; display: block; }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-label { font-size: 13px; color: var(--text-muted); }
.saving-badge { font-size: 11px; color: var(--text-faint); opacity: 0; transition: opacity 0.2s; }
.saving-badge.show { opacity: 1; }

.view { display: none; }
.view.active { display: block; }

/* BUTTONS */
.btn-primary { background: var(--accent); color: white; border: none; border-radius: var(--radius-sm); padding: 0.75rem 1.5rem; font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 500; cursor: pointer; transition: opacity 0.15s; width: 100%; margin-top: 0.5rem; }
.btn-primary:hover { opacity: 0.85; }
.btn-sm { padding: 0.4rem 0.85rem; background: var(--accent); color: white; border: none; border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 13px; cursor: pointer; white-space: nowrap; transition: opacity 0.15s; }
.btn-sm:hover { opacity: 0.85; }
.btn-sm.ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border-strong); }
.btn-sm.ghost:hover { background: var(--bg); opacity: 1; }
.btn-icon { background: none; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); font-size: 16px; transition: all 0.15s; font-family: 'DM Sans', sans-serif; flex-shrink: 0; }
.btn-icon:hover { background: var(--accent); color: white; border-color: var(--gold); }
.btn-icon:disabled { opacity: 0.3; cursor: not-allowed; }
.btn-icon:disabled:hover { background: none; color: var(--text-muted); border-color: var(--border-strong); }

.toast { position: fixed; bottom: 1.5rem; right: 1.5rem; background: var(--accent); color: white; padding: 0.6rem 1rem; border-radius: var(--radius-sm); font-size: 13px; opacity: 0; transition: opacity 0.2s; pointer-events: none; z-index: 999; }
.toast.show { opacity: 1; }

/* MODAL */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 100; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius); padding: 2rem; max-width: 440px; width: 90%; }
.modal h2 { font-family: 'DM Serif Display', serif; font-size: 24px; color: var(--text); margin-bottom: 0.25rem; }
.modal-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 1.5rem; }
.modal-close { float: right; background: none; border: none; font-size: 20px; color: var(--text-faint); cursor: pointer; margin-top: -4px; }
.modal-close:hover { color: var(--text); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 6px; }
.field input { width: 100%; padding: 0.65rem 0.9rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 15px; background: var(--surface); color: var(--text); outline: none; transition: border-color 0.15s; }
.field input:focus { border-color: var(--gold); }

/* ═══ LANDING ═══ */
.landing-wrap { max-width: 480px; margin: 8rem auto; padding: 0 1.5rem; text-align: center; }
.landing-wrap h1 { font-family: 'DM Serif Display', serif; font-size: 48px; color: var(--text); margin-bottom: 0.5rem; }
.landing-wrap p { font-size: 14px; color: var(--text-muted); margin-bottom: 2.5rem; }
.landing-actions { display: flex; flex-direction: column; gap: 0.75rem; }
.landing-load-row { display: flex; gap: 8px; }
.landing-load-row input { flex: 1; padding: 0.65rem 0.9rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 15px; background: var(--surface); color: var(--text); outline: none; }
.landing-load-row input:focus { border-color: var(--gold); }
.landing-divider { font-size: 12px; color: var(--text-faint); margin: 0.5rem 0; }

.current-camp-banner { background: var(--accent-light); border: 1px solid var(--accent); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.75rem; text-align: center; }
.current-camp-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; color: var(--accent); margin-bottom: 4px; }
.current-camp-name { font-family: 'DM Serif Display', serif; font-size: 24px; color: var(--text); }
.current-camp-dates { font-size: 12px; color: var(--accent); opacity: 0.7; margin-top: 3px; }

.camp-search-wrap { position: relative; margin-bottom: 1rem; text-align: left; }
.camp-search-input { width: 100%; padding: 0.65rem 0.9rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 14px; background: var(--surface); color: var(--text); outline: none; transition: border-color 0.15s; }
.camp-search-input:focus { border-color: var(--gold); }
.camp-results { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border-strong); border-top: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm); z-index: 20; display: none; max-height: 220px; overflow-y: auto; }
.camp-results.open { display: block; }
.camp-result-item { padding: 0.65rem 1rem; cursor: pointer; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; transition: background 0.1s; }
.camp-result-item:last-child { border-bottom: none; }
.camp-result-item:hover { background: var(--accent-light); }
.camp-result-item.active { background: var(--accent-light); }
.camp-result-name { font-size: 14px; font-weight: 500; color: var(--text); }
.camp-result-dates { font-size: 11px; color: var(--text-faint); }

.new-camp-btn { margin-top: 2.5rem; background: none; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 0.6rem 1.25rem; font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--text-faint); cursor: pointer; width: 100%; transition: all 0.15s; }
.new-camp-btn:hover { border-color: var(--gold); color: var(--accent); background: var(--accent-light); }

/* ═══ HOME / ROSTER ═══ */
.home-wrap { max-width: 960px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.home-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 2rem; gap: 1rem; flex-wrap: wrap; }
.home-header h1 { font-family: 'DM Serif Display', serif; font-size: 32px; color: var(--text); }
.home-header-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.home-header-right { display: flex; gap: 8px; align-items: flex-start; flex-shrink: 0; }
.team-id-badge { font-size: 11px; color: var(--text-faint); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 10px; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.15s; }
.team-id-badge:hover { border-color: var(--gold); color: var(--accent); }

.team-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1.5rem; overflow: hidden; }
.team-header { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--border); background: var(--bg); gap: 1rem; }
.team-name-input { font-size: 13px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; border: none; background: transparent; outline: none; font-family: 'DM Sans', sans-serif; min-width: 80px; flex: 1; }
.team-name-input:focus { border-bottom: 1px solid var(--border-strong); }
.team-header-right { display: flex; gap: 6px; align-items: center; }
.team-id-pill { font-size: 10px; color: var(--text-faint); font-family: monospace; cursor: pointer; padding: 2px 6px; border: 1px solid var(--border); border-radius: 4px; transition: all 0.15s; }
.team-id-pill:hover { color: var(--accent); border-color: var(--gold); }

.roster-col-headers { display: grid; grid-template-columns: 180px 1fr 120px; border-bottom: 1px solid var(--border); }
.col-header { padding: 0.4rem 1rem; font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-faint); border-right: 1px solid var(--border); }
.col-header:last-child { border-right: none; }

/* Each client = a group of 4 goal rows + a name cell spanning them */
.client-block { display: grid; grid-template-columns: 180px 1fr 120px; border-bottom: 2px solid var(--border); }
.client-block:last-child { border-bottom: none; }
.client-block:hover { background: #FAFAF8; }

.client-name-cell { padding: 0.75rem 1rem; border-right: 1px solid var(--border); display: flex; align-items: center; }
.client-name-input { font-size: 14px; font-weight: 500; color: var(--text); border: none; background: transparent; outline: none; font-family: 'DM Sans', sans-serif; width: 100%; }
.client-name-input::placeholder { color: var(--text-faint); font-weight: 400; font-size: 13px; }

.client-goals-col { border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.goal-row { display: grid; grid-template-columns: 130px 1fr; border-bottom: 1px solid var(--border); min-height: 36px; }
.goal-row:last-child { border-bottom: none; }
.goal-cat { padding: 0.5rem 1rem; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); border-right: 1px solid var(--border); display: flex; align-items: center; }
.goal-cat.g1 { color: var(--g1); } .goal-cat.g2 { color: var(--g2); }
.goal-cat.g3 { color: var(--g3); } .goal-cat.g4 { color: var(--g4); }
.goal-text-cell { padding: 0.5rem 1rem; font-size: 13px; color: var(--text-muted); display: flex; align-items: center; }
.goal-text-cell.filled { color: var(--text); }
.goal-text-cell.empty { color: var(--text-faint); font-style: italic; }
.goal-inline-input { flex: 1; border: none; background: transparent; outline: none; font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--text); padding: 0.5rem 1rem; width: 100%; transition: background 0.15s; }
.goal-inline-input::placeholder { color: var(--text-faint); font-style: italic; }
.goal-inline-input:focus { background: var(--accent-light); }
.goal-inline-input:disabled { color: var(--text-faint); cursor: not-allowed; }

.client-actions-col { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 0.75rem; flex-direction: column; }
.row-btn { font-size: 11px; font-weight: 500; padding: 4px 9px; border-radius: 99px; border: 1px solid var(--border-strong); background: transparent; cursor: pointer; color: var(--text-muted); transition: all 0.15s; font-family: 'DM Sans', sans-serif; white-space: nowrap; width: 100%; text-align: center; }
.row-btn:hover { background: var(--accent); color: white; border-color: var(--gold); }
.row-btn.goals-btn { border-color: var(--g2); color: var(--g2); }
.row-btn.goals-btn:hover { background: var(--g2); color: white; }

.client-search-bar { position: relative; padding: 0.65rem 1.25rem; border-bottom: 1px solid var(--border); background: var(--bg); }
.client-search-input { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 13px; background: var(--surface); color: var(--text); outline: none; transition: border-color 0.15s; }
.client-search-input:focus { border-color: var(--gold); }
.client-search-results { position: absolute; left: 1.25rem; right: 1.25rem; top: 100%; background: var(--surface); border: 1px solid var(--border-strong); border-top: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm); z-index: 30; display: none; max-height: 200px; overflow-y: auto; }
.client-search-results.open { display: block; }
.client-search-result { padding: 0.6rem 1rem; cursor: pointer; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-size: 13px; transition: background 0.1s; }
.client-search-result:last-child { border-bottom: none; }
.client-search-result:hover { background: var(--accent-light); }
.client-search-result-name { font-weight: 500; color: var(--text); }
.client-search-result-meta { font-size: 11px; color: var(--text-faint); }

/* ═══ GOAL SETUP ═══ */
.goals-setup-wrap { max-width: 680px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); background: none; border: none; cursor: pointer; font-family: 'DM Sans', sans-serif; padding: 0; margin-bottom: 1.5rem; transition: color 0.15s; }
.back-btn:hover { color: var(--accent); }
.goals-setup-header { margin-bottom: 2rem; }
.goals-setup-header h2 { font-family: 'DM Serif Display', serif; font-size: 28px; color: var(--text); }
.goals-setup-header p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.goal-setup-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1rem; overflow: hidden; }
.goal-setup-card-header { display: flex; align-items: center; gap: 10px; padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--border); }
.goal-color-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.goal-color-dot.g1 { background: var(--g1); } .goal-color-dot.g2 { background: var(--g2); }
.goal-color-dot.g3 { background: var(--g3); } .goal-color-dot.g4 { background: var(--g4); }
.goal-category-tag { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; padding: 2px 8px; border-radius: 99px; }
.goal-category-tag.g1 { background: var(--g1-light); color: var(--g1); }
.goal-category-tag.g2 { background: var(--g2-light); color: var(--g2); }
.goal-category-tag.g3 { background: var(--g3-light); color: var(--g3); }
.goal-category-tag.g4 { background: var(--g4-light); color: var(--g4); }
.goal-setup-card-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.goal-field-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 5px; }
.goal-text-input { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.6rem 0.75rem; font-family: 'DM Serif Display', serif; font-size: 18px; color: var(--text); background: var(--bg); outline: none; transition: border-color 0.15s; line-height: 1.4; }
.goal-text-input:focus { border-color: var(--gold); background: var(--surface); }
.goal-text-input::placeholder { color: var(--text-faint); font-style: italic; font-size: 15px; }
.goal-why-input { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.6rem 0.75rem; font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--text); background: var(--bg); outline: none; resize: vertical; line-height: 1.6; transition: border-color 0.15s; min-height: 60px; }
.goal-why-input:focus { border-color: var(--gold); background: var(--surface); }
.goal-why-input::placeholder { color: var(--text-faint); font-style: italic; }
.goals-save-row { display: flex; gap: 8px; margin-top: 1rem; align-items: center; }
.goals-saved-msg { font-size: 12px; color: var(--accent); opacity: 0; transition: opacity 0.3s; }
.goals-saved-msg.show { opacity: 1; }

/* ═══ TRACKER ═══ */
.tracker-wrap { max-width: 900px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.tracker-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 2rem; gap: 1rem; }
.tracker-header-left h2 { font-family: 'DM Serif Display', serif; font-size: 28px; color: var(--text); }
.tracker-header-left p { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.tracker-header-right { display: flex; gap: 8px; flex-shrink: 0; }

.week-nav-bar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 2rem; display: flex; align-items: center; gap: 1rem; }
.week-nav-info { flex: 1; }
.week-nav-label { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--text); }
.week-nav-sub { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.week-dots { display: flex; gap: 4px; flex-wrap: wrap; max-width: 300px; }
.week-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); cursor: pointer; transition: background 0.15s; flex-shrink: 0; }
.week-dot.active { background: var(--accent); }
.week-dot.visited { background: var(--accent-light); border: 1px solid var(--accent); }

.goals-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 2rem; }
.goal-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.goal-card-header { padding: 1rem 1.25rem 0.75rem; border-bottom: 2px solid var(--border); display: flex; align-items: flex-start; gap: 12px; }
.goal-card-header.g1 { border-bottom-color: var(--g1); } .goal-card-header.g2 { border-bottom-color: var(--g2); }
.goal-card-header.g3 { border-bottom-color: var(--g3); } .goal-card-header.g4 { border-bottom-color: var(--g4); }
.goal-tag { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; padding: 3px 8px; border-radius: 99px; white-space: nowrap; margin-top: 2px; flex-shrink: 0; }
.goal-tag.g1 { background: var(--g1-light); color: var(--g1); } .goal-tag.g2 { background: var(--g2-light); color: var(--g2); }
.goal-tag.g3 { background: var(--g3-light); color: var(--g3); } .goal-tag.g4 { background: var(--g4-light); color: var(--g4); }
.goal-card-title-area { flex: 1; min-width: 0; }
.goal-card-name { font-family: 'DM Serif Display', serif; font-size: 14px; color: var(--text); line-height: 1.35; }
.goal-card-name.empty { color: var(--text-faint); font-style: italic; font-family: 'DM Sans', sans-serif; font-size: 12px; }
.goal-card-why { font-size: 11px; color: var(--text-faint); margin-top: 3px; font-style: italic; line-height: 1.4; }
.edit-goal-link { font-size: 10px; color: var(--text-faint); cursor: pointer; text-decoration: underline; margin-top: 3px; background: none; border: none; font-family: 'DM Sans', sans-serif; padding: 0; display: block; }
.edit-goal-link:hover { color: var(--accent); }
.goal-card-body { padding: 1rem 1.25rem; flex: 1; display: flex; flex-direction: column; gap: 0.85rem; }
.section-label { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 5px; display: flex; align-items: center; gap: 6px; }
.section-label .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dot.g1 { background: var(--g1); } .dot.g2 { background: var(--g2); }
.dot.g3 { background: var(--g3); } .dot.g4 { background: var(--g4); }
.intention-input { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.6rem 0.75rem; font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--text); background: var(--bg); outline: none; resize: none; line-height: 1.5; transition: border-color 0.15s; min-height: 52px; }
.intention-input:focus { border-color: var(--gold); background: var(--surface); }
.action-rows { display: flex; flex-direction: column; gap: 5px; }
.action-row { display: flex; align-items: flex-start; gap: 8px; }
.action-num { font-size: 11px; font-weight: 500; color: var(--text-faint); width: 16px; flex-shrink: 0; margin-top: 9px; text-align: center; }
.check-btn { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.15s; padding: 0; margin-top: 8px; }
.check-btn.done { border-color: var(--gold); background: var(--accent); }
.check-btn.done::after { content: '✓'; color: white; font-size: 9px; }
.action-input { flex: 1; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.45rem 0.6rem; font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--text); background: var(--bg); outline: none; resize: none; line-height: 1.5; transition: border-color 0.15s; min-height: 36px; }
.action-input:focus { border-color: var(--gold); background: var(--surface); }
.action-input.done { text-decoration: line-through; color: var(--text-faint); }
.card-divider { height: 1px; background: var(--border); margin: 0 -1.25rem; }
.met-row { display: flex; align-items: center; gap: 8px; }
.met-label { font-size: 12px; color: var(--text-muted); flex: 1; }
.met-btns { display: flex; gap: 4px; }
.met-btn { font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--border-strong); background: transparent; cursor: pointer; color: var(--text-muted); transition: all 0.15s; font-family: 'DM Sans', sans-serif; }
.met-btn.yes.active { background: var(--accent); color: white; border-color: var(--gold); }
.met-btn.no.active { background: var(--danger); color: white; border-color: var(--danger); }
.met-btn:not(.active):hover { background: var(--bg); }
.journal-input { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.6rem 0.75rem; font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--text); background: var(--bg); outline: none; resize: vertical; line-height: 1.6; transition: border-color 0.15s; min-height: 80px; }
.journal-input:focus { border-color: var(--gold); background: var(--surface); }
.journal-input::placeholder { color: var(--text-faint); font-style: italic; }
.dashboard-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-top: 0.5rem; }
.dash-title { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-faint); margin-bottom: 1rem; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat-card { background: var(--bg); border-radius: var(--radius-sm); padding: 0.75rem 1rem; border-left: 3px solid var(--border-strong); }
.stat-card.g1 { border-left-color: var(--g1); } .stat-card.g2 { border-left-color: var(--g2); }
.stat-card.g3 { border-left-color: var(--g3); } .stat-card.g4 { border-left-color: var(--g4); }
.stat-l { font-size: 11px; color: var(--text-faint); margin-bottom: 4px; }
.stat-n { font-family: 'DM Serif Display', serif; font-size: 22px; color: var(--text); }
.stat-s { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.prog-bar { height: 3px; background: var(--border); border-radius: 99px; margin-top: 6px; }
.prog-fill { height: 3px; border-radius: 99px; background: var(--accent); }
.share-row { margin-top: 1.5rem; text-align: center; }
.share-btn { background: none; border: none; font-family: 'DM Sans', sans-serif; font-size: 12px; color: var(--text-faint); cursor: pointer; text-decoration: underline; }
.share-btn:hover { color: var(--text-muted); }

.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: middle; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state { text-align: center; padding: 4rem; color: var(--text-muted); font-size: 14px; }

/* ═══ GOAL TARGET INPUT ═══ */
.goal-target-input { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.6rem 0.75rem; font-family: 'DM Sans', sans-serif; font-size: 15px; color: var(--text); background: var(--bg); outline: none; transition: border-color 0.15s; }
.goal-target-input:focus { border-color: var(--gold); background: var(--surface); }
.goal-target-hint { font-size: 11px; color: var(--text-faint); margin-top: 4px; }

/* ═══ WEEKLY PROGRESS ═══ */
.progress-section { display: flex; gap: 0.75rem; align-items: flex-end; }
.progress-input-wrap { flex: 1; }
.progress-pct-wrap { display: flex; flex-direction: column; }
.progress-pct-label { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 5px; }
.progress-pct-value { padding: 0.6rem 0.75rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: 'DM Serif Display', serif; font-size: 18px; color: var(--text); text-align: center; min-width: 80px; }
.progress-input { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.6rem 0.75rem; font-family: 'DM Sans', sans-serif; font-size: 15px; color: var(--text); background: var(--bg); outline: none; transition: border-color 0.15s; }
.progress-input:focus { border-color: var(--gold); background: var(--surface); }

/* ═══ OVERALL PROGRESS SUMMARY ═══ */
.overall-summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 2rem; }
.overall-summary-title { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-faint); margin-bottom: 1rem; }
.overall-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.summary-card { background: var(--bg); border-radius: var(--radius-sm); padding: 0.75rem 1rem; border-left: 3px solid var(--border-strong); text-align: center; }
.summary-card.g1 { border-left-color: var(--g1); } .summary-card.g2 { border-left-color: var(--g2); }
.summary-card.g3 { border-left-color: var(--g3); } .summary-card.g4 { border-left-color: var(--g4); }
.summary-cat { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 6px; }
.summary-cat.g1 { color: var(--g1); } .summary-cat.g2 { color: var(--g2); }
.summary-cat.g3 { color: var(--g3); } .summary-cat.g4 { color: var(--g4); }
.summary-pct { font-family: 'DM Serif Display', serif; font-size: 24px; color: var(--text); }
.summary-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ═══ TEAM NAV ═══ */
.team-nav { display: none; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 57px; z-index: 49; }
.team-nav.show { display: block; }
.team-nav-inner { max-width: 960px; margin: 0 auto; display: flex; padding: 0 1.5rem; }
.team-nav-link { font-size: 13px; font-weight: 500; color: var(--text-muted); padding: 0.65rem 1rem; border-bottom: 2px solid transparent; cursor: pointer; transition: all 0.15s; background: none; border-top: none; border-left: none; border-right: none; font-family: 'DM Sans', sans-serif; }
.team-nav-link:hover { color: var(--accent); }
.team-nav-link.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ═══ TEAM DASHBOARD ═══ */
.dash-wrap { max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.dash-section { margin-bottom: 2.5rem; }
.dash-section-title { font-family: 'DM Serif Display', serif; font-size: 22px; color: var(--text); margin-bottom: 1rem; }
.status-pill { font-size: 10px; font-weight: 500; padding: 2px 8px; border-radius: 99px; white-space: nowrap; cursor: pointer; border: 1px solid transparent; transition: opacity 0.15s; }
.status-pill:hover { opacity: 0.75; }
.status-pill.in_progress { background: var(--bg); color: var(--text-muted); border-color: var(--border-strong); }
.status-pill.ready_for_approval { background: #FEF3C7; color: #92400E; border-color: #F59E0B; }
.status-pill.dead { background: #FEE2E2; color: #991B1B; border-color: #EF4444; }
/* Commitment grid */
.commit-grid-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.commit-grid { border-collapse: collapse; background: var(--surface); white-space: nowrap; }
.commit-grid th, .commit-grid td { border: 1px solid var(--border); }
.cg-corner { background: var(--bg); border-right: 2px solid var(--border-strong) !important; min-width: 60px; }
.cg-week-label { font-size: 11px; font-weight: 500; color: var(--text-muted); padding: 0.3rem 0.75rem; text-align: right; background: var(--bg); border-right: 2px solid var(--border-strong) !important; white-space: nowrap; }
.cg-member-name { text-align: center; padding: 0.35rem 0.5rem; font-size: 12px; font-weight: 500; color: var(--text); background: var(--bg); border-left: 2px solid var(--border-strong) !important; }
.cg-cat-header { text-align: center; padding: 0.3rem 0.4rem; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; background: var(--bg); min-width: 36px; }
.cg-cat-header.member-first { border-left: 2px solid var(--border-strong) !important; }
.cg-cell { text-align: center; padding: 0.22rem 0.3rem; }
.cg-cell.member-first { border-left: 2px solid var(--border-strong) !important; }
.cg-pill-yes { display: inline-block; background: #D1FAE5; color: #065F46; font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 99px; border: 1px solid #6EE7B7; }
.cg-pill-no  { display: inline-block; background: #FEE2E2; color: #991B1B; font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 99px; border: 1px solid #FCA5A5; }
.cg-empty { display: inline-block; width: 14px; height: 5px; background: var(--border); border-radius: 99px; vertical-align: middle; }
.commit-legend { display: flex; gap: 1.25rem; margin-top: 0.65rem; align-items: center; flex-wrap: wrap; }
.commit-legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-muted); }
.commit-legend-swatch { width: 12px; height: 12px; border-radius: 2px; flex-shrink: 0; }
.commit-legend-swatch.yes  { background: #D1FAE5; border: 1px solid #6EE7B7; }
.commit-legend-swatch.no   { background: #FEE2E2; border: 1px solid #FCA5A5; }
.commit-legend-swatch.none { background: var(--border); border-radius: 99px; height: 5px; width: 14px; }
/* Collective */
.collective-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.collective-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; border-top: 3px solid var(--border-strong); }
.collective-card.g1 { border-top-color: var(--g1); } .collective-card.g2 { border-top-color: var(--g2); }
.collective-card.g3 { border-top-color: var(--g3); } .collective-card.g4 { border-top-color: var(--g4); }
.collective-cat { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.5rem; }
.collective-cat.g1 { color: var(--g1); } .collective-cat.g2 { color: var(--g2); }
.collective-cat.g3 { color: var(--g3); } .collective-cat.g4 { color: var(--g4); }
.collective-pct { font-family: 'DM Serif Display', serif; font-size: 32px; color: var(--text); line-height: 1; }
/* My Goals (approvals page) */
.my-goals-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.5rem; }
.my-goals-title { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-faint); margin-bottom: 1rem; }
.my-goals-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.my-goals-item { display: flex; flex-direction: column; gap: 5px; }
.my-goals-cat { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.my-goals-cat.g1 { color: var(--g1); } .my-goals-cat.g2 { color: var(--g2); }
.my-goals-cat.g3 { color: var(--g3); } .my-goals-cat.g4 { color: var(--g4); }
/* Approval progress strip */
.approval-progress-strip { display: flex; gap: 1.25rem; padding: 0.65rem 1.25rem; background: #FAFAF8; border-bottom: 1px solid var(--border); flex-wrap: wrap; align-items: baseline; }
.approval-progress-item { display: flex; align-items: baseline; gap: 5px; }
.approval-progress-cat { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.approval-progress-cat.g1 { color: var(--g1); } .approval-progress-cat.g2 { color: var(--g2); }
.approval-progress-cat.g3 { color: var(--g3); } .approval-progress-cat.g4 { color: var(--g4); }
.approval-progress-pct { font-family: 'DM Serif Display', serif; font-size: 16px; color: var(--text); }

/* ═══ GOAL APPROVALS ═══ */
.approvals-wrap { max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.approvals-header { margin-bottom: 1.5rem; }
.approvals-header h2 { font-family: 'DM Serif Display', serif; font-size: 28px; color: var(--text); }
.approvals-header p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.approver-selector { margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.approver-selector label { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.approver-select { padding: 0.5rem 0.75rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 14px; background: var(--surface); color: var(--text); outline: none; cursor: pointer; }
.approvals-empty { text-align: center; padding: 3rem; color: var(--text-muted); font-size: 14px; }
.approval-client-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1rem; overflow: hidden; }
.approval-client-name { font-size: 14px; font-weight: 500; color: var(--text); padding: 0.75rem 1.25rem; background: var(--bg); border-bottom: 1px solid var(--border); }
.approval-goal-row { display: flex; align-items: center; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--border); gap: 1rem; }
.approval-goal-row:last-child { border-bottom: none; }
.approval-goal-cat { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; min-width: 90px; flex-shrink: 0; }
.approval-goal-cat.g1 { color: var(--g1); } .approval-goal-cat.g2 { color: var(--g2); }
.approval-goal-cat.g3 { color: var(--g3); } .approval-goal-cat.g4 { color: var(--g4); }
.approval-goal-name { font-size: 13px; color: var(--text); flex: 1; min-width: 0; }
.approval-btns { display: flex; gap: 6px; flex-shrink: 0; }
.approval-btn { font-size: 11px; font-weight: 500; padding: 4px 12px; border-radius: 99px; border: 1px solid var(--border-strong); background: transparent; cursor: pointer; color: var(--text-muted); transition: all 0.15s; font-family: 'DM Sans', sans-serif; }
.approval-btn:not(.active):hover { background: var(--bg); }
.approval-btn.active.approved { background: var(--accent); color: white; border-color: var(--gold); }
.approval-btn.active.flagged { background: var(--danger); color: white; border-color: var(--danger); }

/* ═══ INDIVIDUAL PROGRESS MATRIX ═══ */
.indiv-matrix { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.indiv-grid { display: grid; }
.indiv-corner { background: var(--bg); border-right: 2px solid var(--border-strong); border-bottom: 2px solid var(--border-strong); }
.indiv-member-col { text-align: center; padding: 0.6rem 0.5rem; background: var(--bg); border-right: 1px solid var(--border); border-bottom: 2px solid var(--border-strong); font-size: 12px; font-weight: 500; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.indiv-cat-cell { display: flex; align-items: center; padding: 0.85rem 1rem; border-right: 2px solid var(--border-strong); border-bottom: 1px solid var(--border); background: var(--bg); }
.indiv-cat-cell:last-of-type { border-bottom: none; }
.indiv-cat-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; white-space: nowrap; }
.indiv-cat-label.g1 { color: var(--g1); } .indiv-cat-label.g2 { color: var(--g2); }
.indiv-cat-label.g3 { color: var(--g3); } .indiv-cat-label.g4 { color: var(--g4); }
.indiv-data-cell { padding: 0.65rem 0.75rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 5px; min-width: 72px; }
.indiv-data-cell:last-child { border-right: none; }
.indiv-pct { font-family: 'DM Serif Display', serif; font-size: 18px; color: var(--text); line-height: 1; }
.indiv-pct.dim { font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--text-faint); }
.indiv-bar-track { height: 4px; background: var(--border); border-radius: 99px; }
.indiv-bar-fill { height: 4px; border-radius: 99px; transition: width 0.4s ease; }
.indiv-bar-fill.g1 { background: var(--g1); } .indiv-bar-fill.g2 { background: var(--g2); }
.indiv-bar-fill.g3 { background: var(--g3); } .indiv-bar-fill.g4 { background: var(--g4); }
.indiv-empty { color: var(--text-faint); font-size: 13px; padding: 1rem; text-align: center; }

/* ═══ TRACKER PAGE TITLE ═══ */
.tracker-page-title { text-align: center; font-family: 'DM Serif Display', serif; font-size: 26px; color: var(--text); padding: 1.5rem 0 0; }

/* ═══ GOALS PAGE — MEMBER CARDS ═══ */
.member-cards-container { display: flex; flex-direction: column; gap: 1.25rem; padding: 1.5rem 0 3rem; }
.member-goal-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.member-goal-card-name { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--text); cursor: pointer; padding: 1rem 1.25rem 0; display: inline-block; transition: opacity 0.15s; }
.member-goal-card-name:hover { opacity: 0.7; text-decoration: underline; }
.member-status-box { padding: 0.65rem 1.25rem 1rem; }
.member-status-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.member-status-label { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); }
.member-status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.member-status-col { display: flex; flex-direction: column; gap: 5px; }
.member-status-cat { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.member-status-cat.g1 { color: var(--g1); } .member-status-cat.g2 { color: var(--g2); }
.member-status-cat.g3 { color: var(--g3); } .member-status-cat.g4 { color: var(--g4); }
.member-status-goal-text { font-size: 12px; color: var(--text-muted); min-height: 30px; line-height: 1.4; font-style: italic; }
.member-status-goal-text.has-goal { color: var(--text); font-style: normal; }
.member-status-btn { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 99px; cursor: pointer; border: none; transition: opacity 0.15s; align-self: flex-start; font-family: 'DM Sans', sans-serif; }
.member-status-btn:hover { opacity: 0.8; }

/* ═══ GOALS PAGE — APPROVAL GRID ═══ */
.member-approval-section { border-top: 1px solid var(--border); padding: 0.75rem 1.25rem 1rem; background: #FAFAF8; }
.member-approval-title { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 0.6rem; }
.member-approval-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.member-approval-table { border-collapse: collapse; width: 100%; background: var(--surface); }
.member-approval-table th { padding: 0.4rem 0.9rem; background: var(--bg); border: 1px solid var(--border); font-size: 11px; font-weight: 500; color: var(--text-muted); text-align: center; white-space: nowrap; }
.member-approval-table th.appr-goal-header { text-align: left; min-width: 180px; }
.member-approval-table td { padding: 0.45rem 0.9rem; border: 1px solid var(--border); vertical-align: middle; }
.appr-goal-cell { display: flex; align-items: center; gap: 8px; }
.appr-goal-name { font-size: 12px; color: var(--text); }
.appr-td { text-align: center; white-space: nowrap; }
.appr-btn { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--border-strong); background: transparent; cursor: pointer; color: var(--text-muted); transition: all 0.15s; font-family: 'DM Sans', sans-serif; margin: 0 2px; }
.appr-btn:not(.active):hover { background: var(--bg); }
.appr-btn.approved.active { background: var(--accent); color: white; border-color: var(--gold); }
.appr-btn.flagged.active { background: var(--danger); color: white; border-color: var(--danger); }

/* ═══ GOALS PAGE — ADD CLIENT AREA ═══ */
.add-client-inline { display: none; padding: 0.6rem 1.25rem; border-top: 1px solid var(--border); align-items: center; gap: 0.75rem; background: var(--bg); }
.add-client-input { flex: 1; max-width: 300px; padding: 0.5rem 0.75rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 13px; background: var(--surface); color: var(--text); outline: none; }
.add-client-input:focus { border-color: var(--gold); }

/* ═══ GOAL CATEGORY PICKER ═══ */
.goal-category-picker { display: flex; flex-direction: column; gap: 0.75rem; }
.goal-picker-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; transition: border-color 0.15s, box-shadow 0.15s; }
.goal-picker-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.goal-picker-card.g1 { border-left: 3px solid var(--g1); }
.goal-picker-card.g2 { border-left: 3px solid var(--g2); }
.goal-picker-card.g3 { border-left: 3px solid var(--g3); }
.goal-picker-card.g4 { border-left: 3px solid var(--g4); }
.goal-picker-card-left { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.goal-picker-preview { font-size: 14px; color: var(--text); line-height: 1.4; }
.goal-picker-preview.empty { color: var(--text-faint); font-style: italic; font-size: 13px; }

/* ═══ INTENTION SHEET ═══ */
.intention-sheet-wrap { max-width: 680px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }
.is-header { display: flex; align-items: center; gap: 12px; margin-bottom: 2rem; }
.is-title { font-family: 'DM Serif Display', serif; font-size: 24px; color: var(--text); }
.is-client-name { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.is-field { margin-bottom: 1.5rem; }
.is-label { display: block; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 7px; }
.is-textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 0.65rem 0.85rem; font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--text); background: var(--bg); outline: none; resize: vertical; line-height: 1.6; transition: border-color 0.15s; }
.is-textarea:focus { border-color: var(--gold); background: var(--surface); }
.is-textarea::placeholder { color: var(--text-faint); font-style: italic; }
.is-input { width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 0.65rem 0.85rem; font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--text); background: var(--bg); outline: none; transition: border-color 0.15s; }
.is-input:focus { border-color: var(--gold); background: var(--surface); }
.is-input::placeholder { color: var(--text-faint); font-style: italic; }
.is-save-row { display: flex; gap: 10px; align-items: center; margin-top: 0.5rem; }
.is-view-only-badge { display: inline-block; margin-bottom: 1.5rem; padding: 4px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; font-size: 12px; font-weight: 500; color: var(--text-muted); letter-spacing: 0.04em; }
.is-textarea:disabled, .is-input:disabled { background: var(--surface); color: var(--text-muted); cursor: default; border-color: var(--border); }

/* ═══ OPT-IN FORM ═══ */
.opt-in-wrap { max-width: 680px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }
.opt-in-header { margin-bottom: 2rem; }
.opt-in-header h2 { font-family: 'DM Serif Display', serif; font-size: 28px; color: var(--text); }
.opt-in-header p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.opt-in-field { margin-bottom: 1.5rem; }
.opt-in-label { display: block; font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 8px; }
.opt-in-input { width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 0.65rem 0.85rem; font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--text); background: var(--bg); outline: none; resize: vertical; transition: border-color 0.15s; }
.opt-in-input:focus { border-color: var(--gold); background: var(--surface); }
.opt-in-input[readonly] { color: var(--text-muted); cursor: default; }
.opt-in-radio-group { display: flex; flex-direction: column; gap: 8px; }
.opt-in-radio { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
.opt-in-radio input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.opt-in-check-group { display: flex; flex-direction: column; gap: 8px; }
.opt-in-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
.opt-in-check input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.opt-in-conditional { background: var(--bg); border-radius: var(--radius-sm); padding: 1rem; border: 1px solid var(--border); margin-top: -1rem; }
.opt-in-submit-row { margin-top: 2rem; }

/* ═══ DOCUMENTATION FILE UPLOADS ═══ */
.doc-upload-area { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.doc-file-list { display: flex; flex-direction: column; gap: 4px; }
.doc-file-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.doc-file-link { color: var(--accent); text-decoration: underline; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-file-delete { background: none; border: none; color: var(--text-faint); cursor: pointer; font-size: 14px; padding: 0 4px; flex-shrink: 0; transition: color 0.15s; }
.doc-file-delete:hover { color: var(--danger); }
.doc-upload-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--accent); border: 1px dashed var(--accent); border-radius: var(--radius-sm); padding: 4px 10px; cursor: pointer; transition: background 0.15s; align-self: flex-start; font-family: 'DM Sans', sans-serif; }
.doc-upload-btn:hover { background: var(--accent-light); }
.doc-uploading { font-size: 12px; color: var(--text-faint); font-style: italic; }

/* ═══════════════════════════════════════════════════
   AUTH
═══════════════════════════════════════════════════ */
.auth-wrap { max-width: 420px; margin: 0 auto; padding: 4rem 1.5rem 6rem; display: flex; flex-direction: column; gap: 1rem; }
.auth-wrap h1 { font-family: 'DM Serif Display', serif; font-size: 36px; color: var(--text); margin-bottom: 0.25rem; }
.auth-wrap p { color: var(--text-muted); font-size: 15px; margin-bottom: 0.5rem; }
.auth-wrap .field { display: flex; flex-direction: column; gap: 0.35rem; }
.auth-wrap .field label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.auth-wrap .field input { padding: 0.6rem 0.875rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 14px; background: var(--surface); color: var(--text); outline: none; transition: border-color 0.15s; }
.auth-wrap .field input:focus { border-color: var(--gold); }

.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 0.65rem 1rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500; cursor: pointer; transition: background 0.15s; }
.btn-google:hover { background: var(--accent-light); }

.auth-divider { display: flex; align-items: center; gap: 0.75rem; color: var(--text-faint); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.auth-toggle { font-size: 13px; color: var(--text-muted); text-align: center; }
.link-btn { background: none; border: none; color: var(--accent); text-decoration: underline; cursor: pointer; font-size: inherit; font-family: inherit; padding: 0; }

.auth-error { font-size: 13px; color: var(--danger, #b94a2c); min-height: 1.2em; text-align: center; }

/* Student home */
.student-home-wrap { max-width: 760px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }
.student-home-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.student-home-identity {}
.student-home-camp { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--accent); margin-bottom: 4px; }
.student-home-team { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.student-home-actions { display: flex; gap: 0.75rem; align-items: center; flex-shrink: 0; padding-top: 4px; }
.student-home-section { margin-bottom: 2.5rem; }
.student-home-section-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 1rem; }
.student-goal-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.student-goal-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.student-goal-lang { font-size: 14px; font-weight: 500; color: var(--text); }
.student-goal-lang.empty { color: var(--text-faint); font-style: italic; }
.student-goal-pct { font-family: 'DM Serif Display', serif; font-size: 28px; color: var(--text); }
.student-goal-sheet-badge { font-size: 11px; color: #065F46; background: #D1FAE5; border: 1px solid #6EE7B7; border-radius: 4px; padding: 2px 8px; align-self: flex-start; }
.student-team-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.team-stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.team-stat-cat { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 0.6rem; }
.team-stat-row { font-size: 13px; color: var(--text-muted); margin-top: 0.25rem; }
.team-stat-num { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--text); margin-right: 4px; }
.announcement-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: 0.75rem; }
.announcement-card.pinned { border-color: var(--gold); }
.announcement-pin-badge { font-size: 11px; font-weight: 600; color: var(--accent); display: block; margin-bottom: 0.4rem; }
.announcement-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 0.4rem; }
.announcement-body { font-size: 14px; color: var(--text-muted); line-height: 1.55; white-space: pre-wrap; }
.announcement-date { font-size: 11px; color: var(--text-faint); margin-top: 0.6rem; }
.announcement-empty { font-size: 14px; color: var(--text-faint); font-style: italic; }

/* Camp picker */
.camp-picker-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.25rem; }
.camp-picker-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.camp-picker-card:hover { background: var(--accent-light); border-color: var(--gold); }
.camp-picker-name { font-size: 16px; font-weight: 500; color: var(--text); }
.camp-picker-meta { font-size: 13px; color: var(--text-muted); margin-top: 3px; text-transform: capitalize; }

/* Past camps list */
.camp-past-item { padding: 0.6rem 0; border-bottom: 1px solid var(--border); font-size: 14px; display: flex; justify-content: space-between; }
.camp-past-dates { font-size: 12px; color: var(--text-faint); }

/* Pending signups (admin) */
.pending-signup-row { display: flex; align-items: center; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--border); }
.pending-email { flex: 1; font-size: 14px; font-weight: 500; color: var(--text); }
.pending-date { font-size: 12px; color: var(--text-faint); white-space: nowrap; }

/* Admin client detail panel */
.admin-panel-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 500; }
.admin-panel-overlay.open { display: block; }
.admin-client-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 360px;
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: -4px 0 20px rgba(0,0,0,.1); z-index: 501;
  transform: translateX(100%); transition: transform .22s ease;
  overflow-y: auto; display: flex; flex-direction: column;
}
.admin-client-panel.open { transform: translateX(0); }
.admin-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.admin-panel-title { font-family: 'DM Serif Display', serif; font-size: 18px; color: var(--text); }

@media (max-width: 760px) {
  .goals-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .overall-summary-grid { grid-template-columns: 1fr 1fr; }
  .progress-section { flex-direction: column; }
  nav { padding: 0.75rem 1rem; }
  .roster-col-headers { display: none; }
  .client-row { grid-template-columns: 1fr 130px; }
  .client-cell.goal-cell { display: none; }
  .collective-grid { grid-template-columns: 1fr 1fr; }
  .student-goal-cards, .student-team-stats { grid-template-columns: 1fr; }
  .student-home-header { flex-direction: column; }
}

/* Profile avatar + dropdown */
.profile-wrap { position: relative; }
.profile-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-family: 'DM Serif Display', serif; font-size: 15px; font-weight: 400;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; line-height: 1;
}
.profile-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: 0 4px 16px rgba(0,0,0,.1);
  min-width: 200px; z-index: 200; padding: 0.5rem 0;
}
.profile-menu.open { display: block; }
.profile-menu-name  { padding: 0.5rem 1rem 0.1rem; font-size: 14px; font-weight: 500; color: var(--text); }
.profile-menu-email { padding: 0 1rem 0.5rem; font-size: 12px; color: var(--text-faint); }
.profile-menu-divider { border: none; border-top: 1px solid var(--border); margin: 0.25rem 0; }
.profile-menu-item {
  display: block; width: 100%; padding: 0.5rem 1rem; text-align: left;
  background: none; border: none; font-family: 'DM Sans', sans-serif;
  font-size: 13px; color: var(--text); cursor: pointer; transition: background 0.1s;
}
.profile-menu-item:hover { background: var(--accent-light); }

/* Past Camps view */
.past-camps-wrap { max-width: 640px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.past-camps-header { margin-bottom: 1.5rem; }
.past-camps-section-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-faint); margin: 1.5rem 0 0.5rem;
}
.past-camp-card {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); margin-bottom: 0.5rem;
}
.past-camp-name { font-size: 15px; font-weight: 500; color: var(--text); }
.past-camp-meta { font-size: 12px; color: var(--text-faint); margin-top: 2px; }

/* Past camp read-only banner */
#pastCampBanner {
  position: sticky; top: 48px; z-index: 100;
  background: var(--g1-light); border-bottom: 1px solid var(--g1);
  padding: 0.4rem 1rem;
}
.past-camp-banner-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
#pastCampBannerLabel { font-size: 12px; color: var(--text-muted); }

/* Leader / Senior home views */
.lh-wrap { max-width: 640px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.lh-header { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.lh-camp-name { font-family: 'DM Serif Display', serif; font-size: 28px; color: var(--text); }
.lh-week-badge {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--accent-light); color: var(--accent);
  padding: 0.2rem 0.6rem; border-radius: 99px; white-space: nowrap;
}
.lh-dates { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.lh-date-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem; min-width: 90px;
}
.lh-date-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 2px; }
.lh-date-val { font-size: 13px; font-weight: 500; color: var(--text); }
.lh-section { margin-bottom: 2rem; }
.lh-section-title { font-family: 'DM Serif Display', serif; font-size: 18px; color: var(--text); margin-bottom: 0.75rem; }
.lh-team-meta { font-size: 15px; font-weight: 500; color: var(--text); margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.lh-team-type { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; background: var(--border); color: var(--text-muted); padding: 0.15rem 0.45rem; border-radius: 99px; }
.lh-roster { display: flex; flex-direction: column; gap: 0.15rem; }
.lh-member { font-size: 14px; color: var(--text-muted); padding: 0.3rem 0; border-bottom: 1px solid var(--border); }
.lh-member:last-child { border-bottom: none; }
.lh-empty { font-size: 13px; color: var(--text-faint); font-style: italic; }
.lh-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin-bottom: 2rem; }
.senior-teams-list { display: flex; flex-direction: column; gap: 0.4rem; }
.senior-team-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); text-decoration: none; transition: background 0.1s;
}
.senior-team-row:hover { background: var(--accent-light); }
.senior-team-name { font-size: 15px; font-weight: 500; color: var(--text); }
.senior-team-type { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.senior-team-arrow { font-size: 16px; color: var(--accent); }

/* ════════════════════════════════════════════════════════════════════════
   #210 — Mobile forms & tap targets (195c): shared input conventions
   The 16px-input / 44px-tap rules at the shared level so .field / .is-field /
   .sfield forms inherit them. (App-shell form CSS lives in app.html; the calm
   dropdown carries its own ≤640 rule in dropdown.js.) Token fallback keeps it
   working in the legacy (index.html) variable world too.
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .field input, .field select,
  .is-field input, .is-field select, .is-field textarea,
  .sfield input, .sfield select {
    font-size: 16px;                       /* no iOS auto-zoom on focus */
    min-height: var(--tap, 44px);
    width: 100%;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   #209 — Mobile wide-data-surface utilities (195b)
   Two reusable patterns for wide tables/matrices on a phone, plus the rule:
     • Each row stands alone (a record) → Pattern A (.m-cards) — stacked cards.
     • The grid IS the comparison (people×weeks etc.) → Pattern B (.m-scroll).
   Canonical breakpoints inherited from #208: phone ≤640 · tablet ≤900 · nav ≤860.
   Token fallbacks keep these working in both the app.html (--faint/--r) and
   legacy (--text-faint/--radius) variable worlds.
   ════════════════════════════════════════════════════════════════════════ */

/* ── Pattern A — stacked cards ──────────────────────────────────────────
   Add class "m-cards" to a <table> and a data-label="Column" to each <td>.
   At ≤640 each row becomes a card and each cell a label:value line. The
   header is hidden (the data-labels replace it). An empty data-label ("")
   hides the label (use for the trailing action-button cell). */
@media (max-width: 640px) {
  table.m-cards thead { display: none; }
  table.m-cards,
  table.m-cards tbody,
  table.m-cards tr,
  table.m-cards td { display: block; width: 100%; }
  table.m-cards tr {
    border: 1px solid var(--border);
    border-radius: var(--r, var(--radius, 12px));
    background: var(--surface);
    box-shadow: var(--shadow, none);
    padding: .55rem .8rem;
    margin-bottom: .7rem;
  }
  table.m-cards td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    text-align: right;
    border: none !important;
    padding: .32rem 0;
    min-height: 0;
    white-space: normal;
  }
  table.m-cards td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    text-align: left;
    color: var(--faint, var(--text-faint, rgba(20,18,15,.45)));
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
  }
  /* No-label cells (action buttons / spacers): drop the label, right-align */
  table.m-cards td[data-label=""]::before,
  table.m-cards td:not([data-label])::before { content: none; }
  table.m-cards td[data-label=""],
  table.m-cards td:not([data-label]) { justify-content: flex-end; }
}

/* ── Pattern B — horizontal scroll with a pinned first column ────────────
   Wrap the matrix scroller in .m-scroll-shell and give the scroller the
   .m-scroll class (it can sit alongside an existing wrapper class). The
   first column pins; a right-edge fade + a "swipe" hint signal the off-
   screen columns. The grid keeps its shape — the comparison is preserved. */
.m-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* Pin the identity (first) column. Scope the header to the FIRST header row
   only — a rowspanned corner cell (e.g. commit-matrix's "Member") means the
   2nd header row's first <th> is actually a data column, which must NOT pin. */
.m-scroll > table tbody td:first-child,
.m-scroll > table thead tr:first-child th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--border);   /* subtle right edge so it reads as pinned */
}
.m-scroll > table thead tr:first-child th:first-child {
  z-index: 3;
  background: var(--raise, var(--bg, var(--surface)));
}
/* Right-edge fade + swipe hint live on the non-scrolling shell */
.m-scroll-shell { position: relative; }
.m-scroll-shell::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 28px;
  pointer-events: none;
  background: linear-gradient(to left, var(--surface), rgba(255,255,255,0));
}
.m-scroll-hint {
  display: none;
  font-size: 11px;
  color: var(--faint, var(--text-faint, rgba(20,18,15,.45)));
  text-align: right;
  padding: .3rem .15rem 0;
}
@media (max-width: 900px) {
  .m-scroll-hint { display: block; }
}
/* Below the phone breakpoint the fade can crowd narrow grids — keep it only
   where horizontal scroll actually happens (tablet/phone). */
@media (min-width: 901px) {
  .m-scroll-shell::after { display: none; }
}
