﻿:root {
  --bg: #d7e8ee;
  --workspace: #f5f8fb;
  --panel: #ffffff;
  --panel-soft: #f8fbfd;
  --panel-tint: #fbfdff;
  --text: #26364a;
  --muted: #7a8798;
  --line: #e4ebf2;
  --line-soft: #edf3f8;
  --card-line: #dfe8f1;
  --primary: #2f6df6;
  --primary-dark: #2459d4;
  --success: #2abb98;
  --danger: #b42318;
  --warning: #b7791f;
  --accent: #21c0d8;
  --shadow: 0 18px 45px rgba(64, 92, 112, 0.14);
  --soft-shadow: 0 8px 24px rgba(76, 102, 121, 0.08);
  --card-shadow: 0 10px 26px rgba(78, 105, 126, 0.09);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0;
}

.admin-theme {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 0, rgba(255, 255, 255, 0.65), transparent 32%),
    linear-gradient(135deg, #d9ebf1 0%, #cfe2e8 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  min-height: calc(100vh - 56px);
  min-height: calc(100dvh - 56px);
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background: var(--workspace);
  box-shadow: var(--shadow);
}

.sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 22px;
  background: #ffffff;
  color: #637083;
  padding: 22px 16px;
  border-right: 1px solid #edf2f7;
  min-width: 0;
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  min-width: 0;
}

.brand-copy {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.brand-copy strong {
  display: block;
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #45d4d8, #2f6df6);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(47, 109, 246, 0.28);
}

.brand-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 8px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid #dbe7f0;
  box-shadow: 0 10px 24px rgba(47, 109, 246, 0.16);
}

.sidebar nav {
  display: grid;
  align-content: start;
  justify-items: stretch;
  gap: 10px;
}

.sidebar nav a {
  position: relative;
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-radius: 8px;
  color: #667383;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.sidebar nav a.active,
.sidebar nav a:hover {
  background: #eaf2ff;
  color: var(--primary);
  box-shadow: inset 3px 0 0 var(--primary);
}

.nav-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  color: inherit;
}

.nav-icon svg {
  width: 21px;
  height: 21px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar nav a:hover .nav-label {
  color: inherit;
}

.main {
  min-width: 0;
  padding: 0 24px 24px;
  background: var(--workspace);
  overflow: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 74px;
  margin: 0 -24px 20px;
  padding: 0 26px;
  border-bottom: 1px solid #e8eef5;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.topbar-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.topbar-title strong {
  font-size: 16px;
}

.topbar-title span,
.topbar-user span {
  color: var(--muted);
  font-size: 12px;
}

.topbar-spacer {
  flex: 1 1 auto;
}

.topbar-user {
  position: relative;
  flex: 0 0 auto;
}

.topbar-user summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  background: #f7fbfd;
  min-width: 0;
  border: 1px solid transparent;
  list-style: none;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.topbar-user summary::-webkit-details-marker {
  display: none;
}

.topbar-user summary::marker {
  content: "";
}

.topbar-user summary:hover,
.topbar-user[open] summary {
  border-color: #dce8f3;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.topbar-user summary:focus-visible {
  outline: 0;
  border-color: #88adff;
  box-shadow: 0 0 0 3px rgba(47, 109, 246, 0.12);
}

.topbar-user-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.topbar-user-arrow {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-left: 4px;
  border-right: 2px solid #7a8798;
  border-bottom: 2px solid #7a8798;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease;
}

.topbar-user[open] .topbar-user-arrow {
  transform: rotate(225deg) translateY(-1px);
}

.topbar-user-link {
  display: block;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1f2a3a;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
}

.topbar-user summary:hover .topbar-user-link,
.topbar-user[open] .topbar-user-link {
  color: var(--primary);
}

.topbar-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 156px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(54, 79, 99, 0.16);
}

.topbar-user-menu a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

.topbar-user-menu a:hover {
  background: #f3f7fb;
  color: var(--primary);
}

.topbar-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, #33d1ad, #2f6df6);
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 900;
}

.hero-panel,
.page-head,
.panel {
  background:
    linear-gradient(180deg, #ffffff 0%, var(--panel-soft) 100%);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}

.hero-panel,
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  margin-bottom: 18px;
}

.hero-panel h1,
.page-head h1 {
  margin: 0 0 6px;
  font-size: 26px;
}

.hero-panel p,
.page-head p,
.panel p {
  color: var(--muted);
}

.panel {
  padding: 20px;
  margin-bottom: 18px;
}

.admin-guide {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px 18px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.admin-guide-head {
  display: grid;
  gap: 5px;
}

.admin-guide-head strong {
  color: #1f2a3a;
  font-size: 16px;
}

.admin-guide-head span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.admin-guide ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-guide li {
  position: relative;
  padding-left: 15px;
  color: #46566b;
  font-size: 13px;
  line-height: 1.65;
}

.admin-guide li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.page-explain-grid,
.profile-explain-grid,
.ocr-explain-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ocr-explain-panel {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.page-explain-grid article,
.profile-explain-grid article,
.ocr-explain-panel article {
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 16px;
  border: 1px solid #e1ebf5;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow: var(--card-shadow);
}

.page-explain-grid strong,
.profile-explain-grid strong,
.ocr-explain-panel strong {
  color: var(--text);
  font-size: 15px;
}

.page-explain-grid span,
.profile-explain-grid span,
.ocr-explain-panel span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.ocr-model-status.ready {
  border-color: rgba(24, 169, 116, 0.32);
  background: linear-gradient(180deg, #ffffff 0%, #f1fbf7 100%);
}

.ocr-model-status.missing {
  border-color: rgba(219, 74, 74, 0.32);
  background: linear-gradient(180deg, #ffffff 0%, #fff6f6 100%);
}

.ocr-model-status.ready strong {
  color: #08734f;
}

.ocr-model-status.missing strong {
  color: var(--danger);
}

.email-page-head {
  overflow: hidden;
  align-items: center;
  border-color: #d9e7f2;
  background:
    linear-gradient(180deg, #ffffff 0%, #f5f9fd 100%);
}

.email-page-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.email-page-title > div {
  min-width: 0;
}

.email-page-title h1 {
  margin: 0 0 7px;
  color: #17243a;
  font-size: 28px;
  line-height: 1.15;
}

.email-page-title p {
  max-width: 760px;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
}

.email-page-icon,
.email-status-icon,
.email-panel-icon,
.email-config-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(47, 109, 246, 0.16);
  border-radius: 8px;
  background: #eef5ff;
  color: var(--primary);
}

.email-page-icon {
  width: 52px;
  height: 52px;
  box-shadow: 0 12px 24px rgba(47, 109, 246, 0.16);
}

.email-page-icon svg {
  width: 28px;
  height: 28px;
}

.email-status-icon,
.email-config-icon {
  width: 40px;
  height: 40px;
}

.email-status-icon svg,
.email-config-icon svg {
  width: 22px;
  height: 22px;
}

.email-panel-icon {
  width: 44px;
  height: 44px;
}

.email-panel-icon svg {
  width: 24px;
  height: 24px;
}

.email-page-head svg,
.email-overview-grid svg,
.email-settings-panel svg,
.email-icon-btn svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.email-icon-btn {
  gap: 8px;
  white-space: nowrap;
}

.email-icon-btn > span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 18px;
}

.email-icon-btn > span svg {
  width: 18px;
  height: 18px;
}

.email-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.email-status-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
  min-height: 136px;
  min-width: 0;
  padding: 18px;
  border: 1px solid #dfe9f3;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fbfe 100%);
  box-shadow: var(--card-shadow);
}

.email-status-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.email-status-label {
  min-width: 0;
  color: #5f6f84;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.email-status-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #17243a;
  font-size: 20px;
  line-height: 1.25;
}

.email-status-card small {
  align-self: end;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.email-status-card.enabled {
  border-color: rgba(24, 169, 116, 0.3);
  background: linear-gradient(180deg, #ffffff 0%, #f1fbf7 100%);
}

.email-status-card.enabled .email-status-icon {
  border-color: rgba(24, 169, 116, 0.2);
  background: #eaf8f2;
  color: #08734f;
}

.email-status-card.enabled strong {
  color: #08734f;
}

.email-status-card.disabled {
  border-color: rgba(219, 74, 74, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #fff7f7 100%);
}

.email-status-card.disabled .email-status-icon {
  border-color: rgba(180, 35, 24, 0.18);
  background: #fff0f0;
  color: var(--danger);
}

.email-status-card.disabled strong {
  color: var(--danger);
}

.email-status-card.smtp-card .email-status-icon {
  border-color: rgba(33, 192, 216, 0.24);
  background: #eefbfc;
  color: #09798c;
}

.email-status-card.sender-card .email-status-icon {
  border-color: rgba(183, 121, 31, 0.2);
  background: #fff8ec;
  color: #8a5a13;
}

.route-dashboard .admin-guide {
  display: none;
}

.route-dashboard .main {
  padding: 0 22px 22px;
  background: #eef7fd;
}

.route-dashboard .topbar {
  min-height: 58px;
  margin: 0 -22px 0;
  border-bottom-color: #eef3f8;
  background: #ffffff;
}

.route-dashboard .topbar-title {
  grid-template-columns: auto auto;
  align-items: center;
  gap: 18px;
}

.route-dashboard .topbar-title strong {
  color: #4d5b6c;
  font-size: 14px;
  font-weight: 700;
}

.route-dashboard .topbar-title span {
  display: none;
}

.dashboard-workbench {
  display: grid;
  gap: 16px;
  padding-top: 12px;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-metric-card,
.dashboard-card {
  border: 1px solid #edf3f8;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(75, 107, 132, 0.05);
}

.dashboard-metric-card {
  min-height: 134px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 20px;
}

.dashboard-metric-card span {
  color: #4b5563;
  font-size: 14px;
}

.dashboard-metric-card strong {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: 29px;
  font-weight: 800;
  line-height: 1;
}

.dashboard-metric-card small {
  display: block;
  margin-top: 18px;
  color: #95a3b3;
  font-size: 12px;
}

.dashboard-metric-card small b {
  color: #18a8f3;
}

.dashboard-metric-card em {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  align-self: center;
  border-radius: 16px;
  background:
    radial-gradient(circle at 72% 72%, #0f91f3 0 38%, transparent 39%),
    linear-gradient(135deg, #e7f6ff 0%, #1597f5 100%);
  color: #0879ce;
  font-size: 24px;
  font-style: normal;
  font-weight: 900;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 18px;
  align-items: start;
}

.dashboard-card {
  min-width: 0;
  padding: 20px;
}

.dashboard-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 12px;
}

.dashboard-card-head.inline {
  align-items: center;
}

.dashboard-card-head strong {
  display: block;
  color: #27384c;
  font-size: 15px;
  font-weight: 800;
}

.dashboard-card-head span {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 10px;
  color: #8291a4;
  font-size: 12px;
}

.dashboard-card-head a,
.dashboard-card-head button {
  border: 0;
  background: transparent;
  color: #9aa7b7;
  font: inherit;
  font-size: 12px;
}

.dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 50%;
}

.dot.blue {
  background: #1597f5;
}

.dot.cyan {
  background: #51d1d9;
}

.dashboard-chart-card {
  min-height: 318px;
}

.dashboard-chart {
  position: relative;
  min-height: 252px;
  padding: 10px 14px 22px 48px;
}

.chart-grid-lines {
  position: absolute;
  inset: 20px 20px 46px 48px;
  background:
    repeating-linear-gradient(to bottom, transparent 0 44px, #e8edf2 45px),
    linear-gradient(to bottom, transparent, transparent);
}

.dashboard-chart svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 220px;
  display: block;
}

.chart-tooltip {
  position: absolute;
  z-index: 2;
  top: 54px;
  left: 46%;
  display: grid;
  gap: 8px;
  min-width: 176px;
  padding: 13px 14px;
  border: 1px solid #e9eff5;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(63, 86, 107, 0.12);
}

.chart-tooltip span {
  color: #a0aabc;
  font-size: 12px;
}

.chart-tooltip b {
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.chart-months {
  position: absolute;
  right: 15px;
  bottom: 0;
  left: 48px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  color: #8a96a8;
  font-size: 12px;
  text-align: center;
}

.dashboard-side-stack {
  display: grid;
  gap: 18px;
}

.dashboard-ratio-card {
  min-height: 318px;
}

.dashboard-donut {
  position: relative;
  width: 128px;
  height: 128px;
  margin: 12px auto 20px;
}

.donut-ring {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: conic-gradient(#5b8ff9 0 34%, #5ad8a6 34% 57%, #5d7092 57% 76%, #f6bd16 76% 100%);
}

.donut-ring::after {
  content: "";
  position: absolute;
  inset: 31px;
  border-radius: 50%;
  background: #ffffff;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.donut-center strong {
  color: #1597f5;
  font-size: 12px;
}

.donut-center span {
  color: #64748b;
  font-size: 10px;
}

.ratio-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.ratio-list div {
  position: relative;
  display: grid;
  gap: 4px;
  padding-left: 12px;
  color: #7a8798;
  font-size: 11px;
}

.ratio-list div::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ratio-color);
}

.ratio-list span {
  color: #667085;
}

.ratio-list strong,
.ratio-list small {
  font-size: 11px;
  font-weight: 400;
}

.dashboard-status-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #edf3f8;
}

.dashboard-status-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  color: #667085;
  font-size: 12px;
}

.dashboard-status-list strong {
  color: #26364a;
  font-size: 13px;
}

.dashboard-status-list i {
  grid-column: 1 / -1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef4f9;
}

.dashboard-status-list b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--status-color);
}

.dashboard-shortcuts {
  padding-bottom: 18px;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 30px;
  padding: 10px 8px 4px;
}

.shortcut-grid a {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 66px;
}

.shortcut-grid em {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8f7ff, #d5efff);
  color: #1597f5;
  font-style: normal;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(21, 151, 245, 0.12);
}

.shortcut-grid strong {
  display: block;
  margin-bottom: 5px;
  color: #253247;
  font-size: 14px;
}

.shortcut-grid small {
  display: block;
  color: #738196;
  font-size: 12px;
  line-height: 1.45;
}

.panel > .grid-form:not(.paper-form),
.panel > .form-stack,
.panel > .table-scroll,
.panel > table,
.panel > .form-stack > table {
  border: 1px solid #e5edf5;
  border-radius: var(--radius);
  background: var(--panel-tint);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.panel > .grid-form:not(.paper-form),
.panel > .form-stack {
  padding: 16px;
}

.panel > .grid-form:not(.paper-form) input,
.panel > .grid-form:not(.paper-form) select,
.panel > .grid-form:not(.paper-form) textarea,
.panel > .form-stack input,
.panel > .form-stack select,
.panel > .form-stack textarea {
  background: #ffffff;
}

.panel > h2:first-child,
.panel .section-title:first-child h2 {
  color: #1f2a3a;
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.settings-head {
  align-items: stretch;
}

.settings-head-preview {
  width: 96px;
  min-height: 72px;
  display: grid;
  place-items: center;
  align-self: center;
  border: 1px solid #d8e2ee;
  border-radius: var(--radius);
  background: #f8fafc;
  overflow: hidden;
}

.settings-head-preview img {
  max-width: 76px;
  max-height: 56px;
  object-fit: contain;
}

.settings-head-preview span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #33d1ad, #2f6df6);
  color: #ffffff;
  font-weight: 900;
}

.settings-brand-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.settings-uploader {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid #d8e2ee;
  border-radius: var(--radius);
  background: #f8fafc;
}

.settings-uploader-wide {
  grid-column: 1 / -1;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
}

.settings-upload-preview {
  min-height: 104px;
  display: grid;
  place-items: center;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.settings-upload-preview.logo img {
  max-width: 86px;
  max-height: 78px;
}

.settings-upload-preview.icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.settings-upload-preview.illustration {
  min-height: 168px;
  background:
    linear-gradient(135deg, rgba(235, 248, 255, 0.9), rgba(255, 255, 255, 0.96));
}

.settings-upload-preview.illustration img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.settings-upload-preview span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eaf2ff;
  color: var(--primary);
  font-weight: 900;
}

.settings-upload-fields {
  display: grid;
  gap: 12px;
}

.settings-field-grid {
  padding-top: 16px;
  border-top: 1px solid #edf1f6;
}

.compact {
  max-width: 760px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metrics div,
.action-card {
  background: var(--panel);
  border: 1px solid #e1eaf3;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--card-shadow);
}

.metrics div {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 253, 0.98));
}

.metrics div::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

.metrics strong {
  display: block;
  color: #111827;
  font-size: 30px;
}

.metrics span,
.action-card span {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.public-home-page {
  min-height: 100vh;
  margin: 0;
  background: #f5f8fb;
  color: var(--text);
}

.public-home-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 22px;
  background: rgba(245, 248, 251, 0.92);
  backdrop-filter: blur(16px);
}

.public-home-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.public-home-brand img,
.public-home-brand span {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 8px;
}

.public-home-brand img {
  object-fit: contain;
}

.public-home-brand span {
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #ffffff;
  font-weight: 900;
}

.public-home-brand strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-home-nav nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.public-home-nav nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  color: #475467;
  font-weight: 700;
  text-decoration: none;
}

.public-home-nav nav a:not(.btn):hover {
  color: var(--primary);
}

.public-home-page main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px 44px;
}

.public-home-saas {
  background: #ffffff;
}

.public-home-saas .public-home-nav {
  max-width: none;
  padding: 14px 56px;
  background: rgba(246, 250, 255, 0.9);
  box-shadow: 0 1px 0 rgba(220, 231, 241, 0.65);
}

.public-home-saas main {
  max-width: none;
  padding: 0;
}

.public-home-saas .public-home-brand strong {
  color: #1765d8;
}

.public-home-hero {
  min-height: calc(100vh - 96px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
  gap: 36px;
  align-items: center;
  padding: 34px 0 42px;
}

.public-home-hero.saas-hero {
  min-height: 520px;
  max-width: none;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.82fr);
  gap: 20px;
  padding: 72px 13vw 105px;
  background:
    linear-gradient(180deg, rgba(235, 246, 255, 0.95), rgba(245, 249, 255, 0.72)),
    linear-gradient(135deg, rgba(47, 109, 246, 0.08), rgba(30, 210, 230, 0.08));
}

.public-home-copy h1 {
  max-width: 820px;
  margin: 16px 0 14px;
  color: #111827;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
}

.saas-hero .public-home-copy h1 {
  max-width: 680px;
  font-size: clamp(38px, 5vw, 58px);
  letter-spacing: 0;
}

.public-home-copy p {
  max-width: 760px;
  margin: 0;
  color: #526071;
  font-size: 18px;
  line-height: 1.9;
}

.public-home-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.public-home-points span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid #dce7f1;
  border-radius: 999px;
  background: #ffffff;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.public-home-visual {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
  border: 1px solid #dce7f1;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(47, 109, 246, 0.09), rgba(34, 197, 94, 0.06)),
    #ffffff;
  box-shadow: 0 24px 70px rgba(79, 112, 147, 0.16);
  overflow: hidden;
}

.public-home-visual.saas-visual {
  min-height: 430px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.public-home-visual.saas-visual::before {
  content: "";
  position: absolute;
  width: 440px;
  height: 220px;
  border-radius: 50%;
  background: rgba(47, 109, 246, 0.12);
  filter: blur(18px);
  transform: translateY(95px);
}

.public-home-visual img {
  width: min(88%, 520px);
  max-height: 430px;
  object-fit: contain;
}

.public-home-panel {
  position: absolute;
  display: grid;
  gap: 4px;
  min-width: 132px;
  padding: 12px 14px;
  border: 1px solid #dce7f1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 36px rgba(79, 112, 147, 0.14);
}

.public-home-panel strong {
  color: #111827;
  font-size: 18px;
}

.public-home-panel span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.public-home-panel.panel-left {
  left: 22px;
  bottom: 32px;
}

.public-home-panel.panel-right {
  right: 22px;
  top: 34px;
}

.public-home-section {
  padding: 34px 0;
}

.public-home-saas .public-home-section {
  padding: 68px 13vw;
}

.public-section-head {
  margin-bottom: 16px;
}

.public-section-head.centered {
  text-align: center;
}

.public-section-head p {
  margin: 10px 0 0;
  color: var(--muted);
}

.public-section-head span,
.public-home-cta span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.public-section-head h2,
.public-home-cta h2 {
  margin: 8px 0 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 38px);
}

.public-feature-grid,
.public-step-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.public-feature-grid article,
.public-step-grid article {
  min-height: 190px;
  padding: 18px;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.public-feature-grid strong,
.public-step-grid strong {
  display: block;
  color: #111827;
  font-size: 18px;
}

.public-feature-grid p,
.public-step-grid p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.public-step-grid b {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 8px;
  background: #e7f4ee;
  color: #176b4d;
}

.public-home-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 28px;
  padding: 24px;
  border: 1px solid #dce7f1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.saas-stat-strip {
  position: relative;
  z-index: 2;
  width: min(1040px, calc(100% - 40px));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: -54px auto 50px;
  padding: 24px 26px;
  border: 1px solid #e2ebf5;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(47, 109, 246, 0.13);
}

.saas-stat-strip div {
  display: grid;
  gap: 6px;
  justify-items: center;
  border-right: 1px solid #edf2f7;
}

.saas-stat-strip div:last-child {
  border-right: 0;
}

.saas-stat-strip strong {
  color: #111827;
  font-size: 28px;
}

.saas-stat-strip span {
  color: var(--muted);
  font-weight: 700;
}

.saas-flow-board {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: 44px;
  align-items: center;
  margin: 38px auto 0;
  padding: 30px;
  border: 1px solid rgba(203, 219, 238, 0.8);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 255, 0.92)),
    radial-gradient(circle at 18% 20%, rgba(47, 109, 246, 0.1), transparent 34%);
  box-shadow: 0 22px 58px rgba(47, 109, 246, 0.11);
}

.saas-flow-left {
  display: grid;
  gap: 16px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.saas-flow-left article {
  position: relative;
  min-height: 106px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 20px;
  border: 1px solid rgba(218, 231, 247, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(45, 86, 138, 0.08);
  overflow: hidden;
}

.saas-flow-left article::after {
  content: "";
  position: absolute;
  inset: auto 18px 0 86px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, #2f6df6, rgba(33, 192, 216, 0.36));
}

.saas-flow-left article > span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #edf6ff, #dceaff);
  color: #2f6df6;
  font-size: 18px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(47, 109, 246, 0.12);
}

.saas-flow-left strong,
.saas-service-grid strong {
  color: #1f2a3a;
  font-size: 18px;
}

.saas-flow-left p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.saas-flow-right {
  display: grid;
  gap: 18px;
  position: relative;
}

.saas-flow-right::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 28px;
  bottom: 28px;
  width: 9px;
  border: 8px solid rgba(91, 139, 255, 0.42);
  border-right: 0;
  border-radius: 30px 0 0 30px;
}

.saas-flow-right span {
  position: relative;
  min-height: 68px;
  display: flex;
  align-items: center;
  padding: 0 24px 0 48px;
  border-radius: 8px;
  border: 1px solid rgba(222, 233, 246, 0.96);
  background: rgba(255, 255, 255, 0.94);
  color: #2455a6;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(47, 109, 246, 0.1);
}

.saas-flow-right span::before {
  content: "";
  position: absolute;
  left: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #21c0d8, #2f6df6);
  box-shadow: 0 0 0 6px rgba(47, 109, 246, 0.1);
}

.saas-case-row {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin: 38px auto 0;
}

.saas-case-row article {
  position: relative;
  min-height: 188px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border: 1px solid rgba(217, 229, 244, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(238, 246, 255, 0.94)),
    radial-gradient(circle at 85% 14%, rgba(33, 192, 216, 0.18), transparent 34%);
  color: #1f2a3a;
  box-shadow: 0 16px 38px rgba(65, 94, 128, 0.1);
  overflow: hidden;
}

.saas-case-row article::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 0;
  height: 4px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, #2f6df6, #21c0d8);
}

.saas-case-row article::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -34px;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: rgba(47, 109, 246, 0.08);
}

.saas-case-row i {
  position: absolute;
  left: 20px;
  top: 22px;
  color: rgba(47, 109, 246, 0.18);
  font-size: 34px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.saas-case-row strong {
  position: relative;
  z-index: 1;
  font-size: 18px;
}

.saas-case-row span {
  position: relative;
  z-index: 1;
  color: #687a90;
  font-size: 13px;
  line-height: 1.65;
}

.saas-service-section {
  background:
    linear-gradient(180deg, rgba(232, 245, 255, 0.96), rgba(247, 251, 255, 0.98));
}

.saas-service-grid {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 38px auto 0;
}

.saas-service-grid article {
  position: relative;
  min-height: 220px;
  padding: 30px;
  border: 1px solid rgba(216, 230, 246, 0.96);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 46px rgba(47, 109, 246, 0.11);
  overflow: hidden;
}

.saas-service-grid article::after {
  content: "";
  position: absolute;
  right: -44px;
  bottom: -44px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(47, 109, 246, 0.08), rgba(33, 192, 216, 0.12));
}

.saas-service-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.saas-service-head > span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2f6df6, #21c0d8);
  color: #ffffff;
  font-weight: 900;
}

.saas-service-grid p {
  position: relative;
  z-index: 1;
  color: var(--muted);
  line-height: 1.7;
}

.saas-service-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.saas-service-tags span {
  min-height: 30px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #dde9f5;
  border-radius: 8px;
  background: #f7fbff;
  color: #3d5570;
  font-weight: 700;
}

.saas-solution {
  min-height: 340px;
  display: flex;
  align-items: center;
  padding: 50px 13vw;
  background:
    linear-gradient(90deg, #2477ff 0%, rgba(36, 119, 255, 0.92) 42%, rgba(17, 59, 128, 0.72) 100%),
    linear-gradient(135deg, #1e63d5, #0e3a8a);
  color: #ffffff;
}

.saas-solution > div {
  max-width: 620px;
}

.saas-solution span {
  font-weight: 900;
}

.saas-solution h2 {
  margin: 14px 0;
  font-size: 30px;
}

.saas-solution p {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.85;
}

.saas-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 38px 13vw;
  background: #2b2f36;
  color: #d1d5db;
}

.saas-footer div {
  display: grid;
  gap: 6px;
}

.saas-footer strong {
  color: #ffffff;
}

.saas-footer p {
  margin: 0;
}

.system-home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(47, 109, 246, 0.1), rgba(34, 197, 94, 0.06)),
    #ffffff;
  box-shadow: var(--soft-shadow);
}

.system-home-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.system-home-copy h1 {
  max-width: 900px;
  margin: 14px 0 10px;
  color: #1f2a3a;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.12;
}

.system-home-copy p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}

.system-status-panel {
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid #dce9f4;
  border-radius: var(--radius);
  background: #f8fbfd;
}

.system-status-panel > span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.system-status-panel strong {
  color: #111827;
  font-size: 28px;
}

.system-status-panel dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.system-status-panel dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #e7eef5;
}

.system-status-panel dt,
.system-status-panel dd {
  margin: 0;
}

.system-status-panel dt {
  color: var(--muted);
}

.system-status-panel dd {
  color: var(--text);
  font-weight: 800;
  text-align: right;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: clamp(22px, 4vw, 34px);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(47, 109, 246, 0.08), rgba(33, 192, 216, 0.06)),
    #ffffff;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.home-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.home-hero h1 {
  max-width: 850px;
  margin: 14px 0 10px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
  color: #1f2a3a;
}

.home-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.portal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.portal-hero > div:first-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.portal-hero h1 {
  max-width: 850px;
  margin: 14px 0 10px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
  color: #1f2a3a;
}

.portal-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.teacher-portal-hero {
  background:
    linear-gradient(135deg, rgba(47, 109, 246, 0.08), rgba(33, 192, 216, 0.05)),
    #ffffff;
}

.researcher-portal-hero {
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(47, 109, 246, 0.04)),
    #ffffff;
}

.eyebrow.dark {
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: var(--primary);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.btn.ghost.light {
  border-color: #dbe7f0;
  background: #ffffff;
  color: var(--text);
}

.btn.ghost.light:hover {
  background: #f6faff;
}

.home-hero-rail {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid #e0ecf4;
  border-radius: var(--radius);
  background: #f7fbfd;
}

.home-hero-rail > span,
.section-title span,
.portal-card-head span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.home-hero-rail > span {
  color: var(--primary);
}

.home-hero-rail strong {
  display: block;
  font-size: 28px;
  color: #111827;
}

.home-hero-rail dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.home-hero-rail dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #e7eef5;
}

.home-hero-rail dt,
.home-hero-rail dd {
  margin: 0;
}

.home-hero-rail dt {
  color: var(--muted);
}

.home-hero-rail dd {
  color: var(--text);
  font-weight: 800;
  text-align: right;
}

.role-metrics .metric-card {
  min-height: 132px;
}

.metric-card small {
  display: block;
  margin-top: 12px;
  color: #7a8699;
  font-size: 13px;
  line-height: 1.5;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.teacher-action-grid,
.researcher-action-grid,
.system-module-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portal-card {
  position: relative;
  min-height: 252px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px 14px;
  padding: 18px;
  border: 1px solid #e3ebf4;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.portal-card::before {
  content: "";
  width: 50px;
  height: 50px;
  grid-column: 1;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #edf6ff;
  color: var(--primary);
  font-size: 20px;
  font-weight: 900;
}

.portal-card:nth-child(1)::before {
  content: "01";
  background: #ecfdf5;
  color: #047857;
}

.portal-card:nth-child(2)::before {
  content: "02";
  background: #eff6ff;
  color: var(--primary);
}

.portal-card:nth-child(3)::before {
  content: "03";
  background: #fef7e8;
  color: #b7791f;
}

.portal-card:nth-child(4)::before {
  content: "04";
  background: #f0fdf4;
  color: #15803d;
}

.portal-card:hover {
  border-color: #c9dcff;
  box-shadow: 0 16px 34px rgba(71, 99, 123, 0.13);
  transform: translateY(-2px);
}

.portal-card h2 {
  margin: 5px 0 0;
  font-size: 20px;
}

.portal-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.portal-card .btn {
  grid-column: 1 / -1;
  align-self: flex-start;
  justify-self: start;
  background: #ffffff;
}

.portal-card-head {
  grid-column: 2;
  min-width: 0;
}

.mini-list {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mini-list li {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #e6edf4;
  border-radius: 999px;
  background: #f8fbfd;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.mini-list li::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--success);
}

.workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.system-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  margin-bottom: 18px;
}

.knowledge-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.knowledge-filter-panel {
  padding: 16px;
}

.knowledge-stage-panel {
  padding: 14px 16px;
}

.knowledge-stage-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.knowledge-stage-tab {
  min-width: 108px;
  min-height: 38px;
  padding: 8px 18px;
  border: 1px solid #d8e5f2;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.knowledge-stage-tab:hover {
  border-color: rgba(47, 103, 246, 0.42);
  color: var(--primary);
}

.knowledge-stage-tab.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(47, 103, 246, 0.2);
}

.knowledge-stage-panel .helper-text {
  margin: 10px 0 0;
}

.textbook-version-stage-tabs {
  margin: 0 0 14px;
}

.knowledge-filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.knowledge-filter-grid .knowledge-search {
  grid-column: span 2;
}

.knowledge-hidden {
  display: none !important;
}

.editable-table input,
.editable-table select {
  min-width: 130px;
}

.editable-table input[type="checkbox"] {
  min-width: 0;
}

.textbook-version-table {
  min-width: 1580px;
}

.textbook-version-table th:first-child,
.textbook-version-table td:first-child {
  width: 48px;
  text-align: center;
}

.textbook-version-actions {
  min-width: 64px;
  flex-wrap: nowrap;
}

.textbook-directory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.textbook-directory {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  overflow: hidden;
}

.textbook-directory-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.textbook-directory-head strong {
  line-height: 1.45;
}

.textbook-directory-head span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.textbook-directory-tools {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.directory-create-form,
.directory-upload-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.directory-upload-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.directory-create-form input,
.directory-create-form select,
.directory-upload-form input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 7px 9px;
  border: 1px solid #d7e3ef;
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
}

.textbook-directory-tree {
  display: grid;
  gap: 0;
  max-height: 420px;
  overflow: auto;
  margin: 0;
  padding: 8px 0;
  list-style: none;
}

.textbook-directory-tree li {
  display: block;
  min-height: 34px;
  padding: 7px 14px 7px calc(14px + var(--indent, 0px));
  border-bottom: 1px solid #edf1f5;
}

.textbook-directory-tree li:last-child {
  border-bottom: 0;
}

.textbook-directory-tree span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.textbook-directory-tree em {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.directory-node-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 96px minmax(120px, 0.7fr) 74px auto auto;
  gap: 8px;
  align-items: center;
  min-width: 720px;
}

.directory-node-form input,
.directory-node-form select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 7px 9px;
  border: 1px solid #d7e3ef;
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
}

.directory-node-name {
  font-weight: 700;
}

.directory-node-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.directory-node-check input {
  width: 15px;
  height: 15px;
  min-width: 0;
  padding: 0;
}

.section-title {
  margin-bottom: 16px;
}

.section-title h2 {
  margin: 5px 0 0;
  font-size: 20px;
}

.section-title.inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.flow-steps div {
  min-height: 164px;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 14px;
  border: 1px solid #e5edf5;
  border-radius: var(--radius);
  background: var(--panel-tint);
}

.flow-steps b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e7f4ee;
  color: #176b4d;
}

.flow-steps strong {
  font-size: 15px;
}

.flow-steps span,
.focus-list span,
.recent-list a > span,
.empty-state span {
  color: var(--muted);
  line-height: 1.6;
}

.focus-list {
  display: grid;
  gap: 10px;
}

.focus-list a {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid #e5edf5;
  border-radius: var(--radius);
  background: var(--panel-tint);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.focus-list a:hover,
.recent-list a:hover {
  border-color: #c9dcff;
  background: #f8fbff;
}

.focus-list em {
  color: var(--primary);
  font-style: normal;
  font-weight: 800;
}

.recent-panel {
  margin-top: 0;
}

.recent-list {
  display: grid;
  gap: 10px;
}

.recent-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e5edf5;
  border-radius: var(--radius);
  background: var(--panel-tint);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.recent-list a > strong,
.recent-list a > span:not(.badge) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-list .badge {
  grid-row: 1 / 3;
  grid-column: 2;
}

.badge.status-approved {
  background: #dcfce7;
  color: #047857;
}

.badge.status-pending_review {
  background: #fef3c7;
  color: #b45309;
}

.badge.status-rejected {
  background: #fee2e2;
  color: #b42318;
}

.badge.status-draft {
  background: #eef2ff;
  color: #3730a3;
}

.badge.verify-approved,
.verify-mini.verify-approved,
.verified-inline.verify-approved,
.verified-inline:not([class*="verify-"]) {
  background: #dcfce7;
  color: #047857;
}

.badge.verify-pending,
.verify-mini.verify-pending,
.verified-inline.verify-pending {
  background: #fef3c7;
  color: #b45309;
}

.badge.verify-rejected,
.verify-mini.verify-rejected,
.verified-inline.verify-rejected {
  background: #fee2e2;
  color: #b42318;
}

.verify-mini,
.verified-inline {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.verified-inline {
  margin-left: 8px;
}

.verification-status-panel {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.verification-status-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #dcfce7;
  color: #047857;
  font-size: 34px;
  font-weight: 900;
}

.verification-status-mark.status-pending {
  background: #fef3c7;
  color: #b45309;
}

.verification-status-mark.status-rejected {
  background: #fee2e2;
  color: #b42318;
}

.verification-status-copy {
  display: grid;
  gap: 8px;
}

.verification-status-copy h2 {
  margin: 0;
  font-size: 24px;
}

.verification-status-copy p {
  margin: 0;
  color: var(--muted);
}

.verification-list {
  display: grid;
  gap: 14px;
}

.verification-empty {
  padding: 26px 18px;
  border: 1px dashed #c7d7e8;
  border-radius: var(--radius);
  background: #fbfdff;
  color: var(--muted);
  text-align: center;
}

.verification-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.36fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid #e2ebf4;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.verification-card.status-pending {
  border-left: 4px solid #f59e0b;
}

.verification-card.status-approved {
  border-left: 4px solid var(--success);
}

.verification-card.status-rejected {
  border-left: 4px solid #ef4444;
}

.verification-card-main,
.verification-review-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.verification-card-head,
.verification-person,
.verification-review-head,
.verification-actions {
  display: flex;
  align-items: center;
}

.verification-card-head,
.verification-review-head {
  justify-content: space-between;
  gap: 12px;
}

.verification-person {
  gap: 12px;
  min-width: 0;
}

.verification-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  border-radius: 8px;
  background: linear-gradient(135deg, #33d1ad, #2f6df6);
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.verification-person h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 5px;
  color: #1f2a3a;
  font-size: 18px;
}

.verification-person h3 .verified-inline {
  margin-left: 0;
}

.verification-person p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.verification-card-details,
.verification-review-list {
  display: grid;
  gap: 10px 12px;
  margin: 0;
}

.verification-card-details {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.verification-review-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.verification-card-details div,
.verification-review-list div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #edf3f8;
  border-radius: var(--radius);
  background: #fbfdff;
}

.verification-review-list .span-all {
  grid-column: 1 / -1;
}

.verification-card-details dt,
.verification-card-details dd,
.verification-review-list dt,
.verification-review-list dd {
  margin: 0;
}

.verification-card-details dt,
.verification-review-list dt {
  color: var(--muted);
  font-size: 12px;
}

.verification-card-details dd,
.verification-review-list dd {
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: #26364a;
  font-weight: 800;
  line-height: 1.45;
}

.verification-review-panel {
  align-content: start;
  padding: 14px;
  border: 1px solid #e7eef5;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #fbfdff 0%, #f6faff 100%);
}

.verification-review-head strong {
  color: #1f2a3a;
}

.verification-review-head span {
  color: var(--muted);
  font-size: 13px;
}

.verification-actions {
  gap: 8px;
  flex-wrap: wrap;
}

.verification-reviewer-list,
.verification-review-meta {
  display: grid;
  gap: 8px;
}

.verification-reviewer-list {
  margin-top: 14px;
}

.verification-reviewer-list span,
.verification-review-meta small,
.verification-review-meta em {
  color: var(--muted);
  font-style: normal;
}

.verification-modal-body {
  padding: 18px;
  background: #ffffff;
}

.verification-reject-panel {
  width: min(100%, 560px);
}

.verification-reject-panel textarea {
  min-height: 132px;
}

.empty-cell {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.paper-edit-questions {
  display: grid;
  gap: 16px;
}

.paper-edit-page-head {
  overflow: hidden;
  border-color: #d9e7f2;
}

.paper-edit-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: -6px 0 18px;
}

.paper-edit-overview article {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid #e1ebf5;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow: var(--card-shadow);
}

.paper-edit-overview span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.paper-edit-overview strong {
  overflow-wrap: anywhere;
  color: #17243a;
  font-size: 18px;
}

.paper-edit-form > .panel {
  border-color: #dfe9f3;
}

.paper-edit-form > .panel > h2,
.paper-edit-form .section-title h2 {
  color: #17243a;
}

.paper-edit-type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 12px;
  padding: 8px;
  border: 1px solid #e2ebf5;
  border-radius: var(--radius);
  background: #f7fbfe;
}

.paper-edit-type-tab {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #56657a;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.paper-edit-type-tab:hover,
.paper-edit-type-tab.active {
  border-color: #c9dcff;
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 8px 18px rgba(47, 109, 246, 0.1);
}

.paper-edit-type-tab b {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eaf2ff;
  color: currentColor;
  font-size: 12px;
}

.paper-edit-type-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #e6eef7;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
}

.paper-edit-type-summary strong {
  color: #1f2a3a;
}

.paper-edit-type-summary span {
  color: var(--muted);
  font-size: 13px;
}

.question-edit-block {
  display: grid;
  gap: 14px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid #dfe9f3;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 10px 24px rgba(71, 98, 122, 0.06);
}

.question-edit-block[hidden],
.question-edit-block.is-hidden {
  display: none !important;
}

.question-edit-head {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) repeat(3, minmax(96px, 130px));
  gap: 12px;
  align-items: end;
}

.question-edit-head strong {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 54px;
  padding: 8px 12px;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: #f3f7ff;
  color: #17243a;
}

.question-edit-head strong span {
  font-size: 16px;
}

.question-edit-head strong small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.question-edit-block .grid-form {
  padding-top: 14px;
  border-top: 1px solid #edf3f8;
}

.question-edit-block textarea {
  min-height: 104px;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 0 0;
  background: var(--workspace);
}

.badge.status-imported {
  background: #dcfce7;
  color: #047857;
}

.badge.status-recognized {
  background: #e0f2fe;
  color: #0369a1;
}

.badge.status-recognizing {
  background: #eef2ff;
  color: #3730a3;
}

.badge.status-uploaded {
  background: #fef3c7;
  color: #b45309;
}

.badge.status-failed {
  background: #fee2e2;
  color: #b42318;
}

.empty-state {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px dashed #c7d7e8;
  border-radius: var(--radius);
  background: #fbfdff;
}

.profile-hero {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.profile-hero h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.profile-hero p {
  margin: 0;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #33d1ad, #2f6df6);
  color: #ffffff;
  font-size: 28px;
  font-weight: 800;
}

.profile-meta {
  display: grid;
  gap: 8px;
  min-width: 220px;
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.profile-metrics .metric-card {
  min-height: 110px;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  gap: 18px;
}

.detail-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list div:last-child {
  border-bottom: 0;
}

.detail-list dt,
.detail-list dd {
  margin: 0;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  font-weight: 700;
}

.profile-password {
  padding-top: 4px;
}

.profile-password h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.paper-create-panel {
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fbfd 100%);
}

.grid-form.paper-form {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0;
  align-items: start;
  background:
    linear-gradient(90deg, rgba(47, 109, 246, 0.035) 0, transparent 28%),
    #ffffff;
}

.paper-form > input[type="hidden"] {
  display: none;
}

.paper-form > label {
  grid-column: span 4;
  min-width: 0;
  align-self: stretch;
  margin: 0 0 14px;
  padding: 0 22px;
  color: #2f4055;
  font-size: 13px;
  font-weight: 800;
}

.paper-form > label input,
.paper-form > label select,
.paper-form > label textarea {
  min-height: 42px;
  border-color: #d8e5f0;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.paper-form > label textarea {
  min-height: 116px;
  line-height: 1.65;
}

.paper-form > .span-all {
  grid-column: 1 / -1;
}

.paper-form-section-title {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  padding: 18px 22px 12px 38px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid #edf3f8;
  background:
    linear-gradient(90deg, rgba(47, 109, 246, 0.08), rgba(33, 192, 216, 0.035)),
    #fbfdff;
}

.paper-form-section-title:first-of-type {
  border-top: 0;
}

.paper-form-section-title::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 18px;
  bottom: 12px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

.paper-form-section-title strong {
  color: #172b42;
  font-size: 17px;
}

.paper-form-section-title span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
}

.paper-field-note {
  color: #6c7b8e;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.paper-form > .paper-source-summary,
.paper-form > .type-config-summary,
.paper-form > .question-bank-compose {
  margin: 0 22px 18px;
}

.paper-form > .paper-style-actions {
  grid-column: span 4;
  margin: 0 22px 14px;
}

.paper-form > .btn.primary {
  grid-column: 1 / -1;
  justify-self: end;
  margin: 4px 22px 24px;
  min-width: 156px;
  min-height: 42px;
  box-shadow: 0 12px 24px rgba(47, 109, 246, 0.18);
}

.paper-form > .modal-backdrop {
  grid-column: 1 / -1;
}

.type-config-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid #d7e6ef;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.82), rgba(239, 246, 255, 0.88)),
    #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.question-bank-compose {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid #d5e5f2;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(240, 253, 250, 0.86)),
    #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.question-bank-compose strong,
.question-bank-compose span {
  display: block;
}

.question-bank-compose strong {
  color: #1f344d;
  font-size: 15px;
}

.question-bank-compose span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.question-bank-compose-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 280px;
}

.question-bank-compose-actions span {
  margin: 0;
  text-align: right;
}

.paper-source-summary {
  display: grid;
  gap: 5px;
  padding: 15px 18px;
  border: 1px solid #dbe7f3;
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  background:
    linear-gradient(135deg, rgba(247, 251, 253, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.paper-source-summary strong {
  color: #24364a;
}

.paper-source-summary span {
  color: var(--muted);
  line-height: 1.6;
}

.type-config-summary strong,
.type-config-summary span {
  display: block;
}

.type-config-summary span {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.6;
}

.type-config-summary .btn {
  flex: 0 0 auto;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.52);
}

.modal-backdrop.open {
  display: flex;
}

.modal-panel {
  width: min(100%, 860px);
  max-height: min(720px, calc(100vh - 48px));
  max-height: min(720px, calc(100dvh - 48px));
  overflow: auto;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.modal-head p,
.modal-actions span {
  margin: 0;
  color: var(--muted);
}

.modal-actions {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.question-bank-modal-panel {
  width: min(1180px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  max-height: min(820px, calc(100dvh - 32px));
}

.question-bank-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.72fr);
  gap: 0;
  border-bottom: 1px solid var(--line);
  min-height: 560px;
}

.question-bank-picker,
.question-bank-selected {
  min-width: 0;
  padding: 18px;
}

.question-bank-picker {
  border-right: 1px solid var(--line);
}

.question-bank-selected {
  background: #f8fbfd;
}

.question-bank-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(140px, 0.55fr) minmax(130px, 0.45fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.question-bank-filters label {
  display: grid;
  gap: 7px;
  color: #2f4055;
  font-size: 12px;
  font-weight: 800;
}

.question-bank-filters input:not([type="checkbox"]),
.question-bank-filters select {
  min-height: 40px;
  border: 1px solid #d8e5f0;
  border-radius: 8px;
  padding: 0 11px;
  background: #ffffff;
  color: #172b42;
}

.question-bank-scope-toggle {
  min-height: 40px;
  display: flex !important;
  align-items: center;
  gap: 7px !important;
  padding: 0 10px;
  border: 1px solid #d8e5f0;
  border-radius: 8px;
  background: #ffffff;
  white-space: nowrap;
}

.question-bank-scope-toggle input {
  width: 16px;
  height: 16px;
}

.question-bank-list-head,
.question-bank-selected-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.question-bank-list-head strong,
.question-bank-selected-head strong {
  color: #172b42;
  font-size: 15px;
}

.question-bank-selected-head span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.question-bank-list {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.question-bank-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 11px;
  margin: 0;
  padding: 12px 13px;
  border: 1px solid #dbe7f3;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.question-bank-item:hover,
.question-bank-item.selected {
  border-color: rgba(47, 109, 246, 0.42);
  background: #f8fbff;
  box-shadow: 0 10px 26px rgba(47, 109, 246, 0.1);
}

.question-bank-item input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.question-bank-item span,
.question-bank-item strong,
.question-bank-item em,
.question-bank-item b {
  display: block;
  min-width: 0;
}

.question-bank-item strong {
  color: #172b42;
  font-size: 14px;
  line-height: 1.45;
}

.question-bank-item em {
  margin-top: 4px;
  color: #6c7b8e;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.question-bank-item b {
  margin-top: 7px;
  color: #31445b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.65;
}

.question-bank-type-meter {
  display: grid;
  gap: 9px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #dbe7f3;
  border-radius: 8px;
  background: #ffffff;
}

.question-bank-meter-row {
  display: grid;
  grid-template-columns: minmax(72px, 0.8fr) auto;
  gap: 8px;
  align-items: center;
  color: #2f4055;
  font-size: 12px;
}

.question-bank-meter-row i {
  grid-column: 1 / -1;
  display: block;
  height: 7px;
  border-radius: 999px;
  background: #edf3f8;
  overflow: hidden;
}

.question-bank-meter-row i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.question-bank-selected-list {
  display: grid;
  gap: 10px;
  max-height: 366px;
  overflow: auto;
  padding-right: 4px;
}

.question-bank-selected-item {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 12px 38px 12px 13px;
  border: 1px solid #dbe7f3;
  border-radius: 8px;
  background: #ffffff;
}

.question-bank-selected-item button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: #eef4fb;
  color: #5b6b7f;
  cursor: pointer;
}

.question-bank-selected-item strong {
  color: var(--primary);
  font-size: 12px;
}

.question-bank-selected-item span {
  color: #172b42;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.question-bank-selected-item p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
}

.question-bank-empty {
  padding: 28px 14px;
  border: 1px dashed #cfdce8;
  border-radius: 8px;
  background: #fbfdff;
  color: #7b8798;
  text-align: center;
  line-height: 1.6;
}

.question-bank-empty.compact {
  padding: 16px 10px;
  font-size: 12px;
}

.type-plan-table {
  display: grid;
  padding: 12px 18px;
  background: #ffffff;
}

.type-plan-head,
.type-plan-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 120px 140px 120px;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #edf1f5;
}

.type-plan-head {
  color: #475467;
  font-size: 13px;
  font-weight: 800;
}

.type-plan-row:last-child {
  border-bottom: 0;
}

.type-plan-empty {
  padding: 18px 0;
  color: var(--muted);
  font-size: 14px;
}

.type-plan-row input {
  min-height: 38px;
}

.type-subtotal {
  color: #176b4d;
  font-weight: 800;
}

.action-card strong {
  display: block;
  font-size: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #dce6ef;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(47, 109, 246, 0.22);
}

.btn.primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn.danger {
  border-color: #fecaca;
  color: var(--danger);
}

.btn.danger:hover {
  background: #fef2f2;
}

.btn:disabled,
.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.btn:disabled:hover,
.btn[disabled]:hover {
  background: #ffffff;
  border-color: #dce6ef;
  color: inherit;
}

.btn.ghost {
  background: #f8fbfd;
}

.btn.small {
  min-height: 30px;
  padding: 0 10px;
  font-size: 13px;
}

.btn.full {
  width: 100%;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button-row form {
  margin: 0;
}

.ai-config-table {
  min-width: 1840px;
}

.ai-config-table th,
.ai-config-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.ai-config-table input,
.ai-config-table select {
  width: 100%;
}

.ai-config-table td:nth-child(2) select,
.ai-config-table td:nth-child(4) input {
  min-width: 220px;
}

.ai-config-table td:nth-child(3) select,
.ai-config-table td:nth-child(5) input {
  min-width: 180px;
}

.ai-config-table td:nth-child(6) input {
  min-width: 300px;
}

.ai-config-table td:nth-child(7) input {
  min-width: 180px;
}

.ai-config-table td:nth-child(8) input,
.ai-config-table td:nth-child(9) input,
.ai-config-table td:nth-child(10) input {
  min-width: 100px;
}

.ai-config-table th:nth-child(11),
.ai-config-table th:nth-child(12),
.ai-config-table td:nth-child(11),
.ai-config-table td:nth-child(12) {
  width: 54px;
  text-align: center;
}

.ai-config-table td:nth-child(13) {
  min-width: 172px;
}

.readonly-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #dce6ef;
  border-radius: 6px;
  background: #f8fbfd;
  color: #44566c;
  font-size: 13px;
  white-space: nowrap;
}

.ai-provider-actions {
  flex-wrap: nowrap;
  min-width: 164px;
}

.ai-provider-actions .btn {
  white-space: nowrap;
}

.ai-model-page-head.ocr-model-page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  overflow: hidden;
  padding: 24px;
  border-color: #d4e5ef;
  background:
    linear-gradient(90deg, rgba(47, 109, 246, 0.06) 0 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(135deg, #ffffff 0%, #f4fbf8 52%, #eef7ff 100%);
}

.ai-model-page-head.ocr-model-page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--success), #f0b43c);
}

.ocr-model-head-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.ocr-model-head-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  min-height: 36px;
  padding: 5px 11px 5px 5px;
  border: 1px solid rgba(47, 109, 246, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #2459d4;
  font-size: 12px;
  font-weight: 900;
}

.ocr-model-head-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef5ff;
  color: var(--primary);
}

.ocr-model-head-icon svg {
  width: 17px;
  height: 17px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ai-model-page-head.ocr-model-page h1 {
  margin-bottom: 2px;
  color: #17243a;
  font-size: 28px;
  line-height: 1.18;
}

.ai-model-page-head.ocr-model-page p {
  max-width: 760px;
  margin: 0;
  color: #5f6f84;
  line-height: 1.7;
}

.ocr-model-head-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 10px;
  width: fit-content;
  max-width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #dce8f3;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 20px rgba(76, 102, 121, 0.07);
}

.ocr-model-head-status strong {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #17243a;
  font-size: 13px;
  line-height: 1.4;
}

.ocr-model-head-status strong::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #aab7c6;
}

.ocr-model-head-status span {
  min-width: 0;
  color: #6b7a8f;
  font-size: 13px;
  line-height: 1.45;
}

.ocr-model-head-status.ready {
  border-color: rgba(42, 187, 152, 0.26);
  background: rgba(242, 251, 248, 0.9);
}

.ocr-model-head-status.ready strong {
  color: #08734f;
}

.ocr-model-head-status.ready strong::before {
  background: #2abb98;
}

.ocr-model-head-status.missing {
  border-color: rgba(180, 35, 24, 0.22);
  background: rgba(255, 246, 245, 0.9);
}

.ocr-model-head-status.missing strong {
  color: var(--danger);
}

.ocr-model-head-status.missing strong::before {
  background: var(--danger);
}

.ai-model-page-head.ocr-model-page .button-row {
  position: relative;
  z-index: 1;
  align-content: start;
  justify-content: flex-end;
}

.ocr-model-action {
  min-width: 116px;
  background: rgba(255, 255, 255, 0.92);
  border-color: #d4e4ef;
  color: #2f4158;
  box-shadow: 0 8px 18px rgba(76, 102, 121, 0.07);
}

.ocr-model-action:hover {
  border-color: rgba(47, 109, 246, 0.32);
  background: #ffffff;
  color: var(--primary);
}

.ocr-model-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.68fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid #d9e7f2;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(47, 109, 246, 0.055) 0 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(0deg, rgba(42, 187, 152, 0.045) 0 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(135deg, #ffffff 0%, #f7fbfd 54%, #f2fbf7 100%);
  box-shadow: var(--card-shadow);
}

.ocr-model-command-copy {
  display: grid;
  align-content: center;
  gap: 13px;
  min-width: 0;
  padding: 4px 8px 4px 2px;
}

.ocr-model-command-copy > span {
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid rgba(47, 109, 246, 0.18);
  border-radius: 999px;
  background: #eef5ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.ocr-model-command-copy h2 {
  max-width: 780px;
  margin: 0;
  color: #17243a;
  font-size: 24px;
  line-height: 1.25;
}

.ocr-model-command-copy p {
  max-width: 760px;
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.75;
}

.ocr-model-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.ocr-model-flow strong {
  position: relative;
  min-width: 0;
  min-height: 50px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #dce8f3;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #2f4158;
  box-shadow: 0 6px 16px rgba(78, 105, 126, 0.06);
}

.ocr-model-flow strong:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -10px;
  width: 10px;
  border-top: 1px solid #cbddea;
}

.ocr-model-flow strong span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef5ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.ocr-model-flow strong b {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ocr-model-flow strong:nth-child(2) {
  border-color: rgba(42, 187, 152, 0.28);
  color: #08734f;
}

.ocr-model-flow strong:nth-child(2) span {
  background: #eaf8f2;
  color: #08734f;
}

.ocr-model-flow strong:nth-child(3) {
  border-color: rgba(183, 121, 31, 0.25);
  color: #875a12;
}

.ocr-model-flow strong:nth-child(3) span {
  background: #fff8ec;
  color: #875a12;
}

.ocr-model-readiness {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  width: fit-content;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #dfeaf3;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.ocr-model-readiness strong {
  color: #17243a;
  font-size: 13px;
  line-height: 1.4;
}

.ocr-model-readiness span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #5f6f84;
  font-size: 13px;
  line-height: 1.45;
}

.ocr-model-readiness.ready {
  border-color: rgba(42, 187, 152, 0.28);
  background: rgba(242, 251, 248, 0.94);
}

.ocr-model-readiness.ready strong {
  color: #08734f;
}

.ocr-model-readiness.missing {
  border-color: rgba(180, 35, 24, 0.22);
  background: rgba(255, 246, 245, 0.94);
}

.ocr-model-readiness.missing strong {
  color: var(--danger);
}

.ocr-model-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.ocr-model-stat-grid article {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  min-width: 0;
  min-height: 108px;
  overflow: hidden;
  padding: 15px;
  border: 1px solid #dfeaf3;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 18px rgba(76, 102, 121, 0.06);
}

.ocr-model-stat-grid article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: #d8e7f3;
}

.ocr-model-stat-grid article.span-wide {
  grid-column: 1 / -1;
}

.ocr-model-stat-grid span,
.ocr-model-stat-grid small {
  overflow: hidden;
  color: #7a8798;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ocr-model-stat-grid strong {
  min-width: 0;
  overflow: hidden;
  align-self: center;
  color: #162235;
  font-size: 22px;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ocr-model-stat-grid article.span-wide strong {
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

.ocr-model-stat-grid .is-ready {
  border-color: rgba(42, 187, 152, 0.30);
  background: rgba(242, 251, 248, 0.96);
}

.ocr-model-stat-grid .is-ready::before {
  background: var(--success);
}

.ocr-model-stat-grid .is-ready strong {
  color: #08734f;
}

.ocr-model-stat-grid .is-missing {
  border-color: rgba(180, 35, 24, 0.24);
  background: rgba(255, 246, 245, 0.96);
}

.ocr-model-stat-grid .is-missing::before {
  background: var(--danger);
}

.ocr-model-stat-grid .is-missing strong {
  color: var(--danger);
}

.ocr-model-guide {
  counter-reset: ocr-guide;
}

.ocr-model-guide article {
  position: relative;
  overflow: hidden;
  padding-top: 18px;
  border-color: #d9e7f2;
}

.ocr-model-guide article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--success), #f0b43c);
}

.ocr-model-guide article::after {
  counter-increment: ocr-guide;
  content: "0" counter(ocr-guide);
  position: absolute;
  top: 14px;
  right: 14px;
  color: #d1dce8;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.ocr-model-guide strong,
.ocr-model-guide span {
  position: relative;
  z-index: 1;
}

.ocr-model-create-panel {
  overflow: hidden;
  padding: 0;
  border-color: #d9e7f2;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fbfd 100%);
}

.ocr-model-create-panel .section-title {
  margin: 0;
  padding: 20px 20px 14px;
  border-bottom: 1px solid #e5eef6;
}

.ocr-model-create-panel .section-title h2 {
  margin-top: 0;
}

.ocr-model-create-panel .grid-form {
  padding: 18px 20px 0;
}

.ocr-models-form .settings-actions {
  justify-content: flex-end;
  padding: 0 20px 20px;
}

.ocr-model-form-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ocr-model-form-tags span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #dbe9f5;
  border-radius: 999px;
  background: #f7fbfd;
  color: #44566c;
  font-size: 12px;
  font-weight: 800;
}

.ocr-model-form-tags span:first-child {
  border-color: rgba(42, 187, 152, 0.26);
  background: #eefbf7;
  color: #08734f;
}

.ocr-model-form-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 16px 20px 0;
  padding: 12px 14px;
  border: 1px solid #e2edf5;
  border-radius: 8px;
  background: #fbfdff;
}

.ocr-model-form-note strong {
  color: #2459d4;
  font-size: 13px;
  white-space: nowrap;
}

.ocr-model-form-note span {
  min-width: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
}

.ocr-model-list-panel {
  overflow: hidden;
  padding: 0;
  border-color: #d9e7f2;
}

.ocr-model-list-panel > .section-title {
  margin-bottom: 0;
  padding: 20px 20px 14px;
  border-bottom: 1px solid #e7eef5;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.ocr-model-list-panel > .section-title h2 {
  margin-top: 0;
}

.ocr-model-list-panel > .section-title p {
  margin: 5px 0 0;
  line-height: 1.6;
}

.ocr-model-table-scroll {
  margin: 18px 20px 20px;
  border: 1px solid #dfe9f2;
  border-radius: 8px;
  background: #ffffff;
}

.ocr-model-table {
  min-width: 1880px;
  border-collapse: separate;
  border-spacing: 0;
}

.ocr-model-table.ocr-model-table-empty {
  min-width: 0;
}

.ocr-model-table.ocr-model-table-empty thead {
  display: none;
}

.ocr-model-table th {
  background: #f3f8fc;
  color: #40536a;
  font-size: 13px;
}

.ocr-model-table th:first-child {
  border-top-left-radius: 8px;
}

.ocr-model-table th:last-child {
  border-top-right-radius: 8px;
}

.ocr-model-table td {
  border-bottom-color: #edf3f8;
  background: #ffffff;
}

.ocr-model-table tbody tr:hover td {
  background: #fbfdff;
}

.ocr-model-table .ocr-model-row.is-default td:first-child {
  box-shadow: inset 4px 0 0 var(--primary);
}

.ocr-model-table .ocr-model-row.is-enabled:not(.is-default) td:first-child {
  box-shadow: inset 4px 0 0 rgba(42, 187, 152, 0.68);
}

.ocr-model-table .ocr-model-row.is-disabled td {
  background: #fcfdff;
}

.ocr-model-table input,
.ocr-model-table select {
  min-height: 36px;
  border-color: #dce8f3;
  background-color: #ffffff;
}

.ocr-model-table input:focus,
.ocr-model-table select:focus {
  border-color: #88adff;
}

.ocr-model-table input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-width: 0;
  padding: 0;
  accent-color: var(--primary);
}

.ai-config-id {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  color: #17243a;
  font-size: 13px;
  font-weight: 900;
}

.ocr-model-row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.ocr-mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid #dce8f3;
  border-radius: 999px;
  background: #f8fbfd;
  color: #667383;
  font-size: 12px;
  font-weight: 800;
}

.ocr-mini-badge.primary {
  border-color: rgba(47, 109, 246, 0.24);
  background: #eef5ff;
  color: var(--primary);
}

.ocr-mini-badge.success {
  border-color: rgba(42, 187, 152, 0.28);
  background: #eefbf7;
  color: #08734f;
}

.ocr-mini-badge.muted {
  background: #f3f6f9;
  color: #8a95a5;
}

.ocr-model-empty-row td {
  border-bottom: 0;
  padding: 18px;
}

.ocr-model-empty-state {
  display: grid;
  gap: 7px;
  min-height: 118px;
  place-content: center;
  border: 1px dashed #c7d7e8;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(47, 109, 246, 0.045) 0 1px, transparent 1px) 0 0 / 24px 24px,
    #fbfdff;
  text-align: center;
}

.ocr-model-empty-state strong {
  color: #17243a;
  font-size: 16px;
}

.ocr-model-empty-state span {
  max-width: 520px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
}

@media (max-width: 1100px) {
  .ai-model-page-head.ocr-model-page,
  .ocr-model-command {
    grid-template-columns: 1fr;
  }

  .ai-model-page-head.ocr-model-page .button-row {
    justify-content: flex-start;
  }

  .ocr-model-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ocr-model-flow strong:nth-child(2)::after {
    display: none;
  }
}

@media (max-width: 680px) {
  .ai-model-page-head.ocr-model-page {
    padding: 18px;
  }

  .ai-model-page-head.ocr-model-page h1 {
    font-size: 24px;
  }

  .ocr-model-head-kicker,
  .ocr-model-head-status,
  .ocr-model-readiness {
    width: 100%;
  }

  .ocr-model-head-status,
  .ocr-model-readiness {
    align-items: flex-start;
    flex-direction: column;
  }

  .ocr-model-action {
    width: 100%;
  }

  .ocr-model-command {
    padding: 16px;
  }

  .ocr-model-command-copy {
    padding: 0;
  }

  .ocr-model-command-copy h2 {
    font-size: 21px;
  }

  .ocr-model-flow,
  .ocr-model-stat-grid {
    grid-template-columns: 1fr;
  }

  .ocr-model-flow strong:not(:last-child)::after {
    display: none;
  }

  .ocr-model-stat-grid article.span-wide {
    grid-column: auto;
  }

  .ocr-model-create-panel .section-title,
  .ocr-model-list-panel > .section-title {
    padding: 16px;
  }

  .ocr-model-form-tags {
    justify-content: flex-start;
  }

  .ocr-model-form-note {
    grid-template-columns: 1fr;
    margin: 14px 16px 0;
  }

  .ocr-model-create-panel .grid-form {
    padding: 16px 16px 0;
  }

  .ocr-models-form .settings-actions {
    justify-content: stretch;
    padding: 0 16px 16px;
  }

  .ocr-models-form .settings-actions .btn {
    width: 100%;
  }

  .ocr-model-table-scroll {
    margin: 14px 16px 16px;
  }

  .ocr-model-empty-state {
    min-height: 150px;
    padding: 18px;
    text-align: left;
  }
}

.roles-table-wrap,
.users-table-wrap,
.question-types-table-wrap {
  max-width: 100%;
}

.question-types-form {
  min-width: 0;
  overflow: hidden;
}

.question-types-table {
  min-width: 1020px;
  table-layout: fixed;
}

.roles-table {
  min-width: 960px;
}

.users-table {
  min-width: 2140px;
}

.verification-table {
  min-width: 1180px;
}

.question-types-table th,
.question-types-table td,
.roles-table th,
.roles-table td,
.users-table th,
.users-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.verification-table th,
.verification-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.verification-table td:nth-child(7) {
  min-width: 180px;
}

.verification-table td:nth-child(8) {
  min-width: 280px;
}

.question-types-table th:nth-child(1),
.question-types-table td:nth-child(1) {
  width: 58px;
}

.question-types-table th:nth-child(2),
.question-types-table td:nth-child(2) {
  width: 230px;
}

.question-types-table th:nth-child(3),
.question-types-table td:nth-child(3),
.question-types-table th:nth-child(4),
.question-types-table td:nth-child(4),
.question-types-table th:nth-child(6),
.question-types-table td:nth-child(6) {
  width: 145px;
}

.question-types-table th:nth-child(5),
.question-types-table td:nth-child(5) {
  width: 230px;
}

.question-types-table th:nth-child(7),
.question-types-table td:nth-child(7) {
  width: 80px;
  text-align: center;
}

.question-types-table input,
.question-types-table select {
  width: 100%;
  min-width: 0;
}

.question-types-table .check-cell input {
  width: 16px;
  height: 16px;
  min-width: 0;
  margin: 0 auto;
}

.analytics-head .btn {
  min-width: 118px;
}

.analytics-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.analytics-stat-grid article {
  min-height: 128px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid #e5edf5;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0, rgba(33, 192, 216, 0.12), transparent 36%),
    #ffffff;
  box-shadow: var(--card-shadow);
}

.analytics-stat-grid span {
  display: block;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}

.analytics-stat-grid strong {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: 28px;
  line-height: 1;
}

.analytics-stat-grid small {
  display: block;
  margin-top: 10px;
  font-size: 12px;
}

.analytics-stat-grid em {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  align-self: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #e8f7ff, #d5efff);
  color: #1597f5;
  font-size: 18px;
  font-style: normal;
  font-weight: 900;
}

.analytics-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.analytics-chart-panel {
  min-height: 360px;
}

.analytics-bar-chart {
  height: 240px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 22px;
  padding: 22px 18px 8px;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(to bottom, transparent 0 47px, #edf3f8 48px),
    #fbfdff;
}

.analytics-bar-chart div {
  height: 100%;
  display: grid;
  grid-template-rows: 22px minmax(0, 1fr) 24px;
  gap: 8px;
  align-items: end;
  text-align: center;
}

.analytics-bar-chart span {
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.analytics-bar-chart i {
  width: min(64px, 70%);
  min-height: 4px;
  justify-self: center;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, #b9ecff, var(--bar-color));
  box-shadow: 0 10px 20px rgba(47, 109, 246, 0.12);
}

.analytics-bar-chart strong {
  color: #667085;
  font-size: 12px;
}

.analytics-paper-bars {
  display: grid;
  gap: 16px;
  padding: 12px 2px 0;
}

.analytics-paper-bars div {
  display: grid;
  gap: 7px;
}

.analytics-paper-bars span {
  overflow: hidden;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-paper-bars i {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf3f8;
}

.analytics-paper-bars b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1597f5, #51d1d9);
}

.analytics-paper-bars small {
  font-size: 12px;
}

.analytics-ai-panel {
  margin-bottom: 18px;
}

.analytics-ai-list {
  display: grid;
  gap: 14px;
}

.analytics-ai-list article {
  padding: 16px;
  border: 1px solid #e7eef6;
  border-radius: var(--radius);
  background: #fbfdff;
}

.analytics-ai-list header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.analytics-ai-list strong {
  color: #27384c;
}

.analytics-ai-list span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.analytics-ai-list p {
  margin: 0;
  color: #475467;
  line-height: 1.8;
}

.analytics-import-panel {
  width: min(100%, 820px);
}

.analytics-modal-tools {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  align-items: center;
}

.analytics-import-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px 0;
}

.analytics-import-steps div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #e5edf5;
  border-radius: var(--radius);
  background: #fbfdff;
  color: #475467;
  font-size: 13px;
  font-weight: 800;
}

.analytics-import-steps b {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1597f5;
  color: #ffffff;
  font-size: 12px;
}

.analytics-import-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
}

.analytics-import-body label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.analytics-import-body .span-all {
  grid-column: 1 / -1;
}

.analytics-import-body input,
.analytics-import-body select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #dce6ef;
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-weight: 500;
}

.analytics-upload-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 152px;
  padding: 16px;
  border: 1px dashed #b8d7ef;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0, rgba(21, 151, 245, 0.11), transparent 36%),
    #fbfdff;
}

.analytics-upload-card strong {
  color: #26364a;
  font-size: 15px;
}

.analytics-upload-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.analytics-upload-card input[type="file"] {
  margin-top: 6px;
  background: #ffffff;
  cursor: pointer;
}

.analytics-template-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #eef8ff;
  color: #256083;
  font-size: 13px;
}

.analytics-template-note strong,
.analytics-template-note span {
  grid-column: 1;
}

.analytics-template-note span {
  color: #527084;
}

.analytics-template-note a {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--radius);
  background: #ffffff;
  color: #1597f5;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(21, 151, 245, 0.12);
}

.analytics-table-wrap {
  max-width: 100%;
}

.analytics-table {
  min-width: 920px;
  table-layout: fixed;
}

.analytics-table th,
.analytics-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.analytics-table th:nth-child(1),
.analytics-table td:nth-child(1) {
  width: auto;
}

.analytics-table th:nth-child(n + 2),
.analytics-table td:nth-child(n + 2) {
  width: 116px;
  text-align: center;
}

.analytics-paper-title {
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ocr-table-wrap {
  max-width: 100%;
}

.ocr-table {
  min-width: 1760px;
  table-layout: fixed;
}

.ocr-table th,
.ocr-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.ocr-table th:nth-child(1),
.ocr-table td:nth-child(1) {
  width: 46px;
}

.ocr-table th:nth-child(2),
.ocr-table td:nth-child(2) {
  width: 64px;
}

.ocr-table th:nth-child(3),
.ocr-table td:nth-child(3) {
  width: 280px;
}

.ocr-table th:nth-child(4),
.ocr-table td:nth-child(4) {
  width: 210px;
}

.ocr-table th:nth-child(5),
.ocr-table td:nth-child(5) {
  width: 250px;
}

.ocr-table th:nth-child(6),
.ocr-table td:nth-child(6) {
  width: 280px;
}

.ocr-table th:nth-child(7),
.ocr-table td:nth-child(7) {
  width: 150px;
}

.ocr-table th:nth-child(8),
.ocr-table td:nth-child(8) {
  width: 120px;
}

.ocr-table th:nth-child(9),
.ocr-table td:nth-child(9) {
  width: 170px;
}

.ocr-table th:nth-child(10),
.ocr-table td:nth-child(10) {
  width: 230px;
}

.ocr-task-title {
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ocr-task-title-cell {
  white-space: normal !important;
}

.ocr-task-title-cell textarea {
  min-height: 72px;
  margin-top: 8px;
}

.ocr-inline-grid {
  display: grid;
  gap: 8px;
}

.ocr-table td small,
.ocr-paper-link {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: normal;
}

.ocr-paper-link {
  color: var(--primary);
  font-weight: 800;
}

.ocr-error-text {
  color: var(--danger) !important;
  font-weight: 800;
}

.knowledge-import-table {
  min-width: 1080px;
  table-layout: fixed;
}

.knowledge-import-table th,
.knowledge-import-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.knowledge-import-table th:nth-child(1),
.knowledge-import-table td:nth-child(1) {
  width: auto;
}

.knowledge-import-table th:nth-child(2),
.knowledge-import-table td:nth-child(2) {
  width: 170px;
}

.knowledge-import-table th:nth-child(3),
.knowledge-import-table td:nth-child(3),
.knowledge-import-table th:nth-child(4),
.knowledge-import-table td:nth-child(4),
.knowledge-import-table th:nth-child(5),
.knowledge-import-table td:nth-child(5),
.knowledge-import-table th:nth-child(6),
.knowledge-import-table td:nth-child(6),
.knowledge-import-table th:nth-child(7),
.knowledge-import-table td:nth-child(7) {
  width: 108px;
}

.knowledge-import-table th:nth-child(8),
.knowledge-import-table td:nth-child(8) {
  width: 128px;
}

.knowledge-import-table th:nth-child(9),
.knowledge-import-table td:nth-child(9) {
  width: 172px;
}

.roles-table td:nth-child(6) input {
  min-width: 280px;
}

.users-table td:nth-child(2) input,
.users-table td:nth-child(3) input,
.users-table td:nth-child(5) input,
.users-table td:nth-child(6) input,
.users-table td:nth-child(7) input,
.users-table td:nth-child(12) input {
  min-width: 150px;
}

.users-table td:nth-child(12) input {
  min-width: 120px;
}

.email-settings-panel {
  overflow: hidden;
  padding: 0;
  border-color: #d9e7f2;
}

.email-settings-panel .section-title {
  margin: 0;
}

.email-section-title {
  justify-content: flex-start;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #e5edf5;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.email-section-title > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.email-section-title > div > span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.email-section-title h2 {
  margin: 0;
  color: #17243a;
  font-size: 22px;
  line-height: 1.25;
}

.email-section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.email-settings-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.email-config-card {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  border: 1px solid #dfe9f3;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.email-config-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.email-config-head > div {
  min-width: 0;
}

.email-config-head h3 {
  margin: 0;
  color: #17243a;
  font-size: 17px;
  line-height: 1.28;
}

.email-config-subtitle {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.email-config-card .grid-form {
  gap: 13px;
}

.email-config-card label {
  min-width: 0;
}

.email-config-card input,
.email-config-card select {
  min-height: 42px;
}

.email-preset-help,
.email-secret-note {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid #e1ebf5;
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.email-test-card {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fbfe 100%);
}

.email-test-card > div:first-child {
  display: grid;
  gap: 14px;
}

.email-actions {
  align-items: center;
  justify-content: flex-end;
}

.email-test-card .email-actions {
  min-width: 280px;
}

.bulk-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid #e5edf5;
  border-radius: var(--radius);
  background: var(--panel-tint);
}

.bulk-actions span {
  color: var(--muted);
  font-size: 13px;
}

.form-stack,
.grid-form {
  display: grid;
  gap: 14px;
}

.grid-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.grid-form.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-all {
  grid-column: 1 / -1;
}

.helper-text {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: #344054;
  font-weight: 600;
}

.form-field {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: #344054;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d9e4ee;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  padding: 10px 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #88adff;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(47, 109, 246, 0.12);
}

select {
  text-overflow: ellipsis;
}

textarea {
  resize: vertical;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid #e5edf5;
  border-radius: var(--radius);
  background: var(--panel-tint);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.table-scroll > table {
  width: 100%;
}

.panel > table,
.panel > .form-stack > table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid #e5edf5;
  border-radius: var(--radius);
  background: var(--panel-tint);
  -webkit-overflow-scrolling: touch;
}

small {
  color: var(--muted);
  line-height: 1.5;
}

table input,
table select {
  min-width: 150px;
}

table input[type="checkbox"] {
  width: auto;
  min-width: 0;
}

.paper-title-cell {
  min-width: 220px;
  font-weight: 700;
}

.paper-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.paper-stats-grid article {
  min-height: 118px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid #e5edf5;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0, rgba(47, 109, 246, 0.1), transparent 36%),
    #ffffff;
  box-shadow: var(--card-shadow);
}

.paper-stats-grid span {
  display: block;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}

.paper-stats-grid strong {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: 28px;
  line-height: 1;
}

.paper-stats-grid small {
  display: block;
  margin-top: 10px;
  font-size: 12px;
}

.paper-stats-grid em {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  align-self: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #e8f7ff, #d5efff);
  color: #1597f5;
  font-size: 18px;
  font-style: normal;
  font-weight: 900;
}

.paper-table-actions {
  min-width: 160px;
}

.users-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.users-table {
  width: 100%;
  min-width: 2320px;
  table-layout: auto;
}

.users-table th,
.users-table td {
  white-space: nowrap;
}

.users-table th:nth-child(1),
.users-table td:nth-child(1) {
  width: 52px;
}

.users-table th:nth-child(2),
.users-table td:nth-child(2),
.users-table th:nth-child(3),
.users-table td:nth-child(3) {
  width: 170px;
}

.users-table th:nth-child(4),
.users-table td:nth-child(4),
.users-table th:nth-child(9),
.users-table td:nth-child(9),
.users-table th:nth-child(11),
.users-table td:nth-child(11),
.users-table th:nth-child(13),
.users-table td:nth-child(13),
.users-table th:nth-child(14),
.users-table td:nth-child(14),
.users-table th:nth-child(15),
.users-table td:nth-child(15) {
  width: 130px;
}

.users-table th:nth-child(5),
.users-table td:nth-child(5),
.users-table th:nth-child(6),
.users-table td:nth-child(6),
.users-table th:nth-child(7),
.users-table td:nth-child(7) {
  width: 170px;
}

.users-table th:nth-child(8),
.users-table td:nth-child(8) {
  width: 420px;
}

.users-table th:nth-child(10),
.users-table td:nth-child(10) {
  width: 260px;
}

.users-table th:nth-child(12),
.users-table td:nth-child(12) {
  width: 150px;
}

.user-directory-panel {
  background: #f3f5f7;
}

.user-directory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.user-directory-head h2 {
  margin: 0 0 5px;
}

.user-directory-head p {
  margin: 0;
}

.user-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 14px;
}

.user-stat-card {
  min-height: 112px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 16px;
  align-items: center;
  overflow: hidden;
  padding: 18px 20px;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(36, 51, 68, 0.05);
}

.user-stat-card span {
  display: block;
  color: #1f2937;
  font-size: 13px;
  font-weight: 800;
}

.user-stat-card strong {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: 28px;
  line-height: 1;
}

.user-stat-card small {
  display: block;
  margin-top: 8px;
  font-size: 12px;
}

.user-stat-card i {
  position: relative;
  height: 46px;
  display: block;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0), currentColor),
    linear-gradient(90deg, currentColor 0 10%, transparent 10% 16%, currentColor 16% 30%, transparent 30% 36%, currentColor 36% 52%, transparent 52% 60%, currentColor 60% 80%, transparent 80%);
  opacity: 0.18;
  clip-path: polygon(0 62%, 13% 54%, 26% 58%, 39% 48%, 52% 58%, 65% 38%, 78% 50%, 91% 34%, 100% 42%, 100% 100%, 0 100%);
}

.user-stat-card.accent-green {
  color: #12a87c;
}

.user-stat-card.accent-blue {
  color: #3974f6;
}

.user-stat-card.accent-amber {
  color: #d38220;
}

.user-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 14px;
  align-items: center;
}

.user-filter-tabs,
.user-toolbar-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.user-filter-tab {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #ffffff;
  color: #475467;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.user-filter-tab span {
  color: #98a2b3;
  font-size: 12px;
}

.user-filter-tab:hover,
.user-filter-tab.active {
  border-color: #cfe0ff;
  background: #edf4ff;
  color: var(--primary);
}

.user-filter-tab.active {
  box-shadow: 0 8px 18px rgba(47, 109, 246, 0.1);
}

.user-filter-tab.role-admin {
  color: #9a5b10;
}

.user-filter-tab.role-admin:hover,
.user-filter-tab.role-admin.active {
  border-color: #f3d7a5;
  background: #fff7e8;
  color: #9a5b10;
}

.user-filter-tab.role-teacher {
  color: #2459d4;
}

.user-filter-tab.role-teacher:hover,
.user-filter-tab.role-teacher.active {
  border-color: #cfe0ff;
  background: #edf4ff;
  color: #2459d4;
}

.user-filter-tab.role-researcher {
  color: #047857;
}

.user-filter-tab.role-researcher:hover,
.user-filter-tab.role-researcher.active {
  border-color: #bcebdc;
  background: #e9fbf5;
  color: #047857;
}

.user-filter-tab.role-custom {
  color: #5b45b5;
}

.user-filter-tab.role-custom:hover,
.user-filter-tab.role-custom.active {
  border-color: #d8cef8;
  background: #f1edff;
  color: #5b45b5;
}

.user-toolbar-controls {
  justify-content: flex-end;
}

.user-toolbar-controls select,
.user-search input {
  min-height: 36px;
  padding-block: 8px;
  border-color: transparent;
  background: #ffffff;
}

.user-toolbar-controls select {
  width: auto;
  min-width: 116px;
}

.user-search {
  position: relative;
  width: min(100%, 220px);
  display: block;
}

.user-search span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.user-search input {
  padding-left: 34px;
}

.user-search::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 13px;
  height: 13px;
  border: 2px solid #a3adbb;
  border-radius: 50%;
  transform: translateY(-58%);
}

.user-search::after {
  content: "";
  position: absolute;
  left: 24px;
  top: 22px;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: #a3adbb;
  transform: rotate(45deg);
}

.user-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
}

.user-card {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 16px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(36, 51, 68, 0.06);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.user-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--role-accent, var(--primary));
}

.user-card:hover {
  box-shadow: 0 16px 34px rgba(36, 51, 68, 0.1);
  transform: translateY(-2px);
}

.user-card.role-admin {
  --role-accent: #d38220;
  --role-soft: #fff7e8;
  --role-text: #9a5b10;
}

.user-card.role-teacher {
  --role-accent: #3974f6;
  --role-soft: #edf4ff;
  --role-text: #2459d4;
}

.user-card.role-researcher {
  --role-accent: #12a87c;
  --role-soft: #e9fbf5;
  --role-text: #047857;
}

.user-card.role-custom {
  --role-accent: #7c5fd6;
  --role-soft: #f1edff;
  --role-text: #5b45b5;
}

.user-card[hidden] {
  display: none;
}

.user-card-top,
.user-card-profile {
  display: flex;
  align-items: flex-start;
  min-width: 0;
}

.user-card-top {
  justify-content: space-between;
  gap: 12px;
}

.user-card-profile {
  gap: 12px;
}

.user-card-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  flex: 0 0 58px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent),
    var(--role-soft, #eef6ff);
  color: var(--role-text, var(--primary));
  font-size: 22px;
  font-weight: 900;
}

.user-card-title {
  min-width: 0;
}

.user-card-title > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.user-card-title h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  line-height: 1.3;
  word-break: break-word;
}

.user-card-title p {
  margin: 7px 0 0;
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-mark,
.badge.role-scope {
  color: var(--role-text, var(--primary));
  background: var(--role-soft, #edf4ff);
}

.role-mark {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
}

.user-card-menu {
  flex: 0 0 auto;
}

.user-icon-button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #98a2b3;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.user-icon-button:hover {
  background: #f2f4f7;
  color: #475467;
}

.user-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.badge.user-status-enabled {
  background: #e9fbf5;
  color: #047857;
}

.badge.user-status-disabled {
  background: #f1f5f9;
  color: #64748b;
}

.user-card-summary {
  display: grid;
  gap: 4px;
}

.user-card-summary p {
  margin: 0;
  overflow: hidden;
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card-summary span {
  margin-right: 7px;
  color: #98a2b3;
  font-weight: 800;
}

.user-card-metrics {
  display: grid;
  grid-template-columns: 0.62fr 1.62fr 0.82fr;
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #edf1f5;
}

.user-card-metrics div {
  min-width: 0;
  padding: 12px 10px;
  background: #f8fafc;
  text-align: center;
}

.user-card-metrics dt {
  margin: 0 0 5px;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 900;
}

.user-card-metrics dd {
  margin: 0;
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card-metrics .user-card-region {
  padding-inline: 8px;
}

.user-card-metrics .user-card-region dd {
  display: -webkit-box;
  min-height: 35px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  white-space: normal;
  word-break: break-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.user-card-note {
  display: grid;
  gap: 5px;
  padding-top: 4px;
  border-top: 1px solid #eef2f6;
}

.user-card-note p,
.user-card-note small {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card-note p {
  color: #475467;
  font-size: 13px;
  line-height: 1.55;
}

.user-card-note small {
  color: #98a2b3;
  font-size: 12px;
}

.user-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 2px;
}

.user-save-row {
  justify-content: flex-end;
}

.user-edit-modal {
  align-items: flex-start;
  overflow: auto;
}

.user-edit-panel {
  width: min(100%, 920px);
  margin: auto 0;
}

.user-edit-grid {
  padding: 18px;
  background: #ffffff;
}

.user-edit-grid .stage-check-list.compact {
  min-width: 0;
  max-width: none;
}

.user-edit-grid .region-select-grid {
  width: 100%;
}

.table-empty {
  color: var(--muted);
  text-align: center;
}

th,
td {
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: #3c4a5e;
  background: #f7fafc;
  font-weight: 800;
}

tbody tr:hover {
  background: #f8fbff;
}

.text-clip {
  max-width: 420px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf4ff;
  color: #2f5edb;
  font-size: 12px;
  font-weight: 700;
}

.alert {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  border: 1px solid #dfe8f1;
  background: var(--panel-tint);
  box-shadow: var(--soft-shadow);
}

.alert.success {
  border-color: #b8eadc;
  background: #f0fbf7;
  color: var(--success);
}

.alert.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: var(--danger);
}

.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: stretch;
  padding: 0;
  background:
    radial-gradient(circle at 18% 0, rgba(255, 255, 255, 0.68), transparent 34%),
    linear-gradient(135deg, #d9ebf1, #cfe2e8);
}

.install-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 48px);
  background:
    radial-gradient(circle at 12% 10%, rgba(52, 211, 153, 0.24), transparent 26%),
    radial-gradient(circle at 90% 18%, rgba(47, 109, 246, 0.22), transparent 28%),
    radial-gradient(circle at 65% 96%, rgba(245, 178, 70, 0.16), transparent 30%),
    linear-gradient(135deg, #eef7f9 0%, #e6eefb 54%, #edf7f1 100%);
}

.install-shell {
  position: relative;
  width: min(100%, 1280px);
  min-height: 720px;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 30px 90px rgba(32, 65, 92, 0.2);
  backdrop-filter: blur(22px);
}

.install-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.72), transparent 34%),
    linear-gradient(315deg, rgba(33, 192, 216, 0.1), transparent 38%);
}

.install-rail {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 30px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.2), transparent 28%),
    linear-gradient(160deg, rgba(12, 72, 76, 0.86) 0%, rgba(16, 58, 72, 0.78) 52%, rgba(35, 63, 92, 0.74) 100%);
  color: #f8fafc;
  border-right: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, 0.34),
    inset -1px 0 0 rgba(255, 255, 255, 0.08),
    18px 0 42px rgba(27, 65, 86, 0.16);
  backdrop-filter: blur(18px) saturate(140%);
}

.install-rail::before,
.install-rail::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.install-rail::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 18%, rgba(255, 255, 255, 0.08) 70%, transparent);
  mix-blend-mode: screen;
}

.install-rail::after {
  inset: 1px;
  border-radius: 7px 0 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-right: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), transparent 36%),
    linear-gradient(315deg, rgba(45, 212, 191, 0.12), transparent 42%);
}

.install-rail > * {
  position: relative;
  z-index: 1;
}

.install-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.install-brand .brand-mark {
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(236, 252, 255, 0.78);
  color: #17475a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 14px 30px rgba(45, 212, 191, 0.24);
  backdrop-filter: blur(10px);
}

.install-brand strong,
.install-brand span,
.install-progress span,
.install-progress strong,
.install-progress p,
.install-stat-grid span,
.install-stat-grid strong {
  display: block;
}

.install-brand strong {
  font-size: 17px;
}

.install-brand span,
.install-progress span {
  margin-top: 5px;
  color: rgba(248, 250, 252, 0.72);
  font-size: 13px;
}

.install-progress {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.07)),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 16px 34px rgba(8, 33, 47, 0.14);
  backdrop-filter: blur(14px) saturate(145%);
}

.install-progress-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.install-progress strong {
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
}

.install-progress p {
  margin: 10px 0 0;
  color: rgba(248, 250, 252, 0.72);
  font-size: 13px;
}

.install-progress-bar {
  height: 9px;
  overflow: hidden;
  margin-top: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 2px rgba(8, 33, 47, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.18);
}

.install-progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #28d9b0, #57b6ff 58%, #f6c45a);
  box-shadow: 0 0 22px rgba(87, 182, 255, 0.5);
}

.install-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.install-stat-grid div {
  min-height: 78px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.07);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 12px 26px rgba(8, 33, 47, 0.1);
  backdrop-filter: blur(12px) saturate(135%);
}

.install-stat-grid strong {
  color: #ffffff;
  font-size: 22px;
  line-height: 1.1;
}

.install-stat-grid span {
  margin-top: 7px;
  color: rgba(248, 250, 252, 0.68);
  font-size: 12px;
}

.auth-card,
.install-card {
  width: min(100%, 980px);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(100%, 420px);
}

.install-card {
  width: auto;
  border: 0;
  border-radius: 0;
  padding: clamp(28px, 3.8vw, 48px);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.auth-head,
.install-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.auth-head {
  display: block;
  text-align: center;
}

.auth-head .brand-mark {
  margin: 0 auto 12px;
  background: linear-gradient(135deg, #33d1ad, #2f6df6);
  color: #ffffff;
}

.auth-logo {
  width: 52px;
  height: 52px;
  display: block;
  margin: 0 auto 12px;
  border-radius: 8px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--line);
}

.auth-head h1,
.install-head h1 {
  margin: 0;
}

.auth-head p,
.install-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: stretch;
  padding: 0;
  background:
    linear-gradient(135deg, rgba(236, 247, 255, 0.94), rgba(227, 237, 255, 0.9)),
    linear-gradient(120deg, #d7ebf8, #e9ecff);
}

.auth-shell {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 30vw);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(122deg, rgba(72, 164, 247, 0.96) 0%, rgba(129, 213, 240, 0.78) 48%, rgba(234, 223, 255, 0.86) 100%);
  box-shadow: none;
}

.auth-shell-register {
  grid-template-columns: minmax(0, 1fr) minmax(600px, 38vw);
}

.auth-visual {
  position: relative;
  min-width: 0;
  padding: 24px 28px 34px;
  color: #ffffff;
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 72px auto auto 42px;
  width: 500px;
  height: 330px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.auth-visual-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.auth-brand-mark,
.auth-brand-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 14px;
}

.auth-brand-mark {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.auth-brand-logo {
  object-fit: contain;
  background: #ffffff;
}

.auth-brand strong,
.auth-brand span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-brand strong {
  font-size: 18px;
}

.auth-brand span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

.auth-visual-nav nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.auth-visual-nav nav a:hover {
  color: #fff1b8;
}

.auth-visual-nav nav a.active {
  color: #ffffff;
}

.auth-hero-copy {
  position: relative;
  z-index: 2;
  width: min(100%, 520px);
  margin-top: 58px;
}

.auth-hero-copy span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff4c7;
  font-size: 12px;
  font-weight: 900;
}

.auth-hero-copy h1 {
  margin: 18px 0 12px;
  max-width: 460px;
  color: #ffffff;
  font-size: 34px;
  line-height: 1.24;
}

.auth-hero-copy p {
  max-width: 460px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 15px;
  line-height: 1.8;
}

.auth-hero-points {
  display: grid;
  gap: 10px;
  max-width: 500px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.auth-hero-points li {
  position: relative;
  padding-left: 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  line-height: 1.65;
}

.auth-hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: #fff1b8;
  box-shadow: 0 0 0 4px rgba(255, 241, 184, 0.16);
}

.auth-illustration {
  position: absolute;
  left: 116px;
  bottom: 58px;
  width: 430px;
  height: 300px;
}

.auth-phone {
  position: absolute;
  left: 122px;
  top: 24px;
  width: 160px;
  height: 238px;
  border: 10px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background: linear-gradient(180deg, #eaf8ff, #52d1dd);
  transform: rotate(-18deg);
  box-shadow: 0 22px 44px rgba(38, 96, 150, 0.2);
}

.auth-phone span {
  position: absolute;
  left: 42px;
  top: 15px;
  width: 56px;
  height: 8px;
  border-radius: 8px;
  background: rgba(47, 109, 246, 0.38);
}

.auth-phone div {
  position: absolute;
  left: 26px;
  right: 26px;
  height: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.auth-phone div:nth-child(2) {
  top: 58px;
}

.auth-phone div:nth-child(3) {
  top: 88px;
}

.auth-phone strong {
  position: absolute;
  right: 24px;
  bottom: 44px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #45d4d8, #2f6df6);
  color: #ffffff;
  font-size: 20px;
}

.auth-float-card {
  position: absolute;
  z-index: 2;
  min-width: 210px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.44);
  color: #1e5abf;
  box-shadow: 0 18px 42px rgba(68, 116, 163, 0.14);
  backdrop-filter: blur(8px);
}

.auth-float-card b,
.auth-float-card span {
  display: block;
}

.auth-float-card b {
  font-size: 24px;
}

.auth-float-card span {
  margin-top: 6px;
  color: #4071ad;
  font-size: 13px;
  font-weight: 800;
}

.card-secure {
  left: 190px;
  top: 28px;
  transform: rotate(-12deg);
}

.card-smart {
  left: 235px;
  top: 132px;
  transform: rotate(-12deg);
}

.auth-orbit {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  transform: rotate(-20deg);
}

.orbit-one {
  left: 18px;
  top: 76px;
  width: 360px;
  height: 110px;
}

.orbit-two {
  left: 72px;
  top: 20px;
  width: 320px;
  height: 210px;
}

.auth-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.86);
}

.dot-one {
  left: 54px;
  top: 36px;
}

.dot-two {
  right: 36px;
  bottom: 30px;
}

.auth-panel {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: clamp(28px, 4vw, 72px);
}

.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.18));
  pointer-events: none;
}

.auth-card {
  position: relative;
  width: min(100%, 420px);
  max-height: calc(100vh - 88px);
  max-height: calc(100dvh - 88px);
  overflow: auto;
  border: 1px solid rgba(219, 233, 247, 0.92);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.94));
  padding: 30px;
  box-shadow:
    0 28px 70px rgba(43, 91, 139, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.72) inset;
  backdrop-filter: blur(12px);
  scrollbar-width: thin;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #45d4d8);
}

.auth-card-register {
  width: min(100%, 600px);
  padding: 26px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 24px;
  padding: 4px;
  border: 1px solid #e3edf8;
  border-radius: 8px;
  background: #f2f7fd;
}

.auth-tabs a {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 6px;
  color: #738297;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.auth-tabs a.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 8px 18px rgba(47, 109, 246, 0.12);
}

.auth-tabs a.active::after {
  display: none;
}

.auth-head {
  margin-bottom: 20px;
  text-align: left;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 10px;
  padding: 0 9px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.auth-head h2 {
  margin: 0;
  color: #1f3149;
  font-size: 24px;
}

.auth-head p {
  margin-top: 6px;
  color: #7a8798;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form label,
.auth-form .auth-field {
  display: grid;
  gap: 8px;
  color: #3d4f66;
  font-size: 13px;
  font-weight: 800;
}

.auth-label-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.auth-label-line small,
.auth-section-title span {
  color: #8a97a9;
  font-size: 12px;
  font-weight: 700;
}

.auth-field-hint {
  margin-top: -2px;
  color: #7d8da3;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.auth-field-hint.is-ok {
  color: #138a64;
}

.auth-field-hint.is-error {
  color: #b42318;
}

.auth-form input,
.auth-form select {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #dbe6f1;
  border-radius: 8px;
  background: #f9fbfe;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.auth-form input:focus,
.auth-form select:focus {
  background: #ffffff;
  border-color: rgba(47, 109, 246, 0.58);
  box-shadow: 0 0 0 3px rgba(47, 109, 246, 0.12);
}

.auth-password {
  position: relative;
  display: block;
}

.auth-password input {
  padding-right: 52px;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #dbe6f1;
  border-radius: 8px;
  background: #ffffff;
  color: #526377;
  font-size: 0;
  cursor: pointer;
  transform: translateY(-50%);
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.auth-password-toggle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  background: currentColor;
  transform: translate(-50%, -50%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.auth-password-toggle[aria-pressed="true"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2 2 20 20'/%3E%3Cpath d='M6.7 6.7C3.8 8.7 2 12 2 12s3.5 7 10 7c1.8 0 3.4-.5 4.8-1.3'/%3E%3Cpath d='M9.9 4.2A10.5 10.5 0 0 1 12 4c6.5 0 10 8 10 8s-1 2.1-2.9 4.1'/%3E%3Cpath d='M14.1 14.1A3 3 0 0 1 9.9 9.9'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2 2 20 20'/%3E%3Cpath d='M6.7 6.7C3.8 8.7 2 12 2 12s3.5 7 10 7c1.8 0 3.4-.5 4.8-1.3'/%3E%3Cpath d='M9.9 4.2A10.5 10.5 0 0 1 12 4c6.5 0 10 8 10 8s-1 2.1-2.9 4.1'/%3E%3Cpath d='M14.1 14.1A3 3 0 0 1 9.9 9.9'/%3E%3C/svg%3E");
}

.auth-password-toggle:hover,
.auth-password-toggle[aria-pressed="true"] {
  border-color: rgba(47, 109, 246, 0.46);
  background: #eff6ff;
  color: var(--primary);
}

.auth-captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px 68px;
  align-items: center;
  gap: 8px;
}

.auth-captcha-row input {
  text-transform: uppercase;
  letter-spacing: 0;
}

.auth-captcha-row img {
  width: 112px;
  height: 46px;
  border: 1px solid #dbe6f1;
  border-radius: 8px;
  background: #eef7ff;
  object-fit: cover;
}

.auth-captcha-refresh {
  position: relative;
  min-width: 0;
  height: 46px;
  padding: 0 10px;
  border: 1px solid #dbe6f1;
  border-radius: 8px;
  background: #ffffff;
  color: #2f6df6;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.auth-captcha-refresh:hover {
  border-color: rgba(47, 109, 246, 0.46);
  background: #eff6ff;
  box-shadow: 0 8px 18px rgba(47, 109, 246, 0.1);
}

.auth-captcha-refresh.is-loading {
  color: transparent;
  pointer-events: none;
}

.auth-captcha-refresh.is-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(47, 109, 246, 0.22);
  border-top-color: #2f6df6;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: auth-spin-centered 0.78s linear infinite;
}

.auth-password-strength {
  color: #718096;
}

.auth-password-strength::before {
  content: "";
  display: block;
  width: 100%;
  height: 4px;
  margin: 0 0 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.24);
  transition: background 0.22s ease;
}

.auth-password-strength[data-level="1"]::before {
  background: linear-gradient(90deg, #ef4444 0 28%, rgba(148, 163, 184, 0.24) 28% 100%);
}

.auth-password-strength[data-level="2"]::before {
  background: linear-gradient(90deg, #f59e0b 0 52%, rgba(148, 163, 184, 0.24) 52% 100%);
}

.auth-password-strength[data-level="3"]::before {
  background: linear-gradient(90deg, #2f6df6 0 76%, rgba(148, 163, 184, 0.24) 76% 100%);
}

.auth-password-strength[data-level="4"]::before {
  background: linear-gradient(90deg, #16b8a8 0 100%);
}

.auth-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #728096;
  font-size: 13px;
}

.auth-form-options a {
  color: var(--primary);
  font-weight: 900;
}

.auth-check {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  cursor: pointer;
}

.auth-check input {
  width: 16px;
  height: 16px;
  min-width: 16px;
  padding: 0;
  accent-color: var(--primary);
}

.auth-form .btn.full {
  min-height: 48px;
  margin-top: 6px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #245ee8);
  box-shadow: 0 14px 26px rgba(47, 109, 246, 0.22);
  font-weight: 900;
}

.auth-foot {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  color: #7a8798;
  font-size: 13px;
}

.auth-foot a {
  color: var(--primary);
  font-weight: 900;
}

.auth-note,
.auth-empty {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #e1ebf5;
  border-radius: 8px;
  background: #f7fbff;
  color: #657489;
  font-size: 13px;
  line-height: 1.7;
}

.auth-form-section {
  display: grid;
  gap: 12px;
}

.auth-section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf3f8;
}

.auth-section-title strong {
  color: #1f3149;
  font-size: 15px;
}

.auth-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-role-option {
  position: relative;
  display: block;
}

.auth-role-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-role-option span {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px 10px;
  min-height: 92px;
  padding: 13px;
  border: 1px solid #dce7f2;
  border-radius: 8px;
  background: #f8fbff;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.auth-role-option em {
  width: 34px;
  height: 34px;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eaf2ff;
  color: var(--primary);
  font-style: normal;
  font-size: 15px;
  font-weight: 900;
}

.auth-role-option strong {
  min-width: 0;
  overflow: hidden;
  color: #26364a;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-role-option small {
  min-width: 0;
  color: #75849a;
  font-size: 12px;
  line-height: 1.45;
}

.auth-role-option input:checked + span {
  border-color: var(--primary);
  background: #eef5ff;
  box-shadow:
    inset 0 0 0 1px rgba(47, 109, 246, 0.18),
    0 10px 24px rgba(47, 109, 246, 0.12);
}

.auth-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.auth-form [hidden],
.auth-register-form [hidden] {
  display: none !important;
}

.auth-register-form .auth-form-grid {
  align-items: start;
  gap: 8px 12px;
}

.auth-register-form .auth-form-grid .auth-field {
  grid-template-rows: 20px minmax(46px, auto) minmax(16px, auto);
  align-content: start;
}

.auth-register-form .auth-form-grid .auth-field .auth-label-line,
.auth-register-form .auth-form-grid .auth-field > input,
.auth-register-form .auth-form-grid .auth-field > select,
.auth-register-form .auth-form-grid .auth-field > .auth-password,
.auth-register-form .auth-form-grid .auth-field > .auth-stage-checks {
  align-self: start;
}

.region-select-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.auth-region-field {
  display: grid;
  gap: 6px;
}

.stage-check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 46px;
  align-items: center;
}

.stage-check-list label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.stage-check-list input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
}

.stage-check-list label:has(input:checked) {
  border-color: rgba(47, 109, 246, 0.6);
  background: #eef5ff;
  color: #174277;
}

.stage-check-list.compact {
  min-width: 180px;
  max-width: 240px;
  gap: 6px;
}

.stage-check-list.compact label {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.table-region-picker {
  display: grid;
  min-width: 380px;
  gap: 6px;
}

.table-region-picker select {
  width: 100%;
}

.region-table {
  min-width: 980px;
}

.panel-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-register-steps {
  position: relative;
  z-index: 4;
  width: min(100%, 360px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 0;
  margin: 22px auto 0;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 12px 28px rgba(52, 105, 150, 0.11);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  list-style: none;
}

.auth-register-steps li {
  position: relative;
  min-width: 0;
  min-height: 28px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 6px;
  color: #244766;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.auth-register-steps li:first-child {
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.14), rgba(47, 109, 246, 0.12));
  color: #155fba;
}

.auth-register-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(92, 145, 220, 0.28);
}

.auth-stage-multi-field {
  display: grid;
  gap: 6px;
}

.auth-stage-checks {
  min-height: 46px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.auth-stage-check {
  position: relative;
  min-width: 0;
  display: block !important;
  color: #29446d !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

.auth-stage-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-stage-check span {
  min-height: 46px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
  color: #17315c;
  box-shadow:
    0 8px 20px rgba(69, 115, 164, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.auth-stage-check input:focus-visible + span {
  border-color: rgba(91, 145, 255, 0.72);
  box-shadow:
    0 0 0 3px rgba(46, 130, 255, 0.13),
    0 12px 24px rgba(69, 115, 164, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.auth-stage-check input:checked + span,
.auth-stage-check.is-checked span {
  border-color: rgba(47, 109, 246, 0.72);
  background: linear-gradient(135deg, rgba(238, 247, 255, 0.9), rgba(225, 243, 255, 0.78));
  color: #1f58c9;
  box-shadow:
    inset 0 0 0 1px rgba(47, 109, 246, 0.12),
    0 10px 22px rgba(54, 116, 190, 0.14);
}

.auth-page:has(.auth-aigc-shell) {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.12)),
    linear-gradient(116deg, #eaf7f4 0%, #dceaff 48%, #a9dfee 100%);
}

@keyframes auth-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes auth-fade-slide {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes auth-spin-centered {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.auth-aigc-shell {
  position: relative;
  box-sizing: border-box;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(400px, 460px);
  align-items: center;
  justify-content: center;
  column-gap: clamp(28px, 4vw, 64px);
  padding: clamp(30px, 4vh, 56px) clamp(28px, 5vw, 88px);
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 42%),
    linear-gradient(116deg, #edf8f5 0%, #dbeafe 44%, #a9deee 100%);
}

.auth-aigc-shell.auth-shell-register {
  grid-template-columns: minmax(0, 1fr) minmax(680px, clamp(700px, 40vw, 760px));
}

.auth-shell-register .auth-aigc-visual {
  justify-items: center;
  text-align: center;
}

.auth-aigc-shell::before,
.auth-aigc-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.auth-aigc-shell::before {
  left: -90px;
  top: 200px;
  width: 500px;
  height: 130px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(84, 150, 255, 0.26), rgba(255, 255, 255, 0));
  transform: rotate(7deg);
}

.auth-aigc-shell::after {
  left: 52%;
  top: -120px;
  width: 310px;
  height: 760px;
  border-right: 3px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.auth-aigc-visual {
  position: relative;
  min-width: 0;
  display: grid;
  align-content: center;
  padding: 0;
  color: #071a46;
}

.auth-aigc-visual::before {
  content: "";
  position: absolute;
  left: clamp(260px, 38vw, 600px);
  top: 22%;
  width: min(28vw, 380px);
  height: min(28vw, 380px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.auth-aigc-copy {
  position: relative;
  z-index: 4;
  width: min(100%, 720px);
  margin: 0 auto;
  animation: auth-rise 0.62s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.auth-shell-register .auth-aigc-copy {
  text-align: center;
}

.auth-aigc-copy .auth-aigc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 20px;
  border-radius: 8px;
  background: linear-gradient(90deg, #14b8a6, #2f6df6);
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(35, 125, 177, 0.24);
}

.auth-aigc-copy h1 {
  max-width: 760px;
  margin: 12px 0 8px;
  color: #06183f;
  font-size: clamp(38px, 4vw, 52px);
  line-height: 1.15;
  font-weight: 900;
}

.auth-aigc-copy p {
  max-width: 650px;
  margin: 0;
  color: #18325f;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.7;
  font-weight: 700;
}

.auth-aigc-trace {
  position: relative;
  z-index: 4;
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  color: #244766;
  box-shadow: 0 12px 28px rgba(52, 105, 150, 0.11);
  backdrop-filter: blur(10px);
}

.auth-aigc-trace span {
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.auth-aigc-trace i {
  width: clamp(18px, 3vw, 34px);
  height: 1px;
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.18), rgba(47, 109, 246, 0.62));
}

.auth-aigc-stage {
  position: relative;
  z-index: 3;
  width: min(100%, 700px);
  height: clamp(380px, 46vh, 500px);
  margin: clamp(18px, 3vh, 36px) auto 0;
  animation: auth-rise 0.68s 0.08s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.auth-aigc-illustration {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.auth-ai-orbit {
  position: absolute;
  left: 90px;
  right: 76px;
  bottom: 42px;
  height: 132px;
  border: 9px solid rgba(65, 133, 249, 0.18);
  border-radius: 50%;
  transform: rotate(-5deg);
}

.auth-ai-orbit::before {
  content: "";
  position: absolute;
  inset: 18px 62px -28px;
  border-bottom: 16px dashed rgba(37, 86, 160, 0.1);
  border-radius: 50%;
}

.auth-ai-base {
  position: absolute;
  left: 210px;
  bottom: 90px;
  width: 330px;
  height: 112px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 32%, #f4fbff 0 28%, #b9e5ff 30% 42%, #2985ff 46% 54%, #83eaff 58% 62%, transparent 64%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(70, 145, 255, 0.2));
  box-shadow:
    0 30px 50px rgba(43, 107, 204, 0.22),
    inset 0 -10px 0 rgba(37, 106, 247, 0.22);
}

.auth-ai-base::before,
.auth-ai-base::after,
.auth-ai-base span {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.auth-ai-base::before {
  inset: 18px 34px;
  border: 6px solid rgba(39, 111, 247, 0.35);
}

.auth-ai-base::after {
  left: 28px;
  right: 28px;
  bottom: 4px;
  height: 42px;
  border-bottom: 8px solid rgba(15, 103, 255, 0.44);
}

.auth-ai-base span:nth-child(1) {
  left: 82px;
  right: 82px;
  bottom: 20px;
  height: 26px;
  border-bottom: 5px solid rgba(36, 235, 255, 0.78);
}

.auth-ai-base span:nth-child(2) {
  left: 32px;
  right: 32px;
  bottom: -10px;
  height: 28px;
  border-bottom: 4px solid rgba(43, 107, 204, 0.16);
}

.auth-ai-paper {
  position: absolute;
  left: 288px;
  top: 38px;
  width: 188px;
  height: 248px;
  border-radius: 14px 14px 38px 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0), rgba(86, 195, 255, 0.22)),
    #ffffff;
  box-shadow:
    0 24px 46px rgba(72, 116, 197, 0.22),
    inset -12px -12px 0 rgba(98, 205, 255, 0.08);
  transform: rotate(14deg);
}

.auth-ai-paper::before {
  content: "";
  position: absolute;
  right: -24px;
  top: 22px;
  width: 48px;
  height: 92px;
  border: 4px solid rgba(58, 192, 230, 0.32);
  border-left: 0;
  border-radius: 0 34px 34px 0;
}

.auth-ai-paper i {
  position: absolute;
  left: 30px;
  right: 34px;
  height: 8px;
  border-radius: 999px;
  background: #c9dcff;
}

.auth-ai-paper i:nth-child(1) {
  top: 38px;
}

.auth-ai-paper i:nth-child(2) {
  top: 62px;
  right: 20px;
}

.auth-ai-paper i:nth-child(3) {
  top: 88px;
  right: 58px;
}

.auth-ai-paper strong {
  position: absolute;
  left: 44px;
  top: 98px;
  width: 102px;
  height: 102px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 8px solid rgba(51, 126, 255, 0.52);
  background: radial-gradient(circle, #eef9ff 0 54%, #bfe4ff 56% 100%);
  color: #1972e8;
  font-size: 40px;
  line-height: 1;
  font-weight: 900;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.78);
}

.auth-ai-lens {
  position: absolute;
  left: 378px;
  top: 158px;
  width: 112px;
  height: 112px;
  border: 9px solid rgba(25, 115, 232, 0.76);
  border-radius: 50%;
  background: rgba(220, 242, 255, 0.3);
  transform: rotate(35deg);
  box-shadow: 0 18px 34px rgba(30, 95, 198, 0.22);
}

.auth-ai-lens::after {
  content: "";
  position: absolute;
  right: -16px;
  bottom: -50px;
  width: 24px;
  height: 76px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1c91ff, #0b57d9);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.auth-chart-card {
  position: absolute;
  width: 54px;
  height: 62px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  padding: 10px 8px;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(192, 235, 255, 0.82));
  box-shadow: 0 16px 28px rgba(46, 100, 193, 0.18);
}

.auth-chart-card span {
  width: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff43ca, #1ac7ff);
}

.auth-chart-card span:nth-child(1) {
  height: 22px;
}

.auth-chart-card span:nth-child(2) {
  height: 34px;
}

.auth-chart-card span:nth-child(3) {
  height: 44px;
}

.chart-left {
  left: 224px;
  top: 152px;
  transform: rotate(-4deg);
}

.chart-right {
  right: 86px;
  top: 148px;
  transform: rotate(8deg);
}

.auth-feature-pill {
  position: absolute;
  z-index: 5;
  min-width: 164px;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 8px 20px 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  background: rgba(244, 250, 255, 0.72);
  color: #263b66;
  box-shadow: 0 14px 28px rgba(52, 93, 172, 0.12);
  backdrop-filter: blur(10px);
}

.auth-feature-pill span {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.34);
}

.auth-feature-pill strong {
  font-size: 17px;
  white-space: nowrap;
}

.feature-insight {
  left: 0;
  top: 88px;
}

.feature-insight span {
  font-size: 13px;
  background: linear-gradient(135deg, #7268ff, #4668ff);
}

.feature-model {
  left: 34px;
  bottom: 132px;
}

.feature-model span {
  background: linear-gradient(135deg, #4c7cff, #0c8eff);
}

.feature-model span::before,
.feature-model span::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.feature-model span::after {
  inset: 18px;
  background: #ffffff;
}

.feature-data {
  right: 10px;
  top: 72px;
}

.feature-data span {
  align-items: end;
  grid-template-columns: repeat(3, 5px);
  gap: 3px;
  padding-bottom: 12px;
  background: linear-gradient(135deg, #26d986, #03b8a0);
}

.feature-data span::before,
.feature-data span::after {
  content: "";
}

.feature-data span,
.feature-data span::before,
.feature-data span::after {
  border-radius: 999px;
}

.feature-data span::before {
  width: 5px;
  height: 17px;
  background: #ffffff;
}

.feature-data span::after {
  width: 5px;
  height: 25px;
  background: #ffffff;
}

.feature-task {
  right: 18px;
  bottom: 132px;
}

.feature-task span {
  background: linear-gradient(135deg, #ffc849, #ff9e27);
}

.feature-task span::before {
  content: "";
  width: 19px;
  height: 20px;
  border: 3px solid #ffffff;
  border-radius: 5px;
}

.auth-aigc-stage > :not(.auth-aigc-illustration) {
  display: none;
}

.auth-aigc-panel {
  position: relative;
  z-index: 6;
  place-items: center;
  padding: 0;
}

.auth-aigc-panel::before {
  display: none;
}

.auth-aigc-card {
  position: relative;
  isolation: isolate;
  width: min(100%, 460px);
  max-height: none;
  padding: 26px 32px 24px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(235, 249, 255, 0.34) 48%, rgba(255, 255, 255, 0.2)),
    rgba(232, 247, 255, 0.36);
  color: #153160;
  box-shadow:
    0 30px 90px rgba(39, 99, 169, 0.22),
    0 10px 32px rgba(255, 255, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -1px 0 rgba(137, 189, 226, 0.22);
  backdrop-filter: blur(24px) saturate(1.25);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  animation: auth-fade-slide 0.58s 0.12s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.auth-aigc-shell .auth-aigc-card {
  transform: none;
}

@media (min-width: 1101px) {
  .auth-shell-register .auth-aigc-panel {
    transform: translateX(-150px);
  }
}

.auth-aigc-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0.22) 34%, transparent 58%),
    radial-gradient(circle at 16% 0%, rgba(255, 255, 255, 0.78), transparent 32%),
    radial-gradient(circle at 92% 100%, rgba(47, 109, 246, 0.16), transparent 36%);
  opacity: 0.82;
  pointer-events: none;
}

.auth-aigc-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.auth-card-register.auth-aigc-card {
  width: min(100%, 640px);
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  overflow: auto;
  padding: 22px 26px;
}

.auth-card-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0 0 14px;
}

.auth-card-brand .auth-brand-mark,
.auth-card-brand .auth-brand-logo {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  border-radius: 10px;
}

.auth-card-brand .auth-brand-mark {
  background: linear-gradient(135deg, #2ec9ff, #386dff);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(45, 108, 245, 0.18);
}

.auth-card-brand strong,
.auth-card-brand span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-card-brand strong {
  color: #0b2455;
  font-size: 17px;
}

.auth-card-brand span {
  margin-top: 2px;
  color: #6f86aa;
  font-size: 13px;
  font-weight: 700;
}

.auth-qr-corner {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-top: 4px solid #2e75ff;
  border-right: 4px solid #2e75ff;
  opacity: 0.9;
}

.auth-qr-corner::before,
.auth-qr-corner::after {
  content: "";
  position: absolute;
}

.auth-qr-corner::before {
  right: 4px;
  top: 4px;
  width: 18px;
  height: 18px;
  border: 4px solid #2e75ff;
  box-shadow:
    -14px 0 0 -8px #2e75ff,
    0 14px 0 -8px #2e75ff;
}

.auth-qr-corner::after {
  right: -4px;
  bottom: -4px;
  width: 22px;
  height: 22px;
  background:
    linear-gradient(90deg, #2e75ff 4px, transparent 4px) 0 0 / 9px 9px,
    linear-gradient(#2e75ff 4px, transparent 4px) 0 0 / 9px 9px;
  opacity: 0.72;
}

.auth-aigc-tabs {
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 10px 24px rgba(80, 133, 184, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.auth-aigc-tabs a {
  min-height: 44px;
  color: #6882ad;
  font-size: 16px;
  transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.auth-aigc-tabs a:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.34);
}

.auth-aigc-tabs a.active {
  color: #ffffff;
  background: linear-gradient(90deg, #16b8a8, #386dff);
  box-shadow:
    0 12px 24px rgba(50, 118, 191, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.auth-aigc-head {
  margin-bottom: 12px;
  text-align: center;
}

.auth-aigc-head h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #0a2457;
  font-size: 28px;
  font-weight: 900;
}

.auth-aigc-head h2 span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 242, 194, 0.82);
  color: #9a6a00;
  font-size: 13px;
  font-weight: 900;
}

.auth-aigc-head p {
  margin: 6px auto 0;
  max-width: 360px;
  color: #7085a8;
  font-size: 15px;
  line-height: 1.65;
}

.auth-aigc-form {
  gap: 10px;
}

.auth-aigc-form .auth-field {
  gap: 6px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.auth-aigc-form .auth-field.is-focused {
  transform: translateY(-1px);
}

.auth-aigc-form .auth-label-line {
  padding: 0 2px;
}

.auth-aigc-form .auth-label-line > span {
  color: #29446d;
  transition: color 0.18s ease;
}

.auth-aigc-form .auth-field.is-focused .auth-label-line > span {
  color: #2f6df6;
}

.auth-aigc-form .auth-field.is-filled .auth-label-line small {
  color: #5d7faf;
}

.auth-aigc-form input,
.auth-aigc-form select {
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
  color: #17315c;
  box-shadow:
    0 8px 20px rgba(69, 115, 164, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
}

.auth-aigc-form input::placeholder {
  color: #a0afc4;
}

.auth-aigc-form input:focus,
.auth-aigc-form select:focus {
  border-color: rgba(91, 145, 255, 0.72);
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 0 0 3px rgba(46, 130, 255, 0.13),
    0 12px 24px rgba(69, 115, 164, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.auth-aigc-form input[aria-invalid="true"] {
  border-color: rgba(180, 35, 24, 0.54);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.1);
}

.auth-aigc-form .auth-password-toggle {
  height: 36px;
  min-width: 36px;
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.58);
  color: #2f6df6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.auth-aigc-form .auth-captcha-row img,
.auth-aigc-form .auth-captcha-refresh {
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.58);
  box-shadow:
    0 8px 20px rgba(69, 115, 164, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.auth-aigc-form .auth-form-options {
  margin: -2px 2px 6px;
  color: #6e829f;
  font-size: 14px;
}

.auth-aigc-form .auth-form-options a {
  color: #3976ff;
}

.auth-aigc-form .btn.full {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(90deg, #15b8a6, #3f68ff);
  box-shadow:
    0 16px 30px rgba(51, 106, 235, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.auth-aigc-form .btn.full:hover {
  transform: translateY(-1px);
  background: linear-gradient(90deg, #0ea093, #315ae8);
  box-shadow: 0 16px 30px rgba(45, 96, 204, 0.3);
}

.auth-aigc-form.is-submitting .btn.full {
  opacity: 0.88;
  cursor: wait;
  transform: none;
}

.auth-aigc-form.is-submitting .btn.full::after {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: auth-spin 0.78s linear infinite;
}

.auth-aigc-form .btn.full:disabled:hover,
.auth-aigc-form .btn.full[disabled]:hover {
  background: linear-gradient(90deg, #15b8a6, #3f68ff);
  color: #ffffff;
}

.auth-terms {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 7px !important;
  margin-top: 0;
  color: #667b9d !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.5;
}

.auth-terms input {
  width: 14px;
  height: 14px;
  min-width: 14px;
  margin-top: 2px;
  padding: 0;
  accent-color: #2f7bff;
}

.auth-terms a {
  color: #2f70ff;
}

.auth-socials {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 20px;
}

.auth-socials span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.46);
  color: #0c7cff;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(55, 112, 191, 0.1);
}

.auth-socials span:nth-child(1) {
  color: #20b051;
}

.auth-socials span:nth-child(2) {
  color: #111827;
}

.auth-socials span:nth-child(3) {
  color: #1976ff;
}

.auth-aigc-form .auth-form-section {
  gap: 10px;
}

.auth-aigc-form .auth-section-title {
  padding-bottom: 7px;
  border-bottom-color: rgba(197, 216, 235, 0.72);
}

.auth-aigc-form .auth-section-title strong {
  color: #16345f;
}

.auth-aigc-form .auth-role-option span {
  position: relative;
  min-height: 70px;
  padding: 10px 12px;
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.64),
    0 8px 18px rgba(69, 115, 164, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.auth-aigc-form .auth-role-option span::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #16a67e;
  box-shadow: 0 0 0 4px rgba(22, 166, 126, 0.12);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.auth-aigc-form .auth-role-option span:hover {
  border-color: rgba(47, 109, 246, 0.42);
  background: rgba(255, 255, 255, 0.56);
}

.auth-aigc-form .auth-role-option em {
  background: linear-gradient(135deg, #15b8a6, #4367ff);
  color: #ffffff;
}

.auth-aigc-form .auth-role-option input:checked + span {
  border-color: rgba(47, 109, 246, 0.72);
  background: rgba(238, 247, 255, 0.68);
  box-shadow:
    inset 0 0 0 1px rgba(47, 109, 246, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 10px 22px rgba(54, 116, 190, 0.14);
}

.auth-aigc-form .auth-role-option input:checked + span::after {
  opacity: 1;
  transform: scale(1);
}

.auth-aigc-card .auth-foot {
  color: #6d82a4;
}

.auth-aigc-card .auth-foot a {
  color: #2f70ff;
}

.auth-card-register .auth-card-brand {
  margin-bottom: 10px;
}

.auth-card-register .auth-aigc-tabs {
  margin-bottom: 10px;
}

.auth-card-register .auth-aigc-tabs a {
  min-height: 38px;
  font-size: 14px;
}

.auth-card-register .auth-aigc-head {
  margin-bottom: 8px;
}

.auth-card-register .auth-aigc-head h2 {
  font-size: 24px;
}

.auth-card-register .auth-aigc-head p {
  margin-top: 4px;
  max-width: 520px;
  font-size: 13px;
  line-height: 1.45;
}

.auth-card-register .auth-aigc-form {
  gap: 8px;
}

.auth-card-register .auth-aigc-form input,
.auth-card-register .auth-aigc-form select {
  height: 46px;
}

.auth-email-code-row {
  width: 100%;
  min-width: 0;
  height: 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 0;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow:
    0 8px 20px rgba(69, 115, 164, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.auth-email-code-row:focus-within {
  border-color: rgba(91, 145, 255, 0.72);
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 0 0 3px rgba(46, 130, 255, 0.13),
    0 12px 24px rgba(69, 115, 164, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.auth-email-code-row input {
  min-width: 0;
  height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.auth-email-code-button {
  width: 112px;
  height: 34px;
  min-width: 112px;
  margin-right: 6px;
  padding: 0 8px;
  border: 0;
  border-left: 1px solid rgba(47, 109, 246, 0.18);
  border-radius: 0;
  background: transparent;
  color: #2f6df6;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.auth-email-code-button:hover:not(:disabled) {
  background: rgba(238, 247, 255, 0.72);
  color: #1f58c9;
}

.auth-email-code-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.auth-card-register .auth-field-hint {
  line-height: 1.35;
}

.auth-card-register .auth-aigc-form .btn.full {
  min-height: 48px;
  margin-top: 2px;
}

.auth-card-register .auth-foot {
  margin-top: 10px;
}

@media (max-width: 860px) {
  .auth-card-register.auth-aigc-card {
    width: min(100%, 620px);
  }

  .auth-register-form .auth-form-grid,
  .auth-card-register .auth-role-grid {
    grid-template-columns: 1fr;
  }

  .auth-register-form .auth-form-grid .auth-field {
    grid-template-rows: auto minmax(46px, auto) minmax(0, auto);
  }

  .region-select-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 820px) and (min-width: 681px) {
  .auth-shell-register .auth-aigc-visual {
    padding-top: 28px;
  }

  .auth-card-register.auth-aigc-card {
    padding: 18px 22px;
  }

  .auth-card-register .auth-card-brand {
    margin-bottom: 8px;
  }

  .auth-card-register .auth-aigc-head h2 {
    font-size: 22px;
  }

  .auth-card-register .auth-aigc-form input,
  .auth-card-register .auth-aigc-form select {
    height: 42px;
  }

  .auth-card-register .auth-email-code-row {
    height: 42px;
  }

  .auth-card-register .auth-email-code-row input {
    height: 40px;
  }

  .auth-card-register .auth-email-code-button {
    height: 30px;
  }

  .auth-register-form .auth-form-grid .auth-field {
    grid-template-rows: 20px minmax(42px, auto) minmax(14px, auto);
  }

  .auth-stage-checks {
    min-height: 42px;
  }

  .auth-stage-check span {
    min-height: 42px;
  }

  .auth-aigc-form .auth-role-option span {
    min-height: 64px;
  }
}

.install-head {
  position: relative;
  z-index: 1;
  justify-content: space-between;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(210, 225, 235, 0.8);
}

.install-head h1 {
  margin-top: 6px;
  color: #172b42;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.14;
}

.install-head p {
  max-width: 620px;
  color: #657487;
}

.install-head-meter {
  width: 104px;
  min-height: 82px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px solid rgba(212, 225, 236, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, rgba(40, 217, 176, 0.74), rgba(47, 109, 246, 0.64)) border-box;
  box-shadow: 0 14px 32px rgba(54, 83, 110, 0.1);
  text-align: center;
}

.install-head-meter strong,
.install-head-meter span {
  display: block;
}

.install-head-meter strong {
  color: #1f66d1;
  font-size: 28px;
  line-height: 1;
}

.install-head-meter span {
  margin-top: 6px;
  color: #718096;
  font-size: 12px;
  font-weight: 800;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e9f8f5;
  color: #0f7b67;
  font-size: 12px;
  font-weight: 800;
}

.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.install-rail .steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.install-rail .steps li {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(248, 250, 252, 0.72);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.steps span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e5e7eb;
  color: #475467;
  font-weight: 800;
}

.install-rail .steps span {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
    rgba(248, 250, 252, 0.12);
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.install-rail .steps small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}

.steps span.active {
  background: var(--primary);
  color: #ffffff;
}

.steps span.done {
  background: #d1fae5;
  color: var(--success);
}

.install-rail .steps li.active {
  border-color: rgba(255, 255, 255, 0.26);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.09)),
    rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 10px 24px rgba(8, 33, 47, 0.12);
  backdrop-filter: blur(10px);
}

.install-rail .steps li.active span {
  border-color: rgba(255, 255, 255, 0.5);
  background: linear-gradient(135deg, #ffe38a, #f6bd52);
  color: #15344c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 8px 18px rgba(246, 196, 90, 0.26);
}

.install-rail .steps li.done {
  color: #d8f3e6;
}

.install-rail .steps li.done span {
  border-color: rgba(216, 243, 230, 0.6);
  background:
    linear-gradient(135deg, rgba(216, 243, 230, 0.96), rgba(187, 229, 241, 0.9));
  color: #176b4d;
}

.install-section {
  padding-top: 10px;
}

.install-content-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: 22px;
}

.install-main-panel {
  min-width: 0;
}

.install-card .grid-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.install-card input {
  min-height: 46px;
  border-color: #d9e5ef;
  background: rgba(255, 255, 255, 0.9);
}

.install-card input:focus {
  border-color: #2f6df6;
  outline: 3px solid rgba(47, 109, 246, 0.13);
}

.install-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
}

.install-actions .btn,
.install-section > .btn,
.install-main-panel > .btn {
  min-width: 142px;
}

.install-note {
  margin-bottom: 18px;
  padding: 15px 16px;
  border: 1px solid #d9e8ef;
  border-left: 4px solid #21c0d8;
  border-radius: 8px;
  background: rgba(247, 251, 253, 0.92);
  color: #344054;
  line-height: 1.7;
}

.install-note-warning {
  border-color: #f7d48a;
  border-left-color: #f59e0b;
  background: #fffbeb;
  color: #7a4b12;
}

.install-db-options {
  display: grid;
  flex: 1 0 100%;
  width: 100%;
  gap: 12px;
  margin-top: 4px;
}

.install-db-options label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid #dbe7f0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.install-db-options input {
  flex: 0 0 auto;
  min-height: auto;
  width: auto;
  margin-top: 3px;
}

.install-db-options strong,
.install-db-options small,
.install-reset-confirm span {
  display: block;
}

.install-db-options strong {
  color: #24364a;
  font-size: 15px;
}

.install-db-options small,
.install-reset-confirm span {
  margin-top: 5px;
  color: #667085;
  line-height: 1.55;
}

.install-db-options .install-reset-confirm {
  border-color: #fed7aa;
  background: #fff7ed;
}

.install-db-options .install-reset-confirm span {
  margin-top: 0;
  color: #9a3412;
}

.install-agreement {
  overflow: hidden;
  border: 1px solid #dce8f1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 40px rgba(54, 83, 110, 0.08);
}

.install-agreement-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid #e6eef5;
  background: linear-gradient(135deg, rgba(233, 248, 245, 0.92), rgba(238, 244, 255, 0.92));
}

.install-agreement-head strong,
.install-agreement-head span,
.install-agreement-body h2,
.install-agreement-body p {
  display: block;
}

.install-agreement-head strong {
  color: #172b42;
  font-size: 16px;
}

.install-agreement-head span {
  color: #6c7b8e;
  font-size: 13px;
}

.install-agreement-body {
  max-height: 300px;
  overflow: auto;
  padding: 18px 18px 4px;
}

.install-agreement-body h2 {
  margin: 0 0 7px;
  color: #1e4f73;
  font-size: 15px;
}

.install-agreement-body p {
  margin: 0 0 18px;
  color: #4b5f74;
  line-height: 1.75;
}

.install-agreement-actions {
  justify-content: space-between;
}

.install-consent {
  min-width: min(100%, 360px);
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  color: #344054;
  font-weight: 700;
  line-height: 1.6;
}

.install-consent input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin-top: 3px;
  accent-color: #2f6df6;
}

.install-metric-strip,
.install-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.install-metric-strip div,
.install-feature-grid div,
.install-finish-panel,
.install-guide {
  border: 1px solid #dde9f2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 28px rgba(70, 96, 120, 0.08);
}

.install-metric-strip div,
.install-feature-grid div {
  min-height: 78px;
  padding: 14px;
}

.install-metric-strip strong,
.install-metric-strip span,
.install-feature-grid strong,
.install-feature-grid span,
.install-finish-panel strong,
.install-finish-panel span {
  display: block;
}

.install-metric-strip strong {
  color: #1f66d1;
  font-size: 24px;
}

.install-metric-strip span,
.install-feature-grid span,
.install-finish-panel span {
  margin-top: 6px;
  color: #718096;
  font-size: 13px;
  line-height: 1.5;
}

.install-feature-grid strong,
.install-finish-panel strong {
  color: #26364a;
  font-size: 15px;
}

.install-finish-panel {
  margin-bottom: 16px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(233, 248, 245, 0.9), rgba(255, 250, 235, 0.86)),
    rgba(255, 255, 255, 0.82);
}

.install-guide {
  align-self: start;
  padding: 16px;
}

.install-guide-title {
  padding-bottom: 12px;
  border-bottom: 1px solid #e6eef5;
}

.install-guide-title span,
.install-guide-title strong,
.install-guide li strong,
.install-guide li span,
.install-guide-foot strong,
.install-guide-foot span {
  display: block;
}

.install-guide-title span {
  color: #738195;
  font-size: 12px;
  font-weight: 800;
}

.install-guide-title strong {
  margin-top: 4px;
  color: #172b42;
  font-size: 18px;
}

.install-guide ul {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.install-guide li {
  position: relative;
  padding-left: 18px;
}

.install-guide li::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #28d9b0, #2f6df6);
}

.install-guide li strong {
  color: #2d4258;
  font-size: 14px;
}

.install-guide li span,
.install-guide-foot span {
  margin-top: 4px;
  color: #718096;
  font-size: 12px;
  line-height: 1.6;
}

.install-guide-foot {
  padding: 12px;
  border-radius: 8px;
  background: #f4f8fc;
}

.install-guide-foot strong {
  color: #1e4f73;
  font-size: 13px;
}

.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.check-list div {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid #dce8f1;
  border-radius: 8px;
  padding: 11px;
}

.check-list div {
  min-height: 58px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(70, 96, 120, 0.06);
}

.check-list div strong {
  min-width: 46px;
  padding: 4px 8px;
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
}

.check-list div.ok strong {
  background: #dcfce7;
  color: var(--success);
}

.check-list div.fail strong {
  background: #fee2e2;
  color: var(--danger);
}

.check-list div.warn strong {
  background: #fef3c7;
  color: var(--warning);
}

.paper-style-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.paper-style-actions span {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.paper-style-preview-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
  overflow: auto;
}

.paper-style-preview-shell.large {
  max-height: min(72vh, 760px);
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  align-items: start;
}

.paper-style-preview-panel {
  width: min(1120px, calc(100vw - 32px));
}

.paper-style-sheet {
  position: relative;
  min-width: 0;
  aspect-ratio: 210 / 297;
  padding: 18px;
  border: 1px solid #b7c3d0;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(37, 57, 80, 0.12);
  color: #111827;
  font-family: "Microsoft YaHei", SimSun, sans-serif;
  overflow: hidden;
}

.paper-style-sheet[data-paper-size="A3"] {
  aspect-ratio: 420 / 297;
}

.paper-style-sheet.large {
  min-height: 520px;
}

.paper-style-sheet-top,
.paper-style-sheet footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 10px;
  line-height: 1.2;
}

.paper-style-sheet h3,
.paper-style-sheet h4,
.paper-style-sheet p {
  margin: 0;
}

.paper-style-sheet h3 {
  margin-top: 12px;
  text-align: center;
  font-size: 16px;
  line-height: 1.28;
}

.paper-style-sheet h4 {
  margin-top: 5px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.paper-style-desc {
  margin-top: 6px !important;
  text-align: center;
  color: #4b5563;
  font-size: 10px;
}

.paper-style-notice {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid #d6dee8;
  border-radius: 4px;
  background: #f8fbff;
  font-size: 10px;
  line-height: 1.45;
}

.paper-style-reference {
  margin-top: 7px !important;
  color: #334155;
  font-size: 10px;
}

.paper-style-student-line {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 10px;
  margin-top: 9px;
  font-size: 10px;
}

.paper-style-body {
  display: block;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 2px solid #111827;
  font-size: 11px;
  line-height: 1.6;
}

.paper-style-body.columns {
  column-count: 2;
  column-gap: 16px;
  column-rule: 1px solid #d6dee8;
}

.paper-style-body p {
  margin-bottom: 7px;
  break-inside: avoid;
}

.paper-style-sheet footer {
  position: absolute;
  right: 18px;
  bottom: 14px;
  left: 18px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.paper-style-sheet.formal-a3 {
  aspect-ratio: 420 / 297;
  padding: 18px 22px 16px 40px;
  border-color: #9ca3af;
  border-radius: 0;
  box-shadow: 0 14px 30px rgba(37, 57, 80, 0.12);
  font-family: SimSun, "Songti SC", "Microsoft YaHei", serif;
}

.paper-style-sheet.formal-a4 {
  border-color: #8fa4bd;
}

.paper-style-sheet.formal-a3::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 22px;
  width: 1px;
  border-left: 1px dashed #9ca3af;
}

.paper-style-sheet.formal-a3::after {
  content: "密封线";
  position: absolute;
  top: 36px;
  left: 10px;
  color: #111111;
  font-size: 9px;
  font-weight: 700;
  writing-mode: vertical-rl;
}

.paper-style-seal-rail {
  position: absolute;
  top: 34px;
  bottom: 28px;
  left: 7px;
  width: 14px;
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 4px;
  color: #111111;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
}

.paper-style-seal-rail span {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.paper-style-seal-rail b {
  font: inherit;
}

.paper-style-seal-rail i {
  width: 1px;
  min-height: 10px;
  flex: 1 1 auto;
  display: inline-block;
  border-left: 1px solid #111111;
}

.paper-style-sheet.formal-a3 .paper-style-sheet-top {
  color: #111111;
  font-size: 9px;
}

.paper-style-sheet.formal-a3 h3 {
  margin-top: 8px;
  color: #111111;
  font-size: 14px;
}

.paper-style-sheet.formal-a3 h4,
.paper-style-sheet.formal-a3 .paper-style-notice,
.paper-style-sheet.formal-a3 .paper-style-reference,
.paper-style-sheet.formal-a3 .paper-style-student-line {
  display: none;
}

.paper-style-sheet.formal-a3 .paper-style-desc {
  margin-top: 2px !important;
  color: #111111;
  font-size: 9px;
}

.paper-style-mini-score {
  display: none;
}

.paper-style-sheet.formal-a3 .paper-style-mini-score {
  width: 84%;
  display: table;
  margin: 6px auto 8px;
  border-collapse: collapse;
  color: #111111;
  font-size: 8px;
  table-layout: fixed;
}

.paper-style-sheet.formal-a3 .paper-style-mini-score th,
.paper-style-sheet.formal-a3 .paper-style-mini-score td {
  height: 18px;
  border: 1px solid #777777;
  padding: 2px 3px;
  text-align: center;
  font-weight: 700;
}

.paper-style-sheet.formal-a3 .paper-style-body {
  column-count: 2;
  column-gap: 18px;
  column-rule: 0;
  margin-top: 8px;
  padding-top: 0;
  border-top: 0;
  color: #111111;
  font-size: 10px;
  line-height: 1.52;
}

.paper-style-sheet.formal-a3 .paper-style-body p {
  margin-bottom: 4px;
}

.paper-style-sheet.formal-a3 footer {
  color: #111111;
  border-top-color: #e5e7eb;
}

.paper-preview-stack {
  display: grid;
  gap: 28px;
}

.paper-preview {
  max-width: 980px;
}

.paper-preview-stack .paper-preview {
  margin-left: auto;
  margin-right: auto;
}

.paper-preview-page {
  break-after: page;
  page-break-after: always;
}

.paper-preview-page:last-child {
  break-after: auto;
  page-break-after: auto;
}

.paper-page-label {
  margin: 0 0 12px;
  text-align: right;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.paper-preview.paper-layout-double {
  max-width: min(1180px, 100%);
}

.paper-preview.paper-layout-a3-formal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1320px, 100%);
  max-width: min(1320px, 100%);
  aspect-ratio: 420 / 297;
  height: auto;
  min-height: 640px;
  margin: 0 auto 48px;
  padding: 44px 54px 40px 116px;
  border: 1px solid #d6d6d6;
  border-radius: 0;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(31, 41, 55, 0.12);
  color: #111111;
  font-family: SimSun, "Songti SC", "Microsoft YaHei", serif;
  overflow: visible;
}

.paper-preview-stack .paper-preview.paper-layout-a3-formal {
  margin-bottom: 0;
}

.paper-preview.paper-layout-a3-formal .paper-page-label {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  margin: 0 0 8px;
  color: #111827;
  font-family: SimSun, "Songti SC", serif;
}

.paper-preview.paper-layout-a3-formal::before {
  content: "";
  position: absolute;
  top: 40px;
  bottom: 40px;
  left: 62px;
  border-left: 1px dashed #9ca3af;
}

.paper-preview.paper-layout-a3-formal::after {
  content: "";
  position: absolute;
  top: 40px;
  bottom: 40px;
  left: 88px;
  border-left: 1px dashed #c6ccd4;
}

.a3-crop {
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.a3-crop::before,
.a3-crop::after {
  content: "";
  position: absolute;
  background: #c9c9c9;
}

.a3-crop::before {
  width: 1px;
  height: 15px;
}

.a3-crop::after {
  width: 15px;
  height: 1px;
}

.a3-crop-tl {
  top: 32px;
  left: 32px;
}

.a3-crop-tl::before,
.a3-crop-tl::after {
  right: 0;
  bottom: 0;
}

.a3-crop-tr {
  top: 32px;
  right: 32px;
}

.a3-crop-tr::before,
.a3-crop-tr::after {
  left: 0;
  bottom: 0;
}

.a3-crop-bl {
  bottom: 32px;
  left: 32px;
}

.a3-crop-bl::before,
.a3-crop-bl::after {
  top: 0;
  right: 0;
}

.a3-crop-br {
  right: 32px;
  bottom: 32px;
}

.a3-crop-br::before,
.a3-crop-br::after {
  top: 0;
  left: 0;
}

.a3-seal-rail {
  position: absolute;
  top: 44px;
  bottom: 44px;
  left: 24px;
  width: 66px;
  min-height: 0;
  height: auto;
  display: grid;
  grid-template-columns: 42px 24px;
  gap: 0;
  color: #111111;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  box-sizing: border-box;
}

.a3-seal-fields {
  display: flex;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  padding: 8px 0;
  border-top: 1px solid #111111;
  border-right: 1px solid #111111;
  border-bottom: 1px solid #111111;
  box-sizing: border-box;
}

.a3-seal-fields span {
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1 1 0;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  transform: rotate(90deg);
  transform-origin: center;
}

.a3-seal-fields b {
  flex: 0 0 auto;
  font: inherit;
}

.a3-seal-fields i {
  width: 46px;
  min-height: 0;
  flex: 1 1 auto;
  display: inline-block;
  border-top: 1px solid #111111;
}

.a3-seal-warning {
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  border-top: 1px dashed #c6ccd4;
  border-right: 1px dashed #c6ccd4;
  border-bottom: 1px dashed #c6ccd4;
  color: #111111;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 16px;
  text-indent: 16px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  box-sizing: border-box;
  overflow: hidden;
}

.a3-paper-flow {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.58;
}

.a3-question-columns {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 44px;
  align-items: start;
  width: 100%;
}

.a3-question-columns::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 1px solid #d7dee8;
  transform: translateX(-0.5px);
  pointer-events: none;
}

.a3-question-column {
  min-width: 0;
}

.a3-question-columns > .empty-state {
  grid-column: 1 / -1;
}

.a3-formal-head {
  width: 100%;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  break-inside: avoid;
}

.a3-formal-head h2 {
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: 0;
}

.a3-formal-head p {
  margin-top: 2px;
  color: #111111;
  font-size: 12px;
}

.a3-score-table {
  width: 100%;
  margin: 8px auto 10px;
  border-collapse: collapse;
  color: #111111;
  font-size: 12px;
  table-layout: fixed;
}

.a3-score-table th,
.a3-score-table td {
  height: 30px;
  border: 1px solid #777777;
  padding: 3px 6px;
  text-align: center;
  font-weight: 700;
}

.a3-question-section {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  break-inside: auto;
}

.a3-question-section h3 {
  margin: 0 0 10px;
  color: #111111;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  break-after: avoid;
}

.a3-question {
  margin: 0 0 12px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.a3-question-stem {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px;
  color: #111111;
}

.a3-question-stem strong {
  font-weight: 700;
}

.a3-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 14px;
  margin: 2px 0 2px 20px;
  color: #111111;
}

.a3-answer-space {
  position: relative;
  min-height: 12px;
  margin: 4px 0 0 20px;
}

.a3-answer-space.is-long {
  min-height: var(--answer-height, 26px);
}

.a3-flow-clear {
  display: block;
  clear: both;
  height: 1px;
}

.paper-preview.paper-layout-a3-formal details {
  display: none;
}

.paper-preview.paper-layout-a4-formal {
  max-width: min(940px, 100%);
  padding: 34px 38px;
  border-radius: 4px;
  background: #ffffff;
}

.formal-paper-head {
  border-bottom: 2px solid #111827;
  margin-bottom: 18px;
  padding-bottom: 14px;
}

.formal-paper-head h2,
.formal-paper-head h3,
.formal-paper-head p {
  margin: 0;
  text-align: center;
}

.formal-paper-head h2 {
  font-size: 24px;
}

.formal-paper-head h3 {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 700;
}

.formal-paper-head p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.formal-notice {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #d6dee8;
  border-radius: 8px;
  background: #f8fbff;
  color: #334155;
  line-height: 1.6;
}

.formal-reference {
  margin: 10px 0 0 !important;
  color: #334155 !important;
  font-size: 13px !important;
  text-align: left !important;
}

.formal-student-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  color: #334155;
  font-size: 13px;
}

.paper-meta {
  border-bottom: 2px solid #111827;
  padding-bottom: 12px;
  margin-bottom: 20px;
  color: var(--muted);
}

.paper-question-flow {
  display: block;
}

.paper-preview.paper-layout-double .paper-question-flow {
  column-count: 2;
  column-gap: 28px;
  column-rule: 1px solid var(--line);
}

.paper-preview.paper-layout-a3-formal .paper-question-flow {
  column-count: 2;
  column-gap: 34px;
  column-rule: 1px solid var(--line);
}

.question-block {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.paper-preview.paper-layout-double .question-block,
.paper-preview.paper-layout-a3-formal .question-block {
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  page-break-inside: avoid;
}

.question-block h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.question-block h3 span {
  color: var(--muted);
  font-size: 13px;
}

.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 10px 0;
}

.paper-preview.paper-layout-a3-formal .a3-formal-head {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
}

.paper-preview.paper-layout-a3-formal .a3-formal-head h2 {
  margin: 0;
  color: #111111;
  font-size: 18px;
  line-height: 1.35;
}

.paper-preview.paper-layout-a3-formal .a3-formal-head p {
  margin-top: 2px;
  color: #111111;
  font-size: 12px;
}

.paper-preview.paper-layout-a3-formal .a3-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 14px;
  margin: 2px 0 2px 20px;
}

.paper-preview-stack + .compact,
.paper-preview.paper-layout-a3-formal + .compact {
  clear: both;
  margin-top: 34px;
}

@media print {
  @page a3-formal-paper {
    size: A3 landscape;
    margin: 10mm;
  }

  body.admin-theme:has(.paper-layout-a3-formal) {
    margin: 0;
    padding: 0;
    background: #ffffff;
  }

  body:has(.paper-layout-a3-formal) {
    background: #ffffff;
  }

  body:has(.paper-layout-a3-formal) .shell,
  body:has(.paper-layout-a3-formal) .main {
    display: block;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: #ffffff;
    box-shadow: none;
    overflow: visible;
  }

  body:has(.paper-layout-a3-formal) .sidebar,
  body:has(.paper-layout-a3-formal) .topbar,
  body:has(.paper-layout-a3-formal) .admin-guide,
  body:has(.paper-layout-a3-formal) .page-head,
  body:has(.paper-layout-a3-formal) .compact {
    display: none !important;
  }

  .paper-preview-stack {
    display: block;
    gap: 0;
  }

  .paper-preview-page {
    break-after: page;
    page-break-after: always;
  }

  .paper-preview-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .paper-page-label {
    color: #111827;
  }

  .paper-preview.paper-layout-a3-formal {
    page: a3-formal-paper;
    width: 100%;
    max-width: none;
    min-height: 277mm;
    aspect-ratio: auto;
    height: 277mm;
    margin: 0;
    padding: 14mm 16mm 12mm 34mm;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  .paper-preview.paper-layout-a3-formal::before {
    top: 12mm;
    bottom: 12mm;
    left: 17mm;
  }

  .paper-preview.paper-layout-a3-formal::after {
    top: 12mm;
    bottom: 12mm;
    left: 24mm;
  }

  .a3-crop-tl {
    top: 5mm;
    left: 5mm;
  }

  .a3-crop-tr {
    top: 5mm;
    right: 5mm;
  }

  .a3-crop-bl {
    bottom: 5mm;
    left: 5mm;
  }

  .a3-crop-br {
    right: 5mm;
    bottom: 5mm;
  }

  .a3-seal-rail {
    top: 14mm;
    bottom: 12mm;
    left: calc(9mm - 10px);
    width: 18mm;
    height: auto;
    grid-template-columns: 11mm 7mm;
  }

  .a3-seal-fields {
    gap: 0;
    padding-block: 2mm;
  }

  .a3-seal-fields i {
    width: 15mm;
    min-height: 0;
  }

  .a3-seal-warning {
    padding-block: 2mm;
    letter-spacing: 5mm;
    text-indent: 5mm;
  }

  .a3-paper-flow {
    overflow: hidden;
  }

  .a3-question-columns {
    column-gap: 14mm;
  }

  .a3-answer-space.is-long {
    min-height: var(--answer-print-height, 8mm);
  }
}

@media (max-width: 900px) {
  .paper-preview.paper-layout-double .paper-question-flow {
    column-count: 1;
    column-gap: 0;
    column-rule: 0;
  }

  .paper-preview.paper-layout-a3-formal .paper-question-flow {
    column-count: 1;
    column-gap: 0;
    column-rule: 0;
  }

  .paper-preview.paper-layout-double .question-block,
  .paper-preview.paper-layout-a3-formal .question-block {
    display: block;
  }

  .paper-preview.paper-layout-a3-formal {
    min-height: 0;
    aspect-ratio: auto;
    padding: 34px 24px 28px 74px;
    overflow: visible;
  }

  .paper-preview.paper-layout-a3-formal::before {
    top: 28px;
    bottom: 28px;
    left: 42px;
  }

  .paper-preview.paper-layout-a3-formal::after {
    top: 28px;
    bottom: 28px;
    left: 58px;
  }

  .a3-question-columns {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .a3-question-columns::before {
    display: none;
  }

  .a3-seal-rail {
    top: 34px;
    bottom: 28px;
    left: 11px;
    width: 46px;
    height: auto;
    grid-template-columns: 29px 17px;
    font-size: 10px;
  }

  .a3-seal-fields {
    min-height: 0;
    gap: 6px;
    padding: 6px 0;
  }

  .a3-seal-fields i {
    width: 32px;
    min-height: 0;
  }

  .a3-seal-warning {
    min-height: 0;
    padding: 6px 0;
    letter-spacing: 8px;
    text-indent: 8px;
  }

  .a3-score-table {
    width: 100%;
  }

  .paper-style-preview-shell,
  .paper-style-preview-shell.large,
  .formal-student-line {
    grid-template-columns: 1fr;
  }

  .paper-style-sheet {
    min-height: 460px;
  }

  .question-bank-modal-body {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .question-bank-picker {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .question-bank-filters {
    grid-template-columns: 1fr 1fr;
  }

  .question-bank-list,
  .question-bank-selected-list {
    max-height: 340px;
  }
}

.answer-sheet-preview-head {
  width: min(100%, var(--answer-sheet-page-width, 920px));
  max-width: 920px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 10px;
}

.answer-sheet-preview-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.answer-sheet-preview-head span {
  color: var(--muted);
  font-size: 13px;
}

.answer-sheet {
  position: relative;
  width: min(100%, var(--answer-sheet-page-width, 920px));
  max-width: 920px;
  --answer-columns: 2;
  --objective-items-per-row: 5;
  --answer-accent: #c95b73;
  --answer-border: #111827;
  color: #111827;
  overflow: hidden;
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 2px solid #111827;
  padding-bottom: 12px;
  margin-bottom: 18px;
}

.sheet-head > div {
  display: grid;
  gap: 3px;
}

.sheet-head em {
  color: var(--answer-accent);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.position-mark {
  position: absolute;
  top: 20px;
  width: 18px;
  height: 18px;
  background: #111827;
}

.position-mark.left {
  left: 20px;
}

.position-mark.right {
  right: 20px;
}

.answer-sheet-timing {
  position: absolute;
  z-index: 1;
  display: flex;
  gap: 8px;
  pointer-events: none;
}

.answer-sheet-timing span {
  display: block;
  width: 12px;
  height: 7px;
  background: #000000;
}

.answer-sheet-timing-top {
  top: 13px;
  left: 58px;
  right: 58px;
  justify-content: center;
}

.answer-sheet-timing-left,
.answer-sheet-timing-right {
  top: 92px;
  bottom: 34px;
  flex-direction: column;
}

.answer-sheet-timing-left {
  left: 14px;
}

.answer-sheet-timing-right {
  right: 14px;
}

.answer-card-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
  gap: 14px;
}

.answer-sheet-main {
  min-width: 0;
}

.answer-subjective-block {
  margin-top: 16px;
}

.answer-sheet-info-panel {
  display: none;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.student-lines {
  display: grid;
  gap: 8px;
}

.student-lines label {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 6px;
  align-items: end;
  color: #111827;
  font-size: 13px;
}

.student-lines span {
  height: 1px;
  border-bottom: 1px solid var(--answer-accent);
}

.barcode-box {
  min-height: 72px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--answer-accent);
  border-radius: 8px;
  color: var(--answer-accent);
  font-weight: 800;
}

.exam-number-grid,
.notice-box {
  border: 1px solid var(--answer-accent);
  padding: 8px;
  color: var(--answer-accent);
}

.exam-number-grid {
  display: grid;
  gap: 6px;
}

.exam-number-grid strong {
  text-align: center;
  font-size: 12px;
}

.exam-number-grid > div:first-of-type {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 2px;
  font-size: 10px;
  text-align: center;
}

.exam-number-cells {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px 3px;
}

.exam-number-cells i {
  height: 10px;
  border: 1px solid var(--answer-accent);
  border-radius: 2px;
}

.notice-box {
  display: grid;
  gap: 5px;
  font-size: 11px;
  line-height: 1.55;
}

.notice-box b,
.notice-box p {
  margin: 0;
}

.bubble-sections,
.bubble-section {
  display: grid;
  gap: 8px;
}

.bubble-section h4 {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #f8fbff;
  color: #1f2a3a;
  font-size: 13px;
}

.bubble-grid {
  display: grid;
  grid-template-columns: repeat(var(--answer-columns), minmax(0, 1fr));
  gap: 8px;
}

.answer-sheet .empty-state {
  grid-column: 1 / -1;
  margin: 0;
}

.bubble-row {
  display: grid;
  grid-template-columns: max-content repeat(var(--objective-items-per-row), minmax(20px, 24px));
  align-items: center;
  justify-content: start;
  gap: 8px;
  border: 1px solid #cbd5e1;
  padding: 8px;
  border-radius: 8px;
}

.bubble-row b {
  min-width: 28px;
}

.bubble-row span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid #111827;
  border-radius: 50%;
  font-size: 12px;
}

.subjective-grid {
  display: grid;
  grid-template-columns: repeat(var(--answer-columns), minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 12px;
}

.subjective-box {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 92px;
  border: 1px solid #111827;
  border-radius: 8px;
  padding: 24px 10px 10px;
  margin-bottom: 12px;
  overflow: hidden;
}

.answer-box-tip {
  position: absolute;
  top: 4px;
  left: 10px;
  right: 10px;
  color: var(--answer-accent);
  font-size: 10px;
  text-align: center;
}

.subjective-box-title {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 24px;
  margin: 0 -10px;
  padding: 0 10px 6px;
  background: #ffffff;
  color: #111827;
  font-size: 16px;
  line-height: 1.25;
}

.subjective-box-lines {
  display: block;
  min-height: 32px;
}

.subjective-box.answer-area-blank_line {
  min-height: 68px;
}

.subjective-box.answer-area-blank_line .subjective-box-lines {
  background-image: linear-gradient(to bottom, transparent calc(100% - 1px), #cbd5e1 0);
  background-size: 100% 28px;
}

.subjective-box.answer-area-composition_grid {
  min-height: 180px;
}

.subjective-box.answer-area-composition_grid .subjective-box-lines {
  background-image:
    linear-gradient(#d7dee8 1px, transparent 1px),
    linear-gradient(90deg, #d7dee8 1px, transparent 1px);
  background-size: 24px 24px;
}

.answer-sheet-style-standard .answer-sheet-timing,
.answer-sheet-style-standard .answer-sheet-info-panel {
  display: none;
}

.answer-sheet-style-standard .answer-card-layout {
  display: block;
}

.answer-sheet-style-standard .answer-box-tip {
  display: none;
}

.answer-sheet-style-standard .subjective-box {
  padding: 10px;
}

.answer-sheet-style-standard .subjective-box-title {
  margin: 0 0 4px;
  padding: 0;
}

.answer-sheet-style-unified_exam,
.answer-sheet-style-side_info_triple,
.answer-sheet-style-omr_vertical {
  padding: 34px 28px 18px;
  border-color: #f0b3bf;
  background: #ffffff;
}

.answer-sheet-style-unified_exam .sheet-head,
.answer-sheet-style-side_info_triple .sheet-head,
.answer-sheet-style-omr_vertical .sheet-head {
  padding: 8px 12px 12px;
  border: 1px solid var(--answer-accent);
  border-radius: 10px 10px 0 0;
  color: #111111;
}

.answer-sheet-style-unified_exam .answer-card-layout {
  grid-template-columns: minmax(0, 1fr);
}

.answer-sheet-style-unified_exam .sheet-head {
  justify-content: center;
  text-align: center;
}

.answer-sheet-style-unified_exam .sheet-head span {
  position: absolute;
  top: 72px;
  left: 40px;
  color: #111111;
  font-size: 12px;
}

.answer-sheet-style-unified_exam .answer-sheet-timing-right,
.answer-sheet-style-omr_vertical .answer-sheet-timing-left {
  display: none;
}

.answer-sheet-style-unified_exam .bubble-section,
.answer-sheet-style-unified_exam .subjective-box,
.answer-sheet-style-side_info_triple .bubble-section,
.answer-sheet-style-side_info_triple .subjective-box,
.answer-sheet-style-omr_vertical .bubble-section,
.answer-sheet-style-omr_vertical .subjective-box {
  border-color: var(--answer-accent);
  border-radius: 10px;
}

.answer-sheet-style-unified_exam .bubble-section,
.answer-sheet-style-side_info_triple .bubble-section,
.answer-sheet-style-omr_vertical .bubble-section {
  padding: 8px;
  border: 1px solid var(--answer-accent);
}

.answer-sheet-style-unified_exam .bubble-section h4,
.answer-sheet-style-side_info_triple .bubble-section h4,
.answer-sheet-style-omr_vertical .bubble-section h4 {
  border: 0;
  background: transparent;
  color: #111111;
  text-align: center;
}

.answer-sheet-style-unified_exam .bubble-row,
.answer-sheet-style-omr_vertical .bubble-row {
  border: 0;
  padding: 2px 4px;
  color: var(--answer-accent);
}

.answer-sheet-style-unified_exam .bubble-row {
  grid-template-columns: max-content repeat(var(--objective-items-per-row), max-content);
  gap: 8px 12px;
}

.answer-sheet-style-unified_exam .bubble-row span,
.answer-sheet-style-omr_vertical .bubble-row span {
  width: auto;
  height: auto;
  display: inline;
  border: 0;
  border-radius: 0;
  color: var(--answer-accent);
  line-height: 1;
  min-width: 22px;
  text-align: center;
  white-space: nowrap;
  word-break: keep-all;
}

.answer-sheet-style-unified_exam .bubble-row span {
  min-width: 20px;
}

.answer-sheet-style-unified_exam .bubble-row span::before,
.answer-sheet-style-omr_vertical .bubble-row span::before {
  content: "[";
}

.answer-sheet-style-unified_exam .bubble-row span::after,
.answer-sheet-style-omr_vertical .bubble-row span::after {
  content: "]";
}

.answer-sheet-style-unified_exam .subjective-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.answer-sheet-style-unified_exam .subjective-box {
  min-height: 132px;
}

.answer-sheet-style-unified_exam .subjective-box-lines {
  background-image: linear-gradient(to bottom, transparent calc(100% - 1px), rgba(201, 91, 115, 0.62) 0);
  background-size: 100% 28px;
}

.answer-sheet-style-side_info_triple .answer-sheet-info-panel,
.answer-sheet-style-omr_vertical .answer-sheet-info-panel {
  display: grid;
}

.answer-sheet-style-side_info_triple .answer-card-layout {
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr);
}

.answer-sheet-style-side_info_triple .answer-sheet-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.answer-sheet-style-side_info_triple .bubble-sections {
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}

.answer-sheet-style-side_info_triple .subjective-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 14px;
  margin-top: 0;
  margin-bottom: 0;
}

.answer-sheet-style-side_info_triple .answer-subjective-block {
  margin-top: 18px;
}

.answer-sheet-style-side_info_triple .subjective-box {
  min-height: 136px;
  border-color: #333333;
  border-radius: 0;
  padding-top: 28px;
  margin-bottom: 0;
}

.answer-sheet-style-side_info_triple .subjective-box-title {
  min-height: 28px;
  padding: 0 12px 6px;
  font-size: 18px;
  line-height: 1.25;
}

.answer-sheet-style-side_info_triple .subjective-box-lines {
  background-image: linear-gradient(to bottom, transparent calc(100% - 1px), rgba(201, 91, 115, 0.48) 0);
  background-size: 100% 28px;
}

.answer-sheet-style-side_info_triple .bubble-row {
  grid-template-columns: max-content repeat(var(--objective-items-per-row), minmax(18px, 22px));
  padding: 5px;
}

.answer-sheet-style-omr_vertical {
  max-width: min(760px, 100%);
  padding-right: 46px;
}

.answer-sheet-style-omr_vertical .sheet-head {
  justify-content: center;
  text-align: center;
}

.answer-sheet-style-omr_vertical .answer-card-layout {
  grid-template-columns: minmax(190px, 0.34fr) minmax(0, 1fr);
}

.answer-sheet-style-omr_vertical .bubble-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 20px;
}

.answer-sheet-style-omr_vertical .bubble-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: repeat(var(--objective-items-per-row), auto);
  align-items: start;
}

.answer-sheet-style-omr_vertical .bubble-row b {
  grid-row: 1 / -1;
  color: #111111;
}

.answer-sheet-style-omr_vertical .subjective-grid {
  grid-template-columns: 1fr;
}

.answer-sheet-style-omr_vertical .subjective-box.answer-area-blank_line {
  min-height: 74px;
}

@media print {
  body.route-answer-card,
  body.route-answer-card.admin-theme {
    margin: 0;
    padding: 0;
    background: #ffffff;
  }

  body.route-answer-card .shell,
  body.route-answer-card .main {
    display: block;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: #ffffff;
    box-shadow: none;
    overflow: visible;
  }

  body.route-answer-card .sidebar,
  body.route-answer-card .main > :not(.answer-sheet) {
    display: none !important;
  }

  body.route-answer-card .answer-sheet {
    display: block !important;
    width: var(--answer-sheet-page-width);
    max-width: none;
    min-height: var(--answer-sheet-page-height);
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    color: #111827;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body.route-answer-card .sheet-head {
    align-items: flex-start;
    flex-direction: row;
  }

  body.route-answer-card .bubble-grid,
  body.route-answer-card .subjective-grid {
    grid-template-columns: repeat(var(--answer-columns), minmax(0, 1fr)) !important;
  }

  body.route-answer-card .answer-sheet-style-unified_exam .subjective-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.route-answer-card .answer-sheet-style-side_info_triple .answer-card-layout {
    grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr) !important;
  }

  body.route-answer-card .answer-sheet-style-side_info_triple .subjective-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.route-answer-card .answer-sheet-style-side_info_triple .bubble-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.route-answer-card .answer-sheet-style-omr_vertical {
    max-width: none;
  }

  body.route-answer-card .answer-sheet-style-omr_vertical .bubble-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.route-answer-card .bubble-row,
  body.route-answer-card .subjective-box {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

code {
  background: #f1f5f9;
  padding: 2px 5px;
  border-radius: 5px;
}

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

@media (max-width: 1100px) {
  .dashboard-metrics,
  .shortcut-grid,
  .paper-stats-grid,
  .paper-edit-overview,
  .analytics-stat-grid,
  .analytics-import-steps,
  .user-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-toolbar {
    grid-template-columns: 1fr;
  }

  .user-toolbar-controls {
    justify-content: flex-start;
  }

  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }

  .analytics-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .public-home-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 24px;
  }

  .public-home-hero.saas-hero {
    grid-template-columns: 1fr;
    padding: 54px 7vw 92px;
  }

  .public-home-visual {
    min-height: 420px;
  }

  .saas-stat-strip,
  .saas-flow-board {
    grid-template-columns: 1fr;
  }

  .saas-case-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-feature-grid,
  .public-step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-page {
    padding: 0;
  }

  .auth-aigc-shell,
  .auth-aigc-shell.auth-shell-register {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .auth-aigc-visual {
    min-height: 610px;
    padding: 40px clamp(22px, 6vw, 64px) 0;
  }

  .auth-aigc-copy {
    max-width: 720px;
  }

  .auth-aigc-stage {
    height: 430px;
    margin-inline: auto;
    transform: scale(0.92);
    transform-origin: top center;
  }

  .auth-aigc-panel {
    place-items: start center;
    padding: 0 20px 34px;
  }

  .auth-aigc-card,
  .auth-card-register.auth-aigc-card {
    width: min(100%, 660px);
    max-height: none;
  }

  .auth-aigc-shell .auth-aigc-card {
    transform: none;
  }

  .auth-shell,
  .auth-shell-register {
    min-height: 100vh;
    min-height: 100dvh;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .auth-visual {
    min-height: 360px;
  }

  .auth-illustration {
    right: 24px;
    left: auto;
    bottom: 30px;
    transform: scale(0.82);
    transform-origin: right bottom;
  }

  .auth-panel {
    padding: 0 clamp(18px, 4vw, 32px) 32px;
  }

  .auth-card {
    width: min(100%, 560px);
    max-height: none;
  }

  .admin-theme {
    padding: 12px;
  }

  .shell {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 24px);
    min-height: calc(100dvh - 24px);
    border-radius: 18px;
  }

  .sidebar {
    position: static;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: center;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid #edf2f7;
  }

  .brand-copy,
  .nav-label {
    display: none;
  }

  .sidebar nav {
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
    gap: 8px;
  }

  .sidebar nav a {
    flex: 0 0 44px;
    width: 44px;
    justify-content: center;
    padding: 0;
  }

  .main {
    padding: 0 14px 18px;
  }

  .topbar {
    margin: 0 -14px 16px;
    padding: 12px 16px;
    min-height: 0;
    flex-wrap: wrap;
    gap: 10px;
  }

  .topbar-spacer {
    display: none;
  }

  .topbar-title {
    flex: 1 1 calc(100% - 190px);
    min-width: 180px;
  }

  .topbar-user {
    order: 1;
    margin-left: 0;
  }

  .sidebar nav,
  .admin-guide,
  .metrics,
  .grid-cards,
  .system-home-hero,
  .system-home-grid,
  .portal-hero,
  .portal-grid,
  .workbench-grid,
  .knowledge-layout,
  .knowledge-filter-grid,
  .settings-brand-grid,
  .textbook-directory-grid,
  .textbook-directory-tools,
  .verification-card,
  .page-explain-grid,
  .profile-explain-grid,
  .ocr-explain-panel,
  .email-overview-grid,
  .email-settings-layout,
  .email-test-card,
  .profile-grid,
  .flow-steps,
  .grid-form,
  .install-card .grid-form,
  .check-list,
  .bubble-grid,
  .subjective-grid {
    grid-template-columns: 1fr;
  }

  .answer-card-layout,
  .answer-sheet-style-side_info_triple .answer-card-layout,
  .answer-sheet-style-omr_vertical .answer-card-layout {
    grid-template-columns: 1fr;
  }

  .answer-sheet-style-side_info_triple .answer-sheet-main,
  .answer-sheet-style-side_info_triple .subjective-grid {
    display: grid;
  }

  .answer-sheet-style-side_info_triple .answer-sheet-info-panel,
  .answer-sheet-style-omr_vertical .answer-sheet-info-panel {
    display: grid;
  }

  .answer-sheet-style-omr_vertical .bubble-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-hero {
    grid-template-columns: 1fr;
  }

  .verification-card-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-hero {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .profile-meta {
    grid-column: 1 / -1;
    min-width: 0;
    text-align: left;
  }

  .install-shell {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .install-rail {
    padding: 24px;
  }

  .install-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .install-rail .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .install-content-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel,
  .page-head,
  .sheet-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .settings-head-preview {
    width: 100%;
    min-height: 86px;
  }

  .settings-uploader {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .settings-uploader-wide {
    grid-template-columns: 1fr;
  }

  .knowledge-filter-grid .knowledge-search {
    grid-column: 1 / -1;
  }

  .grid-form.paper-form {
    grid-template-columns: 1fr;
    background: #ffffff;
  }

  .paper-form > label,
  .paper-form > .span-all {
    grid-column: 1 / -1;
  }

  .paper-form > label {
    margin-bottom: 12px;
    padding-inline: 18px;
  }

  .paper-form-section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
    padding: 16px 18px 12px 34px;
  }

  .paper-form-section-title::before {
    left: 18px;
    top: 16px;
    bottom: 12px;
  }

  .paper-form-section-title span {
    text-align: left;
  }

  .question-bank-compose {
    align-items: stretch;
    flex-direction: column;
  }

  .question-bank-compose-actions {
    width: 100%;
    min-width: 0;
    justify-content: space-between;
  }

  .question-bank-compose-actions span {
    text-align: left;
  }

  .question-bank-filters {
    grid-template-columns: 1fr;
  }

  .question-bank-modal-panel {
    width: min(100%, calc(100vw - 16px));
  }

  .question-bank-picker,
  .question-bank-selected {
    padding: 14px;
  }
}

@media (max-width: 680px) {
  .answer-sheet-preview-head {
    align-items: stretch;
    flex-direction: column;
  }

  .answer-sheet-preview-head .btn {
    width: 100%;
  }

  .paper-edit-type-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paper-edit-type-tab {
    justify-content: space-between;
    min-width: 0;
  }

  .paper-edit-type-tab span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .paper-edit-type-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .route-dashboard .main {
    padding: 0 14px 16px;
  }

  .route-dashboard .topbar {
    margin-inline: -14px;
  }

  .dashboard-metrics,
  .shortcut-grid,
  .ratio-list,
  .paper-stats-grid,
  .paper-edit-overview,
  .analytics-stat-grid,
  .analytics-import-steps,
  .analytics-import-body,
  .user-stat-grid {
    grid-template-columns: 1fr;
  }

  .user-directory-head {
    align-items: stretch;
    flex-direction: column;
  }

  .user-directory-head .btn {
    width: 100%;
  }

  .user-stat-card {
    grid-template-columns: minmax(0, 1fr) 88px;
  }

  .user-toolbar-controls,
  .user-toolbar-controls select,
  .user-search {
    width: 100%;
  }

  .user-card-grid {
    grid-template-columns: 1fr;
  }

  .user-card-metrics {
    grid-template-columns: 1fr;
  }

  .user-card-metrics .user-card-region dd {
    display: block;
    min-height: 0;
    -webkit-line-clamp: unset;
  }

  .user-card-metrics div {
    text-align: left;
  }

  .dashboard-metric-card {
    min-height: 112px;
    padding: 18px;
  }

  .paper-stats-grid article {
    min-height: 104px;
  }

  .analytics-stat-grid article {
    min-height: 104px;
  }

  .analytics-ai-list header {
    display: grid;
  }

  .analytics-import-body .span-all {
    grid-column: auto;
  }

  .analytics-modal-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .analytics-template-note {
    grid-template-columns: 1fr;
  }

  .analytics-template-note strong,
  .analytics-template-note span,
  .analytics-template-note a {
    grid-column: auto;
    grid-row: auto;
  }

  .dashboard-chart {
    padding-left: 10px;
  }

  .chart-grid-lines {
    left: 10px;
  }

  .chart-months {
    left: 10px;
    font-size: 10px;
  }

  .chart-tooltip {
    position: static;
    margin: -8px 0 12px;
  }

  .public-home-nav {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  .public-home-saas .public-home-nav {
    padding: 14px 16px;
  }

  .public-home-nav nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .public-home-nav nav a:not(.btn) {
    padding: 0 8px;
  }

  .public-home-page main {
    padding: 0 16px 28px;
  }

  .public-home-copy h1 {
    font-size: 36px;
  }

  .saas-hero .public-home-copy h1 {
    font-size: 36px;
  }

  .public-home-copy p {
    font-size: 15px;
  }

  .public-home-visual {
    min-height: 300px;
  }

  .public-home-hero.saas-hero {
    padding: 36px 16px 78px;
  }

  .public-home-panel {
    display: none;
  }

  .saas-stat-strip {
    width: calc(100% - 32px);
    grid-template-columns: 1fr;
    margin-top: -42px;
    padding: 12px 18px;
  }

  .saas-stat-strip div {
    min-height: 70px;
    border-right: 0;
    border-bottom: 1px solid #edf2f7;
  }

  .saas-stat-strip div:last-child {
    border-bottom: 0;
  }

  .public-home-saas .public-home-section,
  .saas-solution,
  .saas-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .public-feature-grid,
  .public-step-grid,
  .saas-service-grid,
  .saas-case-row {
    grid-template-columns: 1fr;
  }

  .public-feature-grid article,
  .public-step-grid article {
    min-height: 0;
  }

  .public-home-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .saas-flow-board {
    gap: 20px;
    padding: 18px;
  }

  .saas-flow-right::before {
    display: none;
  }

  .saas-flow-left article {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 16px;
  }

  .saas-flow-left article > span,
  .saas-service-head > span {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .saas-flow-left article::after {
    left: 74px;
    right: 16px;
  }

  .saas-case-row article {
    min-height: 150px;
  }

  .saas-service-grid article {
    min-height: 0;
    padding: 22px;
  }

  .saas-footer {
    flex-direction: column;
  }

  .auth-page {
    padding: 0;
  }

  .auth-aigc-shell {
    background:
      radial-gradient(circle at 12% 20%, rgba(92, 153, 255, 0.24), transparent 34%),
      linear-gradient(145deg, #dceaff 0%, #9ed7f5 100%);
  }

  .auth-page:has(.auth-aigc-shell) {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .auth-aigc-shell::before,
  .auth-aigc-shell::after {
    display: none;
  }

  .auth-aigc-visual {
    min-height: 272px;
    padding: 34px 20px 12px;
  }

  .auth-aigc-visual::before {
    display: none;
  }

  .auth-aigc-copy h1 {
    font-size: 32px;
  }

  .auth-aigc-copy p {
    display: block;
    font-size: 14px;
  }

  .auth-aigc-badge {
    min-height: 30px;
    padding: 0 14px;
    font-size: 14px;
  }

  .auth-aigc-stage {
    display: none;
  }

  .auth-aigc-panel {
    padding: 0 12px 16px;
  }

  .auth-aigc-card,
  .auth-card-register.auth-aigc-card {
    width: 100%;
    padding: 22px 18px;
    border-radius: 8px;
  }

  .auth-card-brand {
    margin-right: 0;
  }

  .auth-aigc-trace,
  .auth-register-steps {
    width: 100%;
    justify-content: center;
    margin-top: 14px;
    padding: 6px;
  }

  .auth-aigc-trace span,
  .auth-register-steps li {
    font-size: 12px;
  }

  .auth-aigc-trace i {
    flex: 1 1 12px;
    max-width: 22px;
  }

  .auth-register-steps li:not(:last-child)::after {
    right: -1px;
    width: 1px;
  }

  .auth-aigc-head h2 {
    font-size: 22px;
  }

  .auth-aigc-form .auth-form-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .auth-aigc-form input,
  .auth-aigc-form select,
  .auth-aigc-form .btn.full {
    height: 48px;
    min-height: 48px;
  }

  .auth-aigc-form .auth-email-code-row {
    height: 48px;
    min-height: 48px;
  }

  .auth-aigc-form .auth-email-code-row input {
    height: 46px;
    min-height: 46px;
  }

  .auth-aigc-form .auth-email-code-button {
    height: 36px;
  }

  .auth-stage-checks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .auth-stage-check span {
    min-height: 48px;
  }

  .auth-captcha-row {
    grid-template-columns: minmax(0, 1fr) 104px 62px;
    gap: 7px;
  }

  .auth-captcha-row img {
    width: 104px;
    height: 44px;
  }

  .auth-captcha-refresh {
    height: 44px;
    padding: 0 6px;
    font-size: 12px;
  }

  .auth-socials {
    gap: 16px;
  }

  .auth-shell {
    border-width: 0;
    border-radius: 0;
  }

  .auth-visual {
    min-height: 260px;
    padding: 18px;
  }

  .auth-visual::before {
    display: none;
  }

  .auth-visual-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-visual-nav nav {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
  }

  .auth-hero-copy {
    margin-top: 30px;
  }

  .auth-hero-copy h1 {
    font-size: 28px;
  }

  .auth-hero-copy p,
  .auth-hero-points {
    display: none;
  }

  .auth-illustration {
    display: none;
  }

  .auth-panel {
    padding: 0 12px 12px;
  }

  .auth-card {
    width: 100%;
    padding: 20px;
  }

  .auth-tabs a {
    min-height: 36px;
    padding: 0 8px;
    font-size: 13px;
  }

  .auth-form input,
  .auth-form select,
  .auth-form .btn.full {
    min-height: 46px;
  }

  .auth-form-grid,
  .auth-role-grid {
    grid-template-columns: 1fr;
  }

  .auth-form-options,
  .auth-section-title,
  .auth-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-role-option span {
    min-height: 0;
  }

  .install-page {
    padding: 12px;
  }

  .install-card {
    padding: 22px;
  }

  .install-brand,
  .install-head {
    align-items: flex-start;
  }

  .install-head {
    flex-direction: column;
  }

  .install-head-meter {
    width: 100%;
    min-height: 64px;
    grid-template-columns: auto auto;
    justify-content: space-between;
    text-align: left;
  }

  .install-stat-grid,
  .install-metric-strip,
  .install-feature-grid {
    grid-template-columns: 1fr;
  }

  .install-agreement-head,
  .install-agreement-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .install-agreement-body {
    max-height: 260px;
  }

  .install-rail .steps {
    grid-template-columns: 1fr;
  }

  .install-actions {
    justify-content: stretch;
  }

  .install-actions .btn,
  .install-section > .btn,
  .install-main-panel > .btn {
    width: 100%;
  }

  .system-home-hero,
  .home-hero,
  .portal-hero {
    padding: 22px;
  }

  .system-home-copy h1,
  .home-hero h1,
  .portal-hero h1 {
    font-size: 30px;
  }

  .hero-actions,
  .section-title.inline {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    align-items: stretch;
  }

  .topbar-title {
    order: 1;
    flex: 1 1 100%;
    min-width: 0;
  }

  .topbar-title strong,
  .topbar-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-user {
    order: 2;
    flex: 1 1 100%;
    min-width: 0;
  }

  .topbar-user summary {
    border-radius: 8px;
    background: #f8fbfd;
    border-color: #e6edf4;
  }

  .topbar-user-copy {
    min-width: 0;
  }

  .topbar-user-link,
  .topbar-user-copy > span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-user-menu {
    left: 0;
    right: 0;
  }

  .knowledge-stage-tab {
    flex: 1 1 calc(33.333% - 8px);
    min-width: 0;
    padding-inline: 10px;
  }

  .portal-card {
    min-height: 0;
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .hero-actions .btn,
  .section-title.inline .btn {
    width: 100%;
  }

  .recent-list a {
    grid-template-columns: 1fr;
  }

  .recent-list .badge {
    grid-row: auto;
    grid-column: auto;
    justify-self: start;
  }

  .paper-form > label {
    padding: 0 16px;
  }

  .paper-form-section-title {
    padding: 15px 16px 11px 30px;
  }

  .paper-form-section-title::before {
    left: 16px;
  }

  .paper-form > .paper-source-summary,
  .paper-form > .type-config-summary,
  .paper-form > .question-bank-compose {
    margin: 0 16px 14px;
  }

  .paper-form > .btn.primary {
    justify-self: stretch;
    margin: 4px 16px 18px;
    width: auto;
  }

  .type-config-summary,
  .modal-head,
  .modal-actions,
  .bulk-actions,
  .sticky-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .question-edit-head {
    grid-template-columns: 1fr;
  }

  .type-plan-head {
    display: none;
  }

  .type-plan-row {
    grid-template-columns: 1fr;
    padding: 14px 0;
  }

  .profile-hero {
    grid-template-columns: 1fr;
  }

  .profile-avatar {
    width: 58px;
    height: 58px;
    font-size: 24px;
  }

  .detail-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .verification-status-panel {
    grid-template-columns: 1fr;
  }

  .verification-card,
  .verification-card-head,
  .verification-review-head {
    align-items: stretch;
  }

  .verification-card-head,
  .verification-review-head {
    flex-direction: column;
  }

  .verification-card-details,
  .verification-review-list {
    grid-template-columns: 1fr;
  }

  .verification-actions .btn {
    flex: 1 1 120px;
  }

  .verification-reject-modal {
    padding: 14px;
  }

  .user-card-grid,
  .user-card-metrics,
  .user-edit-grid,
  .region-select-grid {
    grid-template-columns: 1fr;
  }

  .user-edit-modal {
    padding: 14px;
  }

  .user-card-actions,
  .user-edit-panel .button-row {
    justify-content: stretch;
  }

  .email-test-card .email-actions {
    min-width: 0;
  }

  .email-actions .btn {
    flex: 1 1 160px;
  }

  .user-card-actions .btn,
  .user-edit-panel .button-row .btn {
    flex: 1 1 120px;
  }
}

@media (max-width: 680px) {
  .email-page-head {
    gap: 14px;
    padding: 18px;
  }

  .email-page-title {
    align-items: flex-start;
    gap: 12px;
  }

  .email-page-icon {
    width: 46px;
    height: 46px;
  }

  .email-page-icon svg {
    width: 25px;
    height: 25px;
  }

  .email-page-title h1 {
    font-size: 24px;
  }

  .email-page-title p,
  .email-section-title p {
    font-size: 13px;
    line-height: 1.65;
  }

  .email-page-head .email-icon-btn {
    width: 100%;
  }

  .email-overview-grid {
    gap: 12px;
    margin-bottom: 14px;
  }

  .email-status-card {
    min-height: 0;
    padding: 15px;
  }

  .email-status-card strong {
    font-size: 18px;
  }

  .email-section-title {
    align-items: flex-start;
    flex-direction: row;
    gap: 12px;
    padding: 16px;
  }

  .email-section-title h2 {
    font-size: 20px;
  }

  .email-settings-layout {
    gap: 12px;
    padding: 14px;
  }

  .email-config-card {
    gap: 14px;
    padding: 15px;
  }

  .email-config-head {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
  }

  .email-status-icon,
  .email-config-icon {
    width: 36px;
    height: 36px;
  }

  .email-status-icon svg,
  .email-config-icon svg {
    width: 20px;
    height: 20px;
  }

  .email-config-head h3 {
    font-size: 16px;
  }

  .email-test-card {
    align-items: stretch;
  }

  .email-test-card .email-actions {
    justify-content: stretch;
    min-width: 0;
  }

  .email-actions .btn {
    width: 100%;
    flex: 1 1 100%;
  }
}

