:root {
  --ink: #16212b;
  --muted: #6a7784;
  --line: #e2e8ed;
  --panel: #ffffff;
  --canvas: #f4f7f9;
  --accent: #0d7182;
  --accent-dark: #075563;
  --accent-soft: #e5f3f4;
  --danger: #b33a44;
  --shadow: 0 12px 34px rgba(20, 42, 54, .08);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 14px/1.6 "Segoe UI", "Microsoft YaHei", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.login-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #edf4f5; }
.login-panel { width: min(420px, 100%); padding: 42px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 22px; font-weight: 700; }
.brand-mark.small { width: 30px; height: 30px; font-size: 16px; flex: 0 0 auto; }
.eyebrow { margin: 0 0 7px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 28px; letter-spacing: 0; }
h2 { margin: 0; font-size: 24px; }
h3 { margin: 0; font-size: 18px; }
.muted { color: var(--muted); }
.stack-form { display: grid; gap: 16px; margin-top: 30px; }
label { display: grid; gap: 6px; color: #44515c; font-size: 13px; font-weight: 600; }
input, select, textarea { width: 100%; border: 1px solid #ccd6dc; border-radius: 4px; padding: 10px 11px; background: #fff; color: var(--ink); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13,113,130,.12); }
textarea { min-height: 96px; resize: vertical; }
.form-error { min-height: 22px; margin: 0; color: var(--danger); }
.primary-button, .secondary-button, .text-button, .icon-button { border: 0; border-radius: 4px; }
.primary-button { padding: 10px 17px; background: var(--accent); color: #fff; font-weight: 600; }
.primary-button:hover { background: var(--accent-dark); }
.secondary-button { padding: 9px 15px; border: 1px solid #cbd5da; background: #fff; color: #3f4d57; }
.secondary-button:hover { border-color: var(--accent); color: var(--accent); }
.text-button { padding: 2px 0; background: transparent; color: var(--muted); }
.text-button:hover { color: var(--accent); }
.icon-button { width: 32px; height: 32px; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; }
.app-view { min-height: 100vh; display: flex; }
.sidebar { width: 232px; display: flex; flex-direction: column; flex: 0 0 232px; background: #122b35; color: #d9e7e9; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 23px 22px; font-size: 16px; font-weight: 700; }
.brand-sub { display: block; margin-top: 1px; color: #86afb5; font-size: 11px; font-weight: 400; }
.nav-list { display: grid; gap: 4px; padding: 12px; }
.nav-item { padding: 11px 13px; border: 0; border-left: 3px solid transparent; background: transparent; color: #b7cbd0; text-align: left; }
.nav-item:hover, .nav-item.active { border-left-color: #71cad2; background: rgba(255,255,255,.08); color: #fff; }
.nav-divider { height: 1px; margin: 12px 4px; background: rgba(255,255,255,.14); }
.sidebar-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding: 18px 22px; border-top: 1px solid rgba(255,255,255,.12); color: #b7cbd0; font-size: 12px; }
.sidebar-foot .text-button { color: #b7cbd0; }
.main-area { min-width: 0; flex: 1; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 104px; padding: 24px 40px; border-bottom: 1px solid var(--line); background: #fff; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.status-dot { display: inline-flex; align-items: center; gap: 7px; color: #5c6c75; font-size: 12px; }
.status-dot i { width: 7px; height: 7px; border-radius: 50%; background: #2eaa72; }
.status-dot.offline i { background: var(--danger); }
.content-area { padding: 34px 40px 50px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head p { margin-bottom: 0; color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.metric { padding: 22px; border: 1px solid var(--line); background: var(--panel); }
.metric-label { color: var(--muted); font-size: 12px; }
.metric-value { margin-top: 7px; font-size: 28px; font-weight: 700; }
.metric-note { margin-top: 10px; color: var(--accent); font-size: 12px; }
.panel { border: 1px solid var(--line); background: var(--panel); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: 15px; }
.table-tools { display: flex; gap: 10px; align-items: center; }
.table-tools input { width: 240px; padding: 8px 10px; }
.table-tools button:disabled { cursor: not-allowed; opacity: .5; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: -7px 0 22px; padding: 14px 16px; border: 1px solid var(--line); background: #fbfcfc; }
.filter-control { display: inline-grid; min-width: 140px; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
.filter-control select { min-width: 140px; padding: 7px 9px; font-size: 13px; }
.page-size-control { min-width: 90px; }
.page-size-control select { min-width: 90px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 13px 16px; border-bottom: 1px solid #edf1f3; text-align: left; white-space: nowrap; }
th { background: #fbfcfc; color: #687680; font-size: 12px; font-weight: 600; }
td { color: #30404a; }
.select-cell { width: 44px; padding-left: 18px; padding-right: 4px; text-align: center; }
.select-cell input, .check-label input { width: auto; }
tr:last-child td { border-bottom: 0; }
.table-action { padding: 3px 7px; border: 0; background: transparent; color: var(--accent); }
.table-action.danger { color: var(--danger); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); color: var(--muted); }
.pager button { padding: 6px 10px; border: 1px solid #d2dce0; border-radius: 4px; background: #fff; }
.empty { padding: 50px 20px; color: var(--muted); text-align: center; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.setting-card { padding: 22px; border: 1px solid var(--line); background: #fff; }
.setting-card.wide { grid-column: 1 / -1; }
.setting-card h3 { margin-bottom: 14px; }
.setting-card textarea { min-height: 260px; font-family: Consolas, monospace; font-size: 12px; }
.modal { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 22px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(11, 25, 31, .48); }
.modal-panel { position: relative; width: min(760px, 100%); max-height: calc(100vh - 44px); overflow: auto; padding: 26px; background: #fff; box-shadow: var(--shadow); }
.modal-head, .modal-actions { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.modal-head { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.record-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding: 21px 0; }
.record-form .full { grid-column: 1 / -1; }
.check-label { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 10px 0; }
.file-control { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.file-control input[type="file"] { min-width: 150px; padding: 7px; }
.modal-actions { justify-content: flex-end; padding-top: 17px; border-top: 1px solid var(--line); }
.toast { position: fixed; right: 28px; bottom: 28px; z-index: 20; max-width: 360px; padding: 11px 15px; background: #122b35; color: #fff; opacity: 0; transform: translateY(12px); transition: .2s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 900px) { .sidebar { width: 190px; flex-basis: 190px; } .topbar, .content-area { padding-left: 24px; padding-right: 24px; } .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .app-view { display: block; } .sidebar { width: 100%; } .sidebar-brand { padding: 14px 18px; } .nav-list { display: flex; overflow: auto; padding: 0 10px 10px; } .nav-item { flex: 0 0 auto; border-left: 0; border-bottom: 3px solid transparent; } .nav-item:hover, .nav-item.active { border-bottom-color: #71cad2; } .nav-divider, .sidebar-foot { display: none; } .topbar { min-height: 88px; padding: 18px; } .topbar-actions .status-dot { display: none; } .content-area { padding: 22px 18px 35px; } .metric-grid { gap: 10px; } .metric { padding: 15px; } .metric-value { font-size: 22px; } .section-head { align-items: start; flex-direction: column; } .table-tools { width: 100%; flex-wrap: wrap; } .table-tools input { width: 100%; } .filter-bar { align-items: stretch; } .filter-control, .filter-control select, .page-size-control, .page-size-control select { width: 100%; } .settings-grid, .record-form { grid-template-columns: 1fr; } .setting-card.wide, .record-form .full { grid-column: auto; } .file-control { grid-template-columns: 1fr; } }
