:root {
  --navy: #152238;
  --navy-2: #1c2e4a;
  --ink: #1c2430;
  --muted: #5b6b7c;
  --bg: #e8edf2;
  --sheet: #ffffff;
  --line: #d5dde6;
  --orange: #e85d04;
  --orange-d: #c44d03;
  --brick: #c0392b;
  --ok: #2e7d4f;
  --warn-bg: #fff4e5;
  --warn-fg: #9a4d00;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif; color: var(--ink); background: var(--bg); }
button, input, select { font-family: inherit; }
.hidden { display: none !important; }

/* login */
.login-wrap { min-height: 100%; display: flex; }
.login-left {
  width: 42%;
  background: var(--navy);
  color: #e8edf2;
  display: flex;
  align-items: flex-end;
  padding: 56px 48px;
}
.login-name { font-size: 40px; font-weight: 650; letter-spacing: 0.08em; }
.login-line { margin: 16px 0 0; color: #9aabc0; font-size: 14px; line-height: 1.7; max-width: 280px; }
.login-right { flex: 1; display: flex; align-items: center; justify-content: center; background: #f4f6f8; }
.login-card { width: 360px; }
.login-card h1 { margin: 0 0 6px; font-size: 22px; font-weight: 650; }
.login-sub, .hint { color: var(--muted); font-size: 13px; line-height: 1.6; }
.login-card label { display: block; margin: 16px 0 6px; font-size: 12px; color: var(--muted); }
.login-card input, .field, select, textarea {
  width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 4px;
  padding: 0 11px; font-size: 14px; outline: none; background: #fff; color: var(--ink);
}
.login-card input:focus, .field:focus, select:focus { border-color: #7a93b0; }
textarea.field { height: 88px; padding: 10px; resize: vertical; }
.login-card button {
  width: 100%; height: 42px; margin-top: 22px; border: 0; border-radius: 4px;
  background: var(--orange); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
}
.login-card button:hover { background: var(--orange-d); }
.error { color: var(--brick); min-height: 20px; font-size: 13px; }

/* chrome */
.app { min-height: 100%; display: flex; flex-direction: column; }
.chrome {
  height: 52px; background: var(--navy); color: #e8edf2;
  display: flex; align-items: center; gap: 18px; padding: 0 16px 0 18px; flex-shrink: 0;
}
.chrome-brand { font-size: 16px; font-weight: 650; letter-spacing: 0.12em; margin-right: 8px; }
.chrome-grow { flex: 1; }
.chrome-user { text-align: right; line-height: 1.25; }
.who-name { font-size: 13px; font-weight: 600; color: #fff; }
.who-role { font-size: 11px; color: #9aabc0; }
.tenant-wrap { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #9aabc0; }
.tenant-wrap select {
  width: 180px; height: 30px; background: var(--navy-2); color: #e8edf2; border-color: #314662;
}
.chrome .ghost {
  height: 30px; padding: 0 12px; border-radius: 4px; cursor: pointer;
  border: 1px solid #314662; background: transparent; color: #c5d0dc;
}
.chrome .ghost:hover { background: var(--navy-2); color: #fff; }

.shell { display: flex; flex: 1; min-height: 0; }
.sider { width: 188px; background: #1a2740; flex-shrink: 0; padding: 10px 0 24px; }
.nav-label { color: #6d7f96; font-size: 11px; padding: 16px 16px 6px; }
.sider a {
  display: flex; align-items: center; gap: 8px;
  color: #b7c4d4; text-decoration: none; padding: 8px 14px; font-size: 13px;
  border-left: 3px solid transparent;
}
.sider a .ico {
  width: 22px; height: 22px; border-radius: 4px; background: #243552;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; color: #9aabc0; flex-shrink: 0;
}
.sider a.active { background: #243552; color: #fff; border-left-color: var(--orange); }
.sider a.active .ico { background: var(--orange); color: #fff; }
.sider a:hover { color: #fff; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pagehead { padding: 18px 24px 0; }
.page-title { font-size: 20px; font-weight: 650; }
.page-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.content { padding: 16px 24px 40px; }

.btn {
  height: 40px; border: 0; border-radius: 4px; background: var(--orange); color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer; padding: 0 16px;
}
.btn:hover { background: var(--orange-d); }
.btn.secondary {
  background: #fff; color: var(--ink); width: auto; padding: 0 12px; height: 32px; margin: 0; font-size: 13px;
  border: 1px solid var(--line); font-weight: 500;
}
.btn.secondary:hover { border-color: #b7c4d4; }
.btn.secondary.on, .js-cat.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.danger { background: var(--brick); color: #fff; width: auto; padding: 0 12px; height: 32px; margin: 0; border: 0; }
.ghost { border: 1px solid var(--line); background: #fff; height: 32px; padding: 0 12px; border-radius: 4px; cursor: pointer; color: var(--ink); }

/* panels */
.kpi {
  display: flex; background: var(--sheet); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 14px;
}
.kpi-item {
  flex: 1; padding: 16px 18px; border-right: 1px solid var(--line); min-width: 0;
}
.kpi-item:last-child { border-right: 0; }
.kpi-item b { display: block; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi-item span { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.kpi-item.alert b { color: var(--orange); }

.dash-grid { display: grid; grid-template-columns: 280px 1fr; gap: 14px; }
.panel { background: var(--sheet); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.panel-h {
  padding: 12px 16px; font-size: 13px; font-weight: 650;
  border-bottom: 1px solid var(--line); background: #f7f9fb;
}
.shortcuts a {
  display: block; padding: 11px 16px; color: var(--ink); text-decoration: none; font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.shortcuts a:last-child { border-bottom: 0; }
.shortcuts a:hover { background: #f4f7fa; color: var(--orange-d); }
.feed { list-style: none; margin: 0; padding: 8px 0 12px; }
.feed li { display: flex; gap: 12px; padding: 10px 16px; align-items: flex-start; }
.feed i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--orange); margin-top: 6px; flex-shrink: 0;
}
.feed div { flex: 1; font-size: 13px; line-height: 1.5; }
.feed time { font-size: 12px; color: var(--muted); white-space: nowrap; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.card { background: var(--sheet); border-radius: 6px; padding: 16px; border: 1px solid var(--line); }
.card h3 { margin: 0 0 12px; font-size: 14px; font-weight: 650; }
.stat .n { font-size: 24px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 12px; margin-top: 4px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input { max-width: 280px; height: 32px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; background: #f4f7fa; }
tr:hover td { background: #f7f9fb; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 3px; font-size: 12px; }
.tag-wait { color: var(--warn-fg); background: var(--warn-bg); }
.tag-ok { color: var(--ok); background: #e7f6ec; }
.tag-no { color: var(--brick); background: #fdecea; }
.tag-info { color: #1c2e4a; background: #e8edf2; }
.muted { color: var(--muted); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.modal {
  position: fixed; inset: 0; background: rgba(21, 34, 56, .48);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.dialog { width: min(640px, 92vw); background: #fff; border-radius: 8px; padding: 22px; max-height: 86vh; overflow: auto; }
.dialog h2 { margin: 0 0 16px; font-size: 17px; font-weight: 650; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.list-plain { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.warn {
  background: var(--warn-bg); color: var(--warn-fg); padding: 10px 14px; border-radius: 6px;
  margin-bottom: 14px; font-size: 13px; border-left: 4px solid var(--orange);
}
.warn a { color: var(--orange-d); font-weight: 650; }
.photos { display: flex; gap: 8px; flex-wrap: wrap; }
.photos img { width: 72px; height: 72px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; }
  .kpi { flex-wrap: wrap; }
  .kpi-item { min-width: 25%; border-bottom: 1px solid var(--line); }
  .login-left { display: none; }
  .sider { width: 72px; }
  .sider a { font-size: 0; padding: 10px; justify-content: center; }
  .sider a .ico { font-size: 11px; }
  .nav-label { display: none; }
}
