:root {
  --ink: #17211f;
  --muted: #687571;
  --line: #dfe5e2;
  --canvas: #f4f7f5;
  --surface: #ffffff;
  --forest: #18332f;
  --green: #1f6b5b;
  --mint: #dff0e9;
  --blue: #2b5f88;
  --blue-soft: #e3eef6;
  --coral: #b95542;
  --coral-soft: #fae7e1;
  --yellow: #a06b13;
  --yellow-soft: #f7ebc9;
  --danger: #a33a3a;
  --shadow: 0 10px 30px rgba(24, 51, 47, .08);
  --sidebar: 246px;
  font-family: "DM Sans", "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 15px; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, summary { cursor: pointer; }
svg { width: 19px; height: 19px; stroke-width: 1.8; flex: 0 0 auto; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 40; display: flex; flex-direction: column; padding: 22px 14px 18px; background: var(--forest); color: #dce7e3; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 28px; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 7px; background: #f4c95d; color: #20302d; font-weight: 800; font-size: 16px; }
.brand-mark.large { width: 54px; height: 54px; font-size: 21px; }
.brand b { display: block; color: #fff; font-size: 16px; }
.brand small { display: block; margin-top: 1px; color: #90a6a0; font-size: 9px; text-transform: uppercase; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a, .sidebar-footer a, .link-button { min-height: 42px; padding: 0 12px; display: flex; align-items: center; gap: 11px; border-radius: 6px; color: #b8cac5; font-weight: 500; }
.side-nav a:hover, .sidebar-footer a:hover, .link-button:hover { color: #fff; background: rgba(255,255,255,.07); }
.side-nav a.active { background: #2e514a; color: #fff; }
.side-nav a.active svg { color: #f4c95d; }
.nav-label { margin: 24px 12px 7px; color: #6f8982; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.sidebar-footer { margin-top: auto; display: grid; gap: 3px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; }
.sidebar-footer form { margin: 0; }
.link-button { width: 100%; border: 0; background: none; }
.main-column { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { height: 68px; position: sticky; top: 0; z-index: 30; padding: 0 34px; display: flex; align-items: center; gap: 16px; background: rgba(244,247,245,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar-context { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #35a374; box-shadow: 0 0 0 3px #d7eee4; }
.user-menu { margin-left: auto; position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 9px; }
.user-menu summary::-webkit-details-marker { display: none; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #dceae6; color: var(--forest); font-weight: 700; }
.avatar.small { width: 30px; height: 30px; font-size: 12px; }
.user-copy b, .user-copy small { display: block; }
.user-copy b { font-size: 13px; }
.user-copy small { color: var(--muted); font-size: 10px; }
.user-menu summary > svg { width: 15px; }
.dropdown-panel { position: absolute; top: 48px; right: 0; width: 220px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.dropdown-heading { padding: 7px 9px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.dropdown-panel form { margin: 0; }
.dropdown-panel a, .role-option { width: 100%; min-height: 38px; padding: 0 9px; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 5px; background: none; color: var(--ink); text-align: left; }
.dropdown-panel a:hover, .role-option:hover, .role-option.selected { background: var(--canvas); }
.role-option svg { margin-left: auto; color: var(--green); }
.dropdown-divider { border-top: 1px solid var(--line); margin: 6px 0; }
.icon-button.mobile-menu, .mobile-nav { display: none; }
.content { width: min(1440px, 100%); margin: 0 auto; padding: 34px 38px 80px; }
.page-header { min-height: 92px; margin-bottom: 28px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-header h1 { margin: 5px 0 4px; font-size: 30px; line-height: 1.2; letter-spacing: 0; }
.page-header p { margin: 0; color: var(--muted); }
.welcome-header h1 { font-size: 32px; }
.eyebrow { color: var(--green); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0; }
.back-link { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.back-link:hover { color: var(--green); }
.back-link svg { width: 15px; }
.detail-header { align-items: flex-end; }
.header-actions { display: flex; gap: 8px; }
.inline-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 13px; color: var(--muted); font-size: 13px; }
.inline-meta span { display: inline-flex; align-items: center; gap: 6px; }
.inline-meta svg { width: 16px; }
.button { min-height: 40px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 6px; font-weight: 650; white-space: nowrap; transition: .15s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--green); color: #fff; box-shadow: 0 5px 14px rgba(31,107,91,.18); }
.button.primary:hover { background: #175849; }
.button.secondary { border-color: var(--line); background: #fff; color: var(--ink); }
.button.secondary:hover { border-color: #b9c8c3; }
.button.wide { width: 100%; }
.button.tiny { min-height: 32px; padding: 0 10px; border-color: var(--line); background: #fff; font-size: 12px; }
.button.disabled { opacity: .48; }
.icon-button { width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); }
.icon-button:hover { color: var(--green); border-color: #b4c9c2; }
.message-stack { display: grid; gap: 8px; margin-bottom: 20px; }
.message { min-height: 46px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; border: 1px solid #efcfca; border-radius: 6px; background: #fff4f2; color: #8b3b31; }
.message.success { border-color: #c9e4d8; background: #edf8f3; color: #245f4f; }
.message.warning { border-color: #ead9ac; background: #fff9e9; color: #765317; }
.message span { flex: 1; }
.message button { border: 0; background: none; color: inherit; }
.message button svg { width: 16px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.metric { min-width: 0; min-height: 104px; padding: 22px; display: flex; align-items: center; gap: 14px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 7px; }
.metric-icon.green { background: var(--mint); color: var(--green); }
.metric-icon.blue { background: var(--blue-soft); color: var(--blue); }
.metric-icon.coral { background: var(--coral-soft); color: var(--coral); }
.metric-icon.yellow { background: var(--yellow-soft); color: var(--yellow); }
.metric small, .metric strong { display: block; }
.metric small { margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.metric strong { font-size: 25px; line-height: 1; }
.metric strong.metric-text { max-width: 128px; overflow: hidden; font-size: 14px; line-height: 1.2; text-overflow: ellipsis; }
.section-block { margin-top: 34px; }
.section-heading { min-height: 44px; margin-bottom: 13px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-heading h2 { margin: 0 0 3px; font-size: 17px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.section-heading > a { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-size: 12px; font-weight: 650; }
.section-heading > a svg { width: 15px; }
.balance-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.balance-card { padding: 17px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.balance-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.balance-top svg { width: 17px; color: var(--green); }
.balance-card > strong { display: block; margin: 11px 0 8px; font-size: 27px; }
.balance-card > strong small { color: var(--muted); font-size: 13px; }
.balance-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.progress { height: 4px; margin-top: 12px; border-radius: 2px; background: #e8edeb; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--green); }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, .7fr); gap: 24px; }
.timeline-list, .lesson-list, .plan-list { border-top: 1px solid var(--line); }
.timeline-item { min-height: 76px; display: grid; grid-template-columns: 47px 12px minmax(0, 1fr) 20px; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); }
.timeline-item:hover, .lesson-list > a:hover, .plan-list > a:hover { background: rgba(255,255,255,.55); }
.timeline-item time { text-align: center; }
.timeline-item time strong, .timeline-item time span { display: block; }
.timeline-item time strong { font-size: 12px; }
.timeline-item time span { color: var(--green); font-size: 11px; }
.timeline-dot { width: 8px; height: 8px; border: 2px solid #8db7aa; border-radius: 50%; }
.timeline-item div { min-width: 0; }
.timeline-item div strong, .timeline-item div span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-item div strong { font-size: 13px; }
.timeline-item div span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.timeline-item > svg { width: 16px; color: #9aa7a3; }
.attention-panel { align-self: start; margin-top: 34px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.attention-panel .section-heading { margin-bottom: 5px; }
.attention-panel > a { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.attention-panel > a:last-child { border-bottom: 0; }
.attention-panel a b, .attention-panel a small { display: block; }
.attention-panel a b { font-size: 12px; }
.attention-panel a small { color: var(--muted); font-size: 10px; }
.attention-panel a svg { width: 16px; color: var(--coral); }
.empty-state { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); text-align: center; }
.empty-state.wide { grid-column: 1/-1; min-height: 280px; border: 1px dashed #c8d3cf; border-radius: 8px; }
.empty-state svg { width: 30px; height: 30px; color: #91a39e; }
.empty-state strong { color: var(--ink); }
.empty-state span { font-size: 12px; }
.compact-empty { min-height: 100px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 12px; }
.compact-empty svg { color: var(--green); }
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.course-card { position: relative; min-height: 218px; padding: 22px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; transition: .15s ease; }
.course-card:hover { transform: translateY(-2px); border-color: #bdcbc7; box-shadow: var(--shadow); }
.course-accent { position: absolute; inset: 0 0 auto; height: 4px; background: var(--green); }
.course-card:nth-child(3n+2) .course-accent { background: var(--blue); }
.course-card:nth-child(3n+3) .course-accent { background: var(--coral); }
.course-card-top { display: flex; gap: 6px; }
.tag, .status { min-height: 23px; padding: 3px 8px; display: inline-flex; align-items: center; border-radius: 4px; background: var(--mint); color: var(--green); font-size: 10px; font-style: normal; font-weight: 650; white-space: nowrap; }
.tag.muted { background: #eef1f0; color: var(--muted); }
.tag.danger { background: var(--coral-soft); color: var(--danger); }
.tag-row { display: flex; flex-wrap: wrap; gap: 4px; }
.course-card h2 { margin: 18px 0 7px; font-size: 17px; line-height: 1.45; }
.course-card > p { margin: 0; color: var(--muted); font-size: 12px; }
.course-card-bottom { margin-top: auto; padding-top: 18px; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; border-top: 1px solid var(--line); }
.course-card-bottom > svg { margin-left: auto; width: 16px; }
.avatar-stack { display: flex; }
.avatar-stack i { width: 25px; height: 25px; margin-right: -6px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; background: #dceae6; color: var(--green); font-size: 9px; font-style: normal; font-weight: 700; }
.tab-row { margin: -5px 0 25px; display: flex; gap: 24px; border-bottom: 1px solid var(--line); }
.tab-row a { padding: 12px 2px; color: var(--muted); font-size: 12px; font-weight: 600; border-bottom: 2px solid transparent; }
.tab-row a:hover { color: var(--green); border-bottom-color: var(--green); }
.table-wrap { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { height: 42px; padding: 0 17px; background: #f8faf9; color: var(--muted); font-size: 10px; text-align: left; text-transform: uppercase; }
td { min-height: 58px; padding: 12px 17px; border-top: 1px solid var(--line); font-size: 12px; }
.person-cell { display: flex; align-items: center; gap: 9px; }
.person-cell > i { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-style: normal; font-weight: 700; }
.person-cell b, .person-cell small { display: block; }
.person-cell small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.empty-cell { height: 120px; color: var(--muted); text-align: center; }
.lesson-list > a, .plan-list > a { min-height: 68px; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto 18px; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.lesson-list time { padding-left: 5px; }
.lesson-list time b, .lesson-list time span, .lesson-list a > div b, .lesson-list a > div span, .plan-list a > div b, .plan-list a > div span { display: block; }
.lesson-list time b { font-size: 12px; }
.lesson-list time span { color: var(--green); font-size: 11px; }
.lesson-list a > div, .plan-list a > div { min-width: 0; }
.lesson-list a > div b, .plan-list a > div b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.lesson-list a > div span, .plan-list a > div span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.lesson-list a > svg, .plan-list a > svg { width: 15px; color: var(--muted); }
.status.scheduled, .status.draft { background: var(--blue-soft); color: var(--blue); }
.status.completed, .status.final { background: var(--mint); color: var(--green); }
.status.cancelled { background: #ededed; color: #777; }
.plan-list > a { grid-template-columns: 38px minmax(0, 1fr) auto 18px; }
.plan-icon, .subject-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; background: var(--yellow-soft); color: var(--yellow); }
.plan-icon svg, .subject-icon svg { width: 17px; }
.form-surface { width: min(780px, 100%); padding: 26px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.model-form > p { margin: 0 0 19px; }
.model-form label { margin-bottom: 7px; display: block; font-size: 12px; font-weight: 650; }
.helptext { margin-top: 5px; display: block; color: var(--muted); font-size: 10px; }
.errorlist { margin: 5px 0; padding: 0; list-style: none; color: var(--danger); font-size: 11px; }
.form-control { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #cfd9d5; border-radius: 5px; outline: 0; background: #fff; color: var(--ink); }
.form-control:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,107,91,.1); }
textarea.form-control { resize: vertical; line-height: 1.55; }
select[multiple].form-control { min-height: 130px; }
.model-form p:has(.form-check), .schedule-form p:has(ul) { padding: 13px; border: 1px solid var(--line); border-radius: 6px; background: #f9fbfa; }
.form-check { accent-color: var(--green); }
input[type="checkbox"].form-control,
input[type="checkbox"].form-check { width: 17px; height: 17px; min-height: 0; padding: 0; flex: 0 0 auto; accent-color: var(--green); box-shadow: none; }
.model-form > div.form-control { min-height: 0; padding: 8px; display: flex; flex-wrap: wrap; gap: 7px; background: #f9fbfa; }
.model-form > div.form-control > div { min-width: 0; }
.model-form > div.form-control label { min-height: 34px; margin: 0; padding: 0 10px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 5px; background: #fff; font-weight: 500; }
.model-form ul { margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; list-style: none; }
.model-form ul li label { min-height: 34px; margin: 0; padding: 0 11px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 5px; background: #fff; font-weight: 500; }
.form-actions { margin-top: 28px; padding-top: 18px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
.schedule-layout { display: grid; grid-template-columns: minmax(0, 780px) minmax(230px, 320px); gap: 20px; align-items: start; }
.rule-panel { padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.rule-panel > svg { width: 30px; height: 30px; color: var(--green); }
.rule-panel h2 { margin: 17px 0 10px; font-size: 17px; }
.rule-panel ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 2; }
.lesson-detail-grid { display: grid; grid-template-columns: .65fr 1.35fr; gap: 26px; }
.lesson-detail-grid .section-block { margin-top: 0; }
.people-grid { display: grid; gap: 8px; }
.person-chip { min-height: 52px; padding: 8px 10px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.person-chip > i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--mint); color: var(--green); font-size: 11px; font-style: normal; font-weight: 700; }
.person-chip b, .person-chip small { display: block; }
.person-chip b { font-size: 12px; }
.person-chip small { color: var(--muted); font-size: 10px; }
.feedback-block article { padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.feedback-block h3 { margin: 22px 0 6px; color: var(--green); font-size: 11px; text-transform: uppercase; }
.feedback-block h3:first-child { margin-top: 0; }
.feedback-block p { margin: 0; line-height: 1.7; }
.calendar-feed-note { padding: 14px 17px; display: flex; gap: 12px; border: 1px solid #bdd9cf; border-radius: 7px; background: #edf7f3; color: var(--green); }
.calendar-feed-note b, .calendar-feed-note span { display: block; }
.calendar-feed-note b { font-size: 12px; }
.calendar-feed-note span { margin-top: 3px; font-size: 11px; }
.agenda { margin-top: 26px; }
.agenda > section { display: grid; grid-template-columns: 110px minmax(0, 1fr); border-top: 1px solid var(--line); }
.agenda > section > header { padding: 18px 14px 18px 0; }
.agenda > section > header strong, .agenda > section > header span { display: block; }
.agenda > section > header span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.agenda > section > div { border-left: 1px solid var(--line); }
.agenda a { min-height: 70px; padding: 12px 0 12px 18px; display: grid; grid-template-columns: 48px 9px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.agenda a > time { font-size: 12px; font-weight: 700; }
.agenda a > i { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.agenda a span { min-width: 0; }
.agenda a b, .agenda a small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda a b { font-size: 12px; }
.agenda a small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.plan-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(310px, .75fr); gap: 22px; align-items: start; }
.markdown-surface { min-height: 600px; padding: 38px 44px; border: 1px solid var(--line); border-radius: 8px; background: #fff; line-height: 1.75; }
.markdown-surface h1 { margin: 0 0 24px; font-size: 27px; }
.markdown-surface h2 { margin: 30px 0 12px; font-size: 19px; color: var(--green); }
.markdown-surface h3 { margin-top: 24px; font-size: 15px; }
.markdown-surface blockquote { margin: 18px 0; padding: 8px 16px; border-left: 3px solid var(--yellow); background: #fffaf0; color: #665125; }
.markdown-surface code { padding: 2px 5px; border-radius: 3px; background: #eef2f0; }
.markdown-surface table { margin: 18px 0; }
.discussion { padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.comment-list { max-height: 410px; overflow: auto; }
.comment { padding: 13px 0; display: flex; gap: 9px; border-bottom: 1px solid var(--line); }
.comment > div { min-width: 0; flex: 1; }
.comment b { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; }
.comment time { color: var(--muted); font-size: 9px; font-weight: 400; }
.comment p { margin: 6px 0 0; font-size: 12px; line-height: 1.5; }
.comment-form { margin-top: 15px; }
.comment-form textarea { width: 100%; min-height: 86px; padding: 10px; border: 1px solid var(--line); border-radius: 5px; resize: vertical; }
.comment-form button { margin: 8px 0 0 auto; display: flex; }
.version-history { margin-top: 19px; padding-top: 15px; border-top: 1px solid var(--line); }
.version-history summary { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 650; }
.version-history summary svg { width: 16px; }
.version-history > div { padding: 10px 0 0 23px; }
.version-history b, .version-history span { display: block; }
.version-history b { font-size: 10px; }
.version-history span { color: var(--muted); font-size: 9px; }
.search-bar { margin-bottom: 15px; padding: 9px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.search-bar > svg { margin-left: 6px; color: var(--muted); }
.search-bar input { flex: 1; min-width: 0; border: 0; outline: 0; }
.signin-icons { display: flex; gap: 8px; color: var(--green); }
.signin-icons svg { width: 16px; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 22px; align-items: start; }
.settings-grid .form-surface { width: 100%; }
.subject-admin, .subscription-panel { padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.subject-account-list { display: grid; gap: 7px; }
.subject-account { min-height: 58px; padding: 9px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 38px; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 6px; }
.subject-account.disabled { opacity: .48; }
.subject-account b, .subject-account span { display: block; }
.subject-account b { font-size: 12px; }
.subject-account span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.subject-account form { margin: 0; }
.inline-add-form { margin-top: 18px; padding-top: 17px; display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 8px; border-top: 1px solid var(--line); }
.inline-add-form label { margin-bottom: 5px; display: block; font-size: 10px; font-weight: 650; }
.semester-list > div { margin-bottom: 26px; }
.semester-list h2 { margin: 0 0 9px; font-size: 20px; }
.season-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.season-row article { min-height: 76px; padding: 13px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.season-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 6px; }
.season-spring { background: var(--mint); color: var(--green); }
.season-summer { background: var(--yellow-soft); color: var(--yellow); }
.season-fall { background: var(--coral-soft); color: var(--coral); }
.season-winter { background: var(--blue-soft); color: var(--blue); }
.season-row b, .season-row article div span { display: block; }
.season-row b { font-size: 12px; }
.season-row article div span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.compact-form { position: sticky; top: 90px; }
.subscription-panel > .panel-icon, .decision-panel > .panel-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 7px; background: var(--blue-soft); color: var(--blue); }
.subscription-panel h2 { margin: 18px 0 7px; font-size: 18px; }
.subscription-panel > p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.copy-field { margin: 17px 0 12px; display: flex; }
.copy-field input { min-width: 0; flex: 1; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px 0 0 5px; background: #f8faf9; color: var(--muted); font-size: 10px; }
.copy-field button { border-radius: 0 5px 5px 0; }
.danger-button { border-color: #efcbc5; background: #fff; color: var(--danger); }
.panel-divider { margin: 22px 0; border-top: 1px solid var(--line); }
.decision-wrap { min-height: calc(100vh - 170px); display: grid; place-items: center; }
.decision-panel { width: min(600px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.decision-panel .eyebrow { display: block; margin-top: 24px; }
.decision-panel h1 { margin: 7px 0 9px; font-size: 28px; }
.decision-panel > p { margin: 0; color: var(--muted); line-height: 1.65; }
.timezone-compare { margin: 26px 0; padding: 18px; display: grid; grid-template-columns: 1fr 26px 1fr; align-items: center; gap: 10px; border-radius: 7px; background: var(--canvas); }
.timezone-compare small, .timezone-compare strong { display: block; }
.timezone-compare small { margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.timezone-compare strong { overflow-wrap: anywhere; font-size: 14px; }
.timezone-compare svg { width: 18px; color: var(--muted); }
.decision-actions { display: flex; justify-content: flex-end; gap: 8px; }

.login-body { min-height: 100vh; background: #fff; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .95fr) minmax(500px, 1.05fr); }
.login-brand-panel { min-height: 100vh; padding: 48px 54px; display: flex; flex-direction: column; background: var(--forest); color: #fff; }
.login-brand { display: flex; align-items: center; gap: 13px; }
.login-brand b, .login-brand small { display: block; }
.login-brand b { font-size: 20px; }
.login-brand small { margin-top: 2px; color: #8fa9a2; font-size: 10px; text-transform: uppercase; }
.brand-statement { margin: auto 0; }
.brand-statement .eyebrow { color: #f4c95d; }
.brand-statement h1 { margin: 16px 0 20px; font-size: 52px; line-height: 1.08; letter-spacing: 0; }
.brand-statement p { max-width: 430px; color: #a9beb8; font-size: 16px; line-height: 1.7; }
.brand-foot { display: flex; justify-content: space-between; color: #789089; font-size: 10px; text-transform: uppercase; }
.login-main { position: relative; display: grid; place-items: center; padding: 60px 40px; }
.language-switch { position: absolute; top: 30px; right: 35px; display: flex; gap: 6px; color: var(--muted); font-size: 11px; }
.language-switch a:hover { color: var(--green); }
.login-box { width: min(410px, 100%); }
.mobile-login-brand { display: none; }
.login-box h2 { margin: 0 0 7px; font-size: 30px; }
.subtle { margin: 0 0 26px; color: var(--muted); }
.microsoft-button { width: 100%; border-color: #cbd6d2; background: #fff; color: var(--ink); }
.microsoft-button:hover { border-color: #92aaa3; }
.ms-grid { width: 17px; height: 17px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.ms-grid i:nth-child(1) { background: #f35325; }.ms-grid i:nth-child(2) { background: #81bc06; }.ms-grid i:nth-child(3) { background: #05a6f0; }.ms-grid i:nth-child(4) { background: #ffba08; }
.divider { margin: 23px 0; display: flex; align-items: center; gap: 12px; color: #8b9693; font-size: 10px; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.stacked-form { display: grid; gap: 16px; }
.stacked-form label { display: grid; gap: 7px; font-size: 11px; font-weight: 650; }
.stacked-form .button { margin-top: 4px; }
.login-help { margin: 22px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.login-box .message { margin-bottom: 16px; }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .balance-grid { grid-template-columns: repeat(2, 1fr); }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
  .compact-form { position: static; }
  .login-brand-panel { padding: 42px; }
  .brand-statement h1 { font-size: 43px; }
}

@media (max-width: 820px) {
  :root { --sidebar: 232px; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .sidebar.open { display: flex; box-shadow: 0 0 0 100vmax rgba(0,0,0,.38); clip-path: inset(0 -100vmax 0 0); }
  .main-column { margin-left: 0; }
  .topbar { height: 60px; padding: 0 16px; }
  .icon-button.mobile-menu { display: inline-grid; }
  .topbar-context { display: none; }
  .user-copy { display: none; }
  .content { padding: 23px 16px 45px; }
  .mobile-nav { position: fixed; z-index: 35; inset: auto 0 0; height: calc(62px + env(safe-area-inset-bottom)); padding: 6px 12px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); backdrop-filter: blur(10px); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 9px; }
  .mobile-nav a.active { color: var(--green); }
  .mobile-nav svg { width: 20px; height: 20px; }
  .page-header { min-height: 0; margin-bottom: 22px; align-items: flex-start; }
  .page-header h1, .welcome-header h1 { font-size: 25px; }
  .page-header > .button { min-width: 40px; padding: 0 10px; }
  .detail-header { flex-direction: column; }
  .header-actions { width: 100%; }
  .header-actions .button { flex: 1; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { min-height: 88px; padding: 14px; gap: 9px; }
  .metric-icon { width: 35px; height: 35px; }
  .metric-icon svg { width: 17px; }
  .metric strong { font-size: 21px; }
  .metric strong.metric-text { font-size: 11px; }
  .balance-grid { display: flex; margin-right: -16px; padding-right: 16px; overflow-x: auto; scroll-snap-type: x mandatory; }
  .balance-card { min-width: 230px; scroll-snap-align: start; }
  .dashboard-columns { grid-template-columns: 1fr; }
  .attention-panel { margin-top: 0; }
  .course-grid { grid-template-columns: 1fr; }
  .course-card { min-height: 195px; }
  .tab-row { gap: 15px; overflow-x: auto; }
  .tab-row a { white-space: nowrap; }
  .table-wrap { margin-right: -16px; border-right: 0; border-radius: 7px 0 0 7px; }
  table { min-width: 650px; }
  .account-table table { min-width: 800px; }
  .lesson-list > a { grid-template-columns: 48px minmax(0, 1fr) 16px; }
  .lesson-list .status { display: none; }
  .form-surface { padding: 18px; }
  .schedule-layout, .lesson-detail-grid, .plan-layout { grid-template-columns: 1fr; }
  .rule-panel { order: -1; }
  .rule-panel ul { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
  .markdown-surface { min-height: 0; padding: 24px 20px; }
  .discussion { padding: 16px; }
  .agenda > section { grid-template-columns: 70px minmax(0, 1fr); }
  .agenda a { grid-template-columns: 42px 8px minmax(0, 1fr); }
  .agenda a .status { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .inline-add-form { grid-template-columns: 1fr; }
  .season-row { grid-template-columns: 1fr; }
  .login-layout { display: block; }
  .login-brand-panel { display: none; }
  .login-main { min-height: 100vh; padding: 75px 22px 40px; }
  .mobile-login-brand { margin-bottom: 42px; display: flex; align-items: center; gap: 10px; }
  .login-box h2 { font-size: 26px; }
}

@media (max-width: 480px) {
  .page-header { gap: 12px; }
  .page-header p { font-size: 12px; }
  .page-header > .button span { display: none; }
  .metric { padding: 12px 10px; }
  .metric-icon { display: none; }
  .metric strong.metric-text { max-width: 100px; }
  .timeline-item { grid-template-columns: 42px 8px minmax(0, 1fr) 14px; gap: 7px; }
  .section-heading { align-items: flex-start; }
  .rule-panel ul { grid-template-columns: 1fr; }
  .model-form > div.form-control { display: grid; grid-template-columns: 1fr; }
  .lesson-detail-grid { gap: 12px; }
  .agenda > section { grid-template-columns: 58px minmax(0, 1fr); }
  .agenda > section > header { padding-right: 6px; }
  .agenda a { padding-left: 10px; grid-template-columns: 38px 7px minmax(0, 1fr); gap: 6px; }
  .subject-account { grid-template-columns: 34px minmax(0, 1fr) 36px; }
  .subject-account .button { display: none; }
  .timezone-compare { padding: 13px; grid-template-columns: 1fr; }
  .timezone-compare > svg { transform: rotate(90deg); }
  .decision-panel { padding: 24px 18px; }
  .decision-actions { flex-direction: column-reverse; }
  .decision-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
