: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 { display: flex; align-items: center; gap: 10px; padding: 14px 12px; border-radius: 8px; }
.brand span { display: block; font-size: 11px; letter-spacing: .14em; color: #91a4b5; }
.brand strong { display: block; margin-top: 0; font-size: 17px; color: #fff; }
.app-logo { flex: 0 0 auto; fill: none; overflow: visible; }
.brand-logo { width: 34px; height: 34px; filter: drop-shadow(0 8px 18px rgba(47,119,180,.28)); }
.login-logo { position: relative; z-index: 2; width: 104px; height: 104px; margin-bottom: 18px; filter: drop-shadow(0 18px 34px rgba(0,0,0,.34)); }
.logo-shell { fill: rgba(255,255,255,.08); stroke: url(#logo-g); stroke-width: 3; }
.logo-paper { fill: rgba(255,255,255,.16); stroke: rgba(228,247,255,.86); stroke-width: 2; stroke-linejoin: round; }
.logo-fold, .logo-line { stroke: rgba(228,247,255,.78); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.logo-check { stroke: #7dd3fc; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.logo-node { fill: #7dd3fc; stroke: rgba(255,255,255,.72); stroke-width: 1.5; }
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, .logout { gap: 10px; }
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); }
.nav-icon {
  flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .92;
}
nav a span, .logout span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.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; align-items: center; gap: 8px; 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-flex; margin-left: 6px; vertical-align: middle; }
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; }
.actions { margin-top: 16px; margin-bottom: 0; }
.form-grid + .actions, .form-grid + .btn, .form-grid + .btn-soft, .form-grid + .btn-danger { margin-top: 16px; }
.form > .btn, .form > .btn-soft, .form > .btn-danger { margin-top: 14px; }
.form .muted { margin: 12px 0 0; }
.form .muted + .btn, .form .notice + .btn { margin-top: 14px; }
.section-head form { display: flex; align-items: center; gap: 10px; }
.toolbar input, .toolbar select { width: auto; min-width: 180px; }
.filter-note { min-height: 39px; display: inline-flex; align-items: center; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); color: var(--muted); font-size: 13px; font-weight: 800; }
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; }
.password-field { align-content: start; }
.password-strength {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px;
  margin-top: 1px; padding: 9px 10px; border-radius: 8px;
  background: #f5f8fa; border: 1px solid var(--line); color: var(--muted);
}
.password-strength[hidden] { display: none; }
.password-bars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.password-bars i { height: 7px; border-radius: 999px; background: #d9e2ea; }
.password-strength b { font-size: 12px; white-space: nowrap; }
.password-strength.level-1 .active { background: var(--red); }
.password-strength.level-2 .active { background: var(--amber); }
.password-strength.level-3 .active { background: var(--blue); }
.password-strength.level-4 .active { background: var(--green); }
.wide { grid-column: 1 / -1; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: white; }
table { width: 100%; min-width: 980px; 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; }
.dict-form { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.dict-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dict-group { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.dict-group h4 { margin: 0 0 10px; color: var(--ink); font-size: 14px; }
.dict-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #e5edf3; }
.dict-item:last-child { border-bottom: 0; }
.dict-item b { display: block; color: var(--ink); font-size: 13px; }
.dict-item span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.dict-actions { display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.import-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0 14px; }
.import-stats div { padding: 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-soft); }
.import-stats small { display: block; color: var(--muted); font-weight: 800; }
.import-stats b { display: block; margin-top: 6px; color: var(--ink); font-size: 28px; }
.login-body {
  position: relative; display: grid; place-items: center; padding: 18px; overflow: hidden;
  background:
    linear-gradient(rgba(111, 180, 229, .08) 1px, transparent 1px) 0 0/34px 34px,
    linear-gradient(90deg, rgba(111, 180, 229, .08) 1px, transparent 1px) 0 0/34px 34px,
    radial-gradient(circle at 18% 18%, rgba(47,119,180,.42), transparent 32%),
    radial-gradient(circle at 82% 70%, rgba(31,154,138,.34), transparent 34%),
    linear-gradient(135deg, #09131d 0%, #122131 52%, #0b171d 100%);
}
.login-body::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 0 42%, rgba(98, 190, 238, .12) 48%, transparent 56% 100%);
  transform: translateX(-30%); animation: scan 7s linear infinite; pointer-events: none;
}
.login-card {
  position: relative; width: min(960px, 100%); display: grid; grid-template-columns: 1.05fr .95fr;
  border-radius: 8px; overflow: hidden; border: 1px solid rgba(129, 198, 232, .34);
  background: rgba(246, 250, 253, .94); box-shadow: 0 22px 70px rgba(0, 9, 18, .42);
}
.login-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.42), inset 0 0 34px rgba(47,119,180,.14);
}
.login-art {
  position: relative; min-height: 460px; display: grid; place-items: center; padding: 42px; overflow: hidden;
  color: white; text-align: center;
  background:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px) 0 0/30px 30px,
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px) 0 0/30px 30px,
    linear-gradient(145deg, #0d1a28 0%, #16466d 58%, #0d675d 100%);
}
.login-art::before {
  content: ""; position: absolute; width: 290px; height: 290px; border: 1px solid rgba(151,224,255,.34);
  transform: rotate(45deg); box-shadow: 0 0 42px rgba(47,119,180,.24); background: rgba(255,255,255,.025);
}
.login-art::after {
  content: ""; position: absolute; inset: 28px; border: 1px solid rgba(214, 244, 255, .2); border-radius: 8px;
}
.login-art h1 { position: relative; z-index: 2; font-size: 42px; margin: 0; letter-spacing: 0; max-width: 7em; text-shadow: 0 10px 26px rgba(0,0,0,.34); }
.login-visual { position: absolute; inset: 0; z-index: 1; }
.login-visual span { position: absolute; display: block; border: 1px solid rgba(203, 241, 255, .28); background: rgba(255,255,255,.06); box-shadow: 0 0 24px rgba(100, 213, 239, .14); }
.login-visual span:nth-child(1) { width: 86px; height: 54px; left: 12%; top: 18%; }
.login-visual span:nth-child(2) { width: 118px; height: 70px; right: 10%; top: 24%; }
.login-visual span:nth-child(3) { width: 74px; height: 74px; left: 18%; bottom: 18%; transform: rotate(45deg); }
.login-visual span:nth-child(4) { width: 132px; height: 38px; right: 14%; bottom: 20%; }
.login-form { position: relative; padding: 42px; display: grid; gap: 16px; align-content: center; background: rgba(255,255,255,.9); }
.login-form h2 { margin: 0 0 4px; color: var(--ink); font-size: 24px; }
.login-form input { background: #f8fbfd; border-color: #c8d8e5; }
.login-form input:focus { background: #fff; }
.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); }
@keyframes scan {
  from { transform: translateX(-42%); }
  to { transform: translateX(42%); }
}
@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; overflow: hidden; }
  .sidebar nav { min-height: 0; overflow-y: auto; padding-bottom: 6px; }
  .sidebar .logout { margin-top: 0; flex-shrink: 0; }
  .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; }
  .dashboard-hero { gap: 10px; margin-bottom: 12px; }
  .dashboard-hero .hero-main { padding: 14px; }
  .dashboard-hero .hero-kicker { font-size: 12px; }
  .dashboard-hero .tag { padding: 4px 8px; font-size: 11px; }
  .dashboard-hero .hero-main h2 { margin: 10px 0 5px; font-size: 22px; line-height: 1.18; }
  .dashboard-hero .hero-main p { font-size: 12px; }
  .dashboard-hero .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
  .dashboard-hero .metric-grid div { padding: 10px; min-height: 74px; }
  .dashboard-hero .metric-grid small { font-size: 12px; }
  .dashboard-hero .metric-grid strong { margin-top: 4px; font-size: 24px; }
  .dashboard-hero .metric-tile span { margin-top: 3px; font-size: 11px; }
  .dashboard-hero .progress-card { grid-template-columns: auto minmax(0, 1fr); justify-items: start; gap: 12px; padding: 14px; }
  .dashboard-hero .ring { --size: 112px; }
  .dashboard-hero .ring b { font-size: 24px; }
  .dashboard-hero .ring span { font-size: 11px; }
  .dashboard-hero .progress-summary { text-align: left; }
  .dashboard-hero .progress-summary strong { font-size: 16px; }
  .dashboard-hero .progress-summary span { font-size: 12px; }
  .hero-main h2 { font-size: 30px; }
  .metric-grid, .form-grid, .quick { grid-template-columns: 1fr; }
  .dict-grid { grid-template-columns: 1fr; }
  .import-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dict-item { align-items: flex-start; flex-direction: column; }
  .dict-actions { width: 100%; justify-content: flex-start; }
  .toolbar { display: grid; grid-template-columns: 1fr; }
  .toolbar input, .toolbar select, .toolbar a, .toolbar button, .filter-note { 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 { min-height: 210px; padding: 28px; }
  .login-art h1 { font-size: 30px; }
  .login-logo { width: 72px; height: 72px; margin-bottom: 12px; }
  .brand-logo { width: 32px; height: 32px; }
  .login-art::before { width: 170px; height: 170px; }
  .login-art::after { inset: 16px; }
  .login-visual span:nth-child(1), .login-visual span:nth-child(2), .login-visual span:nth-child(3), .login-visual span:nth-child(4) { transform: scale(.72); }
  .login-form { padding: 26px; }
}
