﻿:root {
  --bg: #f3f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --line: #d9e3f0;
  --text: #1f2a37;
  --muted: #66758a;
  --primary: #1f5eff;
  --primary-deep: #143ea8;
  --primary-soft: #e8f0ff;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --shadow: 0 12px 28px rgba(31, 42, 55, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #eef4fb 0%, #f7faff 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.login-body {
  min-height: 100vh;
  padding: 24px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top left, rgba(31, 94, 255, 0.18), transparent 32%),
    radial-gradient(circle at bottom right, rgba(20, 62, 168, 0.14), transparent 28%),
    linear-gradient(135deg, #eef4ff 0%, #f8fbff 100%);
}

.login-shell {
  width: min(1180px, calc(100vw - 48px));
  min-height: min(720px, calc(100vh - 48px));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  border: 1px solid rgba(217, 227, 240, 0.8);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 30px 80px rgba(20, 62, 168, 0.12);
}

.login-hero {
  padding: 48px;
  background:
    linear-gradient(160deg, rgba(20, 62, 168, 0.96), rgba(31, 94, 255, 0.92)),
    linear-gradient(0deg, #143ea8, #1f5eff);
  color: #fff;
  position: relative;
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: auto -120px -120px auto;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.hero-badge,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.14);
}

.login-hero h1 {
  margin: 20px 0 12px;
  font-size: clamp(34px, 3.2vw, 42px);
  line-height: 1.2;
}

.login-hero p {
  margin: 0;
  max-width: 540px;
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.86);
}

.hero-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.hero-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-card h3,
.metric-card h3,
.mini-card h3,
.chart-card h3,
.table-card h3,
.detail-card h3,
.form-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.hero-card p,
.metric-card p,
.mini-card p,
.detail-card p,
.stat-list,
.small {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.login-panel {
  padding: 44px 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.login-card {
  width: 100%;
  max-width: 520px;
}

.page-title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
}

.subtle {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.login-card .field-grid {
  grid-template-columns: 1fr;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  color: var(--text);
}

.field textarea {
  min-height: 108px;
  resize: vertical;
}

.actions,
.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.actions {
  margin-top: 24px;
}

.login-card .actions {
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #fff;
  box-shadow: 0 10px 20px rgba(31, 94, 255, 0.18);
}

.login-card .btn-primary {
  display: flex;
  width: 100%;
  min-height: 48px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

.btn-secondary {
  border-color: var(--line);
  color: var(--text);
}

.btn-danger {
  background: #fff5f5;
  color: var(--danger);
  border-color: #fecaca;
}

.helper {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #0f2b73 0%, #153e9f 100%);
  color: #dbe7ff;
  padding: 24px 18px;
}

.brand {
  padding: 10px 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 18px;
}

.brand h1 {
  margin: 0 0 6px;
  font-size: 22px;
  color: #fff;
}

.brand p {
  margin: 0;
  font-size: 13px;
  color: rgba(219, 231, 255, 0.74);
  line-height: 1.6;
}

.menu-title {
  margin: 18px 12px 10px;
  font-size: 12px;
  color: rgba(219, 231, 255, 0.58);
  letter-spacing: 0.06em;
}

.menu {
  display: grid;
  gap: 6px;
}

.menu a {
  display: block;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14px;
  color: #e6efff;
}

.menu a.active,
.menu a:hover {
  background: rgba(255, 255, 255, 0.14);
}

.content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 72px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar .left,
.topbar .right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar .right {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-size: 13px;
  font-weight: 600;
}

.topbar-nav {
  min-width: 96px;
}

.notice {
  position: relative;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.notice .badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.main {
  padding: 24px 28px 32px;
}

.breadcrumb {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.hero {
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, #1f5eff 0%, #143ea8 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.hero h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.hero p {
  margin: 0;
  max-width: 820px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.88);
}

.grid-4,
.grid-3,
.grid-2,
.page-stack {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.page-stack > * {
  min-width: 0;
}

.layout-2-1 {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.grid-4 > *,
.grid-3 > *,
.grid-2 > *,
.layout-2-1 > * {
  min-width: 0;
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}


.layout-2-1 {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.9fr);
}

.card,
.metric-card,
.mini-card,
.chart-card,
.table-card,
.detail-card,
.form-card,
.notice-card {
  background: var(--surface);
  border: 1px solid rgba(217, 227, 240, 0.95);
  border-radius: var(--radius);

.table-card {
  overflow-x: auto;
}
  box-shadow: var(--shadow);
}

.metric-card,
.mini-card,
.chart-card,
.table-card,
.detail-card,
.form-card,
.notice-card {
  padding: 20px;
}

.metric-value {
  font-size: 32px;
  font-weight: 700;
  margin: 10px 0 8px;
}

.tag {
  background: var(--primary-soft);
  color: var(--primary-deep);
}

.tag.success {
  background: #ecfdf3;
  color: var(--success);
}

.tag.warning {
  background: #fff7ed;
  color: var(--warning);
}

.tag.danger {
  background: #fef2f2;
  color: var(--danger);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 12px;
}

.section-head h3 {
  margin: 0;
  font-size: 18px;
}

.filters,
.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.filters .field,
.detail-grid .field {
  margin-top: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
  vertical-align: top;
}

th {
  color: #475569;
  background: #f8fbff;
  font-weight: 700;
}

.risk-page-stack {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.risk-page-stack > * {
  min-width: 0;
}

.risk-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.risk-action-form {
  margin: 0;
}
.risk-table {
  table-layout: fixed;
}

.risk-table th,
.risk-table td {
  word-break: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.risk-table th:nth-child(1),
.risk-table td:nth-child(1) {
  width: 70px;
}

.risk-table th:nth-child(2),
.risk-table td:nth-child(2) {
  width: 115px;
}

.risk-table th:nth-child(3),
.risk-table td:nth-child(3) {
  width: 78px;
}

.risk-table th:nth-child(4),
.risk-table td:nth-child(4) {
  width: 120px;
}

.risk-table th:nth-child(5),
.risk-table td:nth-child(5) {
  width: 100px;
}

.risk-table th:nth-child(6),
.risk-table td:nth-child(6) {
  width: 80px;
}

.risk-table th:nth-child(7),
.risk-table td:nth-child(7) {
  width: 90px;
  word-break: keep-all;
  overflow-wrap: normal;
}

.risk-table th:nth-child(8),
.risk-table td:nth-child(8) {
  width: 170px;
}

.risk-table td:last-child {
  white-space: nowrap;
}

.risk-table td:last-child form {
  display: inline-block;
  margin-right: 6px !important;
}

.risk-table td:last-child .btn {
  min-width: 64px;
  padding: 10px 12px;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.chart {
  height: 280px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(31, 94, 255, 0.06), transparent),
    repeating-linear-gradient(to right, #eef4fb 0 1px, transparent 1px 64px),
    repeating-linear-gradient(to top, #eef4fb 0 1px, transparent 1px 56px);
  position: relative;
  overflow: hidden;
}

.chart .line {
  position: absolute;
  inset: 24px 20px 28px 20px;
  border-bottom: 3px solid rgba(31, 94, 255, 0.26);
}

.chart .line::after {
  content: "";
  position: absolute;
  inset: 12% 4% 8% 4%;
  clip-path: polygon(0 78%, 12% 70%, 24% 74%, 37% 48%, 52% 58%, 68% 30%, 82% 40%, 100% 10%, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(31, 94, 255, 0.32), rgba(31, 94, 255, 0.04));
}

.chart.bars::after,
.chart.pie::after {
  content: "";
  position: absolute;
}

.chart.bars::after {
  inset: auto 24px 24px 24px;
  height: 72%;
  background:
    linear-gradient(to right,
      rgba(31, 94, 255, 0.8) 0 10%,
      transparent 10% 16%,
      rgba(20, 62, 168, 0.72) 16% 30%,
      transparent 30% 38%,
      rgba(70, 126, 255, 0.78) 38% 52%,
      transparent 52% 60%,
      rgba(31, 94, 255, 0.58) 60% 74%,
      transparent 74% 82%,
      rgba(20, 62, 168, 0.92) 82% 100%);
  clip-path: polygon(0 100%, 0 40%, 10% 40%, 10% 100%, 16% 100%, 16% 22%, 30% 22%, 30% 100%, 38% 100%, 38% 52%, 52% 52%, 52% 100%, 60% 100%, 60% 18%, 74% 18%, 74% 100%, 82% 100%, 82% 32%, 100% 32%, 100% 100%);
}

.chart.pie::after {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  background: conic-gradient(var(--primary) 0 32%, #4f83ff 32% 54%, #7aa4ff 54% 78%, #143ea8 78% 100%);
  box-shadow: inset 0 0 0 36px #fff;
}

.notice-list,
.timeline,
.stat-list {
  display: grid;
  gap: 12px;
}

.notice-item,
.timeline-item {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid #e7eef8;
}

.timeline-item strong,
.notice-item strong {
  display: block;
  margin-bottom: 6px;
}

.upload {
  border: 2px dashed #b8cbef;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  background: #f8fbff;
  color: var(--muted);
}

.empty-state,
.error-state {
  min-height: 360px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}

.empty-state .icon,
.error-state .icon {
  width: 74px;
  height: 74px;
  margin: 0 auto 16px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
}

.empty-state .icon {
  background: #eef4ff;
  color: var(--primary-deep);
}

.error-state .icon {
  background: #fef2f2;
  color: var(--danger);
}

.auth-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #dbe7ff;
  background: #f6f9ff;
  color: #34508f;
  font-size: 13px;
  line-height: 1.8;
}

.site-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.site-map .card {
  padding: 20px;
}

.site-map ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.menu a.active {
  background: rgba(255, 255, 255, 0.14);
}

@media (max-width: 1440px) {
  .grid-4,
  .grid-3,
  .filters,
  .detail-grid,
  .site-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layout-2-1,
  .login-shell {
    grid-template-columns: 1fr;
  }
}

.op-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.op-link {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--primary-deep);
  font-size: 12px;
  font-weight: 600;
}

.prototype-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  min-width: 240px;
  max-width: 380px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 13px;
  line-height: 1.7;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.26);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
}

.prototype-toast.show {
  opacity: 1;
  transform: translateY(0);
}
