:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --text: #172521;
  --text-secondary: #63716c;
  --text-tertiary: #8a9691;
  --line: #e1e8e5;
  --line-strong: #ced9d4;
  --primary: #14785e;
  --primary-hover: #0f654e;
  --primary-soft: #e8f4ef;
  --primary-deep: #123d32;
  --blue: #3569d4;
  --blue-soft: #edf3ff;
  --warning: #a95d10;
  --warning-soft: #fff4e5;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --shadow-card: 0 1px 2px rgba(23, 37, 33, .03), 0 8px 24px rgba(23, 37, 33, .04);
  --shadow-dialog: -18px 0 60px rgba(17, 36, 30, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
html.is-dialog-open,
html.is-dialog-open body { overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI Variable", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  margin: 0;
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
}
button, input, select { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.is-hidden { display: none !important; }
.sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}
:focus-visible { outline: 3px solid rgba(20, 120, 94, .2); outline-offset: 2px; }

/* 登录页 */
.login-gate {
  align-items: center;
  background: var(--bg);
  display: flex;
  min-height: 100vh;
  padding: 40px;
}
.login-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(27, 53, 45, .1);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  margin: 0 auto;
  max-width: 1040px;
  min-height: 610px;
  overflow: hidden;
  width: 100%;
}
.login-context {
  background: var(--primary-deep);
  color: #fff;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 52px 58px;
  position: relative;
}
.login-context::after {
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  bottom: -180px;
  content: "";
  height: 420px;
  pointer-events: none;
  position: absolute;
  right: -130px;
  width: 420px;
}
.login-brand, .brand { align-items: center; display: flex; gap: 13px; }
.brand-mark {
  align-items: center;
  background: var(--primary);
  border-radius: 12px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  height: 48px;
  justify-content: center;
  width: 48px;
}
.brand-mark svg { fill: currentColor; height: 25px; stroke: none; width: 25px; }
.login-brand strong, .brand strong { display: block; font-size: 17px; font-weight: 700; letter-spacing: .02em; }
.login-brand span, .brand span { display: block; font-size: 12px; margin-top: 3px; }
.login-brand span { color: rgba(255, 255, 255, .55); }
.login-context__copy { margin: auto 0; max-width: 500px; position: relative; z-index: 1; }
.section-kicker {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  margin: 0 0 14px;
}
.login-context .section-kicker { color: #8fd8c0; }
.login-context__copy h1 {
  font-size: clamp(34px, 4vw, 46px);
  letter-spacing: -.035em;
  line-height: 1.28;
  margin: 0;
}
.login-context__copy > p:last-child {
  color: rgba(255, 255, 255, .65);
  font-size: 14px;
  line-height: 1.8;
  margin: 24px 0 0;
  max-width: 430px;
}
.login-context__status, .service-status { align-items: center; display: flex; gap: 11px; position: relative; z-index: 1; }
.status-dot { background: #36b98a; border: 3px solid rgba(54, 185, 138, .16); border-radius: 50%; box-sizing: content-box; height: 7px; width: 7px; }
.login-context__status strong, .login-context__status small, .service-status strong, .service-status small { display: block; }
.login-context__status strong { font-size: 12px; }
.login-context__status small { color: rgba(255, 255, 255, .5); font-size: 11px; margin-top: 3px; }
.login-card { align-self: center; padding: 52px 48px; }
.login-card__heading h2 { font-size: 30px; letter-spacing: -.025em; margin: 0; }
.login-card__heading > p:last-child { color: var(--text-secondary); font-size: 14px; margin: 12px 0 0; }
.login-form { margin-top: 38px; }
.login-form > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 9px; }
.input-with-icon { position: relative; }
.input-with-icon svg { color: var(--text-tertiary); height: 19px; left: 14px; position: absolute; top: 15px; width: 19px; }
.login-form input {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  height: 50px;
  outline: 0;
  padding: 0 14px 0 44px;
  transition: border-color .18s, box-shadow .18s;
  width: 100%;
}
.login-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20, 120, 94, .1); }
.login-form .button { margin-top: 16px; }
.login-form__hint { color: var(--text-tertiary); font-size: 11px; line-height: 1.65; margin: 16px 0 0; }
.login-form__hint code { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 5px; color: var(--text-secondary); padding: 2px 5px; }
.login-error { color: var(--danger); font-size: 12px; min-height: 18px; }

/* 通用按钮 */
.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 600;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  transition: background-color .18s, border-color .18s, box-shadow .18s, transform .18s;
}
.button svg { height: 17px; width: 17px; }
.button--wide { width: 100%; }
.button--primary { background: var(--primary); color: #fff; }
.button--primary:hover:not(:disabled) { background: var(--primary-hover); box-shadow: 0 5px 14px rgba(20, 120, 94, .18); transform: translateY(-1px); }
.button--secondary { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.button--secondary:hover:not(:disabled) { background: var(--surface-soft); border-color: #b6c6bf; }

/* 工作台框架 */
.app-shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 26px 18px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { padding: 0 8px; }
.brand-mark--small { border-radius: 10px; height: 40px; width: 40px; }
.brand-mark--small svg { height: 21px; width: 21px; }
.brand span { color: var(--text-tertiary); }
.nav-list { margin-top: 42px; }
.nav-label { color: var(--text-tertiary); font-size: 10px; font-weight: 700; letter-spacing: .08em; margin: 0 10px 8px; }
.nav-label--second { margin-top: 26px; }
.nav-item {
  align-items: center;
  border-radius: 9px;
  color: var(--text-secondary);
  display: flex;
  font-size: 13px;
  font-weight: 600;
  gap: 11px;
  min-height: 42px;
  padding: 0 11px;
  text-decoration: none;
  transition: background-color .18s, color .18s;
}
.nav-item svg { height: 18px; width: 18px; }
.nav-item:hover { background: var(--surface-soft); color: var(--text); }
.nav-item--active { background: var(--primary-soft); color: var(--primary); }
.nav-item__external { font-size: 11px; margin: 0 0 0 auto; }
.sidebar__footer { border-top: 1px solid var(--line); margin-top: auto; padding-top: 18px; }
.service-status { padding: 0 8px 16px; }
.service-status strong { font-size: 11px; }
.service-status small { color: var(--text-tertiary); font-size: 10px; margin-top: 3px; }
.logout-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--text-secondary);
  display: flex;
  font-size: 12px;
  gap: 9px;
  min-height: 38px;
  padding: 0 9px;
  width: 100%;
}
.logout-button svg { height: 17px; width: 17px; }
.logout-button:hover { background: var(--danger-soft); color: var(--danger); }
.main-content { min-width: 0; padding: 42px clamp(28px, 4vw, 58px) 64px; }

/* 页面头部 */
.page-header { align-items: flex-end; display: flex; gap: 24px; justify-content: space-between; }
.breadcrumb { color: var(--text-tertiary); font-size: 11px; margin: 0 0 14px; }
.breadcrumb span { margin: 0 6px; }
.page-header h1 { font-size: clamp(30px, 4vw, 38px); letter-spacing: -.035em; margin: 0; }
.page-header__copy { color: var(--text-secondary); font-size: 13px; margin: 11px 0 0; }
.header-actions { display: flex; flex: 0 0 auto; gap: 9px; }

/* 统计概览 */
.stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 32px; }
.stat-card {
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  display: flex;
  gap: 15px;
  min-height: 136px;
  padding: 20px;
}
.stat-card__icon {
  align-items: center;
  background: var(--primary-soft);
  border-radius: 10px;
  color: var(--primary);
  display: flex;
  flex: 0 0 auto;
  height: 38px;
  justify-content: center;
  width: 38px;
}
.stat-card__icon svg { height: 20px; width: 20px; }
.stat-card--primary { background: var(--primary-deep); border-color: var(--primary-deep); color: #fff; }
.stat-card--primary .stat-card__icon { background: rgba(255, 255, 255, .12); color: #8fddc3; }
.stat-card--primary .stat-card__icon svg, .stat-card__icon--blue svg { fill: currentColor; stroke: none; }
.stat-card__icon--blue { background: var(--blue-soft); color: var(--blue); }
.stat-card--warning .stat-card__icon { background: var(--warning-soft); color: var(--warning); }
.stat-card p { color: var(--text-secondary); font-size: 12px; font-weight: 600; margin: 1px 0 8px; }
.stat-card > div:last-child { min-width: 0; }
.stat-card strong { display: block; font-size: 30px; letter-spacing: -.03em; line-height: 1; }
.stat-card span { color: var(--text-tertiary); display: block; font-size: 10px; margin-top: 10px; white-space: nowrap; }
.stat-card span b { color: inherit; }
.stat-card--primary p { color: rgba(255, 255, 255, .66); }
.stat-card--primary span { color: rgba(255, 255, 255, .48); }

/* 场站目录 */
.data-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  margin-top: 22px;
  overflow: hidden;
}
.data-section__header { align-items: center; display: flex; justify-content: space-between; padding: 22px 24px 18px; }
.data-section__header h2 { font-size: 18px; letter-spacing: -.01em; margin: 0; }
.data-section__header p { color: var(--text-tertiary); font-size: 11px; margin: 6px 0 0; }
.data-section__header p strong { color: var(--text-secondary); }
.data-section__legend { color: var(--text-tertiary); display: flex; font-size: 10px; gap: 16px; }
.data-section__legend span { align-items: center; display: inline-flex; gap: 6px; }
.legend-dot { border-radius: 50%; display: inline-block; height: 7px; width: 7px; }
.legend-dot--fresh { background: #2fa273; }
.legend-dot--stale { background: #d18a35; }
.data-toolbar {
  align-items: center;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 1fr) 180px auto;
  padding: 13px 24px;
}
.search-box { max-width: 480px; position: relative; }
.search-box > svg { color: var(--text-tertiary); height: 17px; left: 12px; position: absolute; top: 11px; width: 17px; }
.search-box input {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  font-size: 12px;
  height: 40px;
  outline: 0;
  padding: 0 38px;
  width: 100%;
}
.search-box input::-webkit-search-cancel-button { display: none; }
.search-box input:focus, .select-control select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20, 120, 94, .08); }
.search-box__clear { background: transparent; border: 0; color: var(--text-tertiary); font-size: 20px; height: 32px; line-height: 1; position: absolute; right: 4px; top: 4px; width: 32px; }
.search-box__clear:hover { color: var(--text); }
.select-control { position: relative; }
.select-control select {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  font-size: 12px;
  height: 40px;
  outline: 0;
  padding: 0 34px 0 12px;
  width: 100%;
}
.select-control svg { color: var(--text-tertiary); height: 16px; pointer-events: none; position: absolute; right: 11px; top: 12px; width: 16px; }
.switch-label { align-items: center; color: var(--text-secondary); cursor: pointer; display: flex; font-size: 11px; gap: 8px; white-space: nowrap; }
.switch-label input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.switch { background: #cbd5d1; border-radius: 12px; height: 22px; padding: 3px; transition: background-color .18s; width: 39px; }
.switch::after { background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); content: ""; display: block; height: 16px; transition: transform .18s; width: 16px; }
.switch-label input:checked + .switch { background: var(--primary); }
.switch-label input:checked + .switch::after { transform: translateX(17px); }
.switch-label input:focus-visible + .switch { outline: 3px solid rgba(20, 120, 94, .2); outline-offset: 2px; }
.table-wrap { min-height: 220px; overflow-x: auto; position: relative; }
table { border-collapse: collapse; min-width: 990px; width: 100%; }
th { color: var(--text-tertiary); font-size: 10px; font-weight: 600; letter-spacing: .02em; padding: 13px 18px; text-align: left; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; }
td { border-top: 1px solid var(--line); font-size: 11px; padding: 15px 18px; vertical-align: middle; }
tbody tr { transition: background-color .15s; }
tbody tr:hover { background: #fafcfb; }
.station-cell { min-width: 250px; }
.station-name { display: block; font-size: 13px; font-weight: 650; line-height: 1.45; max-width: 330px; }
.station-sub { color: var(--text-tertiary); display: block; font-size: 10px; line-height: 1.45; margin-top: 4px; max-width: 330px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { align-items: center; border-radius: 999px; display: inline-flex; font-size: 10px; font-weight: 600; gap: 6px; padding: 5px 8px; white-space: nowrap; }
.badge::before { background: currentColor; border-radius: 50%; content: ""; height: 5px; opacity: .85; width: 5px; }
.badge--open { background: var(--primary-soft); color: var(--primary); }
.badge--busy { background: var(--warning-soft); color: var(--warning); }
.badge--maintenance, .badge--closed { background: #f0f2f1; color: #67736e; }
.badge--inactive { background: #f0f2f1; color: #87918d; margin-left: 5px; }
.connector-count { min-width: 120px; }
.connector-count strong { color: var(--primary); font-size: 18px; letter-spacing: -.02em; }
.connector-count > span:not(.station-sub) { color: var(--text-secondary); }
.price-cell { min-width: 150px; }
.price-cell > strong { font-size: 11px; font-weight: 650; }
.quality-status { align-items: center; display: flex; gap: 7px; white-space: nowrap; }
.quality-status::before { background: #2fa273; border-radius: 50%; content: ""; height: 7px; width: 7px; }
.quality-status strong { color: var(--text-secondary); font-size: 10px; font-weight: 600; }
.quality-status--stale::before { background: #d18a35; }
.quality-status--stale strong { color: var(--warning); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.row-button { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 7px; font-size: 10px; font-weight: 600; min-height: 30px; padding: 0 10px; }
.row-button:hover { background: var(--surface-soft); border-color: #b8c6c0; }
.row-button--danger { border-color: #efc7c2; color: var(--danger); }
.row-button--danger:hover { background: var(--danger-soft); border-color: #e3aaa4; }
.empty-state { align-items: center; display: flex; flex-direction: column; padding: 64px 30px; }
.empty-state__icon { align-items: center; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 50%; color: var(--text-tertiary); display: flex; height: 48px; justify-content: center; width: 48px; }
.empty-state__icon svg { height: 21px; width: 21px; }
.empty-state strong { font-size: 14px; margin-top: 15px; }
.empty-state p { color: var(--text-tertiary); font-size: 11px; margin: 7px 0 0; }
.table-loading { align-items: center; color: var(--text-tertiary); display: flex; font-size: 11px; gap: 9px; justify-content: center; padding: 58px; }
.loading-spinner { animation: spin .8s linear infinite; border: 2px solid var(--line); border-radius: 50%; border-top-color: var(--primary); height: 17px; width: 17px; }
@keyframes spin { to { transform: rotate(360deg); } }
.pagination {
  align-items: center;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 62px;
  padding: 10px 24px;
}
.pagination > p { color: var(--text-tertiary); font-size: 10px; margin: 0; }
.pagination__controls, .pager-buttons, .page-size-control, .page-jump { align-items: center; display: flex; }
.pagination__controls { gap: 18px; }
.page-size-control { color: var(--text-tertiary); font-size: 10px; gap: 8px; white-space: nowrap; }
.page-size-control select {
  appearance: none;
  background: var(--surface-soft);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--text-secondary);
  font-size: 10px;
  height: 32px;
  padding: 0 24px 0 9px;
}
.pager-buttons { gap: 5px; }
.pager-buttons button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--text-secondary);
  display: inline-flex;
  font-size: 16px;
  height: 32px;
  justify-content: center;
  padding: 0;
  width: 32px;
}
.pager-buttons button:hover:not(:disabled) { background: var(--surface-soft); border-color: #b8c6c0; color: var(--text); }
.pager-buttons button:disabled { cursor: not-allowed; opacity: .38; }
.pager-buttons span { color: var(--text-secondary); font-size: 10px; min-width: 76px; text-align: center; }
.page-jump { color: var(--text-tertiary); font-size: 10px; gap: 6px; white-space: nowrap; }
.page-jump input {
  background: var(--surface-soft);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--text);
  font: inherit;
  height: 32px;
  padding: 0 6px;
  text-align: center;
  width: 48px;
}
.page-jump input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21, 126, 100, .1); outline: none; }
.page-jump input::-webkit-inner-spin-button { margin: 0; }
.page-jump button {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--text-secondary);
  font-size: 10px;
  height: 32px;
  padding: 0 10px;
}
.page-jump button:hover:not(:disabled) { background: var(--surface-soft); border-color: #b8c6c0; color: var(--text); }
.page-jump button:disabled { cursor: not-allowed; opacity: .38; }

/* 编辑抽屉 */
.station-dialog {
  background: transparent;
  border: 0;
  height: 100vh;
  margin: 0 0 0 auto;
  max-height: none;
  max-width: 780px;
  overscroll-behavior: contain;
  overflow: hidden;
  padding: 0;
  width: min(780px, 100vw);
}
.station-dialog::backdrop { background: rgba(16, 32, 27, .45); backdrop-filter: blur(2px); }
.station-form { background: var(--bg); box-shadow: var(--shadow-dialog); display: flex; flex-direction: column; height: 100vh; min-height: 0; overflow: hidden; }
.station-form__header {
  align-items: flex-start;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 26px 30px 23px;
}
.dialog-badge { background: var(--primary-soft); border-radius: 999px; color: var(--primary); display: inline-block; font-size: 10px; font-weight: 700; padding: 4px 8px; }
.station-form__header h2 { font-size: 25px; letter-spacing: -.025em; margin: 9px 0 0; }
.station-form__header p { color: var(--text-tertiary); font-size: 11px; margin: 7px 0 0; }
.icon-button { align-items: center; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 9px; color: var(--text-secondary); display: flex; height: 38px; justify-content: center; padding: 0; width: 38px; }
.icon-button svg { height: 19px; width: 19px; }
.icon-button:hover { background: #f0f3f1; color: var(--text); }
.station-form__body {
  flex: 1 1 auto;
  min-height: 0;
  overscroll-behavior: contain;
  overflow-y: auto;
  padding: 0 30px 30px;
  scrollbar-gutter: stable;
  touch-action: pan-y;
}
.form-section { border-bottom: 1px solid var(--line); display: grid; gap: 30px; grid-template-columns: 135px 1fr; padding: 28px 0; }
.form-section--last { border-bottom: 0; }
.form-section__heading { display: flex; gap: 10px; }
.form-section__heading > span { align-items: center; background: var(--primary-soft); border-radius: 7px; color: var(--primary); display: flex; flex: 0 0 auto; font-size: 9px; font-weight: 700; height: 25px; justify-content: center; width: 25px; }
.form-section__heading strong, .form-section__heading small { display: block; }
.form-section__heading strong { font-size: 13px; margin-top: 2px; }
.form-section__heading small { color: var(--text-tertiary); font-size: 9px; line-height: 1.45; margin-top: 5px; }
.field-grid { display: grid; gap: 17px 14px; grid-template-columns: 1fr 1fr; }
.field-grid--four { grid-template-columns: repeat(2, 1fr); }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span { color: var(--text-secondary); font-size: 10px; font-weight: 600; }
.field > span b { color: var(--danger); }
.field > small { color: var(--text-tertiary); font-size: 9px; margin-top: -2px; }
.field--wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 12px;
  outline: 0;
  transition: border-color .18s, box-shadow .18s;
  width: 100%;
}
.field input, .field select { height: 40px; padding: 0 11px; }
.field textarea { line-height: 1.55; min-height: 72px; padding: 10px 11px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20, 120, 94, .08); }
.field input::placeholder, .field textarea::placeholder { color: #a4adaa; }
.field--checkbox { align-items: center; flex-direction: row; gap: 9px; margin-top: 21px; }
.field--checkbox input { accent-color: var(--primary); height: 17px; padding: 0; width: 17px; }
.field--checkbox span { color: var(--text); }
.price-mode-fieldset { border: 0; grid-column: 1 / -1; margin: 0; min-width: 0; padding: 0; }
.price-mode-fieldset legend { color: var(--text-secondary); font-size: 10px; font-weight: 600; margin-bottom: 8px; }
.price-mode-switch { background: #eef2f0; border-radius: 10px; display: grid; gap: 3px; grid-template-columns: repeat(3, 1fr); padding: 3px; }
.price-mode-switch label { cursor: pointer; min-width: 0; position: relative; }
.price-mode-switch input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.price-mode-switch label > span { border: 1px solid transparent; border-radius: 8px; display: block; padding: 9px 10px; text-align: center; transition: background .18s, border-color .18s, box-shadow .18s; }
.price-mode-switch b, .price-mode-switch small { display: block; }
.price-mode-switch b { color: var(--text-secondary); font-size: 10px; }
.price-mode-switch small { color: var(--text-tertiary); font-size: 8px; margin-top: 3px; }
.price-mode-switch input:checked + span { background: var(--surface); border-color: var(--line); box-shadow: 0 2px 7px rgba(30, 48, 42, .08); }
.price-mode-switch input:checked + span b { color: var(--primary); }
.price-mode-switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(20, 120, 94, .14); }
.price-current-fields { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.price-current-fields__note { align-self: end; color: var(--text-tertiary); font-size: 9px; grid-column: 1 / -1; margin: -8px 0 0; }
.connector-derived { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 9px; color: var(--text-secondary); font-size: 10px; margin: 0; padding: 10px 12px; }
.connector-derived strong { color: var(--primary); font-size: 12px; }
.price-period-editor { background: #f6f8f7; border: 1px solid var(--line); border-radius: 11px; grid-column: 1 / -1; min-width: 0; padding: 13px; }
.price-period-editor__head { align-items: center; display: flex; gap: 16px; justify-content: space-between; }
.price-period-editor__head strong, .price-period-editor__head small { display: block; }
.price-period-editor__head strong { font-size: 11px; }
.price-period-editor__head small { color: var(--text-tertiary); font-size: 9px; margin-top: 4px; }
.button--compact { flex: 0 0 auto; font-size: 10px; height: 32px; padding: 0 12px; }
.price-period-editor__columns, .price-period-row { display: grid; gap: 7px; grid-template-columns: 1.2fr .82fr .82fr .9fr .9fr .9fr 30px; }
.price-period-editor__columns { color: var(--text-tertiary); font-size: 8px; padding: 13px 0 6px; }
.price-period-row { border-top: 1px solid var(--line); padding: 9px 0 0; }
.price-period-row + .price-period-row { margin-top: 9px; }
.price-period-row input { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 7px; font-size: 10px; height: 35px; min-width: 0; outline: 0; padding: 0 8px; width: 100%; }
.price-period-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20, 120, 94, .08); }
.price-period-row__remove { align-items: center; align-self: center; background: transparent; border: 0; border-radius: 6px; color: var(--text-tertiary); display: flex; font-size: 18px; height: 30px; justify-content: center; padding: 0; width: 30px; }
.price-period-row__remove:hover { background: #fdeceb; color: var(--danger); }
.price-details { margin-top: 5px; }
.price-details summary { color: var(--primary); cursor: pointer; font-size: 9px; font-weight: 650; list-style-position: inside; }
.price-details__rows { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 7px; display: grid; gap: 5px; margin-top: 6px; max-width: 310px; padding: 7px 8px; }
.price-details__row { color: var(--text-secondary); display: grid; font-size: 8px; gap: 6px; grid-template-columns: auto auto 1fr; white-space: nowrap; }
.price-details__row b { color: var(--text); text-align: right; }
.station-form__footer { align-items: center; background: var(--surface); border-top: 1px solid var(--line); display: flex; gap: 16px; justify-content: space-between; padding: 16px 30px; }
.station-form__footer > p { color: var(--danger); flex: 1; font-size: 10px; line-height: 1.45; margin: 0; }
.station-form__actions { display: flex; gap: 8px; }

/* 反馈 */
.toast {
  background: var(--text);
  border-radius: 10px;
  bottom: 26px;
  box-shadow: 0 12px 32px rgba(23, 37, 33, .22);
  color: #fff;
  font-size: 12px;
  left: 50%;
  max-width: min(440px, calc(100vw - 32px));
  opacity: 0;
  padding: 13px 18px;
  pointer-events: none;
  position: fixed;
  text-align: center;
  transform: translate(-50%, 16px);
  transition: opacity .22s, transform .22s;
  z-index: 300;
}
.toast--visible { opacity: 1; transform: translate(-50%, 0); }
.toast--error { background: var(--danger); }

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .data-toolbar { grid-template-columns: minmax(230px, 1fr) 180px; }
  .switch-label { grid-column: 1 / -1; }
}

@media (max-width: 920px) {
  .app-shell { grid-template-columns: 78px minmax(0, 1fr); }
  .sidebar { padding: 22px 12px 18px; }
  .brand { justify-content: center; padding: 0; }
  .brand > div:last-child, .nav-label, .nav-item span, .service-status > div, .logout-button { font-size: 0; }
  .nav-list { margin-top: 34px; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item svg { height: 20px; width: 20px; }
  .nav-label--second { border-top: 1px solid var(--line); display: block; margin: 20px 4px 10px; }
  .nav-item__external { display: none; }
  .service-status { justify-content: center; padding: 0 0 15px; }
  .logout-button { display: flex; height: 38px; justify-content: center; padding: 0; }
  .logout-button svg { height: 18px; width: 18px; }
  .main-content { padding-left: 28px; padding-right: 28px; }
  .page-header { align-items: stretch; flex-direction: column; }
  .header-actions { align-self: flex-start; }
  .login-shell { grid-template-columns: 1fr 400px; }
  .login-context { padding: 44px 38px; }
}

@media (max-width: 720px) {
  .price-current-fields { grid-template-columns: 1fr; }
  .price-period-editor__columns { display: none; }
  .price-period-row { grid-template-columns: repeat(2, minmax(0, 1fr)) 30px; }
  .price-period-row input:first-child { grid-column: 1 / -1; }
  .price-period-row__remove { grid-column: 3; grid-row: 2; }
}

@media (max-width: 720px) {
  .login-gate { padding: 18px; }
  .login-shell { display: block; min-height: 0; }
  .login-context { min-height: 210px; padding: 30px; }
  .login-context__copy { margin-top: 34px; }
  .login-context__copy h1 { font-size: 28px; }
  .login-context__copy > p:last-child, .login-context__status { display: none; }
  .login-card { padding: 34px 28px 28px; }
  .app-shell { display: block; }
  .sidebar { align-items: center; flex-direction: row; height: auto; padding: 12px 16px; position: static; }
  .brand { justify-content: flex-start; }
  .brand > div:last-child { display: block; font-size: initial; }
  .nav-list, .service-status { display: none; }
  .sidebar__footer { border: 0; margin: 0 0 0 auto; padding: 0; }
  .logout-button { width: 38px; }
  .main-content { padding: 28px 16px 48px; }
  .page-header h1 { font-size: 30px; }
  .header-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .header-actions .button--primary { grid-column: 1 / -1; grid-row: 1; }
  .stat-grid { gap: 10px; grid-template-columns: 1fr 1fr; margin-top: 24px; }
  .stat-card { display: block; min-height: 142px; padding: 15px; }
  .stat-card__icon { height: 32px; margin-bottom: 14px; width: 32px; }
  .stat-card__icon svg { height: 17px; width: 17px; }
  .stat-card strong { font-size: 27px; }
  .data-section__header { align-items: flex-start; flex-direction: column; gap: 13px; padding: 18px; }
  .data-toolbar { display: flex; flex-direction: column; padding: 12px 18px; }
  .search-box, .select-control { max-width: none; width: 100%; }
  .switch-label { align-self: flex-start; padding: 5px 0; }
  .pagination { align-items: stretch; flex-direction: column; gap: 10px; padding: 14px 18px; }
  .pagination__controls { flex-wrap: wrap; justify-content: space-between; }
  th:first-child, td:first-child { padding-left: 18px; }
  .station-dialog, .station-form { height: 100dvh; width: 100vw; }
  .station-form__header, .station-form__footer { padding-left: 20px; padding-right: 20px; }
  .station-form__body { padding: 0 20px 24px; }
  .form-section { display: block; }
  .form-section__heading { margin-bottom: 20px; }
  .field-grid { grid-template-columns: 1fr; }
  .field--wide { grid-column: auto; }
  .field--checkbox { margin-top: 0; }
  .station-form__footer { align-items: stretch; flex-direction: column; }
  .station-form__actions { display: grid; grid-template-columns: 1fr 1fr; }
}

/* 账号、密钥与采集审计 */
.login-field + .login-field { margin-top: 17px; }
.login-field > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 9px; }
.login-error--success { color: var(--primary); }
.nav-item:is(button) { background: transparent; border: 0; text-align: left; width: 100%; }
.workspace-view { animation: view-enter .24s ease-out both; }
@keyframes view-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.account-chip { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 10px; margin: 0 5px 15px; padding: 0 3px 15px; }
.account-chip__avatar, .identity-stamp > span, .security-row__avatar {
  align-items: center; background: var(--primary-deep); border-radius: 9px; color: #fff; display: inline-flex; flex: 0 0 auto; font-size: 12px; font-weight: 700; height: 34px; justify-content: center; width: 34px;
}
.account-chip strong, .account-chip small { display: block; }
.account-chip strong { font-size: 11px; }
.account-chip small { color: var(--text-tertiary); font-size: 9px; margin-top: 3px; }
.identity-stamp { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; display: flex; gap: 11px; min-width: 190px; padding: 10px 13px; }
.identity-stamp small, .identity-stamp strong { display: block; }
.identity-stamp small { color: var(--text-tertiary); font-size: 9px; }
.identity-stamp strong { font-size: 12px; margin-top: 3px; }

.security-layout { display: grid; gap: 16px; grid-template-columns: minmax(300px, .72fr) minmax(480px, 1.28fr); margin-top: 32px; }
.security-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-card); min-width: 0; overflow: hidden; }
.security-card--wide, #apiKeyCard { grid-column: 1 / -1; }
.security-card__header { border-bottom: 1px solid var(--line); padding: 23px 24px 19px; position: relative; }
.security-card__header--row { align-items: flex-start; display: flex; gap: 18px; justify-content: space-between; }
.security-card__header h2 { font-size: 18px; letter-spacing: -.015em; margin: 6px 0 0; }
.security-card__header p { color: var(--text-tertiary); font-size: 10px; line-height: 1.6; margin: 7px 0 0; }
.eyebrow { color: var(--primary); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.security-mark { color: #edf2f0; font-size: 54px; font-weight: 750; line-height: 1; position: absolute; right: 23px; top: 18px; }
.compact-form { display: grid; gap: 13px; padding: 20px 24px 24px; }
.compact-form label { display: grid; gap: 7px; }
.compact-form label > span { color: var(--text-secondary); font-size: 10px; font-weight: 650; }
.compact-form label > small { color: var(--text-tertiary); font-size: 9px; }
.compact-form input { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; font-size: 12px; height: 40px; outline: none; padding: 0 11px; }
.compact-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20, 120, 94, .08); }
.compact-form__footer { align-items: center; display: flex; gap: 14px; justify-content: space-between; margin-top: 3px; }
.compact-form__footer p { color: var(--danger); font-size: 10px; line-height: 1.45; margin: 0; }
.security-list { min-height: 76px; }
.security-empty { color: var(--text-tertiary); font-size: 11px; line-height: 1.6; padding: 28px 24px; text-align: center; }
.security-row, .run-row { align-items: center; border-top: 1px solid var(--line); display: grid; gap: 14px; padding: 14px 24px; }
.security-list > :first-child { border-top: 0; }
.security-row { grid-template-columns: auto minmax(180px, 1fr) auto auto; }
.security-row__avatar { background: var(--primary-soft); color: var(--primary); }
.security-row__main { min-width: 0; }
.security-row__main strong, .security-row__main small { display: block; }
.security-row__main strong { font-size: 12px; }
.security-row__main small { color: var(--text-tertiary); font-size: 9px; line-height: 1.5; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.security-row__main code, .security-note code { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 4px; color: var(--text-secondary); padding: 1px 4px; }
.security-row__meta { align-items: flex-end; display: flex; flex-direction: column; gap: 5px; }
.security-row__meta > small { color: var(--text-tertiary); font-size: 9px; }
.role-pill, .state-pill, .run-status { border-radius: 999px; display: inline-flex; font-size: 9px; font-weight: 700; padding: 5px 8px; white-space: nowrap; }
.role-pill--owner { background: var(--primary-deep); color: #fff; }
.role-pill--operator { background: var(--blue-soft); color: var(--blue); }
.state-pill--active { background: var(--primary-soft); color: var(--primary); }
.state-pill--inactive { background: #f0f2f1; color: var(--text-tertiary); }
.key-glyph { align-items: center; background: var(--warning-soft); border-radius: 9px; color: var(--warning); display: inline-flex; font-size: 23px; height: 34px; justify-content: center; width: 34px; }
.run-row { grid-template-columns: 82px minmax(180px, 1fr) auto; }
.run-status { justify-content: center; }
.run-status--success { background: var(--primary-soft); color: var(--primary); }
.run-status--running { background: var(--blue-soft); color: var(--blue); }
.run-status--partial { background: var(--warning-soft); color: var(--warning); }
.run-status--failed { background: var(--danger-soft); color: var(--danger); }
.run-counts { color: var(--text-tertiary); display: flex; font-size: 9px; gap: 12px; white-space: nowrap; }
.run-counts b { color: var(--text-secondary); font-size: 11px; }

.modal-dialog { background: transparent; border: 0; max-height: min(680px, calc(100dvh - 36px)); max-width: min(560px, calc(100vw - 32px)); overflow: hidden; padding: 0; width: 100%; }
.modal-dialog::backdrop { backdrop-filter: blur(2px); background: rgba(16, 32, 27, .45); }
.modal-form { background: var(--surface); border-radius: 16px; box-shadow: 0 24px 70px rgba(17, 36, 30, .22); display: flex; flex-direction: column; max-height: min(680px, calc(100dvh - 36px)); min-height: 0; overflow: hidden; }
.modal-form__header { align-items: flex-start; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 25px 28px 21px; }
.modal-form__header h2 { font-size: 21px; letter-spacing: -.02em; margin: 9px 0 0; }
.modal-form__header h2 b { color: var(--primary); }
.modal-form__header p { color: var(--text-tertiary); font-size: 10px; line-height: 1.55; margin: 6px 0 0; }
.modal-form__body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 28px 28px; scrollbar-color: #bcc9c4 transparent; scrollbar-width: thin; }
.modal-form__footer { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 15px; justify-content: space-between; padding: 15px 28px; }
.modal-form__footer > p { color: var(--danger); flex: 1; font-size: 10px; line-height: 1.45; margin: 0; }
.modal-form__footer > div { display: flex; gap: 8px; }
.secret-box { align-items: stretch; background: var(--surface-soft); border: 1px solid var(--line-strong); border-radius: 10px; display: flex; gap: 10px; padding: 10px; }
.secret-box code { color: var(--primary-deep); flex: 1; font-family: Consolas, "Courier New", monospace; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; padding: 4px; user-select: all; }
.security-note { color: var(--text-secondary); font-size: 10px; line-height: 1.65; margin: 13px 1px 0; }

@media (max-width: 980px) {
  .security-layout { grid-template-columns: 1fr; }
  .security-card, .security-card--wide, #apiKeyCard { grid-column: auto; }
  .security-row { grid-template-columns: auto minmax(160px, 1fr) auto; }
  .security-row .row-actions { grid-column: 2 / -1; justify-content: flex-start; }
}

@media (max-width: 720px) {
  .sidebar .nav-list { display: flex; gap: 6px; margin: 0 0 0 auto; }
  .sidebar .nav-list > .nav-label, .sidebar .nav-list > a { display: none; }
  .sidebar .nav-item { height: 40px; min-height: 40px; width: 40px; }
  .sidebar .account-chip, .sidebar .service-status { display: none; }
  .security-layout { margin-top: 24px; }
  .identity-stamp { display: none; }
  .security-card__header, .compact-form, .security-row, .run-row { padding-left: 18px; padding-right: 18px; }
  .security-card__header--row { align-items: stretch; flex-direction: column; }
  .security-card__header--row .button { align-self: flex-start; }
  .security-row { align-items: start; grid-template-columns: auto minmax(0, 1fr); }
  .security-row__meta, .security-row .row-actions { align-items: flex-start; grid-column: 2; }
  .run-row { align-items: start; grid-template-columns: 72px minmax(0, 1fr); }
  .run-counts { flex-wrap: wrap; grid-column: 2; }
  .modal-dialog, .modal-form { border-radius: 0; height: 100dvh; max-height: none; max-width: none; width: 100vw; }
  .modal-form__header, .modal-form__body, .modal-form__footer { padding-left: 20px; padding-right: 20px; }
  .modal-form__footer { align-items: stretch; flex-direction: column; }
  .modal-form__footer > div { display: grid; grid-template-columns: 1fr 1fr; }
  .secret-box { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
