:root {
  --ink: #17211b;
  --muted: #65736a;
  --line: #dce5de;
  --paper: #fffef9;
  --canvas: #f3f6f2;
  --green: #176b48;
  --green-dark: #0f5337;
  --green-soft: #e6f3eb;
  --amber: #9a5b06;
  --amber-soft: #fff3d5;
  --red: #a33434;
  --red-soft: #fdeaea;
  --shadow: 0 12px 32px rgba(34, 58, 43, .08);
  --el-color-primary: #176b48;
  --el-color-primary-light-3: #5e967b;
  --el-color-primary-light-5: #8bb5a0;
  --el-color-primary-light-7: #b9d3c6;
  --el-color-primary-light-9: #e8f1ec;
  --el-color-primary-dark-2: #12563a;
  --el-border-radius-base: 9px;
  --el-font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; }
a { color: var(--green); text-decoration: none; }
button, input, select, textarea { font: inherit; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { background: #13271e; color: #e9f2ec; padding: 24px 18px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 10px; align-items: center; font-size: 19px; font-weight: 800; margin: 0 8px 28px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #13271e; background: #a8dfb9; }
.nav { display: grid; gap: 5px; }
.nav a { color: #bcd0c3; padding: 10px 12px; border-radius: 9px; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.nav a > i { width: 18px; text-align: center; }
.nav a:hover, .nav a.active { color: white; background: rgba(255,255,255,.1); }
.sidebar-foot { position: absolute; bottom: 22px; left: 26px; right: 26px; color: #8fa99a; font-size: 12px; }
.main { min-width: 0; }
.topbar { min-height: 66px; padding: 0 32px; background: rgba(255,255,255,.86); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; backdrop-filter: blur(12px); }
.topbar strong { font-size: 15px; }
.content { padding: 28px 32px 48px; max-width: 1500px; margin: 0 auto; }
.page-head { display: flex; gap: 18px; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.page-head h1 { margin: 0 0 5px; font-size: 26px; letter-spacing: -.02em; }
.page-head p { margin: 0; color: var(--muted); font-size: 14px; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: minmax(280px, .8fr) minmax(0, 1.8fr); }
.grid.cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.card-head { padding: 17px 19px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2 { margin: 0; font-size: 16px; }
.card-body { padding: 19px; }
.stat { padding: 20px; }
.stat span { display: block; color: var(--muted); font-size: 13px; }
.stat strong { display: block; margin-top: 7px; font-size: 28px; }
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 13px; align-items: end; }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.field { grid-column: span 12; display: grid; gap: 6px; }
.field.half { grid-column: span 6; }
.field.third { grid-column: span 4; }
.field label { font-size: 13px; font-weight: 700; }
.input, select, textarea { width: 100%; border: 1px solid #cbd8cf; border-radius: 9px; background: white; color: var(--ink); padding: 9px 11px; outline: none; }
.input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,107,72,.12); }
.el-select, .el-input { width: 100%; }
.el-button { font-weight: 700; }
.el-button > i { margin-right: 6px; }
.el-button.is-circle > i, .el-button > i:only-child { margin-right: 0; }
.el-checkbox { height: auto; }
.nickname-address { float: right; margin-left: 18px; color: var(--muted); font-size: 12px; }
.el-table { --el-table-header-bg-color: #f8faf8; --el-table-row-hover-bg-color: #fbfdfb; }
textarea { min-height: 180px; resize: vertical; line-height: 1.65; }
.btn { min-width: max-content; border: 0; border-radius: 9px; padding: 9px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font-weight: 700; font-size: 13px; white-space: nowrap; }
.btn.primary { color: white; background: var(--green); }
.btn.primary:hover { background: var(--green-dark); }
.btn.secondary { color: var(--ink); background: #edf2ee; }
.btn.danger { color: var(--red); background: var(--red-soft); }
.btn.small { padding: 6px 9px; font-size: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions > * { min-width: 0; }
.el-button, .el-link { white-space: nowrap; }
.el-button { min-width: max-content; }
.ajax-shell[v-cloak] { visibility: hidden; }
.toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.compact-form { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.compact-form .el-form-item { margin-bottom: 0; min-width: 180px; }
.table-wrap { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; vertical-align: middle; padding: 11px 12px; border-bottom: 1px solid #e7ede8; }
th { color: var(--muted); background: #f8faf8; font-size: 12px; white-space: nowrap; }
tbody tr:hover { background: #fbfdfb; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge.ok { color: var(--green); background: var(--green-soft); }
.badge.warn { color: var(--amber); background: var(--amber-soft); }
.badge.off { color: var(--muted); background: #edf0ee; }
.badge.bad { color: var(--red); background: var(--red-soft); }
.flash { margin-bottom: 18px; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.flash.success { color: var(--green); background: var(--green-soft); border: 1px solid #cce6d5; }
.flash.error { color: var(--red); background: var(--red-soft); border: 1px solid #efcaca; }
.empty { padding: 38px 20px; color: var(--muted); text-align: center; }
.muted { color: var(--muted); }
.raw-line { max-width: 460px; white-space: normal; line-height: 1.45; color: var(--muted); }
.review-row { background: #fffaf0; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, #dfeee3, transparent 35%), #eef3ef; }
.login-card { width: min(430px, 100%); background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 32px; }
.login-card h1 { margin: 0 0 8px; }
.login-card p { margin: 0 0 24px; color: var(--muted); }
.login-card .el-alert { margin-bottom: 18px; }
.login-card .el-form-item { margin-bottom: 18px; }
.auth-submit { width: 100%; }
.inline-form { display: inline; }
.check { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 980px) {
  .app-shell { width: 100%; grid-template-columns: minmax(0, 1fr); overflow-x: hidden; }
  .sidebar { position: static; height: auto; padding: 14px 18px; }
  .brand { margin-bottom: 12px; }
  .nav { display: flex; overflow-x: auto; }
  .nav a { white-space: nowrap; }
  .sidebar-foot { display: none; }
  .topbar { padding: 0 18px; }
  .content { padding: 20px 16px 40px; }
  .main, .content { min-width: 0; max-width: 100vw; overflow-x: hidden; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-head > .actions { width: 100%; }
  .card-head { align-items: flex-start; flex-direction: column; }
  .card-head > .actions { width: 100%; }
  .grid.two, .grid.cards { grid-template-columns: 1fr; }
  .field.half, .field.third { grid-column: span 12; }
}
