@charset "UTF-8";

:root {
  color-scheme: light;
  --canvas: #f5f4f0;
  --surface: #ffffff;
  --surface-soft: #faf9f6;
  --ink: #213149;
  --ink-strong: #13243c;
  --muted: #6d7785;
  --line: #e4e7e9;
  --line-strong: #cdd4dc;
  --navy: #142c49;
  --navy-light: #223f5e;
  --blue: #285fc6;
  --blue-hover: #204ea7;
  --blue-soft: #edf3fe;
  --green: #267656;
  --green-soft: #edf7f1;
  --amber: #996619;
  --amber-soft: #fff6e5;
  --red: #b84446;
  --red-soft: #fdf0ef;
  --radius: 14px;
  --shadow: 0 3px 18px rgb(19 36 60 / 4%);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #84afff; outline-offset: 3px; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; opacity: .55; }
button:disabled { transform: none !important; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { color: var(--ink-strong); line-height: 1.35; }
h1 { font-size: 28px; letter-spacing: -.65px; font-weight: 750; }
h2 { font-size: 18px; letter-spacing: -.25px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 650; }
svg { vertical-align: middle; flex-shrink: 0; }
hr { margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
::selection { color: var(--ink-strong); background: #dce8ff; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.small-text, .help-text { font-size: 12px; line-height: 1.65; }
.help-text { margin-top: 7px; color: var(--muted); }
.break-word { overflow-wrap: anywhere; word-break: normal; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.section-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin: 4px 0 16px; font-size: 15px; }
.nowrap { white-space: nowrap; }

/* A quiet, permanent navigation rail. */
.shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 238px; padding: 30px 18px 20px; background: var(--navy); color: #e5ecf6; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 12px; margin-bottom: 38px; color: #fff; font-size: 18px; font-weight: 700; line-height: 1.3; letter-spacing: .2px; }
.brand small { display: block; margin-top: 7px; color: #9eafc5; font-size: 10px; font-weight: 450; letter-spacing: 1.7px; text-transform: uppercase; }
.brand strong { font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 38px; width: 38px; height: 42px; border: 1px solid #6b86a655; border-radius: 10px; color: #f0d9b0; background: #ffffff09; font-size: 22px; font-weight: 600; }
.sidebar nav { display: flex; flex-direction: column; gap: 7px; }
.sidebar .nav-label { margin: 0 0 12px; padding: 0 15px; color: #7e95af; font-size: 10px; letter-spacing: 1.2px; }
.nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; font-size: 19px; line-height: 1; }
.nav-button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 45px; padding: 11px 15px; border: 0; border-radius: 9px; background: transparent; color: #b5c4d6; text-align: left; font-size: 14px; font-weight: 500; transition: background .16s, color .16s; }
.nav-button:hover { background: #ffffff0c; color: #fff; }
.nav-button.active, .nav-button[aria-current="page"] { background: #ffffff12; color: #fff; box-shadow: inset 3px 0 0 #c9b38b; }
.nav-button svg { width: 19px; height: 19px; opacity: .9; }
.sidebar-footer { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 22px 5px 0; border-top: 1px solid #ffffff13; color: #9eafc5; font-size: 12px; }
.sidebar-footer p + p { margin-top: 5px; }
.sidebar-footer .btn { flex-shrink: 0; margin-top: 0; padding-right: 7px; padding-left: 7px; color: #c5d1df; border-color: #ffffff24; background: transparent; }
.sidebar-footer .btn:hover { background: #ffffff0d; }
.user-avatar { display: flex; align-items: center; justify-content: center; flex: 0 0 33px; width: 33px; height: 33px; border-radius: 9px; background: #ffffff15; color: #d5e0ed; font-size: 14px; }
.user-info { flex: 1; min-width: 0; }
.user-info strong { display: block; overflow: hidden; color: #edf2f8; font-size: 12px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.user-info small { display: block; margin-top: 2px; color: #91a6be; font-size: 10px; }
.main { min-height: 100vh; margin-left: 238px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 77px; padding: 18px 38px; background: #ffffffaa; border-bottom: 1px solid var(--line); }
.topbar > :first-child { color: var(--muted); font-size: 13px; }
.topbar strong { color: var(--ink); font-weight: 600; }
.topbar-context { color: #8390a1; }
.topbar-divider { margin: 0 13px; color: #c6cdd5; }
.topbar .actions { justify-content: flex-end; }
.mobile-nav { display: none; }
.page { width: 100%; max-width: 1440px; padding: 35px 38px 55px; margin: 0 auto; animation: page-enter .18s ease-out; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.eyebrow { margin-bottom: 8px; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: 2px; text-transform: uppercase; }
.subtitle { margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.page-heading .actions { flex-shrink: 0; padding-bottom: 3px; }

/* Buttons and form controls are self-contained; no network assets. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 550; line-height: 1.5; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s, box-shadow .15s, transform .15s; }
.btn:hover { border-color: #acb8c7; background: #f8f9fb; text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { color: #fff; border-color: var(--blue); background: var(--blue); box-shadow: 0 2px 4px #285fc616; }
.btn.primary:hover { border-color: var(--blue-hover); background: var(--blue-hover); }
.btn.secondary { color: var(--ink); background: #fff; }
.btn.danger { color: var(--red); border-color: #f0ccca; background: #fff; }
.btn.danger:hover { border-color: #dfaaaa; background: var(--red-soft); }
.btn.ghost { color: var(--muted); border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { color: var(--ink-strong); background: #edf0f4; }
.btn.small { min-height: 31px; padding: 5px 10px; font-size: 12px; }
.btn.icon { width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 7px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .field-label { color: var(--ink); font-size: 13px; font-weight: 550; }
.field > label span { color: var(--muted); font-size: 12px; font-weight: 400; }
.input, .select, .textarea, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea { width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink-strong); font-size: 13px; line-height: 1.55; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #9199a5; }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus { border-color: #7196d3; outline: none; box-shadow: 0 0 0 3px #285fc612; }
input:disabled, select:disabled, textarea:disabled { background: #f3f4f6; }
input[type="file"] { padding: 6px; cursor: pointer; }
input[type="file"]::file-selector-button { margin-right: 12px; padding: 5px 10px; border: 0; border-radius: 5px; background: #eef2f8; color: var(--ink); font: inherit; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); cursor: pointer; }
textarea, .textarea { min-height: 104px; resize: vertical; }
select { cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid > .full-width, .form-grid > .wide { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.checkbox-row { display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: 13px; }
.checkbox-row label { cursor: pointer; }
.member-choices { display: flex; flex-direction: column; gap: 12px; max-height: 280px; overflow-y: auto; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.toolbar .actions { flex-shrink: 0; }
.page > .inline-note, .preparation-banner { margin-bottom: 20px; }
.preparation-banner .card-header { border-bottom: 0; flex-wrap: wrap; }
.toolbar select { width: auto; min-width: 130px; }
.search-field { position: relative; display: flex; align-items: stretch; gap: 8px; flex: 1 1 230px; min-width: 0; max-width: 420px; }
.search-field input { flex: 1; min-width: 0; width: 100%; }
.search-field > .btn { flex: 0 0 auto; }
.search-field > svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.search-field:has(> svg) input { padding-left: 37px; }

/* Content panels. */
.card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 21px 24px; border-bottom: 1px solid var(--line); }
.card-header h2, .card-header h3 { font-size: 16px; }
.card-header .subtitle { margin-top: 4px; font-size: 12px; }
.card-content { padding: 24px; }
.card-content > h3 + p { margin-top: 8px; }
.card-content > p + p { margin-top: 10px; }
.card-content > h3 ~ .actions { margin-top: 18px; }
.card-content > p + .stack, .card-content > p + .btn { margin-top: 18px; }
.card-content > .table-wrap:first-child:last-child { margin: -24px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; gap: 22px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat-card { display: flex; flex-direction: column; min-width: 0; padding: 21px 23px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); }
.stat-value { color: var(--ink-strong); font-size: 30px; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.stat-label { margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.stat-card > .small-text { margin-top: 9px; }
.stat-card .stat-value small { margin-left: 5px; color: var(--muted); font-size: 13px; font-weight: 400; letter-spacing: 0; }
.hero { position: relative; overflow: hidden; margin-bottom: 26px; padding: 30px 32px; border: 1px solid #274562; border-radius: var(--radius); background: linear-gradient(112deg, #172f4c, #244561); color: #fff; box-shadow: 0 5px 20px #142c490c; }
.hero::after { position: absolute; top: -80px; right: -40px; width: 290px; height: 290px; border: 1px solid #ffffff0c; border-radius: 50%; content: ""; pointer-events: none; }
.hero h1, .hero h2, .hero h3 { position: relative; color: #fff; }
.hero h2 { max-width: 830px; font-size: 24px; line-height: 1.5; }
.hero > h2 + p { margin-top: 10px; color: #ceddeb; }
.hero-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.hero-top .eyebrow { margin-bottom: 0; }
.hero .hero-presenter { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 15px; color: #d8e4ef; font-size: 13px; }
.hero-presenter > span { padding-left: 14px; border-left: 1px solid #ffffff24; color: #a9bfd4; font-size: 12px; }
.hero-presenter > span:empty { display: none; }
.hero .eyebrow { color: #b8c9dc; }
.hero .subtitle, .hero .muted { color: #b8c9dc; }
.hero .badge { background: #ffffff12; color: #e1ecf7; border-color: #ffffff18; }
.hero .actions { position: relative; margin-top: 21px; }
.hero .btn.secondary { border-color: #ffffff22; background: #ffffff12; color: #fff; }
.hero .btn.secondary:hover { background: #ffffff20; }
.hero-meta { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; margin-top: 17px; color: #d3e0ef; font-size: 13px; }
.hero-meta > span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta svg { width: 15px; height: 15px; }
.card .hero-meta { margin-top: 12px; margin-bottom: 19px; color: #687b91; }
.inline-note { padding: 13px 16px; border: 1px solid #e1e7ef; border-radius: 9px; background: #f6f8fb; color: #596b80; font-size: 12px; line-height: 1.8; }
.alert { padding: 13px 16px; border: 1px solid #f0ceca; border-radius: 9px; background: var(--red-soft); color: #9b353a; font-size: 13px; line-height: 1.7; }
.alert.info { border-color: #d1dff6; background: var(--blue-soft); color: #305ea4; }
.alert.success { border-color: #cde7d9; background: var(--green-soft); color: var(--green); }
.alert.warning { border-color: #f0dfba; background: var(--amber-soft); color: var(--amber); }

/* Tables stay legible and can scroll independently on small screens. */
.table-wrap { width: 100%; overflow: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.table th { padding: 13px 18px; border-bottom: 1px solid var(--line); background: var(--surface-soft); color: #758091; font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.table td { padding: 17px 18px; border-bottom: 1px solid #edf0f2; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfcfe; }
.table th:first-child, .table td:first-child { padding-left: 24px; }
.table th:last-child, .table td:last-child { padding-right: 24px; }
.table td .actions { flex-wrap: nowrap; gap: 6px; }
.table td .muted { font-size: 12px; }
.table small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.table-paper { max-width: 430px; min-width: 165px; margin-top: 5px; color: #64758a; font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; }
.table-paper + p { max-width: 430px; overflow-wrap: anywhere; }
.table td .table-actions { flex-wrap: wrap; min-width: 180px; max-width: 290px; }
.table td strong + .badge { margin-left: 7px; }
.operation-col { min-width: 215px; }
.table td > .small-text { margin-top: 3px; }
.table td strong { color: var(--ink-strong); font-weight: 600; }
.badge { display: inline-flex; align-items: center; justify-content: center; gap: 5px; max-width: 100%; padding: 3px 8px; border: 1px solid transparent; border-radius: 5px; font-size: 11px; font-weight: 550; line-height: 1.65; white-space: nowrap; }
.badge.tone-muted { background: #f0f2f5; color: #718091; }
.badge.tone-blue { background: var(--blue-soft); color: #3568b7; }
.badge.tone-green { background: var(--green-soft); color: var(--green); }
.badge.tone-amber { background: var(--amber-soft); color: var(--amber); }
.badge.tone-red { background: var(--red-soft); color: var(--red); }
.tabs { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 23px; padding-bottom: 1px; border-bottom: 1px solid var(--line); }
.tab-button { padding: 11px 18px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 13px; line-height: 1.55; font-weight: 500; transition: color .15s, border-color .15s; }
.tab-button:hover { color: var(--ink-strong); }
.tab-button.active { border-bottom-color: var(--blue); color: var(--blue); font-weight: 600; }

/* Paper and schedule lists. */
.paper-list { display: flex; flex-direction: column; gap: 13px; }
.paper-card { display: flex; align-items: center; gap: 20px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.paper-card:hover { border-color: #cbd5e2; box-shadow: 0 4px 18px #20385b08; }
.paper-body { flex: 1; min-width: 0; }
.paper-top { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; margin-bottom: 9px; }
.paper-title { color: var(--ink-strong); font-size: 15px; font-weight: 600; line-height: 1.65; overflow-wrap: anywhere; }
.paper-title a { color: inherit; }
.paper-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 13px; margin-top: 7px; color: var(--muted); font-size: 12px; }
.paper-body > p.muted { margin-top: 9px; font-size: 12px; line-height: 1.75; }
.paper-body > .small-text { margin-top: 8px; }
.paper-actions { display: flex; align-items: center; justify-content: flex-end; flex: 0 0 auto; flex-wrap: wrap; gap: 7px; }
.session-list { display: flex; flex-direction: column; }
.session-row { display: flex; align-items: center; gap: 16px; padding: 19px 0; border-bottom: 1px solid var(--line); }
.session-row:first-child { padding-top: 0; }
.session-row:last-child { padding-bottom: 0; border-bottom: 0; }
.position { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 33px; width: 33px; height: 33px; border-radius: 8px; background: #f0f3f8; color: #627993; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.session-row.active .position { background: var(--blue-soft); color: var(--blue); }
.session-row.completed .position { background: var(--green-soft); color: var(--green); }
.session-info { flex: 1; min-width: 0; }
.session-info strong { color: var(--ink-strong); font-weight: 600; }
.session-info p { margin-top: 4px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.session-info .badge { margin-left: 8px; vertical-align: middle; }
.session-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.date-label { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Loading, empty, and error states. */
.empty-state { display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 10px; min-height: 220px; padding: 40px 24px; text-align: center; }
.empty-state h2, .empty-state h3 { margin-top: 4px; font-size: 16px; }
.empty-state p { max-width: 380px; color: var(--muted); font-size: 13px; }
.empty-state .actions, .empty-state > .btn { margin-top: 8px; }
.empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 51px; height: 51px; border: 1px solid #e4e9ef; border-radius: 14px; background: #f6f8fb; color: #879bb3; font-size: 24px; }
.empty-icon svg { width: 24px; height: 24px; }
.error-state { padding: 32px 24px; border: 1px solid #f0ceca; border-radius: 12px; background: #fff; text-align: center; }
.error-state h2, .error-state h3 { color: var(--red); }
.error-state p { margin: 8px 0 18px; color: var(--muted); font-size: 13px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 180px; color: var(--muted); font-size: 13px; }
.spinner { display: inline-block; flex-shrink: 0; width: 19px; height: 19px; border: 2px solid #d7e0ec; border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }

/* Authentication is intentionally spare and welcoming. */
.auth-shell { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 45px 22px; background: radial-gradient(ellipse at 50% 0%, #e9edf3 0, transparent 64%), var(--canvas); }
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 25px; color: var(--ink-strong); font-size: 18px; font-weight: 650; }
.auth-brand .brand-mark { color: #ead4ad; border-color: var(--navy); background: var(--navy); }
.auth-brand-en { display: block; margin-top: 3px; color: #8c98a8; font-size: 9px; font-weight: 500; letter-spacing: 1.8px; }
.auth-card { width: 100%; max-width: 430px; padding: 34px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 16px 48px #182d4809; }
.auth-card > h1 { margin-top: 7px; font-size: 23px; }
.auth-intro { margin-top: 9px; margin-bottom: 27px; color: var(--muted); font-size: 13px; }
.auth-card > h1 + p:not(.auth-intro) { margin: 12px 0 20px; color: var(--muted); }
.auth-intro h1 { font-size: 23px; }
.auth-intro p { margin-top: 8px; color: var(--muted); font-size: 13px; }
.auth-card form { display: flex; flex-direction: column; gap: 18px; }
.auth-card .btn.primary { width: 100%; min-height: 42px; margin-top: 3px; }
.auth-card .alert { margin-bottom: 20px; }
.auth-footer { width: 100%; max-width: 430px; margin-top: 23px; color: #88919d; font-size: 11px; line-height: 1.8; text-align: center; }

/* Native dialogs provide focus trapping and Escape support. */
.modal { width: min(520px, calc(100% - 36px)); max-height: calc(100dvh - 54px); margin: auto; padding: 0; border: 1px solid #dce2eb; border-radius: 14px; background: #fff; color: var(--ink); box-shadow: 0 24px 100px #10233e30; overflow: auto; }
.modal-wide { width: min(720px, calc(100% - 36px)); }
.modal::backdrop { background: #13243c66; backdrop-filter: blur(3px); }
.modal[open] { animation: modal-enter .18s ease-out; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 21px 25px; border-bottom: 1px solid var(--line); }
.modal-header h2, .modal-header h3 { font-size: 18px; }
.modal-body { padding: 24px 25px; }
.modal-body:not(.stack) > .field + .field { margin-top: 17px; }
.modal-body:not(.stack) > .inline-note { margin-top: 17px; }
.modal-body > p + p { margin-top: 12px; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 17px 25px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.close-button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 30px; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; }
.close-button:hover { background: #eff2f6; color: var(--ink-strong); }
.close-button svg { width: 18px; height: 18px; }
.toast-stack { position: fixed; z-index: 100; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 9px; width: min(390px, calc(100vw - 36px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--ink); font-size: 13px; line-height: 1.65; box-shadow: 0 8px 35px #13243c17; overflow-wrap: anywhere; pointer-events: auto; animation: toast-enter .18s ease-out; }
.toast.success { border-left: 4px solid var(--green); }
.toast.error { border-left: 4px solid var(--red); }
.toast.info { border-left: 4px solid var(--blue); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes page-enter { from { opacity: .5; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modal-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1500px) {
  .page { padding-top: 42px; }
}
@media (max-width: 1100px) {
  .topbar { padding-right: 26px; padding-left: 26px; }
  .page { padding-right: 26px; padding-left: 26px; }
  .stats-grid { gap: 12px; }
  .stat-card { padding: 19px; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paper-card { align-items: flex-start; }
  .paper-actions { max-width: 150px; }
}
@media (max-width: 820px) and (min-width: 601px) {
  .sidebar { width: 205px; padding-right: 13px; padding-left: 13px; }
  .brand { padding: 0 6px; font-size: 16px; gap: 9px; }
  .brand small { font-size: 9px; letter-spacing: 1px; }
  .main { margin-left: 205px; }
  .topbar { padding: 16px 22px; }
  .page { padding: 28px 22px 40px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 25px; }
  .hero h2 { font-size: 21px; }
  .paper-card { flex-direction: column; gap: 15px; }
  .paper-actions { max-width: none; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 13px; }
  h1 { font-size: 24px; }
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .topbar { position: sticky; z-index: 15; top: 0; min-height: 69px; padding: 14px 18px; flex-wrap: wrap; gap: 8px 14px; background: #fff; }
  .topbar > :first-child { font-size: 12px; }
  .topbar .actions { gap: 5px; }
  .topbar .btn { min-height: 31px; padding: 5px 9px; font-size: 11px; }
  .mobile-nav { position: static; display: flex; flex: 1 0 calc(100% + 36px); gap: 4px; width: calc(100% + 36px); overflow-x: auto; margin: 5px -18px -14px; padding: 9px 13px; background: #fff; border-top: 1px solid #edf0f3; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .mobile-nav::-webkit-scrollbar { display: none; }
  .mobile-nav .nav-button { justify-content: center; flex: 1 0 auto; width: auto; min-height: 36px; padding: 8px 12px; border-radius: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
  .mobile-nav .nav-button svg { width: 15px; height: 15px; }
  .mobile-nav .nav-button.active, .mobile-nav .nav-button[aria-current="page"] { background: var(--blue-soft); color: var(--blue); box-shadow: none; }
  .mobile-nav .nav-button:hover { background: #f0f3f8; color: var(--ink-strong); }
  .page { padding: 25px 17px 40px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 15px; margin-bottom: 22px; }
  .eyebrow { margin-bottom: 6px; font-size: 9px; }
  .subtitle { margin-top: 8px; font-size: 12px; }
  .page-heading .actions { width: 100%; padding-bottom: 0; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 21px; }
  .stat-card { padding: 17px 18px; border-radius: 10px; }
  .stat-value { font-size: 26px; }
  .stat-label { margin-top: 0; margin-bottom: 9px; font-size: 11px; }
  .hero { padding: 24px 21px; margin-bottom: 21px; }
  .hero h2 { font-size: 20px; line-height: 1.55; }
  .hero-meta { gap: 8px 15px; font-size: 12px; }
  .grid, .two-col, .form-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .card { border-radius: 11px; }
  .card-header { padding: 17px 19px; }
  .card-header h2, .card-header h3 { font-size: 15px; }
  .card-header .actions { gap: 5px; }
  .card-header > .actions { flex-wrap: wrap; }
  .card-header .btn { min-height: 31px; padding: 5px 9px; font-size: 11px; }
  .card-content { padding: 20px; }
  .card-content > .table-wrap:first-child:last-child { margin: -20px; }
  .toolbar { gap: 10px; }
  .search-field { flex-basis: 100%; max-width: none; }
  .toolbar select { flex: 1; min-width: 0; }
  .toolbar .actions { width: 100%; }
  .table { min-width: 600px; }
  .table th, .table td { padding-right: 14px; padding-left: 14px; }
  .table th:first-child, .table td:first-child { padding-left: 19px; }
  .table th:last-child, .table td:last-child { padding-right: 19px; }
  .paper-card { flex-direction: column; align-items: stretch; gap: 15px; padding: 20px; }
  .paper-title { font-size: 14px; }
  .paper-actions { justify-content: flex-start; max-width: none; }
  .paper-meta { font-size: 11px; }
  .session-row { flex-wrap: wrap; gap: 10px 12px; padding: 17px 0; }
  .session-info { flex-basis: calc(100% - 46px); }
  .session-actions { margin-left: 45px; justify-content: flex-start; }
  .session-row > .date-label { margin-left: 45px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 20px; scrollbar-width: none; }
  .tab-button { flex-shrink: 0; padding: 10px 13px; font-size: 12px; }
  .modal { width: calc(100% - 24px); max-height: calc(100dvh - 30px); border-radius: 12px; }
  .modal-header { padding: 18px 20px; }
  .modal-header h2 { font-size: 17px; }
  .modal-body { padding: 21px 20px; }
  .modal-footer { padding: 15px 20px; }
  .auth-shell { justify-content: flex-start; padding-top: 70px; }
  .auth-card { padding: 27px 25px; }
  .auth-brand { font-size: 17px; }
  .auth-intro h1 { font-size: 22px; }
  .auth-card > h1 { font-size: 22px; }
  .toast-stack { right: 18px; bottom: 18px; }
}
.import-dropzone { padding: 18px; border: 1px dashed #b5c5dd; border-radius: 10px; background: #f6f9fd; }
.import-dropzone.dragover { border-color: var(--blue); background: var(--blue-soft); }
.import-preview { max-height: 380px; overflow: auto; border: 1px solid var(--line, #e4e9f0); border-radius: 8px; }
.import-table { min-width: 0; width: 100%; table-layout: fixed; }
.import-table td, .import-table th { overflow-wrap: anywhere; padding: 12px; }
.import-table th:first-child, .import-table td:first-child { padding-left: 12px; }
.import-table th:last-child, .import-table td:last-child { padding-right: 12px; }
.import-table td { vertical-align: top; }
.import-table input { width: 100%; margin-top: 7px; }
.import-filename { display: block; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  body, .main { background: #fff; }
  .sidebar, .topbar, .mobile-nav, .toast-stack, .page-heading > .actions, .session-actions, .paper-actions { display: none !important; }
  .main { margin-left: 0; }
  .page { max-width: none; padding: 0; }
  .card, .paper-card, .stat-card { box-shadow: none; break-inside: avoid; }
  .hero { background: #fff; border-color: #ccd3dd; color: var(--ink); }
  .hero h1, .hero h2, .hero h3, .hero .muted, .hero .subtitle, .hero .eyebrow, .hero-meta { color: var(--ink); }
  .table-wrap { overflow: visible; }
}
