:root {
  --bg-page: #f5f7fa;
  --bg-card: #ffffff;
  --primary: #146b8c;
  --primary-dark: #0d506c;
  --primary-light: #eaf4f8;
  --accent: #5c64a4;
  --accent-light: #f0f0f9;
  --success: #167354;
  --success-bg: #e9f5ee;
  --warning: #a15b12;
  --warning-bg: #fff4e4;
  --danger: #b74343;
  --danger-bg: #fbeded;
  --text-main: #192d3b;
  --text-muted: #6b7d8b;
  --border: #e3e9ee;
  --radius: 14px;
  --shadow: 0 2px 8px rgba(24, 45, 62, .025);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-padding-top: 92px; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; background: var(--bg-page); color: var(--text-main); line-height: 1.6; font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
a { color: var(--primary); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #70b2cf; outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .55; }
button[disabled].btn-outline { cursor: default; }
button, input, select, textarea, .card, .kpi-card { min-width: 0; }
.page-heading > div { min-width: 0; }
h1, .card-title, .lesson-name { overflow-wrap: anywhere; }
.ui-icon { width: 19px; height: 19px; flex: 0 0 auto; vertical-align: middle; }
.topbar { background: rgba(255,255,255,.97); border-bottom: 1px solid var(--border); padding: 13px 24px; position: sticky; top: 0; z-index: 100; }
.topbar-inner { max-width: 1280px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand-wrap { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-logo-badge { width: 38px; height: 38px; flex: 0 0 auto; }
.brand-logo-img { width: 100%; height: 100%; object-fit: contain; }
.brand-title { display: flex; align-items: center; gap: 13px; font-size: 1.16rem; font-weight: 750; letter-spacing: 1px; line-height: 1.3; }
.brand-domain { color: #68808f; font-size: .73rem; letter-spacing: .25px; padding-left: 13px; border-left: 1px solid #cdd8df; font-weight: 500; }
.brand-subtitle { margin-top: 3px; font-size: .68rem; color: var(--text-muted); letter-spacing: .6px; }
#user-header-info { flex-shrink: 0; }
.header-role { color: var(--text-muted); font-size: .76rem; }
.header-name { font-size: .82rem; font-weight: 550; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-welcome { font-size: .75rem; color: var(--text-muted); }
.role-switcher-bar { background: #fff; border-bottom: 1px solid var(--border); padding: 8px 24px; }
.role-switcher-inner { max-width: 1280px; margin: auto; display: flex; align-items: center; gap: 8px; overflow-x: auto; font-size: .8rem; }
.container { max-width: 1328px; margin: 30px auto; padding: 0 24px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 22px; }
.eyebrow { display: block; font-size: 10px; font-weight: 650; letter-spacing: 2px; color: #648390; margin-bottom: 6px; }
h1 { font-size: 1.65rem; line-height: 1.4; font-weight: 650; letter-spacing: -.6px; }
.page-heading p, .page-description { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }
.nav-tabs { display: flex; align-items: center; gap: 6px; padding: 5px; margin: 0 0 24px; background: #eaf0f4; border-radius: 11px; width: fit-content; max-width: 100%; overflow-x: auto; }
.nav-tab { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 19px; border: 0; border-radius: 7px; background: transparent; color: #647784; cursor: pointer; white-space: nowrap; font-weight: 550; font-size: .84rem; transition: color .15s, background .15s; }
.nav-tab .ui-icon { width: 17px; height: 17px; }
.nav-tab:hover { color: var(--text-main); background: rgba(255,255,255,.55); }
.nav-tab.active { background: #fff; color: var(--primary-dark); box-shadow: 0 1px 4px #1d354212; }
.nav-count { display: inline-block; min-width: 16px; margin-left: 4px; padding: 0 4px; border-radius: 10px; background: var(--primary); color: white; font-size: 10px; line-height: 16px; }
.grid-kpi { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 24px; }
.kpi-card { background: var(--bg-card); border: 1px solid var(--border); padding: 18px 20px; border-radius: var(--radius); }
.kpi-label { font-size: .75rem; color: var(--text-muted); margin-bottom: 10px; font-weight: 500; }
.kpi-value { font-size: 1.5rem; font-weight: 650; letter-spacing: -.5px; font-variant-numeric: tabular-nums; line-height: 1.3; }
.kpi-value small { font-size: .73rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0; }
.kpi-value > span:not(.money) { color: #b6c1c9; font-size: .95rem; font-weight: 400; }
.kpi-sub { color: var(--text-muted); font-size: .7rem; margin-top: 9px; }
.money, .money-cell { color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.card { background: var(--bg-card); border: 1px solid var(--border); padding: 24px; border-radius: var(--radius); margin-bottom: 22px; box-shadow: var(--shadow); scroll-margin-top: 92px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 650; line-height: 1.5; }
.section-description { color: var(--text-muted); font-size: .75rem; margin-top: 5px; }
.count-label { font-size: .75rem; color: var(--text-muted); }
.grid-2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 9px 16px; border: 1px solid transparent; border-radius: 8px; font-size: .81rem; font-weight: 550; line-height: 1.3; cursor: pointer; text-decoration: none; white-space: normal; overflow-wrap: anywhere; max-width: 100%; flex-shrink: 0; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #115c43; }
.btn-warning { background: var(--warning-bg); border-color: #f0d5b2; color: var(--warning); }
.btn-danger { background: var(--danger-bg); border-color: #edd0d0; color: var(--danger); }
.btn-danger:hover { background: #f6dddd; }
.btn-outline { border-color: #dce4ea; background: white; color: #415767; }
.btn-outline:hover { border-color: #a9c2ce; background: #f7fafb; }
.btn-sm { min-height: 32px; font-size: .73rem; padding: 6px 10px; border-radius: 6px; }
.btn .ui-icon { width: 16px; height: 16px; }
.text-button { display: inline-flex; align-items: center; gap: 4px; background: transparent; border: 0; padding: 4px 0; color: var(--primary); font-size: inherit; cursor: pointer; font-weight: 550; }
.text-button:hover { text-decoration: underline; }
.text-button .ui-icon { width: 15px; height: 15px; }
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 5px; font-size: .69rem; font-weight: 500; white-space: nowrap; line-height: 1.7; }
.badge-blue { background: var(--primary-light); color: var(--primary-dark); }
.badge-indigo { background: var(--accent-light); color: var(--accent); }
.badge-green { background: var(--success-bg); color: var(--success); }
.badge-amber { background: var(--warning-bg); color: var(--warning); }
.badge-red { background: var(--danger-bg); color: var(--danger); }
.badge-gray { background: #eff2f5; color: #697a87; }
.form-grid, .form-grid-3 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.form-grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.form-group { display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; margin-bottom: 13px; }
.form-group label { font-size: .77rem; color: #516575; font-weight: 500; }
.form-control { width: 100%; border: 1px solid #dce4ea; border-radius: 8px; padding: 10px 12px; min-height: 43px; outline: none; background: #fff; color: var(--text-main); font-size: .83rem; line-height: 1.4; transition: border-color .15s, box-shadow .15s; }
.form-control::placeholder { color: #9aa8b2; }
.form-control:focus { border-color: #71a5ba; box-shadow: 0 0 0 3px #146b8c12; }
.form-control[type=number] { font-variant-numeric: tabular-nums; }
.field-help { color: var(--text-muted); font-size: .72rem; line-height: 1.6; margin-top: 1px; }
.quick-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 22px; }
.family-filters { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.family-filters > select { width: 150px; flex: 0 0 auto; }
.search-field { position: relative; max-width: 390px; width: 100%; }
.search-field > .ui-icon { position: absolute; left: 12px; top: 12px; color: #8aa0ad; width: 18px; height: 18px; }
.search-field > input { padding-left: 38px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .78rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; border-bottom: 1px solid var(--border); padding: 14px 12px; vertical-align: middle; }
th { background: #f7f9fb; font-weight: 550; color: #6b7e8d; font-size: .71rem; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfd; }
.nowrap-cell { white-space: nowrap; }
.money-cell, .number-cell { text-align: right; }
.family-table td { max-width: 290px; }
.family-table .family-actions { min-width: 170px; max-width: 200px; }
.family-table .family-actions .badge { flex-basis: auto; }
.family-table td > strong { font-weight: 600; }
.family-table td:nth-child(4) > div { margin-bottom: 4px; color: #627786; }
tr.reversed-row { opacity: .64; background: #fffafa; }
.table-hint { font-size: .7rem; color: var(--text-muted); margin: -5px 0 12px; }
.pagination { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 16px; font-size: .75rem; color: var(--text-muted); }
.pagination > span { margin-right: auto; }
.wallet-hero { border: 1px solid #d7e7ee; background: #edf5f8; color: var(--text-main); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 22px; min-width: 0; overflow-wrap: anywhere; }
.wallet-header { display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.wallet-summary, .wallet-children { min-width: 0; max-width: 100%; }
.wallet-caption { display: block; font-size: .71rem; color: #6f8794; margin-bottom: 6px; }
.wallet-amount { font-size: 1.8rem; font-weight: 650; color: #244a60; font-variant-numeric: tabular-nums; letter-spacing: -.5px; line-height: 1.3; }
.wallet-breakdown { font-size: .72rem; color: #6a8290; margin-top: 6px; }
.wallet-breakdown > span { color: #b0c2ca; margin: 0 4px; }
.child-switch { display: flex; flex-wrap: wrap; gap: 6px; }
.kid-switch-btn { background: #ffffff70; color: #607b8a; border: 1px solid #d4e4eb; border-radius: 7px; font-size: .76rem; padding: 6px 11px; min-height: 33px; flex-shrink: 1; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.kid-switch-btn.active { color: #205770; background: white; border-color: #a2c4d3; }
.child-context { font-size: .68rem; color: #6a8391; margin-top: 8px; overflow-wrap: anywhere; }
.wallet-compact { padding: 16px 22px; }
.wallet-compact .wallet-amount { font-size: 1.35rem; }
.wallet-compact .wallet-breakdown { display: none; }
.wallet-compact .wallet-caption { margin-bottom: 3px; }
.next-lesson { display: flex; justify-content: space-between; align-items: center; gap: 20px; background: #fff; border-left: 3px solid #69a4bd; }
.next-lesson h2 { font-size: .82rem; font-weight: 550; color: #6b818e; margin-bottom: 7px; }
.next-lesson .lesson-name { font-size: 1.02rem; font-weight: 600; }
.next-lesson p { color: var(--text-muted); font-size: .76rem; margin-top: 7px; }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(230px,1fr)); gap: 14px; }
.pkg-item { min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border); padding: 17px; border-radius: 10px; background: #fafcfd; }
.pkg-item > div:first-child { flex-wrap: wrap; }
.pkg-item > div:first-child > strong { min-width: 0; max-width: 100%; overflow-wrap: anywhere; font-size: .84rem; font-weight: 550; }
.pkg-item .badge, #parent-bookings-card .badge, #parent-booking-cal-card .badge { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
#parent-bookings-card, #parent-booking-cal-card { overflow-wrap: anywhere; }
.coach-work-summary { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); background: white; padding: 18px 0; margin-bottom: 22px; }
.coach-work-summary > div { flex: 1; padding: 0 24px; border-right: 1px solid var(--border); }
.coach-work-summary > div:last-child { border: 0; }
.coach-work-summary span { display: block; font-size: .73rem; color: var(--text-muted); }
.coach-work-summary strong { display: block; font-size: 1.5rem; font-weight: 600; margin-top: 3px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.coach-work-summary small { font-size: .7rem; color: #82949f; font-weight: 450; }
.text-warning { color: var(--warning); }
.coach-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
.privacy-note { font-size: .75rem; color: var(--text-muted); margin: 4px 0 24px; }
.privacy-note summary { cursor: pointer; display: flex; align-items: center; gap: 6px; }
.privacy-note .ui-icon { width: 15px; height: 15px; }
.privacy-note p { padding: 10px 0; }
.auth-container { max-width: 1110px; margin: 44px auto 52px; }
.login-hero-grid { display: grid; grid-template-columns: 1.08fr 1fr; gap: 70px; align-items: center; }
.login-brand-panel { min-height: 510px; display: flex; flex-direction: column; justify-content: space-between; color: #1a536d; padding: 32px 15px 30px 0; }
.login-brand-panel .eyebrow { color: #7ba1b2; letter-spacing: 3px; margin-bottom: 22px; }
.login-brand-panel h2 { font-size: 2.55rem; font-weight: 600; letter-spacing: -1.3px; line-height: 1.45; }
.brand-intro { color: #7b8e9b; font-size: .88rem; line-height: 1.9; margin-top: 20px; }
.ice-art { width: 100%; margin: 12px 0; color: #6fa8bd; }
.brand-features { display: flex; justify-content: space-between; gap: 16px; }
.brand-features > div { display: flex; align-items: center; gap: 6px; color: #738b99; font-size: .7rem; }
.brand-features .ui-icon { width: 16px; height: 16px; color: #5d96ad; }
.auth-panel { padding: 28px 32px 32px; background: white; border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 8px 38px rgba(27, 54, 72, .045); }
.auth-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.auth-tabs > button { border: 0; border-bottom: 2px solid transparent; padding: 0 3px 12px; margin-bottom: -1px; font-size: .83rem; background: transparent; color: var(--text-muted); cursor: pointer; }
.auth-tabs > button.active { color: var(--primary); border-color: var(--primary); font-weight: 600; }
.auth-heading { margin-bottom: 26px; }
.auth-heading h1 { font-size: 1.65rem; font-weight: 600; margin-top: 6px; }
.auth-heading p { font-size: .79rem; color: var(--text-muted); margin-top: 7px; }
.auth-heading .eyebrow { font-size: 9px; letter-spacing: 1.7px; color: #8aa1af; }
.auth-panel .form-group { margin-bottom: 17px; }
.auth-panel .form-control { min-height: 46px; }
.auth-panel .form-grid { gap: 12px; }
.auth-submit { width: 100%; min-height: 46px; margin-top: 8px; }
.auth-assist { margin-top: 20px; font-size: .78rem; text-align: center; color: var(--text-muted); }
.password-field { position: relative; }
.password-field > input { padding-right: 58px; }
.password-toggle { position: absolute; right: 5px; top: 5px; height: calc(100% - 10px); padding: 4px 10px; background: transparent; border: 0; color: #7292a4; font-size: .7rem; cursor: pointer; }
.account-help { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 20px; font-size: .73rem; color: var(--text-muted); }
.account-help summary { cursor: pointer; color: #778b98; }
.account-help p { padding-top: 10px; font-size: .72rem; line-height: 1.7; }
.auth-notice { display: flex; gap: 8px; align-items: flex-start; padding: 12px; border-radius: 8px; background: var(--success-bg); color: var(--success); font-size: .77rem; margin-bottom: 18px; }
.auth-notice .ui-icon { width: 17px; height: 17px; margin-top: 2px; }
.demo-accounts { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 16px; }
.demo-accounts h3 { color: var(--text-muted); font-size: .8rem; font-weight: 500; margin-bottom: 12px; }
.demo-account { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 9px 0; }
.demo-account strong { font-size: .77rem; font-weight: 550; }
.demo-account small { display: block; color: var(--text-muted); font-size: .66rem; margin-top: 3px; }
.site-footer { padding: 22px 24px; margin-top: 30px; border-top: 1px solid var(--border); color: #8a9ba7; font-size: .69rem; }
.site-footer-inner { max-width: 1280px; margin: auto; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.site-footer strong { font-weight: 550; color: #68818f; }
.site-footer-icp { color: inherit; text-decoration: none; }
.site-footer-icp:hover { color: #68818f; text-decoration: underline; }
.registration-item { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; border-top: 1px solid var(--border); }
.registration-person { display: flex; gap: 13px; min-width: 0; }
.member-avatar { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: #edf4f7; color: #5a8ba0; flex: 0 0 auto; }
.registration-person h3 { font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }
.registration-person h3 .badge { margin-left: 5px; }
.registration-person p { font-size: .73rem; color: var(--text-muted); margin-top: 5px; overflow-wrap: anywhere; }
.registration-actions { display: flex; gap: 7px; }
#registration-status-filter { max-width: 140px; }
.empty-state { color: var(--text-muted); text-align: center; padding: 35px 20px; font-size: .8rem; }
.empty-state > .ui-icon { width: 34px; height: 34px; color: #9fb7c4; margin-bottom: 12px; }
.empty-state h3 { font-size: .9rem; font-weight: 500; color: #607a89; }
.empty-state p { font-size: .75rem; margin-top: 6px; }
.modal-backdrop { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: #142f4266; z-index: 999; padding: 20px; backdrop-filter: blur(3px); }
.modal-box { background: white; border-radius: 16px; max-width: 570px; width: 100%; max-height: 90dvh; overflow-y: auto; padding: 26px; box-shadow: 0 18px 70px #142f4233; }
.modal-box > .card-title { margin-bottom: 14px; }
.modal-box .card-title { margin-bottom: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.review-person { color: var(--text-main); font-size: .9rem; margin: 12px 0 20px; }
.review-person span { color: var(--text-muted); margin-left: 8px; font-size: .78rem; }
.approval-warning { background: #fff6e9; color: #8d5f28; border: 1px solid #f0dfc7; padding: 14px; border-radius: 9px; font-size: .8rem; margin-bottom: 16px; }
.approval-warning p { margin-top: 5px; font-size: .75rem; }
.checkbox-label { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 20px; font-size: .77rem; color: #5e7584; }
.checkbox-label input { margin-top: 4px; }
.coach-terms { border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin: 0 0 22px; }
.coach-terms legend { padding: 0 6px; font-size: .82rem; font-weight: 550; }
.terms-header, .terms-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; align-items: center; margin-top: 10px; }
.terms-header { color: var(--text-muted); font-size: .67rem; }
.terms-row > span { color: #6d8391; font-size: .72rem; }
.terms-row > input { font-size: .78rem; padding: 8px; }
.receipt-card { background: #f8fbfc; border: 1px solid #d4e4ec; border-radius: 10px; padding: 18px; margin: 14px 0; }
#toast-container { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 2000; pointer-events: none; max-width: min(400px,calc(100vw - 32px)); }
.toast-box { background: #243f50; color: white; padding: 12px 18px; border-radius: 9px; font-size: .79rem; font-weight: 450; box-shadow: 0 6px 24px #142f4226; pointer-events: auto; }
@keyframes cardPulseGlow { 0%, 100% { outline: 0 solid #72abc000; } 40% { outline: 4px solid #72abc040; } }
.flash-highlight { animation: cardPulseGlow 1.1s ease-out; }

/* Shared schedule views */
.view-mode-switch {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.view-mode-btn {
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.view-mode-btn.active {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.cal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
}

.cal-nav-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.cal-period-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-main);
  min-width: 150px;
  text-align: center;
}

@media (max-width: 640px) {
  .cal-toolbar {
    padding: 10px;
    gap: 8px;
  }
  .cal-nav-group {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }
  .cal-period-title {
    order: -1;
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
    margin-bottom: 2px;
  }
  .view-mode-switch {
    width: 100%;
    display: flex;
  }
  .view-mode-btn {
    flex: 1;
    text-align: center;
    padding: 6px 8px;
  }
}

/* 7-Column Full Week Grid (Mon - Sun) */
.week-grid-7 {
  display: grid;
  grid-template-columns: repeat(7, minmax(155px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 16px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.week-day-col {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  scroll-snap-align: start;
}

.week-day-col.is-today {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.14);
  background: #f0f9ff;
}

.week-day-col.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.16);
}

.week-day-header {
  padding: 8px 10px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.week-day-col.is-today .week-day-header {
  background: var(--primary-light);
}

.week-day-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.week-empty-slot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.76rem;
  padding: 20px 6px;
  text-align: center;
  border: 1px dashed #e2e8f0;
  border-radius: 8px;
}

/* 7-Column Standard Month Grid */
.month-grid-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 16px;
}

.month-weekdays-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.month-weekday-cell {
  padding: 8px 10px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
}
.month-weekday-cell:last-child {
  border-right: none;
}

.month-days-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  overflow-x: auto;
}

.month-day-cell {
  min-height: 112px;
  padding: 6px 8px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: background 0.12s;
}

.month-day-cell:nth-child(7n) {
  border-right: none;
}

.month-day-cell:hover {
  background: #f8fafc;
}

.month-day-cell.other-month {
  background: #f8fafc;
  opacity: 0.52;
}

.month-day-cell.is-today {
  background: #f0f9ff;
}

.month-day-cell.is-selected {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  background: #f0f9ff;
}

.month-day-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.month-today-pill {
  background: var(--primary);
  color: #fff;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.7rem;
}

.month-event-pill {
  font-size: 0.72rem;
  padding: 3px 6px;
  border-radius: 5px;
  border-left: 3px solid var(--primary);
  background: #f1f5f9;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.month-event-pill.cat-PRIVATE_1V1 { background: var(--primary-light); border-left-color: var(--primary); color: var(--primary-dark); }
.month-event-pill.cat-PRIVATE_1V2 { background: #eef2ff; border-left-color: var(--accent); color: #4338ca; }
.month-event-pill.cat-GROUP { background: #d1fae5; border-left-color: var(--success); color: #047857; }
.month-event-pill.cat-OFF_ICE { background: #fef3c7; border-left-color: var(--warning); color: #b45309; }
.month-event-pill[class*="cat-SKI_"] { background: #e0f2f1; border-left-color: #168878; color: #0b675b; }
.month-event-pill[class*="cat-SNOWBOARD_"] { background: #ede9fe; border-left-color: #8060bd; color: #62429b; }

.calendar-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.calendar-day-col {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.calendar-day-col.is-today {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.12);
}

.calendar-day-header {
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calendar-day-col.is-today .calendar-day-header {
  background: var(--primary-light);
}

.calendar-day-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.cal-event-card {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  padding: 11px 12px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: transform 0.12s, box-shadow 0.12s;
}

.cal-event-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.cal-event-card.cat-PRIVATE_1V1 { border-left-color: var(--primary); }
.cal-event-card.cat-PRIVATE_1V2 { border-left-color: var(--accent); }
.cal-event-card.cat-GROUP { border-left-color: var(--success); }
.cal-event-card.cat-OFF_ICE { border-left-color: var(--warning); }
.cal-event-card[class*="cat-SKI_"] { border-left-color: #168878; }
.cal-event-card[class*="cat-SNOWBOARD_"] { border-left-color: #8060bd; }

.cal-time-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 5px;
}

.cal-time-pill > span:first-child {
  white-space: nowrap;
}

.week-grid-7 .cal-time-pill {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}


/* Screen-specific composition: compact controls and the task stay in the first view. */
@media (min-width: 901px) {
  .admin-action-grid { align-items: start; }
  .family-table-wrap { max-height: 650px; }
  .family-table thead { position: sticky; top: 0; z-index: 1; }
}
@media (max-width: 1100px) {
  .grid-kpi { gap: 10px; }
  .kpi-card { padding: 15px; }
  .kpi-value { font-size: 1.25rem; }
  .login-hero-grid { gap: 34px; }
  .brand-features { gap: 8px; }
  .brand-features > div { gap: 4px; font-size: .65rem; }
}
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: minmax(0,1fr); gap: 0; }
  .form-grid-3 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .grid-kpi { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .wallet-header { gap: 20px; }
  .wallet-breakdown { max-width: 260px; }
  .auth-container { max-width: 600px; margin-top: 28px; }
  .login-hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .auth-panel { grid-row: 1; }
  .login-brand-panel { min-height: 0; padding: 10px 12px; }
  .login-brand-panel h2 { font-size: 1.6rem; letter-spacing: -.5px; }
  .login-brand-panel h2 br { display: none; }
  .login-brand-panel .eyebrow, .ice-art, .brand-intro { display: none; }
  .brand-features { margin-top: 20px; justify-content: flex-start; gap: 20px; }
  .brand-features > div { font-size: .7rem; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 80px; }
  body { padding-bottom: calc(65px + env(safe-area-inset-bottom)); }
  .topbar { padding: 12px 16px; }
  .topbar-inner { gap: 8px; }
  .brand-wrap { gap: 7px; }
  .brand-logo-badge { width: 34px; height: 34px; }
  .brand-title { font-size: 1.07rem; }
  .brand-domain, .brand-subtitle { display: none; }
  .header-role { font-size: .65rem; }
  .header-name { max-width: 75px; font-size: .75rem; }
  .header-welcome { font-size: .65rem; }
  #user-header-info { gap: 7px !important; }
  #user-header-info .btn { padding: 6px 8px; min-height: 31px; font-size: .68rem; }
  .container { margin: 22px auto; padding: 0 16px; }
  .page-heading { align-items: flex-start; gap: 10px; margin-bottom: 19px; }
  .page-heading h1 { font-size: 1.3rem; }
  .page-heading .eyebrow { font-size: 8px; letter-spacing: 1.6px; margin-bottom: 4px; }
  .page-description { display: none; }
  .page-heading > .btn { min-height: 36px; padding: 8px 10px; font-size: .73rem; }
  .nav-tabs { position: fixed; bottom: 0; left: 0; width: 100%; max-width: none; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); gap: 0; background: #fffffffa; margin: 0; padding: 8px 5px calc(8px + env(safe-area-inset-bottom)); border-radius: 0; border-top: 1px solid var(--border); z-index: 150; overflow: visible; box-shadow: 0 -3px 14px #23465706; }
  .nav-tab { flex-direction: column; gap: 4px; font-size: .63rem; padding: 2px; min-height: 43px; border-radius: 0; color: #80929e; position: relative; }
  .nav-tab .ui-icon { width: 20px; height: 20px; }
  .nav-tab.active { color: var(--primary-dark); background: transparent; box-shadow: none; }
  .nav-tab.active::before { content: ""; position: absolute; top: -8px; width: 21px; height: 2px; border-radius: 2px; background: #3a87a6; }
  .nav-count { margin-left: 2px; font-size: 8px; min-width: 12px; line-height: 12px; }
  .grid-kpi { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 17px; }
  .kpi-card { padding: 13px 12px; border-radius: 10px; }
  .kpi-label { margin-bottom: 7px; font-size: .65rem; }
  .kpi-value { font-size: 1.12rem; }
  .kpi-value small { font-size: .62rem; }
  .kpi-value > span:not(.money) { font-size: .75rem; }
  .kpi-sub { font-size: .6rem; margin-top: 7px; line-height: 1.6; }
  .card { padding: 18px 16px; border-radius: 12px; margin-bottom: 17px; scroll-margin-top: 82px; }
  .card-header { gap: 10px; margin-bottom: 16px; }
  .card-title { font-size: .91rem; }
  .section-description { font-size: .68rem; }
  .card-header > div[style] { max-width: 100%; }
  .card-header select[style] { max-width: 100%; }
  .card-header > .btn { min-height: 35px; }
  .quick-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-bottom: 17px; }
  .quick-actions .btn { padding: 9px 5px; min-height: 40px; font-size: .73rem; }
  .btn { min-height: 42px; font-size: .79rem; }
  .btn-sm { min-height: 35px; font-size: .69rem; }
  .family-filters { gap: 8px; }
  .family-filters > select { width: 106px; padding: 10px 7px; font-size: .72rem; }
  .family-filters .search-field input { padding-left: 32px; font-size: .7rem; }
  .search-field > .ui-icon { left: 9px; width: 16px; }
  .family-table-wrap { overflow: visible; }
  .family-table, .family-table tbody { display: block; }
  .family-table thead { display: none; }
  .family-table .family-row { display: grid; grid-template-columns: minmax(0,1fr); padding: 13px 0 17px; border-bottom: 1px solid var(--border); gap: 8px; }
  .family-table .family-row:last-child { border: 0; padding-bottom: 0; }
  .family-table .family-row td { display: block; width: 100%; max-width: none; border: 0; padding: 0; white-space: normal; text-align: left; overflow-wrap: anywhere; }
  .family-table .family-row td:first-child > strong { font-size: .9rem; }
  .family-table .family-row td:nth-child(2) { padding-top: 1px; }
  .family-table .family-row td:nth-child(3) { background: #f7fafb; border-radius: 7px; padding: 10px 12px; }
  .family-table .family-row td:nth-child(4) { display: block; }
  .family-table .family-row td:nth-child(4)::before { content: "课包"; display: block; font-size: .68rem; color: var(--text-muted); margin-bottom: 4px; }
  .family-table .family-row td.family-actions { max-width: none; min-width: 0; padding-top: 4px; }
  .family-actions .badge { font-size: .62rem; }
  .family-actions .btn { min-height: 32px; padding: 5px 7px; }
  .form-grid, .form-grid-3 { grid-template-columns: minmax(0,1fr); gap: 0; }
  .form-group label { font-size: .75rem; }
  .form-control { font-size: 16px; min-height: 44px; }
  .form-control[type=file] { font-size: .76rem; }
  .form-control[type=datetime-local] { padding: 10px 8px; }
  .wallet-hero { padding: 16px; border-radius: 12px; margin-bottom: 17px; }
  .wallet-header { flex-direction: column; align-items: stretch; gap: 14px; }
  .wallet-summary { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 12px; }
  .wallet-caption { font-size: .68rem; margin: 0 0 5px; }
  .wallet-summary .wallet-caption { margin: 0; }
  .wallet-amount { font-size: 1.4rem; }
  .wallet-breakdown { flex-basis: 100%; max-width: none; font-size: .65rem; margin-top: 3px; }
  .wallet-children { padding-top: 12px; border-top: 1px solid #dce8ee; }
  .kid-switch-btn { min-height: 34px; padding: 6px 10px; font-size: .71rem; }
  .child-context { font-size: .63rem; line-height: 1.6; }
  .wallet-compact .wallet-summary { display: none; }
  .wallet-compact .wallet-children { border: 0; padding: 0; }
  .next-lesson { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
  .next-lesson > div { width: 100%; }
  .next-lesson .eyebrow { font-size: 8px; margin-bottom: 6px; }
  .next-lesson .lesson-name { font-size: .95rem; }
  .next-lesson p { font-size: .71rem; }
  .next-lesson .btn { margin-top: 2px; min-height: 38px; }
  .pkg-grid { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .pkg-item { padding: 14px; }
  .coach-work-summary { padding: 14px 0; margin-bottom: 17px; }
  .coach-work-summary > div { padding: 0 16px; }
  .coach-work-summary span { font-size: .65rem; }
  .coach-work-summary strong { font-size: 1.3rem; }
  .coach-work-summary small { font-size: .61rem; }
  .auth-container { margin-top: 20px; margin-bottom: 24px; }
  .auth-panel { padding: 24px 21px; border-radius: 14px; }
  .auth-tabs { margin-bottom: 24px; }
  .auth-heading { margin-bottom: 24px; }
  .auth-heading h1 { font-size: 1.6rem; }
  .auth-heading p { font-size: .75rem; }
  .auth-panel .form-control { font-size: 16px; }
  .auth-panel .form-group label { font-size: .73rem; }
  .auth-panel .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .auth-panel .form-grid input, .auth-panel .form-grid select { padding-left: 9px; padding-right: 9px; }
  .auth-assist { font-size: .73rem; }
  .login-brand-panel { padding: 0 8px; }
  .login-brand-panel h2 { font-size: 1.2rem; }
  .brand-features { gap: 14px; justify-content: space-between; margin-top: 14px; }
  .brand-features > div { font-size: .6rem; gap: 4px; }
  .brand-features .ui-icon { width: 14px; height: 14px; }
  .site-footer { padding: 18px 20px; margin-top: 24px; font-size: .64rem; }
  .site-footer-inner { gap: 6px; }
  .registration-item { flex-wrap: wrap; gap: 14px; }
  .registration-actions { margin-left: 53px; }
  .registration-person h3 { font-size: .86rem; }
  .registration-person p { font-size: .68rem; }
  .modal-backdrop { padding: 12px; }
  .modal-box { padding: 21px 18px; max-height: 92dvh; }
  .terms-header, .terms-row { gap: 7px; }
  .terms-row > input { min-height: 40px; font-size: 16px; }
  .modal-actions .btn { flex: 1; }
  #toast-container { right: 16px; bottom: calc(82px + env(safe-area-inset-bottom)); }
  .toast-box { font-size: .75rem; padding: 11px 14px; }
  .portal-admin .table-wrap:not(.family-table-wrap)::before, .portal-parent .table-wrap::before, .portal-coach .table-wrap::before { content: "左右滑动查看完整明细"; display: block; font-size: .62rem; color: #8ba0ae; padding: 0 0 10px; position: sticky; left: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

body:has(.auth-container) { padding-bottom: 0; }

/* Finance columns remain aligned while descriptive content uses normal reading flow. */
.portal-admin .card:has(#adm-ledger-fam-filter) table :is(th,td):nth-child(n+6):nth-child(-n+9),
#parent-ledger-card table :is(th,td):nth-child(n+5):nth-child(-n+8),
#coach-commissions-card table :is(th,td):nth-child(5),
#coach-commissions-card table :is(th,td):nth-child(6) { text-align: right; font-variant-numeric: tabular-nums; }

/* Phone verification and optional account details */
.sms-phone-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
.sms-phone-row .btn { font-size: .76rem; min-width: 112px; padding: 10px 12px; }
.sms-code { font-variant-numeric: tabular-nums; letter-spacing: 4px; }
.sms-code::placeholder { letter-spacing: 0; }
.sms-feedback { min-height: 42px; color: var(--text-muted); font-size: .74rem; line-height: 1.65; }
.sms-feedback.is-error { color: var(--danger); }
.sms-account-note { color: #8b9ba6; font-size: .69rem; line-height: 1.8; text-align: center; margin-top: 19px; }
.header-profile { display: inline-flex; align-items: center; gap: 7px; padding: 3px 0; border: 0; background: transparent; cursor: pointer; color: var(--text-main); }
.header-profile > span { color: var(--primary); font-size: .7rem; }
.header-club-btn { gap: 6px; padding: 5px 11px; min-height: 32px; max-width: 240px; }
.header-club-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; font-weight: 600; color: var(--text-main); }
.header-club-action { color: var(--primary); font-size: .68rem; font-weight: 500; white-space: nowrap; }
.page-heading-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.portal-member { max-width: 1120px; }
.member-welcome { text-align: center; padding: 46px 24px; }
.member-welcome-icon { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; background: var(--primary-light); color: var(--primary); margin-bottom: 20px; }
.member-welcome-icon .ui-icon { width: 27px; height: 27px; }
.member-welcome h2 { font-size: 1.6rem; font-weight: 600; margin: 8px 0 12px; }
.member-welcome > p { color: var(--text-muted); font-size: .82rem; line-height: 1.9; }
.member-actions { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 26px; }
.member-actions > .text-button { font-size: .8rem; }
.member-role-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.member-onboarding-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.member-role-grid > .card, .member-onboarding-grid > .card { margin-bottom: 0; padding: 25px; }
.member-role-icon { display: block; color: #6b96a9; margin-bottom: 15px; }
.member-role-icon .ui-icon { width: 25px; height: 25px; }
.member-role-grid h3, .member-onboarding-grid h3 { font-size: .95rem; font-weight: 600; margin-bottom: 8px; }
.member-role-grid p, .member-onboarding-grid p { color: var(--text-muted); font-size: .77rem; min-height: 46px; }
.member-role-grid .text-button, .member-onboarding-grid .btn { margin-top: 16px; font-size: .76rem; }
.member-club-hint { text-align: center; margin-top: 16px; }
.account-status { display: flex; align-items: flex-start; gap: 10px; background: var(--primary-light); color: var(--primary-dark); border-radius: 10px; padding: 17px 19px; margin: 20px 0; font-size: .8rem; }
.account-status p { margin-top: 4px; font-size: .75rem; line-height: 1.7; }
.account-status-muted { background: #f3f5f7; color: var(--text-muted); }
.account-modal .card-header, .clubs-modal .card-header { align-items: flex-start; }
.account-modal .card-header .card-title, .clubs-modal .card-header .card-title { margin-bottom: 0; font-size: 1.15rem; }
.clubs-modal { max-width: 620px; }
.club-section h3 { font-size: .9rem; font-weight: 600; margin-bottom: 12px; }
.club-list, .club-students-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.club-item, .club-student-item { border: 1px solid var(--border); border-radius: 11px; padding: 14px 16px; background: #fafcfd; }
.club-item.is-active { border-color: #9ec5d6; background: #f2f9fc; }
.club-item-main, .club-student-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.club-item-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; }
.club-item-title strong { font-size: .88rem; font-weight: 600; }
.club-item-actions, .club-student-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.club-profile-summary { margin-top: 10px; color: var(--text-muted); font-size: .8rem; overflow-wrap: anywhere; white-space: pre-line; }
.club-profile-summary p + p { margin-top: 5px; }
.club-profile-editor { margin-top: 12px; }
.club-profile-editor summary { cursor: pointer; color: var(--primary); font-size: .82rem; font-weight: 600; }
.club-profile-editor form { margin-top: 12px; }
.club-invite-box { margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--border); }
.club-invite-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin-top: 5px; }
.club-invite-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem; min-height: 34px; padding: 6px 10px; background: #fff; }
.club-student-info { min-width: 0; overflow-wrap: anywhere; }
.club-student-info strong { font-size: .85rem; font-weight: 600; }
.club-student-meta { color: var(--text-muted); font-size: .75rem; margin-left: 4px; }
.club-onboarding-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.account-phone { color: var(--text-muted); font-size: .77rem; margin: 15px 0 20px; }
.account-phone strong { color: var(--text-main); font-weight: 500; margin-left: 6px; font-variant-numeric: tabular-nums; }
.account-section { border-top: 1px solid var(--border); padding-top: 23px; margin-top: 25px; }
.account-section h3 { font-size: .9rem; font-weight: 600; margin-bottom: 8px; }
.account-section > .field-help { margin-bottom: 15px; }
.account-section .btn, .account-modal form > .btn, .clubs-modal form > .btn { font-size: .78rem; }
.account-students { list-style: none; margin-bottom: 20px; }
.account-students li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: .79rem; padding: 10px 0; border-bottom: 1px solid #f0f3f5; overflow-wrap: anywhere; }
.account-students li strong { font-weight: 550; }
.account-students li span { color: var(--text-muted); font-size: .73rem; text-align: right; }
@media (max-width: 640px) {
  .sms-phone-row { gap: 8px; }
  .sms-phone-row .btn { min-width: 103px; font-size: .7rem; padding: 10px; }
  .sms-feedback { font-size: .7rem; min-height: 44px; }
  .sms-account-note { font-size: .65rem; margin-top: 16px; }
  .header-profile { gap: 5px; }
  .header-profile > span { font-size: .62rem; }
  .brand-wrap { min-width: 100px; flex-shrink: 0; align-self: center; }
  .brand-title { white-space: nowrap; }
  #user-header-info { max-width: calc(100% - 112px); min-width: 0; flex-wrap: wrap; justify-content: flex-end; gap: 6px !important; }
  .header-club-btn { max-width: 100%; width: 100%; order: 2; padding: 5px 8px; gap: 4px; }
  .header-club-name { max-width: 180px; font-size: .69rem; }
  .header-club-action { display: none; }
  .page-heading-actions { width: 100%; }
  .member-welcome { padding: 32px 20px; }
  .member-welcome h2 { font-size: 1.3rem; }
  .member-welcome > p { font-size: .76rem; }
  .member-role-grid, .member-onboarding-grid { grid-template-columns: 1fr; gap: 12px; }
  .member-role-grid > .card, .member-onboarding-grid > .card { padding: 21px; }
  .member-role-grid p, .member-onboarding-grid p { min-height: 0; }
  .member-role-icon { margin-bottom: 9px; }
  .account-modal .form-control, .clubs-modal .form-control { font-size: 16px; }
  .club-item, .club-student-item { padding: 12px 13px; }
  .club-invite-row { grid-template-columns: minmax(0,1fr); }
  .club-onboarding-actions > .btn { width: 100%; }
  body:has(.portal-member) { padding-bottom: 0; }
}
