* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --page-bg: #EEF0F9;
  --sidebar-bg: #4F46E5;
  --sidebar-accent: #4F46E5;
}
body { font-family: "Microsoft YaHei", "微软雅黑", sans-serif; font-size: 13px; background: var(--page-bg); color: #1e1e2d; }
a { color: #4F46E5; text-decoration: none; }

/* ── Layout ── */
.layout { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: 200px; flex-shrink: 0; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  border-radius: 0 24px 24px 0;
  box-shadow: none;
}
.sidebar-logo {
  padding: 22px 18px 18px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.sidebar-logo img { width: 30px; height: 30px; object-fit: contain; border-radius: 8px; }
.sidebar-nav { flex: 1; padding: 14px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav::-webkit-scrollbar { width: 0; }
.sidebar-footer { padding: 14px 12px 20px; border-top: 1px solid rgba(255,255,255,0.08); }

.nav-label { padding: 10px 8px 4px; font-size: 10px; color: rgba(255,255,255,0.35); letter-spacing: 0.8px; font-weight: 700; text-transform: uppercase; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 12px;
  font-size: 13px; color: rgba(255,255,255,0.6);
  cursor: pointer; transition: all 0.15s; text-decoration: none;
  position: relative;
}
.nav-item:not(.active):hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
  z-index: 4;
}
.nav-item.active,
a.nav-section-title.as-link.active {
  background: var(--page-bg);
  color: var(--sidebar-bg);
  font-weight: 600;
  border-radius: 12px 0 0 12px;
  margin-right: -12px;
  padding-right: 26px;
  box-shadow: none;
  position: relative;
  z-index: 1;
}
.nav-item.active i,
a.nav-section-title.as-link.active i { color: var(--sidebar-bg); }
.nav-item.active::after,
a.nav-section-title.as-link.active::after {
  content: '';
  position: absolute;
  right: 0; top: -24px;
  width: 24px; height: 24px;
  background: var(--sidebar-bg);
  border-bottom-right-radius: 16px;
  box-shadow: 8px 8px 0 8px var(--page-bg);
  pointer-events: none;
  z-index: 2;
}
.nav-item.active::before,
a.nav-section-title.as-link.active::before {
  content: '';
  position: absolute;
  right: 0; bottom: -24px;
  width: 24px; height: 24px;
  background: var(--sidebar-bg);
  border-top-right-radius: 16px;
  box-shadow: 8px -8px 0 8px var(--page-bg);
  pointer-events: none;
  z-index: 2;
}
.nav-item i { font-size: 16px; width: 18px; text-align: center; }
.nav-item.sub { padding-left: 36px; font-size: 12px; }
.nav-item.sub.active { padding-left: 36px; color: var(--sidebar-bg); }
.nav-item.sub.active i { color: var(--sidebar-bg); }

.nav-section-title {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 12px;
  font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.8);
  transition: all 0.15s; background: transparent; border: none; cursor: default;
  position: relative;
}
.nav-section-title i { font-size: 16px; width: 18px; text-align: center; color: rgba(255,255,255,0.5); }
.nav-section-title.active { color: #fff; background: rgba(255,255,255,0.08); z-index: 3; }
.nav-section-title.active i { color: #a5b4fc; }
.nav-section-title.active:not(.as-link)::before {
  content: '';
  width: 3px;
  height: 18px;
  border-radius: 999px;
  background: #A5B4FC;
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
}
a.nav-section-title.as-link { cursor: pointer; text-decoration: none; }
a.nav-section-title.as-link:not(.active):hover { background: rgba(255,255,255,0.08); z-index: 4; }

.nav-item.nav-main {
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.85);
}
.nav-item.nav-main.active { background: var(--page-bg); color: var(--sidebar-bg); }

/* ── Main ── */
.main-wrap { margin-left: 200px; flex: 1; width: calc(100% - 200px); display: flex; flex-direction: column; min-height: 100vh; background: var(--page-bg); }
.topbar {
  background: rgba(255,255,255,0.80); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 0 28px; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.topbar-left { font-size: 12px; color: #9ca3af; }
.topbar-right { display: flex; align-items: center; gap: 16px; font-size: 13px; color: #6b7280; }
.topbar-right a { color: #9ca3af; font-size: 12px; transition: color 0.15s; }
.topbar-right a:hover { color: #4F46E5; }
.main-content { padding: 24px 28px; flex: 1; }

/* ── Cards ── */
.card {
  background: #fff; border: none; border-radius: 18px;
  margin-bottom: 18px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05), 0 0 1px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.08), 0 0 1px rgba(0,0,0,0.04); }
.card-head {
  padding: 14px 18px; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #f3f4f6;
}
.card-head.blue  { background: linear-gradient(135deg, #EEF2FF, #E0E7FF); color: #3730A3; }
.card-head.amber { background: linear-gradient(135deg, #FFFBEB, #FEF3C7); color: #92400E; }
.card-head.green { background: linear-gradient(135deg, #ECFDF5, #D1FAE5); color: #065F46; }
.card-body { padding: 18px; }

/* 彩色左边框 */
.card.border-blue   { border-left: 4px solid #6366F1; }
.card.border-teal   { border-left: 4px solid #14B8A6; }
.card.border-green  { border-left: 4px solid #22C55E; }
.card.border-amber  { border-left: 4px solid #F59E0B; }
.card.border-red    { border-left: 4px solid #EF4444; }
.card.border-purple { border-left: 4px solid #A855F7; }
.card.border-pink   { border-left: 4px solid #EC4899; }
.card.border-gray   { border-left: 4px solid #9CA3AF; }

.hero-band {
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  border: none; border-radius: 18px; padding: 20px 24px; margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(99,102,241,0.1);
}
.hero-title { font-size: 22px; font-weight: 800; color: #1e1e2d; margin-bottom: 6px; }
.hero-sub { font-size: 12px; color: #6b7280; line-height: 1.6; }

.section-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.section-card {
  background: #fff; border: none; border-radius: 18px;
  padding: 22px; min-height: 270px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s, transform 0.2s;
}
.section-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.09); transform: translateY(-2px); }
.section-kicker { font-size: 11px; color: #6366F1; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.section-title { font-size: 20px; font-weight: 800; color: #1e1e2d; display: flex; align-items: center; gap: 8px; }
.primary-module-title { font-size: 22px; color: #1e1e2d; }
.primary-module-title i { font-size: 24px; color: #4F46E5; }
.section-meta { font-size: 12px; color: #9ca3af; line-height: 1.6; }
.metric-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.metric { background: #F9FAFB; border-radius: 12px; padding: 12px 14px; }
.metric-label { font-size: 11px; color: #9ca3af; }
.metric-value { font-size: 20px; font-weight: 800; color: #1e1e2d; margin-top: 2px; }
.list-lines { display: flex; flex-direction: column; gap: 8px; min-height: 88px; }
.list-line { padding: 8px 0; border-bottom: 1px solid #f3f4f6; font-size: 12px; color: #374151; }
.list-line:last-child { border-bottom: 0; }
.list-line a { color: inherit; }
.empty-state { color: #d1d5db; font-size: 12px; text-align: center; padding: 20px 0; }

/* ── Tabs ── */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tab {
  padding: 7px 16px; font-size: 12px; border-radius: 10px;
  cursor: pointer; color: #6b7280; border: 1.5px solid #E5E7EB;
  background: #fff; transition: all 0.15s; font-weight: 500;
}
.tab:hover { border-color: #6366F1; color: #4F46E5; background: #EEF2FF; }
.tab.active {
  background: #4F46E5; color: #fff; border-color: #4F46E5;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3); font-weight: 600;
}

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th {
  text-align: left; padding: 10px 12px;
  border-bottom: 2px solid #F3F4F6; color: #9ca3af;
  font-weight: 600; white-space: nowrap; background: #FAFAFA;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px;
}
td { padding: 10px 12px; border-bottom: 1px solid #F9FAFB; color: #374151; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #FAFBFF; }

/* ── Badges ── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-uploaded  { background: #F3F4F6; color: #6b7280; }
.badge-reviewed  { background: #EEF2FF; color: #4338CA; }
.badge-watching  { background: #FFFBEB; color: #92400E; }
.badge-abandoned { background: #FEF2F2; color: #991B1B; }
.badge-bidding   { background: #ECFDF5; color: #065F46; }
.badge-completed { background: #EEF2FF; color: #3730A3; }
.badge-archived  { background: #F9FAFB; color: #4b5563; }
.badge-green  { background: #ECFDF5; color: #065F46; }
.badge-blue   { background: #EEF2FF; color: #4338CA; }
.badge-amber  { background: #FFFBEB; color: #92400E; }
.badge-red    { background: #FEF2F2; color: #991B1B; }
.badge-gray   { background: #F3F4F6; color: #6b7280; }

/* ── Buttons ── */
.btn {
  display: inline-block; padding: 7px 18px; border-radius: 10px;
  font-size: 12px; border: 1.5px solid; cursor: pointer;
  line-height: 1.4; font-weight: 600; transition: all 0.15s;
}
.btn-primary {
  background: #4F46E5; color: #fff; border-color: #4F46E5;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}
.btn-primary:hover { background: #4338CA; border-color: #4338CA; box-shadow: 0 6px 16px rgba(79,70,229,0.4); }
.btn-default { background: #fff; color: #374151; border-color: #E5E7EB; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.btn-default:hover { background: #F9FAFB; border-color: #D1D5DB; }
.btn-danger  { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.btn-danger:hover { background: #FEE2E2; }
.btn-amber   { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }
.btn-sm { padding: 4px 10px; font-size: 11px; border-radius: 7px; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-label { font-size: 12px; color: #374151; margin-bottom: 5px; display: block; font-weight: 600; }
.form-label .req { color: #EF4444; }
input[type=text], input[type=password], select, textarea {
  width: 100%; padding: 8px 12px; border: 1.5px solid #E5E7EB; border-radius: 10px;
  font-size: 12px; font-family: inherit; color: #1e1e2d; background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type=text]:focus, input[type=password]:focus, select:focus, textarea:focus {
  outline: none; border-color: #6366F1; box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
input.auto-fill { background: #EEF2FF; border-color: #A5B4FC; color: #3730A3; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; }
.form-grid .full { grid-column: 1 / -1; }

/* ── Upload zone ── */
.upload-zone {
  border: 2px dashed #A5B4FC; border-radius: 14px; background: #EEF2FF;
  padding: 32px; text-align: center; cursor: pointer; transition: all 0.2s;
}
.upload-zone:hover, .upload-zone.dragover { border-color: #4F46E5; background: #E0E7FF; }
.upload-zone-icon { font-size: 36px; color: #4F46E5; margin-bottom: 8px; }
.upload-zone-title { font-size: 13px; font-weight: 600; color: #4338CA; margin-bottom: 4px; }
.upload-zone-sub { font-size: 11px; color: #818CF8; }
.upload-zone-rule { font-size: 11px; color: #EF4444; margin-top: 6px; }

/* ── Progress nodes ── */
.progress-nodes { padding: 4px 0; }
.p-node { display: flex; gap: 0; }
.p-node-left { display: flex; flex-direction: column; align-items: center; width: 44px; flex-shrink: 0; }
.p-node-dot { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.p-node-dot.done   { background: #4F46E5; color: #fff; }
.p-node-dot.active { background: #6366F1; color: #fff; box-shadow: 0 4px 12px rgba(99,102,241,0.4); }
.p-node-dot.todo   { background: #F3F4F6; color: #9CA3AF; border: 2px solid #E5E7EB; }
.p-node-line { width: 2px; flex: 1; min-height: 20px; background: #E5E7EB; margin: 2px 0; }
.p-node-line.done { background: #4F46E5; }
.p-node-right { flex: 1; padding: 0 0 20px 12px; }
.p-node-title { font-size: 13px; font-weight: 600; line-height: 30px; display: flex; align-items: center; gap: 8px; }
.p-node-card { border: 1.5px solid #E5E7EB; border-radius: 10px; padding: 10px 14px; background: #FAFAFA; margin-top: 6px; }
.p-node-card.active { border-color: #A5B4FC; background: #EEF2FF; }

/* ── Pagination ── */
.pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; flex-wrap: wrap; gap: 8px; }
.pagination-info { font-size: 12px; color: #9ca3af; display: flex; align-items: center; gap: 6px; }
.pagination-btns { display: flex; gap: 4px; }
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 10px; border: 1.5px solid #E5E7EB;
  font-size: 12px; cursor: pointer; color: #6b7280; background: #fff;
  transition: all 0.15s; font-weight: 500;
}
.page-btn:hover { border-color: #6366F1; color: #4F46E5; background: #EEF2FF; }
.page-btn.active { background: #4F46E5; color: #fff; border-color: #4F46E5; box-shadow: 0 2px 8px rgba(79,70,229,0.3); }
.page-btn.disabled { opacity: 0.4; cursor: default; pointer-events: none; }

/* ── Step bar ── */
.step-bar { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 22px; }
.step { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.step-num { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.step.active .step-num { background: #4F46E5; color: #fff; box-shadow: 0 2px 8px rgba(79,70,229,0.4); }
.step.done .step-num   { background: #22C55E; color: #fff; }
.step.todo .step-num   { background: #F3F4F6; color: #9CA3AF; border: 2px solid #E5E7EB; }
.step.active .step-label { color: #4338CA; font-weight: 700; }
.step.todo .step-label   { color: #9ca3af; }
.step-line { width: 40px; height: 2px; background: #E5E7EB; margin: 0 6px; border-radius: 1px; }

/* ── Info grid ── */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; font-size: 12px; }
.info-grid .full { grid-column: 1 / -1; }
.info-item { display: flex; gap: 8px; }
.info-label { color: #9ca3af; white-space: nowrap; }
.info-val { color: #1e1e2d; font-weight: 600; }

/* ── Modal ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(30,30,45,0.45); z-index: 200;
  align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
}
.modal-overlay.show { display: flex; }
.modal {
  background: #fff; border-radius: 20px; padding: 26px;
  width: 460px; max-width: 96vw;
  box-shadow: 0 24px 64px rgba(0,0,0,0.14);
}
.modal-title { font-size: 16px; font-weight: 700; margin-bottom: 18px; color: #1e1e2d; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ── Alert ── */
.alert { padding: 11px 16px; border-radius: 12px; font-size: 12px; margin-bottom: 14px; border-left: 3px solid; font-weight: 500; }
.alert-info    { background: #EEF2FF; color: #3730A3; border-color: #6366F1; }
.alert-success { background: #ECFDF5; color: #065F46; border-color: #22C55E; }
.alert-danger  { background: #FEF2F2; color: #991B1B; border-color: #EF4444; }
.alert-amber   { background: #FFFBEB; color: #92400E; border-color: #F59E0B; }

/* ── Misc ── */
.text-muted { color: #9ca3af; }
.text-red   { color: #EF4444; }
.text-blue  { color: #4F46E5; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.flex  { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.mono  { font-family: monospace; }
