:root {
  --bg: #070b15;
  --bg-soft: #0b1020;
  --panel: #111a2e;
  --panel-2: #16213a;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e9effd;
  --muted: #93a0bd;
  --muted-2: #64718e;
  --accent: #5b8cff;
  --accent-2: #22d3ee;
  --purple: #a78bfa;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 14px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.75);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(900px 600px at 8% -8%, rgba(91, 140, 255, 0.20), transparent 60%),
    radial-gradient(800px 600px at 100% 0%, rgba(167, 139, 250, 0.16), transparent 55%),
    radial-gradient(1000px 700px at 70% 110%, rgba(34, 211, 238, 0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 登录 ---------------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 0.85fr; }
.login-brand {
  position: relative; padding: 64px 72px; display: flex; flex-direction: column; justify-content: space-between;
  background:
    linear-gradient(160deg, rgba(91, 140, 255, 0.14), rgba(7, 11, 21, 0) 45%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.028) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.028) 0 1px, transparent 1px 44px),
    var(--bg-soft);
  border-right: 1px solid var(--line);
  overflow: hidden;
}
.login-brand::after {
  content: ""; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 65%);
  filter: blur(20px);
}
.brand-line { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 18px;
  background: linear-gradient(135deg, #4f7cff, #8b5cf6 60%, #22d3ee);
  box-shadow: 0 8px 24px -6px rgba(91, 140, 255, 0.65);
  letter-spacing: 0.5px;
}
.brand-text b { font-size: 17px; letter-spacing: 0.4px; }
.brand-text span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; letter-spacing: 0.6px; }

.login-hero { position: relative; z-index: 2; max-width: 600px; }
.login-hero .eyebrow { color: var(--accent-2); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; }
.login-hero h1 { font-size: 46px; line-height: 1.22; margin: 18px 0 20px; letter-spacing: -0.5px; }
.login-hero h1 em { white-space: nowrap; font-style: normal; background: linear-gradient(100deg, #7ea4ff, #22d3ee 55%, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-hero p { color: var(--muted); font-size: 15px; line-height: 1.9; max-width: 520px; }
.hero-metrics { display: flex; gap: 46px; margin-top: 40px; }
.hero-metrics div b { font-size: 26px; font-weight: 700; display: block; letter-spacing: -0.5px; }
.hero-metrics div span { color: var(--muted-2); font-size: 12px; letter-spacing: 0.6px; }
.login-foot { position: relative; z-index: 2; color: var(--muted-2); font-size: 12px; letter-spacing: 0.4px; }

.login-panel { display: grid; place-items: center; padding: 40px; }
.login-card { width: 100%; max-width: 400px; }
.login-card h2 { font-size: 24px; margin: 0 0 8px; }
.login-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 30px; }
.login-card label { display: block; color: var(--muted); font-size: 12px; margin: 16px 0 8px; letter-spacing: 0.5px; }
.login-card .input { width: 100%; }
.login-card .btn-primary { width: 100%; margin-top: 26px; height: 46px; font-size: 15px; }
.demo-block { margin-top: 28px; border-top: 1px dashed var(--line-strong); padding-top: 18px; }
.demo-block p { color: var(--muted-2); font-size: 12px; margin: 0 0 10px; }
.demo-btns { display: flex; gap: 8px; }
.demo-btns button { flex: 1; padding: 9px 6px; font-size: 12px; }

/* ---------------- 主框架 ---------------- */
.shell { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
.sidebar {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 26, 46, 0.92), rgba(9, 13, 24, 0.94));
  padding: 22px 16px; display: flex; flex-direction: column; gap: 26px; position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 2px 6px 0; }
.side-brand .logo-mark { width: 36px; height: 36px; font-size: 15px; border-radius: 10px; }
.side-brand b { font-size: 15px; letter-spacing: 0.3px; }
.side-brand span { display: block; font-size: 11px; color: var(--muted-2); margin-top: 2px; letter-spacing: 0.5px; }
.nav-group { display: flex; flex-direction: column; gap: 4px; }
.nav-label { font-size: 11px; color: var(--muted-2); letter-spacing: 1.4px; padding: 0 10px; margin-bottom: 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--muted);
  font-size: 13.5px; cursor: pointer; border: 1px solid transparent; transition: all 0.16s ease; position: relative;
}
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav-item.active {
  color: #fff; background: linear-gradient(90deg, rgba(91, 140, 255, 0.22), rgba(91, 140, 255, 0.05));
  border-color: rgba(91, 140, 255, 0.28);
}
.nav-item.active::before { content: ""; position: absolute; left: -1px; top: 22%; height: 56%; width: 3px; border-radius: 3px; background: linear-gradient(180deg, #6f9bff, #22d3ee); }
.nav-item svg { width: 17px; height: 17px; flex: 0 0 17px; opacity: 0.85; }
.nav-item .nav-badge { margin-left: auto; font-size: 10.5px; padding: 1px 7px; border-radius: 20px; background: rgba(251, 191, 36, 0.16); color: var(--warn); border: 1px solid rgba(251, 191, 36, 0.3); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; background: linear-gradient(135deg, #5b8cff, #8b5cf6); font-size: 13px; flex: 0 0 34px; }
.side-user .n { font-size: 13px; }
.side-user .r { font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.logout { margin-left: auto; color: var(--muted-2); cursor: pointer; padding: 4px; border-radius: 8px; }
.logout:hover { color: var(--danger); background: rgba(248, 113, 113, 0.1); }
.logout svg { width: 16px; height: 16px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; display: flex; align-items: center; gap: 18px; padding: 0 32px; position: sticky; top: 0; z-index: 20;
  background: rgba(7, 11, 21, 0.72); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 16px; margin: 0; font-weight: 600; letter-spacing: 0.3px; }
.crumb { color: var(--muted-2); font-size: 12px; letter-spacing: 0.4px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.pill-live { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }

.content { padding: 26px 32px 56px; max-width: 1400px; width: 100%; }

/* ---------------- 通用组件 ---------------- */
.card { background: linear-gradient(180deg, rgba(22, 33, 58, 0.86), rgba(15, 23, 40, 0.9)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: 0.3px; }
.card-head .sub { color: var(--muted-2); font-size: 12px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.05); color: var(--text);
  font-size: 13px; cursor: pointer; transition: all 0.16s ease; white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255,255,255,0.24); }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: linear-gradient(135deg, #4f7cff, #6b5cff); border-color: transparent; box-shadow: 0 8px 22px -10px rgba(91, 140, 255, 0.9); font-weight: 600; }
.btn-primary:hover { filter: brightness(1.08); background: linear-gradient(135deg, #4f7cff, #6b5cff); }
.btn-cyan { background: linear-gradient(135deg, #0ea5b7, #22d3ee); border-color: transparent; color: #04121a; font-weight: 700; }
.btn-ghost { background: transparent; }
.btn-danger { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.35); color: #ffc9c9; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 8px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; letter-spacing: 0.3px; border: 1px solid transparent; white-space: nowrap; }
.badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.blue { color: #9db9ff; background: rgba(91, 140, 255, 0.12); border-color: rgba(91, 140, 255, 0.28); }
.badge.cyan { color: #67e8f9; background: rgba(34, 211, 238, 0.12); border-color: rgba(34, 211, 238, 0.28); }
.badge.green { color: #6ee7b7; background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.28); }
.badge.amber { color: #fcd34d; background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.3); }
.badge.red { color: #fca5a5; background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.3); }
.badge.purple { color: #c4b5fd; background: rgba(167, 139, 250, 0.12); border-color: rgba(167, 139, 250, 0.3); }
.badge.gray { color: var(--muted); background: rgba(255, 255, 255, 0.05); border-color: var(--line-strong); }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { position: relative; padding: 20px 22px; overflow: hidden; }
.stat .lbl { color: var(--muted); font-size: 12px; letter-spacing: 0.6px; display: flex; align-items: center; gap: 8px; }
.stat .val, .price b, .money, .hero-metrics div b { font-family: "DejaVu Sans", "Noto Sans", "Helvetica Neue", Arial, sans-serif; font-variant-numeric: tabular-nums; }
.stat .val { font-size: 27px; font-weight: 700; margin-top: 12px; letter-spacing: -0.6px; }
.stat .val small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.stat .hint { color: var(--muted-2); font-size: 11.5px; margin-top: 8px; }
.stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(91,140,255,0.22), transparent 70%); }

.grid-2 { display: grid; grid-template-columns: 1.35fr 0.85fr; gap: 18px; align-items: start; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: flex-start; gap: 13px; padding: 15px 22px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background 0.15s; }
.list-item:hover { background: rgba(255, 255, 255, 0.035); }
.list-item:last-child { border-bottom: 0; }
.list-item .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 32px; background: rgba(91, 140, 255, 0.12); color: #9db9ff; }
.list-item .t { font-size: 13.5px; }
.list-item .s { font-size: 11.5px; color: var(--muted-2); margin-top: 4px; }
.list-item .arrow { margin-left: auto; color: var(--muted-2); align-self: center; }

.empty { padding: 46px 20px; text-align: center; color: var(--muted-2); font-size: 13px; }
.empty .big { font-size: 30px; margin-bottom: 10px; opacity: 0.5; }

/* 项目卡片 */
.filters { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.chip { padding: 7px 14px; border-radius: 20px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); color: var(--muted); font-size: 12.5px; cursor: pointer; }
.chip.on { color: #fff; background: rgba(91, 140, 255, 0.18); border-color: rgba(91, 140, 255, 0.4); }
.search-box { margin-left: auto; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.045); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; height: 36px; }
.search-box svg { width: 15px; height: 15px; color: var(--muted-2); }
.search-box input { background: transparent; border: 0; outline: 0; color: var(--text); font-size: 13px; width: 220px; }

.proj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.proj-card { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: all 0.18s ease; }
.proj-card:hover { transform: translateY(-2px); border-color: rgba(91, 140, 255, 0.34); box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.9); }
.proj-top { display: flex; align-items: flex-start; gap: 10px; }
.proj-top .code { color: var(--muted-2); font-size: 11px; letter-spacing: 1px; font-family: ui-monospace, monospace; }
.proj-card h3 { margin: 6px 0 0; font-size: 16.5px; line-height: 1.45; letter-spacing: -0.2px; }
.proj-card .desc { color: var(--muted); font-size: 12.5px; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 11px; color: #b8c6e8; background: rgba(255,255,255,0.05); border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px; }
.proj-meta { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; padding-top: 13px; border-top: 1px solid var(--line); }
.price b { font-size: 20px; letter-spacing: -0.5px; }
.price b i { font-style: normal; font-size: 13px; margin-right: 1px; opacity: .8; }
.price span { color: var(--muted-2); font-size: 11.5px; margin-left: 6px; }
.meta-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.meta-side .m { font-size: 11.5px; color: var(--muted-2); }

/* 详情页 */
.back-link { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; margin-bottom: 14px; cursor: pointer; }
.back-link:hover { color: var(--text); }
.detail-head { padding: 26px 28px; margin-bottom: 18px; }
.detail-head h2 { margin: 8px 0 10px; font-size: 24px; letter-spacing: -0.4px; }
.detail-head .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.kv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.kv .k { font-size: 11.5px; color: var(--muted-2); letter-spacing: 0.4px; }
.kv .v { font-size: 15px; margin-top: 6px; }
.section { padding: 20px 28px; }
.section h4 { margin: 0 0 12px; font-size: 13px; color: var(--accent-2); letter-spacing: 1px; font-weight: 600; }
.section p { color: #c6d0e8; font-size: 13.5px; line-height: 1.95; margin: 0; white-space: pre-wrap; }

/* 报价 */
.bid { display: flex; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.bid:last-child { border-bottom: 0; }
.bid .avatar { border-radius: 50%; }
.bid .who { font-size: 13.5px; }
.bid .who span { color: var(--muted-2); font-size: 11.5px; margin-left: 8px; }
.bid .plan { color: var(--muted); font-size: 12.5px; line-height: 1.8; margin-top: 6px; max-width: 720px; }
.bid .amt { margin-left: auto; text-align: right; flex: 0 0 auto; }
.bid .amt b { font-size: 19px; }
.bid .amt .d { font-size: 11.5px; color: var(--muted-2); margin-top: 4px; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted-2); font-size: 11.5px; font-weight: 500; letter-spacing: 0.5px; padding: 12px 22px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.02); white-space: nowrap; }
td { padding: 15px 22px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
tr:hover td { background: rgba(255, 255, 255, 0.025); }
td.mono { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); }
td .t2 { color: var(--muted-2); font-size: 11.5px; margin-top: 4px; }
.money { font-family: ui-monospace, monospace; letter-spacing: -0.2px; }

/* 流程 */
.flow { display: flex; align-items: center; gap: 0; padding: 22px 26px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.step { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.step .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; border: 1px solid var(--line-strong); color: var(--muted-2); background: rgba(255,255,255,0.03); }
.step .lb { font-size: 12px; color: var(--muted-2); }
.step.done .n { background: rgba(52, 211, 153, 0.16); border-color: rgba(52, 211, 153, 0.45); color: #6ee7b7; }
.step.done .lb { color: #9fe6c5; }
.step.cur .n { background: linear-gradient(135deg, #4f7cff, #22d3ee); border-color: transparent; color: #fff; box-shadow: 0 0 0 3px rgba(91,140,255,0.18); }
.step.cur .lb { color: #fff; }
.step-line { flex: 1 1 40px; height: 1px; background: var(--line-strong); margin: 0 14px; min-width: 24px; }

.timeline { padding: 20px 26px; }
.tl-item { display: flex; gap: 14px; padding-bottom: 20px; position: relative; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 1px; background: var(--line-strong); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 15px; height: 15px; border-radius: 50%; border: 1px solid rgba(91,140,255,0.5); background: rgba(91,140,255,0.18); flex: 0 0 15px; margin-top: 2px; position: relative; z-index: 1; }
.tl-body .a { font-size: 13px; }
.tl-body .a b { color: #9db9ff; font-weight: 600; }
.tl-body .n { color: var(--muted); font-size: 12.5px; line-height: 1.75; margin-top: 4px; }
.tl-body .t { color: var(--muted-2); font-size: 11px; margin-top: 6px; font-family: ui-monospace, monospace; }

/* 合同 */
.contract-page { background: #f7f8fb; color: #1a2130; border-radius: var(--radius); padding: 52px 56px; font-size: 13.5px; line-height: 2; box-shadow: var(--shadow); max-width: 860px; margin: 0 auto; }
.contract-page .c-head { display: flex; justify-content: space-between; color: #8a93a6; font-size: 11.5px; border-bottom: 1px solid #e2e6ef; padding-bottom: 10px; letter-spacing: 0.4px; }
.contract-page h2 { text-align: center; font-size: 22px; margin: 30px 0 26px; letter-spacing: 1px; }
.contract-page .parties { display: grid; grid-template-columns: 110px 1fr; gap: 6px 0; margin-bottom: 24px; font-size: 12.5px; }
.contract-page .parties .k { color: #7b8497; }
.contract-page .parties .v { color: #1a2130; }
.contract-page .pre { color: #4a5468; text-indent: 2em; margin-bottom: 22px; }
.contract-page h4 { font-size: 14px; margin: 24px 0 8px; }
.contract-page .body { color: #38415a; white-space: pre-wrap; text-align: justify; }
.contract-page .sign-area { margin-top: 40px; border-top: 1px dashed #d7dce8; padding-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.sign-box .k { color: #7b8497; font-size: 12px; margin-bottom: 10px; }
.sign-box .name { font-size: 14px; }
.sign-box img { max-height: 62px; display: block; margin-bottom: 6px; }
.sign-box .meta { color: #8a93a6; font-size: 11px; margin-top: 8px; }
.sign-box .hash { word-break: break-all; font-family: ui-monospace, monospace; font-size: 10px; color: #8a93a6; margin-top: 16px; grid-column: 1 / -1; }
.contract-actions { position: sticky; bottom: 0; margin-top: 18px; display: flex; gap: 12px; align-items: center; padding: 14px 22px; background: rgba(11, 16, 32, 0.88); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 12px; }
.agree-box { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12.5px; cursor: pointer; }
input[type=checkbox] { accent-color: #5b8cff; width: 15px; height: 15px; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 18px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; letter-spacing: 0.4px; }
.field label i { color: var(--danger); font-style: normal; margin-left: 3px; }
.field.full { grid-column: 1 / -1; }
.input, select, textarea { width: 100%; background: rgba(255,255,255,0.045); border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); padding: 10px 13px; font-size: 13px; outline: none; transition: border 0.15s, box-shadow 0.15s; }
.input:focus, select:focus, textarea:focus { border-color: rgba(91, 140, 255, 0.6); box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.12); }
textarea { resize: vertical; min-height: 96px; line-height: 1.75; }
select option { background: #131c30; }
.form-foot { display: flex; gap: 12px; justify-content: flex-end; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.seg { display: inline-flex; padding: 3px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: 10px; gap: 3px; }
.seg button { padding: 7px 16px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12.5px; cursor: pointer; }
.seg button.on { background: rgba(91, 140, 255, 0.24); color: #fff; }

/* 弹层 */
.overlay { position: fixed; inset: 0; background: rgba(4, 8, 16, 0.72); backdrop-filter: blur(6px); z-index: 60; display: grid; place-items: center; padding: 24px; }
.modal { width: 100%; max-width: 560px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 40px 80px -30px #000; overflow: hidden; }
.modal-head { display: flex; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-head .x { margin-left: auto; cursor: pointer; color: var(--muted-2); font-size: 18px; line-height: 1; }
.modal-body { padding: 22px 24px; max-height: 72vh; overflow: auto; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
.sig-pad { background: #fff; border-radius: 10px; border: 1px dashed #b9c0d0; position: relative; }
.sig-pad canvas { display: block; width: 100%; height: 170px; border-radius: 10px; touch-action: none; cursor: crosshair; }
.sig-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #c3c9d6; font-size: 12.5px; pointer-events: none; }

/* 提示 */
.toast-root { position: fixed; right: 24px; bottom: 26px; z-index: 100; display: flex; flex-direction: column-reverse; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { padding: 11px 18px; border-radius: 10px; font-size: 13px; background: rgba(20, 30, 50, 0.95); border: 1px solid var(--line-strong); box-shadow: var(--shadow); animation: tin 0.2s ease; }
.toast.ok { border-color: rgba(52, 211, 153, 0.4); color: #b7f5da; }
.toast.err { border-color: rgba(248, 113, 113, 0.4); color: #ffd0d0; }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 1100px) {
  .proj-grid, .grid-2 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .kv-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto; flex-direction: row; overflow-x: auto; gap: 6px; padding: 8px 10px; border-right: 0; border-top: 1px solid var(--line); z-index: 40; }
  .side-brand, .side-foot, .nav-label { display: none; }
  .nav-group { flex-direction: row; }
  .nav-item { padding: 8px 12px; font-size: 12px; }
  .nav-item .nav-badge { display: none; }
  .topbar { padding: 0 18px; height: 56px; }
  .content { padding: 18px 16px 92px; }
  .toast-root { bottom: 88px; right: 14px; left: 14px; align-items: stretch; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .contract-page { padding: 28px 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-head h2 { font-size: 19px; }
}

/* 工程师入驻 */
.reg-line { margin: 14px 0 2px; font-size: 13px; color: var(--muted); text-align: center; }
.reg-line a { color: var(--accent); cursor: pointer; text-decoration: none; }
.reg-line a:hover { text-decoration: underline; }
.member-pending { background: rgba(255,176,32,.08); }

.invite-code { color: #c4b5fd; letter-spacing: 1.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
