:root {
  --ink: #14213d;
  --muted: #667085;
  --line: #e8eaf0;
  --soft: #f5f7fb;
  --paper: #ffffff;
  --accent: #6558e8;
  --accent-dark: #4e43c5;
  --accent-soft: #efedff;
  --mint: #20b486;
  --mint-soft: #e7f8f2;
  --warn: #f59e0b;
  --shadow: 0 18px 55px rgba(32, 37, 70, 0.09);
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: #fbfcff;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, select, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 72px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(232, 234, 240, 0.82);
  background: rgba(251, 252, 255, 0.91);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 850; letter-spacing: -0.7px; font-size: 22px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; color: white; border-radius: 11px; background: linear-gradient(135deg, #7c6df1, #5145cd); box-shadow: 0 8px 20px rgba(101, 88, 232, .28); font-size: 17px; }
.brand-dot { color: var(--mint); }
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-link { border: 0; background: transparent; color: #4d576b; border-radius: 10px; padding: 10px 14px; font-weight: 650; }
.nav-link:hover, .nav-link.active { color: var(--accent); background: var(--accent-soft); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.avatar-mini { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #dff4ec; color: #167c60; font-weight: 800; }
.mobile-nav { display: none; }

.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.page { min-height: calc(100vh - 72px); padding: 42px 0 90px; animation: enter .28s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.22fr .78fr;
  align-items: center;
  gap: 50px;
  min-height: 340px;
  padding: 54px 58px;
  border-radius: 32px;
  background: #17162b;
  color: white;
}
.hero::after { content: ""; position: absolute; width: 340px; height: 340px; right: -80px; top: -120px; background: #6759e8; filter: blur(20px); border-radius: 50%; opacity: .52; }
.hero-copy { position: relative; z-index: 2; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; color: #c8c2ff; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.25px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
.hero h1 { max-width: 670px; margin: 0; font-size: clamp(35px, 5vw, 56px); line-height: 1.04; letter-spacing: -2.4px; }
.hero p { max-width: 590px; margin: 20px 0 28px; color: #cbcbd7; line-height: 1.7; font-size: 16px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-panel { position: relative; z-index: 2; justify-self: end; width: 100%; max-width: 340px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16); padding: 22px; border-radius: 24px; backdrop-filter: blur(10px); }
.hero-stat { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.11); }
.hero-stat:last-child { border: 0; }
.hero-stat strong { font-size: 23px; }
.hero-stat span { color: #c9c7d8; font-size: 14px; }

.btn { border: 0; border-radius: 12px; min-height: 44px; padding: 11px 18px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; font-weight: 750; transition: .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: white; box-shadow: 0 10px 22px rgba(101, 88, 232, .23); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-light { background: white; color: #25223d; }
.btn-outline { border: 1px solid var(--line); background: white; color: var(--ink); }
.btn-outline:hover { border-color: #c9c4fa; background: #faf9ff; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-danger { background: #fff1f1; color: #c83f49; }
.btn-block { width: 100%; }
.btn:disabled { cursor: not-allowed; opacity: .45; transform: none; box-shadow: none; }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 44px 0 22px; }
.section-head h2, .page-title h1 { margin: 0 0 7px; letter-spacing: -1px; }
.section-head p, .page-title p { margin: 0; color: var(--muted); }
.page-title { margin-bottom: 26px; }
.page-title h1 { font-size: 34px; }

.trust-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.trust-card { display: flex; gap: 14px; align-items: center; background: white; border: 1px solid var(--line); border-radius: 17px; padding: 17px 19px; }
.trust-icon { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; background: var(--mint-soft); color: #138663; display: grid; place-items: center; font-size: 18px; }
.trust-card strong { display: block; font-size: 14px; }
.trust-card span { color: var(--muted); font-size: 12px; }

.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 15px; border: 1px solid var(--line); border-radius: 17px; background: white; margin-bottom: 20px; }
.filter-label { color: var(--muted); font-size: 13px; font-weight: 750; margin-right: 3px; }
.chip { border: 1px solid var(--line); background: white; border-radius: 999px; padding: 8px 13px; color: #576075; font-size: 13px; font-weight: 650; }
.chip:hover, .chip.active { color: var(--accent); border-color: #cfc9ff; background: var(--accent-soft); }
.select { min-height: 40px; padding: 8px 32px 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); outline: none; }

.teachers-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.teacher-card { display: grid; grid-template-columns: 172px 1fr; min-height: 245px; border: 1px solid var(--line); background: white; border-radius: var(--radius); overflow: hidden; transition: .2s ease; }
.teacher-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.teacher-photo { position: relative; min-height: 245px; overflow: hidden; background: #e9e7f8; }
.teacher-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.online-badge { position: absolute; left: 12px; bottom: 12px; border-radius: 999px; padding: 6px 9px; background: rgba(255,255,255,.91); color: #138663; font-size: 11px; font-weight: 800; }
.teacher-info { padding: 22px 22px 18px; display: flex; flex-direction: column; }
.teacher-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.teacher-name { margin: 0; font-size: 20px; letter-spacing: -.4px; }
.flag { font-size: 18px; }
.teacher-role { margin: 5px 0 13px; color: var(--muted); font-size: 13px; }
.rating { color: var(--warn); font-size: 13px; font-weight: 750; }
.rating span { color: #858b99; font-weight: 550; }
.tags { display: flex; gap: 7px; flex-wrap: wrap; margin: 14px 0; }
.tag { border-radius: 7px; background: var(--soft); color: #586174; padding: 6px 8px; font-size: 11px; font-weight: 700; }
.teacher-card-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-size: 13px; color: var(--muted); }
.price strong { color: var(--ink); font-size: 20px; }
.price small { font-size: 11px; }

.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 368px; gap: 28px; align-items: start; }
.profile-main, .booking-sidebar, .panel { border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.profile-main { overflow: hidden; }
.profile-cover { height: 150px; background: linear-gradient(120deg, #e4e2ff, #f7ecff 55%, #e7f8f2); }
.profile-head { padding: 0 30px 28px; margin-top: -65px; position: relative; }
.profile-avatar { width: 130px; height: 130px; border-radius: 25px; object-fit: cover; border: 6px solid white; background: #eee; }
.profile-meta { display: flex; justify-content: space-between; gap: 20px; margin-top: 13px; }
.profile-meta h1 { margin: 0; font-size: 29px; }
.verified { color: var(--accent); font-size: 14px; }
.profile-sub { margin: 6px 0; color: var(--muted); }
.profile-stats { display: flex; gap: 18px; margin-top: 18px; }
.mini-stat strong { display: block; font-size: 16px; }
.mini-stat span { font-size: 12px; color: var(--muted); }
.profile-body { border-top: 1px solid var(--line); padding: 28px 30px 32px; }
.profile-body h3 { margin: 0 0 13px; }
.profile-body p { color: #525c70; line-height: 1.75; }
.course-card { display: flex; justify-content: space-between; gap: 20px; border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-top: 11px; }
.course-card h4 { margin: 0 0 5px; }
.course-card p { margin: 0; font-size: 13px; line-height: 1.45; }
.course-price { white-space: nowrap; font-weight: 850; font-size: 18px; }
.course-price span { display: block; color: var(--muted); font-size: 11px; font-weight: 500; text-align: right; }

.booking-sidebar { padding: 23px; position: sticky; top: 94px; box-shadow: var(--shadow); }
.booking-sidebar h3 { margin: 0 0 6px; }
.sidebar-price { margin-bottom: 18px; color: var(--muted); font-size: 13px; }
.sidebar-price strong { color: var(--ink); font-size: 25px; }
.form-label { display: block; margin: 17px 0 8px; color: #4a5366; font-size: 12px; font-weight: 800; }
.choice-list { display: grid; gap: 8px; }
.choice { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; background: white; text-align: left; color: var(--ink); }
.choice:hover, .choice.selected { border-color: var(--accent); background: var(--accent-soft); }
.choice strong { font-size: 13px; }
.choice small { color: var(--muted); }
.date-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.date-btn { padding: 9px 4px; border: 1px solid var(--line); background: white; border-radius: 11px; color: var(--muted); }
.date-btn span { display: block; font-size: 11px; }
.date-btn strong { display: block; margin-top: 3px; font-size: 16px; color: var(--ink); }
.date-btn.selected { border-color: var(--accent); background: var(--accent); color: white; }
.date-btn.selected strong { color: white; }
.time-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.time-btn { border: 1px solid var(--line); background: white; border-radius: 9px; padding: 9px 6px; font-size: 12px; color: #4f586b; }
.time-btn.selected { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 800; }
.timezone-note { margin-top: 9px; color: var(--muted); font-size: 11px; }
.secure-note { text-align: center; color: var(--muted); font-size: 11px; margin: 11px 0 0; }

.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.checkout { width: min(700px, 100%); margin: 0 auto; }
.stepper { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 28px; }
.step { position: relative; text-align: center; color: #9aa0ad; font-size: 11px; }
.step::before { content: ""; display: block; width: 25px; height: 25px; margin: 0 auto 7px; border-radius: 50%; background: #eceef3; border: 5px solid #fbfcff; outline: 1px solid #dde0e8; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 12px; left: calc(50% + 17px); width: calc(100% - 34px); height: 2px; background: #e0e2e8; }
.step.active { color: var(--accent); font-weight: 800; }
.step.active::before { background: var(--accent); outline-color: var(--accent); }
.checkout-card { border: 1px solid var(--line); background: white; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.checkout-card h2 { margin: 0 0 5px; }
.checkout-card > p { margin: 0 0 20px; color: var(--muted); }
.summary-teacher { display: flex; align-items: center; gap: 14px; padding: 15px; background: var(--soft); border-radius: 15px; }
.summary-teacher img { width: 55px; height: 55px; border-radius: 14px; object-fit: cover; }
.summary-teacher h3 { margin: 0 0 3px; font-size: 16px; }
.summary-teacher p { margin: 0; color: var(--muted); font-size: 12px; }
.summary-list { margin: 19px 0; }
.summary-row { display: flex; justify-content: space-between; gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.summary-row span { color: var(--muted); }
.summary-row strong { text-align: right; }
.total-row { font-size: 16px; border: 0; }
.total-row strong { font-size: 22px; }
.policy { display: flex; gap: 9px; align-items: flex-start; color: var(--muted); font-size: 11px; margin: 13px 0 18px; }
.balance-warning { display: grid; grid-template-columns: 1fr auto; gap: 4px 15px; align-items: center; margin: 15px 0; padding: 15px; border: 1px solid #f8d59b; border-radius: 14px; background: #fff9ec; }
.balance-warning strong { color: #a66305; }
.balance-warning span { color: #8b6a36; font-size: 12px; }
.balance-warning .btn { grid-column: 2; grid-row: 1 / 3; }

.success-card { text-align: center; }
.success-icon { width: 68px; height: 68px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; background: var(--mint-soft); color: var(--mint); font-size: 30px; }
.success-card .summary-list { text-align: left; }
.action-row { display: flex; gap: 10px; }

.empty { border: 1px dashed #cfd3dd; border-radius: var(--radius); padding: 55px 20px; text-align: center; background: white; }
.empty-icon { font-size: 37px; }
.empty h3 { margin: 12px 0 6px; }
.empty p { color: var(--muted); margin: 0 0 18px; }
.booking-card { display: grid; grid-template-columns: 7px 1fr auto; overflow: hidden; border: 1px solid var(--line); background: white; border-radius: var(--radius); margin-bottom: 15px; }
.booking-accent { background: var(--accent); }
.booking-content { display: flex; gap: 17px; align-items: center; padding: 20px; }
.booking-content img { width: 68px; height: 68px; border-radius: 17px; object-fit: cover; }
.booking-content h3 { margin: 0 0 5px; }
.booking-content p { margin: 3px 0; color: var(--muted); font-size: 13px; }
.booking-actions { display: flex; align-items: center; gap: 10px; padding: 20px; }
.status-pill { display: inline-flex; border-radius: 999px; padding: 5px 9px; background: var(--mint-soft); color: #138663; font-size: 10px; font-weight: 850; }
.status-pill.pending { background: #fff4dc; color: #a56400; }
.status-pill.approved, .status-pill.paid, .status-pill.completed { background: var(--mint-soft); color: #138663; }
.status-pill.rejected, .status-pill.void { background: #fff0f1; color: #bd3c47; }
.status-pill.ready { background: var(--accent-soft); color: var(--accent); }

.balance-hero { display: flex; align-items: center; justify-content: space-between; gap: 28px; overflow: hidden; padding: 32px 36px; border-radius: 26px; background: linear-gradient(125deg, #19172f, #4f45b5); color: white; box-shadow: var(--shadow); }
.balance-hero span { color: #d4d0f7; font-size: 13px; font-weight: 750; }
.balance-hero strong { display: block; margin: 7px 0 4px; font-size: 48px; letter-spacing: -2px; }
.balance-hero strong small { font-size: 17px; letter-spacing: 0; }
.balance-hero p { margin: 0; color: #cfccdf; font-size: 13px; }
.wallet-note { display: flex; gap: 14px; align-items: center; margin-top: 14px; padding: 14px 18px; border: 1px solid #d5eee5; border-radius: 14px; background: #f3fbf8; font-size: 12px; }
.wallet-note strong { color: #127257; white-space: nowrap; }
.wallet-note span { color: #557067; }
.pending-banner { margin: -8px 0 18px; padding: 13px 15px; border-radius: 12px; background: #fff4dc; color: #8e5c0b; font-size: 13px; }
.packages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.package-card { position: relative; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: white; }
.package-card.featured { border-color: #c8c1ff; box-shadow: 0 14px 34px rgba(101, 88, 232, .12); }
.package-badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 850; }
.package-card h3 { margin: 16px 0 5px; font-size: 19px; }
.package-card > strong { display: block; margin-top: 5px; font-size: 14px; }
.package-card > p { min-height: 42px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.package-price { font-size: 30px; font-weight: 850; letter-spacing: -1px; }
.paypal-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.paypal-card > div { display: flex; align-items: center; gap: 14px; }
.paypal-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #e9f2ff; color: #1672cf; font-size: 21px; font-weight: 900; }
.paypal-card p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.wallet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 30px; }
.wallet-panel, .admin-panel { padding: 22px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0 0 4px; font-size: 19px; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.mini-empty { padding: 28px 10px 10px; color: var(--muted); text-align: center; font-size: 13px; }
.request-card, .ledger-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.request-card:last-child, .ledger-row:last-child { border-bottom: 0; }
.request-card h4 { margin: 7px 0 3px; }
.request-card p, .ledger-row span { display: block; margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.request-value, .ledger-value { text-align: right; white-space: nowrap; }
.request-value strong { display: block; }
.request-value span { color: var(--muted); font-size: 11px; }
.ledger-row strong { font-size: 13px; }
.ledger-value { font-size: 17px; font-weight: 850; }
.ledger-value.positive { color: #138663; }
.ledger-value.negative { color: #b84d56; }
.ledger-value small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 550; }

.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 15px; margin-bottom: 20px; }
.metric-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.metric-card span { color: var(--muted); font-size: 12px; font-weight: 750; }
.metric-card strong { display: block; margin: 5px 0; font-size: 31px; }
.metric-card small { color: var(--muted); }
.admin-panel { margin-top: 18px; }
.admin-list { display: grid; }
.admin-item { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.admin-item:last-child { border-bottom: 0; }
.admin-item-main { min-width: 0; }
.admin-item-title { display: flex; align-items: center; gap: 9px; }
.admin-item-title strong { font-size: 14px; }
.admin-item p { margin: 6px 0 0; color: #596276; font-size: 12px; }
.admin-item small { display: block; margin-top: 5px; color: #969cab; font-size: 10px; }
.admin-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.admin-actions .btn { min-height: 39px; padding: 8px 12px; font-size: 12px; }
.admin-result { flex: 0 0 auto; color: var(--muted); font-size: 12px; text-align: right; }
.admin-result small { max-width: 180px; }

.workspace-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.workspace-heading h1 { margin: 0 0 7px; font-size: 36px; letter-spacing: -1.2px; }
.workspace-heading p { margin: 0; color: var(--muted); }
.eyebrow.dark { color: var(--accent); margin-bottom: 9px; }
.workspace-tabs { display: flex; gap: 7px; margin-bottom: 20px; padding: 6px; border: 1px solid var(--line); border-radius: 15px; background: white; overflow-x: auto; }
.workspace-tabs a { flex: 0 0 auto; padding: 10px 15px; border-radius: 10px; color: var(--muted); font-size: 13px; font-weight: 750; }
.workspace-tabs a:hover, .workspace-tabs a.active { color: var(--accent); background: var(--accent-soft); }
.info-banner, .preview-banner { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 15px 17px; border: 1px solid #d9d5ff; border-radius: 15px; background: #f8f7ff; }
.info-banner > span { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--accent); color: white; font-weight: 850; }
.info-banner strong { font-size: 13px; }
.info-banner p, .preview-banner p { margin: 3px 0 0; color: #65637a; font-size: 12px; line-height: 1.5; }
.management-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.management-card { overflow: hidden; border: 1px solid var(--line); border-radius: 21px; background: white; }
.management-head { display: flex; align-items: center; gap: 14px; padding: 20px; }
.management-head img { width: 68px; height: 68px; flex: 0 0 68px; border-radius: 17px; object-fit: cover; background: var(--soft); }
.management-head p { margin: 7px 0 4px; color: #596276; font-size: 12px; }
.management-head small { color: var(--muted); font-size: 10px; }
.management-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); background: var(--soft); }
.management-stats span { padding: 11px 8px; color: var(--muted); text-align: center; font-size: 10px; }
.management-stats strong { display: block; margin-bottom: 2px; color: var(--ink); font-size: 17px; }
.management-actions { display: flex; gap: 8px; padding: 15px 15px 8px; }
.management-actions .btn { min-height: 38px; flex: 1; padding: 8px 9px; font-size: 11px; }
.managed-courses { padding: 8px 15px 15px; }
.managed-course { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.managed-course strong, .managed-course span { display: block; }
.managed-course strong { font-size: 12px; }
.managed-course span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.managed-course .btn { min-height: 34px; padding: 7px 10px; font-size: 10px; }
.section-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 25px 0 14px; }
.section-toolbar h2 { margin: 0 0 5px; }
.section-toolbar p { margin: 0; color: var(--muted); font-size: 13px; }
.account-directory { overflow: hidden; padding: 0 20px; }
.account-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.account-row:last-child { border: 0; }
.account-avatar { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-weight: 850; }
.account-main p { margin: 5px 0 2px; color: #586174; font-size: 12px; }
.account-main small { color: var(--muted); font-size: 10px; }
.account-stats { display: flex; gap: 18px; color: var(--muted); font-size: 10px; text-align: right; }
.account-stats strong { display: block; color: var(--ink); font-size: 15px; }
.account-row > .btn { min-height: 38px; padding: 8px 12px; font-size: 11px; }
.account-note { color: var(--muted); font-size: 11px; }

.preview-banner { align-items: center; border-color: #f1d49d; background: #fff9ec; }
.preview-banner > span { flex: 0 0 auto; border-radius: 999px; padding: 6px 9px; background: #f7e4b8; color: #93600c; font-size: 10px; font-weight: 850; }
.preview-banner p { flex: 1; margin: 0; color: #765f38; }
.preview-banner a { color: #7f570e; font-size: 12px; font-weight: 800; }
.portal-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 24px; background: white; }
.portal-hero > img { width: 82px; height: 82px; border-radius: 21px; object-fit: cover; background: var(--soft); }
.portal-hero h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: -.8px; }
.portal-hero p { margin: 0; color: var(--muted); font-size: 13px; }
.portal-hero-actions { display: flex; gap: 9px; }
.portal-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin: 17px 0; }
.portal-metrics article { padding: 16px 18px; border: 1px solid var(--line); border-radius: 17px; background: white; }
.portal-metrics span { display: block; color: var(--muted); font-size: 11px; }
.portal-metrics strong { display: block; margin-top: 5px; font-size: 26px; }
.portal-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, .75fr); gap: 17px; align-items: start; }
.portal-panel { margin-bottom: 17px; padding: 20px; }
.portal-list { display: grid; }
.portal-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.portal-row:last-child { border-bottom: 0; }
.portal-date { width: 47px; padding: 7px 4px; border-radius: 12px; background: var(--accent-soft); text-align: center; }
.portal-date strong, .portal-date span { display: block; }
.portal-date strong { color: var(--accent); font-size: 19px; }
.portal-date span { color: #77708f; font-size: 9px; }
.portal-row-main p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.portal-row-actions { display: flex; gap: 7px; }
.portal-row-actions .btn { min-height: 36px; padding: 7px 10px; font-size: 10px; }
.schedule-list { display: grid; }
.schedule-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.schedule-row:last-child { border-bottom: 0; }
.schedule-row strong, .schedule-row span { display: block; }
.schedule-row strong { font-size: 12px; }
.schedule-row > div:first-child span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.schedule-row > div:last-child { text-align: right; }
.text-button { margin-top: 5px; padding: 0; border: 0; background: none; color: var(--accent); font-size: 10px; font-weight: 750; }
.portal-courses { display: grid; gap: 10px; padding-top: 14px; }
.portal-course { display: flex; justify-content: space-between; gap: 22px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; }
.portal-course h3 { margin: 9px 0 5px; font-size: 15px; }
.portal-course p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.portal-course-price { flex: 0 0 145px; text-align: right; }
.portal-course-price strong, .portal-course-price span { display: block; }
.portal-course-price strong { font-size: 20px; }
.portal-course-price span { margin: 4px 0 10px; color: var(--muted); font-size: 10px; }
.portal-course-price .btn { min-height: 34px; padding: 7px 10px; font-size: 10px; }
.settlement-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.settlement-row:last-child { border: 0; }
.settlement-row strong, .settlement-row span { display: block; }
.settlement-row strong { font-size: 12px; }
.settlement-row div span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.modal-wide { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-field { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 17px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.check-field input { margin-top: 3px; }
.check-field strong, .check-field small { display: block; }
.check-field strong { font-size: 12px; }
.check-field small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.prejoin { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; }
.camera-preview { position: relative; min-height: 420px; display: grid; place-items: center; overflow: hidden; border-radius: 24px; background: linear-gradient(150deg, #25243c, #11131b); color: white; }
.camera-avatar { width: 100px; height: 100px; display: grid; place-items: center; border-radius: 50%; background: #403b7f; font-size: 34px; font-weight: 850; }
.preview-name { position: absolute; left: 18px; bottom: 16px; font-size: 13px; }
.preview-controls { position: absolute; right: 18px; bottom: 16px; display: flex; gap: 8px; }
.round-btn { width: 43px; height: 43px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: white; }
.round-btn.off { background: #dc4a54; }
.prejoin-panel { padding: 26px; border: 1px solid var(--line); border-radius: 24px; background: white; }
.prejoin-panel h2 { margin: 0 0 7px; }
.prejoin-panel > p { color: var(--muted); margin: 0 0 24px; }
.check-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.check-row:last-of-type { border-bottom: 0; }
.check-row strong { display: block; font-size: 13px; }
.check-row span { color: var(--muted); font-size: 11px; }
.check-ok { color: var(--mint)!important; font-weight: 800; }

.classroom { height: calc(100vh - 72px); min-height: 620px; padding: 18px; background: #101219; color: white; }
.classroom-head { height: 54px; display: flex; align-items: center; justify-content: space-between; }
.classroom-head h2 { font-size: 15px; margin: 0; }
.live-dot { color: #63d7ad; font-size: 11px; }
.class-layout { height: calc(100% - 70px); display: grid; grid-template-columns: minmax(0, 1fr) 305px; gap: 15px; }
.video-stage { position: relative; overflow: hidden; border-radius: 20px; background: #242733; }
.video-stage img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.video-gradient { position: absolute; inset: 0; background: linear-gradient(transparent 56%, rgba(6,8,12,.78)); }
.teacher-video-label { position: absolute; left: 18px; bottom: 18px; font-size: 13px; }
.self-video { position: absolute; width: 180px; height: 118px; right: 16px; top: 16px; border: 2px solid rgba(255,255,255,.18); border-radius: 15px; background: #34384a; display: grid; place-items: center; font-size: 28px; }
.class-controls { position: absolute; left: 50%; bottom: 19px; transform: translateX(-50%); display: flex; gap: 10px; }
.hangup { background: #df4651; width: 55px; border-radius: 22px; }
.class-panel { display: flex; flex-direction: column; overflow: hidden; background: white; color: var(--ink); border-radius: 20px; }
.panel-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.panel-tab { border: 0; background: white; padding: 16px; font-size: 12px; font-weight: 800; color: var(--muted); }
.panel-tab.active { color: var(--accent); box-shadow: inset 0 -2px var(--accent); }
.chat-list { flex: 1; padding: 17px; overflow: auto; }
.message { margin-bottom: 16px; font-size: 12px; line-height: 1.45; }
.message strong { display: block; margin-bottom: 3px; }
.message p { display: inline-block; margin: 0; padding: 9px 11px; border-radius: 2px 11px 11px 11px; background: var(--soft); }
.message.me { text-align: right; }
.message.me p { background: var(--accent-soft); border-radius: 11px 2px 11px 11px; }
.chat-form { display: flex; gap: 8px; padding: 13px; border-top: 1px solid var(--line); }
.chat-input { min-width: 0; flex: 1; border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; outline: 0; }
.chat-send { border: 0; border-radius: 9px; background: var(--accent); color: white; width: 38px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(19, 21, 31, .58); backdrop-filter: blur(5px); animation: fade .16s ease; }
.modal { width: min(430px, 100%); border-radius: 22px; background: white; padding: 25px; box-shadow: 0 25px 70px rgba(0,0,0,.24); }
.modal { position: relative; }
.modal h3 { margin: 0 0 6px; }
.modal > p { color: var(--muted); font-size: 13px; margin: 0 0 17px; line-height: 1.6; }
.modal-close { position: absolute; right: 16px; top: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--soft); color: var(--muted); font-size: 21px; }
.topup-summary { display: flex; align-items: center; justify-content: space-between; margin: 0 0 17px; padding: 13px 14px; border-radius: 12px; background: var(--soft); }
.topup-summary span { font-size: 18px; font-weight: 850; }
@keyframes fade { from { opacity: 0; } }
.toast { position: fixed; z-index: 200; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; border-radius: 10px; background: #151728; color: white; padding: 11px 16px; font-size: 12px; box-shadow: var(--shadow); transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; padding: 44px; }
  .hero-panel { justify-self: stretch; max-width: none; display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
  .hero-stat { display: block; border: 0; padding: 0; }
  .hero-stat span { display: block; margin-top: 5px; }
  .teachers-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .booking-sidebar { position: static; }
  .prejoin { grid-template-columns: 1fr; }
  .packages-grid { grid-template-columns: 1fr 1fr; }
  .package-card:last-child { grid-column: 1 / -1; }
  .wallet-grid { grid-template-columns: 1fr; }
  .management-grid { grid-template-columns: 1fr; }
  .portal-grid { grid-template-columns: 1fr; }
  .portal-metrics { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .topbar { height: 62px; }
  .nav { width: calc(100% - 28px); }
  .nav-actions .btn { display: none; }
  .container { width: calc(100% - 28px); }
  .page { padding: 24px 0 94px; min-height: calc(100vh - 62px); }
  .hero { min-height: auto; padding: 34px 24px; border-radius: 24px; gap: 30px; }
  .hero h1 { font-size: 38px; letter-spacing: -1.7px; }
  .hero p { margin: 16px 0 22px; }
  .hero-panel { grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding: 16px; }
  .hero-stat strong { font-size: 18px; }
  .hero-stat span { font-size: 10px; }
  .trust-row { grid-template-columns: 1fr; gap: 8px; }
  .section-head { margin-top: 34px; align-items: start; }
  .section-head h2 { font-size: 23px; }
  .section-head .btn { display: none; }
  .teacher-card { grid-template-columns: 118px 1fr; min-height: 222px; border-radius: 18px; }
  .teacher-photo { min-height: 222px; }
  .teacher-info { padding: 17px 15px 14px; }
  .teacher-name { font-size: 17px; }
  .teacher-role { margin-bottom: 9px; font-size: 11px; }
  .tags { margin: 10px 0; gap: 5px; }
  .tag { font-size: 9px; padding: 5px 6px; }
  .teacher-card-footer .btn { padding: 8px 10px; min-height: 37px; font-size: 11px; }
  .price strong { font-size: 17px; }
  .page-title h1 { font-size: 28px; }
  .profile-cover { height: 105px; }
  .profile-head { padding: 0 20px 22px; margin-top: -50px; }
  .profile-avatar { width: 100px; height: 100px; border-radius: 20px; }
  .profile-meta { display: block; }
  .profile-body { padding: 23px 20px; }
  .profile-stats { justify-content: space-between; }
  .course-card { display: block; }
  .course-price { margin-top: 10px; }
  .course-price span { display: inline; }
  .booking-sidebar { padding: 20px; }
  .checkout-card { padding: 21px 18px; }
  .balance-warning { grid-template-columns: 1fr; }
  .balance-warning .btn { grid-column: 1; grid-row: auto; margin-top: 7px; }
  .action-row { flex-direction: column; }
  .booking-card { grid-template-columns: 6px 1fr; }
  .booking-content { padding: 16px 13px; gap: 11px; }
  .booking-content img { width: 52px; height: 52px; border-radius: 13px; }
  .booking-actions { grid-column: 2; padding: 0 13px 16px; }
  .booking-actions .btn { flex: 1; }
  .camera-preview { min-height: 360px; }
  .classroom { height: calc(100vh - 62px); min-height: 650px; padding: 10px; }
  .class-layout { grid-template-columns: 1fr; grid-template-rows: minmax(350px, 1fr) 215px; }
  .class-panel { min-height: 0; }
  .self-video { width: 105px; height: 76px; }
  .class-controls { bottom: 14px; }
  .mobile-nav { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: 11px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 7px; border: 1px solid rgba(232,234,240,.85); border-radius: 17px; background: rgba(255,255,255,.94); box-shadow: 0 12px 35px rgba(35,39,66,.16); backdrop-filter: blur(14px); }
  .mobile-link { border: 0; background: transparent; border-radius: 11px; padding: 7px 4px; color: var(--muted); font-size: 10px; }
  .mobile-link span { display: block; font-size: 17px; margin-bottom: 2px; }
  .mobile-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 800; }
  .classroom + .mobile-nav, body.in-class .topbar, body.in-class .mobile-nav { display: none; }
  .balance-hero { display: block; padding: 26px 23px; }
  .balance-hero strong { font-size: 42px; }
  .balance-hero .btn { margin-top: 20px; width: 100%; }
  .wallet-note { align-items: flex-start; flex-direction: column; gap: 5px; }
  .wallet-note strong { white-space: normal; }
  .packages-grid { grid-template-columns: 1fr; }
  .package-card:last-child { grid-column: auto; }
  .package-card > p { min-height: 0; }
  .paypal-card { align-items: flex-start; flex-direction: column; }
  .paypal-card .btn { width: 100%; }
  .metrics-grid { grid-template-columns: 1fr; gap: 9px; }
  .metric-card { padding: 16px 18px; }
  .metric-card strong { font-size: 26px; }
  .wallet-panel, .admin-panel { padding: 18px 16px; }
  .admin-item { align-items: flex-start; flex-direction: column; gap: 13px; }
  .admin-actions { width: 100%; }
  .admin-actions .btn { flex: 1; }
  .admin-result { text-align: left; }
  .request-card, .ledger-row { align-items: flex-start; }
  .workspace-heading { align-items: flex-start; }
  .workspace-heading .btn { display: none; }
  .workspace-heading h1 { font-size: 29px; }
  .workspace-tabs { margin-inline: -2px; }
  .management-actions { flex-wrap: wrap; }
  .management-actions .btn { flex: 1 1 30%; }
  .account-row { grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
  .account-stats, .account-row > .btn, .account-note { grid-column: 2; justify-self: stretch; }
  .account-stats { justify-content: flex-start; text-align: left; }
  .portal-hero { grid-template-columns: auto 1fr; padding: 18px; }
  .portal-hero > img { width: 64px; height: 64px; }
  .portal-hero h1 { font-size: 24px; }
  .portal-hero-actions { grid-column: 1 / -1; }
  .portal-hero-actions .btn { flex: 1; }
  .portal-metrics { gap: 8px; }
  .portal-metrics article { padding: 13px; }
  .portal-row { grid-template-columns: auto 1fr; }
  .portal-row-actions { grid-column: 2; }
  .portal-course { display: block; }
  .portal-course-price { margin-top: 14px; text-align: left; }
  .portal-course-price .btn { width: 100%; }
  .preview-banner { align-items: flex-start; flex-wrap: wrap; }
  .preview-banner p { flex-basis: calc(100% - 80px); }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
}

.account-chip { display: flex; align-items: center; gap: 9px; min-width: 0; }
.account-chip > span:last-child { display: grid; line-height: 1.05; }
.account-chip strong { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.account-chip small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.live-data { color: var(--mint); font-size: 12px; font-weight: 800; }

.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 22px; background: radial-gradient(circle at 50% 20%, #f0edff, #fbfcff 48%); }
.boot-screen p { margin: -8px 0 0; color: var(--muted); font-size: 13px; }
.spinner { width: 25px; height: 25px; display: inline-block; border: 3px solid #dedbf9; border-top-color: var(--accent); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state { min-height: 340px; display: grid; place-content: center; justify-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: white; text-align: center; }
.loading-state.compact { min-height: 210px; }
.loading-state strong { margin-top: 5px; }
.loading-state p { margin: -5px 0 0; color: var(--muted); font-size: 13px; }
.slot-loading, .slot-empty { min-height: 105px; margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px dashed #d8d9e4; border-radius: 13px; background: var(--soft); color: var(--muted); text-align: center; font-size: 13px; }
.slot-loading .spinner { width: 18px; height: 18px; border-width: 2px; }

.auth-page { min-height: calc(100vh - 72px); padding: 44px 20px 90px; display: grid; place-items: center; background: radial-gradient(circle at 12% 8%, #eeebff, transparent 35%), #f8f9fd; }
.auth-shell { width: min(980px, 100%); display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden; border: 1px solid var(--line); border-radius: 30px; background: white; box-shadow: var(--shadow); }
.auth-copy { position: relative; overflow: hidden; min-height: 560px; padding: 48px; display: flex; flex-direction: column; justify-content: center; background: #17162b; color: white; }
.auth-copy::after { content: ""; position: absolute; width: 300px; height: 300px; right: -120px; bottom: -120px; border-radius: 50%; background: #6558e8; filter: blur(10px); opacity: .58; }
.auth-brand { position: absolute; left: 42px; top: 38px; color: white; z-index: 1; }
.auth-copy .eyebrow, .auth-copy h1, .auth-copy p, .auth-points { position: relative; z-index: 1; }
.auth-copy h1 { max-width: 440px; margin: 0; font-size: clamp(34px, 5vw, 48px); line-height: 1.08; letter-spacing: -1.8px; }
.auth-copy > p { max-width: 440px; margin: 18px 0 24px; color: #c9c8d7; line-height: 1.7; }
.auth-points { display: grid; gap: 10px; color: #dfdced; font-size: 13px; }
.auth-card { padding: 45px 42px; align-self: center; }
.auth-card h2 { margin: 28px 0 7px; font-size: 27px; letter-spacing: -.7px; }
.auth-card > p { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 12px; background: var(--soft); }
.auth-tab { border: 0; border-radius: 9px; padding: 10px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 750; }
.auth-tab.active { background: white; color: var(--accent); box-shadow: 0 3px 12px rgba(40, 43, 72, .08); }
.field { display: grid; gap: 7px; margin-bottom: 15px; color: #434b5d; font-size: 13px; font-weight: 750; }
.field input, .field textarea, .field select { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; outline: none; color: var(--ink); background: white; font-size: 15px; }
.field textarea { resize: vertical; line-height: 1.55; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-error, .form-success { margin: 0 0 16px; border-radius: 10px; padding: 11px 12px; font-size: 12px; line-height: 1.5; }
.form-error { border: 1px solid #ffd6d8; background: #fff2f3; color: #b42f3b; }
.form-success { border: 1px solid #c9f0e2; background: var(--mint-soft); color: #147658; }
.booking-card.is-cancelled { opacity: .68; }
.booking-card.is-cancelled .booking-accent { background: #a9afbc; }
.status-pill.cancelled { background: #f0f1f4; color: #687083; }

.account-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 17px; }
.account-type { min-width: 0; display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; gap: 2px 9px; align-items: center; border: 1px solid var(--line); border-radius: 13px; padding: 11px; background: white; color: var(--ink); text-align: left; }
.account-type > span { grid-row: 1 / 3; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--soft); color: var(--muted); font-weight: 850; }
.account-type strong { font-size: 12px; }
.account-type small { min-width: 0; color: var(--muted); font-size: 9px; line-height: 1.25; }
.account-type.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px rgba(101, 88, 232, .08); }
.account-type.selected > span { background: var(--accent); color: white; }

.narrow-container { max-width: 820px; }
.application-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.application-heading h1 { margin: 0 0 9px; font-size: clamp(32px, 5vw, 46px); letter-spacing: -1.5px; }
.application-heading p { max-width: 680px; margin: 0; color: var(--muted); line-height: 1.65; }
.review-promise { flex: 0 0 190px; padding: 15px 17px; border: 1px solid #d8d3ff; border-radius: 16px; background: #f7f5ff; }
.review-promise strong, .review-promise span { display: block; }
.review-promise strong { color: var(--accent); font-size: 13px; }
.review-promise span { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.application-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 20px; }
.application-form { padding: 28px; }
.form-section { display: flex; align-items: center; gap: 13px; margin-bottom: 21px; }
.form-section.course-section { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.form-section-number { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 11px; background: var(--accent); color: white; font-weight: 850; }
.form-section h2 { margin: 0 0 3px; font-size: 19px; }
.form-section p { margin: 0; color: var(--muted); font-size: 11px; }
.application-aside { position: sticky; top: 92px; display: grid; gap: 15px; }
.application-aside .panel { padding: 21px; }
.application-aside h3 { margin: 0 0 18px; }
.application-aside ol { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.application-aside li { display: flex; gap: 11px; }
.application-aside li > span { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 850; }
.application-aside li strong { font-size: 12px; }
.application-aside li p, .teacher-safety-note p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.teacher-safety-note { border-color: #cfeadf; background: #f4fbf8; }
.application-policy { padding: 13px; border-radius: 11px; background: var(--soft); }
.application-alert { margin-bottom: 19px; padding: 16px 18px; border: 1px solid #f1c8cc; border-radius: 15px; background: #fff6f6; color: #96313b; }
.application-alert p { margin: 5px 0 0; font-size: 12px; line-height: 1.5; }
.application-status-card { padding: 38px; border: 1px solid var(--line); border-radius: 25px; background: white; box-shadow: var(--shadow); text-align: center; }
.status-orb { width: 66px; height: 66px; display: grid; place-items: center; margin: 0 auto 15px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 29px; }
.application-status-card h1 { margin: 16px 0 9px; font-size: 34px; }
.application-status-card > p { max-width: 620px; margin: 0 auto; color: var(--muted); line-height: 1.65; }
.application-steps { display: grid; grid-template-columns: repeat(3, 1fr); margin: 30px 0; padding: 23px 15px; border-radius: 17px; background: var(--soft); }
.application-steps > div { position: relative; display: grid; justify-items: center; gap: 5px; color: var(--muted); }
.application-steps > div:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: calc(50% + 23px); width: calc(100% - 46px); height: 2px; background: #dcdde7; }
.application-steps span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: white; border: 1px solid var(--line); font-size: 11px; font-weight: 850; z-index: 1; }
.application-steps strong { color: var(--ink); font-size: 12px; }
.application-steps small { font-size: 10px; }
.application-steps .done span, .application-steps .active span { border-color: var(--accent); background: var(--accent); color: white; }
.application-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 15px; background: var(--line); text-align: left; }
.application-summary > div { padding: 15px; background: white; }
.application-summary span, .application-summary strong { display: block; }
.application-summary span { margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.application-summary strong { font-size: 13px; }

.applications-review { margin-bottom: 24px; }
.application-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.application-review-card { overflow: hidden; border: 1px solid #d9d5ff; border-radius: 20px; background: white; box-shadow: 0 9px 25px rgba(68, 60, 140, .06); }
.application-review-head { display: flex; align-items: center; gap: 13px; padding: 18px; border-bottom: 1px solid var(--line); }
.application-review-head img { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 15px; object-fit: cover; background: var(--accent-soft); }
.application-review-head p { margin: 6px 0 3px; color: #596276; font-size: 11px; }
.application-review-head small { color: var(--muted); font-size: 9px; }
.application-review-body { padding: 18px; }
.application-review-body > p { margin: 0 0 14px; color: #515a6d; font-size: 12px; line-height: 1.65; }
.application-review-body dl { display: grid; gap: 9px; margin: 0 0 14px; }
.application-review-body dl > div { display: grid; grid-template-columns: 70px 1fr; gap: 8px; }
.application-review-body dt { color: var(--muted); font-size: 10px; }
.application-review-body dd { margin: 0; color: var(--ink); font-size: 11px; }
.application-review-course { padding: 13px; border-radius: 12px; background: var(--soft); }
.application-review-course span, .application-review-course strong, .application-review-course small { display: block; }
.application-review-course span { color: var(--accent); font-size: 9px; font-weight: 850; }
.application-review-course strong { margin-top: 4px; font-size: 13px; }
.application-review-course p { margin: 5px 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.application-review-course small { color: #4f586a; font-size: 10px; }
.application-review-actions { padding: 0 18px 18px; }
.application-review-actions .btn { flex: 1; }
.application-review-empty { padding: 28px; }
.review-history { margin-top: 15px; padding: 15px 18px; }
.review-history summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 750; }
.review-history > div { margin-top: 12px; }
.review-history-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 11px 0; border-top: 1px solid var(--line); }
.review-history-row strong, .review-history-row span { display: block; }
.review-history-row strong { font-size: 12px; }
.review-history-row div > span { margin-top: 3px; color: var(--muted); font-size: 10px; }

.security-page { background: radial-gradient(circle at 88% 3%, #f0edff, transparent 28%); }
.security-heading { margin-bottom: 25px; }
.security-heading > div { max-width: 720px; }
.security-heading p { max-width: 680px; line-height: 1.65; }
.security-lock { width: 60px; height: 60px; flex: 0 0 60px; display: grid; place-items: center; border: 1px solid #d9d4ff; border-radius: 19px; background: linear-gradient(145deg, white, #f0edff); color: var(--accent); box-shadow: 0 12px 28px rgba(101, 88, 232, .12); font-size: 30px; font-weight: 850; }
.security-card { padding: 30px; }
.security-center { display: grid; justify-items: center; gap: 12px; padding-block: 48px; text-align: center; }
.security-center h2, .security-step-head h2 { margin: 4px 0 0; }
.security-center > p { max-width: 590px; margin: 0 0 5px; color: var(--muted); line-height: 1.65; }
.security-status-icon { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 20px; background: var(--accent-soft); color: var(--accent); font-size: 28px; font-weight: 850; }
.security-status-icon.error { background: #fff0f1; color: #c83f49; }
.security-status-icon.compact { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 15px; font-size: 20px; }
.security-benefits { display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; margin: 9px 0 8px; }
.security-benefits span { padding: 7px 10px; border-radius: 999px; background: var(--mint-soft); color: #147658; font-size: 11px; font-weight: 750; }
.security-step-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.security-step-head p { max-width: 590px; margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.mfa-enroll-grid { display: grid; grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr); gap: 34px; align-items: start; padding: 28px 0; }
.mfa-qr-wrap { display: grid; justify-items: center; gap: 10px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--soft); }
.mfa-qr { display: block; width: min(240px, 100%); aspect-ratio: 1; border: 10px solid white; border-radius: 12px; background: white; }
.mfa-qr-wrap span { color: var(--muted); font-size: 10px; }
.mfa-enroll-copy ol { margin: 0 0 20px; padding-left: 22px; color: #4f586b; font-size: 13px; line-height: 1.65; }
.mfa-enroll-copy li + li { margin-top: 7px; }
.manual-secret { margin-bottom: 20px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.manual-secret summary { cursor: pointer; color: var(--accent); font-size: 12px; font-weight: 750; }
.manual-secret code { display: block; overflow-wrap: anywhere; margin: 12px 0 10px; padding: 10px; border-radius: 8px; background: white; color: var(--ink); font-size: 12px; line-height: 1.5; user-select: all; }
.btn-small { min-height: 34px; padding: 7px 11px; border-radius: 9px; font-size: 11px; }
.otp-input { text-align: center; letter-spacing: .36em; font-size: 23px !important; font-weight: 850; font-variant-numeric: tabular-nums; }
.mfa-enroll-copy > .text-button { display: block; margin: 12px auto 0; }
.security-warning, .security-success { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; padding: 14px 16px; border-radius: 13px; font-size: 12px; }
.security-warning { border: 1px solid #f5d397; background: #fff9ec; color: #8b5d13; }
.security-success { margin-top: 18px; border: 1px solid #ccebdd; background: #f3fbf8; color: #147658; }
.security-warning::before, .security-success::before { grid-row: 1 / 3; align-self: center; font-size: 18px; }
.security-warning::before { content: "!"; }
.security-success::before { content: "✓"; }
.security-warning span, .security-success span { margin-top: 2px; opacity: .82; font-size: 11px; line-height: 1.5; }
.mfa-challenge-form { max-width: 440px; margin: 28px auto 0; }
.selected-factor { display: grid; gap: 4px; margin-bottom: 19px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.selected-factor span { color: var(--muted); font-size: 10px; }
.selected-factor strong { font-size: 13px; }
.security-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 17px; }
.security-summary { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.security-summary span, .security-summary strong, .security-summary small { display: block; }
.security-summary span { color: var(--muted); font-size: 11px; font-weight: 750; }
.security-summary strong { margin: 5px 0 2px; color: var(--accent); font-size: 25px; letter-spacing: -.5px; }
.security-summary small { color: var(--muted); font-size: 10px; }
.factor-list { display: grid; }
.factor-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 13px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.factor-row:last-child { border-bottom: 0; }
.factor-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-weight: 850; }
.factor-row > div:nth-child(2) strong, .factor-row > div:nth-child(2) span { display: block; }
.factor-row > div:nth-child(2) strong { font-size: 13px; }
.factor-row > div:nth-child(2) span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.factor-required { padding: 7px 9px; border-radius: 9px; background: var(--soft); color: var(--muted); font-size: 10px; font-weight: 750; }

@media (max-width: 760px) {
  .account-chip { display: none; }
  .auth-page { min-height: calc(100vh - 62px); padding: 20px 14px 94px; }
  .auth-shell { grid-template-columns: 1fr; border-radius: 22px; }
  .auth-copy { min-height: 255px; padding: 78px 26px 30px; }
  .auth-brand { left: 24px; top: 24px; }
  .auth-copy h1 { font-size: 30px; }
  .auth-copy > p { margin: 13px 0 0; }
  .auth-points { display: none; }
  .auth-card { padding: 27px 22px 30px; }
  .auth-card h2 { margin-top: 22px; }
  .application-heading { align-items: flex-start; flex-direction: column; }
  .review-promise { width: 100%; flex-basis: auto; }
  .application-layout { grid-template-columns: 1fr; }
  .application-aside { position: static; }
  .application-review-grid { grid-template-columns: 1fr; }
  .application-status-card { padding: 26px 18px; }
  .application-status-card h1 { font-size: 28px; }
  .application-steps { padding: 18px 7px; }
  .application-steps small { display: none; }
  .application-summary { grid-template-columns: 1fr; }
  .application-form { padding: 21px 17px; }
  .account-type-grid { grid-template-columns: 1fr; }
  .security-heading { align-items: flex-start; }
  .security-lock { width: 48px; height: 48px; flex-basis: 48px; border-radius: 15px; font-size: 24px; }
  .security-card { padding: 21px 17px; }
  .security-center { padding-block: 35px; }
  .security-step-head { align-items: flex-start; }
  .mfa-enroll-grid { grid-template-columns: 1fr; gap: 23px; padding-block: 22px; }
  .mfa-qr-wrap { padding: 16px; }
  .mfa-qr { width: min(230px, 100%); }
  .security-warning, .security-success { grid-template-columns: auto 1fr; }
  .security-summary-grid { grid-template-columns: 1fr; gap: 9px; }
  .security-card .panel-heading { align-items: flex-start; flex-direction: column; }
  .security-card .panel-heading .btn { width: 100%; }
  .factor-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; }
  .factor-row .status-pill { grid-column: 2; justify-self: start; }
  .factor-row .btn, .factor-required { grid-column: 3; grid-row: 1 / 3; }
}
