:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-strong: #eef3f8;
  --sidebar: #0b1020;
  --sidebar-soft: #12192c;
  --text: #172033;
  --muted: #6d7687;
  --muted-2: #94a0b3;
  --line: #e3e9f1;
  --line-strong: #d5deea;
  --primary: #285cf5;
  --primary-dark: #1e45c8;
  --primary-soft: #edf3ff;
  --teal: #0e9f8f;
  --teal-soft: #e7faf6;
  --amber: #d97706;
  --amber-soft: #fff7e6;
  --red: #dc3d50;
  --red-soft: #fff0f2;
  --violet: #7c3aed;
  --violet-soft: #f3edff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 18px rgba(15, 23, 42, .04);
  --shadow-md: 0 18px 50px rgba(15, 23, 42, .10);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --sidebar-w: 264px;
  --topbar-h: 76px;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: rgba(40, 92, 245, .18); }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar-w);
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% -5%, rgba(71, 105, 255, .25), transparent 28%),
    linear-gradient(180deg, #0d1426 0%, var(--sidebar) 100%);
  color: #dce4f4;
  border-right: 1px solid rgba(255, 255, 255, .05);
}
.brand-block {
  display: flex;
  align-items: center;
  min-height: 78px;
  padding: 16px 18px;
  gap: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.brand-logo-wrap {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.brand-logo { width: 100%; height: 100%; object-fit: cover; }
.brand-copy { display: flex; min-width: 0; flex-direction: column; }
.brand-copy strong { color: #fff; font-size: 18px; letter-spacing: .02em; }
.brand-copy span { color: #8f9bb1; font-size: 12px; }
.sidebar-close { display: none; margin-left: auto; }

.workspace-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 14px 8px;
  padding: 10px;
  cursor: default;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 13px;
  background: rgba(255, 255, 255, .045);
  transition: .2s ease;
}
.workspace-switcher:hover { background: rgba(255, 255, 255, .07); border-color: rgba(255,255,255,.12); }
.workspace-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: linear-gradient(135deg, #315df7, #5d7dff);
  color: #fff;
  font-weight: 700;
}
.workspace-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.workspace-copy strong { overflow: hidden; color: #f5f7fb; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-copy span { color: #8290a9; font-size: 11px; }
.workspace-switcher > svg { width: 16px; color: #75829a; }

.nav-groups { flex: 1; overflow-y: auto; padding: 6px 12px 18px; scrollbar-width: thin; }
.nav-label {
  margin: 19px 10px 7px;
  color: #697791;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  margin: 3px 0;
  padding: 0 10px;
  gap: 10px;
  border-radius: 11px;
  color: #aeb9cd;
  font-size: 13px;
  font-weight: 500;
  transition: .18s ease;
}
.nav-item:hover { color: #eef2fb; background: rgba(255, 255, 255, .055); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(52, 95, 246, .92), rgba(62, 100, 242, .70));
  box-shadow: 0 8px 24px rgba(28, 65, 199, .24);
}
.nav-item.active::before {
  position: absolute;
  left: -12px;
  width: 3px;
  height: 22px;
  border-radius: 0 4px 4px 0;
  background: #86a5ff;
  content: "";
}
.nav-icon { display: grid; width: 22px; height: 22px; place-items: center; flex: 0 0 auto; }
.nav-icon svg { width: 19px; height: 19px; }
.nav-item em {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 99px;
  background: rgba(255,255,255,.14);
  color: #dfe7ff;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}
.nav-item i {
  display: grid;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0 5px;
  place-items: center;
  border-radius: 99px;
  background: rgba(255,255,255,.08);
  color: #8f9db5;
  font-size: 10px;
  font-style: normal;
}
.nav-item.active i { color: #fff; background: rgba(255,255,255,.15); }

.sidebar-bottom { padding: 12px; border-top: 1px solid rgba(255,255,255,.06); }
.usage-card {
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
}
.usage-row { display: flex; justify-content: space-between; color: #9da9bd; font-size: 11px; }
.usage-row strong { color: #dce5f5; }
.progress { height: 5px; margin: 9px 0 7px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.08); }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4a75ff, #7e9cff); }
.usage-card small { color: #65728a; font-size: 10px; }
.sidebar-user { display: flex; align-items: center; gap: 9px; padding: 7px 5px; }
.sidebar-user > div:not(.avatar) { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.sidebar-user strong { color: #eef3fb; font-size: 12px; }
.sidebar-user span { color: #6f7e96; font-size: 10px; }
.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8b26d, #ca7c34);
  color: #fff;
  font-weight: 700;
}
.sidebar-user .icon-button { color: #66758e; }

.app-main { width: calc(100% - var(--sidebar-w)); min-height: 100vh; margin-left: var(--sidebar-w); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  min-height: var(--topbar-h);
  align-items: center;
  justify-content: space-between;
  padding: 11px 28px;
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid rgba(222, 230, 240, .88);
  backdrop-filter: blur(18px);
}
.topbar-left, .topbar-actions { display: flex; align-items: center; gap: 12px; }
.page-title-wrap { display: flex; flex-direction: column; }
.page-title-wrap h1 { margin: 0; color: #182035; font-size: 19px; line-height: 1.35; letter-spacing: -.01em; }
.page-title-wrap span { color: var(--muted-2); font-size: 11px; }
.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  background: transparent;
  transition: .18s ease;
}
.icon-button:hover { background: rgba(148, 163, 184, .12); }
.icon-button svg { width: 19px; height: 19px; }
.mobile-menu { display: none; }
.command-button {
  display: flex;
  width: 250px;
  height: 38px;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  color: #8490a1;
  text-align: left;
  transition: .18s ease;
}
.command-button:hover { border-color: #cbd5e1; background: #fff; box-shadow: var(--shadow-sm); }
.command-button svg { width: 16px; }
.command-button span { flex: 1; font-size: 12px; }
kbd { padding: 2px 6px; border: 1px solid #dfe5ed; border-bottom-width: 2px; border-radius: 5px; background: #fff; color: #98a2b3; font-size: 10px; }
.topbar-icon { border: 1px solid var(--line); color: #758197; }
.notification-button { position: relative; }
.notification-button > span { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border: 1px solid #fff; border-radius: 50%; background: #ef476f; }
.ai-status {
  display: flex;
  height: 30px;
  align-items: center;
  padding: 0 10px;
  gap: 7px;
  border: 1px solid #dbe2ec;
  border-radius: 99px;
  background: #fff;
  color: #667085;
  font-size: 11px;
  font-weight: 600;
}
.ai-status span { width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.12); }
.ai-status.live span { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.12); }

.page-container { max-width: 1560px; min-height: calc(100vh - var(--topbar-h)); margin: 0 auto; padding: 26px 28px 48px; outline: none; }
.page-enter { animation: pageEnter .28s ease both; }
@keyframes pageEnter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 82% 15%, rgba(132, 165, 255, .34), transparent 22%),
    radial-gradient(circle at 65% 120%, rgba(41, 215, 190, .18), transparent 34%),
    linear-gradient(115deg, #172553 0%, #2349b3 58%, #2b62e9 100%);
  color: #fff;
  box-shadow: 0 24px 60px rgba(26, 62, 164, .18);
}
.hero-card::after {
  position: absolute;
  inset: 0;
  opacity: .08;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to left, #000, transparent 75%);
  content: "";
}
.hero-content { position: relative; z-index: 2; padding: 34px 36px; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; color: rgba(255,255,255,.72); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.eyebrow span { width: 20px; height: 1px; background: rgba(255,255,255,.5); }
.hero-content h2 { max-width: 640px; margin: 0 0 10px; font-size: clamp(25px, 3vw, 37px); line-height: 1.25; letter-spacing: -.035em; }
.hero-content p { max-width: 620px; margin: 0; color: rgba(235, 241, 255, .76); font-size: 13px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-visual { position: relative; z-index: 2; display: grid; place-items: center; }
.hero-orbit { position: relative; width: 180px; height: 180px; }
.orbit-ring { position: absolute; inset: 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; animation: spin 24s linear infinite; }
.orbit-ring::before, .orbit-ring::after { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #8de9d8; box-shadow: 0 0 18px rgba(141,233,216,.8); content: ""; }
.orbit-ring::before { top: 9px; left: 27px; }
.orbit-ring::after { right: 3px; bottom: 45px; background: #b5c7ff; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-ai-core {
  position: absolute;
  inset: 41px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,.24), rgba(255,255,255,.07));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 18px 45px rgba(4,18,67,.25);
  backdrop-filter: blur(10px);
  transform: rotate(8deg);
}
.hero-ai-core svg { width: 46px; height: 46px; stroke-width: 1.35; transform: rotate(-8deg); }

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  gap: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  transition: .18s ease;
  box-shadow: 0 6px 16px rgba(40,92,245,.16);
}
.button:hover { transform: translateY(-1px); background: var(--primary-dark); box-shadow: 0 9px 22px rgba(40,92,245,.22); }
.button:active { transform: none; }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.button svg { width: 16px; height: 16px; }
.button.secondary { border-color: var(--line); background: #fff; color: #475467; box-shadow: none; }
.button.secondary:hover { border-color: #c7d2e1; background: #f8fafc; }
.button.ghost { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.12); color: #fff; box-shadow: none; backdrop-filter: blur(6px); }
.button.ghost:hover { background: rgba(255,255,255,.18); }
.button.soft { background: var(--primary-soft); color: var(--primary); box-shadow: none; }
.button.soft:hover { background: #e1eaff; }
.button.danger-soft { background: var(--red-soft); color: var(--red); box-shadow: none; }
.button.small { min-height: 32px; padding: 0 11px; border-radius: 8px; font-size: 11px; }
.button.large { min-height: 44px; padding: 0 20px; font-size: 13px; }
.button.full { width: 100%; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 126px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.stat-card::after { position: absolute; right: -22px; bottom: -24px; width: 86px; height: 86px; border-radius: 50%; background: var(--stat-soft, var(--primary-soft)); content: ""; }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: var(--stat-soft, var(--primary-soft)); color: var(--stat-color, var(--primary)); }
.stat-icon svg { width: 19px; height: 19px; }
.stat-trend { display: inline-flex; align-items: center; gap: 3px; color: #12a474; font-size: 10px; font-weight: 700; }
.stat-value { margin-top: 16px; font-size: 26px; font-weight: 750; line-height: 1; letter-spacing: -.03em; }
.stat-label { margin-top: 6px; color: var(--muted); font-size: 11px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(310px, .6fr); gap: 18px; margin-top: 20px; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card-header { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-title { display: flex; flex-direction: column; }
.card-title h3 { margin: 0; color: #20283a; font-size: 15px; }
.card-title p { margin: 3px 0 0; color: var(--muted-2); font-size: 10px; }
.card-body { padding: 20px; }
.text-link { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-size: 11px; font-weight: 600; }
.text-link svg { width: 14px; height: 14px; }

.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quick-action {
  display: flex;
  min-height: 92px;
  align-items: center;
  gap: 12px;
  padding: 15px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  text-align: left;
  transition: .18s ease;
}
.quick-action:hover { border-color: #c7d5f3; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(37,61,118,.08); }
.quick-action-icon { display: grid; width: 42px; height: 42px; place-items: center; flex: 0 0 auto; border-radius: 12px; background: var(--q-soft); color: var(--q-color); }
.quick-action-icon svg { width: 21px; height: 21px; }
.quick-action-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.quick-action-copy strong { font-size: 13px; }
.quick-action-copy span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.quick-action > svg { width: 16px; color: #b2bdcc; }

.activity-list { display: flex; flex-direction: column; }
.activity-item { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.activity-item:last-child { border: 0; }
.activity-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--a-soft); color: var(--a-color); }
.activity-icon svg { width: 17px; height: 17px; }
.activity-copy { display: flex; min-width: 0; flex-direction: column; }
.activity-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.activity-copy span { color: var(--muted-2); font-size: 10px; }
.activity-item time { color: var(--muted-2); font-size: 10px; }

.insight-card { position: relative; overflow: hidden; padding: 21px; border-radius: var(--radius); background: linear-gradient(145deg, #0f766e, #0c9b8a); color: #fff; box-shadow: 0 18px 40px rgba(15,118,110,.18); }
.insight-card::after { position: absolute; right: -32px; bottom: -32px; width: 130px; height: 130px; border: 24px solid rgba(255,255,255,.06); border-radius: 50%; content: ""; }
.insight-card small { color: rgba(255,255,255,.65); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.insight-card h3 { max-width: 290px; margin: 10px 0 8px; font-size: 19px; line-height: 1.45; }
.insight-card p { max-width: 340px; margin: 0; color: rgba(255,255,255,.72); font-size: 11px; line-height: 1.75; }
.insight-card .button { position: relative; z-index: 2; margin-top: 17px; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.13); box-shadow: none; }

.efficiency-card { margin-top: 18px; }
.efficiency-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.efficiency-row + .efficiency-row { border-top: 1px solid var(--line); }
.efficiency-label { display: flex; align-items: center; gap: 9px; color: #475467; font-size: 11px; }
.efficiency-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 0 4px var(--dot-soft); }
.efficiency-row strong { font-size: 12px; }

.page-grid { display: grid; grid-template-columns: minmax(320px, 390px) minmax(0, 1fr); gap: 20px; align-items: start; }
.form-card { position: sticky; top: calc(var(--topbar-h) + 20px); }
.panel-head { padding: 20px 20px 0; }
.panel-head h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.panel-head p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.form-section { padding: 19px 20px 20px; }
.form-section + .form-section { border-top: 1px solid var(--line); }
.form-section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.form-section-title strong { font-size: 12px; }
.form-section-title span { color: var(--muted-2); font-size: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-group { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { color: #495366; font-size: 11px; font-weight: 650; }
.form-group label small { margin-left: 4px; color: var(--muted-2); font-weight: 400; }
.input, .textarea, .select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  outline: 0;
  transition: .18s ease;
}
.input, .select { height: 39px; padding: 0 11px; }
.textarea { min-height: 98px; padding: 10px 11px; line-height: 1.65; resize: vertical; }
.input:hover, .textarea:hover, .select:hover { border-color: #bac6d6; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(40,92,245,.10); }
.input::placeholder, .textarea::placeholder { color: #b1bac8; }
.input-hint { color: var(--muted-2); font-size: 9px; }
.input-with-action { position: relative; }
.input-with-action .input { padding-right: 56px; }
.input-action { position: absolute; top: 50%; right: 7px; transform: translateY(-50%); border: 0; background: none; color: var(--primary); font-size: 10px; font-weight: 650; cursor: pointer; }

.segmented { display: flex; padding: 3px; gap: 3px; border: 1px solid var(--line); border-radius: 10px; background: #f6f8fb; }
.segmented label { flex: 1; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: flex; min-height: 31px; align-items: center; justify-content: center; cursor: pointer; border-radius: 7px; color: #758095; font-size: 10px; transition: .16s ease; }
.segmented input:checked + span { background: #fff; color: var(--primary); font-weight: 650; box-shadow: 0 1px 5px rgba(15,23,42,.08); }

.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.check-item { display: flex; min-height: 38px; align-items: center; gap: 8px; padding: 0 10px; cursor: pointer; border: 1px solid var(--line); border-radius: 9px; color: #596579; font-size: 10px; transition: .16s ease; }
.check-item:hover { border-color: #c7d4e7; }
.check-item input { width: 14px; height: 14px; accent-color: var(--primary); }
.check-item:has(input:checked) { border-color: #bfd0ff; background: var(--primary-soft); color: var(--primary); }

.result-panel { min-height: 620px; }
.result-toolbar { display: flex; min-height: 58px; align-items: center; justify-content: space-between; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.result-title { display: flex; align-items: center; gap: 10px; }
.result-title-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: var(--primary-soft); color: var(--primary); }
.result-title-icon svg { width: 17px; height: 17px; }
.result-title strong { font-size: 13px; }
.result-title span { display: block; color: var(--muted-2); font-size: 9px; }
.toolbar-actions { display: flex; align-items: center; gap: 7px; }
.result-content { padding: 20px; }
.empty-state { display: flex; min-height: 530px; align-items: center; justify-content: center; padding: 36px; text-align: center; }
.empty-state-inner { max-width: 390px; }
.empty-illustration { position: relative; display: grid; width: 110px; height: 110px; margin: 0 auto 20px; place-items: center; border-radius: 32px; background: linear-gradient(145deg, #f0f5ff, #e8efff); color: var(--primary); }
.empty-illustration::before, .empty-illustration::after { position: absolute; border-radius: 50%; content: ""; }
.empty-illustration::before { top: -8px; right: -8px; width: 28px; height: 28px; border: 5px solid #dbe7ff; }
.empty-illustration::after { bottom: -10px; left: -14px; width: 18px; height: 18px; background: #d8f6ef; }
.empty-illustration svg { width: 49px; height: 49px; stroke-width: 1.25; }
.empty-state h3 { margin: 0 0 7px; font-size: 16px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.empty-tips { display: flex; justify-content: center; gap: 9px; margin-top: 18px; }
.empty-tips span { padding: 5px 9px; border-radius: 99px; background: #f4f6f9; color: #8590a2; font-size: 9px; }

.loading-state { display: flex; min-height: 530px; align-items: center; justify-content: center; text-align: center; }
.ai-loader { position: relative; width: 62px; height: 62px; margin: 0 auto 18px; }
.ai-loader span { position: absolute; inset: 0; border: 2px solid #d9e4ff; border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
.ai-loader i { position: absolute; inset: 16px; display: grid; place-items: center; border-radius: 13px; background: var(--primary-soft); color: var(--primary); font-size: 16px; font-style: normal; font-weight: 800; }
.loading-state h3 { margin: 0; font-size: 15px; }
.loading-state p { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.loading-steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 17px; }
.loading-steps span { padding: 5px 9px; border-radius: 99px; background: #f1f4f8; color: #7d8899; font-size: 9px; }
.loading-steps span.active { background: var(--primary-soft); color: var(--primary); }

.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: #f3f6fa; }
.tab { min-height: 32px; padding: 0 12px; cursor: pointer; border: 0; border-radius: 7px; background: transparent; color: #7b8798; font-size: 10px; }
.tab.active { background: #fff; color: var(--primary); font-weight: 650; box-shadow: 0 1px 5px rgba(15,23,42,.08); }

.document { color: #293247; }
.document-head { padding: 22px; border: 1px solid #dce5f2; border-radius: 13px; background: linear-gradient(135deg, #fbfcff, #f3f7ff); text-align: center; }
.document-head .doc-tag { display: inline-flex; margin-bottom: 10px; padding: 4px 9px; border-radius: 99px; background: var(--primary-soft); color: var(--primary); font-size: 9px; font-weight: 700; }
.document-head h2 { margin: 0; font-size: 21px; }
.document-head p { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.doc-section { margin-top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; }
.doc-section h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 13px; color: #263147; font-size: 14px; }
.doc-section h3 span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 7px; background: var(--primary-soft); color: var(--primary); font-size: 10px; }
.doc-section ul, .doc-section ol { margin: 0; padding-left: 20px; }
.doc-section li { margin: 7px 0; color: #4b576c; font-size: 11px; line-height: 1.75; }
.keypoint-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.keypoint-box { padding: 13px; border-radius: 10px; background: #f7f9fc; }
.keypoint-box strong { display: block; margin-bottom: 6px; font-size: 11px; }
.keypoint-box p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.flow-table { width: 100%; border-collapse: collapse; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; font-size: 10px; }
.flow-table th { padding: 9px; background: #f5f7fa; color: #596579; text-align: left; }
.flow-table td { padding: 10px 9px; border-top: 1px solid var(--line); color: #515d71; vertical-align: top; line-height: 1.6; }
.flow-table .time { color: var(--primary); font-weight: 700; white-space: nowrap; }
.board-design { padding: 24px; border-radius: 12px; background: #1c2930; color: #f0f5f4; font-family: "KaiTi", "STKaiti", serif; text-align: center; box-shadow: inset 0 0 20px rgba(0,0,0,.25); }
.board-design h4 { margin: 0 0 18px; font-size: 18px; font-weight: 500; }
.board-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.board-columns div { padding: 13px 8px; border: 1px dashed rgba(255,255,255,.25); border-radius: 8px; }
.board-columns strong { display: block; margin-bottom: 7px; color: #8ce7d8; font-size: 12px; }
.board-columns span { color: rgba(255,255,255,.75); font-size: 10px; line-height: 1.7; }

.essay-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 16px; }
.essay-input-wrap { position: relative; }
.essay-textarea { min-height: 420px; padding: 18px; font-size: 13px; line-height: 1.9; }
.essay-counter { position: absolute; right: 12px; bottom: 10px; padding: 3px 7px; border-radius: 6px; background: rgba(255,255,255,.9); color: var(--muted-2); font-size: 9px; }
.upload-zone { display: flex; min-height: 94px; align-items: center; justify-content: center; padding: 15px; cursor: pointer; border: 1px dashed #cfd8e6; border-radius: 11px; background: #fafcff; color: #768397; text-align: center; transition: .18s ease; }
.upload-zone:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.upload-zone svg { width: 22px; height: 22px; margin: 0 auto 7px; }
.upload-zone strong { display: block; font-size: 10px; }
.upload-zone span { display: block; margin-top: 3px; font-size: 9px; }

.score-hero { display: grid; grid-template-columns: 160px 1fr; gap: 20px; align-items: center; padding: 20px; border: 1px solid #dfe7f3; border-radius: 14px; background: linear-gradient(145deg, #f9fbff, #f1f6ff); }
.score-ring { --score: 85; position: relative; display: grid; width: 124px; height: 124px; margin: auto; place-items: center; border-radius: 50%; background: conic-gradient(var(--primary) calc(var(--score) * 1%), #e4eaf3 0); }
.score-ring::before { position: absolute; inset: 9px; border-radius: 50%; background: #fff; content: ""; }
.score-value { position: relative; text-align: center; }
.score-value strong { display: block; font-size: 33px; line-height: 1; }
.score-value span { color: var(--muted); font-size: 10px; }
.score-summary .level { display: inline-flex; padding: 4px 9px; border-radius: 99px; background: var(--teal-soft); color: var(--teal); font-size: 9px; font-weight: 700; }
.score-summary h2 { margin: 10px 0 7px; font-size: 20px; }
.score-summary p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.rubric-list { display: flex; flex-direction: column; gap: 13px; }
.rubric-item { display: grid; grid-template-columns: 72px 1fr 48px; gap: 10px; align-items: center; }
.rubric-label strong { display: block; font-size: 11px; }
.rubric-label span { color: var(--muted-2); font-size: 9px; }
.rubric-bar { height: 7px; overflow: hidden; border-radius: 99px; background: #e9edf3; }
.rubric-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3a6cf6, #6e91ff); }
.rubric-score { color: #455166; font-size: 11px; font-weight: 700; text-align: right; }
.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.review-box { padding: 15px; border-radius: 11px; background: #f7f9fc; }
.review-box.good { background: var(--teal-soft); }
.review-box.warn { background: var(--amber-soft); }
.review-box strong { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 11px; }
.review-box p, .review-box li { margin: 0; color: #5b6577; font-size: 10px; line-height: 1.75; }
.review-box ul { margin: 0; padding-left: 17px; }
.sentence-edit { padding: 13px 0; border-bottom: 1px dashed var(--line); }
.sentence-edit:last-child { border: 0; }
.sentence-edit .original, .sentence-edit .revision { display: grid; grid-template-columns: 38px 1fr; gap: 8px; margin: 6px 0; font-size: 10px; line-height: 1.7; }
.sentence-edit b { color: var(--muted-2); font-weight: 600; }
.sentence-edit .revision b { color: var(--teal); }
.teacher-comment { padding: 20px; border-left: 4px solid var(--primary); border-radius: 0 12px 12px 0; background: #f4f7ff; color: #465269; font-family: "KaiTi", "STKaiti", serif; font-size: 14px; line-height: 1.9; }

.paper { padding: 28px 34px; border: 1px solid #dfe5ec; border-radius: 10px; background: #fff; color: #1f2937; box-shadow: 0 4px 16px rgba(15,23,42,.04); }
.paper-head { margin-bottom: 26px; text-align: center; }
.paper-head .confidential { color: #9aa3b1; font-size: 9px; letter-spacing: .1em; }
.paper-head h2 { margin: 11px 0 7px; font-family: "SimSun", serif; font-size: 22px; }
.paper-head p { margin: 0; color: #647084; font-size: 10px; }
.paper-meta { display: flex; justify-content: center; gap: 28px; margin-top: 15px; font-size: 10px; }
.paper-section { margin-top: 24px; }
.paper-section h3 { margin: 0 0 12px; padding: 9px 11px; border-left: 4px solid #333; background: #f5f5f5; font-family: "SimSun", serif; font-size: 14px; }
.paper-section .instruction { margin: 0 0 14px; color: #5b6473; font-size: 10px; }
.question { margin: 15px 0; font-family: "SimSun", serif; font-size: 12px; line-height: 1.85; }
.question-no { margin-right: 5px; font-weight: 700; }
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 20px; margin: 8px 0 0 20px; }
.answer-lines { min-height: 55px; margin-top: 9px; background: repeating-linear-gradient(to bottom, transparent, transparent 26px, #e8e8e8 27px); }
.answer-key { margin-top: 20px; padding: 20px; border-radius: 12px; background: #f7f9fc; }
.answer-key h3 { margin: 0 0 13px; font-size: 14px; }
.answer-item { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 10px; line-height: 1.7; }
.answer-item:last-child { border: 0; }
.answer-item strong { color: var(--primary); }

.knowledge-layout { display: grid; grid-template-columns: 330px minmax(0,1fr); gap: 18px; }
.kb-sidebar-card { min-height: 630px; }
.kb-search { position: relative; }
.kb-search svg { position: absolute; top: 50%; left: 11px; width: 15px; color: #9aa5b6; transform: translateY(-50%); }
.kb-search .input { padding-left: 34px; }
.doc-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.doc-item { display: grid; grid-template-columns: 35px 1fr auto; gap: 10px; align-items: center; padding: 10px; cursor: pointer; border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: .16s ease; }
.doc-item:hover, .doc-item.active { border-color: #c6d5fb; background: #f7faff; }
.doc-file-icon { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 9px; background: var(--primary-soft); color: var(--primary); }
.doc-file-icon svg { width: 17px; height: 17px; }
.doc-info { min-width: 0; }
.doc-info strong { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.doc-info span { color: var(--muted-2); font-size: 9px; }
.doc-actions { display: flex; gap: 2px; }
.doc-actions button { width: 25px; height: 25px; color: #9aa5b5; }
.kb-main { min-height: 630px; }
.kb-hero { padding: 24px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, #f7faff, #f2fbf9); }
.kb-hero h2 { margin: 0; font-size: 19px; }
.kb-hero p { max-width: 680px; margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.kb-stats { display: flex; gap: 20px; margin-top: 17px; }
.kb-stat strong { display: block; font-size: 16px; }
.kb-stat span { color: var(--muted-2); font-size: 9px; }
.chat-area { display: flex; min-height: 455px; flex-direction: column; }
.chat-messages { flex: 1; padding: 20px; }
.chat-welcome { display: flex; min-height: 300px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.chat-welcome-icon { display: grid; width: 60px; height: 60px; place-items: center; border-radius: 18px; background: linear-gradient(135deg, var(--primary-soft), var(--teal-soft)); color: var(--primary); }
.chat-welcome-icon svg { width: 29px; height: 29px; }
.chat-welcome h3 { margin: 15px 0 6px; font-size: 14px; }
.chat-welcome p { max-width: 440px; margin: 0; color: var(--muted); font-size: 10px; }
.suggestion-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 15px; }
.suggestion-chip { padding: 6px 10px; cursor: pointer; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: #647084; font-size: 9px; transition: .16s ease; }
.suggestion-chip:hover { border-color: #bdcdf3; color: var(--primary); }
.chat-message { display: flex; gap: 10px; margin: 13px 0; }
.chat-message.user { justify-content: flex-end; }
.chat-bubble { max-width: 82%; padding: 11px 13px; border-radius: 12px 12px 12px 3px; background: #f1f4f8; color: #4c586b; font-size: 10px; line-height: 1.75; }
.chat-message.user .chat-bubble { border-radius: 12px 12px 3px 12px; background: var(--primary); color: #fff; }
.chat-answer { padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.chat-answer h4 { margin: 0 0 10px; font-size: 12px; }
.chat-answer p { margin: 0; color: #4f5a6c; font-size: 10px; line-height: 1.85; white-space: pre-wrap; }
.evidence-list { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.evidence-item { padding: 9px 10px; border-radius: 8px; background: #f5f7fa; color: #667085; font-size: 9px; }
.evidence-item strong { color: var(--primary); }
.chat-composer { display: flex; align-items: flex-end; gap: 9px; padding: 14px 18px; border-top: 1px solid var(--line); background: #fff; }
.chat-composer .textarea { min-height: 42px; max-height: 120px; resize: none; }
.chat-send { width: 42px; height: 42px; flex: 0 0 auto; }

.template-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.template-card { display: flex; min-height: 90px; flex-direction: column; justify-content: space-between; padding: 13px; cursor: pointer; border: 1px solid var(--line); border-radius: 11px; background: #fff; text-align: left; transition: .17s ease; }
.template-card:hover, .template-card.active { border-color: #bcd0ff; background: var(--primary-soft); }
.template-card svg { width: 20px; height: 20px; color: var(--primary); }
.template-card strong { margin-top: 11px; font-size: 11px; }
.template-card span { color: var(--muted); font-size: 9px; }
.notice-preview { max-width: 730px; margin: 0 auto; padding: 34px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 8px 28px rgba(15,23,42,.06); }
.notice-preview h2 { margin: 0 0 20px; text-align: center; font-size: 20px; }
.notice-preview .notice-body { color: #475467; font-size: 12px; line-height: 2; white-space: pre-wrap; }
.notice-preview .notice-signature { margin-top: 25px; color: #667085; text-align: right; font-size: 11px; line-height: 1.8; }

.settings-grid { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 18px; }
.setting-section { padding: 20px; }
.setting-section + .setting-section { border-top: 1px solid var(--line); }
.setting-section h3 { margin: 0 0 4px; font-size: 14px; }
.setting-section > p { margin: 0 0 17px; color: var(--muted); font-size: 10px; }
.settings-profile { display: flex; gap: 15px; align-items: center; }
.large-avatar { display: grid; width: 64px; height: 64px; place-items: center; border-radius: 18px; background: linear-gradient(135deg, #e9b270, #c57a35); color: #fff; font-size: 21px; font-weight: 800; }
.profile-meta h4 { margin: 0; font-size: 15px; }
.profile-meta p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.status-list { display: flex; flex-direction: column; }
.status-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.status-row:last-child { border: 0; }
.status-label { display: flex; align-items: center; gap: 9px; }
.status-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: #f3f6fa; color: #667085; }
.status-icon svg { width: 16px; height: 16px; }
.status-label strong { display: block; font-size: 11px; }
.status-label span { display: block; color: var(--muted-2); font-size: 9px; }
.badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 99px; background: #f1f3f6; color: #667085; font-size: 9px; font-weight: 700; }
.badge.success { background: var(--teal-soft); color: var(--teal); }
.badge.warning { background: var(--amber-soft); color: var(--amber); }
.commercial-card { overflow: hidden; }
.commercial-banner { padding: 24px; background: linear-gradient(135deg, #171f35, #243c78); color: #fff; }
.commercial-banner small { color: #8fa8df; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.commercial-banner h3 { margin: 9px 0 7px; font-size: 19px; }
.commercial-banner p { margin: 0; color: rgba(255,255,255,.65); font-size: 10px; line-height: 1.75; }
.commercial-features { padding: 18px; }
.commercial-feature { display: flex; align-items: flex-start; gap: 9px; padding: 9px 0; }
.commercial-feature svg { width: 16px; color: var(--teal); }
.commercial-feature strong { display: block; font-size: 10px; }
.commercial-feature span { display: block; color: var(--muted); font-size: 9px; }

.search-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding-top: min(14vh, 120px); background: rgba(8,15,30,.45); backdrop-filter: blur(5px); }
.search-dialog { width: min(650px, calc(100vw - 28px)); overflow: hidden; border: 1px solid rgba(255,255,255,.35); border-radius: 16px; background: #fff; box-shadow: 0 30px 90px rgba(5,12,28,.26); animation: modalIn .18s ease both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(-8px) scale(.985); } to { opacity: 1; transform: none; } }
.search-input-wrap { display: flex; height: 60px; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.search-input-wrap svg { width: 20px; color: #7d899a; }
.search-input-wrap input { flex: 1; border: 0; outline: 0; font-size: 14px; }
.search-results { max-height: 430px; overflow-y: auto; padding: 10px; }
.search-group-title { padding: 9px 9px 5px; color: var(--muted-2); font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.search-result { display: flex; align-items: center; gap: 11px; padding: 10px; cursor: pointer; border-radius: 10px; }
.search-result:hover { background: #f4f7fb; }
.search-result-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--primary-soft); color: var(--primary); }
.search-result-icon svg { width: 16px; }
.search-result-copy { flex: 1; }
.search-result-copy strong { display: block; font-size: 11px; }
.search-result-copy span { display: block; color: var(--muted); font-size: 9px; }
.search-result > svg { width: 14px; color: #aab3c0; }
.modal-card { width: min(620px, calc(100vw - 28px)); padding: 0; border: 0; border-radius: 16px; background: #fff; box-shadow: var(--shadow-md); }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(8,15,30,.45); backdrop-filter: blur(5px); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.modal-header h3 { margin: 0; font-size: 15px; }
.modal-body { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 20px; border-top: 1px solid var(--line); }

.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; width: min(360px, calc(100vw - 32px)); flex-direction: column; gap: 9px; }
.toast { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 12px 13px; border: 1px solid #dfe6ef; border-radius: 12px; background: rgba(255,255,255,.96); box-shadow: 0 16px 40px rgba(15,23,42,.14); backdrop-filter: blur(8px); animation: toastIn .22s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateX(12px); } }
.toast-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--teal-soft); color: var(--teal); }
.toast.error .toast-icon { background: var(--red-soft); color: var(--red); }
.toast-icon svg { width: 15px; }
.toast strong { display: block; font-size: 10px; }
.toast span { display: block; color: var(--muted); font-size: 9px; }
.toast button { border: 0; background: none; color: #9aa4b2; cursor: pointer; }

.markdown-output { color: #485469; font-size: 11px; line-height: 1.8; }
.markdown-output h2, .markdown-output h3 { color: #202a3d; }
.markdown-output pre { overflow-x: auto; padding: 12px; border-radius: 9px; background: #172033; color: #e6edf7; }
.text-muted { color: var(--muted); }
.text-primary { color: var(--primary); }
.divider { height: 1px; margin: 16px 0; background: var(--line); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.hidden { display: none !important; }

.sidebar-overlay { display: none; }
@media (max-width: 1180px) {
  :root { --sidebar-w: 238px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero-card { grid-template-columns: 1fr 250px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid > div:last-child { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
  .efficiency-card { margin-top: 0; }
  .essay-layout { grid-template-columns: 1fr; }
  .essay-layout > aside { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 272px; }
  .sidebar { transform: translateX(-100%); box-shadow: 20px 0 60px rgba(4,10,25,.28); transition: transform .25s ease; }
  .sidebar.open { transform: none; }
  .sidebar-close { display: grid; }
  .sidebar-overlay { position: fixed; inset: 0; z-index: 35; display: block; pointer-events: none; background: rgba(6,12,25,.45); opacity: 0; transition: opacity .25s ease; }
  .sidebar-overlay.show { pointer-events: auto; opacity: 1; }
  .app-main { width: 100%; margin-left: 0; }
  .mobile-menu { display: grid; }
  .command-button { width: 42px; justify-content: center; }
  .command-button span, .command-button kbd { display: none; }
  .page-grid { grid-template-columns: 1fr; }
  .form-card { position: static; }
  .knowledge-layout { grid-template-columns: 1fr; }
  .kb-sidebar-card { min-height: auto; }
}

@media (max-width: 680px) {
  :root { --topbar-h: 66px; }
  .topbar { padding: 9px 14px; }
  .page-title-wrap span { display: none; }
  .page-title-wrap h1 { font-size: 16px; }
  .topbar-actions { gap: 6px; }
  .ai-status { display: none; }
  .topbar-icon { display: none; }
  .page-container { padding: 16px 14px 36px; }
  .hero-card { display: block; min-height: auto; }
  .hero-content { padding: 26px 22px; }
  .hero-content p { font-size: 11px; }
  .hero-visual { display: none; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 12px; }
  .stat-card { min-height: 112px; padding: 15px; }
  .stat-value { font-size: 22px; }
  .dashboard-grid { gap: 12px; margin-top: 12px; }
  .dashboard-grid > div:last-child { display: block; }
  .efficiency-card { margin-top: 12px; }
  .quick-grid { grid-template-columns: 1fr; }
  .card-header { padding: 14px 15px; }
  .card-body, .result-content { padding: 15px; }
  .form-section, .panel-head { padding-left: 15px; padding-right: 15px; }
  .form-grid, .check-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: auto; }
  .result-toolbar { align-items: flex-start; gap: 9px; }
  .toolbar-actions .button span { display: none; }
  .document-head { padding: 16px; }
  .document-head h2 { font-size: 17px; }
  .keypoint-grid, .review-grid, .template-grid { grid-template-columns: 1fr; }
  .flow-table { display: block; overflow-x: auto; white-space: nowrap; }
  .board-columns { grid-template-columns: 1fr; }
  .score-hero { grid-template-columns: 1fr; text-align: center; }
  .rubric-item { grid-template-columns: 62px 1fr 40px; }
  .paper { padding: 20px 16px; }
  .paper-meta { gap: 10px; flex-wrap: wrap; }
  .options { grid-template-columns: 1fr; }
  .kb-stats { gap: 12px; }
  .chat-bubble { max-width: 94%; }
  .notice-preview { padding: 22px 18px; }
  .settings-profile { align-items: flex-start; }
  .toast-stack { right: 16px; bottom: 16px; }
}

@media print {
  body { background: #fff; }
  .sidebar, .topbar, .form-card, .result-toolbar, .toast-stack { display: none !important; }
  .app-main { width: 100%; margin: 0; }
  .page-container { max-width: none; padding: 0; }
  .page-grid { display: block; }
  .card, .paper { border: 0; box-shadow: none; }
  .result-content { padding: 0; }
}

/* Keep the mobile-only close control hidden on desktop despite the shared icon-button display rule. */
.sidebar .sidebar-close { display: none; }
@media (max-width: 900px) {
  .sidebar .sidebar-close { display: grid; }
}
