:root {
  --ink: #1d2730;
  --text: #33414d;
  --muted: #71808d;
  --line: #dbe3ea;
  --surface: #ffffff;
  --surface-soft: #f5f8fa;
  --nav: #17212b;
  --nav-active: #243241;
  --blue: #2f77b4;
  --teal: #1f9a8a;
  --green: #2d9d66;
  --amber: #b7791f;
  --red: #c2414b;
  --shadow: 0 10px 30px rgba(29, 39, 48, .08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: #edf2f6;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 16px 12px;
  background: var(--nav); color: #d7e0e8; display: flex; flex-direction: column; gap: 14px;
}
.brand { padding: 14px 12px; border-radius: 8px; background: #202e3c; border: 1px solid rgba(255,255,255,.08); }
.brand span { display: block; font-size: 11px; letter-spacing: .14em; color: #91a4b5; }
.brand strong { display: block; margin-top: 5px; font-size: 18px; color: #fff; }
nav { display: grid; gap: 4px; }
nav a, .logout, .quick a, .btn, .btn-soft, .btn-danger, td button {
  min-height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; padding: 8px 12px; border: 1px solid transparent; cursor: pointer;
  white-space: nowrap;
}
nav a { justify-content: flex-start; color: #c5d0da; }
nav a.active, nav a:hover { color: #fff; background: var(--nav-active); border-color: rgba(255,255,255,.08); }
.logout { margin-top: auto; color: #f0c9cd; background: rgba(194,65,75,.12); border-color: rgba(194,65,75,.24); }
.main { min-width: 0; padding: 20px; }
.topbar {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); box-shadow: var(--shadow);
}
.topbar h1 { margin: 0; font-size: 24px; color: var(--ink); letter-spacing: 0; }
.topbar p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.profile { margin-left: auto; padding: 7px 11px; border-radius: 8px; background: #edf5fb; color: #245d8e; }
.menu { display: none; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--text); padding: 8px 11px; }
.card, .hero-main, .progress-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
}
.card { padding: 18px; margin-bottom: 16px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .75fr); gap: 16px; margin-bottom: 16px; }
.hero-main {
  position: relative; overflow: hidden; padding: 24px; color: white;
  background:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px) 0 0/32px 32px,
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px) 0 0/32px 32px,
    linear-gradient(135deg, #17212b, #2f77b4 58%, #1f9a8a);
}
.hero-main h2 { margin: 15px 0 8px; font-size: clamp(30px, 3.5vw, 48px); line-height: 1.08; letter-spacing: 0; }
.hero-main p { margin: 0; color: rgba(245,250,255,.82); }
.hero-kicker { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: rgba(245,250,255,.78); font-weight: 800; }
.tag {
  display: inline-flex; padding: 6px 10px; border-radius: 8px; background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.25); font-weight: 800; letter-spacing: .08em; font-size: 12px;
}
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.metric-grid div { padding: 14px; border-radius: 8px; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.18); }
.metric-grid small { display: block; color: rgba(245,250,255,.76); }
.metric-grid strong { display: block; margin-top: 7px; color: white; font-size: 30px; }
.metric-tile span { display: block; margin-top: 6px; color: rgba(245,250,255,.74); font-size: 12px; }
.progress-card { display: grid; place-items: center; align-content: center; gap: 14px; padding: 20px; }
.ring {
  --size: clamp(172px, 15vw, 214px);
  width: var(--size); height: var(--size); border-radius: 50%;
  display: grid; place-items: center; align-content: center;
  background: radial-gradient(circle, #fff 58%, transparent 59%), conic-gradient(var(--teal) calc(var(--p) * 1%), #dce5ec 0);
}
.ring b { font-size: 40px; color: var(--ink); }
.ring span { font-size: 13px; color: var(--muted); }
.progress-card p { color: var(--muted); margin-bottom: 0; }
.progress-summary { display: grid; gap: 4px; text-align: center; }
.progress-summary strong { color: var(--ink); font-size: 18px; }
.progress-summary span { color: var(--muted); font-size: 13px; }
.grid.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
h3 { margin: 0 0 14px; color: var(--ink); font-size: 17px; }
.section-head h3 { margin: 0; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.project-card { padding: 15px; border-radius: 8px; background: var(--surface-soft); border: 1px solid var(--line); }
.project-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; white-space: nowrap; }
.project-title strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.project-title span { flex: 0 0 auto; color: var(--blue); font-weight: 900; }
.project-meta { display: flex; align-items: baseline; gap: 6px; margin-top: 12px; color: var(--muted); }
.project-meta b { color: var(--ink); font-size: 28px; }
.bar { height: 8px; margin: 12px 0; border-radius: 999px; background: #dfe7ee; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--teal), var(--green)); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { padding: 5px 8px; border-radius: 8px; background: white; border: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.mini, .list-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #edf1f4; }
.mini span, .list-row span, .muted, .empty { color: var(--muted); }
.mini b { color: var(--ink); }
.mini small { display: block; margin-top: 4px; color: var(--muted); }
.mini-side { display: grid; justify-items: end; gap: 5px; flex: 0 0 auto; }
.mini-side span { font-size: 12px; }
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick a, .btn-soft { background: #f3f7fa; border-color: var(--line); color: #2c5e83; }
.quick a { justify-content: flex-start; min-height: 42px; }
.quick a:hover, .btn-soft:hover { border-color: #b9cbd9; background: #eaf2f8; }
.btn { border: 0; color: white; background: var(--blue); box-shadow: 0 8px 18px rgba(47,119,180,.2); }
.btn:hover { background: #286ba3; }
.btn-danger { color: var(--red); background: #fff4f4; border-color: #f2c8cc; }
.btn-soft.disabled { opacity: .45; cursor: not-allowed; }
form.inline { display: inline; }
td button { min-height: 28px; padding: 4px 9px; color: var(--red); background: #fff4f4; border: 1px solid #f2c8cc; }
.table-link { color: var(--blue); font-weight: 700; margin-right: 8px; }
.toolbar, .actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { width: auto; min-width: 180px; }
input, select, textarea {
  width: 100%; min-height: 39px; border: 1px solid #cfd9e2; border-radius: 8px;
  padding: 8px 10px; color: var(--text); background: #fff; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: #7caed5; box-shadow: 0 0 0 3px rgba(47,119,180,.12); }
textarea { min-height: 86px; resize: vertical; }
label { display: grid; gap: 7px; color: #485b69; font-size: 13px; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.wide { grid-column: 1 / -1; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: white; }
table { width: 100%; min-width: 860px; border-collapse: collapse; background: white; }
th, td { padding: 11px 12px; border-bottom: 1px solid #edf1f4; text-align: left; font-size: 13px; vertical-align: middle; }
th { color: #536575; background: #f5f8fa; font-weight: 800; }
.flash, .notice { padding: 11px 13px; border-radius: 8px; background: #eef8f6; border: 1px solid #c9e8e2; color: #1f766c; }
.notice-wide { margin-bottom: 16px; }
.flash.error { background: #fff4f4; border-color: #f2c8cc; color: var(--red); }
.status {
  display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 800; border: 1px solid transparent;
}
.status.completed { color: #1f754d; background: #ebf8f1; border-color: #c7ead8; }
.status.processing { color: #8a5a0a; background: #fff7e6; border-color: #f1d7a8; }
.status.pending { color: #b43b45; background: #fff1f2; border-color: #f1c5ca; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; color: var(--muted); }
.pager div { display: flex; gap: 8px; }
.readonly-stack { display: grid; gap: 10px; }
.login-body { display: grid; place-items: center; padding: 18px; background: #edf2f6; }
.login-card {
  width: min(940px, 100%); display: grid; grid-template-columns: 1.02fr .98fr;
  border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: white;
}
.login-art { display: grid; place-items: center; padding: 42px; color: white; background: linear-gradient(135deg, #17212b, #2f77b4 62%, #1f9a8a); text-align: center; }
.login-art h1 { font-size: 38px; margin: 0; letter-spacing: 0; max-width: 8em; }
.login-form { padding: 38px; display: grid; gap: 16px; align-content: center; }
.login-form h2 { margin: 0; color: var(--ink); }
.captcha-row { display: grid; grid-template-columns: 1fr 126px; gap: 10px; }
.captcha-row img { height: 42px; border-radius: 8px; cursor: pointer; border: 1px solid var(--line); }
@media (max-width: 1280px) {
  .shell { grid-template-columns: 220px minmax(0, 1fr); }
  .main { padding: 18px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 270px; transform: translateX(-105%); transition: .18s ease; }
  .menu-open .sidebar { transform: translateX(0); }
  .menu { display: inline-flex; }
  .hero, .grid.two { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .main { padding: 12px; }
  .topbar { align-items: flex-start; }
  .topbar h1 { font-size: 21px; }
  .profile { display: none; }
  .card, .hero-main, .progress-card { padding: 16px; }
  .hero-main h2 { font-size: 30px; }
  .metric-grid, .form-grid, .quick { grid-template-columns: 1fr; }
  .toolbar { display: grid; grid-template-columns: 1fr; }
  .toolbar input, .toolbar select, .toolbar a, .toolbar button { width: 100%; }
  .project-title { white-space: normal; flex-wrap: wrap; }
  .project-title span { width: 100%; }
  .pager { align-items: stretch; flex-direction: column; }
  .pager div, .pager a, .pager span.btn-soft { width: 100%; }
  .login-card { grid-template-columns: 1fr; }
  .login-art { padding: 28px; }
  .login-art h1 { font-size: 30px; }
  .login-form { padding: 26px; }
}
