:root {
  --primary: #185c47;
  --primary-dark: #0f4636;
  --primary-light: #e4efe9;
  --primary-soft: #f0f5f1;
  --bg: #f3f2ec;
  --card: #fbfbf7;
  --surface: #f6f6f1;
  --text: #17211c;
  --text-2: #626d67;
  --text-3: #737d77;
  --border: #dde0d9;
  --border-strong: #cdd2ca;
  --success: #28765b;
  --success-bg: #e4f1eb;
  --warn: #a0661d;
  --warn-bg: #f7eddb;
  --danger: #ad3f32;
  --danger-bg: #f8e6e2;
  --info: #4d6d7a;
  --info-bg: #e8eff1;
  --violet: #59687e;
  --violet-bg: #eceff2;
  --sidebar: #13231d;
  --shadow-xs: none;
  --shadow-sm: 0 10px 35px rgba(19, 35, 29, .08);
  --shadow-lg: 0 30px 90px rgba(11, 25, 19, .2);
  --radius: 14px;
  --radius-sm: 10px;
  --font: Inter, "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* Accessible labels must remain available without occupying visual layout. */
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; }
html { color-scheme: light; }
body {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid rgba(24, 92, 71, .22);
  outline-offset: 2px;
}
svg { display: block; }
.numeric, .stat-card .v, .module-summary b, .project-metrics b { font-variant-numeric: tabular-nums; }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 登录 */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(520px, 1.15fr) minmax(430px, .85fr); background: #fff; }
.login-brand {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 100vh; padding: clamp(36px, 5vw, 76px); color: #fff;
  background: radial-gradient(circle at 76% 22%, rgba(126, 156, 255, .34), transparent 28%), linear-gradient(145deg, #162d7c 0%, #284cce 58%, #3155d9 100%);
}
.login-brand::before, .login-brand::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; }
.login-brand::before { width: 520px; height: 520px; right: -180px; bottom: -210px; }
.login-brand::after { width: 360px; height: 360px; right: -100px; bottom: -130px; }
.login-orb { position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.orb-one { width: 310px; height: 310px; right: 8%; top: 26%; border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 0 100px rgba(255,255,255,.06); }
.orb-two { width: 84px; height: 84px; right: 24%; top: 36%; background: linear-gradient(145deg, rgba(255,255,255,.2), rgba(255,255,255,.02)); }
.brand-lockup, .logo { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.brand-mark { display: inline-grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px; background: var(--primary); color: #fff; font-size: 20px; font-weight: 700; box-shadow: 0 8px 24px rgba(49,85,217,.22); }
.brand-lockup .brand-mark { background: #fff; color: var(--primary); box-shadow: 0 10px 26px rgba(15,23,42,.16); }
.brand-lockup b { display: block; font-size: 20px; letter-spacing: .08em; }
.brand-lockup small { display: block; margin-top: 1px; color: rgba(255,255,255,.68); font-size: 11px; letter-spacing: .15em; }
.login-brand-copy { position: relative; z-index: 2; max-width: 650px; margin: auto 0; }
.eyebrow { display: inline-block; color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.login-brand .eyebrow { color: #b8c8ff; }
.login-brand-copy h1 { margin: 20px 0 22px; font-size: clamp(38px, 4.4vw, 64px); line-height: 1.17; letter-spacing: -.045em; }
.login-brand-copy p { max-width: 560px; color: rgba(255,255,255,.72); font-size: 17px; line-height: 1.9; }
.login-flow { position: relative; z-index: 2; display: flex; align-items: center; max-width: 670px; padding: 18px 20px; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; background: rgba(255,255,255,.075); backdrop-filter: blur(12px); }
.login-flow span { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 13px; color: rgba(255,255,255,.9); }
.login-flow svg { width: 17px; height: 17px; }
.login-flow > i { flex: 1; height: 1px; min-width: 18px; margin: 0 13px; background: rgba(255,255,255,.18); }
.login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 44px clamp(28px, 6vw, 90px); }
.login-card { width: 100%; max-width: 430px; }
.login-mobile-brand { display: none; }
.login-card h2 { margin-top: 10px; font-size: 30px; line-height: 1.25; letter-spacing: -.03em; }
.login-sub { margin: 8px 0 30px; color: var(--text-2); }
.login-card label { display: block; margin: 15px 0 7px; color: #344054; font-size: 13px; font-weight: 600; }
.login-input { height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid var(--border-strong); border-radius: 11px; background: #fff; transition: .18s ease; }
.login-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(49,85,217,.09); }
.login-input > svg { width: 18px; color: var(--text-3); }
.login-input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.login-input button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; cursor: pointer; color: var(--text-3); }
.login-input button:hover { background: var(--surface); color: var(--text); }
.login-input button svg { width: 17px; height: 17px; }
.login-submit { width: 100%; height: 48px; margin-top: 22px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 11px; background: var(--primary); color: #fff; font-weight: 650; cursor: pointer; box-shadow: 0 10px 24px rgba(49,85,217,.2); transition: .18s ease; }
.login-submit:hover { background: var(--primary-dark); transform: translateY(-1px); }
.login-submit:disabled { opacity: .7; cursor: wait; transform: none; }
.login-submit svg { width: 18px; height: 18px; }
.login-err { min-height: 22px; margin-bottom: -5px; color: var(--danger); font-size: 13px; }
.demo-accounts { margin-top: 24px; border-top: 1px solid var(--border); }
.demo-accounts summary { padding: 17px 0 10px; list-style: none; color: var(--text-2); font-size: 12px; cursor: pointer; }
.demo-accounts summary::-webkit-details-marker { display: none; }
.demo-accounts summary::after { content: "展开"; float: right; color: var(--primary); }
.demo-accounts[open] summary::after { content: "收起"; }
.demo-accounts > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.demo-accounts button { padding: 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); text-align: left; cursor: pointer; }
.demo-accounts button:hover { border-color: #bac8f7; background: var(--primary-soft); }
.demo-accounts b, .demo-accounts span { display: block; }
.demo-accounts b { font-size: 11px; }
.demo-accounts span { margin-top: 2px; color: var(--text-3); font-size: 10px; }
.login-foot { margin-top: 32px; color: var(--text-3); font-size: 11px; }

/* 应用框架 */
.layout { min-height: 100vh; }
.sidebar { width: 240px; position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; border-right: 1px solid var(--border); background: var(--sidebar); }
.logo { height: 78px; padding: 0 24px; border-bottom: 1px solid #edf0f5; }
.logo .brand-mark { width: 38px; height: 38px; flex-basis: 38px; border-radius: 12px; font-size: 18px; }
.logo b { display: block; font-size: 17px; letter-spacing: .06em; }
.logo small { display: block; margin-top: -1px; color: var(--text-3); font-size: 10px; letter-spacing: .08em; }
.nav { flex: 1; overflow-y: auto; padding: 16px 13px 22px; scrollbar-width: thin; }
.nav-group + .nav-group { margin-top: 17px; }
.nav-label { padding: 0 11px 6px; color: #a0a8b7; font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.nav-item { width: 100%; height: 42px; display: flex; align-items: center; gap: 11px; margin: 2px 0; padding: 0 11px; border: 0; border-radius: 10px; background: transparent; color: #526072; cursor: pointer; text-align: left; transition: .15s ease; }
.nav-item .ico { width: 18px; height: 18px; flex: 0 0 18px; }
.nav-item span { font-size: 13px; font-weight: 520; }
.nav-item:hover { background: #f4f6fa; color: var(--text); }
.nav-item.active { background: var(--primary-light); color: var(--primary); }
.nav-item.active span { font-weight: 650; }
.sidebar-foot { display: flex; align-items: center; gap: 10px; margin: 0 16px 16px; padding: 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.health-dot { width: 8px; height: 8px; border-radius: 50%; background: #19a76f; box-shadow: 0 0 0 4px rgba(25,167,111,.12); }
.sidebar-foot b, .sidebar-foot small { display: block; }
.sidebar-foot b { font-size: 11px; }
.sidebar-foot small { color: var(--text-3); font-size: 10px; }
.sidebar-scrim { display: none; }
.main { min-height: 100vh; margin-left: 240px; }
.topbar { height: 78px; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid rgba(228,233,240,.9); background: rgba(255,255,255,.92); backdrop-filter: blur(16px); }
.topbar-start { display: flex; align-items: center; gap: 12px; }
.page-title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.page-subtitle { margin-top: 1px; color: var(--text-3); font-size: 11px; }
.menu-btn { display: none !important; }
.user { display: flex; align-items: center; gap: 9px; }
.today { margin-right: 8px; color: var(--text-2); font-size: 12px; }
.user-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(145deg, #eff2ff, #dfe6ff); color: var(--primary); font-size: 11px; font-weight: 700; }
.user-name { min-width: 72px; margin-right: 5px; }
.user-name b, .user-name small { display: block; }
.user-name b { font-size: 12px; }
.user-name small { color: var(--text-3); font-size: 9px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { border-color: var(--border); background: var(--surface); color: var(--text); }
.content { width: 100%; max-width: 1640px; margin: 0 auto; padding: 26px 28px 46px; }

/* 通用组件 */
.btn { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 15px; border: 1px solid var(--primary); border-radius: 9px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 600; line-height: 1; cursor: pointer; transition: .16s ease; white-space: nowrap; }
.btn svg { width: 15px; height: 15px; }
.btn:hover { border-color: var(--primary-dark); background: var(--primary-dark); transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.gray { border-color: var(--border); background: #fff; color: #344054; }
.btn.gray:hover { border-color: var(--border-strong); background: var(--surface); color: var(--text); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface); color: var(--text); }
.btn.green { border-color: var(--success); background: var(--success); }
.btn.orange { border-color: #d98716; background: #d98716; }
.btn.red { border-color: transparent; background: var(--danger-bg); color: var(--danger); }
.btn.red:hover { border-color: #f6c5c1; background: #ffe7e4; }
.btn.sm { min-height: 30px; padding: 6px 9px; border-radius: 8px; font-size: 11px; }
.btn.light { border-color: #fff; background: #fff; color: var(--primary); }
.btn.light:hover { border-color: #fff; background: #f6f8ff; }
.btn.outline-light { border-color: rgba(255,255,255,.32); background: transparent; color: #fff; }
.btn.outline-light:hover { border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.08); }
.card, .panel, .chart-box { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-xs); }
.card { padding: 20px; margin-bottom: 18px; }
.card-heading, .panel-head, .section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card-heading { margin-bottom: 17px; }
.card-heading h2, .panel-head h2 { font-size: 15px; font-weight: 700; }
.card-heading p, .panel-head p { margin-top: 2px; color: var(--text-3); font-size: 11px; }
.panel-head { min-height: 42px; margin-bottom: 12px; }
.panel-badge { padding: 4px 9px; border-radius: 999px; background: var(--primary-light); color: var(--primary); font-size: 11px; font-weight: 700; }
.text-btn { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; color: var(--primary); font-size: 11px; cursor: pointer; }
.text-btn svg { width: 14px; height: 14px; }
.text-btn:hover { color: var(--primary-dark); }
.toolbar { display: flex; align-items: center; gap: 9px; margin-bottom: 15px; flex-wrap: wrap; }
.toolbar input, .toolbar select, .search-box { height: 38px; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.toolbar input, .toolbar select { padding: 0 11px; color: var(--text); font-size: 12px; }
.toolbar select { min-width: 150px; }
.toolbar input:focus, .toolbar select:focus { border-color: #9fb0ec; outline: 0; box-shadow: 0 0 0 3px rgba(49,85,217,.08); }
.search-box { width: min(300px, 100%); display: flex; align-items: center; gap: 8px; padding: 0 11px; }
.search-box svg { width: 16px; height: 16px; color: var(--text-3); }
.search-box input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; box-shadow: none !important; }
.filter-tabs { display: flex; gap: 4px; margin: 0 -2px 15px; overflow-x: auto; scrollbar-width: none; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tabs button { min-height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font-size: 11px; white-space: nowrap; cursor: pointer; }
.filter-tabs button span { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: #eef1f5; color: var(--text-3); font-size: 9px; }
.filter-tabs button:hover { background: var(--surface); color: var(--text); }
.filter-tabs button.active { background: var(--primary-light); color: var(--primary); font-weight: 650; }
.filter-tabs button.active span { background: #dbe3ff; color: var(--primary); }

/* 工作台 */
.welcome-card { min-height: 170px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-bottom: 18px; padding: 30px 34px; border-radius: 18px; background: linear-gradient(120deg, #2546bd, #3155d9 60%, #4969df); color: #fff; box-shadow: 0 14px 34px rgba(49,85,217,.16); }
.welcome-card > div:not(.welcome-pattern) { position: relative; z-index: 2; }
.welcome-card .eyebrow { color: #c8d4ff; }
.welcome-card h1 { margin: 7px 0 5px; font-size: 26px; letter-spacing: -.025em; }
.welcome-card p { color: rgba(255,255,255,.72); font-size: 13px; }
.welcome-card p b { color: #fff; }
.welcome-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.welcome-pattern { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.welcome-pattern i { position: absolute; display: block; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; }
.welcome-pattern i:nth-child(1) { width: 340px; height: 340px; right: -90px; top: -150px; }
.welcome-pattern i:nth-child(2) { width: 220px; height: 220px; right: -25px; top: -88px; }
.welcome-pattern i:nth-child(3) { width: 90px; height: 90px; right: 190px; bottom: -58px; background: rgba(255,255,255,.035); }
.stat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { min-height: 160px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-xs); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 15px; }
.stat-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; }
.stat-icon svg { width: 17px; height: 17px; }
.stat-icon.blue { background: var(--info-bg); color: var(--info); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.violet { background: var(--violet-bg); color: var(--violet); }
.stat-icon.orange { background: var(--warn-bg); color: var(--warn); }
.stat-trend { padding: 3px 7px; border-radius: 6px; background: #f2f4f7; color: var(--text-2); font-size: 9px; white-space: nowrap; }
.stat-trend.green { background: var(--success-bg); color: var(--success); }
.stat-trend.orange { background: var(--warn-bg); color: var(--warn); }
.stat-card .t { color: var(--text-2); font-size: 11px; }
.stat-card .v { margin-top: 3px; overflow: hidden; color: var(--text); font-size: clamp(20px, 2vw, 27px); font-weight: 720; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.stat-card .u { margin-left: 4px; color: var(--text-2); font-size: 11px; font-weight: 500; letter-spacing: 0; }
.stat-foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid #f0f2f5; color: var(--text-3); font-size: 10px; }
.stat-foot b { color: var(--text-2); font-weight: 600; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.panel { padding: 18px 20px; }
.todo-list button { width: 100%; min-height: 61px; display: grid; grid-template-columns: 38px 1fr auto 16px; align-items: center; gap: 11px; padding: 9px 4px; border: 0; border-top: 1px solid #f0f2f5; background: transparent; text-align: left; cursor: pointer; }
.todo-list button:first-child { border-top: 0; }
.todo-list button:hover { background: #fafbfc; }
.todo-list button > span:nth-child(2) b, .todo-list button > span:nth-child(2) small { display: block; }
.todo-list button > span:nth-child(2) b { font-size: 12px; }
.todo-list button > span:nth-child(2) small { margin-top: 2px; color: var(--text-3); font-size: 10px; }
.todo-list button strong { min-width: 24px; text-align: center; font-size: 15px; }
.todo-list button > svg { width: 15px; color: var(--text-3); }
.todo-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; }
.todo-icon svg { width: 16px; height: 16px; }
.todo-icon.orange { background: var(--warn-bg); color: var(--warn); }
.todo-icon.blue { background: var(--info-bg); color: var(--info); }
.todo-icon.violet { background: var(--violet-bg); color: var(--violet); }
.todo-icon.green { background: var(--success-bg); color: var(--success); }
.schedule-list > div { min-height: 61px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; border-top: 1px solid #f0f2f5; }
.schedule-list > div:first-child { border-top: 0; }
.date-tile { width: 40px; height: 42px; display: grid; place-content: center; border: 1px solid #dbe2ec; border-radius: 9px; background: var(--surface); text-align: center; }
.date-tile b { font-size: 15px; line-height: 1.05; }
.date-tile small { color: var(--text-3); font-size: 8px; }
.schedule-list > div > span:nth-child(2) { min-width: 0; }
.schedule-list > div > span:nth-child(2) b, .schedule-list > div > span:nth-child(2) small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-list > div > span:nth-child(2) b { font-size: 12px; }
.schedule-list > div > span:nth-child(2) small { margin-top: 2px; color: var(--text-3); font-size: 10px; }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.chart-box { min-width: 0; padding: 18px 20px; }
.chart { width: 100%; height: 310px; }
.dashboard-charts .chart { height: 290px; }

/* 模块摘要 */
.module-summary { display: grid; gap: 12px; margin-bottom: 18px; }
.module-summary.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.module-summary.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.module-summary > div { min-height: 94px; display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-content: center; padding: 15px 17px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.module-summary > div > span { grid-row: 1 / 3; width: 36px; height: 36px; display: grid; place-items: center; align-self: center; border-radius: 10px; background: var(--primary-light); color: var(--primary); }
.module-summary > div > span svg { width: 17px; height: 17px; }
.module-summary small { color: var(--text-2); font-size: 10px; }
.module-summary b { margin-top: 1px; font-size: 18px; letter-spacing: -.02em; }
.module-summary em { margin-left: 3px; color: var(--text-2); font-size: 10px; font-style: normal; font-weight: 500; }

/* 表格 */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 11px; scrollbar-width: thin; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
table.tbl th { height: 42px; padding: 0 12px; border-bottom: 1px solid var(--border); background: #f8fafc; color: #687589; font-size: 10px; font-weight: 650; text-align: left; white-space: nowrap; }
table.tbl td { min-height: 50px; padding: 11px 12px; border-bottom: 1px solid #edf0f4; color: #344054; vertical-align: middle; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr { transition: background .12s ease; }
table.tbl tbody tr:hover { background: #fafbfc; }
.align-right { text-align: right !important; }
.actions-head { min-width: 146px; text-align: right !important; }
.actions-cell { text-align: right; }
.row-actions { display: flex; justify-content: flex-end; gap: 5px; }
.row-actions .btn { margin: 0; }
.row-actions .btn:not(:first-child) { border-color: transparent; background: transparent; color: var(--text-2); }
.row-actions .btn:not(:first-child):hover { background: #f1f3f7; color: var(--text); }
.row-actions .btn.red { color: var(--danger); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.tag > i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tag.blue { background: var(--info-bg); color: var(--info); }
.tag.green { background: var(--success-bg); color: var(--success); }
.tag.orange { background: var(--warn-bg); color: var(--warn); }
.tag.red { background: var(--danger-bg); color: var(--danger); }
.tag.violet { background: var(--violet-bg); color: var(--violet); }
.tag.gray { background: #f1f3f6; color: #667085; }

/* 弹窗与表单 */
.mask { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(21,32,51,.46); backdrop-filter: blur(4px); animation: maskIn .16s ease-out; }
@keyframes maskIn { from { opacity: 0; } }
.modal { width: 720px; max-width: 100%; max-height: min(90vh, 920px); display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(255,255,255,.7); border-radius: 17px; background: #fff; box-shadow: var(--shadow-lg); animation: modalIn .2s ease-out; }
.modal.sm { width: 480px; }
.modal.wide { width: 1040px; }
.modal.attention { animation: attention .2s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(9px) scale(.985); } }
@keyframes attention { 50% { transform: scale(1.008); } }
.modal-head { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.modal-kicker { display: block; margin-bottom: 2px; color: var(--text-3); font-size: 9px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.modal-head h3 { font-size: 16px; line-height: 1.3; }
.modal-head .x { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); cursor: pointer; }
.modal-head .x:hover { background: var(--surface); color: var(--text); }
.modal-head .x svg { width: 18px; height: 18px; }
.modal-body { flex: 1; overflow-y: auto; padding: 20px; scrollbar-width: thin; }
.modal-foot { min-height: 66px; display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 12px 20px; border-top: 1px solid var(--border); background: #fbfcfd; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 17px; }
.form-item { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.form-item.span2 { grid-column: span 2; }
.form-item label { color: #475467; font-size: 11px; font-weight: 600; }
.form-item .req { margin-left: 2px; color: var(--danger); }
.form-item input, .form-item select, .form-item textarea { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: 9px; background: #fff; color: var(--text); font-size: 12px; transition: .15s ease; }
.form-item textarea { min-height: 86px; resize: vertical; line-height: 1.7; }
.form-item input:hover, .form-item select:hover, .form-item textarea:hover { border-color: #c2cbd8; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: #8fa3ec; outline: 0; box-shadow: 0 0 0 3px rgba(49,85,217,.08); }
.form-item input[readonly], .form-item input:disabled, .form-item select:disabled { background: #f4f6f8; color: var(--text-2); }
.form-item input[aria-invalid="true"], .form-item select[aria-invalid="true"], .form-item textarea[aria-invalid="true"] { border-color: #ef9b94; box-shadow: 0 0 0 3px rgba(217,45,32,.07); }
.form-item small { color: var(--text-3); font-size: 9px; }
.field-error { min-height: 0; color: var(--danger); font-size: 9px; }
.field-error:empty { display: none; }
.confirm-content { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 14px; padding: 6px 0; }
.confirm-content p { color: #475467; line-height: 1.8; }
.confirm-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--warn-bg); color: var(--warn); }
.confirm-icon svg { width: 22px; height: 22px; }
.amount-callout { margin-bottom: 16px; padding: 16px; border-radius: 11px; background: linear-gradient(120deg, var(--primary-light), #f7f8ff); }
.amount-callout small, .amount-callout b { display: block; }
.amount-callout small { color: var(--text-2); font-size: 10px; }
.amount-callout b { margin-top: 3px; color: var(--primary); font-size: 22px; }

/* 项目全景 */
.project-hero { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 4px 2px 18px; border-bottom: 1px solid var(--border); }
.project-hero .project-id { display: block; margin-bottom: 7px; color: var(--text-3); font-size: 10px; font-weight: 650; letter-spacing: .08em; }
.tbl .project-id { color: #8791a1; font-size: 9px; font-weight: 650; letter-spacing: .04em; white-space: nowrap; }
.project-title-row { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 12px; }
.project-date { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 11px; }
.project-date svg { width: 17px; color: var(--primary); }
.project-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.project-metrics > div { padding: 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.project-metrics small, .project-metrics b { display: block; }
.project-metrics small { color: var(--text-2); font-size: 9px; }
.project-metrics b { margin-top: 4px; font-size: 18px; letter-spacing: -.02em; }
.project-metrics em { color: var(--text-2); font-size: 9px; font-style: normal; font-weight: 500; }
.project-section { padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.section-title { margin-bottom: 13px; }
.section-title span, .section-title small { display: block; }
.section-title span { font-size: 12px; font-weight: 700; }
.section-title small { margin-top: 2px; color: var(--text-3); font-size: 9px; }
.project-steps { display: flex; align-items: flex-start; }
.project-steps > div { position: relative; flex: 1; display: grid; justify-items: center; gap: 6px; color: var(--text-3); }
.project-steps > div::after { content: ""; position: absolute; z-index: 0; top: 14px; left: calc(50% + 18px); width: calc(100% - 36px); height: 2px; background: #e9edf3; }
.project-steps > div:last-child::after { display: none; }
.project-steps > div > span { width: 28px; height: 28px; position: relative; z-index: 1; display: grid; place-items: center; border: 2px solid #dfe4eb; border-radius: 50%; background: #fff; font-size: 10px; font-weight: 700; }
.project-steps > div > span svg { width: 13px; height: 13px; }
.project-steps > div b { font-size: 10px; }
.project-steps > div.done { color: var(--success); }
.project-steps > div.done > span { border-color: var(--success); background: var(--success); color: #fff; }
.project-steps > div.done::after { background: #8ed3b5; }
.project-steps > div.current { color: var(--primary); }
.project-steps > div.current > span { border-color: var(--primary); background: var(--primary-light); }
.project-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 12px; margin: 12px 0; }
.project-list-item { min-height: 56px; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; border-top: 1px solid #f0f2f5; }
.project-list-item:first-of-type { border-top: 0; }
.project-list-item > div b, .project-list-item > div small { display: block; }
.project-list-item > div b { font-size: 11px; }
.project-list-item > div small { margin-top: 2px; color: var(--text-3); font-size: 9px; }
.finance-progress > div:first-child { display: flex; justify-content: space-between; color: var(--text-2); font-size: 10px; }
.finance-progress > div:first-child b { color: var(--primary); font-size: 13px; }
.progress { height: 7px; overflow: hidden; margin: 8px 0 6px; border-radius: 999px; background: #e9edf4; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3155d9, #5a78e7); }
.finance-progress > small { color: var(--text-3); font-size: 9px; }
.finance-lines { margin-top: 14px; padding-top: 9px; border-top: 1px solid #f0f2f5; }
.finance-lines p { display: flex; justify-content: space-between; padding: 5px 0; color: var(--text-2); font-size: 10px; }
.finance-lines b { color: var(--text); }
.info-grid { display: grid; grid-template-columns: 1.2fr .5fr 1.8fr; gap: 10px; }
.info-grid p { min-width: 0; }
.info-grid small, .info-grid span { display: block; }
.info-grid small { color: var(--text-3); font-size: 9px; }
.info-grid span { margin-top: 3px; overflow: hidden; color: #475467; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.project-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 12px; flex-wrap: wrap; }

/* 自定义业务模块 */
.inline-note { display: flex; align-items: center; gap: 7px; margin: -2px 0 13px; padding: 9px 11px; border-radius: 8px; background: var(--primary-soft); color: #586a9d; font-size: 10px; }
.inline-note svg { width: 14px; height: 14px; flex: 0 0 14px; }
.modal-intro { margin-bottom: 15px; color: var(--text-2); font-size: 11px; line-height: 1.75; }
.modal-note { margin-top: 12px; color: var(--text-3); font-size: 9px; line-height: 1.7; }
.share-success { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; padding: 14px; border-radius: 11px; background: var(--success-bg); color: var(--success); }
.share-success > svg { width: 27px; height: 27px; flex: 0 0 27px; }
.share-success b, .share-success p { display: block; }
.share-success b { font-size: 12px; }
.share-success p { margin-top: 2px; color: #4a7d67; font-size: 10px; }
.share-link { display: flex; gap: 8px; }
.share-link input { flex: 1; min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: #475467; font-size: 10px; }
.q-stats-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 12px; }
.q-stats-summary > div { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-content: center; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.q-stats-summary > div > span { grid-row: 1 / 3; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--primary-light); color: var(--primary); }
.q-stats-summary svg { width: 16px; height: 16px; }
.q-stats-summary small { color: var(--text-3); font-size: 9px; }
.q-stats-summary b { font-size: 13px; }
.q-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.q-stat-card { padding: 14px; box-shadow: none; }
.q-stat-card .chart { height: 210px; }
.q-stat-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.q-stat-title h4 { font-size: 11px; }
.q-stat-title span { padding: 3px 7px; border-radius: 6px; background: var(--primary-light); color: var(--primary); font-size: 9px; white-space: nowrap; }
.text-responses { max-height: 210px; overflow-y: auto; padding-top: 10px; scrollbar-width: thin; }
.text-responses p { display: flex; gap: 7px; margin-bottom: 6px; padding: 8px 9px; border-radius: 8px; background: var(--surface); color: #475467; font-size: 10px; line-height: 1.6; }
.text-responses svg { width: 13px; height: 13px; flex: 0 0 13px; margin-top: 2px; color: var(--primary); }
.response-title { margin: 18px 0 9px; }
.person-cell { min-width: 130px; display: flex; align-items: center; gap: 9px; }
.person-avatar { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 31px; border-radius: 9px; background: linear-gradient(145deg, #eff2ff, #dfe6ff); color: var(--primary); font-size: 10px; font-weight: 700; }
.person-avatar.large { width: 52px; height: 52px; flex-basis: 52px; border-radius: 15px; font-size: 15px; }
.person-cell b, .person-cell small { display: block; }
.person-cell b { font-size: 11px; }
.person-cell small { color: var(--text-3); font-size: 8px; }
.teacher-profile { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 13px; padding: 3px 0 17px; border-bottom: 1px solid var(--border); }
.teacher-profile h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.teacher-profile p { margin-top: 2px; color: var(--text-2); font-size: 10px; }
.teacher-profile > div > div { display: flex; gap: 8px; margin-top: 7px; flex-wrap: wrap; }
.teacher-profile > div > div span { display: flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 6px; background: var(--surface); color: var(--text-2); font-size: 9px; }
.teacher-profile > div > div svg { width: 11px; height: 11px; }
.teacher-profile > strong { color: var(--primary); font-size: 22px; text-align: right; }
.teacher-profile > strong small { display: block; color: var(--text-3); font-size: 8px; font-weight: 500; }
.teacher-info { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 13px 0; }
.teacher-info p { padding: 10px; border: 1px solid var(--border); border-radius: 9px; }
.teacher-info small, .teacher-info span { display: block; }
.teacher-info small { color: var(--text-3); font-size: 8px; }
.teacher-info span { margin-top: 2px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.teacher-intro { padding: 12px; border-radius: 9px; background: var(--surface); }
.teacher-intro small { color: var(--text-3); font-size: 8px; }
.teacher-intro p { margin-top: 4px; color: #475467; font-size: 10px; line-height: 1.75; }
.eval-form { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border); }
.q-item { margin-bottom: 10px; padding: 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.q-item .row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.q-item .row:last-child { margin-bottom: 0; }
.q-item input, .q-item select { min-height: 38px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 9px; background: #fff; font-size: 11px; }
pre.logbox { max-height: 360px; overflow-y: auto; padding: 16px; border-radius: 10px; background: #182235; color: #d8e7ff; font: 11px/1.85 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.report-box { padding: 30px 34px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-xs); font-size: 12px; line-height: 2; white-space: pre-wrap; }
.report-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; padding: 24px; border-radius: var(--radius); background: linear-gradient(120deg, #182d72, #3155d9); color: #fff; }
.report-hero > div:last-child { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.report-hero h2 { font-size: 21px; }
.report-hero p { margin-top: 5px; color: rgba(255,255,255,.68); }
.report-title { margin: 22px 2px 9px; }

/* 状态反馈 */
.toast { position: fixed; z-index: 999; top: 22px; left: 50%; transform: translateX(-50%); min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 9px 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; background: #162033; color: #fff; box-shadow: 0 12px 34px rgba(15,23,42,.22); font-size: 12px; animation: toastIn .2s ease-out; }
.toast.err { background: #9f241b; }
.toast svg { width: 17px; height: 17px; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -9px); } }
.empty-state, .error-state { min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px; text-align: center; color: var(--text-2); }
.empty-state > svg, .error-state > svg { width: 34px; height: 34px; margin-bottom: 10px; color: #aab3c1; }
.empty-state h3, .error-state h3 { color: var(--text); font-size: 14px; }
.empty-state p, .error-state p { margin: 4px 0 14px; color: var(--text-3); font-size: 10px; }
.mini-empty { min-height: 120px !important; display: flex !important; align-items: center; justify-content: center; gap: 7px; color: var(--text-3); font-size: 10px; }
.mini-empty svg { width: 18px; height: 18px; }
.page-loading { height: 300px; display: grid; grid-template-columns: repeat(3, 7px); place-content: center; gap: 5px; }
.page-loading span { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); animation: pulse 1s ease-in-out infinite; }
.page-loading span:nth-child(2) { animation-delay: .12s; }
.page-loading span:nth-child(3) { animation-delay: .24s; }
@keyframes pulse { 50% { opacity: .25; transform: translateY(-4px); } }
.readonly-banner { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; padding: 10px 13px; border: 1px solid #dce4ff; border-radius: 10px; background: #f3f6ff; color: #47609d; font-size: 11px; }
.readonly-banner svg { width: 16px; height: 16px; flex: 0 0 16px; }
.readonly-banner b { color: #294ebc; }

/* 公开问卷 */
.answer-page { min-height: 100vh; background: radial-gradient(circle at 50% 0, #edf1ff, transparent 400px), var(--bg); }
.answer-wrap { width: min(720px, 100%); margin: 0 auto; padding: 28px 16px 70px; }
.answer-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; color: var(--text); font-size: 13px; font-weight: 700; }
.answer-brand .brand-mark { width: 32px; height: 32px; flex-basis: 32px; border-radius: 10px; font-size: 14px; }
.answer-card { margin-bottom: 14px; padding: 25px 27px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.answer-head { position: relative; overflow: hidden; padding-top: 30px; }
.answer-head::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--primary), #7658df); }
.answer-head h1 { margin-bottom: 8px; font-size: 23px; letter-spacing: -.025em; }
.answer-head p { color: var(--text-2); font-size: 12px; line-height: 1.8; }
.answer-meta { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.answer-meta span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 7px; background: var(--surface); color: var(--text-2); font-size: 10px; }
.answer-meta svg { width: 13px; height: 13px; color: var(--primary); }
.answer-progress { position: sticky; top: 0; z-index: 4; padding: 11px 0; background: rgba(245,247,250,.92); backdrop-filter: blur(8px); }
.answer-progress > div:first-child { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--text-2); font-size: 10px; }
.aq { padding: 20px 0; border-bottom: 1px solid #edf0f4; }
.aq:first-child { padding-top: 0; }
.aq:last-of-type { border-bottom: 0; }
.aq .qt { margin-bottom: 12px; font-size: 14px; font-weight: 650; }
.required-mark { margin-left: 3px; color: var(--danger); }
.answer-text, .aq textarea { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 9px; background: #fff; font-family: inherit; font-size: 12px; }
.aq textarea { min-height: 90px; resize: vertical; }
.answer-text:focus, .aq textarea:focus { border-color: #8fa3ec; outline: 0; box-shadow: 0 0 0 3px rgba(49,85,217,.08); }
.score-group { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.score-option { min-height: 52px; display: grid; place-items: center; gap: 2px; padding: 5px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--text-2); cursor: pointer; }
.score-option input, .radio-option input { position: absolute; opacity: 0; pointer-events: none; }
.score-option b { font-size: 15px; }
.score-option small { font-size: 8px; }
.score-option:hover, .score-option.on { border-color: #9aaeea; background: var(--primary-light); color: var(--primary); }
.score-option:has(input:focus-visible), .radio-option:has(input:focus-visible) { outline: 3px solid rgba(49,85,217,.18); outline-offset: 2px; }
.radio-list { display: grid; gap: 8px; }
.radio-option { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; }
.radio-option::before { content: ""; width: 15px; height: 15px; flex: 0 0 15px; border: 1.5px solid #aab3c0; border-radius: 50%; box-shadow: inset 0 0 0 4px #fff; }
.radio-option:hover, .radio-option.on { border-color: #9aaeea; background: var(--primary-light); color: var(--primary); }
.radio-option.on::before { border-color: var(--primary); background: var(--primary); }
.question-error { margin-top: 7px; color: var(--danger); font-size: 10px; }
.answer-submit { width: 100%; min-height: 46px; margin-top: 18px; }
.answer-success { min-height: 380px; display: grid; place-content: center; justify-items: center; text-align: center; }
.answer-success .success-icon { width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 50%; background: var(--success-bg); color: var(--success); }
.answer-success .success-icon svg { width: 30px; height: 30px; }
.answer-success h2 { font-size: 21px; }
.answer-success p { margin-top: 7px; color: var(--text-2); }

@media (max-width: 1280px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .module-summary.four { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: 20px 0 48px rgba(15,23,42,.15); transition: transform .22s ease; }
  .nav-open .sidebar { transform: translateX(0); }
  .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 25; border: 0; background: rgba(15,23,42,.34); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .nav-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .menu-btn { display: grid !important; }
  .content { padding: 22px; }
  .dashboard-grid, .charts, .project-grid { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { min-height: 100vh; background: radial-gradient(circle at 50% 0, #edf1ff, transparent 460px), #fff; }
  .login-mobile-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 44px; }
  .login-mobile-brand .brand-mark { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; font-size: 15px; }
}

@media (max-width: 760px) {
  .topbar { height: 66px; padding: 0 14px; }
  .page-subtitle, .today, .user-name { display: none; }
  .page-title { font-size: 15px; }
  .user { gap: 5px; }
  .user-avatar { width: 32px; height: 32px; }
  .content { padding: 16px 14px 34px; }
  .welcome-card { min-height: auto; display: block; padding: 24px 21px; }
  .welcome-card h1 { font-size: 22px; }
  .welcome-actions { justify-content: flex-start; margin-top: 20px; }
  .stat-cards, .module-summary.three, .module-summary.four, .project-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { min-height: 145px; padding: 15px; }
  .stat-card .v { font-size: 20px; }
  .panel, .chart-box, .card { padding: 15px; }
  .filter-tabs { margin-right: -15px; }
  .toolbar { align-items: stretch; }
  .search-box { width: 100%; }
  .toolbar select { min-width: 0; flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .form-item.span2 { grid-column: span 1; }
  .mask { align-items: flex-end; padding: 0; }
  .modal, .modal.sm, .modal.wide { width: 100%; max-height: 94vh; border-radius: 18px 18px 0 0; }
  .modal-body { padding: 17px; }
  .modal-head, .modal-foot { padding-left: 17px; padding-right: 17px; }
  .project-hero { align-items: flex-start; flex-direction: column; }
  .project-steps { overflow-x: auto; padding-bottom: 8px; }
  .project-steps > div { min-width: 80px; }
  .info-grid { grid-template-columns: 1fr; }
  .project-actions { justify-content: stretch; }
  .project-actions .btn { flex: 1 1 46%; }
  .q-stats-grid { grid-template-columns: 1fr; }
  .q-stats-summary, .teacher-info { grid-template-columns: repeat(2, 1fr); }
  .teacher-profile { grid-template-columns: 52px 1fr; }
  .teacher-profile > strong { grid-column: 1 / 3; padding-top: 8px; border-top: 1px solid var(--border); text-align: left; }
  .teacher-profile > strong small { display: inline; margin-left: 4px; }
  .share-link { flex-direction: column; }
  .share-link .btn { width: 100%; }
  .report-hero { align-items: flex-start; flex-direction: column; }
  .report-hero > div:last-child { width: 100%; justify-content: flex-start; }
  .charts .chart { height: 280px; }
  .data-card .card-heading { align-items: flex-start; }
  .table-wrap { overflow: visible; border: 0; }
  table.tbl, table.tbl tbody, table.tbl tr, table.tbl td { display: block; width: 100%; }
  table.tbl thead { display: none; }
  table.tbl tbody { display: grid; gap: 10px; }
  table.tbl tr { padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px; background: #fff; }
  table.tbl td { min-height: 30px; display: grid; grid-template-columns: minmax(82px, .42fr) 1fr; align-items: center; gap: 10px; padding: 5px 0; border: 0; text-align: right; }
  table.tbl td::before { content: attr(data-label); color: var(--text-3); font-size: 9px; text-align: left; }
  table.tbl td.actions-cell { display: block; margin-top: 6px; padding-top: 10px; border-top: 1px solid #edf0f4; }
  table.tbl td.actions-cell::before { display: none; }
  .row-actions { justify-content: flex-end; flex-wrap: wrap; }
  .answer-card { padding: 21px 18px; }
  .score-option small { display: none; }
}

@media (max-width: 480px) {
  .login-panel { padding: 28px 20px; }
  .login-mobile-brand { margin-bottom: 34px; }
  .login-card h2 { font-size: 25px; }
  .demo-accounts > div { grid-template-columns: 1fr; }
  .login-foot { display: none; }
  .stat-cards, .module-summary.three, .module-summary.four, .project-metrics { grid-template-columns: 1fr; }
  .stat-card { min-height: 133px; }
  .welcome-actions .btn { width: 100%; }
  .card-heading { align-items: flex-start; flex-direction: column; }
  .card-heading .btn { width: 100%; }
  .toolbar .btn { flex: 1; }
  .answer-wrap { padding-top: 18px; }
  .answer-head h1 { font-size: 20px; }
}

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

@media print {
  .sidebar, .topbar, .toolbar, .readonly-banner, .project-actions { display: none !important; }
  .main { margin: 0; }
  .content { max-width: none; padding: 0; }
  .card, .panel, .chart-box, .report-box { box-shadow: none; break-inside: avoid; }
}
