@charset "UTF-8";

:root {
  color-scheme: light;
  --canvas: #f7f7f7;
  --surface: #fff;
  --ink: #161616;
  --muted: #8b8b8b;
  --line: #eeeeef;
  --teal: #0bbfbd;
  --teal-hover: #08aeac;
  --teal-light: #eafafa;
  --red: #f34c6b;
  --amber: #bf8b24;
  --green: #21a879;
  --radius: 4px;
  font: 14px/1.5 "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
[hidden] { display: none !important; }
a { color: var(--teal); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
::selection { background: #c9f4f2; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: -80px; left: 15px; padding: 10px; background: #fff; }
.skip-link:focus { top: 10px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font: 12px/1.6 Consolas, monospace; overflow-wrap: anywhere; }
.break-word { overflow-wrap: anywhere; }

.brand { display: flex; align-items: center; gap: 8px; color: #111; }
.brand strong { font-size: 18px; font-weight: 650; white-space: nowrap; }
.brand-mark { width: 26px; height: 30px; flex-shrink: 0; }
.brand-mark svg { width: 26px; height: 30px; stroke: var(--teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.app-shell { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 0 16px 18px; overflow-y: auto; background: var(--canvas); z-index: 30; }
.sidebar-brand { min-height: 72px; margin: 0 3px 12px; }
.main-navigation { display: grid; gap: 8px; }
.nav-link { min-height: 46px; padding: 12px 16px; display: flex; align-items: center; gap: 13px; color: #303030; border: 1px solid transparent; border-radius: 4px; font-size: 13px; }
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-link:hover { background: #ededee; }
.nav-link[aria-current="page"] { color: #fff; background: var(--teal); border-color: #0dcbca; box-shadow: 0 7px 20px rgb(11 191 189 / 15%); }
.sidebar-bottom { margin-top: auto; padding: 30px 5px 0; }
.version-label { display: inline-block; padding: 3px 9px; background: #fff; border-radius: 18px; font: 11px/1.3 Consolas, monospace; }
.sidebar-user { display: flex; align-items: center; gap: 9px; padding: 17px 4px 12px; }
.user-avatar { display: grid; place-items: center; width: 27px; height: 27px; background: #e9f5f4; color: var(--teal); border-radius: 50%; font-size: 12px; }
.user-copy { min-width: 0; }
.user-copy strong { display: block; font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.user-copy small { display: block; font-size: 10px; color: var(--muted); }
.sidebar-data { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px; color: var(--muted); font-size: 10px; }
.sidebar-data strong { font-weight: 400; }
.workspace-main { min-width: 0; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 24px 0 10px; background: var(--canvas); }
.topbar-leading, .topbar-actions { display: flex; align-items: center; gap: 16px; }
.topbar-title { font-size: 16px; color: #444; }
.topbar-date { color: #999; font-size: 11px; white-space: nowrap; }
.role-indicator { color: #888; font-size: 11px; }
.connection-state { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #888; }
.connection-state svg { width: 14px; height: 14px; }
.icon-button { display: inline-flex; justify-content: center; align-items: center; width: 32px; height: 32px; padding: 7px; border: 0; border-radius: 4px; background: #fff; color: #242424; }
.icon-button:hover { background: #ebf9f8; color: var(--teal); }
.icon-button svg { width: 18px; height: 18px; }
.menu-toggle { display: none; }
.main-content { padding: 0 24px 24px 10px; outline: none; }
.page-heading { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.page-heading:has(.page-actions:empty) { display: none; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-content { display: grid; gap: 18px; }
.button { min-height: 33px; padding: 6px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #e6e6e6; border-radius: 3px; color: #444; background: #fff; font-size: 12px; white-space: nowrap; }
.button svg { width: 14px; height: 14px; flex-shrink: 0; }
.button:hover { border-color: var(--teal); color: var(--teal); }
.button-primary { color: #fff; background: var(--teal); border-color: var(--teal); }
.button-primary:hover { color: #fff; background: var(--teal-hover); border-color: var(--teal-hover); }
.button-danger { color: #fff; background: var(--red); border-color: var(--red); }
.button-danger:hover { color: #fff; background: #dd405e; border-color: #dd405e; }
.button-small { min-height: 27px; padding: 4px 8px; font-size: 11px; }
.button-quiet, .button-link { background: transparent; border-color: transparent; }
.button-link { color: var(--teal); }
.button-full { width: 100%; }
.action-group { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.card { min-width: 0; border: 1px solid #f1f1f1; border-radius: var(--radius); background: #fff; box-shadow: 0 2px 5px rgb(0 0 0 / 2%); overflow: hidden; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 14px; gap: 10px; }
.card-title { font-size: 14px; font-weight: 650; }
.card-body { padding: 0 22px 20px; }
.metric-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: #fff; border: 1px solid #f1f1f1; border-radius: 4px; padding: 22px 0; }
.metric-card { min-width: 0; padding: 0 19px; border-right: 1px solid #eee; }
.metric-card:last-child { border-right: 0; }
.metric-label { display: flex; align-items: center; gap: 7px; color: #929292; font-size: 12px; white-space: nowrap; }
.metric-label svg { width: 13px; height: 13px; color: var(--teal); }
.metric-value { padding-top: 12px; font-size: 25px; line-height: 1.2; font-weight: 650; color: #101010; font-variant-numeric: tabular-nums; }
.gateway-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px; background: #fff; border: 1px solid #f1f1f1; }
.gateway-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.gateway-metrics .metric-value { font-size: 20px; }
.release-summary { padding: 10px 0; font-size: 13px; }
.release-warning { color: var(--amber); font-size: 12px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); gap: 18px; }
.chart-container { min-width: 0; }
.trend-chart { width: 100%; height: auto; max-height: 295px; min-height: 215px; }
.chart-grid { stroke: #f0f0f0; stroke-width: 1; }
.chart-axis { fill: #aaa; font: 10px "Segoe UI", "Microsoft YaHei", sans-serif; }
.chart-line { fill: none; stroke: var(--teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: #ebfaf8; }
.chart-point { fill: #fff; stroke: var(--teal); stroke-width: 1.5; }
.chart-data { margin-top: 8px; font-size: 11px; color: #999; }
.chart-data summary { cursor: pointer; color: var(--teal); }
.chart-data .table-scroll { margin-top: 12px; }
.layer-list { display: grid; gap: 0; }
.layer-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid #f2f2f2; font-size: 12px; }
.layer-item:last-child { border-bottom: 0; }
.badge { display: inline-flex; align-items: center; justify-content: center; font-size: 11px; line-height: 1.4; padding: 2px 6px; border: 1px solid transparent; border-radius: 3px; white-space: nowrap; }
.badge-neutral { background: #f4f4f4; color: #8c8c8c; }
.badge-info { background: #eff5ff; color: #638ee8; }
.badge-teal { background: #e6f9f7; color: #08aead; border-color: #bcf0ed; }
.badge-warning { background: #fff8e5; color: var(--amber); }
.badge-danger { background: #fff0f3; color: var(--red); }
.badge-success { background: #edf9f3; color: var(--green); }
.tag { display: inline-flex; align-items: center; padding: 2px 6px; background: #f4f4f4; border-radius: 3px; color: #999; font-size: 10px; }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; padding: 14px 18px; background: #fff; border: 1px solid #f1f1f1; border-radius: 4px; }
.filters .field { min-width: 115px; flex: 0 1 150px; }
.filters .search-field { flex: 1 1 230px; }
.filters label { color: #999; font-size: 11px; font-weight: 400; }
.filters input, .filters select { min-height: 32px; font-size: 12px; padding: 5px 9px; }
.list-context { display: flex; align-items: center; justify-content: space-between; color: #aaa; font-size: 12px; }
.list-context strong { font-weight: 500; color: #666; }
.table-scroll { width: 100%; overflow-x: auto; }
.table-scroll:focus-visible { outline-offset: -2px; }
.data-table { width: 100%; min-width: 730px; border-collapse: collapse; text-align: left; font-size: 12px; }
.data-table th { padding: 11px 17px; background: #fafafa; color: #888; border-bottom: 1px solid #f0f0f0; font-weight: 400; font-size: 11px; white-space: nowrap; }
.data-table td { padding: 17px; color: #666; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.data-table th:first-child, .data-table td:first-child { padding-left: 22px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 22px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody > tr:not(.detail-row):hover { background: #fcfefe; }
.cell-primary { display: block; color: #333; font-size: 12px; font-weight: 450; overflow-wrap: anywhere; }
.cell-secondary { display: block; margin-top: 5px; color: #aaa; font-size: 10px; overflow-wrap: anywhere; }
.cell-number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell-cluster { display: flex; flex-wrap: wrap; gap: 5px; }
.detail-row td { padding: 20px 22px; background: #fbfdfd; }
.row-detail { display: grid; gap: 16px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; margin: 0; }
.detail-pair { min-width: 0; }
.detail-pair dt { color: #999; font-size: 11px; margin-bottom: 4px; }
.detail-pair dd { margin: 0; color: #555; font-size: 12px; overflow-wrap: anywhere; }
.detail-block { min-width: 0; display: grid; gap: 8px; }
.detail-label { color: #888; font-size: 11px; font-weight: 400; }
.detail-block p { color: #666; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.code-block { margin: 0; padding: 12px; background: #f6f8f8; border: 1px solid #eeeeef; border-radius: 3px; font: 11px/1.7 Consolas, monospace; white-space: pre-wrap; max-height: 260px; overflow: auto; overflow-wrap: anywhere; color: #777; }
.evidence-list { display: grid; gap: 5px; margin: 0; padding-left: 18px; color: #777; font-size: 11px; }
.check-list { display: grid; gap: 5px; }
.check-item { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 9px 12px; border-bottom: 1px solid #eee; font-size: 12px; }
.check-item strong { font-weight: 400; }
.check-value { margin-left: auto; color: #888; }
.check-item p { width: 100%; color: #999; font-size: 11px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 20px; border-top: 1px solid #f0f0f0; color: #999; font-size: 11px; }
.pagination-buttons { display: flex; align-items: center; gap: 8px; }
.pagination-label { padding: 0 4px; }
.scroll-hint { display: none; }
.source-grid, .settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.source-card, .connector-card { padding: 18px; background: #fff; border: 1px solid #f1f1f1; }
.source-card-top, .connector-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.source-card-top .badge, .connector-header .badge { margin-left: auto; }
.source-card-top h3, .connector-header h3 { font-size: 13px; font-weight: 500; }
.source-card p, .connector-card p { color: #999; font-size: 11px; }
.source-path { padding: 8px; background: #fafafa; color: #999; font-size: 10px; }
.source-card dl { margin-top: 10px; }
.source-status-symbol { display: none; }
.connector-header svg { width: 15px; height: 15px; color: #aaa; }
.version-list { display: grid; gap: 12px; }
.version-card { border: 1px solid #eee; background: #fafcfc; padding: 14px; }
.version-card h3 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 12px; }
.version-card h3 span { color: #aaa; font-size: 10px; font-weight: 400; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.field label { color: #666; font-size: 12px; }
.field input, .field select, .field textarea { width: 100%; min-height: 36px; border: 1px solid #e5e5e5; border-radius: 3px; padding: 7px 10px; color: #444; background: #fff; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #b9e4e2; }
.field input::placeholder, .field textarea::placeholder { color: #b4b4b4; }
.field textarea { min-height: 85px; line-height: 1.6; resize: vertical; }
.field input[type="file"] { font-size: 12px; padding: 8px; }
.field input[type="file"]::file-selector-button { border: 1px solid #ddd; background: #fafafa; color: #666; padding: 5px 10px; border-radius: 3px; margin-right: 12px; }
.field-hint { display: none; }
.required { margin-left: 3px; color: var(--red); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field-wide { grid-column: 1 / -1; }
.form-error { margin-top: 12px; padding: 9px 12px; font-size: 12px; color: var(--red); background: #fff3f5; border-radius: 3px; }
.password-toggle { display: flex; align-items: center; gap: 5px; color: #888; font-size: 12px; }
.password-toggle input { accent-color: var(--teal); }
.modal { width: min(610px, calc(100vw - 36px)); max-height: calc(100dvh - 48px); padding: 0; border: 0; border-radius: 5px; background: #fff; color: var(--ink); box-shadow: 0 10px 60px rgb(0 0 0 / 18%); }
.modal::backdrop { background: rgb(0 0 0 / 32%); }
.modal-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 20px 22px 16px; border-bottom: 1px solid #f0f0f0; }
.modal-header h2 { font-size: 16px; font-weight: 500; }
.modal-body { padding: 20px 22px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid #f0f0f0; }
.modal-wide { width: min(880px, calc(100vw - 36px)); }
.modal .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.modal .row-detail { margin-bottom: 12px; }
.notice { display: none; }
.toast-region { position: fixed; right: 20px; bottom: 20px; width: min(360px, calc(100vw - 32px)); display: grid; gap: 8px; z-index: 80; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; padding: 12px; background: #fff; border: 1px solid #e7f2f1; border-radius: 4px; box-shadow: 0 4px 20px rgb(0 0 0 / 8%); color: #666; font-size: 12px; pointer-events: auto; }
.toast > svg { width: 15px; height: 15px; color: var(--teal); flex-shrink: 0; }
.toast p { flex: 1; overflow-wrap: anywhere; }
.toast-error > svg { color: var(--red); }
.toast .icon-button { width: 24px; height: 24px; padding: 5px; }
.empty-state, .error-state, .loading-state { min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 25px; color: #999; background: #fff; }
.empty-state h3, .error-state h3 { font-size: 13px; font-weight: 400; }
.empty-state p { display: none; }
.error-state p { color: var(--red); font-size: 12px; }
.loading-state p { font-size: 12px; }
.state-icon { display: none; }
.inline-loading { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #aaa; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid #e2eeee; border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 30px; }
.auth-panel { width: min(100%, 380px); }
.auth-brand { justify-content: center; margin-bottom: 30px; }
.auth-card { padding: 30px; border-radius: 4px; background: #fff; border: 1px solid #eee; }
.auth-card h1 { text-align: center; font-size: 18px; font-weight: 500; margin-bottom: 25px; }
.auth-card form { display: grid; gap: 17px; }
.auth-card .button-primary { margin-top: 4px; min-height: 37px; }
.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; }
.boot-screen h1 { font-size: 20px; font-weight: 500; }
.sidebar-backdrop { display: none; }

@media (min-width: 1650px) {
  .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .metric-card { padding: 0 25px; }
  .main-content { padding-right: 28px; }
}
@media (max-width: 1200px) {
  .app-shell { grid-template-columns: 180px minmax(0, 1fr); }
  .brand strong { font-size: 16px; }
  .sidebar { padding-left: 10px; padding-right: 10px; }
  .metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 24px; }
  .metric-card:nth-child(4) { border-right: 0; }
  .metric-card { padding: 0 16px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.5fr) minmax(250px, 1fr); }
}
@media (max-width: 950px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .source-grid, .settings-grid { grid-template-columns: 1fr; }
  .topbar-date { display: none; }
}
@media (max-width: 780px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 210px; height: 100dvh; transform: translateX(-101%); background: #f7f7f7; box-shadow: 4px 0 20px rgb(0 0 0 / 10%); }
  .app-shell.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 29; display: block; border: 0; background: rgb(0 0 0 / 25%); }
  .menu-toggle { display: inline-flex; }
  .topbar { height: 58px; padding: 0 15px; }
  .topbar-leading, .topbar-actions { gap: 9px; }
  .role-indicator { display: none; }
  .main-content { padding: 0 15px 20px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card:nth-child(even) { border-right: 0; }
  .metric-label { font-size: 11px; }
  .metric-value { font-size: 24px; }
  .filters .search-field { flex-basis: 100%; }
  .filters .field { flex: 1 1 120px; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-actions { justify-content: flex-end; }
}
@media (max-width: 480px) {
  .main-content { padding-left: 10px; padding-right: 10px; }
  .topbar-title { font-size: 14px; }
  .card-header { padding: 17px 15px 12px; }
  .card-body { padding: 0 15px 17px; }
  .form-grid, .modal .detail-grid { grid-template-columns: 1fr; }
  .modal { width: calc(100vw - 20px); max-height: calc(100dvh - 24px); }
  .modal-header, .modal-body, .modal-footer { padding: 16px; }
  .pagination { flex-wrap: wrap; padding: 12px; }
  .pagination-buttons { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
