/* ==========================================================================
   浦东机场 T3 项目跟踪系统 · 界面样式
   ========================================================================== */
:root {
  --bg: #f2f7f5;
  --bg-soft: #f8fbfa;
  --surface: #ffffff;
  --ink: #102a28;
  --ink-2: #334d4a;
  --muted: #6b817e;
  --muted-2: #93a8a4;
  --line: #dfeae6;
  --line-soft: #ecf3f0;
  --navy: #0c2b29;
  --navy-2: #175550;
  --teal: #33756f;
  --teal-2: #57afa8;
  --accent: #33756f;
  --sage: #57afa8;
  --blue: #2563eb;
  --indigo: #4f46e5;
  --amber: #d97706;
  --orange: #ea580c;
  --red: #dc2626;
  --green: #16a34a;
  --purple: #7c3aed;
  --cyan: #0891b2;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 36, 56, .04), 0 10px 30px rgba(15, 36, 56, .055);
  --shadow-lg: 0 24px 70px rgba(8, 22, 35, .22);
  --num: "Bahnschrift", "DIN Alternate", "Segoe UI", "Microsoft YaHei UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background:
    radial-gradient(1000px 500px at 82% -8%, rgba(87, 175, 168, .12), transparent 60%),
    radial-gradient(900px 480px at 18% 0%, rgba(51, 117, 111, .06), transparent 55%),
    var(--bg);
  font: 14px/1.55 "Microsoft YaHei UI", "PingFang SC", "Segoe UI", "Hiragino Sans GB", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

@supports (padding: max(0px)) {
  .sidebar-foot { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .app-footer { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .auth-screen { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: rgba(87, 175, 168, .28); }

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.svg-sprite symbol { fill: none; stroke: currentColor; }

:focus-visible {
  outline: 2px solid rgba(13, 148, 136, .65);
  outline-offset: 2px;
}

.app-shell { display: flex; min-height: 100vh; }
body.drawer-open { overflow: hidden; }

/* --------------------------------------------------------------------------
   侧边栏
   -------------------------------------------------------------------------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: 254px;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  color: #c4d2df;
  background:
    radial-gradient(520px 260px at 10% 0%, rgba(87, 175, 168, .17), transparent 62%),
    radial-gradient(420px 300px at 100% 40%, rgba(51, 117, 111, .16), transparent 60%),
    linear-gradient(180deg, #0b2422 0%, #103b37 55%, #081d1c 100%);
  border-right: 1px solid rgba(148, 163, 184, .12);
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .045) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .6), transparent 55%);
}
.sidebar > * { position: relative; z-index: 1; }

.brand { display: flex; align-items: center; gap: 11px; padding: 2px 6px 0; }
.brand-mark {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(255, 255, 255, .08);
  overflow: hidden;
}
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { color: #f1f7fb; font-size: 16px; letter-spacing: .08em; }
.brand-text span { color: #7f96aa; font-size: 8px; letter-spacing: .2em; margin-top: 4px; }
.sidebar-close { display: none !important; margin-left: auto; color: #cbd5e1; border-color: rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); }
@media (max-width: 980px) { .sidebar-close { display: inline-flex !important; } }

.project-chip {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 22px 2px 4px;
  padding: 12px 12px 11px;
  border: 1px solid rgba(167, 224, 218, .16);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(87, 175, 168, .11), rgba(51, 117, 111, .045));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.project-chip b { display: block; color: #e8f1f7; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }
.project-chip small { display: block; color: #86a0b4; font-size: 10.5px; margin-top: 3px; }
.pulse-dot {
  width: 7px; height: 7px; margin-top: 5px; flex: none;
  border-radius: 50%;
  background: #57afa8;
  box-shadow: 0 0 0 4px rgba(87, 175, 168, .13);
  animation: pulse 2.8s ease-in-out infinite;
}

.nav { display: flex; flex-direction: column; margin-top: 14px; }
.nav-label {
  margin: 16px 12px 7px;
  color: #668097;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 43px;
  padding: 0 12px;
  margin: 2px 0;
  border-radius: 10px;
  color: #aebfd0;
  font-size: 13px;
  font-weight: 500;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.nav-item .icon { width: 17px; height: 17px; color: #7896ae; transition: color .16s ease; }
.nav-item:hover { color: #f1f7fb; background: rgba(255, 255, 255, .055); }
.nav-item:hover .icon { color: #9fd8d2; }
.nav-item.active {
  color: #f0fffd;
  background: linear-gradient(90deg, rgba(87, 175, 168, .18), rgba(87, 175, 168, .015));
  box-shadow: inset 3px 0 0 #57afa8;
}
.nav-item.active .icon { color: #a7e0da; }
.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #dbe7f1;
  font-family: var(--num);
  font-size: 11px;
  font-weight: 600;
}
.nav-badge.show { display: inline-flex; }
.nav-badge.hot { background: #dc2626; color: #fff; box-shadow: 0 0 0 3px rgba(220, 38, 38, .16); }
.nav-badge.muted { background: rgba(255, 255, 255, .07); color: #93a9bc; }

.sidebar-foot { margin-top: auto; padding: 18px 4px 2px; border-top: 1px solid rgba(148, 163, 184, .14); }
.baseline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.baseline span { color: #7890a5; font-size: 10.5px; }
.baseline b { color: #d7e4ee; font-family: var(--num); font-size: 12px; font-weight: 600; letter-spacing: .03em; }
.user-field { display: block; }
.user-field > span { display: block; color: #7890a5; font-size: 10.5px; margin-bottom: 5px; }
.user-select {
  width: 100%;
  height: 34px;
  padding: 0 9px;
  color: #e4eef6;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 8px;
  font-size: 12px;
  outline: none;
}
.user-select option { color: #102437; }
.sync-line { display: flex; align-items: center; gap: 6px; margin-top: 10px; color: #7f97ab; font-size: 10.5px; }
.sync-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .12); }
.sync-dot.warn { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .13); }
.sync-dot.bad { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .13); }

.sidebar-scrim { display: none; }

/* --------------------------------------------------------------------------
   主区域 / 顶栏
   -------------------------------------------------------------------------- */
.main { flex: 1; min-width: 0; margin-left: 254px; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 34px;
  background: rgba(242, 246, 251, .84);
  border-bottom: 1px solid rgba(225, 233, 241, .8);
  backdrop-filter: blur(14px) saturate(140%);
}
.page-heading { min-width: 0; }
.page-heading h1 { font-size: 21px; font-weight: 650; letter-spacing: -.01em; line-height: 1.25; }
.page-heading p { margin-top: 3px; color: var(--muted); font-size: 11.5px; letter-spacing: .01em; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.mobile-menu { display: none; }

.content { width: 100%; max-width: 1660px; margin: 0 auto; padding: 24px 34px 44px; flex: 1; }
.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 34px 20px;
  color: var(--muted-2);
  font-size: 10.5px;
  border-top: 1px solid rgba(225, 233, 241, .7);
}

/* --------------------------------------------------------------------------
   通用组件
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 20px 0; }
.card-head h3 { font-size: 14px; font-weight: 650; letter-spacing: .01em; }
.card-head p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.card-body { padding: 14px 20px 20px; }
.card-body.flush { padding: 10px 0 0; }
.link {
  display: inline-flex; align-items: center; gap: 3px;
  color: var(--accent); font-size: 11.5px; font-weight: 600;
  background: none; border: 0; padding: 2px 0; white-space: nowrap;
}
.link:hover { color: var(--teal); }
.link .icon { width: 13px; height: 13px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px; font-weight: 550;
  white-space: nowrap;
  transition: border-color .16s, box-shadow .16s, background .16s, transform .16s;
}
.btn .icon { width: 15px; height: 15px; }
.btn:hover { border-color: #c7d5e3; box-shadow: 0 3px 10px rgba(15, 36, 56, .07); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #33756f, #2d6863);
  box-shadow: 0 6px 16px rgba(51, 117, 111, .24);
}
.btn.primary:hover { background: linear-gradient(135deg, #2b6762, #245752); box-shadow: 0 8px 20px rgba(51, 117, 111, .3); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: rgba(15, 36, 56, .04); box-shadow: none; }
.btn.danger { color: var(--red); border-color: #fecaca; background: #fff7f7; }
.btn.danger:hover { background: #fef2f2; }
.btn.small { height: 30px; padding: 0 10px; font-size: 11.5px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  transition: .16s;
}
.icon-btn:hover { color: var(--ink); border-color: #c7d5e3; box-shadow: 0 3px 10px rgba(15, 36, 56, .06); }

.select {
  height: 36px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c8093' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  font-size: 12px;
  color: var(--ink-2);
  outline: none;
}
.select:focus { border-color: #7cc6bf; box-shadow: 0 0 0 3px rgba(87, 175, 168, .12); }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10.5px; font-weight: 600;
  white-space: nowrap;
  letter-spacing: .01em;
}
.pill .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.p-slate { color: #52677b; background: #f1f5f9; border-color: #e5ecf3; }
.p-blue { color: #1d4ed8; background: #eff6ff; border-color: #dbeafe; }
.p-indigo { color: #4338ca; background: #eef2ff; border-color: #e0e7ff; }
.p-amber { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.p-orange { color: #c2410c; background: #fff7ed; border-color: #fed7aa; }
.p-cyan { color: #0e7490; background: #ecfeff; border-color: #cffafe; }
.p-teal { color: #33756f; background: #f0fdfa; border-color: #ccfbf1; }
.p-green { color: #15803d; background: #f0fdf4; border-color: #dcfce7; }
.p-red { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.p-purple { color: #6d28d9; background: #f5f3ff; border-color: #ede9fe; }
.p-gray { color: #64748b; background: #f8fafc; border-color: #e2e8f0; }

.avatar {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border-radius: 13px;
  color: #fff;
  font-size: 16px; font-weight: 650;
  letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
.av-0 { background: linear-gradient(135deg, #33756f, #57afa8); }
.av-1 { background: linear-gradient(135deg, #1d4ed8, #38bdf8); }
.av-2 { background: linear-gradient(135deg, #6d28d9, #a78bfa); }
.av-3 { background: linear-gradient(135deg, #b45309, #f59e0b); }
.av-4 { background: linear-gradient(135deg, #be123c, #fb7185); }
.av-5 { background: linear-gradient(135deg, #33756f, #7cc6bf); }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 18px; gap: 6px; }
.empty-icon {
  width: 46px; height: 46px; margin-bottom: 4px;
  display: grid; place-items: center;
  border-radius: 14px;
  color: #7c93a8;
  background: #f2f6fa;
  border: 1px dashed #d7e2ec;
}
.empty-icon .icon { width: 22px; height: 22px; }
.empty-state h4 { font-size: 13px; font-weight: 600; }
.empty-state p { color: var(--muted); font-size: 11.5px; max-width: 340px; }
.empty-state .btn { margin-top: 8px; }

/* --------------------------------------------------------------------------
   总览
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 16px;
  padding: 26px 30px;
  border-radius: 20px;
  color: #e9f3f9;
  background:
    radial-gradient(520px 260px at 88% 10%, rgba(87, 175, 168, .30), transparent 62%),
    radial-gradient(460px 260px at 0% 100%, rgba(51, 117, 111, .24), transparent 60%),
    linear-gradient(118deg, #0b2422 0%, #134641 58%, #2b7a73 100%);
  box-shadow: 0 18px 45px rgba(11, 33, 53, .2);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .06) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(100deg, rgba(0, 0, 0, .8), transparent 78%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  right: -80px; bottom: -110px;
  width: 320px; height: 320px;
  border: 1px solid rgba(167, 224, 218, .16);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(167, 224, 218, .035), 0 0 0 72px rgba(167, 224, 218, .02);
  pointer-events: none;
}
.hero-main { position: relative; z-index: 1; min-width: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  color: #a7e0da;
  font-family: var(--num);
  font-size: 10px; font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: #57afa8; box-shadow: 0 0 0 4px rgba(87, 175, 168, .16); }
.hero h2 { margin-top: 9px; font-size: clamp(22px, 2.2vw, 29px); font-weight: 650; line-height: 1.32; letter-spacing: -.01em; }
.hero h2 em { font-style: normal; color: #c9f0eb; }
.hero-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 11px; color: #a9c0d1; font-size: 11.5px; }
.hero-sub .sep { color: #56748c; }
.hero-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border: 1px solid rgba(167, 224, 218, .2); border-radius: 5px; color: #c9f0eb; font-size: 10px; background: rgba(87, 175, 168, .07); }
.hero-side { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 26px; flex: none; }
.hero-stat { text-align: right; }
.hero-stat b { display: block; font-family: var(--num); font-size: 28px; font-weight: 600; line-height: 1; color: #f2fbfd; }
.hero-stat span { display: block; margin-top: 6px; color: #8fb0c5; font-size: 10.5px; }
.hero-stat.warn b { color: #fbbf24; }
.hero-badge {
  position: absolute; top: -6px; right: 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(87, 175, 168, .13);
  border: 1px solid rgba(167, 224, 218, .25);
  color: #c9f0eb;
  font-size: 9.5px;
  letter-spacing: .08em;
}

.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 13px; margin-bottom: 16px; }
.kpi {
  position: relative;
  display: flex; align-items: flex-start; gap: 11px;
  padding: 15px 15px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 36, 56, .035);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.kpi:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(15, 36, 56, .07); }
.kpi::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--kpi-color), transparent); opacity: .65; }
.kpi-icon {
  width: 35px; height: 35px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  color: var(--kpi-color);
  background: var(--kpi-bg);
}
.kpi-icon .icon { width: 17px; height: 17px; }
.kpi-body { min-width: 0; }
.kpi-label { color: var(--muted); font-size: 10.5px; letter-spacing: .02em; white-space: nowrap; }
.kpi-value { margin-top: 1px; font-family: var(--num); font-size: 27px; font-weight: 600; line-height: 1.15; letter-spacing: -.015em; }
.kpi-value small { font-family: inherit; font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.kpi-sub { margin-top: 3px; color: var(--muted); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tone-teal { --kpi-color: #33756f; --kpi-bg: #f0fdfa; }
.tone-blue { --kpi-color: #1d4ed8; --kpi-bg: #eff6ff; }
.tone-amber { --kpi-color: #b45309; --kpi-bg: #fffbeb; }
.tone-red { --kpi-color: #b91c1c; --kpi-bg: #fef2f2; }
.tone-purple { --kpi-color: #6d28d9; --kpi-bg: #f5f3ff; }
.tone-slate { --kpi-color: #475569; --kpi-bg: #f1f5f9; }

.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }

.section-card { display: flex; flex-direction: column; min-width: 0; }
.section-card .card-body { flex: 1; }

.focus-list { display: flex; flex-direction: column; margin: 1px 0 -2px; }
.focus-row {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 2px;
  border-bottom: 1px dashed var(--line-soft);
  cursor: pointer;
  transition: background .14s;
}
.focus-row:last-child { border-bottom: 0; }
.focus-row:hover { background: #f8fbfd; }
.focus-row:hover .focus-title { color: var(--teal); }
.priority-bar { width: 3px; height: 30px; flex: none; border-radius: 4px; }
.priority-bar.high { background: linear-gradient(180deg, #ef4444, #f87171); }
.priority-bar.mid { background: linear-gradient(180deg, #f59e0b, #fbbf24); }
.priority-bar.low { background: linear-gradient(180deg, #94a3b8, #cbd5e1); }
.focus-main { min-width: 0; flex: 1; }
.focus-title { color: var(--ink); font-size: 12.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .14s; }
.focus-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 10px; margin-top: 3px; color: var(--muted); font-size: 10.5px; }
.focus-meta .icon { width: 12px; height: 12px; vertical-align: -2px; margin-right: 2px; color: #92a6b8; }
.focus-side { display: flex; align-items: center; gap: 8px; flex: none; }
.focus-date { color: var(--muted); font-family: var(--num); font-size: 11px; text-align: right; min-width: 48px; }
.focus-date.bad { color: var(--red); font-weight: 600; }
.focus-date.warn { color: var(--amber); font-weight: 600; }

.risk-list { display: flex; flex-direction: column; gap: 8px; }
.risk-item {
  padding: 9px 11px 9px 12px;
  border-left: 3px solid var(--red);
  border-radius: 7px;
  background: #fff7f7;
  cursor: pointer;
}
.risk-item.amber { border-left-color: var(--amber); background: #fffbeb; }
.risk-title { font-size: 11.5px; font-weight: 550; line-height: 1.45; }
.risk-meta { margin-top: 2px; color: var(--muted); font-size: 10px; }
.risk-empty { display: flex; align-items: center; gap: 12px; padding: 14px 4px 12px; }
.risk-empty .empty-icon { margin: 0; width: 42px; height: 42px; color: #15803d; background: #f0fdf4; border-color: #bbf7d0; border-style: solid; }
.risk-empty h4 { font-size: 12.5px; }
.risk-empty p { margin-top: 2px; color: var(--muted); font-size: 10.5px; }

.bar-row { display: grid; grid-template-columns: 86px minmax(0, 1fr) 30px; align-items: center; gap: 10px; padding: 5px 0; }
.bar-label { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 11px; white-space: nowrap; }
.bar-label .dot { width: 6px; height: 6px; border-radius: 2px; background: var(--bar-color, #94a3b8); }
.bar-track { height: 7px; border-radius: 99px; background: #eef3f8; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--bar-color, #94a3b8); min-width: 0; transition: width .4s ease; }
.bar-count { text-align: right; font-family: var(--num); font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.bar-count.zero { color: #b2c0cd; font-weight: 500; }

.stack-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: #eef3f8; margin: 2px 0 13px; }
.stack-seg { height: 100%; min-width: 0; }
.source-row { display: flex; align-items: center; gap: 9px; padding: 6px 0; }
.source-dot { width: 8px; height: 8px; flex: none; border-radius: 3px; background: var(--source-color); }
.source-name { width: 62px; flex: none; font-size: 11.5px; color: var(--ink-2); }
.source-track { flex: 1; height: 6px; border-radius: 99px; background: #eef3f8; overflow: hidden; }
.source-fill { height: 100%; border-radius: 99px; background: var(--source-color); }
.source-count { width: 24px; text-align: right; font-family: var(--num); font-size: 11.5px; font-weight: 600; color: var(--ink-2); }

.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { width: 112px; height: 112px; flex: none; transform: rotate(-90deg); }
.donut-bg { fill: none; stroke: #eef3f8; stroke-width: 11; }
.donut-val { fill: none; stroke: var(--teal-2); stroke-width: 11; stroke-linecap: round; transition: stroke-dasharray .5s ease; }
.donut-text { transform: rotate(90deg); transform-origin: 60px 60px; }
.donut-num { fill: var(--ink); font-family: var(--num); font-size: 23px; font-weight: 600; text-anchor: middle; }
.donut-cap { fill: var(--muted); font-size: 8px; text-anchor: middle; letter-spacing: .04em; }
.donut-legend { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.legend-row { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10.5px; }
.legend-row b { margin-left: auto; color: var(--ink-2); font-family: var(--num); font-size: 11.5px; font-weight: 600; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-2); }
.legend-dot.gray { background: #cbd5e1; }

.supplier-table td:first-child { min-width: 150px; }
.supplier-name { display: flex; align-items: center; gap: 8px; }
.supplier-code {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 20px; padding: 0 5px;
  border-radius: 5px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #52677b;
  font-family: var(--num); font-size: 9.5px; font-weight: 600;
  letter-spacing: .05em;
}
.mini-progress { display: flex; align-items: center; gap: 7px; min-width: 120px; }
.mini-track { flex: 1; height: 5px; border-radius: 99px; background: #eef3f8; overflow: hidden; }
.mini-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #33756f, #57afa8); }
.mini-text { color: var(--muted); font-family: var(--num); font-size: 9.5px; white-space: nowrap; }
.unstarted { color: var(--muted-2); font-size: 10.5px; }

.activity-list { display: flex; flex-direction: column; }
.activity-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line-soft); }
.activity-row:last-child { border-bottom: 0; }
.activity-icon { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px; color: #33756f; background: #f0fdfa; }
.activity-icon .icon { width: 13px; height: 13px; }
.activity-main { min-width: 0; }
.activity-text { color: var(--ink-2); font-size: 11px; line-height: 1.5; }
.activity-meta { margin-top: 2px; color: var(--muted-2); font-size: 9.5px; }

/* --------------------------------------------------------------------------
   列表页
   -------------------------------------------------------------------------- */
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.page-intro h2 { font-size: 18px; font-weight: 650; }
.page-intro p { margin-top: 3px; color: var(--muted); font-size: 11.5px; }
.page-intro .intro-actions { display: flex; gap: 7px; }

.mini-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 13px; }
.mini-stat {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 36, 56, .03);
}
.mini-stat span { color: var(--muted); font-size: 10.5px; }
.mini-stat b { font-family: var(--num); font-size: 18px; font-weight: 600; line-height: 1; }
.mini-stat b.red { color: var(--red); }
.mini-stat b.amber { color: var(--amber); }
.mini-stat b.green { color: var(--green); }

.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.search-box {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 11px;
  min-width: 220px; flex: 1; max-width: 390px;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
}
.search-box:focus-within { border-color: #7cc6bf; background: #fff; box-shadow: 0 0 0 3px rgba(87, 175, 168, .1); }
.search-box .icon { width: 15px; height: 15px; flex: none; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 12.5px; color: var(--ink); }
.search-box input::placeholder { color: #9aabb9; }
.toolbar-meta { margin-left: auto; color: var(--muted); font-size: 10.5px; white-space: nowrap; }
.toolbar-meta b { color: var(--ink-2); font-family: var(--num); font-size: 12px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 29px; padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  transition: .15s;
}
.chip:hover { border-color: #c7d5e3; color: var(--ink-2); }
.chip.active { color: #fff; background: var(--navy); border-color: var(--navy); box-shadow: 0 3px 8px rgba(11, 33, 53, .18); }
.chip .num { min-width: 17px; padding: 0 4px; border-radius: 99px; background: rgba(15, 36, 56, .06); font-family: var(--num); font-size: 9.5px; text-align: center; }
.chip.active .num { background: rgba(255, 255, 255, .16); }
.chip.overdue { color: #b91c1c; border-color: #fecaca; background: #fff7f7; }
.chip.overdue.active { color: #fff; background: #b91c1c; border-color: #b91c1c; }

.table-card { overflow: hidden; }
.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.data-table thead th {
  position: sticky; top: 0; z-index: 2;
  padding: 10px 12px;
  background: #f7f9fc;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px; font-weight: 600;
  letter-spacing: .03em;
  text-align: left;
  white-space: nowrap;
}
.data-table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.data-table tbody tr { cursor: pointer; transition: background .13s; }
.data-table tbody tr:hover { background: #f8fbfd; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .num { font-family: var(--num); font-variant-numeric: tabular-nums; }
.cell-primary { color: var(--ink); font-size: 12px; font-weight: 550; }
.cell-primary.mono { font-family: var(--num); font-size: 11.5px; letter-spacing: .02em; }
.cell-sub { margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.cell-sub.ellipsis { max-width: 330px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-due { font-family: var(--num); font-size: 11px; white-space: nowrap; }
.cell-due.bad { color: var(--red); font-weight: 600; }
.cell-due.warn { color: var(--amber); font-weight: 600; }
.row-arrow { color: #b8c6d3; }
.data-table tr:hover .row-arrow { color: var(--teal); }

.progress-dots { display: flex; align-items: center; gap: 3px; }
.progress-dots i {
  display: block; width: 7px; height: 7px;
  border-radius: 50%;
  background: #e2e8f0;
  box-shadow: inset 0 0 0 1px rgba(15, 36, 56, .03);
}
.progress-dots i.done { background: linear-gradient(135deg, #33756f, #57afa8); }
.progress-dots i.current { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .14); }
.progress-label { margin-top: 3px; color: var(--muted); font-size: 9.5px; }

.todo-desc { max-width: 380px; }
.todo-desc .cell-primary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-desc .cell-sub { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); font-size: 11px; white-space: nowrap; }
.source-tag .dot { width: 6px; height: 6px; border-radius: 2px; background: var(--c); }
.source-tag small { display: block; color: var(--muted); font-size: 9.5px; }

.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(286px, 1fr)); gap: 13px; }
.person-card {
  position: relative;
  padding: 16px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.person-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(15, 36, 56, .09); border-color: #cfdeea; }
.person-top { display: flex; align-items: center; gap: 11px; }
.person-top .avatar { width: 43px; height: 43px; border-radius: 12px; font-size: 15px; }
.person-name { min-width: 0; flex: 1; }
.person-name h3 { font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-company { margin-top: 2px; color: var(--muted); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-type { flex: none; }
.person-info { display: flex; flex-direction: column; gap: 5px; margin-top: 12px; color: var(--ink-2); font-size: 11.5px; }
.person-info span { display: flex; align-items: center; gap: 6px; min-width: 0; }
.person-info .icon { width: 13px; height: 13px; color: #93a6b7; flex: none; }
.person-info .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-info a, .detail-item a, .detail-note a { color: var(--accent); text-decoration: none; }
.person-info a:hover, .detail-item a:hover, .detail-note a:hover { text-decoration: underline; text-underline-offset: 2px; }
.person-foot { display: flex; align-items: center; gap: 7px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-soft); color: var(--muted); font-size: 10.5px; }
.person-foot .spacer { flex: 1; }
.workload { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; background: #f4f8fb; color: #52677b; font-size: 9.5px; }
.workload b { font-family: var(--num); font-size: 10.5px; color: var(--ink-2); }
.workload.hot { color: #b91c1c; background: #fef2f2; }
.workload.hot b { color: #b91c1c; }

.coverage { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 13px; }
.coverage-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-2);
  font-size: 10.5px;
}
.coverage-chip b { font-family: var(--num); font-size: 11.5px; }
.coverage-chip.missing { border-style: dashed; border-color: #fcd34d; background: #fffdf5; color: #92400e; }
.coverage-chip.missing .icon { width: 12px; height: 12px; }
.coverage-chip .add-link { color: #b45309; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

.notice {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 10px 13px;
  margin-bottom: 13px;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fffdf3;
  color: #92400e;
  font-size: 11px;
  line-height: 1.5;
}
.notice .icon { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.notice.blue { border-color: #bfdbfe; background: #eff6ff; color: #1e40af; }
.notice.teal { border-color: #c9f0eb; background: #f0fdfa; color: #115e59; }

/* --------------------------------------------------------------------------
   页面底部指引 / 负荷
   -------------------------------------------------------------------------- */
.muted { color: var(--muted-2) !important; }
.guide-card { margin-top: 16px; }
.flow-guide { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.flow-step {
  position: relative;
  padding: 12px 12px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfdff, #f8fbfd);
}
.flow-step::after {
  content: "";
  position: absolute;
  top: 19px; right: -6px;
  width: 5px; height: 5px;
  border-top: 1px solid #cbd5e1;
  border-right: 1px solid #cbd5e1;
  transform: rotate(45deg);
}
.flow-step:last-child::after { display: none; }
.flow-num { display: inline-flex; color: #33756f; font-family: var(--num); font-size: 10px; font-weight: 600; letter-spacing: .06em; }
.flow-step b { display: block; margin-top: 6px; color: var(--ink-2); font-size: 11.5px; font-weight: 600; }
.flow-step small { display: block; margin-top: 3px; color: var(--muted); font-size: 9.5px; line-height: 1.45; }
.guide-notes {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  margin-top: 13px; padding-top: 11px;
  border-top: 1px dashed var(--line-soft);
  color: var(--muted); font-size: 10px; line-height: 1.6;
}
.guide-notes b { color: var(--ink-2); font-weight: 600; }
.guide-notes.stack { display: block; }
.guide-notes.stack span { display: block; margin-top: 4px; }
.guide-notes.stack span:first-child { margin-top: 0; }
.owner-load { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 9px; }
.owner-card {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #fbfdff;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.owner-card:hover { border-color: #bfe6e1; background: #f5fdfb; }
.owner-card .avatar { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }
.owner-main { flex: 1; min-width: 0; }
.owner-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 5px; }
.owner-head b { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.owner-head span { color: var(--muted); font-family: var(--num); font-size: 9.5px; white-space: nowrap; }
.owner-track { height: 4px; border-radius: 99px; background: #eef3f8; overflow: hidden; }
.owner-track span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #33756f, #57afa8); }
.type-guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.type-guide-item {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfdff;
}
.type-guide-item.missing { border-style: dashed; border-color: #e8d9a8; background: #fffdf7; }
.type-guide-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.type-guide-head > span:last-child { color: var(--muted); font-family: var(--num); font-size: 11px; }
.type-guide-item p { margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.type-guide-item .link { margin-top: 6px; font-size: 10.5px; }
.dept-guide { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dept-guide-item {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfdff;
}
.dept-guide-item.missing { border-style: dashed; border-color: #e8d9a8; background: #fffdf7; }
.dept-guide-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dept-guide-head b { font-size: 12px; font-weight: 650; }
.dept-guide-head span { color: var(--muted); font-family: var(--num); font-size: 11px; }
.dept-guide-item p { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.dept-guide-item .link { margin-top: 6px; font-size: 10.5px; }

@media (max-width: 1180px) {
  .flow-guide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .flow-step:nth-child(4)::after, .flow-step:nth-child(7)::after { display: none; }
  .type-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dept-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .flow-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-step::after { display: none; }
  .type-guide { grid-template-columns: 1fr; }
  .dept-guide { grid-template-columns: 1fr; }
  .owner-load { grid-template-columns: 1fr; }
  .guide-notes { display: block; }
  .guide-notes span { display: block; margin-top: 3px; }
}

/* --------------------------------------------------------------------------
   抽屉 / 详情 / 表单
   -------------------------------------------------------------------------- */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(8, 22, 35, .46);
  backdrop-filter: blur(2px);
  animation: fadeIn .18s ease both;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61;
  width: min(650px, 100vw);
  display: flex; flex-direction: column;
  background: #fff;
  box-shadow: var(--shadow-lg);
  animation: slideIn .24s cubic-bezier(.22, .61, .36, 1) both;
}
.drawer.wide { width: min(780px, 100vw); }
.drawer-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #fbfdff, #fff);
}
.drawer-head-main { min-width: 0; flex: 1; }
.drawer-kicker { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; color: var(--muted); font-family: var(--num); font-size: 10px; letter-spacing: .05em; }
.drawer-head h2 { margin-top: 5px; font-size: 18px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.drawer-head p { margin-top: 4px; color: var(--muted); font-size: 11.5px; }
.drawer-close { flex: none; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 24px; }
.drawer-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-top: 1px solid var(--line-soft);
  background: #fbfcfe;
}
.drawer-foot .spacer { flex: 1; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 18px; }
.detail-item label { display: block; color: var(--muted); font-size: 10px; letter-spacing: .03em; margin-bottom: 3px; }
.detail-item div { color: var(--ink-2); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.detail-item .icon { width: 12px; height: 12px; vertical-align: -2px; margin-left: 2px; }
.detail-item .mono { font-family: var(--num); }
.detail-block { margin-top: 18px; }
.detail-block h4 { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--ink); font-size: 12px; font-weight: 650; }
.detail-block h4 .icon { width: 14px; height: 14px; color: var(--muted); }
.detail-note {
  padding: 11px 13px;
  border-left: 3px solid #57afa8;
  border-radius: 4px 9px 9px 4px;
  background: #f7fdfc;
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.detail-note.empty { color: var(--muted-2); border-left-color: #dbe4ec; background: #fafcfe; }
.file-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.file-group {
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfdfc;
  min-width: 0;
}
.file-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.file-head h5 { margin: 0; color: var(--ink); font-size: 11.5px; font-weight: 650; }
.file-head p { margin-top: 2px; color: var(--muted); font-size: 9.5px; line-height: 1.4; }
.file-head .btn { flex: none; height: 28px; padding: 0 9px; font-size: 10.5px; }
.file-list { margin-top: 7px; }
.file-row {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 0;
  border-top: 1px dashed var(--line-soft);
}
.file-row:first-child { border-top: 0; }
.file-icon {
  width: 24px; height: 24px; flex: none;
  display: grid; place-items: center;
  border-radius: 7px;
  color: #33756f;
  background: #eefaf7;
}
.file-icon .icon { width: 13px; height: 13px; }
.file-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.file-name { color: var(--ink-2); font-size: 10.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-name:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.file-meta { color: var(--muted-2); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-download, .file-delete { width: 26px; height: 26px; border-radius: 7px; border-color: transparent; background: transparent; color: var(--muted); }
.file-download:hover { color: var(--accent); background: #eefaf7; border-color: #ccebe5; }
.file-delete:hover { color: var(--red); background: #fef2f2; border-color: #fecaca; }
.file-download .icon, .file-delete .icon { width: 13px; height: 13px; }
.file-empty { margin-top: 7px; padding: 9px 0 3px; color: var(--muted-2); font-size: 9.5px; border-top: 1px dashed var(--line-soft); }
.file-input { display: none; }

.order-summary-card { margin-bottom: 16px; }
.order-summary-head { flex-wrap: wrap; }
.order-summary-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.order-filters {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin-bottom: 11px; padding-bottom: 11px; border-bottom: 1px dashed var(--line-soft);
}
.order-filters .select { width: auto; min-width: 128px; max-width: 210px; height: 30px; font-size: 10.5px; }
.order-filters .toolbar-meta { margin-left: auto; }
.order-summary-table { min-width: 820px; }
.order-summary-table .num-col { text-align: right; font-family: var(--num); }
.order-summary-table .num-col b { color: var(--teal-strong); font-size: 12px; }
.order-summary-table .order-total-row td { background: #f3faf8; font-weight: 600; }
.check-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 8px; background: #fbfdfc; }
.check { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); font-size: 11px; }
.check input { width: 14px; height: 14px; accent-color: var(--accent); }
.check-row .hint { flex-basis: 100%; margin: 0; }

.product-key-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.product-key-card { padding: 13px 14px; border-radius: 11px; }
.product-key-card h3 { margin-top: 7px; font-family: var(--num); font-size: 13px; color: var(--ink); }
.product-key-card p { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.product-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.product-config-table { min-width: 1120px; }
.product-config-table .num-col { text-align: right; font-family: var(--num); }
.product-model-table { min-width: 420px; }
.product-dimension-table { min-width: 520px; }
@media (max-width: 1100px) {
  .product-key-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .product-key-grid { grid-template-columns: 1fr; }
  .product-groups { grid-template-columns: 1fr; }
}

.supply-table { min-width: 1400px; }
.supply-table thead th { padding: 7px 7px; font-size: 9.5px; white-space: nowrap; }
.supply-table tbody td { padding: 7px 7px; white-space: nowrap; }
.supply-table .cell-primary { font-size: 11px; }
.supply-table .cell-sub { white-space: nowrap; }
.cell-primary.muted { color: var(--muted-2); font-weight: 450; }
.cell-remark {
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted); font-size: 10.5px;
}
.milestone-cell { min-width: 88px; }
.file-chip {
  display: inline-flex; align-items: center; gap: 3px;
  margin-top: 3px; padding: 2px 5px;
  border: 1px solid #dce9e6; border-radius: 5px;
  background: #f6fbf9; color: var(--muted);
  font-size: 8.5px; line-height: 1.4; cursor: pointer;
}
.file-chip .icon { width: 10px; height: 10px; }
.file-chip:hover { border-color: #9cd3cb; color: var(--accent); background: #eefaf7; }
.file-chip.has { border-color: #b9e0d9; color: #2d7c72; background: #eefaf7; font-weight: 600; }
.file-date {
  display: inline-block; margin-left: 6px;
  color: var(--accent); font-family: var(--num); font-size: 9px; font-weight: 500;
}
.milestone-files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.milestone-file:last-child:nth-child(odd) { grid-column: 1 / -1; }
.milestone-file .file-head h5 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; }
@media (max-width: 720px) {
  .milestone-files { grid-template-columns: 1fr; }
  .milestone-file:last-child:nth-child(odd) { grid-column: auto; }
}

.linked-list { display: flex; flex-direction: column; gap: 5px; }
.linked-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--ink-2);
  font-size: 11px;
  cursor: pointer;
}
.linked-item:hover { border-color: #bfe6e1; background: #f4fdfb; }
.linked-item .icon { width: 13px; height: 13px; color: var(--muted); }
.linked-item .spacer { flex: 1; }
.linked-item small { color: var(--muted); font-size: 9.5px; }

.timeline { position: relative; display: flex; flex-direction: column; gap: 0; margin-top: 2px; }
.timeline-item { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; position: relative; padding-bottom: 14px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: 6px; top: 15px; bottom: -1px;
  width: 1px; background: #e6edf4;
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  width: 13px; height: 13px; margin-top: 2px; z-index: 1;
  border-radius: 50%;
  border: 2px solid #d8e2ec;
  background: #fff;
}
.timeline-item.done .timeline-dot { border-color: #57afa8; background: #57afa8; box-shadow: 0 0 0 3px rgba(87, 175, 168, .1); }
.timeline-item.current .timeline-dot { border-color: #f59e0b; background: #fff; box-shadow: 0 0 0 3px rgba(245, 158, 11, .13); }
.timeline-label { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 11.5px; font-weight: 550; }
.timeline-label small { color: var(--muted); font-family: var(--num); font-size: 10px; font-weight: 500; }
.timeline-desc { margin-top: 1px; color: var(--muted); font-size: 10px; }

.form-section {
  padding: 14px 15px;
  margin-bottom: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.form-section:last-child { margin-bottom: 0; }
.form-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.form-section-head h3 { font-size: 12px; font-weight: 650; }
.form-section-head p { margin-top: 2px; color: var(--muted); font-size: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 13px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label { color: var(--ink-2); font-size: 10.5px; font-weight: 550; }
.field > label .req { color: var(--red); margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field textarea { min-height: 76px; resize: vertical; line-height: 1.6; }
.field textarea.textarea-lg { min-height: 138px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #7cc6bf; box-shadow: 0 0 0 3px rgba(87, 175, 168, .1); }
.field .hint { color: var(--muted-2); font-size: 9.5px; line-height: 1.45; }
.field .hint.warn { color: #b45309; }
.field.locked > label { color: #9aabb9; }
.field.locked input, .field.locked select, .field.locked textarea {
  color: #94a3b8;
  background: #f6f8fb;
  border-style: dashed;
  cursor: not-allowed;
}
.lock-tag { display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; color: #b8a26a; font-size: 9px; font-weight: 500; }
.lock-tag .icon { width: 10px; height: 10px; }
.form-section.locked { background: #fcfdff; }
.form-note { display: flex; align-items: flex-start; gap: 6px; margin-top: 9px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.form-note .icon { width: 13px; height: 13px; flex: none; margin-top: 1px; color: #b45309; }

/* --------------------------------------------------------------------------
   确认框 / 提示
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 70;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(8, 22, 35, .48);
  backdrop-filter: blur(2px);
  animation: fadeIn .16s ease both;
}
.modal {
  width: min(430px, 100%);
  padding: 20px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  animation: popIn .18s ease both;
}
.modal h3 { font-size: 15px; font-weight: 650; }
.modal p { margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.toast-root {
  position: fixed; right: 20px; bottom: 20px; z-index: 300;
  transition: bottom .2s ease;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
body.drawer-open .toast-root { bottom: 86px; }
.toast {
  display: flex; align-items: flex-start; gap: 8px;
  min-width: 240px; max-width: 380px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(8, 22, 35, .16);
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 1.5;
  animation: toastIn .22s ease both;
  pointer-events: auto;
}
.toast.error { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--amber); }
.toast .icon { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--teal); }
.toast.error .icon { color: var(--red); }
.toast.warn .icon { color: var(--amber); }
.toast.hide { animation: toastOut .2s ease both; }

.boot-screen { min-height: 55vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); font-size: 12px; }
.boot-mark {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid #d8e6ef;
  border-top-color: var(--teal-2);
  animation: spin .8s linear infinite;
}
.boot-error { max-width: 480px; padding: 22px; text-align: center; }
.boot-error h3 { color: var(--ink); font-size: 15px; margin-bottom: 6px; }
.boot-error p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.boot-error pre { margin-top: 10px; padding: 10px; border-radius: 8px; background: #f7f9fc; color: #52677b; font-size: 10.5px; text-align: left; white-space: pre-wrap; }

.noscript { position: fixed; inset: 0; z-index: 99; display: grid; place-items: center; background: #fff; color: #334155; font-size: 14px; }

/* --------------------------------------------------------------------------
   登录 / 账号
   -------------------------------------------------------------------------- */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 28px;
  overflow-y: auto;
  background:
    radial-gradient(760px 420px at 80% 10%, rgba(87, 175, 168, .28), transparent 62%),
    radial-gradient(620px 380px at 10% 90%, rgba(51, 117, 111, .22), transparent 60%),
    linear-gradient(135deg, #0b2422 0%, #103b37 58%, #245f59 100%);
}
body.auth-mode { overflow: hidden; }
.auth-brand { display: flex; align-items: center; gap: 11px; color: #e9f6f3; }
.auth-logo { width: 46px; height: 46px; border-radius: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .28); }
.auth-brand strong { display: block; font-size: 15px; letter-spacing: .08em; }
.auth-brand span { display: block; margin-top: 3px; color: #8fb0c5; font-size: 8px; letter-spacing: .2em; }
.auth-card {
  width: min(430px, 100%);
  padding: 28px 30px 22px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .3);
}
.auth-kicker { color: var(--accent); font-family: var(--num); font-size: 9.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.auth-card h1 { margin-top: 8px; font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
.auth-sub { margin-top: 5px; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.auth-alert { margin-top: 13px; padding: 9px 11px; border: 1px solid #fecaca; border-radius: 8px; background: #fef2f2; color: #b91c1c; font-size: 11px; line-height: 1.5; }
.auth-field { display: block; margin-top: 14px; }
.auth-field span { display: block; margin-bottom: 5px; color: var(--ink-2); font-size: 11px; font-weight: 550; }
.auth-field input {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
  font-size: 13px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.auth-field input:focus { border-color: #7cc6bf; box-shadow: 0 0 0 3px rgba(87, 175, 168, .14); }
.auth-submit { width: 100%; height: 42px; margin-top: 18px; font-size: 13px; }
.auth-cancel { width: 100%; height: 38px; margin-top: 8px; color: var(--muted); }
.auth-hint { margin-top: 16px; padding-top: 13px; border-top: 1px dashed var(--line-soft); color: var(--muted); font-size: 10px; line-height: 1.65; }
.auth-hint code { padding: 1px 4px; border-radius: 4px; background: #f2f7f5; color: var(--ink-2); font-size: 9.5px; }
.auth-footer { display: flex; justify-content: center; gap: 8px; margin-top: 12px; color: var(--muted-2); font-size: 9.5px; }
.auth-footer a { color: var(--accent); }
@media (max-width: 520px) {
  .auth-screen { padding: 18px; justify-content: flex-start; padding-top: 8vh; }
  .auth-card { padding: 22px 20px 18px; border-radius: 16px; }
  .auth-card h1 { font-size: 19px; }
}

.user-card {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 9px 9px 10px;
  margin-top: 2px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
}
.user-avatar {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  color: #fff; font-size: 12px; font-weight: 650;
}
.user-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.user-meta b { color: #eaf4f2; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { margin-top: 2px; color: #89a8a3; font-size: 9.5px; }
.user-logout { width: 28px; height: 28px; flex: none; border-color: transparent; background: transparent; color: #7e9c98; }
.user-logout:hover { color: #fff; background: rgba(255, 255, 255, .08); border-color: transparent; }
.user-logout .icon { width: 14px; height: 14px; }
.user-password { width: 100%; margin-top: 5px; padding: 3px 4px; border: 0; background: none; color: #7f9c97; font-size: 10px; text-align: left; }
.user-password:hover { color: #b7e7e0; }

body.role-viewer [data-action^="add-"],
body.role-viewer [data-action^="edit-"],
body.role-viewer [data-action^="delete-"],
body.role-viewer [data-action="quick-todo-status"],
body.role-viewer [data-action="pick-file"],
body.role-viewer [data-action="delete-supply-file"] { display: none !important; }
body:not(.role-admin) [data-admin-only] { display: none !important; }

/* --------------------------------------------------------------------------
   动效
   -------------------------------------------------------------------------- */
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.86); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(30px); opacity: .5; } to { transform: translateX(0); opacity: 1; } }
@keyframes popIn { from { transform: scale(.97); opacity: .4; } to { transform: scale(1); opacity: 1; } }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastOut { from { transform: translateY(0); opacity: 1; } to { transform: translateY(8px); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1380px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-side { gap: 18px; }
  .hero-stat b { font-size: 24px; }
}

@media (max-width: 1180px) {
  .sidebar { width: 238px; }
  .main { margin-left: 238px; }
  .topbar, .content, .app-footer { padding-left: 24px; padding-right: 24px; }
  .span-8, .span-7 { grid-column: span 12; }
  .span-4, .span-5 { grid-column: span 6; }
  .span-3 { grid-column: span 6; }
  .mini-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .sidebar { transform: translateX(-102%); transition: transform .24s cubic-bezier(.22, .61, .36, 1); box-shadow: 18px 0 50px rgba(8, 22, 35, .28); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(8, 22, 35, .4); }
  .main { margin-left: 0; }
  .mobile-menu { display: inline-flex; }
  .topbar { padding: 13px 18px; }
  .content { padding: 18px 18px 34px; }
  .app-footer { padding: 12px 18px 18px; flex-wrap: wrap; }
  .hero { flex-direction: column; gap: 18px; padding: 22px; }
  .hero-side { justify-content: flex-start; gap: 28px; }
  .hero-badge { display: none; }
  .hero-stat { text-align: left; }
}

@media (max-width: 760px) {
  .file-grid { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; }
  .page-heading { flex: 1; min-width: 150px; }
  .page-heading h1 { font-size: 18px; }
  .page-heading p { font-size: 10.5px; }
  .topbar-actions { width: 100%; justify-content: flex-start; margin-left: 0; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .kpi { padding: 12px; }
  .kpi-value { font-size: 23px; }
  .kpi-label { font-size: 10px; }
  .kpi-sub { font-size: 9.5px; }
  .kpi-icon { width: 31px; height: 31px; }
  .dash-grid { grid-template-columns: 1fr; }
  .span-8, .span-7, .span-6, .span-5, .span-4, .span-3, .span-12 { grid-column: span 1; }
  .hero h2 { font-size: 21px; }
  .hero-sub { font-size: 10.5px; }
  .hero-side { gap: 22px; }
  .hero-stat b { font-size: 22px; }
  .mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-stat { padding: 9px 11px; }
  .toolbar { padding: 10px; }
  .search-box { max-width: none; flex-basis: 100%; }
  .toolbar-meta { margin-left: 0; width: 100%; }
  .people-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .drawer { width: 100vw; }
  .drawer-head, .drawer-body { padding-left: 16px; padding-right: 16px; }
  .drawer-foot { padding-left: 16px; padding-right: 16px; flex-wrap: wrap; }
  .toast-root { left: 14px; right: 14px; bottom: 14px; }
  .toast { max-width: none; }
  .app-footer { font-size: 9.5px; }
  .focus-side .pill { display: none; }
}

@media (max-width: 430px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-sub { display: none; }
  .hero-side { gap: 18px; }
  .hero-stat b { font-size: 20px; }
  .source-name { width: 54px; }
}

/* --------------------------------------------------------------------------
   打印（周会纵览）
   -------------------------------------------------------------------------- */
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; font-size: 11px; }
  .sidebar, .sidebar-scrim, .topbar, .app-footer, .toast-root, .drawer-overlay, .modal-overlay { display: none !important; }
  .main { margin: 0; }
  .content { max-width: none; padding: 0; }
  .hero { break-inside: avoid; box-shadow: none; padding: 18px 22px; margin-bottom: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .hero h2 { font-size: 20px; }
  .hero-side { gap: 22px; }
  .kpi-grid { grid-template-columns: repeat(6, 1fr); gap: 7px; margin-bottom: 10px; }
  .kpi { padding: 9px 10px; break-inside: avoid; box-shadow: none; }
  .kpi-icon { display: none; }
  .kpi-value { font-size: 20px; }
  .kpi-sub { font-size: 8.5px; }
  .dash-grid { display: block; }
  .dash-grid > section { margin-bottom: 9px; break-inside: avoid; box-shadow: none; border-color: #dbe4ec; }
  .card-head { padding-top: 12px; }
  .card-body { padding-top: 10px; padding-bottom: 12px; }
  .btn, .link, .row-arrow, .page-intro .intro-actions { display: none !important; }
  .data-table thead th { background: #f3f6f9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .focus-row { padding: 7px 0; }
  .activity-row { padding: 5px 0; }
  .risk-item { break-inside: avoid; }
}
