/* ============================================================
   SVA Staff Portal — styles
   Same brand system as SVA Kickstart:
   navy #2b3990 · mint #7cc5ab · ink #1a1f36 · Sora + Inter
   ============================================================ */
:root {
  --navy: #2b3990;
  --navy-dark: #1e2a6e;
  --navy-soft: #eef0f9;
  --mint: #7cc5ab;
  --mint-dark: #1c7a5c;
  --mint-light: #e9f5f0;
  --ink: #1a1f36;
  --muted: #5a6072;
  --paper: #f6f7fb;
  --card: #ffffff;
  --border: #e4e7f0;
  --gold: #b98317;
  --gold-bg: #fdf6e7;
  --coral: #c0392b;
  --coral-bg: #fdedeb;
  --coral-border: #e5b4ae;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(26, 31, 54, .06), 0 4px 16px rgba(26, 31, 54, .06);
  --shadow-lg: 0 4px 10px rgba(26, 31, 54, .07), 0 12px 32px rgba(26, 31, 54, .12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--paper); color: var(--ink); line-height: 1.6; min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .display { font-family: 'Sora', 'Inter', sans-serif; letter-spacing: -.015em; }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--navy); }
select, input, textarea { font-family: inherit; }

/* ---------------- app shell ---------------- */
.shell { max-width: 760px; margin: 0 auto; padding: 0 18px 80px; }

.appbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .93); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.appbar-in { max-width: 1180px; margin: 0 auto; padding: 11px 18px; display: flex; align-items: center; gap: 12px; }
.appbar img.logo { width: 38px; height: 38px; border-radius: 8px; }
.appbar .t-name { font-weight: 700; font-family: 'Sora', sans-serif; font-size: 15.5px; color: var(--navy); line-height: 1.15; }
.appbar .t-sub { font-size: 12px; color: var(--muted); }
.appbar .spacer { flex: 1; }
.who { text-align: right; line-height: 1.25; }
.who .w-name { font-size: 13.5px; font-weight: 600; }
.who .w-role { font-size: 11.5px; color: var(--muted); }
.pill {
  background: #fff; color: var(--navy); border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px; font-weight: 600; font-size: 13px; transition: border-color .2s, background .2s; white-space: nowrap;
}
.pill:hover { border-color: var(--navy); }
.pill.on { background: var(--navy); color: #fff; border-color: var(--navy); }

@media (max-width: 560px) {
  .appbar-in { padding: 10px 14px; gap: 9px; }
  .appbar .t-name { font-size: 14px; white-space: nowrap; }
  .appbar .t-sub, .who .w-role { display: none; }
  .who .w-name { font-size: 12.5px; }
  .navtab { padding: 9px 11px 8px; font-size: 13.5px; }
}

/* nav tabs */
.navtabs { max-width: 1180px; margin: 0 auto; padding: 0 10px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.navtabs::-webkit-scrollbar { display: none; }
.navtab {
  background: none; border: none; border-bottom: 2.5px solid transparent; padding: 10px 14px 9px;
  font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap;
  display: flex; align-items: center; gap: 7px; transition: color .2s, border-color .2s;
}
.navtab:hover { color: var(--ink); }
.navtab.on { color: var(--navy); border-bottom-color: var(--navy); }
.navtab .nt-count {
  background: var(--coral); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 999px;
  min-width: 18px; height: 18px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center;
}
.navtab .nt-count.zero { display: none; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 22px 18px 90px; }
.view { animation: rise-in .45s cubic-bezier(.22, 1, .36, 1); }
@keyframes rise-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- page headers ---------------- */
.page-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h2 { font-size: 23px; }
.page-head p { font-size: 14px; color: var(--muted); margin-top: 2px; }
.page-head .spacer { flex: 1; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--mint-dark); }

/* ---------------- cards ---------------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 16px;
}
.card.pad-sm { padding: 16px; }
.card h3 { font-size: 17px; margin-bottom: 4px; }
.card .card-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h3 { flex: 1; margin: 0; }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.grid.side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 980px) { .grid.side, .grid.four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .grid.two, .grid.three, .grid.four, .grid.side { grid-template-columns: 1fr; } }

/* stat tiles */
.stat {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 15px 16px; box-shadow: var(--shadow);
}
.stat .s-num { font-family: 'Sora', sans-serif; font-size: 26px; font-weight: 700; color: var(--navy); line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .s-lab { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: 1px; }
.stat.alert .s-num { color: var(--coral); }
.stat.good .s-num { color: var(--mint-dark); }

/* ---------------- forms ---------------- */
.field-row { margin-bottom: 14px; }
.field-row.tight { margin-bottom: 10px; }
label.lab { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
label.lab .req { color: var(--coral); }
.lab-note { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.field {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s; background: #fff; color: var(--ink);
}
.field:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(43, 57, 144, .12); }
.field:disabled { background: var(--paper); color: var(--muted); }
.field.err-on { border-color: var(--coral); }
textarea.field { resize: vertical; min-height: 86px; line-height: 1.55; }
select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235a6072' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }
/* auto-fit so these wrap on a narrow COLUMN, not just a narrow screen */
.field-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.field-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 12px; }
@media (max-width: 620px) { .field-2, .field-3 { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--navy); color: #fff; border: none; border-radius: 10px;
  padding: 12px 20px; font-size: 15px; font-weight: 600;
  transition: background .2s, transform .12s, box-shadow .2s; box-shadow: 0 2px 8px rgba(43, 57, 144, .25);
}
.btn:hover { background: var(--navy-dark); box-shadow: 0 4px 14px rgba(43, 57, 144, .3); }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .55; transform: none; cursor: not-allowed; }
.btn.full { width: 100%; }
.btn.mint { background: var(--mint-dark); box-shadow: 0 2px 8px rgba(28, 122, 92, .25); }
.btn.mint:hover { background: #15644b; }
.btn.danger { background: var(--coral); box-shadow: 0 2px 8px rgba(192, 57, 43, .25); }
.btn.danger:hover { background: #a5301f; }
.btn.ghost { background: transparent; color: var(--navy); box-shadow: none; border: 1.5px solid var(--border); }
.btn.ghost:hover { background: #fff; border-color: var(--navy); }
.btn.small { padding: 8px 14px; font-size: 13.5px; border-radius: 9px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-row .spacer { flex: 1; }

/* chips / choices */
.choice-row { display: flex; gap: 8px; flex-wrap: wrap; }
.choice {
  border: 1.5px solid var(--border); background: #fff; border-radius: 10px; padding: 9px 14px;
  font-weight: 600; font-size: 13.5px; color: var(--muted); transition: all .18s;
}
.choice:hover { border-color: #c3c9da; }
.choice.on { border-color: var(--navy); background: var(--navy); color: #fff; }
.choice.on.coral { border-color: var(--coral); background: var(--coral); }
.choice.on.mint { border-color: var(--mint-dark); background: var(--mint-dark); }
.choice.on.gold { border-color: var(--gold); background: var(--gold); }

.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600;
  border-radius: 999px; padding: 3px 10px; background: var(--paper); border: 1px solid var(--border); color: var(--muted); white-space: nowrap;
}
.tag.navy { background: var(--navy-soft); border-color: transparent; color: var(--navy); }
.tag.mint { background: var(--mint-light); border-color: transparent; color: var(--mint-dark); }
.tag.gold { background: var(--gold-bg); border-color: transparent; color: var(--gold); }
.tag.coral { background: var(--coral-bg); border-color: transparent; color: var(--coral); }
.tag.solid-coral { background: var(--coral); border-color: transparent; color: #fff; }

/* callouts */
.callout { background: var(--mint-light); border-left: 4px solid var(--mint); border-radius: 8px; padding: 11px 15px; margin: 12px 0; font-size: 14px; }
.callout.warn { background: var(--gold-bg); border-color: var(--gold); }
.callout.danger { background: var(--coral-bg); border: 1.5px solid var(--coral-border); border-left: 5px solid var(--coral); }
.callout.info { background: var(--navy-soft); border-color: var(--navy); }
.callout b { color: var(--navy-dark); }
.callout.danger b { color: var(--coral); }
.callout .co-title {
  display: flex; align-items: center; gap: 7px; font-weight: 700; font-family: 'Sora', sans-serif;
  font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px;
}

/* ---------------- lists / rows ---------------- */
.row-list { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; }
.rowi {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border);
  transition: background .15s; background: #fff;
}
.rowi:last-child { border-bottom: none; }
.rowi.clickable { cursor: pointer; }
.rowi.clickable:hover { background: var(--paper); }
.rowi .r-main { flex: 1; min-width: 0; }
.rowi .r-title { font-weight: 600; font-size: 14.5px; }
.rowi .r-sub { font-size: 12.5px; color: var(--muted); }
.rowi .r-side { text-align: right; font-size: 12.5px; color: var(--muted); white-space: nowrap; }

.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--navy-soft); color: var(--navy);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13.5px;
  font-family: 'Sora', sans-serif; flex-shrink: 0;
}
.avatar.mint { background: var(--mint-light); color: var(--mint-dark); }
.avatar.coral { background: var(--coral-bg); color: var(--coral); }
.avatar.sm { width: 30px; height: 30px; font-size: 11.5px; }

.empty { text-align: center; padding: 48px 20px; color: #9aa0b3; }
.empty .e-emoji { font-size: 34px; display: block; margin-bottom: 8px; }
.empty h4 { color: var(--muted); font-size: 15.5px; margin-bottom: 4px; }
.empty p { font-size: 13.5px; max-width: 380px; margin: 0 auto; }

/* checkbox rows (recipient pickers) */
.chk {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px;
  cursor: pointer; user-select: none; transition: background .15s;
}
.chk:hover { background: var(--paper); }
.chk .cbox {
  width: 21px; height: 21px; border: 1.5px solid #c3c9da; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; transition: all .18s;
}
.chk.on .cbox { background: var(--navy); border-color: var(--navy); }
.chk .c-name { font-size: 14px; font-weight: 500; }
.chk .c-sub { font-size: 12px; color: var(--muted); }
.scroll-box { max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 5px; }

/* ---------------- template gallery ---------------- */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tpl {
  text-align: left; background: #fff; border: 1.5px solid var(--border); border-radius: 12px; padding: 15px;
  transition: all .18s; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 5px;
}
.tpl:hover { border-color: var(--navy); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.tpl.on { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(43, 57, 144, .12); }
.tpl .tpl-emoji { font-size: 22px; }
.tpl .tpl-name { font-weight: 700; font-size: 14.5px; font-family: 'Sora', sans-serif; }
.tpl .tpl-desc { font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* email preview */
.mail-preview {
  border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow: hidden;
}
.mail-preview .mp-head { background: var(--paper); border-bottom: 1px solid var(--border); padding: 11px 15px; font-size: 12.5px; color: var(--muted); }
.mail-preview .mp-head b { color: var(--ink); }
.mail-preview .mp-body { padding: 18px; font-size: 14.5px; }
.mail-preview .mp-body h1, .mail-preview .mp-body h2 { font-size: 18px; margin-bottom: 8px; color: var(--navy); }
.mail-preview .mp-body p { margin-bottom: 10px; }
.mail-preview .mp-body ul { margin: 0 0 10px 20px; }

/* ---------------- message editor ---------------- */
.editor-bar {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
  padding: 7px 9px; background: var(--paper); border: 1px solid var(--border);
  border-bottom: none; border-radius: 12px 12px 0 0;
}
.editor-bar button {
  background: #fff; border: 1px solid var(--border); border-radius: 7px; min-width: 32px; height: 30px;
  padding: 0 9px; font-size: 13px; font-weight: 600; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; transition: all .15s;
}
.editor-bar button:hover { border-color: var(--navy); color: var(--navy); }
.editor-bar .sep { width: 1px; height: 20px; background: var(--border); margin: 0 3px; }
.editor-bar .spacer { flex: 1; }
.editor-bar .hint-txt { font-size: 11.5px; color: var(--muted); }

.mail-preview.editing { border-radius: 0 0 12px 12px; border-top-color: var(--navy); }
.mp-body[contenteditable="true"] { outline: none; min-height: 200px; }
.mp-body[contenteditable="true"]:focus { box-shadow: inset 0 0 0 2px rgba(43, 57, 144, .1); }
.mp-body img { max-width: 100%; height: auto; border-radius: 8px; }
.mp-body table { border-collapse: collapse; }

.attach-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.attach-chip {
  display: inline-flex; align-items: center; gap: 8px; background: var(--paper);
  border: 1px solid var(--border); border-radius: 9px; padding: 7px 8px 7px 11px; font-size: 13px; max-width: 100%;
}
.attach-chip .a-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.attach-chip .a-size { color: var(--muted); font-size: 12px; }
.attach-chip button { background: none; border: none; color: var(--muted); font-size: 15px; line-height: 1; padding: 2px 5px; border-radius: 50%; }
.attach-chip button:hover { background: #e9ecf4; color: var(--coral); }
.attach-chip img { width: 30px; height: 30px; object-fit: cover; border-radius: 6px; }
.size-bar { font-size: 12px; color: var(--muted); margin-top: 8px; }
.size-bar.over { color: var(--coral); font-weight: 600; }

/* sticky send bar */
.send-bar {
  position: sticky; bottom: 0; z-index: 20; margin: 0 -22px -22px; padding: 14px 22px;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius);
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.send-bar .spacer { flex: 1; }
.send-bar .send-sum { font-size: 13px; color: var(--muted); }
.send-bar .send-sum b { color: var(--ink); }

/* conference slot schedule */
.slot-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.slot-table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); padding: 7px 10px; border-bottom: 1px solid var(--border);
}
.slot-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); }
.slot-table tr.off td { opacity: .45; }
.slot-table input[type="time"] { width: 120px; padding: 6px 8px; font-size: 14px; border: 1.5px solid var(--border); border-radius: 8px; }
.slot-table .clash { border-color: var(--coral); background: var(--coral-bg); }
.slot-toggle { background: none; border: 1px solid var(--border); border-radius: 7px; padding: 4px 9px; font-size: 12px; font-weight: 600; color: var(--muted); }
.slot-toggle:hover { border-color: var(--navy); color: var(--navy); }

/* ---------------- sign-in ---------------- */
.gsi-wrap { display: flex; justify-content: center; min-height: 44px; margin-bottom: 6px; }
.or-line { display: flex; align-items: center; gap: 12px; color: #9aa0b3; font-size: 12.5px; margin: 16px 0; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.demo-picks { display: grid; gap: 8px; margin-top: 10px; }
.demo-pick {
  display: flex; align-items: center; gap: 11px; text-align: left; background: #fff;
  border: 1.5px solid var(--border); border-radius: 11px; padding: 10px 13px; transition: all .16s;
}
.demo-pick:hover { border-color: var(--navy); transform: translateY(-1px); box-shadow: var(--shadow); }
.demo-pick .dp-name { font-size: 14px; font-weight: 600; }
.demo-pick .dp-sub { font-size: 12px; color: var(--muted); }

/* ---------------- body map (injury) ---------------- */
.bodymap-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bodymap { background: var(--paper); border: 1px solid var(--border); border-radius: 12px; padding: 10px 6px 6px; text-align: center; }
.bodymap .bm-title { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.bodymap svg { height: 300px; width: auto; max-width: 100%; touch-action: manipulation; }
.bodymap .part { fill: #dfe3ee; stroke: #fff; stroke-width: 1.4; cursor: pointer; transition: fill .15s; }
.bodymap .part:hover { fill: #b9c0d8; }
.bodymap .part.on { fill: var(--coral); }
.bodymap .outline { fill: none; stroke: #c3c9da; stroke-width: 1; pointer-events: none; }
.bm-hint { font-size: 12px; color: var(--muted); text-align: center; margin-top: 6px; }
.selected-parts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; min-height: 26px; }
.part-chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--coral-bg); border: 1px solid var(--coral-border);
  color: var(--coral); border-radius: 999px; padding: 4px 6px 4px 11px; font-size: 12.5px; font-weight: 600;
}
.part-chip button { background: none; border: none; color: var(--coral); font-size: 14px; line-height: 1; padding: 2px 4px; border-radius: 50%; }
.part-chip button:hover { background: rgba(192, 57, 43, .13); }

/* ---------------- custody week grid ---------------- */
.custody-week { width: 100%; border-collapse: separate; border-spacing: 4px; margin-top: 6px; }
.custody-week td {
  background: #fff; border: 1px solid var(--border); border-radius: 9px;
  padding: 7px 8px; text-align: center; vertical-align: middle; min-width: 62px;
}
.custody-week td.today { border-color: var(--navy); box-shadow: 0 0 0 2px rgba(43, 57, 144, .13); }
.custody-week .cw-day { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.custody-week .cw-who { font-size: 13px; font-weight: 600; margin-top: 2px; }
.custody-week .cw-time { font-size: 11.5px; color: var(--navy); font-weight: 600; }
@media (max-width: 620px) {
  .custody-week, .custody-week tbody, .custody-week tr { display: block; }
  .custody-week tr { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 6px; }
  .custody-week td { min-width: 0; }
}

/* custody editor */
.cw-edit { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
@media (max-width: 620px) { .cw-edit { grid-template-columns: 1fr 1fr; } }
.cw-cell { border: 1px solid var(--border); border-radius: 10px; padding: 9px; background: var(--paper); }
.cw-cell .lab { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 4px; }
.cw-cell select, .cw-cell input {
  width: 100%; padding: 7px 8px; font-size: 13px; border: 1.5px solid var(--border);
  border-radius: 7px; background: #fff; color: var(--ink); outline: none;
}
.cw-cell select:focus, .cw-cell input:focus { border-color: var(--navy); }

/* people editor rows */
.person-edit {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.4fr auto; gap: 8px; align-items: center;
  padding: 8px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; background: #fff;
}
@media (max-width: 820px) { .person-edit { grid-template-columns: 1fr 1fr; } }
.person-edit input, .person-edit select {
  width: 100%; padding: 8px 10px; font-size: 13.5px; border: 1.5px solid var(--border);
  border-radius: 8px; background: #fff; color: var(--ink); outline: none;
}
.person-edit input:focus, .person-edit select:focus { border-color: var(--navy); }
.person-edit .rm { background: none; border: none; color: var(--muted); font-size: 17px; padding: 4px 8px; border-radius: 7px; }
.person-edit .rm:hover { background: var(--coral-bg); color: var(--coral); }

/* pickup board */
.pickup-row.flag { border-left: 4px solid var(--coral); }
.pickup-row.ok { border-left: 4px solid var(--mint); }

/* ---------------- modal ---------------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(26, 31, 54, .55); backdrop-filter: blur(3px);
  z-index: 200; display: flex; align-items: center; justify-content: center; padding: 18px; overflow-y: auto;
}
.modal-back.hidden { display: none; }
.modal {
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 720px;
  max-height: 92vh; display: flex; flex-direction: column; animation: pop .3s cubic-bezier(.22, 1, .36, 1);
}
.modal.wide { max-width: 940px; }
.modal.narrow { max-width: 480px; }
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 17px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { flex: 1; font-size: 17.5px; }
.modal-head .x { background: none; border: none; font-size: 22px; color: var(--muted); line-height: 1; padding: 4px 8px; border-radius: 8px; }
.modal-head .x:hover { background: var(--paper); color: var(--ink); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--paper); border-radius: 0 0 16px 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.modal-foot .spacer { flex: 1; }

/* ---------------- printable report sheet ---------------- */
.sheet {
  background: #fff; color: #14182b; font-family: 'Inter', sans-serif; padding: 34px 38px;
  border: 1px solid var(--border); border-radius: 10px; font-size: 13px; line-height: 1.6;
}
.sheet .sh-top { display: flex; align-items: center; gap: 14px; border-bottom: 3px solid var(--navy); padding-bottom: 12px; margin-bottom: 16px; }
.sheet .sh-top img { width: 52px; height: 52px; border-radius: 8px; }
.sheet .sh-school { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 17px; color: var(--navy); }
.sheet .sh-kind { font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); font-weight: 600; }
.sheet .sh-id { margin-left: auto; text-align: right; font-size: 11px; color: var(--muted); }
.sheet h3.sh-sec {
  font-family: 'Sora', sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--navy); border-bottom: 1px solid var(--border); padding-bottom: 4px; margin: 18px 0 9px;
}
.sheet .sh-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 22px; }
.sheet .sh-f { display: flex; gap: 6px; padding: 3px 0; border-bottom: 1px dotted #e9ecf4; }
.sheet .sh-f .k { color: var(--muted); min-width: 120px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.sheet .sh-f .v { font-weight: 500; flex: 1; }
.sheet .sh-block { background: #f7f8fc; border: 1px solid var(--border); border-radius: 7px; padding: 10px 13px; margin-bottom: 8px; white-space: pre-wrap; }
.sheet .sh-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 26px; }
.sheet .sh-sign div { border-top: 1px solid #9aa0b3; padding-top: 5px; font-size: 11px; color: var(--muted); }
.sheet .sh-foot { margin-top: 22px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 10.5px; color: #9aa0b3; text-align: center; }
.sheet table.sh-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.sheet table.sh-tbl th { text-align: left; background: var(--paper); border: 1px solid var(--border); padding: 6px 9px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sheet table.sh-tbl td { border: 1px solid var(--border); padding: 6px 9px; vertical-align: top; }

/* ---------------- timeline ---------------- */
.tl { position: relative; padding-left: 26px; }
.tl::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--border); border-radius: 2px; }
.tl-item { position: relative; padding: 0 0 18px; }
.tl-item::before {
  content: ''; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2px solid var(--navy);
}
.tl-item.coral::before { border-color: var(--coral); }
.tl-item.mint::before { border-color: var(--mint-dark); }
.tl-item.gold::before { border-color: var(--gold); }
.tl-date { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tl-title { font-weight: 600; font-size: 14.5px; }
.tl-body { font-size: 13.5px; color: var(--muted); }

/* progress / meters */
.meter { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), var(--navy)); border-radius: 999px; transition: width .6s cubic-bezier(.22, 1, .36, 1); }
.meter.coral i { background: linear-gradient(90deg, #e8a196, var(--coral)); }

/* auth */
.auth-wrap { max-width: 460px; margin: 6vh auto 0; }
.auth-hero { text-align: center; margin-bottom: 22px; }
.auth-hero img { width: 84px; border-radius: 18px; box-shadow: var(--shadow-lg); }
.auth-hero h1 { font-size: clamp(25px, 5vw, 33px); margin: 16px 0 6px; }
.auth-hero p { color: var(--muted); font-size: 15px; }
.code-inputs { display: flex; gap: 8px; justify-content: center; margin: 12px 0 16px; }
.code-inputs input {
  width: 46px; height: 55px; text-align: center; font-size: 23px; font-weight: 700;
  border: 1.5px solid var(--border); border-radius: 10px; outline: none; color: var(--ink);
  font-variant-numeric: tabular-nums; transition: border-color .2s, box-shadow .2s;
}
.code-inputs input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(43, 57, 144, .12); }
.err { color: var(--coral); font-size: 13.5px; font-weight: 600; margin-top: 10px; display: none; }
.err.show { display: block; }
.hint { color: #8a90a3; font-size: 12.5px; margin-top: 12px; text-align: center; }
.hint a { color: var(--navy); font-weight: 600; }

/* toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(140px);
  background: var(--ink); color: #fff; border-radius: 10px; padding: 12px 20px; font-weight: 500;
  font-size: 14px; z-index: 300; transition: transform .4s cubic-bezier(.22, 1, .36, 1); box-shadow: var(--shadow-lg);
  max-width: 90vw; text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.bad { background: var(--coral); }
.toast.good { background: var(--mint-dark); }

/* misc */
.hidden { display: none !important; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: 13.5px; }
.tiny { font-size: 12px; color: #8a90a3; }
.mt { margin-top: 14px; }
.mt-sm { margin-top: 8px; }
.spin { width: 15px; height: 15px; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin 1s linear infinite; display: inline-block; }
.spin.dark { border-color: rgba(43,57,144,.25); border-top-color: var(--navy); }
@keyframes spin { to { transform: rotate(360deg); } }
.divider { height: 1px; background: var(--border); margin: 18px 0; }
footer.site { text-align: center; color: #9aa0b3; font-size: 12.5px; padding: 30px 0 40px; }

.demo-ribbon {
  background: var(--gold-bg); border-bottom: 1px solid #eddcb4; color: #7a5610;
  font-size: 12.5px; text-align: center; padding: 6px 14px; font-weight: 600;
}

@media print {
  body { background: #fff; }
  .appbar, .navtabs, .modal-head, .modal-foot, .btn, footer.site { display: none !important; }
  .modal-back { position: static; background: none; padding: 0; }
  .modal { box-shadow: none; max-height: none; }
  .sheet { border: none; padding: 0; }
}
