:root {
  color-scheme: light;
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --text: #182230;
  --muted: #667085;
  --line: #d7dee8;
  --line-strong: #b8c4d4;
  --green: #1f7a5a;
  --green-dark: #155f46;
  --blue: #2861a8;
  --amber: #a86400;
  --red: #b42318;
  --shadow: 0 12px 28px rgba(24, 34, 48, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  min-height: 36px;
  border: 1px solid var(--green);
  border-radius: 6px;
  padding: 0 14px;
  color: #fff;
  background: var(--green);
  cursor: pointer;
}

button:hover {
  background: var(--green-dark);
}

button:disabled {
  border-color: #c6ceda;
  color: #7d8797;
  background: #eef1f5;
  cursor: not-allowed;
}

button.secondary,
.ghost-link {
  border-color: var(--line-strong);
  color: var(--text);
  background: #fff;
}

button.secondary:hover,
.ghost-link:hover {
  border-color: var(--green);
  color: var(--green-dark);
  background: #f4fbf8;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 12px;
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 18px 14px;
  border-right: 1px solid #cdd6e2;
  background: #172033;
  color: #e9eef7;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 22px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: #2f7d67;
  font-size: 20px;
  font-weight: 700;
}

.brand h1,
.brand p,
.topbar h2,
.hero-band h3,
.panel h3 {
  margin: 0;
  letter-spacing: 0;
}

.brand h1 {
  font-size: 18px;
}

.brand p {
  margin-top: 4px;
  color: #b9c5d6;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: #cbd5e4;
  background: transparent;
  text-align: left;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  color: #fff;
  background: #2f7d67;
}

.nav-icon {
  font-size: 17px;
}

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 12px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #d8e2ef;
  background: rgba(255, 255, 255, 0.05);
}

.signal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
}

.main-shell {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.topbar h2 {
  font-size: 23px;
  font-weight: 700;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.model-badge,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid #b7dfcf;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--green-dark);
  background: #effaf5;
  font-size: 12px;
  white-space: nowrap;
}

.pill.muted {
  border-color: var(--line);
  color: var(--muted);
  background: var(--surface-soft);
}

.pill.danger {
  border-color: #f5c6c0;
  color: var(--red);
  background: #fff4f2;
}

.content {
  padding: 20px 24px 32px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.hero-band {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(31, 122, 90, 0.12), rgba(40, 97, 168, 0.08)),
    #fff;
  box-shadow: var(--shadow);
}

.hero-band h3 {
  font-size: 28px;
  font-weight: 750;
}

.hero-band p,
.panel p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 108px);
  gap: 10px;
  align-content: center;
}

.hero-metrics div {
  min-height: 86px;
  border: 1px solid rgba(31, 122, 90, 0.18);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.hero-metrics strong {
  display: block;
  font-size: 28px;
}

.hero-metrics span {
  color: var(--muted);
  font-size: 12px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.module-tile {
  display: grid;
  gap: 8px;
  min-height: 156px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--text);
  background: var(--surface);
  text-align: left;
  box-shadow: 0 4px 14px rgba(24, 34, 48, 0.04);
}

.module-tile:hover {
  border-color: #9bcbbb;
  color: var(--text);
  background: #f8fcfa;
}

.module-tile.primary {
  border-color: #94d2bc;
  background: #f0faf6;
}

.module-tile strong {
  font-size: 18px;
}

.module-tile span:last-child {
  color: var(--muted);
  line-height: 1.5;
}

.tile-kicker {
  color: var(--green-dark);
  font-size: 12px;
}

.overview-grid,
.page-grid,
.governance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.governance-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bid-grid {
  grid-template-columns: minmax(420px, 1.15fr) minmax(320px, 0.85fr);
  margin-bottom: 16px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(24, 34, 48, 0.04);
}

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

.panel h3 {
  font-size: 16px;
  font-weight: 700;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.timeline span {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 10px;
  text-align: center;
  color: var(--text);
  background: var(--surface-soft);
}

.metric-list,
.rule-list {
  display: grid;
  gap: 10px;
}

.metric-list div,
.rule-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
}

.metric-list span {
  color: var(--muted);
}

.metric-list strong {
  text-align: right;
}

.input-panel textarea {
  min-height: 360px;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--text);
  background: #fff;
}

textarea {
  min-height: 116px;
  resize: vertical;
  line-height: 1.55;
}

select {
  min-height: 38px;
}

label,
.solo-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

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

.form-grid.compact {
  grid-template-columns: 1fr;
}

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

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.project-facts {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px 12px;
  margin: 0;
}

.project-facts dt {
  color: var(--muted);
}

.project-facts dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.missing-value {
  color: var(--amber);
  font-weight: 600;
}

.section-help {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.project-facts + .section-help {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.results-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(280px, 0.85fr) minmax(420px, 1.3fr);
  gap: 16px;
}

.wide-panel {
  min-height: 420px;
}

.list,
.outline {
  display: grid;
  gap: 10px;
}

.item {
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 11px 12px;
  line-height: 1.5;
  background: #fff;
}

.item.critical {
  border-left-color: var(--red);
}

.item.warn {
  border-left-color: var(--amber);
}

.item label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text);
}

.item label small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.item input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  margin-top: 3px;
}

.meta {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 16px;
  color: var(--muted);
  line-height: 1.6;
  background: var(--surface-soft);
}

.empty-state.warning {
  border-color: #ead7aa;
  color: #7a5b16;
  background: #fffbef;
}

.confirmation-bar {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.confirmation-bar button {
  width: 100%;
}

.model-notice {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  background: var(--surface-soft);
}

.model-notice.warning {
  border-color: #ead7aa;
  color: #7a5b16;
  background: #fffbef;
}

.model-notice.ready {
  border-color: #b7dfcf;
  color: var(--green-dark);
  background: #f0faf6;
}

.outline h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.outline ul {
  margin: 0;
  padding-left: 18px;
}

.outline li {
  margin: 4px 0;
}

.search-results {
  margin-top: 14px;
}

.preview-text {
  max-height: 138px;
  margin-top: 10px;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--muted);
  font-size: 13px;
}

.compact-actions {
  margin-top: 10px;
}

/* 招标文件拖拽上传区 */
.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 16px;
  border: 2px dashed var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
  background: #f8fafb;
  margin-bottom: 4px;
}
.drop-zone:hover,
.drop-zone:focus {
  border-color: var(--accent);
  background: #f0f7ff;
  outline: none;
}
.drop-zone.drag-over {
  border-color: var(--accent);
  background: #e8f3ff;
}
.drop-zone.uploading {
  opacity: 0.7;
  pointer-events: none;
}
.drop-icon { font-size: 28px; }
.drop-hint { font-size: 14px; font-weight: 600; color: var(--fg); }
.drop-sub  { font-size: 12px; color: var(--muted); }

.drop-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 4px;
  color: var(--muted);
  font-size: 12px;
}
.drop-sep::before,
.drop-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.inline-toggle input {
  width: auto;
  margin: 0;
}

.output {
  min-height: 92px;
  margin: 14px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  white-space: pre-wrap;
  background: #fbfcfd;
}

.screen-board {
  min-height: calc(100vh - 128px);
  border: 1px solid #273340;
  border-radius: 8px;
  padding: 18px;
  color: #eef7f3;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(135deg, #151916 0%, #1c2421 48%, #252018 100%);
  background-size: 40px 40px, 40px 40px, auto;
  box-shadow: 0 18px 42px rgba(12, 16, 20, 0.24);
}

.screen-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 8px 6px 18px;
}

.screen-kicker {
  margin-bottom: 8px;
  color: #7dd6bd;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.screen-header h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.12;
  letter-spacing: 0;
}

.screen-header p {
  max-width: 860px;
  margin: 10px 0 0;
  color: #b7c8c0;
  line-height: 1.55;
}

.screen-clock {
  min-width: 172px;
  border: 1px solid rgba(125, 214, 189, 0.34);
  border-radius: 8px;
  padding: 12px 14px;
  text-align: right;
  background: rgba(255, 255, 255, 0.06);
}

.screen-clock strong {
  display: block;
  color: #f4c76e;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.screen-clock span {
  color: #9aaca6;
  font-size: 12px;
}

.screen-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.screen-kpi {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  min-height: 112px;
  border: 1px solid rgba(125, 214, 189, 0.24);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(125, 214, 189, 0.14), rgba(244, 199, 110, 0.07));
}

.screen-kpi strong {
  display: block;
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
}

.screen-kpi span {
  color: #b7c8c0;
}

.screen-kpi em {
  grid-column: 2;
  color: #f4c76e;
  font-style: normal;
  font-size: 12px;
}

.kpi-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.kpi-icon::before {
  color: #7dd6bd;
  font-size: 22px;
  font-weight: 800;
}

.icon-bid::before {
  content: "投";
}

.icon-kb::before {
  content: "库";
}

.icon-time::before {
  content: "效";
}

.icon-risk::before {
  content: "险";
}

.screen-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr 1.05fr;
  gap: 12px;
}

.screen-card {
  min-height: 260px;
  border: 1px solid rgba(195, 211, 205, 0.18);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.screen-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.screen-card-head h4 {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  letter-spacing: 0;
}

.screen-card-head span {
  color: #7dd6bd;
  font-size: 12px;
}

.assistant-card {
  grid-row: span 2;
}

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

.assistant-node {
  min-height: 128px;
  border: 1px solid rgba(195, 211, 205, 0.18);
  border-radius: 8px;
  padding: 12px;
  background: rgba(18, 23, 21, 0.54);
}

.assistant-node.live {
  border-color: rgba(125, 214, 189, 0.52);
  background: rgba(31, 122, 90, 0.22);
}

.node-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 9px;
  border-radius: 8px;
  color: #182230;
  background: #7dd6bd;
  font-weight: 800;
}

.assistant-node strong,
.assistant-node em {
  display: block;
}

.assistant-node strong {
  color: #ffffff;
}

.assistant-node em {
  margin-top: 4px;
  color: #b7c8c0;
  font-style: normal;
  font-size: 12px;
}

.progress {
  height: 6px;
  margin-top: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7dd6bd, #f4c76e);
}

.asset-bars {
  display: grid;
  gap: 13px;
}

.asset-bars div {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  min-height: 34px;
  padding-bottom: 10px;
  color: #dbe8e3;
}

.asset-bars strong {
  color: #f4c76e;
}

.asset-bars i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7dd6bd, #4aa3df);
}

.asset-bars div::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  content: "";
}

.asset-bars i {
  z-index: 1;
}

.center-card {
  min-height: 320px;
}

.core-diagram {
  position: relative;
  min-height: 220px;
}

.core-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 152px;
  height: 152px;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(125, 214, 189, 0.55);
  border-radius: 50%;
  text-align: center;
  background: radial-gradient(circle, rgba(125, 214, 189, 0.22), rgba(255, 255, 255, 0.04));
}

.core-ring strong {
  align-self: end;
  color: #ffffff;
}

.core-ring span {
  align-self: start;
  color: #f4c76e;
  font-size: 12px;
}

.core-orbit {
  position: absolute;
  min-width: 78px;
  border: 1px solid rgba(244, 199, 110, 0.34);
  border-radius: 999px;
  padding: 7px 10px;
  color: #f9efe0;
  text-align: center;
  background: rgba(244, 199, 110, 0.12);
}

.core-orbit.top {
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.core-orbit.right {
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.core-orbit.bottom {
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
}

.core-orbit.left {
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

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

.gateway-row span {
  min-height: 36px;
  border: 1px solid rgba(125, 214, 189, 0.22);
  border-radius: 8px;
  padding: 9px 6px;
  color: #dbe8e3;
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

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

.risk-list div {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid rgba(195, 211, 205, 0.18);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(18, 23, 21, 0.46);
}

.risk-list strong {
  color: #f4c76e;
  font-size: 22px;
}

.risk-list span {
  color: #e6f1ed;
}

.risk-list em {
  color: #9aaca6;
  font-style: normal;
  font-size: 12px;
}

.region-board {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 12px;
}

.region-map {
  position: relative;
  min-height: 190px;
  border: 1px solid rgba(125, 214, 189, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(125, 214, 189, 0.12), transparent 58%),
    rgba(18, 23, 21, 0.46);
}

.hot {
  position: absolute;
  border: 1px solid rgba(125, 214, 189, 0.42);
  border-radius: 999px;
  padding: 6px 9px;
  color: #ffffff;
  background: rgba(31, 122, 90, 0.72);
  font-size: 12px;
}

.h1 {
  top: 34px;
  right: 34px;
}

.h2 {
  right: 52px;
  bottom: 32px;
}

.h3 {
  top: 78px;
  left: 42%;
}

.h4 {
  bottom: 46px;
  left: 18%;
}

.h5 {
  top: 28px;
  left: 22%;
}

.region-legend {
  display: grid;
  align-content: center;
  gap: 10px;
  color: #c8d8d2;
  font-size: 12px;
}

.region-legend div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.region-legend span {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #7dd6bd;
}

.region-legend div:nth-child(2) span {
  background: #f4c76e;
}

.region-legend div:nth-child(3) span {
  background: #4aa3df;
}

.region-legend div:nth-child(4) span {
  background: #d787b7;
}

.roadmap {
  display: grid;
  gap: 10px;
}

.roadmap div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  min-height: 46px;
  border: 1px solid rgba(195, 211, 205, 0.18);
  border-left: 4px solid rgba(154, 172, 166, 0.5);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(18, 23, 21, 0.46);
}

.roadmap .done {
  border-left-color: #7dd6bd;
}

.roadmap .active {
  border-left-color: #f4c76e;
  background: rgba(244, 199, 110, 0.12);
}

.roadmap strong {
  color: #ffffff;
}

.roadmap span {
  color: #b7c8c0;
}

@media (max-width: 1200px) {
  .module-grid,
  .governance-grid,
  .results-grid,
  .screen-kpis,
  .screen-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wide-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

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

  .topbar,
  .hero-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }

  .content {
    padding: 14px;
  }

  .hero-metrics,
  .module-grid,
  .overview-grid,
  .page-grid,
  .bid-grid,
  .governance-grid,
  .results-grid,
  .screen-kpis,
  .screen-layout,
  .assistant-grid,
  .region-board,
  .gateway-row,
  .timeline,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .screen-header {
    flex-direction: column;
  }

  .screen-clock {
    width: 100%;
    text-align: left;
  }
}

/* ============ 认证 / 用户管理 / 系统设置（M20） ============ */
[hidden] {
  display: none !important;
}

/* 通用两列栅格 */
.grid {
  display: grid;
  gap: 16px;
}
.grid.two-col {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}

/* 表单 */
.form-grid {
  display: grid;
  gap: 12px;
}
.form-grid label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.form-grid input,
.form-grid select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}
.form-grid input:focus,
.form-grid select:focus {
  outline: none;
  border-color: var(--green);
}
.form-grid .checkbox-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.form-grid .checkbox-row input {
  min-height: auto;
  width: 18px;
  height: 18px;
}
.form-actions {
  margin-top: 4px;
}
.sticky-actions {
  margin-top: 16px;
}

/* 按钮变体 */
button.ghost,
button.primary,
button.danger-text {
  border-radius: 6px;
}
button.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
button.ghost {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--text);
}
button.ghost:hover {
  border-color: var(--green);
  color: var(--green-dark);
  background: #f4fbf8;
}
button.danger-text {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--red);
}
button.danger-text:hover {
  border-color: var(--red);
  background: #fdf3f2;
}

/* 数据表格 */
.table-wrap {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th,
.data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table th {
  color: var(--muted);
  font-weight: 600;
  background: var(--surface-soft);
}
.data-table td.muted {
  color: var(--muted);
  text-align: center;
}
.data-table .role-select {
  min-height: 30px;
  padding: 0 6px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
}
.row-actions {
  display: flex;
  gap: 6px;
}
.row-actions button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}
.status-on {
  color: var(--green);
  font-weight: 600;
}
.status-off {
  color: var(--red);
}
.self-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  background: #e8f3ee;
  color: var(--green-dark);
}

/* 顶栏用户菜单 */
.user-menu {
  position: relative;
}
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  background: #fff;
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.user-chip:hover {
  border-color: var(--green);
  background: #f4fbf8;
}
.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 12px;
}
.user-dropdown {
  position: absolute;
  right: 0;
  top: 40px;
  min-width: 200px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 40;
  display: grid;
  gap: 6px;
}
.user-dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.user-dropdown button {
  justify-content: flex-start;
  background: #fff;
  border-color: var(--line-strong);
  color: var(--text);
  text-align: left;
}
.user-dropdown button:hover {
  border-color: var(--green);
  background: #f4fbf8;
}
.role-tag {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: #eef2f6;
  color: var(--muted);
}

/* 登录遮罩 */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f2d3d 0%, #2861a8 100%);
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  padding: 28px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  display: grid;
  gap: 14px;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.login-brand .brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-size: 18px;
}
.login-brand h1 {
  margin: 0;
  font-size: 18px;
}
.login-brand p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.login-card h2 {
  margin: 4px 0 0;
  font-size: 20px;
}
.login-card label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.login-card input {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}
.login-card input:focus {
  outline: none;
  border-color: var(--green);
}
.login-card .primary {
  min-height: 42px;
  margin-top: 4px;
}
.login-error {
  padding: 8px 10px;
  border-radius: 8px;
  background: #fdf3f2;
  color: var(--red);
  font-size: 13px;
}

/* 模态（修改密码） */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(24, 34, 48, 0.45);
  padding: 20px;
}
.modal-card {
  width: 100%;
  max-width: 360px;
  padding: 22px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}
.modal-card h3 {
  margin: 0;
}
.modal-card label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.modal-card input {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}
