:root {
  --bg: #eef3f7;
  --panel: #ffffff;
  --panel-2: #f7fafc;
  --ink: #152235;
  --muted: #627386;
  --line: #d9e3ec;
  --brand: #0b4f7c;
  --brand-2: #0d6f8f;
  --accent: #c99a2e;
  --green: #1d8a62;
  --red: #bd3d35;
  --orange: #c66b20;
  --blue-soft: #e7f2f8;
  --shadow: 0 16px 36px rgba(18, 38, 63, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

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

button {
  border: 0;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(480px, 1.05fr);
}

.login-hero {
  position: relative;
  padding: 56px;
  color: #fff;
  background:
    linear-gradient(rgba(5, 24, 43, 0.78), rgba(5, 24, 43, 0.72)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='900' viewBox='0 0 1200 900'%3E%3Crect width='1200' height='900' fill='%230b3858'/%3E%3Cpath d='M0 610 C150 530 270 680 420 600 C570 520 710 630 860 540 C1000 456 1090 520 1200 430 L1200 900 L0 900 Z' fill='%230d6f8f' opacity='.55'/%3E%3Cpath d='M0 690 C210 590 360 745 540 640 C720 535 900 680 1200 520 L1200 900 L0 900 Z' fill='%23d5a545' opacity='.28'/%3E%3Cg stroke='%23ffffff' stroke-opacity='.12' stroke-width='2'%3E%3Cpath d='M120 160h280v90H120zM470 110h210v140H470zM760 170h260v80H760z'/%3E%3Cpath d='M180 250v190M530 250v260M900 250v220'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.login-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: #f2cf80;
  font-size: 13px;
  font-weight: 700;
}

.login-hero h1 {
  max-width: 680px;
  margin: 26px 0 18px;
  font-size: 52px;
  line-height: 1.12;
}

.login-hero p {
  max-width: 620px;
  margin: 0;
  color: #d0dee9;
  font-size: 18px;
  line-height: 1.8;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 40px;
}

.hero-stat {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.hero-stat strong {
  display: block;
  font-size: 30px;
  color: #fff;
}

.hero-stat span {
  color: #c8d7e3;
  font-size: 13px;
}

.login-panel-wrap {
  display: grid;
  place-items: center;
  padding: 40px;
}

.login-card {
  width: min(430px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-card.wide-card {
  width: min(760px, 100%);
}

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

.role-card {
  display: grid;
  gap: 8px;
  min-height: 168px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.role-card:hover {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(13, 111, 143, 0.1);
}

.role-card strong {
  font-size: 19px;
  color: var(--brand);
}

.role-card span {
  color: var(--muted);
  font-size: 13px;
}

.role-card em {
  color: #34465b;
  font-style: normal;
  line-height: 1.55;
}

.login-card h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.login-card .hint {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.7;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.field label {
  color: #34465b;
  font-size: 13px;
  font-weight: 700;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.input,
.select {
  height: 40px;
  padding: 0 11px;
}

.textarea {
  min-height: 108px;
  padding: 11px;
  resize: vertical;
  line-height: 1.65;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(13, 111, 143, 0.12);
}

.demo-account {
  margin-top: 16px;
  padding: 12px;
  border: 1px dashed #bdd1df;
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel-2);
  font-size: 13px;
  line-height: 1.7;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}

.btn:hover {
  background: #073f64;
}

.btn.secondary {
  background: #e8f0f6;
  color: var(--brand);
}

.btn.secondary:hover {
  background: #dce9f2;
}

.btn.ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.btn.warn {
  background: var(--orange);
}

.btn.success {
  background: var(--green);
}

.btn.full {
  width: 100%;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

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

.sidebar {
  background: #09243b;
  color: #dce8f1;
  padding: 20px 14px;
}

.brand {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--accent), #f0ce7b);
  color: #102235;
  font-weight: 900;
}

.brand strong {
  display: block;
  color: #fff;
  font-size: 15px;
}

.brand span {
  color: #9fb5c8;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 4px;
  margin-top: 16px;
}

.nav button {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 7px;
  background: transparent;
  color: #cbd9e4;
  cursor: pointer;
  text-align: left;
}

.nav button:hover,
.nav button.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.main {
  min-width: 0;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
}

.topbar h1 {
  margin: 0;
  font-size: 19px;
}

.topbar .sub {
  color: var(--muted);
  font-size: 13px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--brand);
  font-weight: 800;
}

.content {
  min-width: 0;
  padding: 22px;
  overflow: auto;
}

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

.step {
  min-height: 52px;
  padding: 9px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.step strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.step.done {
  border-color: #bee0d0;
  background: #effaf5;
}

.step.current {
  border-color: #a9cce0;
  background: #eaf5fb;
  box-shadow: inset 0 0 0 1px #a9cce0;
}

.grid {
  display: grid;
  gap: 14px;
}

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

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

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

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

.seg {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.seg strong,
.seg span {
  display: block;
}

.seg span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  box-shadow: 0 8px 20px rgba(18, 38, 63, 0.05);
}

.panel.pad {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-size: 17px;
}

.panel-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.panel-body {
  padding: 16px;
}

.metric {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 30px;
  line-height: 1.1;
}

.metric small {
  color: var(--green);
  font-size: 12px;
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: #42556a;
  background: #f2f6f9;
  font-weight: 800;
}

tr:hover td {
  background: #fbfdfe;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #edf3f7;
  color: #4c6075;
  font-size: 12px;
  font-weight: 700;
}

.tag.green {
  background: #e8f7f0;
  color: var(--green);
}

.tag.orange {
  background: #fff1e7;
  color: var(--orange);
}

.tag.red {
  background: #fdecea;
  color: var(--red);
}

.tag.blue {
  background: #e6f2fa;
  color: var(--brand);
}

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

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

.dropzone {
  border: 2px dashed #b9cfdf;
  border-radius: 9px;
  padding: 22px;
  background: #f8fbfd;
}

.dropzone strong {
  display: block;
  margin-bottom: 6px;
}

.dropzone p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

.question-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.question-card + .question-card {
  margin-top: 10px;
}

.options {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.option:hover {
  background: #f7fbfd;
}

.score-box {
  display: grid;
  grid-template-columns: 90px 1fr 70px;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.bar {
  height: 9px;
  border-radius: 999px;
  background: #e8eef3;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-2), var(--accent));
}

.report-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--line);
}

.report-title h2 {
  margin: 0 0 8px;
  font-size: 25px;
}

.report-title p {
  margin: 0;
  color: var(--muted);
}

.report-section {
  margin-top: 16px;
}

.report-section h3 {
  margin: 0 0 10px;
}

.word-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.word-toolbar {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #f2f6f9;
}

.word-area {
  width: 100%;
  min-height: 340px;
  border: 0;
  padding: 18px;
  outline: none;
  resize: vertical;
  line-height: 1.85;
  font: inherit;
}

.word-preview {
  min-height: 180px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  line-height: 1.85;
}

.expert-matrix {
  display: grid;
  gap: 14px;
}

.dimension-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.dimension-block h3 {
  margin: 0;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  background: #edf5fa;
  color: var(--brand);
  font-size: 15px;
}

.score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 12px;
  align-items: center;
  padding: 10px 13px;
  border-bottom: 1px solid #eef3f7;
}

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

.score-row div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.score-row strong {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #f3f7fa;
  color: var(--brand);
  font-size: 12px;
}

.score-row span {
  line-height: 1.55;
}

.small-select {
  height: 34px;
  padding: 0 8px;
}

.customer-report {
  overflow: auto;
}

.customer-report table {
  border: 1px solid #aebdca;
  background: #fff;
}

.customer-report th,
.customer-report td {
  border: 1px solid #aebdca;
  padding: 12px 11px;
  vertical-align: middle;
}

.customer-report th {
  width: 118px;
  background: #eef3f7;
  color: #26384b;
  text-align: center;
}

.customer-report td {
  min-width: 130px;
  line-height: 1.75;
}

.hint-text {
  color: var(--muted);
  font-size: 13px;
}

.list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.8;
}

.empty {
  padding: 28px;
  border: 1px dashed #c9d8e3;
  border-radius: 8px;
  color: var(--muted);
  background: #fbfdfe;
  text-align: center;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  padding: 12px 14px;
  border-radius: 8px;
  background: #102235;
  color: #fff;
  box-shadow: var(--shadow);
  animation: toast 2.2s ease forwards;
}

@keyframes toast {
  0% { transform: translateY(12px); opacity: 0; }
  12%, 82% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}

@media (max-width: 1120px) {
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-hero {
    min-height: 420px;
  }
  .app-shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }
  .brand {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .brand div:last-child,
  .nav button span:last-child {
    display: none;
  }
  .workflow {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .grid.cols-4,
  .grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .login-hero {
    padding: 32px 24px;
  }
  .login-hero h1 {
    font-size: 34px;
  }
  .hero-stats,
  .role-grid,
  .seg-grid,
  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .workflow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    padding: 14px;
  }
  .score-row {
    grid-template-columns: 1fr;
  }
  .content {
    padding: 14px;
  }
}
