/* Yellow Desk — The Yellow brand: Yellow #FFC400 · Ink #17150F · Cream #FAF5EA */
:root {
  --y: #FFC400; --y-soft: #FFF1BF; --ink: #17150F; --ink-2: #2a2720; --ink-3: #3a362c;
  --cream: #FAF5EA; --card: #FFFFFF; --line: #ECE5D3; --muted: #736c5c; --muted-2: #a39b88;
  --green: #1f9d55; --green-soft: #E3F5EA; --red: #d64545; --red-soft: #FCE7E7; --blue: #2f6fd6; --blue-soft: #E5EEFC;
  --orange: #e07b12; --orange-soft: #FDEEDC; --purple: #7b4fd6; --purple-soft: #EEE7FC;
  --r: 14px; --r-sm: 10px; --shadow: 0 1px 2px rgba(23,21,15,.05), 0 6px 20px rgba(23,21,15,.06);
  --head: 'Bricolage Grotesque', 'Montserrat', system-ui, sans-serif;
  --body: 'Spline Sans', 'Open Sans', system-ui, sans-serif;
  --side: 232px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14.5px/1.5 var(--body); color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--head); margin: 0; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
code { background: var(--y-soft); padding: 1px 6px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }

/* ---------- splash / auth ---------- */
.splash { min-height: 100vh; display: grid; place-items: center; }
.logo-dot { width: 22px; height: 22px; border-radius: 7px; background: var(--y); display: inline-block; box-shadow: inset 0 -6px 0 rgba(0,0,0,.12); }
.logo-dot.big { width: 54px; height: 54px; border-radius: 16px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.88); } }
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--ink); background-image: radial-gradient(circle at 85% 0%, rgba(255,196,0,.25), transparent 45%); }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { background: var(--ink); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background-image: radial-gradient(circle at 0% 100%, rgba(255,196,0,.22), transparent 50%); }
.auth-hero h1 { font-size: 40px; line-height: 1.08; max-width: 460px; }
.auth-hero h1 span { color: var(--y); }
.auth-hero ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.auth-hero li { display: flex; gap: 12px; align-items: flex-start; color: #d9d3c2; }
.auth-hero li b { color: #fff; display: block; }
.auth-hero li i { width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--ink-3); display: grid; place-items: center; font-style: normal; }
.auth-side { display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 380px; background: var(--card); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); }
.auth-card.wide { max-width: 520px; }
.auth-card h1 { margin: 14px 0 6px; }
.brand-row { display: flex; align-items: center; gap: 6px; font: 800 20px var(--head); }
.brand-row b { color: var(--ink); margin-left: 2px; }
.auth-hero .brand-row b { color: var(--y); }
.err-box { background: var(--red-soft); color: #8f1f1f; border-radius: var(--r-sm); padding: 10px 12px; margin: 12px 0; }
.warn-box { background: var(--y-soft); border-radius: var(--r-sm); padding: 10px 12px; margin: 12px 0; }
textarea.code { width: 100%; font: 12px/1.4 monospace; padding: 10px; border-radius: 10px; border: 1px solid var(--line); }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; background: linear-gradient(to right, var(--ink) var(--side), transparent var(--side)); }
.side { background: var(--ink); color: #e9e4d6; padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.side .brand-row { color: #fff; padding: 4px 10px 18px; }
.side .brand-row b { color: var(--y); }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px; text-decoration: none; color: #cfc8b6; font-weight: 500; position: relative; }
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { background: var(--ink-2); color: #fff; }
.nav a.on { background: var(--ink-3); color: var(--y); }
.nav .badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
.side .me { margin-top: auto; background: var(--ink-2); border-radius: 14px; padding: 10px; display: flex; align-items: center; gap: 10px; }
.side .me .who { flex: 1; min-width: 0; line-height: 1.25; }
.side .me .who b { color: #fff; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .me .role { display: inline-block; font-size: 11px; background: var(--y); color: var(--ink); border-radius: 6px; padding: 0 6px; font-weight: 600; margin-top: 2px; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--ink-3); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn svg { width: 17px; height: 17px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--y); color: var(--ink); display: grid; place-items: center; font: 800 14px var(--head); flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.main { min-width: 0; padding: 22px 26px 40px; }
.topbar { display: none; }
.bottom-nav { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- tabs / chips ---------- */
.tabs { display: flex; gap: 4px; background: var(--ink); padding: 5px; border-radius: 13px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: transparent; color: #d9d3c2; padding: 7px 14px; border-radius: 9px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.tabs button.on { background: var(--y); color: var(--ink); font-weight: 600; }
.seg { display: inline-flex; background: #efe8d6; border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); font-weight: 600; }

/* ---------- buttons ---------- */
.btn { border: 0; border-radius: 11px; padding: 9px 15px; font-weight: 600; cursor: pointer; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line);
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none; white-space: nowrap; transition: transform .06s; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--y); box-shadow: none; }
.btn.primary:hover { background: #ffcd26; }
.btn.dark { background: var(--ink); color: #fff; box-shadow: none; }
.btn.danger { color: var(--red); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.wa { background: #25D366; color: #fff; box-shadow: none; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; justify-content: center; padding: 12px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- cards & stats ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px; min-width: 0; }
.card.dark { background: var(--ink); color: #fff; }
.card.dark .muted { color: #b6ae9b; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.card-head .muted { font-size: 12.5px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.stat { background: var(--ink); color: #fff; border-radius: var(--r); padding: 14px 16px; min-width: 0; }
.stat .k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #b6ae9b; }
.stat .v { font: 800 28px/1.15 var(--head); margin: 4px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .s { font-size: 12.5px; color: #b6ae9b; }
.stat.y { background: var(--y); color: var(--ink); }
.stat.y .k, .stat.y .s { color: #5c4a00; }
.stat .v.red { color: #ff8a8a; }
.stat.light { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.stat.light .k, .stat.light .s { color: var(--muted); }

.month-nav { display: inline-flex; align-items: center; gap: 6px; background: #fff; border-radius: 11px; padding: 4px; box-shadow: inset 0 0 0 1px var(--line); }
.month-nav button { border: 0; background: var(--cream); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 16px; }
.month-nav span { min-width: 118px; text-align: center; font-weight: 600; font-size: 13.5px; }

/* ---------- lists & tables ---------- */
.list { display: grid; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); text-decoration: none; min-width: 0; }
.li:last-child { border-bottom: 0; }
.li .grow { flex: 1; min-width: 0; }
.li .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.li:hover .t { text-decoration: underline; }
.empty { color: var(--muted); padding: 18px 4px; text-align: center; font-size: 13.5px; }
.empty b { display: block; color: var(--ink); font-family: var(--head); font-size: 15px; margin-bottom: 2px; }

.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #fffbef; }
table.t .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #f1ecdf; color: var(--ink-2); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.plain::before { display: none; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.orange { background: var(--orange-soft); color: var(--orange); }
.pill.purple { background: var(--purple-soft); color: var(--purple); }
.pill.y { background: var(--y-soft); color: #7a5d00; }

.bar { height: 8px; background: #efe8d6; border-radius: 99px; overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--y); border-radius: 99px; }
.bar.green > i { background: var(--green); }
.hbar { display: grid; grid-template-columns: 130px 1fr 44px; align-items: center; gap: 10px; font-size: 13px; padding: 5px 0; }
.hbar .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

.cols { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 8px; }
.cols .c { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.cols .c i { width: 100%; max-width: 46px; background: var(--y); border-radius: 8px 8px 3px 3px; min-height: 3px; }
.cols .c.cur i { background: var(--ink); }
.cols .c span { font-size: 11.5px; color: var(--muted); }
.cols .c b { font-size: 11.5px; font-variant-numeric: tabular-nums; }

/* ---------- pipeline board ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.col { background: #efe8d6; border-radius: var(--r); padding: 10px; min-height: 120px; }
.col.drop { outline: 2px dashed var(--ink); }
.col-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 10px; font-weight: 700; font-family: var(--head); }
.col-head span { font: 600 12px var(--body); color: var(--muted); }
.lead-card { background: #fff; border-radius: 11px; padding: 10px 12px; margin-bottom: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.06); cursor: pointer; border-left: 3px solid transparent; }
.lead-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,.1); }
.lead-card.due { border-left-color: var(--red); }
.lead-card .t { font-weight: 600; }
.lead-card .sub { font-size: 12.5px; color: var(--muted); }
.lead-card .row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; gap: 6px; font-size: 12px; }

/* ---------- toolbar / filters ---------- */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .search { flex: 1; min-width: 180px; }
input.in, select.in, textarea.in, .form input, .form select, .form textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 11px; outline: none; }
input.in:focus, select.in:focus, textarea.in:focus, .form input:focus, .form select:focus, .form textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px var(--y-soft); }
select.in.auto { width: auto; }

/* ---------- forms ---------- */
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.form label small { font-weight: 400; color: var(--muted); }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form h3 { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.form h3:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.check { display: flex !important; grid-template-columns: none; align-items: center; gap: 8px; font-weight: 500 !important; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.inst-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr 34px; gap: 8px; align-items: center; }
.sumline { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 10px; border-radius: 9px; background: var(--cream); }
.sumline.bad { background: var(--red-soft); color: #8f1f1f; }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(23,21,15,.55); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; z-index: 50; overflow-y: auto; animation: fade .15s; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 560px; box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: up .18s ease-out; }
.modal.lg { max-width: 760px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head .icon-btn { background: var(--cream); color: var(--ink); }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fcfaf4; border-radius: 0 0 18px 18px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(14px); opacity: 0; } }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 99; display: grid; gap: 8px; pointer-events: none; }
#toast div { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: up .2s; font-weight: 500; }
#toast div.err { background: var(--red); }

/* ---------- detail pages ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 13px; margin-bottom: 8px; }
.back:hover { color: var(--ink); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 8px 0; position: relative; }
.tl::before { content: ''; position: absolute; left: 13px; top: 30px; bottom: -8px; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl .dot { width: 28px; height: 28px; border-radius: 50%; background: var(--cream); display: grid; place-items: center; font-size: 13px; }
.tl .dot.stage { background: var(--y); }
.tl .meta { font-size: 12px; color: var(--muted); }
.stage-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.stage-steps button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 12px; cursor: pointer; font-size: 13px; font-weight: 500; }
.stage-steps button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.stage-steps button.done { background: var(--y-soft); border-color: transparent; }
.mod { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.mod:last-child { border-bottom: 0; }
.mod input { width: 19px; height: 19px; accent-color: var(--green); flex: none; }
.mod.done .t { color: var(--muted); text-decoration: line-through; }
.mod .t { flex: 1; }
.mod .when { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.ring { --p: 0; width: 86px; height: 86px; border-radius: 50%; background: conic-gradient(var(--y) calc(var(--p) * 1%), #efe8d6 0); display: grid; place-items: center; flex: none; }
.ring b { width: 66px; height: 66px; border-radius: 50%; background: #fff; display: grid; place-items: center; font: 800 18px var(--head); }
.card.dark .ring b { background: var(--ink); }
.tpl-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.notice { background: var(--y-soft); border-radius: 11px; padding: 10px 12px; font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { padding: 28px 22px; }
  .auth-hero h1 { font-size: 28px; }
  .auth-hero ul { display: none; }
  .shell { display: block; background: none; }
  .side { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; background: var(--ink); color: #fff; padding: 10px 16px; position: sticky; top: 0; z-index: 20; }
  .topbar .brand-row { font-size: 17px; }
  .topbar .brand-row b { color: var(--y); }
  .main { padding: 16px 16px 92px; }
  .bottom-nav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; bottom: 0; left: 0; right: 0; background: var(--ink); z-index: 20; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a { display: grid; justify-items: center; gap: 2px; color: #b6ae9b; text-decoration: none; font-size: 10.5px; padding: 4px 0; position: relative; }
  .bottom-nav a svg { width: 21px; height: 21px; }
  .bottom-nav a.on { color: var(--y); }
  .bottom-nav .badge { position: absolute; top: 0; right: 22%; background: var(--red); color: #fff; font-size: 10px; border-radius: 99px; padding: 0 5px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  h1 { font-size: 22px; }
  .stat .v { font-size: 23px; }
  .form .row2, .form .row3 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px 1fr; }
  .hbar { grid-template-columns: 100px 1fr 36px; }
  .modal-bg { padding: 0; align-items: flex-end; }
  .modal { border-radius: 18px 18px 0 0; max-height: 92vh; overflow-y: auto; }
  .modal-foot { border-radius: 0; position: sticky; bottom: 0; }
  .hide-m { display: none !important; }
  .inst-row { grid-template-columns: 1fr 1fr 34px; }
  .inst-row .lbl { grid-column: 1 / -1; }
}
@media (min-width: 861px) { .show-m { display: none !important; } }
@media print { .side, .topbar, .bottom-nav, .actions, .toolbar { display: none !important; } .shell { display: block; } body { background: #fff; } }

/* ---------- course checklist steps ---------- */
.step { display: flex; gap: 10px; align-items: flex-start; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step .grow { flex: 1; min-width: 0; }
.step .t { font-weight: 600; }
.step-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--head); background: #efe8d6; color: var(--muted); flex: none; }
.step.done .step-n { background: var(--green); color: #fff; }
.step.next { background: #fffbef; margin: 0 -8px; padding: 10px; border-radius: 10px; }
.step.next .step-n { background: var(--y); color: var(--ink); }
.step.locked { opacity: .55; }
.seg button.on { background: var(--y); }

/* ---------- admission file / attendance ---------- */
.doc-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border-bottom: 0; }
.doc-row .grow { flex: 1; min-width: 0; }
.doc-row .t { font-weight: 600; font-size: 13.5px; }
.doc-row .sub { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.doc-ic { font-size: 16px; flex: none; }
label.btn input[type=file] { display: none; }
.seg.att button { min-width: 38px; font-weight: 700; }
.seg.att button.on.present { background: var(--green); color: #fff; }
.seg.att button.on.absent { background: var(--red); color: #fff; }
.seg.att button.on.leave { background: var(--orange); color: #fff; }
.att-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.att-sum div { background: var(--cream); border-radius: 10px; padding: 8px 4px; }
.att-sum b { display: block; font: 800 22px var(--head); }
.att-sum span { font-size: 11.5px; color: var(--muted); }
@media (max-width: 860px) { .att-row .sub { white-space: normal; } }
.li.wrap .t, .li.wrap .sub { white-space: normal; }

/* ---------- delivery · resources · production (v1.5) ---------- */
.seg.wrap { flex-wrap: wrap; }
.seg button small { opacity: .6; font-weight: 600; margin-left: 2px; }
.score { display: inline-grid; place-items: center; min-width: 38px; height: 28px; padding: 0 6px; border-radius: 9px; font: 800 14px/1 var(--head); }
.score.green { background: var(--green-soft); color: var(--green); }
.score.orange { background: var(--orange-soft); color: var(--orange); }
.score.red { background: var(--red-soft); color: var(--red); }
.dots { display: inline-flex; gap: 4px; align-items: center; margin-bottom: 3px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #e7dfcb; }
.dots i.on { background: var(--green); }
.dots i.sq { border-radius: 3px; margin-left: 3px; }
.bar.mark { position: relative; overflow: visible; }
.bar.mark > i { border-radius: 99px; }
.bar.mark em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 2px; transform: translateX(-1px); }
.bar.warn > i { background: var(--orange); }
table.delivery td { vertical-align: top; }
table.delivery td:nth-child(3) { min-width: 110px; white-space: nowrap; }
.res { display: flex; flex-direction: column; gap: 8px; min-height: 150px; }
.res h3 { margin: 0 0 4px; }
.res-notes { white-space: pre-wrap; max-height: 7.5em; overflow: hidden; color: var(--ink-2); background: #faf6ec; border-radius: 8px; padding: 8px 10px; }
.cols.days { gap: 3px; height: 130px; }
.cols.days .c i { border-radius: 4px 4px 2px 2px; }
.cols.days .c.hit i { background: var(--green); }
.cols.days .c b, .cols.days .c span { font-size: 9.5px; }
.card.inc table.t td { padding: 7px 4px; }
.card.inc tr.tot td { border-top: 2px solid var(--ink); font-size: 16px; }
@media (max-width: 860px) { .cols.days .c b { display: none; } .seg.wrap { width: 100%; } }

/* ---------- student app: staff side (v1.6) ---------- */
.sub-box { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--blue-soft); }
.sub-box.redo { background: var(--orange-soft); }
.checkin-screen { display: grid; grid-template-columns: 1fr minmax(280px, 460px) 260px; gap: 28px; align-items: center; min-height: 70vh; }
.checkin-screen h1 { font-size: 34px; line-height: 1.1; margin: 0 0 14px; }
.checkin-screen ol { font-size: 17px; line-height: 1.8; padding-left: 22px; }
.ck-qr { background: #fff; border-radius: 22px; padding: 18px; box-shadow: var(--shadow); }
.ck-qr svg { width: 100%; height: auto; display: block; }
.ck-code { font-size: 16px; margin: 10px 0 6px; } .ck-code b { font: 800 28px/1 var(--head); letter-spacing: .12em; background: var(--y); padding: 4px 10px; border-radius: 8px; }
.ck-list { background: #fff; border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); max-height: 70vh; overflow: auto; }
.ck-list h3 { margin: 0 0 8px; } .ck-list .li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 1000px) { .checkin-screen { grid-template-columns: 1fr; } }
.poster { background: #fff; max-width: 640px; margin: 0 auto; padding: 44px 48px; border-radius: 20px; box-shadow: var(--shadow); text-align: center; border-top: 18px solid var(--y); }
.p-brand { display: inline-flex; align-items: center; gap: 10px; font: 800 20px var(--head); }
.poster h1 { font: 800 56px/1 var(--head); margin: 18px 0 22px; }
.p-qr { width: 340px; max-width: 100%; margin: 0 auto 22px; padding: 10px; border: 4px solid var(--ink); border-radius: 18px; } .p-qr svg { width: 100%; height: auto; display: block; }
.poster ol { text-align: left; display: inline-block; font-size: 19px; line-height: 1.8; margin: 0 0 14px; }
.p-foot { background: var(--ink); color: var(--y); border-radius: 99px; display: inline-block; padding: 8px 18px; font-weight: 600; margin: 0; }
@media print {
  .no-print, .bottom-nav, .topbar, .side { display: none !important; }
  .main { padding: 0 !important; } .poster { box-shadow: none; border-radius: 0; max-width: none; padding: 20mm 10mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .poster h1 { font-size: 64px; } .p-qr { width: 120mm; }
  @page { size: A4; margin: 10mm; }
}

/* profile photos */
.avatar.ph { background: #eee; overflow: hidden; padding: 0; } .avatar.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xl { width: 64px; height: 64px; font-size: 22px; }
.ph-btn { position: relative; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; flex: none; } .ph-btn:disabled { cursor: default; }
.ph-btn span { position: absolute; right: -2px; bottom: -2px; background: #fff; border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; font-size: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.me a, .topbar a { display: flex; text-decoration: none; }

/* academy logo */
.logo-card { background: #fff; border-radius: 12px; padding: 6px 10px; display: inline-flex; align-items: center; } .logo-card img { height: 34px; width: auto; display: block; }
.brand-row { flex-wrap: wrap; } .app-tag { font: 700 12px var(--body, sans-serif); letter-spacing: .06em; text-transform: uppercase; color: #b9b19c; margin-left: 4px; }
.side .brand-row { flex-direction: column; align-items: flex-start; gap: 6px; } .side .app-tag { margin-left: 2px; }
.topbar .logo-card { padding: 4px 8px; border-radius: 10px; } .topbar .logo-card img { height: 26px; } .topbar .app-tag { display: none; }
.auth-hero .logo-card img { height: 46px; }
.splash-logo { width: 84px; height: 84px; border-radius: 22px; animation: pulse 1.2s ease-in-out infinite; box-shadow: 0 6px 24px rgba(0,0,0,.12); }
/* course thumbnails */
.c-thumb { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: var(--cream, #FAF5EA); border: 1px solid var(--line); }
.c-thumb.none { display: grid; place-items: center; color: var(--muted, #8a8473); font-size: 13px; border-style: dashed; }
.course-card .c-thumb { margin: -4px 0 12px; }
.thumb-edit { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
@media (max-width: 560px) { .thumb-edit { grid-template-columns: 1fr; } }
/* guide */
.guide-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.guide-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font: 600 13.5px var(--body, sans-serif); cursor: pointer; }
.guide-tabs button.on { background: var(--ink, #17150F); color: #FFC400; border-color: var(--ink, #17150F); }
.guide h2 { margin: 0 0 6px; } .guide h3 { margin: 18px 0 6px; font-size: 16px; }
.guide ol, .guide ul { margin: 0; padding-left: 20px; } .guide li { margin: 5px 0; line-height: 1.5; }
.guide .rule { border-left: 4px solid #FFC400; background: #FFF8E1; padding: 10px 12px; border-radius: 8px; margin: 10px 0; }
.guide .dont li::marker { content: '✕  '; color: var(--red, #d64545); font-weight: 700; }
.guide .do li::marker { content: '✓  '; color: var(--green, #2e9e5b); font-weight: 700; }
.guide-day { display: grid; grid-template-columns: 92px 1fr; gap: 4px 12px; } .guide-day > b { color: var(--ink-2, #4a463c); font-size: 13px; padding-top: 2px; }
/* visitor form */
.lbl { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.vchips { display: flex; flex-wrap: wrap; gap: 6px; }
.vchip input { position: absolute; opacity: 0; pointer-events: none; }
.vchip span { display: inline-block; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; user-select: none; }
.vchip input:checked + span { background: var(--ink, #17150F); color: #FFC400; border-color: var(--ink, #17150F); }
.vchip input:focus-visible + span { outline: 2px solid #FFC400; outline-offset: 2px; }
.vout { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.vopt input { position: absolute; opacity: 0; pointer-events: none; }
.vopt span { display: block; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: #fff; height: 100%; }
.vopt span b { display: block; font-size: 14px; } .vopt span small { color: var(--muted, #8a8473); font-size: 12px; }
.vopt input:checked + span { border-color: var(--ink, #17150F); background: #FFF8E1; box-shadow: inset 0 0 0 1px var(--ink, #17150F); }
.visit-wait { border: 2px solid #FFC400; }
.visit-banner { background: #FFF8E1; border-left: 4px solid #FFC400; }

/* 1.20 · admission plan, membership card, not-coming follow-ups */
.plan-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.plan-courses { margin-top: 8px; }
.pill.gold { background: #17150F; color: #FFC400; }
.member-card .mc-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.member-card .mc-prev { width: 100%; height: auto; aspect-ratio: 853 / 1280; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.18); background: #17150F; }
.member-card .actions.wrap { flex-wrap: wrap; }
.nc-card .li .btn.sm { white-space: nowrap; }

/* 1.21 · pipeline stage, timeline, old records */
.pipe-card { padding: 14px 16px; }
.pipe { display: flex; gap: 4px; overflow-x: auto; }
.pipe-st { flex: 1; min-width: 92px; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; padding-top: 2px; }
.pipe-st::before { content: ''; position: absolute; top: 15px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.pipe-st:first-child::before { display: none; }
.pipe-st.done::before, .pipe-st.now::before { background: #FFC400; }
.pipe-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: #fff; border: 2px solid var(--line); color: var(--muted, #8a8473); position: relative; z-index: 1; }
.pipe-st.done .pipe-dot { background: #FFC400; border-color: #FFC400; color: #17150F; }
.pipe-st.now .pipe-dot { background: #17150F; border-color: #17150F; color: #FFC400; box-shadow: 0 0 0 4px #FFF1C2; }
.pipe-l { font-size: 12px; font-weight: 600; text-align: center; color: var(--muted, #8a8473); }
.pipe-st.now .pipe-l { color: var(--ink, #17150F); }
.pipe-foot { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.pipe-foot .btn { margin-left: auto; }
.stl { position: relative; }
.tl-day { font: 700 12px/1 var(--head, sans-serif); color: var(--muted, #8a8473); text-transform: uppercase; letter-spacing: .04em; margin: 12px 0 6px; }
.tl-day:first-child { margin-top: 0; }
.tl-it { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.tl-it:last-child { border-bottom: 0; }
.tl-ic { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; background: #FFF6D6; font-size: 14px; }
.tl-it.auto .tl-ic { background: #F2F0EA; }
.tl-t { font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; }
.tl-s { font-size: 12px; color: var(--muted, #8a8473); margin-top: 2px; }
.tl-card .stl { max-height: 520px; overflow-y: auto; }
.bf-card .actions.wrap { flex-wrap: wrap; }

/* sidebar scroll */
.side{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.25) transparent}
.side::-webkit-scrollbar{width:6px}.side::-webkit-scrollbar-thumb{background:rgba(255,255,255,.25);border-radius:6px}
