/* Welthy — brand theme drawn from the logo (Kendum 2026-08-13): deep navy + warm
   cream, calm and premium. No bright blue, no oversized buttons, monochrome
   silhouette icons only. */
:root {
  --navy: #24385a; --navy-soft: #3a4d73; --cream: #f7f2e2; --bg: #edeae0; --card: #fcfbf6;
  --line: #ddd8c9; --text: #26304a; --muted: #7d8294; --accent: #24385a;
  --ok: #24385a; --warn: #8a7a54; --bad: #a04b45;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
.hidden { display: none !important; }

.brand { font-weight: 800; font-size: 28px; color: var(--navy); letter-spacing: .5px; }
.brand.small { font-size: 20px; }
.tagline { color: var(--muted); margin: 4px 0 20px; }
/* The logo is the uploaded PNG served byte-exact — never crop, recolor, or round it.
   Scaling keeps proportions (width/height auto); spacing comes from margins only. */
.brand-logo { display: block; width: 100%; max-width: 320px; height: auto; margin: 4px auto 24px; }
.brand-logo.small { width: auto; height: 40px; margin: 0; }

/* auth */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 32px; width: 100%; max-width: 380px; box-shadow: 0 8px 30px rgba(27,42,74,.08); }
.auth-card label { display: block; margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.auth-card input[type=email], .auth-card input[type=password], .auth-card input[type=text] {
  width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px;
}
.auth-card .check { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--text); font-size: 14px; }
.err { color: var(--bad); margin-top: 12px; min-height: 20px; font-size: 14px; }
.note { color: var(--muted); font-size: 14px; }

/* buttons — modest sizes, navy on cream */
.btn { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 7px; padding: 6px 12px; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { border-color: var(--navy-soft); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: var(--cream); }
.btn.primary:hover { background: var(--navy-soft); }
#login-form .btn, #setup-form .btn { width: 100%; margin-top: 18px; padding: 9px; font-size: 14px; }
.btn.ghost { border: none; background: none; color: var(--muted); }
.btn.small { padding: 3px 9px; font-size: 12px; }
.btn.danger { color: var(--bad); border-color: #d8c2be; }
.btn:disabled { opacity: .5; cursor: default; }

/* app shell */
header { display: flex; align-items: center; gap: 24px; padding: 12px 22px; background: var(--card); border-bottom: 1px solid var(--line); }
#tabs { flex: 1; }
.tab { border: none; background: none; padding: 8px 12px; font-size: 15px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: 6px; }
.tab.sel { color: var(--navy); border-bottom-color: var(--accent); font-weight: 600; }
/* Locked tabs stay VISIBLE (Kendum round 9): clearly locked, still clickable — the
   view behind them explains what unlocks the area. Never display:none. */
.tab.locked { color: #a9a394; font-style: normal; }
.tab.locked.sel { color: var(--navy-soft); border-bottom-color: var(--navy-soft); }
.tab-lock { line-height: 0; }
.tab-lock svg { width: 13px; height: 13px; display: block; }
.user-box { color: var(--muted); font-size: 14px; }

main { padding: 20px 22px; }
.cols { display: grid; grid-template-columns: minmax(340px, 1fr) minmax(360px, 1.2fr); gap: 20px; max-width: 1200px; margin: 0 auto; }
.col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
h2 { margin: 0; font-size: 17px; color: var(--navy); }

/* tree */
.tree-col, .detail-col, .admin-box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.node { margin: 6px 0 6px 0; }
.node .row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: #fff; }
.node .row:hover { border-color: var(--accent); }
.node .row.sel { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(47,111,237,.15); }
.node .kids { margin-left: 22px; border-left: 2px solid var(--line); padding-left: 10px; }
.chev { width: 16px; color: var(--muted); font-size: 11px; flex: none; user-select: none; }
.tname { font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ttype { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); flex: none; }
.pill { font-size: 11px; border-radius: 999px; padding: 2px 8px; flex: none; border: 1px solid var(--line); }
.pill.s-active { background: var(--cream); color: var(--navy); }
.pill.s-filed { background: #f3efe4; color: var(--warn); }
.pill.s-notstarted, .pill.s-none { background: transparent; color: var(--muted); }
.pill.s-dissolved { background: #f3e6e4; color: var(--bad); }
.addkid { margin: 2px 0 4px 22px; }
.empty { color: var(--muted); padding: 18px 6px; }

/* detail */
.detail-col h3 { margin: 0 0 2px; color: var(--navy); }
.dtype { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.fgrid label { font-size: 12px; color: var(--muted); display: block; }
.fgrid label.wide { grid-column: 1 / -1; }
.fgrid input, .fgrid select, .fgrid textarea {
  width: 100%; margin-top: 3px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 14px; font-family: inherit;
}
.fgrid textarea { min-height: 64px; resize: vertical; }
.fgrid .check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); margin-top: 20px; }
.detail-actions { display: flex; gap: 10px; margin-top: 16px; justify-content: space-between; }
.saved-note { color: var(--ok); font-size: 13px; align-self: center; }

/* admin */
.admin-box { max-width: 760px; margin: 0 auto; }
.adm-settings { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfd; }
.adm-settings label { flex: 1; font-size: 12px; color: var(--muted); }
.adm-settings input { width: 100%; margin-top: 3px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; }
.adm-settings .btn { margin-bottom: 1px; }
.new-student { display: flex; gap: 10px; margin-bottom: 8px; }
.new-student input { flex: 1; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.setup-link { background: #eef4ff; border: 1px solid #cfdefc; padding: 10px 12px; border-radius: 8px; font-size: 13px; margin: 8px 0; word-break: break-all; }
table.students { width: 100%; border-collapse: collapse; margin-top: 12px; }
table.students th, table.students td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
table.students th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.status-suspended { color: var(--bad); }
.feat-row td { background: var(--bg); }
.feat-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 12px 6px; }
.feat-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 8px; }
.feat-item { display: flex; gap: 8px; margin-bottom: 10px; align-items: flex-start; flex-wrap: wrap; }
.feat-item .note { margin: 2px 0 0 26px; flex-basis: 100%; }
.feat-check { width: 18px; height: 18px; color: var(--navy); flex: none; }
.feat-check svg { width: 17px; height: 17px; }
.feat-toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.status-active { color: var(--ok); }
.status-pending { color: var(--warn); }

/* tracker */
.welcome { padding: 8px 4px 4px; }
.welcome h3 { margin: 0 0 8px; color: var(--navy); font-size: 20px; }
.welcome p { color: var(--text); max-width: 560px; line-height: 1.55; }
.newtrk { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 14px; background: #fafbfd; }
.newtrk label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.newtrk input[type=text] { width: 100%; margin-top: 4px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.newtrk .check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.newtrk select { margin: 4px 0 8px 26px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 14px; }
.trk-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; cursor: pointer; }
.trk-row:hover, .trk-row.sel { border-color: var(--accent); }
.trk-bar { flex: 0 0 90px; height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.trk-bar span { display: block; height: 100%; background: var(--accent); }
.trk-head { margin: 18px 0 4px; color: var(--navy); }
.trk-section { margin: 16px 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.step { border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; padding: 10px 14px; background: var(--card); }
.step.done { opacity: .6; }
.step.done.expanded { opacity: 1; }
.step-head.clickable { cursor: pointer; }
.done-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.done-actions .note { margin: 0; }
.step.auto { border-style: dashed; opacity: .7; }
.step.blocked { opacity: .55; }
.step-head { display: flex; align-items: center; gap: 10px; }
/* silhouette icons: inline SVGs drawn with currentColor only — never colorful */
.step-mark { width: 22px; height: 22px; flex: none; color: var(--navy); display: flex; align-items: center; justify-content: center; }
.step.blocked .step-mark, .step.open .step-mark { color: var(--muted); }
.step-mark svg { width: 20px; height: 20px; display: block; }
.step.open .step-mark.confirm { cursor: pointer; }
.step.open .step-mark.confirm:hover { color: var(--navy); }
.step-title { font-weight: 600; flex: 1; }
.confirm-hint { font-size: 11px; color: var(--muted); flex: none; }
.step-body { margin: 10px 0 2px 30px; }
.step-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 10px 0; max-width: 560px; }
.step-form label { font-size: 12px; color: var(--muted); }
.step-form input[type=text], .step-form input[type=date], .step-form select { width: 100%; margin-top: 3px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; background: #fff; color: var(--text); font-family: inherit; }
.step-form label.wide { grid-column: 1 / -1; }
.step-form .check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); margin-top: 18px; }
.step-err { margin-left: 12px; }

/* ITIN instruction block: copy-ready email + message body, silhouette copy icons */
.itin-instructions { margin: 8px 0 4px; }
.itin-lead { font-size: 13px; color: var(--text); margin: 10px 0 6px; }
.copy-row { display: flex; align-items: flex-start; gap: 8px; }
.copy-value { font-weight: 600; color: var(--navy); font-size: 14px; padding: 6px 10px; background: var(--cream); border: 1px solid var(--line); border-radius: 7px; }
.email-body { flex: 0 1 auto; max-width: 520px; background: var(--cream); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: 13px; line-height: 1.55; color: var(--text); }
.copy-btn { border: 1px solid var(--line); background: var(--card); border-radius: 7px; padding: 5px 7px; cursor: pointer; color: var(--muted); line-height: 0; flex: none; margin-top: 2px; }
.copy-btn:hover { color: var(--navy); border-color: var(--navy-soft); }
.copy-btn svg { width: 15px; height: 15px; }
.copy-feedback { font-size: 12px; color: var(--muted); align-self: center; }

/* holding block: Bizee selections, plan recommendation, info boxes */
.holding-instructions { margin: 8px 0 4px; }
.sel-rows { margin: 10px 0 4px; }
.sel-row { font-size: 13px; color: var(--text); padding: 2px 0; display: flex; align-items: center; gap: 6px; }
.plan-box { max-width: 560px; background: var(--cream); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; font-size: 13px; line-height: 1.5; color: var(--text); margin: 10px 0 4px; }
.info-toggle { border: none; background: none; padding: 0; cursor: pointer; color: var(--muted); line-height: 0; }
.info-toggle:hover { color: var(--navy); }
.info-toggle svg { width: 15px; height: 15px; }
.info-box { max-width: 560px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; font-size: 12.5px; line-height: 1.55; color: var(--text); margin: 8px 0; }

.wire-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--navy); margin: 14px 0 2px; }

/* virtual address: numbered steps */
.va-steps { margin: 10px 0 4px; }
.va-step { display: flex; gap: 12px; padding: 8px 0; }
.va-num { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--navy); background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; height: fit-content; margin-top: 1px; }
.va-title { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.va-step .note { margin: 0; max-width: 520px; }

/* locked areas (Next Purchase / Extra Features): calm, clearly locked, never hidden */
.locked-panel { text-align: center; padding: 38px 20px 26px; color: var(--muted); }
.locked-panel.slim { padding: 14px 20px 4px; }
.big-lock { color: var(--navy-soft); margin-bottom: 8px; }
.big-lock svg { width: 42px; height: 42px; display: inline-block; }
.locked-panel h3 { margin: 4px 0 10px; color: var(--navy); font-size: 19px; }
.locked-copy { max-width: 540px; margin: 8px auto; line-height: 1.55; font-size: 14px; }

/* Extra Features module grid — cards come from the features registry (modular) */
.mod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.mod-card { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--card); }
.mod-card.locked { background: #f4f1e7; opacity: .75; }
.mod-icon { flex: none; color: var(--navy); line-height: 0; margin-top: 2px; }
.mod-card.locked .mod-icon { color: var(--muted); }
.mod-icon svg { width: 19px; height: 19px; }
.mod-title { font-weight: 600; color: var(--navy); margin-bottom: 3px; }
.mod-state { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 8px; }

@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } .step-form { grid-template-columns: 1fr; } .mod-grid { grid-template-columns: 1fr; } .feat-panel { grid-template-columns: 1fr; } }
