:root {
  color-scheme: light;
  --bg: #eef2f3;
  --panel: #ffffff;
  --panel-soft: #f7faf9;
  --ink: #16201d;
  --muted: #66736f;
  --line: #dce5e2;
  --line-strong: #c7d4d0;
  --primary: #087f6f;
  --primary-dark: #056257;
  --primary-soft: #e4f4f1;
  --blue: #2d68b2;
  --blue-soft: #e8f0fb;
  --amber: #a66300;
  --amber-soft: #fff3dc;
  --red: #b3261e;
  --red-soft: #fdeceb;
  --shadow: 0 18px 48px rgba(34, 49, 45, 0.12);
  --radius: 8px;
  --sidebar-width: 268px;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(8, 127, 111, 0.08), transparent 36%),
    linear-gradient(225deg, rgba(45, 104, 178, 0.08), transparent 32%),
    var(--bg);
  color: var(--ink);
}

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

button {
  border: 0;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 520px);
  align-items: stretch;
}

.login-visual {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px;
  background:
    linear-gradient(135deg, rgba(8, 127, 111, 0.82), rgba(16, 54, 49, 0.94)),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 24%);
  color: #fff;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.brand-title {
  margin: 0;
  font-size: 20px;
  font-weight: 750;
  line-height: 1.2;
}

.brand-subtitle {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

.login-copy {
  max-width: 660px;
  padding-bottom: 8vh;
}

.login-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 4.8vw, 64px);
  line-height: 1.05;
  letter-spacing: 0;
}

.login-copy p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.8;
}

.login-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 580px;
}

.metric-tile {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 16px;
}

.metric-value {
  display: block;
  font-size: 25px;
  font-weight: 800;
}

.metric-label {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
}

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

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

.login-panel h2 {
  margin: 0;
  font-size: 24px;
}

.login-panel-heading {
  margin-top: 24px;
}

.login-panel-heading > p {
  margin: 8px 0 22px;
  color: var(--muted);
  line-height: 1.7;
}

.login-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: var(--radius);
}

.login-mode-switch button {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.login-mode-switch button.active {
  background: var(--panel);
  color: var(--primary-dark);
  box-shadow: 0 1px 5px rgba(34, 49, 45, 0.12);
}

.credential-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
}

.credential-strip strong {
  color: var(--ink);
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: #10231f;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar .brand-lockup {
  align-items: flex-start;
}

.sidebar .brand-mark {
  flex: 0 0 auto;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.sidebar nav {
  display: grid;
  gap: 6px;
}

.nav-button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.74);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

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

.nav-button svg,
.icon-button svg,
.button svg,
.ghost-button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  line-height: 1.6;
}

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

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

.page-heading h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.page-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.user-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
}

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

.user-meta {
  display: grid;
  gap: 2px;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
}

.user-role {
  color: var(--muted);
  font-size: 12px;
}

.content {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 28px;
}

.section {
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 14px;
}

.section-header h2 {
  margin: 0;
  font-size: 18px;
}

.section-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.stat-card,
.panel,
.list-item,
.review-card,
.table-wrap,
.empty-state {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat-card {
  padding: 18px;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.stat-number {
  margin-top: 16px;
  font-size: 32px;
  line-height: 1;
  font-weight: 830;
}

.stat-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
  align-items: start;
}

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

.panel {
  padding: 20px;
}

.panel h3 {
  margin: 0 0 16px;
  font-size: 16px;
}

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

.form-grid .span-2 {
  grid-column: span 2;
}

.field {
  display: grid;
  gap: 7px;
}

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

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: var(--radius);
  color: var(--ink);
  outline: 0;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.6;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8, 127, 111, 0.13);
}

.file-drop {
  min-height: 118px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  background: var(--panel-soft);
  border-radius: var(--radius);
  text-align: center;
}

.file-drop input {
  border: 0;
  padding: 0;
  min-height: auto;
  background: transparent;
}

.file-drop strong {
  display: block;
  margin-bottom: 8px;
}

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

.upload-progress {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: var(--radius);
}

.upload-progress[hidden] {
  display: none;
}

.upload-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.upload-progress-copy strong {
  color: var(--primary-dark);
}

.upload-progress progress {
  width: 100%;
  height: 10px;
  border: 0;
  border-radius: 5px;
  overflow: hidden;
  background: var(--line);
}

.upload-progress progress::-webkit-progress-bar {
  background: var(--line);
}

.upload-progress progress::-webkit-progress-value {
  background: var(--primary);
}

.upload-progress progress::-moz-progress-bar {
  background: var(--primary);
}

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

.button,
.ghost-button,
.danger-button,
.icon-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
}

.button {
  background: var(--primary);
  color: #fff;
}

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

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

.ghost-button:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.danger-button {
  background: var(--red-soft);
  color: var(--red);
}

.danger-button:hover {
  background: #f9d8d5;
}

.icon-button {
  width: 40px;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.icon-button:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  background: var(--panel-soft);
  color: #31413d;
  font-weight: 800;
  position: sticky;
  top: 0;
  z-index: 1;
}

tr:last-child td {
  border-bottom: 0;
}

.cell-main {
  font-weight: 760;
}

.cell-sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 720;
}

.badge.green {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.badge.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.badge.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge.red {
  background: var(--red-soft);
  color: var(--red);
}

.badge.gray {
  background: #eef1f1;
  color: var(--muted);
}

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

.list-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
}

.list-item-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.list-item-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.video-panel {
  display: grid;
  gap: 12px;
}

.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0f1715;
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #0f1715;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 28px;
  text-align: center;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.empty-state p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.check-card {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: var(--radius);
  cursor: pointer;
}

.check-card input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.check-card strong {
  display: block;
  font-size: 13px;
}

.check-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

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

.review-card {
  width: 100%;
  padding: 14px;
  text-align: left;
  cursor: pointer;
}

.review-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8, 127, 111, 0.1);
}

.review-card h3 {
  margin: 0;
  font-size: 14px;
}

.review-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.score-box {
  min-height: 156px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: var(--radius);
}

.score-box label {
  display: block;
  color: #31413d;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.score-box input {
  width: 100%;
  min-height: 38px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
  font-weight: 800;
}

.score-hint {
  color: var(--muted);
  font-size: 11px;
}

.score-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fbf7ef;
  border-radius: var(--radius);
}

.score-total strong {
  font-size: 28px;
  color: var(--amber);
}

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

.score-actions {
  margin-top: 16px;
}

.toast-region {
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 100;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 40px));
}

.toast {
  padding: 13px 14px;
  border-radius: var(--radius);
  color: #fff;
  background: #263633;
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.5;
}

.toast.error {
  background: var(--red);
}

.toast.success {
  background: var(--primary-dark);
}

.muted {
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}

.hide {
  display: none !important;
}

@media (max-width: 1120px) {
  .stats-grid,
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-2,
  .review-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 420px;
    padding: 34px 22px;
  }

  .login-metrics {
    grid-template-columns: 1fr;
  }

  .login-panel-wrap {
    padding: 24px 16px;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }

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

  .sidebar-footer {
    display: none;
  }

  .topbar {
    position: static;
    flex-direction: column;
    align-items: stretch;
    padding: 18px 16px;
  }

  .user-bar {
    justify-content: space-between;
  }

  .content {
    padding: 18px 16px 26px;
  }

  .form-grid,
  .expert-checks {
    grid-template-columns: 1fr;
  }

  .form-grid .span-2 {
    grid-column: auto;
  }

  .score-grid,
  .stats-grid,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .section-header,
  .list-item,
  .score-total {
    flex-direction: column;
    align-items: stretch;
  }
}
