:root {
  --green-900: #0f3b2c;
  --green-800: #17513c;
  --green-700: #1f6b4f;
  --green-600: #2c8a64;
  --green-500: #37a777;
  --green-400: #62c79a;
  --green-200: #bfe9d5;
  --green-100: #e6f8ef;
  --ink: #16302a;
  --ink-2: #4b6b60;
  --ink-3: #7d968c;
  --white: #ffffff;
  --bg: linear-gradient(160deg, #eefaf3 0%, #dff3e9 45%, #eaf9f1 100%);
  --shadow-lg: 0 22px 48px rgba(20, 74, 54, .14), 0 6px 14px rgba(20, 74, 54, .06);
  --shadow-md: 0 12px 28px rgba(20, 74, 54, .12), 0 3px 8px rgba(20, 74, 54, .05);
  --shadow-sm: 0 4px 12px rgba(20, 74, 54, .08);
  --radius: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font-family: inherit; font-size: 14px; outline: none; }
a { color: inherit; text-decoration: none; }

/* ---------- login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 32px; position: relative; overflow: hidden;
}
.login-wrap::before, .login-wrap::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(2px);
}
.login-wrap::before {
  width: 520px; height: 520px; left: -120px; top: -140px;
  background: radial-gradient(circle at 30% 30%, rgba(98,199,154,.55), rgba(191,233,213,.15));
}
.login-wrap::after {
  width: 620px; height: 620px; right: -160px; bottom: -220px;
  background: radial-gradient(circle at 60% 40%, rgba(44,138,100,.28), rgba(191,233,213,.08));
}
.login-card {
  position: relative; z-index: 2; width: 880px; max-width: 100%;
  display: grid; grid-template-columns: 1.05fr .95fr;
  background: rgba(255,255,255,.72); backdrop-filter: blur(18px);
  border-radius: 26px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.login-brand {
  padding: 54px 44px; color: #fff;
  background: linear-gradient(150deg, var(--green-800), var(--green-600) 62%, #4cb98a);
  position: relative;
}
.login-brand h1 { font-size: 26px; letter-spacing: .5px; }
.login-brand p { margin-top: 14px; font-size: 13.5px; line-height: 1.9; color: rgba(255,255,255,.82); }
.login-brand .orb {
  position: absolute; border-radius: 50%; background: rgba(255,255,255,.12);
}
.login-brand .orb.a { width: 180px; height: 180px; right: -50px; bottom: -40px; }
.login-brand .orb.b { width: 90px; height: 90px; right: 70px; bottom: 90px; background: rgba(255,255,255,.08); }
.login-brand ul { margin-top: 30px; list-style: none; }
.login-brand li {
  font-size: 13px; color: rgba(255,255,255,.9); padding: 7px 0 7px 22px; position: relative;
}
.login-brand li::before {
  content: ""; position: absolute; left: 0; top: 12px; width: 9px; height: 9px;
  border-radius: 3px; background: rgba(255,255,255,.75);
}
.login-form { padding: 54px 44px; display: flex; flex-direction: column; justify-content: center; }
.login-form h2 { font-size: 20px; }
.login-form .hint { color: var(--ink-3); font-size: 12.5px; margin-top: 8px; }
.field { margin-top: 18px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 7px; }
.field input, .field select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid #dceee4;
  background: #fff; box-shadow: inset 0 2px 5px rgba(20,74,54,.05);
}
.field input:focus, .field select:focus { border-color: var(--green-400); box-shadow: 0 0 0 4px rgba(98,199,154,.18); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 12px; border: 0; cursor: pointer;
  background: linear-gradient(160deg, var(--green-500), var(--green-700));
  color: #fff; font-weight: 600; letter-spacing: .3px;
  box-shadow: 0 10px 22px rgba(31,107,79,.28), inset 0 1px 0 rgba(255,255,255,.28);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 26px rgba(31,107,79,.34); }
.btn:active { transform: translateY(0); }
.btn.block { width: 100%; padding: 13px; margin-top: 24px; }
.btn.ghost {
  background: #fff; color: var(--green-700); border: 1px solid var(--green-200);
  box-shadow: var(--shadow-sm);
}
.btn.mini { padding: 7px 12px; font-size: 12.5px; border-radius: 9px; }
.login-err { margin-top: 14px; color: #c0392b; font-size: 12.5px; min-height: 18px; }
.demo-accounts {
  margin-top: 22px; padding: 12px 14px; border-radius: 12px; background: var(--green-100);
  font-size: 12px; color: var(--ink-2); line-height: 1.9;
}
.demo-accounts b { color: var(--green-700); }

/* ---------- shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; flex: 0 0 236px; padding: 22px 16px;
  background: linear-gradient(180deg, #14483a, #16533f 55%, #1a6249);
  color: #dff3e9; display: flex; flex-direction: column; gap: 6px;
  box-shadow: 12px 0 34px rgba(15,59,44,.18); position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(150deg, #7fe0b3, #37a777); color: #0f3b2c; font-weight: 800;
  box-shadow: 0 8px 18px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.5);
}
.brand .t { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: .4px; }
.brand .s { font-size: 11px; color: rgba(223,243,233,.6); margin-top: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px;
  cursor: pointer; font-size: 13.5px; color: rgba(223,243,233,.86); transition: all .16s;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active {
  background: linear-gradient(120deg, rgba(127,224,179,.26), rgba(255,255,255,.10));
  color: #fff; font-weight: 650; box-shadow: inset 0 0 0 1px rgba(127,224,179,.34);
}
.nav-item .ico { width: 18px; text-align: center; opacity: .9; }
.nav-sub { margin: 2px 0 6px 30px; display: none; }
.nav-group.open .nav-sub { display: block; }
.nav-sub a {
  display: block; padding: 7px 10px; border-radius: 9px; font-size: 12.8px;
  color: rgba(223,243,233,.72); cursor: pointer;
}
.nav-sub a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-sub a.active { background: rgba(127,224,179,.18); color: #fff; }
.sidebar-foot {
  margin-top: auto; padding: 14px 10px 4px; font-size: 11.5px;
  color: rgba(223,243,233,.5); border-top: 1px solid rgba(255,255,255,.08);
}
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 66px; display: flex; align-items: center; gap: 16px; padding: 0 26px;
  background: rgba(255,255,255,.68); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(31,107,79,.08); position: sticky; top: 0; z-index: 20;
}
.crumb { font-size: 13px; color: var(--ink-3); }
.crumb b { color: var(--ink); font-size: 15px; font-weight: 700; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.pill {
  padding: 6px 12px; border-radius: 999px; background: #fff; font-size: 12px;
  color: var(--green-700); box-shadow: var(--shadow-sm); font-weight: 600;
}
.avatar {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(150deg, #8ee7bd, #37a777); color: #0f3b2c; font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.userbox { display: flex; align-items: center; gap: 10px; }
.userbox .n { font-size: 13px; font-weight: 650; }
.userbox .r { font-size: 11.5px; color: var(--ink-3); }
.content { padding: 24px 26px 46px; }

/* ---------- cards ---------- */
.card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: 18px 20px;
}
.card h3 { font-size: 14.5px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card h3 .dot { width: 6px; height: 14px; border-radius: 3px; background: linear-gradient(180deg, var(--green-400), var(--green-700)); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi {
  background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
}
.kpi::after {
  content: ""; position: absolute; right: -24px; top: -24px; width: 84px; height: 84px;
  border-radius: 50%; background: radial-gradient(circle, rgba(98,199,154,.22), transparent 70%);
}
.kpi .l { font-size: 12.5px; color: var(--ink-3); }
.kpi .v { font-size: 26px; font-weight: 750; margin-top: 6px; letter-spacing: -.5px; }
.kpi .v small { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-left: 3px; }
.kpi .d { font-size: 11.5px; margin-top: 6px; }
.kpi .d.up { color: var(--green-600); }
.kpi .d.down { color: #cf5138; }
.kpi .d.warn { color: #c8871f; }
.grid-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; }
.grid-2e { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.section-gap { margin-top: 16px; }

/* ---------- table ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .sp { margin-left: auto; }
.search {
  padding: 9px 14px; border-radius: 10px; border: 1px solid #e2f0e8; background: #fff;
  min-width: 220px; box-shadow: inset 0 2px 4px rgba(20,74,54,.04);
}
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th {
  text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 600;
  padding: 11px 12px; background: #f4fbf7; white-space: nowrap;
}
th:first-child { border-radius: 10px 0 0 10px; }
th:last-child { border-radius: 0 10px 10px 0; }
td { padding: 12px; font-size: 13px; border-bottom: 1px solid #f0f7f3; }
tbody tr:hover td { background: #fafefb; }
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
}
.tag.ok { background: #e4f7ed; color: #1f7d55; }
.tag.warn { background: #fff4e0; color: #a9711a; }
.tag.bad { background: #fdeae6; color: #bd4430; }
.tag.info { background: #e8f3fd; color: #2b6ea8; }
.tag.mute { background: #f1f4f2; color: #7d968c; }
.empty { padding: 40px; text-align: center; color: var(--ink-3); font-size: 13px; }

/* ---------- charts ---------- */
.chart-row { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 8px; }
.chart-row .bar {
  flex: 1; border-radius: 8px 8px 4px 4px; min-height: 6px;
  background: linear-gradient(180deg, var(--green-400), var(--green-600));
  box-shadow: 0 8px 16px rgba(55,167,119,.24); position: relative;
}
.chart-row .bar span {
  position: absolute; bottom: -22px; left: 0; right: 0; text-align: center;
  font-size: 11px; color: var(--ink-3);
}
.donut { width: 132px; height: 132px; border-radius: 50%; position: relative; margin: 0 auto; }
.donut::after {
  content: ""; position: absolute; inset: 22px; border-radius: 50%; background: #fff;
  box-shadow: inset 0 3px 8px rgba(20,74,54,.07);
}
.donut .c {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 2;
  font-size: 17px; font-weight: 750;
}
.legend { margin-top: 14px; display: grid; gap: 7px; font-size: 12.5px; color: var(--ink-2); }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 7px; }

/* ---------- gantt ---------- */
.gantt { display: grid; gap: 8px; }
.gantt .row { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 10px; }
.gantt .lbl { font-size: 12.5px; color: var(--ink-2); }
.gantt .track {
  height: 26px; border-radius: 8px; background: #f2f9f5; position: relative;
  box-shadow: inset 0 2px 4px rgba(20,74,54,.05);
}
.gantt .bar {
  position: absolute; top: 4px; height: 18px; border-radius: 6px;
  background: linear-gradient(120deg, var(--green-400), var(--green-600));
  box-shadow: 0 6px 14px rgba(55,167,119,.28); font-size: 11px; color: #fff;
  display: flex; align-items: center; padding: 0 8px; white-space: nowrap;
}
.gantt .bar.risk { background: linear-gradient(120deg, #f08a6a, #cf5138); box-shadow: 0 6px 14px rgba(207,81,56,.3); }
.gantt .bar.pend { background: linear-gradient(120deg, #f5c96b, #dda22b); }

/* ---------- misc widgets ---------- */
.scan-box {
  border: 2px dashed var(--green-200); border-radius: 16px; padding: 34px; text-align: center;
  background: #fafffc;
}
.scan-box .code {
  width: 96px; height: 96px; margin: 0 auto 14px; border-radius: 14px;
  background: repeating-linear-gradient(45deg, #1f6b4f 0 6px, #fff 6px 12px),
              repeating-linear-gradient(-45deg, rgba(31,107,79,.55) 0 4px, transparent 4px 10px);
  box-shadow: var(--shadow-md);
}
.mic {
  width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; margin: 6px auto 12px;
  background: linear-gradient(150deg, #7fe0b3, #2c8a64); color: #fff; font-size: 26px;
  box-shadow: 0 14px 30px rgba(44,138,100,.34), inset 0 2px 0 rgba(255,255,255,.4);
}
.flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flow .step {
  padding: 8px 14px; border-radius: 10px; background: #f4fbf7; font-size: 12.5px;
  color: var(--ink-2); box-shadow: inset 0 0 0 1px #e6f3ec;
}
.flow .step.on { background: linear-gradient(120deg, var(--green-400), var(--green-600)); color: #fff; font-weight: 600; }
.flow .arrow { color: #9ad9ba; }
.and-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.and-card { border-radius: 14px; padding: 16px; background: #fff; box-shadow: var(--shadow-md); border-top: 4px solid var(--green-400); }
.and-card.fault { border-top-color: #cf5138; }
.and-card.miss { border-top-color: #e0a13a; }
.and-card.q { border-top-color: #d8b22c; }
.and-card .wt { font-size: 24px; font-weight: 750; letter-spacing: -0.5px; }
.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.site-card { background: #fff; border-radius: 14px; padding: 16px; box-shadow: var(--shadow-md); }
.site-card .d { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.bar-line { height: 6px; border-radius: 4px; background: #eef7f2; overflow: hidden; margin-top: 10px; }
.bar-line i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--green-400), var(--green-600)); }
.perm-table td, .perm-table th { text-align: center; font-size: 12.5px; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; }
.perm-cell { display: inline-block; width: 22px; height: 22px; border-radius: 7px; cursor: pointer; line-height: 22px; font-size: 12px; }
.perm-cell.full { background: #d9f4e6; color: #1f7d55; }
.perm-cell.read { background: #fdf1da; color: #a9711e; }
.perm-cell.none { background: #f3f5f4; color: #b3c1ba; }
.modal-mask {
  position: fixed; inset: 0; background: rgba(12,38,28,.42); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 90; padding: 24px;
}
.modal-mask.on { display: flex; }
.modal {
  width: 560px; max-width: 100%; background: #fff; border-radius: 18px; padding: 24px;
  box-shadow: var(--shadow-lg); max-height: 88vh; overflow: auto;
}
.modal h3 { font-size: 16px; margin-bottom: 16px; }
.modal .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  background: rgba(20,72,58,.94); color: #fff; padding: 11px 20px; border-radius: 11px;
  font-size: 13px; opacity: 0; transition: all .25s; z-index: 200; pointer-events: none;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-2e { grid-template-columns: 1fr; }
  .login-card { grid-template-columns: 1fr; }
  .login-brand { display: none; }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .content { padding: 16px; }
}

/* ---------- 仓库 v2 ---------- */
.split{display:grid;grid-template-columns:340px 1fr;gap:14px;align-items:start}
@media(max-width:900px){.split{grid-template-columns:1fr}}
.qa-card{border:1px solid #e4f0e9;border-radius:10px;padding:10px 12px;margin-bottom:10px;cursor:pointer;transition:.15s}
.qa-card:hover{box-shadow:0 3px 10px rgba(20,74,54,.08)}
.qa-card.sel{border-color:#2c8a64;box-shadow:0 0 0 3px rgba(44,138,100,.14)}
.qa-sub{font-size:12.5px;color:var(--ink-2);margin-top:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.qa-meta{font-size:11.5px;color:var(--ink-3);margin-top:4px}
.field-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}
.field input[readonly]{background:#f4faf7;color:var(--ink-2)}
.cell{border:1px solid #dbe9e1;border-radius:6px;padding:6px 8px;width:100%;min-width:80px;font-size:12.5px}
.switch-wrap{display:inline-flex;align-items:center;gap:10px;cursor:pointer;user-select:none}
.switch{width:44px;height:24px;border-radius:12px;background:#c9ded4;position:relative;transition:.2s;flex:none}
.switch i{position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2);transition:.2s}
.switch.on{background:#2c8a64}
.switch.on i{left:23px}
.sw-txt b{font-size:13.5px;display:block}
.sw-txt em{font-style:normal;font-size:11.5px;color:var(--ink-3);display:block}
.live-head{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.live-label{font-size:13px;font-weight:650}
.live-time{font-size:11.5px;color:var(--ink-3)}
.live-wait{color:var(--ink-2)}
.spin{display:inline-block;width:14px;height:14px;border:2px solid #bfe0cf;border-top-color:#2c8a64;border-radius:50%;animation:sp .8s linear infinite;vertical-align:-2px;margin-right:8px}
@keyframes sp{to{transform:rotate(360deg)}}
.quick{display:flex;flex-wrap:wrap;gap:10px}
.quick-item{background:#f2f9f5;border:1px solid #dcefe5;border-radius:10px;padding:12px 18px;font-size:13px;font-weight:600;color:var(--ink);cursor:pointer;transition:.15s}
.quick-item:hover{background:#e2f3ea;transform:translateY(-1px)}
.dy-row{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid #f0f7f3;font-size:12.5px}
.dy-t{color:var(--ink-3);font-size:11.5px;flex:none;width:80px}
.dy-s{color:var(--ink-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
