:root {
  color-scheme: light;
  --ink: #1f2d3d;
  --ink-2: #4a5b70;
  --ink-3: #7b8ca3;
  --paper: #ffffff;
  --surface: #f5f8fc;
  --surface-2: #eaf1fb;
  --line: #d9e5f4;
  --green: #1677ff;
  --green-2: #0958d9;
  --green-pale: #eaf3ff;
  --success: #13a66a;
  --success-pale: #e7f8f0;
  --amber: #b66b16;
  --amber-pale: #fff3df;
  --blue: #5b6fba;
  --blue-pale: #eef0fb;
  --red: #b44242;
  --red-pale: #fbeaea;
  --shadow-sm: 0 2px 8px rgba(22, 119, 255, 0.06);
  --shadow-md: 0 18px 48px rgba(22, 119, 255, 0.15);
  --sidebar: 248px;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--surface); color: var(--ink); overflow-x: hidden; }
body { min-width: 320px; font-size: 14px; letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
a { color: inherit; }
.is-hidden { display: none !important; }
.muted { color: var(--ink-3); }
.text-positive { color: var(--success); }
.text-negative { color: var(--red); }
.mono { font-family: "SFMono-Regular", Consolas, monospace; }

.login-screen { min-height: 100vh; padding: 96px 28px 70px; display: grid; place-items: center; position: relative; overflow: hidden; background: #eef5ff; }
.login-screen::before, .login-screen::after { content: ""; position: fixed; pointer-events: none; border: 46px solid rgba(22,119,255,.05); transform: rotate(-29deg); }
.login-screen::before { width: 520px; height: 170px; left: -150px; top: 18%; }
.login-screen::after { width: 420px; height: 130px; right: -140px; bottom: 10%; border-color: rgba(80,116,176,.06); }
.login-masthead { position: absolute; z-index: 2; top: 24px; left: max(28px, calc(50% - 550px)); right: max(28px, calc(50% - 550px)); display: flex; align-items: center; justify-content: flex-end; gap: 20px; }
.mobile-brand > div:last-child { display: grid; gap: 2px; }
.login-masthead-status { display: flex; align-items: center; gap: 9px; color: var(--ink-3); font-size: 12px; }
.login-shell { width: min(1040px, 100%); min-height: 590px; display: grid; grid-template-columns: minmax(390px, .88fr) minmax(440px, 1.12fr); position: relative; z-index: 1; border-radius: 8px; background: var(--paper); box-shadow: 0 28px 72px rgba(22, 119, 255, .16); }
.login-brand { margin: -18px 0; padding: 42px; background: #1677ff; color: #fff; display: flex; flex-direction: column; min-height: 626px; position: relative; overflow: hidden; border-radius: 8px; box-shadow: 14px 18px 40px rgba(9, 88, 217, .24); }
.login-brand::before { content: ""; position: absolute; width: 340px; height: 340px; right: -174px; top: 38px; border: 56px solid rgba(255,255,255,.07); border-radius: 50%; }
.login-brand::after { content: ""; position: absolute; width: 390px; height: 120px; left: -160px; bottom: 58px; border: 34px solid rgba(255,255,255,.06); transform: rotate(-28deg); pointer-events: none; }
.login-brand-copy { margin-top: 0; position: relative; z-index: 1; }
.login-brand h1 { margin: 13px 0 13px; font-size: 38px; line-height: 1.18; font-weight: 700; }
.login-brand h1 span { color: #dcecff; }
.login-brand p { margin: 0; color: rgba(255,255,255,.72); font-size: 14px; }
.login-kicker { color: #dcecff; font-size: 11px; font-weight: 700; }
.login-status { display: flex; align-items: center; gap: 9px; margin-top: auto; color: rgba(255,255,255,.72); font-size: 11px; position: relative; z-index: 2; }
.login-status svg { width: 16px; height: 16px; }
.status-dot { width: 7px; height: 7px; background: var(--success); border-radius: 50%; box-shadow: 0 0 0 3px rgba(19,166,106,.15); flex: 0 0 auto; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 7px; background: var(--green); color: #fff; }
.brand-mark svg { width: 21px; height: 21px; }
.login-visual { height: 214px; margin: 22px 0 8px; position: relative; z-index: 1; }
.visual-route { position: absolute; left: 46px; right: 28px; top: 62px; height: 94px; border: 2px dashed rgba(255,255,255,.22); border-radius: 50%; transform: rotate(-10deg); }
.visual-route svg { position: absolute; width: 22px; height: 22px; top: -10px; right: 46px; fill: #dcecff; color: #dcecff; transform: rotate(10deg); }
.visual-card { width: 150px; height: 92px; padding: 14px; display: grid; grid-template-columns: 28px 1fr; align-items: center; position: absolute; color: var(--ink); background: #fff; border: 1px solid rgba(255,255,255,.8); border-radius: 7px; box-shadow: 0 14px 34px rgba(5,62,145,.22); }
.visual-card svg { width: 22px; height: 22px; color: var(--green); }
.visual-card span { color: var(--ink-3); font-size: 10px; }
.visual-card strong { grid-column: 2; font-size: 20px; line-height: 1; align-self: start; }
.visual-card-students { left: 6px; top: 18px; transform: rotate(-3deg); }
.visual-card-schedule { right: 3px; bottom: 8px; transform: rotate(3deg); }
.visual-car { width: 54px; height: 54px; display: grid; place-items: center; position: absolute; left: calc(50% - 27px); top: 82px; border-radius: 50%; background: #dcecff; color: var(--green-2); box-shadow: 0 10px 24px rgba(5,62,145,.22); }
.visual-car svg { width: 25px; height: 25px; }
.login-panel { display: grid; place-items: center; padding: 54px 66px; min-width: 0; position: relative; }
.login-form { width: min(100%, 360px); }
.login-heading { margin-bottom: 30px; }
.login-heading > span { color: var(--green); font-weight: 750; font-size: 11px; }
.login-heading h2 { font-size: 27px; margin: 9px 0 8px; font-weight: 680; }
.login-heading p { margin: 0; color: var(--ink-3); line-height: 1.65; }
.mobile-brand { display: none; align-items: center; gap: 12px; margin-bottom: 38px; font-size: 15px; }
.mobile-brand span { color: var(--ink-3); font-size: 11px; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field > span, .field-label { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.input-with-icon { height: 48px; border: 1px solid var(--line); border-radius: 6px; display: flex; align-items: center; padding: 0 13px; background: var(--paper); transition: border .18s, box-shadow .18s; }
.input-with-icon:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,119,255,.11); }
.input-with-icon > svg { width: 18px; height: 18px; color: var(--ink-3); margin-right: 10px; }
.input-with-icon input { flex: 1; width: 100%; border: 0; outline: 0; background: transparent; min-width: 0; color: var(--ink); }
.input-with-icon .icon-button { margin-right: -7px; }
.form-error { min-height: 20px; color: var(--red); font-size: 13px; margin: -4px 0 8px; }
.login-footer { position: absolute; z-index: 2; bottom: 20px; color: var(--ink-3); font-size: 11px; }
.login-submit { box-shadow: 0 8px 18px rgba(22,119,255,.22); }
.demo-accounts { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink-3); font-size: 11px; }
.demo-accounts > div { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.demo-accounts button { border: 1px solid transparent; background: var(--surface); color: var(--ink-2); padding: 5px 7px; border-radius: 4px; }
.demo-accounts button:hover { color: var(--green); background: var(--green-pale); }

.button { min-height: 38px; border: 1px solid transparent; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; font-weight: 600; transition: background .16s, border .16s, color .16s, transform .16s; white-space: nowrap; }
.button:active { transform: translateY(1px); }
.button svg { width: 16px; height: 16px; }
.button-primary { background: var(--green); color: #fff; }
.button-primary:hover { background: var(--green-2); }
.button-wechat { background: #f0f6ff; border-color: #c9ddfb; color: var(--green-2); }
.button-wechat:hover { background: #e5f0ff; }
.button-secondary { background: var(--paper); border-color: var(--line); color: var(--ink); }
.button-secondary:hover, .button-quiet:hover { background: var(--surface-2); }
.button-danger { background: var(--red-pale); color: var(--red); border-color: #f0caca; }
.button-quiet { background: transparent; color: var(--ink-2); }
.button-block { width: 100%; margin-top: 10px; height: 44px; }
.button-small { min-height: 31px; padding: 0 10px; font-size: 12px; }
.icon-button { width: 36px; height: 36px; padding: 0; border: 1px solid transparent; background: transparent; color: var(--ink-2); border-radius: 5px; display: grid; place-items: center; flex: 0 0 auto; }
.icon-button:hover { background: var(--surface-2); color: var(--ink); }
.button-danger-icon { color: #b42318; }
.button-danger-icon:hover { background: #fff1f0; color: #8f1d14; }
.icon-button svg { width: 18px; height: 18px; }
.icon-button:disabled, .button:disabled { opacity: .45; cursor: not-allowed; }

.app-shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: #0b67d8; color: #fff; display: flex; flex-direction: column; z-index: 30; box-shadow: 10px 0 30px rgba(22,119,255,.1); }
.sidebar-brand { height: 76px; display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid rgba(255,255,255,.09); }
.sidebar-brand .brand-mark { background: #f4f8ff; color: var(--green-2); }
.sidebar-brand > div:last-child { display: grid; gap: 2px; }
.sidebar-brand strong { font-size: 15px; }
.sidebar-brand span { color: rgba(255,255,255,.55); font-size: 11px; }
.primary-nav { flex: 1; overflow-y: auto; padding: 14px 10px; -ms-overflow-style: none; scrollbar-width: none; }
.primary-nav::-webkit-scrollbar { width: 0; height: 0; }
.nav-group-label { color: rgba(255,255,255,.36); padding: 18px 10px 7px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.nav-item { width: 100%; min-height: 39px; color: rgba(255,255,255,.68); border: 0; background: transparent; display: flex; align-items: center; gap: 11px; padding: 0 11px; border-radius: 5px; margin: 2px 0; text-align: left; font-size: 13px; }
.nav-item svg { width: 17px; height: 17px; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: #f4f8ff; color: var(--green-2); font-weight: 700; box-shadow: 0 4px 12px rgba(5,62,145,.14); }
.sidebar-footer { min-height: 70px; padding: 12px 13px; border-top: 1px solid rgba(255,255,255,.09); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sidebar-footer .icon-button { color: rgba(255,255,255,.65); }
.sidebar-footer .icon-button:hover { background: rgba(255,255,255,.08); color: #fff; }
.user-chip { min-width: 0; display: flex; align-items: center; gap: 10px; }
.user-chip > div:last-child { display: grid; min-width: 0; }
.user-chip strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip span { color: rgba(255,255,255,.5); font-size: 11px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #dcecff; color: var(--green-2); display: grid; place-items: center; font-weight: 750; flex: 0 0 auto; }
.workspace { grid-column: 2; min-width: 0; }
.topbar { height: 76px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 clamp(18px, 3vw, 36px); box-shadow: 0 3px 14px rgba(22,119,255,.04); }
.topbar-leading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.breadcrumb { display: block; color: var(--ink-3); font-size: 11px; margin-bottom: 3px; }
.topbar h2 { margin: 0; font-size: 18px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 6px; min-width: 0; }
.topbar-user-chip { display: flex; align-items: center; gap: 7px; min-width: 0; margin-left: 5px; padding-left: 10px; border-left: 1px solid var(--line); }
.topbar-user-chip > div { display: grid; min-width: 0; gap: 1px; }
.topbar-user-chip strong { max-width: 105px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.topbar-user-chip span:not(.topbar-user-status) { color: var(--ink-3); font-size: 10px; white-space: nowrap; }
.topbar-user-status { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-pale); flex: 0 0 auto; }
.sync-indicator { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 12px; margin-right: 8px; }
.notification-button { position: relative; }
.notification-badge { position: absolute; top: 2px; right: 1px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: 9px; display: grid; place-items: center; border: 2px solid #fff; }
.mobile-menu-button { display: none; }
.page-content { width: min(100%, 1540px); margin: 0 auto; padding: clamp(20px, 3vw, 34px); outline: none; }
.sidebar-scrim { display: none; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-heading h1 { font-size: 25px; line-height: 1.25; margin: 0 0 6px; font-weight: 650; }
.page-heading p { margin: 0; color: var(--ink-3); line-height: 1.55; }
.heading-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.metric-card { min-height: 124px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.metric-card::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--green); opacity: .75; }
.metric-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink-3); font-size: 12px; }
.metric-icon { width: 32px; height: 32px; border-radius: 5px; display: grid; place-items: center; background: var(--green-pale); color: var(--green); }
.metric-icon.amber { background: var(--amber-pale); color: var(--amber); }
.metric-icon.blue { background: var(--blue-pale); color: var(--blue); }
.metric-icon.red { background: var(--red-pale); color: var(--red); }
.metric-icon svg { width: 17px; height: 17px; }
.metric-value { font-size: 29px; line-height: 1; font-weight: 680; margin-top: 14px; }
.metric-foot { color: var(--ink-3); font-size: 11px; margin-top: 7px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr); gap: 16px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow-sm); min-width: 0; }
.panel-header { min-height: 58px; padding: 0 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.panel-header > div { min-width: 0; }
.panel-header h3 { margin: 0; font-size: 14px; font-weight: 680; }
.panel-header p { margin: 3px 0 0; color: var(--ink-3); font-size: 11px; }
.panel-body { padding: 18px; }
.panel-body.flush { padding: 0; }
.panel-footer { min-height: 54px; padding: 10px 18px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--ink-3); font-size: 12px; }
.chart-bars { display: flex; align-items: flex-end; gap: 10px; min-height: 210px; padding-top: 20px; }
.bar-column { flex: 1; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; height: 190px; min-width: 0; }
.bar-value { text-align: center; font-size: 12px; font-weight: 700; margin-bottom: 7px; }
.bar-track { height: 140px; background: var(--surface); display: flex; align-items: flex-end; border-radius: 4px 4px 0 0; overflow: hidden; }
.bar-fill { width: 100%; background: var(--green); min-height: 3px; transition: height .3s; }
.bar-column:nth-child(2) .bar-fill { background: var(--amber); }
.bar-column:nth-child(3) .bar-fill { background: var(--blue); }
.bar-column:nth-child(4) .bar-fill { background: #6c7c72; }
.bar-label { text-align: center; font-size: 11px; color: var(--ink-3); margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-list { display: grid; }
.activity-item { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.activity-item:last-child { border-bottom: 0; }
.activity-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--green-pale); color: var(--green); }
.activity-icon svg { width: 16px; height: 16px; }
.activity-item strong { display: block; font-size: 12px; margin-bottom: 3px; }
.activity-item p { margin: 0; color: var(--ink-3); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.toolbar { display: flex; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.search-box { height: 36px; min-width: min(280px, 100%); flex: 1; border: 1px solid var(--line); border-radius: 5px; display: flex; align-items: center; gap: 8px; padding: 0 10px; background: var(--paper); }
.search-box:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,119,255,.09); }
.search-box svg { width: 16px; height: 16px; color: var(--ink-3); }
.search-box input { border: 0; outline: 0; width: 100%; min-width: 0; }
.select-control, .text-control, .textarea-control { border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: var(--paper); outline: 0; }
.select-control, .text-control { height: 36px; padding: 0 10px; }
.select-control:focus, .text-control:focus, .textarea-control:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,119,255,.09); }
.textarea-control { min-height: 86px; padding: 10px; resize: vertical; width: 100%; }
.table-wrap { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.data-table th { height: 42px; padding: 0 14px; text-align: left; background: #f5f8fc; color: var(--ink-3); font-size: 11px; font-weight: 650; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { height: 56px; padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 12px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #f7faff; }
.data-table .clickable-row { cursor: pointer; }
.student-mobile-list { display: none; }
.student-mobile-card { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 14px; box-shadow: var(--shadow-sm); cursor: pointer; }
.student-mobile-card + .student-mobile-card { margin-top: 9px; }
.student-mobile-card-head { display: flex; align-items: center; gap: 9px; min-width: 0; }
.student-mobile-card-head > input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--green); }
.student-mobile-identity { display: grid; gap: 3px; min-width: 0; flex: 1; }
.student-mobile-identity strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-mobile-identity span { color: var(--ink-3); font-size: 11px; }
.student-mobile-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 13px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.student-mobile-fields div { min-width: 0; }
.student-mobile-fields dt { color: var(--ink-3); font-size: 10px; margin-bottom: 4px; }
.student-mobile-fields dd { margin: 0; color: var(--ink-2); font-size: 11px; overflow-wrap: anywhere; line-height: 1.5; }
.student-mobile-fields dd .tag { margin: 1px 3px 1px 0; }
.detail-tags { margin-top: 8px; }
.cell-primary { font-weight: 650; color: var(--ink); }
.cell-secondary { color: var(--ink-3); margin-top: 3px; font-size: 11px; }
.account-sensitive { display: flex; align-items: center; gap: 5px; min-width: 150px; }
.account-sensitive .sensitive-toggle { flex: 0 0 28px; }
.row-actions { display: flex; gap: 3px; justify-content: flex-end; }
.tag { display: inline-flex; align-items: center; gap: 5px; min-height: 23px; padding: 0 8px; border-radius: 12px; font-size: 10px; font-weight: 700; white-space: nowrap; color: var(--ink-2); background: var(--surface-2); }
.tag.green { background: var(--success-pale); color: #087a4b; }
.tag.amber { background: var(--amber-pale); color: #8a4e0c; }
.tag.blue { background: var(--blue-pale); color: #275a84; }
.tag.red { background: var(--red-pale); color: #933535; }
.tag.gray { background: var(--surface-2); color: var(--ink-2); }
.tag-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.companion-group-tag { border: 1px solid #c7ddfb; cursor: pointer; max-width: 100%; white-space: normal; text-align: left; line-height: 1.5; padding-top: 3px; padding-bottom: 3px; overflow-wrap: anywhere; }
.companion-group-tag svg { width: 13px; height: 13px; flex: 0 0 auto; }
.companion-group-tag:hover, .companion-group-tag:focus-visible { background: #dcecff; outline: 2px solid #91bcfa; outline-offset: 2px; }
.companion-search-hint { margin: 0; padding: 12px 16px; background: var(--blue-pale); color: var(--ink-2); font-size: 12px; line-height: 1.6; }
.companion-profile-panel { margin: 0 0 20px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #f8fbff; }
.companion-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 18px 0 10px; }
.companion-section-heading:first-child { margin-top: 0; }
.companion-section-heading h3 { margin: 0; font-size: 14px; }
.companion-section-heading p { margin: 5px 0 0; color: var(--ink-3); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.companion-members, .companion-picker { display: grid; gap: 8px; margin: 10px 0; }
.companion-member { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); min-width: 0; }
.companion-member > div { display: grid; gap: 5px; min-width: 0; }
.companion-member strong { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; overflow-wrap: anywhere; }
.companion-member > div > span { font-size: 11px; color: var(--ink-3); line-height: 1.5; overflow-wrap: anywhere; }
.companion-member > button { flex: 0 0 auto; }
.companion-student-search { margin-top: 18px; width: 100%; }
.companion-group-list { display: grid; gap: 10px; margin-top: 16px; }
.companion-group-card { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.companion-group-card > div { min-width: 0; }
.companion-group-card h3 { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.companion-group-card p { margin: 7px 0 0; font-size: 12px; line-height: 1.6; color: var(--ink-3); overflow-wrap: anywhere; }
.companion-group-card > button { flex: 0 0 auto; }
@media (max-width: 600px) {
  .companion-profile-panel { padding: 12px; }
  .companion-member { padding: 10px; gap: 8px; }
  .companion-member > button { min-height: 38px; padding: 8px 10px; }
  .companion-group-tag { min-height: 30px; }
  .companion-group-card { align-items: flex-start; flex-direction: column; padding: 12px; }
  .companion-group-card > button { width: 100%; }
}
.search-results { display: grid; gap: 4px; margin-top: 6px; max-height: 180px; overflow-y: auto; }
.search-result { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); color: var(--ink-2); text-align: left; cursor: pointer; font: inherit; font-size: 12px; }
.search-result:hover, .search-result:focus-visible { border-color: var(--blue); background: var(--blue-pale); outline: none; }
.finance-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 16px 0; }
.finance-tabs button { min-height: 36px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink-2); font: inherit; font-size: 12px; cursor: pointer; }
.finance-tabs button.active { color: var(--green); border-color: var(--green); background: var(--green-pale); font-weight: 700; }
.finance-tabs button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.finance-filter { align-items: flex-end; }
.finance-filter .search-box { min-width: 180px; }
.finance-date-field { display: grid; gap: 6px; min-width: 150px; }
.finance-date-field > span { color: var(--ink-3); font-size: 11px; }
.finance-date-field .text-control { width: 100%; }
.finance-date-field .select-control { width: 100%; max-width: 210px; }
.finance-context-note { margin: 0; padding: 0 16px 14px; color: var(--ink-3); font-size: 12px; line-height: 1.7; }
.finance-void-filter { min-height: 36px; margin-bottom: 0; }
.finance-reconciliation { padding: 10px 12px; margin: 10px 0; border: 1px solid #f4d48a; border-radius: 6px; background: #fff9eb; color: #825716; font-size: 12px; line-height: 1.7; white-space: normal; overflow-wrap: anywhere; }
.finance-reconciliation p { margin: 4px 0 0; }
.payment-voided { color: var(--ink-3); }
.payment-voided > .cell-primary { text-decoration: line-through; }
.student-finance-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 16px; }
.student-ledger-panel { margin-top: 18px; }
.party-finance-metrics { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.party-finance-metrics .metric-value { font-size: 23px; }
.empty-state { min-height: 250px; display: grid; place-items: center; text-align: center; padding: 36px; color: var(--ink-3); }
.empty-state svg { width: 30px; height: 30px; margin-bottom: 12px; }
.empty-state h3 { color: var(--ink); margin: 0 0 6px; font-size: 14px; }
.empty-state p { margin: 0; font-size: 12px; }
.loading-state { min-height: 320px; display: grid; place-items: center; color: var(--ink-3); }
.spinner { width: 24px; height: 24px; border: 2px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pagination { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pagination button { width: 30px; height: 30px; border: 1px solid var(--line); background: var(--paper); border-radius: 4px; }
.pagination button.active { background: var(--green); color: #fff; border-color: var(--green); }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.record-card { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 17px; min-width: 0; }
.record-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.record-card h3 { margin: 0 0 5px; font-size: 15px; }
.record-card p { color: var(--ink-3); margin: 0; line-height: 1.6; font-size: 12px; }
.record-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.record-card-stats div { min-width: 0; }
.record-card-stats span { display: block; color: var(--ink-3); font-size: 10px; margin-bottom: 4px; }
.record-card-stats strong { font-size: 13px; overflow-wrap: anywhere; }
.detail-bullets { margin: 14px 0 0; padding-left: 20px; color: var(--ink-2); line-height: 1.8; font-size: 13px; }
.group-buy-policy { min-height: 66px; margin-bottom: 16px; padding: 13px 16px; border: 1px solid #b8d3fa; border-left: 3px solid var(--green); border-radius: 6px; background: #f5f9ff; display: flex; align-items: center; gap: 12px; }
.group-buy-policy > svg { width: 21px; height: 21px; color: var(--green); flex: 0 0 auto; }
.group-buy-policy strong, .group-buy-policy span { display: block; }
.group-buy-policy strong { margin-bottom: 4px; font-size: 12px; }
.group-buy-policy span { color: var(--ink-3); font-size: 11px; line-height: 1.55; }
.group-buy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.group-buy-card { display: flex; flex-direction: column; }
.group-buy-card.is-own { border-color: #9fc4f8; box-shadow: 0 3px 12px rgba(22,119,255,.09); }
.group-code { display: inline-block; margin-bottom: 7px; color: var(--green-2); font-family: Consolas, monospace; font-size: 11px; font-weight: 700; }
.group-progress { display: grid; gap: 9px; margin: 18px 0 14px; }
.group-progress > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.group-progress strong { font-size: 25px; line-height: 1; }
.group-progress strong span { color: var(--ink-3); font-size: 13px; }
.group-progress small { color: var(--ink-3); font-size: 10px; }
.group-progress-track { height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.group-progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.platform-batch-progress { display: grid; gap: 10px; padding: 14px; border: 1px solid #b8d3fa; border-radius: 8px; background: #f5f9ff; color: var(--ink-2); }
.platform-batch-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; }
.platform-batch-progress-head strong:last-child { color: var(--green-2); font-size: 18px; white-space: nowrap; }
.platform-batch-progress-track { height: 9px; border-radius: 999px; background: #dceafd; overflow: hidden; }
.platform-batch-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #4d9aff); transition: width .25s ease; }
.platform-batch-progress-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.platform-batch-progress-stats span { min-width: 0; padding: 8px 6px; border-radius: 5px; background: rgba(255,255,255,.75); color: var(--ink-3); font-size: 10px; text-align: center; }
.platform-batch-progress-stats b { display: block; margin-top: 3px; color: var(--ink); font-size: 15px; line-height: 1; }
.platform-batch-progress-current { margin: 0; color: var(--ink-3); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.group-buy-amount { min-height: 44px; padding: 9px 11px; border-radius: 5px; background: var(--green-pale); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.group-buy-amount span { color: var(--ink-2); font-size: 11px; }
.group-buy-amount strong { color: var(--green-2); font-size: 14px; white-space: nowrap; }
.group-members { display: grid; gap: 8px; margin: 15px 0; }
.group-member { min-height: 36px; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 9px; }
.group-member-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); color: var(--green-2); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.group-member strong, .group-member small { display: block; }
.group-member strong { font-size: 11px; }
.group-member small { margin-top: 2px; color: var(--ink-3); font-size: 9px; }
.group-buy-meta { display: grid; gap: 5px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.group-buy-meta span { display: flex; align-items: flex-start; gap: 6px; color: var(--ink-3); font-size: 10px; line-height: 1.45; }
.group-buy-meta svg { width: 13px; height: 13px; flex: 0 0 auto; }
.danger-text { color: var(--red) !important; }
.group-buy-modal-note { padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink-2); display: flex; align-items: flex-start; gap: 9px; font-size: 11px; line-height: 1.7; }
.group-buy-modal-note svg { width: 17px; height: 17px; color: var(--green); flex: 0 0 auto; margin-top: 2px; }
.enrollment-price-summary { padding: 14px 16px; border: 1px solid var(--line); border-radius: 5px; background: #f5f8fc; color: var(--ink-2); }
.enrollment-price-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 27px; font-size: 12px; }
.enrollment-price-row strong { color: var(--ink); white-space: nowrap; }
.enrollment-price-row .price-discount { color: var(--green-2); }
.enrollment-payable { margin-top: 7px; padding-top: 10px; border-top: 1px solid var(--line); font-weight: 600; }
.enrollment-payable strong { color: var(--green-2); font-size: 17px; }
.enrollment-price-summary small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.choice-field { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 5px; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.choice-field legend { padding: 0 5px; color: var(--ink-2); font-size: 12px; font-weight: 650; }
.choice-field label { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 12px; }
.choice-field input { accent-color: var(--green); }
.switch { position: relative; width: 36px; height: 20px; display: inline-flex; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track { position: absolute; inset: 0; border-radius: 10px; background: #b7c0ba; transition: .2s; }
.switch-track::after { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: .2s; }
.switch input:checked + .switch-track { background: var(--green); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }

.modal-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(10, 22, 16, .44); display: flex; align-items: center; justify-content: center; padding: 18px; animation: fade-in .16s ease-out; }
.modal { width: min(620px, 100%); max-height: calc(100vh - 36px); background: var(--paper); border-radius: 7px; box-shadow: var(--shadow-md); display: flex; flex-direction: column; animation: modal-in .18s ease-out; }
.modal.modal-wide { width: min(980px, 100%); }
.modal-header { min-height: 64px; padding: 0 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-header h2 { font-size: 17px; margin: 0; }
.modal-header p { margin: 4px 0 0; color: var(--ink-3); font-size: 11px; }
.modal-body { padding: 20px; overflow-y: auto; }
.student-detail-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.student-detail-tabs button { border: 0; border-bottom: 3px solid transparent; background: transparent; padding: 12px 4px; color: var(--ink-2); font-weight: 600; }
.student-detail-tabs button[aria-selected="true"] { color: var(--green); border-bottom-color: var(--green); }
#student-profile-panel[hidden], .official-hours-panel[hidden] { display: none; }
.official-hours-active .sensitive-profile, .official-hours-active .modal-footer > :not([data-close-modal]) { display: none; }
.hours-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.hours-toolbar h3 { font-size: 16px; margin: 0 0 5px; }
.hours-toolbar p { margin: 0; color: var(--ink-3); font-size: 12px; }
.hours-toolbar .button { flex-shrink: 0; }
.hours-notice { display: grid; gap: 6px; padding: 14px 16px; background: var(--green-pale); border-radius: 6px; margin-bottom: 16px; font-size: 12px; overflow-wrap: anywhere; }
.hours-notice span, .hours-notice p { color: var(--ink-2); margin: 0; line-height: 1.6; }
.hours-notice-stale { background: var(--amber-pale); }
.hours-notice-stale strong { color: var(--amber); }
.hours-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hours-card { border: 1px solid var(--line); border-radius: 8px; padding: 16px; min-width: 0; }
.hours-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hours-card h4 { margin: 0; font-size: 14px; }
.hours-total { font-size: 17px; font-weight: 650; margin: 18px 0 10px; overflow-wrap: anywhere; }
.hours-progress { height: 7px; background: var(--surface-2); border-radius: 7px; overflow: hidden; }
.hours-progress span { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.hours-breakdown { margin: 14px 0 0; display: grid; gap: 10px; }
.hours-breakdown > div { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 5px 10px; font-size: 12px; }
.hours-breakdown dt { color: var(--ink-3); }
.hours-breakdown dd { margin: 0; overflow-wrap: anywhere; }
.hours-loading { color: var(--green); font-size: 13px; }
.collection-issues { margin-top: 12px; font-size: 12px; max-height: 240px; overflow-y: auto; overflow-wrap: anywhere; }
.collection-issues summary { cursor: pointer; color: var(--ink-2); font-weight: 600; }
.collection-issues p { line-height: 1.7; margin: 8px 0; }
.driving-school-tag { max-width: 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
@media (max-width: 640px) {
  .hours-grid { grid-template-columns: minmax(0, 1fr); }
  .hours-card { padding: 14px; }
  .hours-toolbar { align-items: flex-start; }
}
.modal-footer { min-height: 64px; padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes modal-in { from { transform: translateY(8px); opacity: 0; } }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: span 2; }
.pre-enroll-field-head, .pre-enroll-field-row { display: grid; grid-template-columns: minmax(120px, 1fr) 72px minmax(150px, 1fr) minmax(150px, 1fr); gap: 12px; align-items: center; }
.pre-enroll-field-head { padding: 0 11px 8px; color: var(--ink-3); font-size: 11px; }
.pre-enroll-field-row { margin-top: 10px; }
.form-field { display: grid; gap: 7px; min-width: 0; }
.form-field[hidden] { display: none; }
.form-field > label { color: var(--ink-2); font-size: 12px; font-weight: 650; }
.form-field .text-control, .form-field .select-control { width: 100%; }
.detail-header { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.detail-header .avatar { width: 48px; height: 48px; font-size: 18px; }
.detail-header h3 { margin: 0 0 6px; font-size: 18px; }
.detail-header p { margin: 0; color: var(--ink-3); font-size: 12px; }
.detail-identity { flex: 1; min-width: 0; }
.detail-header > .tag { align-self: flex-start; margin-left: auto; }
.sensitive-profile { width: min(560px, 100%); display: grid; gap: 4px; }
.sensitive-row { min-height: 28px; display: grid; grid-template-columns: 72px minmax(0, 1fr) 28px; align-items: center; gap: 7px; color: var(--ink-2); font-size: 12px; }
.sensitive-label { color: var(--ink-3); font-size: 11px; }
.sensitive-value { min-width: 0; overflow-wrap: anywhere; }
.sensitive-toggle { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--green); display: grid; place-items: center; cursor: pointer; }
.sensitive-toggle:hover { background: var(--green-pale); }
.sensitive-toggle:disabled { opacity: .45; cursor: wait; }
.sensitive-toggle svg { width: 16px; height: 16px; }
.detail-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.detail-section { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.detail-section h4 { margin: 0; padding: 13px 15px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 12px; display: flex; align-items: center; gap: 8px; }
.detail-section h4 svg { width: 15px; height: 15px; color: var(--green); }
.detail-list { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.detail-list div { padding: 11px 14px; border-bottom: 1px solid var(--line); min-width: 0; }
.detail-list div:nth-last-child(-n+2) { border-bottom: 0; }
.detail-list .detail-item-wide { grid-column: 1 / -1; }
.detail-list .detail-item-wide:not(:last-child) { border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--ink-3); font-size: 10px; margin-bottom: 5px; }
.detail-list dd { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.detail-list dd.platform-id-value { display: flex; align-items: center; gap: 6px; }
.detail-list dd.platform-id-value .icon-button { width: 28px; height: 28px; }
.timeline { display: grid; gap: 0; }
.timeline-item { position: relative; padding: 0 0 18px 28px; }
.timeline-item::before { content: ""; position: absolute; left: 7px; top: 15px; bottom: 0; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { position: absolute; left: 3px; top: 4px; width: 9px; height: 9px; border: 2px solid var(--paper); border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.timeline-item strong { font-size: 12px; }
.timeline-item p { color: var(--ink-3); font-size: 11px; margin: 4px 0 0; }
.code-box { padding: 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 5px; overflow-wrap: anywhere; font-family: Consolas, monospace; font-size: 11px; color: var(--ink-2); }
.student-import-notice { padding: 14px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--green-pale); color: var(--ink-2); font-size: 12px; line-height: 1.7; }
.student-import-notice strong { color: var(--ink); }
.student-import-notice p { margin: 7px 0 0; }
.student-import-summary { margin-bottom: 14px; }
.student-import-summary .metric-card { padding: 14px; min-height: 112px; }
.student-import-summary .metric-value { font-size: 27px; }
.student-import-result-note { font-size: 13px; line-height: 1.7; }
.student-import-issues { margin: 18px 0; }
.student-import-issues h3 { font-size: 13px; margin: 0 0 10px; }
.student-import-issue { padding: 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); overflow-wrap: anywhere; }
.student-import-issue-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.student-import-id { color: var(--ink-3); font-size: 11px; }
.student-import-issue p { margin: 8px 0 0; font-size: 12px; line-height: 1.6; color: var(--ink-2); }
#student-import-form .upload-zone strong { max-width: 100%; overflow-wrap: anywhere; }
#student-import-form .check-row { align-items: flex-start; line-height: 1.5; overflow-wrap: anywhere; }
#student-import-form .check-row input { flex: 0 0 auto; margin-top: 2px; }
.permission-matrix { display: grid; gap: 6px; }
.permission-row { display: grid; grid-template-columns: minmax(130px, 1fr) repeat(4, minmax(90px, .7fr)); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.permission-row > div { padding: 10px; border-right: 1px solid var(--line); font-size: 11px; display: flex; align-items: center; }
.permission-row > div:last-child { border-right: 0; }
.permission-row.header { background: var(--surface); font-weight: 700; }
.check { color: var(--green); }
.cross { color: #a4ada7; }
.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: grid; gap: 8px; width: min(360px, calc(100vw - 36px)); }
.toast { background: #20342a; color: #fff; border-radius: 6px; padding: 13px 15px; box-shadow: var(--shadow-md); display: flex; align-items: flex-start; gap: 10px; animation: toast-in .2s ease-out; }
.toast.error { background: #713535; }
.toast svg { width: 17px; height: 17px; margin-top: 1px; flex: 0 0 auto; }
.toast strong { display: block; font-size: 12px; margin-bottom: 3px; }
.toast span { font-size: 11px; opacity: .78; }
@keyframes toast-in { from { transform: translateX(16px); opacity: 0; } }

.mobile-tabbar { display: none; }
.upload-zone { min-height: 190px; border: 1px dashed #9dbce8; border-radius: 7px; background: #f7faff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center; cursor: pointer; transition: border-color .18s, background .18s; }
.upload-zone:hover, .upload-zone:focus-within { border-color: var(--green); background: var(--green-pale); }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-zone-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 7px; background: var(--green-pale); color: var(--green); }
.upload-zone-icon svg { width: 23px; height: 23px; }
.upload-zone strong { font-size: 14px; }
.upload-zone > span:last-child { color: var(--ink-3); font-size: 11px; }
.check-row { display: flex; align-items: center; gap: 9px; margin-top: 15px; color: var(--ink-2); font-size: 12px; }
.check-row input { accent-color: var(--green); }
.settings-section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin: 28px 0 12px; }
.settings-section-heading h2 { margin: 0 0 4px; font-size: 18px; }
.settings-section-heading p { margin: 0; color: var(--ink-3); font-size: 12px; }
.integration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.integration-panel .panel-header h3 { display: flex; align-items: center; gap: 8px; }
.integration-panel .panel-header h3 svg { width: 17px; height: 17px; color: var(--green); }
.integration-toggle { min-height: 42px; padding: 0 11px; border-radius: 6px; background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink-2); font-size: 12px; font-weight: 650; }
.provider-options { display: grid; gap: 8px; }
.provider-option { min-height: 62px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 20px; align-items: center; gap: 10px; cursor: pointer; transition: border .16s, background .16s; }
.provider-option:hover { border-color: #a9c8f5; background: #f7faff; }
.provider-option:has(input:checked) { border-color: var(--green); background: var(--green-pale); }
.provider-option.disabled { opacity: .58; cursor: not-allowed; }
.provider-option input { position: absolute; opacity: 0; pointer-events: none; }
.provider-icon { width: 34px; height: 34px; border-radius: 6px; display: grid; place-items: center; background: var(--green-pale); color: var(--green); }
.provider-icon svg { width: 18px; height: 18px; }
.provider-option > span:nth-of-type(2) { display: grid; gap: 3px; }
.provider-option strong { font-size: 12px; }
.provider-option small { color: var(--ink-3); font-size: 10px; }
.provider-check { width: 17px; height: 17px; color: var(--green); opacity: 0; }
.provider-option:has(input:checked) .provider-check { opacity: 1; }

.public-page-root { min-height: 100vh; padding: 28px 18px; background: var(--surface); }
.public-enroll-shell { width: min(660px, 100%); min-height: calc(100vh - 56px); margin: 0 auto; display: flex; flex-direction: column; }
.public-enroll-header { display: flex; align-items: center; gap: 10px; padding: 4px 0 22px; }
.public-enroll-header .brand-mark { flex: 0 0 auto; }
.public-enroll-header strong, .public-enroll-header span { display: block; }
.public-enroll-header strong { color: var(--ink); font-size: 14px; }
.public-enroll-header span { margin-top: 2px; color: var(--ink-3); font-size: 11px; }
.public-enroll-main { flex: 1; }
.public-enroll-hero { padding: 26px 24px; color: #fff; background: #1677ff; border-radius: 7px 7px 0 0; }
.public-kicker { color: #dcecff; font-size: 10px; font-weight: 700; }
.public-enroll-hero h1 { margin: 12px 0 8px; font-size: 26px; }
.public-enroll-hero p { margin: 0; color: #dcecff; font-size: 13px; line-height: 1.7; }
.public-enroll-form { padding: 24px; border: 1px solid var(--line); border-top: 0; background: var(--paper); border-radius: 0 0 7px 7px; }
.public-enroll-form section h2 { margin: 0 0 18px; font-size: 16px; }
.public-file-input { height: auto; padding: 8px 10px; }
.public-enroll-notice { display: flex; gap: 10px; margin: 20px 0; padding: 14px; border-left: 3px solid var(--green); background: var(--green-pale); color: var(--ink-2); }
.public-enroll-notice svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--green); }
.public-enroll-notice strong { display: block; margin-bottom: 5px; font-size: 12px; }
.public-enroll-notice p { margin: 4px 0 0; color: var(--ink-2); font-size: 12px; line-height: 1.55; }
.public-enroll-submit { min-height: 46px; }
.public-enroll-footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 14px; padding: 20px 0 4px; color: var(--ink-3); font-size: 10px; }
.public-enroll-footer a { color: inherit; text-decoration: none; }
.public-enroll-footer a:hover { color: var(--brand); text-decoration: underline; }
.form-hint { margin: 0; color: var(--ink-3); font-size: 12px; }
.public-enroll-unavailable, .public-enroll-success, .public-page-loading { min-height: 48vh; display: grid; place-items: center; align-content: center; justify-items: center; gap: 12px; text-align: center; }
.public-enroll-unavailable { padding: 32px; border: 1px solid var(--line); background: var(--paper); border-radius: 7px; }
.public-enroll-success { padding: 42px 24px; border: 1px solid var(--line); background: var(--paper); border-radius: 7px; }
.public-enroll-unavailable > svg, .public-enroll-success > svg { width: 38px; height: 38px; color: var(--green); }
.public-enroll-unavailable h1, .public-enroll-success h1 { margin: 0; color: var(--ink); font-size: 21px; }
.public-enroll-unavailable p, .public-enroll-success p, .public-page-loading span { margin: 0; color: var(--ink-3); font-size: 12px; line-height: 1.7; }

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: 1fr; }
  .integration-grid { grid-template-columns: 1fr; }
  .group-buy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 761px) and (max-height: 760px) {
  .login-screen { padding-top: 76px; padding-bottom: 44px; }
  .login-masthead { top: 18px; }
  .login-shell { min-height: 520px; }
  .login-brand { min-height: 548px; margin: -14px 0; padding: 32px 38px; }
  .login-brand-copy { margin-top: 32px; }
  .login-brand h1 { font-size: 34px; }
  .login-visual { height: 164px; margin-top: 14px; }
  .visual-route { top: 44px; height: 80px; }
  .visual-card { width: 142px; height: 82px; padding: 12px; }
  .visual-card-students { top: 6px; }
  .visual-card-schedule { bottom: 0; }
  .visual-car { top: 57px; }
  .login-panel { padding-top: 38px; padding-bottom: 38px; }
  .login-heading { margin-bottom: 23px; }
  .field { margin-bottom: 14px; }
  .demo-accounts { margin-top: 14px; padding-top: 14px; }
  .login-footer { bottom: 12px; }
}

@media (max-width: 760px) {
  .login-screen { padding: 22px; align-items: center; }
  .login-screen::before { left: -390px; top: 15%; }
  .login-screen::after { right: -340px; bottom: 5%; }
  .login-masthead { display: none; }
  .login-shell { display: block; min-height: 0; width: min(460px, 100%); }
  .login-brand { display: none; }
  .login-panel { padding: 36px 28px 32px; align-items: center; }
  .mobile-brand { display: flex; }
  .login-heading h2 { font-size: 26px; }
  .login-footer { bottom: 10px; }
  .app-shell { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; width: min(292px, 86vw); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim.open { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(8,20,14,.42); }
  .workspace { min-width: 0; }
  .topbar { height: 66px; padding: 0 12px; gap: 8px; }
  .topbar h2 { font-size: 16px; }
  .breadcrumb, .sync-indicator { display: none; }
  .topbar-user-chip { margin-left: 2px; padding-left: 6px; min-width: 0; }
  .topbar-user-chip strong { max-width: 66px; }
  .topbar-user-chip span:not(.topbar-user-status) { display: none; }
  .mobile-menu-button { display: grid; }
  .topbar-actions { gap: 2px; }
  .topbar-actions .icon-button { width: 32px; height: 32px; }
  .page-content { padding: 18px 14px calc(92px + env(safe-area-inset-bottom)); }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }
  .page-heading h1 { font-size: 21px; }
  .heading-actions { width: 100%; gap: 6px; }
  .heading-actions .button { flex: 1 1 auto; min-width: 0; white-space: normal; line-height: 1.25; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .metric-card { min-height: 112px; padding: 14px; }
  .metric-value { font-size: 24px; }
  .card-grid { grid-template-columns: 1fr; }
  .group-buy-grid { grid-template-columns: 1fr; }
  .platform-batch-progress { padding: 12px; }
  .platform-batch-progress-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .platform-batch-progress-stats span { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; }
  .platform-batch-progress-stats b { margin-top: 0; }
  .toolbar { align-items: stretch; }
  .toolbar > * { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .toolbar .search-box { flex-basis: 100%; }
  .finance-tabs { padding: 10px 10px 0; flex-wrap: nowrap; }
  .finance-tabs button { flex: 1; min-width: 0; padding: 8px 6px; }
  .finance-date-field { min-width: 0; flex: 1 1 calc(50% - 5px); }
  .finance-filter .search-box { min-width: 0; }
  .finance-date-field .select-control { max-width: none; min-width: 0; }
  .finance-context-note { padding: 0 10px 12px; }
  .finance-void-filter { flex: 1 1 100%; }
  .student-finance-actions { padding: 0 10px 12px; gap: 6px; }
  .student-finance-actions .button { flex: 1 1 calc(50% - 6px); min-height: 40px; }
  .party-finance-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .party-finance-metrics .metric-card { min-height: 102px; padding: 11px; }
  .party-finance-metrics .metric-value { font-size: 21px; }
  .form-grid, .detail-columns { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .pre-enroll-field-head { display: none; }
  .pre-enroll-field-row { grid-template-columns: 1fr 1fr; }
  .pre-enroll-field-row input[data-field-label], .pre-enroll-field-row input[data-field-placeholder] { grid-column: span 2; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-height: 92vh; border-radius: 8px 8px 0 0; }
  .modal-footer { flex: 0 0 auto; flex-wrap: wrap; justify-content: stretch; }
  .modal-footer .button { flex: 1 1 calc(50% - 4px); min-width: 0; white-space: normal; line-height: 1.25; }
  .detail-list { grid-template-columns: 1fr; }
  .detail-list div:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .detail-list div:last-child { border-bottom: 0; }
  .detail-header { align-items: flex-start; }
  .sensitive-row { grid-template-columns: 68px minmax(0, 1fr) 28px; }
  .student-table-desktop { display: none; }
  .student-mobile-list { display: block; }
  .student-mobile-card .tag-row { margin-top: 10px; }
  .student-mobile-fields { grid-template-columns: 1fr; }
  .detail-header > .tag { margin-left: auto; }
  .detail-identity { width: calc(100% - 62px); }
  .detail-tags { padding-right: 4px; }
  .permission-matrix { overflow-x: auto; }
  .permission-row { min-width: 630px; }
  .mobile-tabbar.is-active { position: fixed; left: 0; right: 0; bottom: 0; z-index: 24; min-height: calc(62px + env(safe-area-inset-bottom)); padding: 6px 8px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(255,255,255,.98); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); box-shadow: 0 -5px 20px rgba(22,119,255,.08); }
  .mobile-tab-item { min-width: 0; min-height: 50px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; }
  .mobile-tab-item svg { width: 19px; height: 19px; }
  .mobile-tab-item.active { color: var(--green); background: var(--green-pale); font-weight: 700; }
  .is-wechat .topbar { padding-top: env(safe-area-inset-top); height: calc(66px + env(safe-area-inset-top)); }
  .integration-panel .form-grid { grid-template-columns: 1fr; }
  .integration-panel .form-grid .span-2 { grid-column: span 1; }
  .public-page-root { padding: 16px 14px calc(20px + env(safe-area-inset-bottom)); }
  .public-enroll-shell { min-height: calc(100vh - 36px); }
  .public-enroll-header { padding: calc(env(safe-area-inset-top) + 2px) 2px 18px; }
  .public-enroll-hero { padding: 24px 20px; }
  .public-enroll-hero h1 { font-size: 23px; }
  .public-enroll-form { padding: 20px 16px; }
  .public-enroll-form .form-grid { gap: 14px; }
  .panel-header { min-height: 0; padding: 14px; align-items: flex-start; flex-wrap: wrap; }
  .panel-header .tag { margin-left: auto; }
  .panel-body { padding: 14px; }
  .panel-footer { min-height: 50px; padding: 9px 12px; gap: 8px; flex-wrap: wrap; }
  .toolbar { padding: 10px; gap: 7px; }
  .toolbar .select-control, .toolbar .text-control { min-height: 38px; }
  .table-wrap { overflow: visible; }
  .table-wrap > table.data-table, .table-wrap > table:not(.data-table) { display: block; width: 100%; min-width: 0; }
  .table-wrap > table.data-table thead, .table-wrap > table:not(.data-table) thead { display: none; }
  .table-wrap > table.data-table tbody, .table-wrap > table:not(.data-table) tbody { display: grid; gap: 10px; padding: 10px; }
  .table-wrap > table.data-table tbody tr, .table-wrap > table:not(.data-table) tbody tr { display: grid; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow-sm); }
  .table-wrap > table.data-table tbody td, .table-wrap > table:not(.data-table) tbody td { display: grid; grid-template-columns: minmax(72px, 32%) minmax(0, 1fr); align-items: start; gap: 10px; min-height: 0; height: auto; padding: 10px 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
  .table-wrap > table.data-table tbody td::before, .table-wrap > table:not(.data-table) tbody td::before { content: attr(data-label); color: var(--ink-3); font-size: 10px; line-height: 1.5; }
  .table-wrap > table.data-table tbody td[data-label=""], .table-wrap > table:not(.data-table) tbody td[data-label=""] { display: block; }
  .table-wrap > table.data-table tbody td[data-label=""]::before, .table-wrap > table:not(.data-table) tbody td[data-label=""]::before { display: none; }
  .table-wrap > table.data-table tbody td[colspan], .table-wrap > table:not(.data-table) tbody td[colspan] { display: block; }
  .table-wrap > table.data-table tbody td:last-child, .table-wrap > table:not(.data-table) tbody td:last-child { border-bottom: 0; }
  .table-wrap > table.data-table .row-actions, .table-wrap > table:not(.data-table) .row-actions { justify-content: flex-start; flex-wrap: wrap; gap: 5px; }
  .table-wrap > table.data-table .button-small, .table-wrap > table:not(.data-table) .button-small { min-height: 34px; }
  .record-card-head { flex-wrap: wrap; }
  .record-card-head > div:last-child { margin-left: auto; max-width: 100%; }
  .group-buy-policy { align-items: flex-start; padding: 12px; }
  .group-buy-amount { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 420px) {
  .login-screen { padding: 16px; }
  .login-panel { padding: 30px 20px 26px; }
  .mobile-brand { margin-bottom: 28px; }
  .login-heading { margin-bottom: 24px; }
  .login-heading h2 { font-size: 24px; }
  .demo-accounts { align-items: flex-start; flex-direction: column; }
  .demo-accounts > div { justify-content: flex-start; }
  .topbar-user-chip > div { display: none; }
  .page-content { padding-left: 10px; padding-right: 10px; }
  .metric-card { padding: 12px; }
  .metric-value { font-size: 21px; }
  .page-heading h1 { font-size: 19px; }
}

@media (max-width: 340px) {
  .metric-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.actual-exams-panel { margin: 20px 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface, #fff); }
.actual-exams-panel h3 { margin: 0; }
.actual-exams-panel .companion-section-heading { gap: 12px; flex-wrap: wrap; }
.actual-exams-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.actual-exam-card { min-width: 0; padding: 14px; border: 1px solid #dde6ef; border-radius: 10px; background: #f7fbff; overflow-wrap: anywhere; }
.actual-exam-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.actual-exam-card p { color: var(--ink-2); font-size: 13px; line-height: 1.6; }
.actual-exam-card details { margin-top: 12px; font-size: 13px; }
.actual-exam-card summary { cursor: pointer; color: #1677ff; }
.exam-subject-choice { display: flex; flex-wrap: wrap; gap: 14px; }
.exam-subject-choice label { display: flex; align-items: center; gap: 6px; min-height: 40px; }
.training-fee-actions { display: grid; gap: 10px; min-width: 0; }
.training-fee-actions details { overflow-wrap: anywhere; font-size: 13px; }
.training-fee-actions summary { cursor: pointer; }
.training-table td[colspan]::before { display: none !important; }
@media (max-width: 600px) {
  .actual-exams-panel { padding: 12px; }
  .actual-exams-grid { grid-template-columns: 1fr; }
  .actual-exam-card button { min-height: 40px; }
}
