:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --text: #17212b;
  --muted: #617080;
  --line: #dbe3e8;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-soft: #dff5f1;
  --blue: #2563eb;
  --amber: #a85f0c;
  --danger: #b42318;
  --sidebar: #142c33;
  --sidebar-muted: #a8bec3;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(20, 44, 51, .08);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; min-width: 320px; color: var(--text); background: var(--bg); font: 14px/1.5 "Microsoft YaHei", "PingFang SC", Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
button, a, select { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(15, 118, 110, .28); outline-offset: 2px; }
[hidden] { display: none !important; }
.sprite { position: absolute; overflow: hidden; width: 0; height: 0; }
svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 18px; } h2 { font-size: 21px; } h3 { font-size: 16px; }
small, .hint, .page-heading p, .topbar p, .panel header p { color: var(--muted); }

.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-lockup strong { display: block; color: inherit; font-size: 16px; letter-spacing: .2px; }
.brand-lockup small { display: block; margin-top: 1px; font-size: 11px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--primary); font-weight: 800; font-size: 18px; }
.entry { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #edf7f6; }
.login-panel { width: min(100%, 420px); padding: 36px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.login-heading { margin: 30px 0 22px; }.login-heading p { margin-top: 7px; color: var(--muted); }
.login-panel form { display: grid; gap: 15px; }.login-panel label, .form-panel label, .modal-card label { display: grid; gap: 6px; color: #344054; font-weight: 600; }
input, textarea, select { width: 100%; min-height: 40px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: #fff; }
textarea { min-height: 84px; resize: vertical; } input:hover, textarea:hover, select:hover { border-color: #b8c6ce; }
.login-panel .button { width: 100%; margin-top: 4px; }.hint { margin-top: 16px; font-size: 12px; }code { color: var(--primary-dark); }
.form-error { margin: 0; padding: 8px 10px; border-radius: 7px; color: #8d1f17; background: #fce9e7; font-size: 13px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { min-height: 100vh; display: flex; flex-direction: column; padding: 20px 13px 16px; color: #fff; background: var(--sidebar); }
.brand-link { padding: 0 9px; color: #fff; text-decoration: none; }.brand-link small { color: var(--sidebar-muted); }
.sidebar nav { display: grid; gap: 4px; margin-top: 32px; }.nav-link { min-height: 44px; display: flex; align-items: center; gap: 11px; padding: 0 12px; border-radius: 8px; color: var(--sidebar-muted); text-decoration: none; transition: color .16s ease, background .16s ease; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }.nav-link.active { color: #fff; background: var(--primary); }.nav-count { min-width: 21px; margin-left: auto; padding: 1px 6px; border-radius: 999px; color: #d9fffa; background: rgba(255,255,255,.16); font-size: 11px; text-align: center; }
.profile { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 15px 9px 0; border-top: 1px solid rgba(255,255,255,.14); }.profile strong, .profile small { display: block; }.profile small { color: var(--sidebar-muted); font-size: 11px; }.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--primary-dark); background: #d6f1ec; font-weight: 700; }

.workspace { min-width: 0; min-height: 100vh; display: grid; grid-template-rows: 68px minmax(0, 1fr); }.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 26px; border-bottom: 1px solid var(--line); background: var(--surface); }.topbar p { margin-top: 2px; font-size: 12px; }.top-actions { display: flex; align-items: center; gap: 8px; }.sync-status { color: var(--muted); font-size: 12px; }.sync-status::before { width: 7px; height: 7px; display: inline-block; margin-right: 5px; border-radius: 50%; background: #36a66d; content: ""; }
.content { overflow: auto; padding: 28px; }.page { max-width: 1360px; margin: 0 auto; }.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }.page-heading p { margin-top: 5px; }
.button, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; border: 1px solid transparent; border-radius: 7px; font-weight: 600; transition: background .16s ease, border-color .16s ease, color .16s ease; }.button { padding: 0 14px; }.button-primary { color: #fff; background: var(--primary); border-color: var(--primary); }.button-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }.button-secondary { color: var(--primary-dark); background: var(--primary-soft); border-color: #bce8df; }.button-secondary:hover { color: #fff; background: var(--primary); border-color: var(--primary); }.button-danger { color: var(--danger); border-color: #f4c7c3; background: #fff; }.button-danger:hover { color: #fff; background: var(--danger); border-color: var(--danger); }.icon-button { width: 40px; padding: 0; color: #475467; border-color: var(--line); background: #fff; }.icon-button:hover { color: var(--primary-dark); background: var(--primary-soft); border-color: #bce8df; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }.metric, .panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }.metric { min-height: 136px; display: grid; align-content: center; gap: 5px; padding: 18px; border-top: 3px solid var(--primary); }.metric:nth-child(2) { border-top-color: var(--blue); }.metric:nth-child(3) { border-top-color: var(--amber); }.metric span { color: var(--muted); font-size: 13px; }.metric strong { font-size: 28px; line-height: 1.2; }.metric small { font-size: 12px; }.panel header { min-height: 66px; display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }.notice, .unavailable { display: flex; align-items: flex-start; gap: 13px; padding: 20px; }.notice > svg, .unavailable > svg { width: 24px; height: 24px; color: var(--primary); }.notice strong { display: block; margin-bottom: 4px; }.notice p, .unavailable p { color: var(--muted); }.unavailable { max-width: 780px; }.unavailable div { display: grid; gap: 8px; }
.table-wrap { overflow-x: auto; }table { width: 100%; border-collapse: collapse; text-align: left; }th, td { padding: 13px 17px; border-bottom: 1px solid var(--line); vertical-align: middle; }th { color: var(--muted); background: #fafcfc; font-size: 12px; font-weight: 600; }td { color: #344054; }td strong, td small { display: block; }td small { margin-top: 2px; font-size: 12px; }.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }.row-actions .button { min-height: 32px; padding: 0 10px; font-size: 12px; }.empty { padding: 56px 20px; color: var(--muted); text-align: center; }
.form-panel { display: grid; gap: 17px; padding: 20px; }.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }.form-actions, .modal-card footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 3px; }.form-status { min-height: 20px; color: var(--muted); font-size: 13px; }.form-status.error { color: var(--danger); }.form-status.success { color: var(--primary-dark); }
.form-help { margin: 0; padding: 10px 12px; border-radius: 8px; color: var(--muted); background: #f4f8f8; font-size: 13px; line-height: 1.5; }.modal-card input[readonly] { color: var(--muted); background: #f8fafb; }
.modal { width: min(calc(100% - 32px), 720px); padding: 0; border: 0; border-radius: 12px; box-shadow: 0 24px 70px rgba(9,30,36,.24); }.modal::backdrop { background: rgba(15, 31, 36, .5); }.modal-card { display: grid; gap: 15px; padding: 22px; }.modal-card header { display: flex; justify-content: space-between; gap: 14px; }.modal-card header p { margin-top: 4px; color: var(--muted); }

@media (max-width: 860px) { .app-shell { grid-template-columns: 1fr; }.sidebar { min-height: auto; padding: 12px; }.sidebar nav { grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 14px 0 0; }.nav-link { justify-content: center; padding: 0 6px; font-size: 0; }.nav-link svg { width: 20px; height: 20px; }.nav-count { position: absolute; margin-left: 20px; margin-top: -24px; font-size: 10px; }.profile { display: none; }.workspace { min-height: calc(100vh - 124px); }.metric-grid { grid-template-columns: 1fr; }.content { padding: 20px; } }
@media (max-width: 560px) { .entry { padding: 14px; }.login-panel { padding: 26px 20px; }.topbar { padding: 0 16px; }.topbar h1 { font-size: 16px; }.sync-status { display: none; }.content { padding: 18px 14px; }.page-heading, .form-actions, .modal-card footer { align-items: stretch; flex-direction: column; }.page-heading .button, .form-actions .button, .modal-card footer .button { width: 100%; }.form-grid { grid-template-columns: 1fr; }.sidebar nav { gap: 2px; }.sidebar .brand-lockup { padding-left: 4px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
