:root {
  color-scheme: light;
  --canvas: #f7f8fa;
  --surface: #fff;
  --surface-subtle: #fafbfb;
  --ink: #242b28;
  --muted: #66716b;
  --faint: #758078;
  --border: #e4e8e5;
  --accent: #167653;
  --accent-hover: #105f42;
  --accent-light: #edf6f0;
  --danger: #aa4242;
  --danger-light: #fcf1f1;
  --review: #69576d;
  --review-light: #f3eff5;
  --focus: #248d68;
  --radius: 12px;
  --shadow-popover: 0 14px 48px rgb(24 39 31 / 14%);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 14px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); line-height: 1.55; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
::selection { background: #d9eede; color: #164b35; }
input, textarea { caret-color: var(--accent); }
::placeholder { color: #737c77; opacity: 1; }
* { scrollbar-width: thin; scrollbar-color: #c9d0cb transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { border-radius: 6px; background: #c9d0cb; }
::-webkit-scrollbar-track { background: transparent; }
a { color: inherit; text-decoration: none; text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 650; }
strong { font-weight: 600; }
svg { flex-shrink: 0; }
.icon { width: 18px; height: 18px; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -60px; left: 20px; z-index: 100; padding: 10px 18px; color: var(--accent); background: white; border: 1px solid var(--accent); border-radius: 6px; }
.skip-link:focus { top: 12px; }
.initial-loading { display: grid; min-height: 100dvh; place-items: center; color: var(--muted); }
.no-script { padding: 24px; text-align: center; }
.mono, code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12px; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.text-green { color: var(--accent); }
.break-all { overflow-wrap: anywhere; }
.wrap-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.full-width { width: 100%; }

.workspace { min-height: 100dvh; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 240px; padding: 0 18px; background: var(--surface); border-right: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; min-height: 96px; padding: 0 12px; }
.brand-logo { display: inline-flex; align-items: center; justify-content: center; width: 35px; height: 35px; color: var(--accent); }
.brand-logo svg { width: 35px; height: 35px; }
.brand strong { display: block; font-size: 18px; letter-spacing: -.4px; font-weight: 650; }
.brand small { display: block; color: var(--muted); font-size: 10px; letter-spacing: .15px; line-height: 1.5; }
.sidebar-label { padding: 13px 15px 12px; color: var(--muted); font-size: 11px; }
.sidebar nav { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 15px; color: #626c66; border-radius: 7px; transition: background 150ms, color 150ms; font-size: 13px; }
.nav-link .icon { width: 18px; height: 18px; }
.nav-link:hover { color: var(--ink); background: #f5f7f6; }
.nav-link.active { color: var(--accent); background: var(--accent-light); font-weight: 600; }
.nav-end { display: none; width: 5px; height: 5px; margin-left: auto; background: var(--accent); border-radius: 50%; }
.nav-link.active .nav-end { display: block; }
.sidebar-bottom { margin-top: auto; padding: 22px 11px 19px; }
.workspace-note { display: flex; align-items: center; gap: 10px; padding: 14px 0 19px; color: #69756d; border-bottom: 1px solid var(--border); }
.workspace-note .icon { width: 22px; height: 22px; }
.workspace-note strong { display: block; color: #4e5a52; font-size: 12px; }
.workspace-note span { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); }
.sidebar-provider { display: flex; align-items: center; gap: 8px; padding-top: 16px; font-size: 10px; color: var(--muted); }
.sidebar-provider strong { font-size: 11px; color: #536157; margin-left: auto; }
.sidebar-provider .icon { width: 13px; height: 13px; }
.workspace-main { display: flex; flex-direction: column; min-height: 100dvh; min-width: 0; margin-left: 240px; }
.topbar { display: flex; justify-content: space-between; align-items: center; height: 66px; flex-shrink: 0; gap: 20px; padding: 0 36px; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-location, .topbar-right { display: flex; align-items: center; gap: 16px; min-width: 0; font-size: 12px; }
.topbar-location > .icon { width: 12px; height: 12px; color: #a1aaa4; }
.workspace-name { color: var(--muted); }
#breadcrumb { font-weight: 500; white-space: nowrap; }
.topbar-right { gap: 10px; flex-shrink: 0; }
.connection-state { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.connection-state:hover { color: var(--accent); }
.status-dot { display: inline-block; flex-shrink: 0; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.connection-state > .status-dot { background: #8b958e; }
.connection-state > .dot-green { background: var(--accent); }
.topbar-divider { width: 1px; height: 20px; background: var(--border); margin: 0 9px; }
.avatar { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; color: #55665c; background: #eef1ef; font-size: 11px; font-weight: 600; }
.admin-name { color: #4e5952; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-menu, .sidebar-scrim { display: none; }
.environment-banner { display: flex; align-items: center; gap: 9px; min-height: 37px; padding: 8px 36px; font-size: 11px; color: #586860; background: #f0f4f1; border-bottom: 1px solid #e1e8e3; }
.environment-banner > .icon { width: 14px; height: 14px; color: #687f70; }
.environment-banner > strong { font-weight: 550; white-space: nowrap; }
.environment-banner > span { color: #69766e; padding-left: 9px; border-left: 1px solid #d7dfd9; }
.environment-banner a { display: flex; align-items: center; gap: 6px; margin-left: auto; white-space: nowrap; font-size: 10px; }
.environment-banner a:hover { color: var(--accent); }
.environment-banner a .icon { width: 13px; height: 13px; }
main#main { flex: 1; width: 100%; min-width: 0; max-width: 1800px; padding: 30px 36px 24px; margin: 0 auto; outline: none; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 25px; min-height: 61px; }
.page-heading h1 { font-size: 25px; letter-spacing: -.5px; line-height: 1.35; }
.page-heading p { margin-top: 8px; color: var(--muted); font-size: 12px; }
.page-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; flex-shrink: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 35px; padding: 7px 12px; border: 1px solid #dce2dd; border-radius: 6px; color: #424e46; background: var(--surface); font-size: 12px; font-weight: 500; line-height: 1.4; white-space: nowrap; transition: background 150ms, border-color 150ms, color 150ms; }
.button:hover { background: #f5f7f5; border-color: #bdc8c0; }
.button:active { background: #eaf0ec; }
.button .icon { width: 15px; height: 15px; }
.button-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.button-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button-primary:active { background: #0c5238; border-color: #0c5238; }
.button-danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.button-danger:hover { color: #fff; background: #923636; border-color: #923636; }
.button-danger-quiet { color: var(--danger); }
.button-danger-quiet:hover { color: var(--danger); border-color: #e5b9b9; background: var(--danger-light); }
.button-small { min-height: 30px; padding: 5px 10px; font-size: 11px; }
.button-quiet { color: var(--muted); background: transparent; border-color: transparent; }
.button-quiet:hover { border-color: transparent; color: var(--accent); }
.button:disabled { color: #7c8880; background: #f0f3f1; border-color: #e4e9e5; }
.button-primary:disabled { color: #fff; background: #89aa99; border-color: #89aa99; }
.button[data-busy] { color: #64766b; opacity: .7; cursor: progress; }
.icon-button { display: inline-flex; flex-shrink: 0; justify-content: center; align-items: center; width: 29px; height: 29px; padding: 4px; color: #6d7971; background: transparent; border: 0; border-radius: 5px; transition: color 150ms, background 150ms; }
.icon-button:hover { color: var(--accent); background: var(--accent-light); }
.icon-button .icon { width: 15px; height: 15px; }
.text-button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: var(--accent); font-size: 12px; line-height: 1.5; cursor: pointer; text-align: left; }
.text-button:hover { color: var(--accent-hover); text-decoration: underline; }
.text-button .icon { width: 14px; height: 14px; }
.text-button.mono { color: #3b5547; font-size: 11px; }
.text-button.mono:hover { color: var(--accent); }
.panel { min-width: 0; margin-bottom: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 61px; padding: 16px 22px; }
.panel-heading h2 { font-size: 14px; }
.subtle-label { color: var(--muted); font-size: 11px; }

.metrics-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 22px; padding: 22px 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.metric { min-width: 0; padding: 0 24px; border-right: 1px solid var(--border); }
.metric:last-child { border-right: 0; }
.metric-label { display: flex; align-items: center; justify-content: space-between; color: #58665d; font-size: 12px; gap: 8px; }
.metric-label .icon { width: 17px; height: 17px; color: #87928a; }
.metric > strong { display: block; margin-top: 10px; color: #26392e; font-size: 29px; line-height: 1.25; letter-spacing: -.6px; font-weight: 600; font-variant-numeric: tabular-nums; }
.metric-unit { margin-left: 7px; color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: 0; }
.metric p, .metric > a { display: flex; align-items: center; gap: 3px; margin-top: 10px; min-height: 17px; color: var(--muted); font-size: 10px; }
.metric > a { color: var(--accent); gap: 7px; }
.metric > a .icon { width: 13px; height: 13px; }
.metric-dot { padding: 0 5px; }
.overview-middle { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(270px, 1fr); gap: 22px; }
.trend-panel, .resource-panel { margin-bottom: 22px; }
.chart-legend { display: flex; gap: 15px; color: var(--muted); font-size: 10px; }
.chart-legend span { display: flex; align-items: center; gap: 5px; }
.chart-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; }
.legend-success { background: #4d9673; }
.legend-failed { background: #c2cbc5; }
.trend-chart { display: flex; gap: 12px; height: 223px; padding: 15px 23px 22px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; width: 22px; padding-bottom: 27px; color: #747f77; font-size: 9px; font-variant-numeric: tabular-nums; }
.chart-plot { position: relative; flex: 1; min-width: 0; }
.chart-grid { position: absolute; inset: 0 0 27px; display: flex; flex-direction: column; justify-content: space-between; }
.chart-grid span { display: block; border-top: 1px dashed #e7ece8; }
.chart-grid span:last-child { border-top-style: solid; }
.chart-columns { display: flex; justify-content: space-around; gap: 10px; height: 100%; position: relative; }
.chart-day { display: flex; flex-direction: column; min-width: 0; flex: 1; height: 100%; }
.chart-day > span { height: 27px; padding-top: 12px; text-align: center; font-size: 9px; color: #69756d; font-variant-numeric: tabular-nums; }
.chart-bars { display: flex; flex: 1; align-items: flex-end; justify-content: center; gap: 4px; min-height: 0; }
.chart-bar { width: 14px; max-width: 28%; height: var(--bar-height); border-radius: 3px 3px 0 0; }
.bar-success { background: #4d9673; }
.bar-failed { background: #c2cbc5; }
.resource-list { margin: 0; padding: 0 22px 13px; }
.resource-list .detail-pair { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; }
.resource-list dt { color: var(--muted); font-size: 11px; }
.resource-list dd { margin: 0; font-size: 12px; }
.resource-list dd strong { font-size: 15px; font-weight: 550; font-variant-numeric: tabular-nums; }
.resource-list dd > span { color: var(--muted); font-size: 10px; }
.resource-note { display: flex; gap: 7px; align-items: flex-start; margin: 0 22px 16px; color: var(--muted); font-size: 10px; }
.resource-note .icon { width: 13px; height: 13px; margin-top: 2px; }
.resource-note p { max-width: 32ch; }
.panel-bottom-link { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 11px 22px; background: #fafcfb; color: var(--accent); border-top: 1px solid var(--border); font-size: 11px; }
.panel-bottom-link .icon { width: 14px; height: 14px; }
.panel-bottom-link:hover { background: var(--accent-light); }
.attention-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 18px; margin-bottom: 22px; background: #f0edf2; border-radius: 7px; color: var(--review); }
.attention-title { display: flex; align-items: center; gap: 9px; font-size: 11px; }
.attention-title > .icon { width: 16px; height: 16px; }
.attention-title strong { font-size: 12px; white-space: nowrap; }
.attention-title span { margin-left: 5px; color: #6f6573; }
.attention-bar .text-button { color: var(--review); white-space: nowrap; font-size: 11px; }
.data-footnote { color: var(--muted); font-size: 10px; margin-top: -7px; }
.workspace-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 36px 20px; color: #758078; font-size: 10px; }
.workspace-footer i { font-style: normal; margin: 0 8px; }

.filter-bar { display: flex; align-items: center; gap: 10px; padding: 19px 21px; border-bottom: 1px solid var(--border); }
.search-field { display: flex; align-items: center; gap: 8px; min-width: 170px; max-width: 310px; flex: 1; height: 35px; padding-left: 10px; border: 1px solid #dce2dd; border-radius: 6px; background: var(--surface); }
.search-field:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.search-field > .icon { width: 15px; height: 15px; color: #7e8981; }
.search-field input { width: 100%; height: 100%; min-width: 0; border: 0; border-radius: 6px; padding: 7px 8px 7px 0; outline: none; background: transparent; font-size: 11px; }
.search-field input:focus-visible { outline: none; }
.filter-selects { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-bar select { min-height: 35px; height: 35px; max-width: 180px; padding: 6px 29px 6px 10px; font-size: 11px; }
.filter-summary { margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.table-scroll { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.table-scroll:focus-visible { outline-offset: -3px; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 12px; white-space: nowrap; }
th { padding: 11px 21px; color: #68756c; background: #fafbfa; border-top: 1px solid #edf0ed; border-bottom: 1px solid var(--border); font-size: 10px; font-weight: 500; }
.list-panel > .table-scroll th { border-top: 0; }
td { padding: 14px 21px; border-bottom: 1px solid #eef1ee; line-height: 1.5; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fcfdfc; }
.cell-sub { display: block; margin-top: 5px; color: #758078; font-size: 10px; line-height: 1.3; }
.numeric { font-variant-numeric: tabular-nums; text-align: right; }
.email-text { display: inline-block; max-width: 235px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.plan-label { display: inline-flex; align-items: center; color: #4b5b50; font-size: 11px; font-weight: 500; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 5px; color: #637167; background: #f0f3f1; font-size: 10px; font-weight: 500; white-space: nowrap; line-height: 1.55; }
.badge-success { color: #217a51; background: #eaf5ee; }
.badge-danger { color: #a34b4b; background: #fbeeee; }
.badge-neutral { color: #626f67; background: #f0f3f1; }
.badge-progress { color: #5f666c; background: #edf0f2; }
.badge-review { color: var(--review); background: var(--review-light); }
.table-action { width: 1%; text-align: right; padding-left: 10px; }
.table-action .text-button { font-size: 11px; }
.table-action .text-button .icon { width: 12px; height: 12px; }
.row-actions { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.key-cell { display: flex; align-items: center; gap: 5px; }
.key-code { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.note-preview { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.batch-name { color: var(--ink); gap: 9px; font-size: 12px; }
.batch-name .icon { color: #788b7c; width: 17px; height: 17px; }
.payment-card-label { display: flex; align-items: center; gap: 9px; }
.payment-card-label .icon { color: #6c8073; width: 19px; height: 19px; }
.payment-card-label strong { font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.table-footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; min-height: 61px; padding: 14px 21px; color: var(--muted); border-top: 1px solid var(--border); font-size: 11px; }
.table-footer strong { color: #4e5b52; }
.pagination { display: flex; align-items: center; gap: 13px; font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wrap-cell { white-space: normal; overflow-wrap: anywhere; max-width: 480px; font-size: 11px; color: var(--muted); }
.notice { display: flex; align-items: flex-start; gap: 9px; padding: 13px 15px; margin-bottom: 20px; color: #5b6c60; background: #eef4f0; border-radius: 7px; font-size: 11px; line-height: 1.65; overflow-wrap: anywhere; }
.notice > .icon { width: 16px; height: 16px; margin-top: 1px; }
.notice-danger { color: #994848; background: var(--danger-light); }
.notice-review { color: var(--review); background: var(--review-light); }
.notice-success { color: #23734e; background: var(--accent-light); }
.notice strong { font-weight: 600; }
.inline-help { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); margin: -3px 2px 16px; font-size: 11px; line-height: 1.8; }
.inline-help > .icon { width: 15px; height: 15px; margin-top: 2px; }
.inline-help strong { font-weight: 500; color: #4f5a53; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 255px; padding: 35px 24px; text-align: center; }
.empty-state > .icon { width: 31px; height: 31px; color: #8c9d90; margin-bottom: 15px; }
.empty-state h3 { font-size: 14px; font-weight: 550; margin-bottom: 7px; }
.empty-state p { max-width: 50ch; color: var(--muted); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.empty-state .button { margin-top: 20px; }
.loading-panel { padding: 26px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 12px; }
.skeleton { height: 12px; background: #eef2ef; border-radius: 4px; }
.skeleton-heading { width: 155px; height: 18px; margin-bottom: 34px; }
.skeleton-row { height: 24px; margin: 23px 0; width: 94%; }
.skeleton-row:nth-child(3) { width: 83%; }
.skeleton-row:nth-child(5) { width: 89%; }

.settings-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(270px, 1fr); gap: 22px; }
.settings-main, .settings-side { min-width: 0; }
.settings-list { margin: 0; padding: 0 22px 14px; }
.settings-list .detail-pair { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 18px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid #f0f3f0; font-size: 12px; }
.settings-list .detail-pair:last-child { border: 0; }
.settings-list dt { color: var(--muted); font-size: 11px; }
.settings-list dd { margin: 0; }
.settings-list code { font-size: 11px; }
.config-state { display: inline-flex; align-items: center; gap: 6px; }
.config-state .icon { width: 13px; height: 13px; color: #78867c; }
.settings-note { display: flex; gap: 8px; align-items: flex-start; padding: 15px 22px; background: #fafcfb; border-top: 1px solid var(--border); font-size: 11px; line-height: 1.8; color: var(--muted); }
.settings-note .icon { width: 14px; height: 14px; margin-top: 3px; }
.settings-note code { font-size: 11px; }
.connection-result:empty { display: none; }
.connection-result { padding: 0 22px; }
.billing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 22px 24px; gap: 24px; }
.billing-grid > div > span { color: var(--muted); font-size: 11px; }
.billing-grid strong { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; font-size: 22px; font-weight: 550; }
.billing-grid small { color: var(--muted); font-size: 10px; font-weight: 400; }
.capability-list { padding: 0 22px 6px; }
.capability-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 15px 0; border-bottom: 1px solid #edf1ed; }
.capability-row:last-child { border: 0; }
.capability-row:first-child { padding-top: 3px; }
.capability-row strong { font-size: 12px; font-weight: 550; }
.capability-row p { margin-top: 5px; font-size: 11px; color: var(--muted); line-height: 1.8; overflow-wrap: anywhere; }
.capability-row .badge { margin-top: 2px; }
.prose-block { padding: 0 22px 20px; font-size: 11px; color: var(--muted); line-height: 1.9; }
.prose-block h3 { color: #4c5b51; font-size: 12px; font-weight: 550; margin: 20px 0 6px; }
.prose-block h3:first-child { margin-top: 0; }
.prose-block > p + p { margin-top: 12px; }

dialog { padding: 0; color: var(--ink); background: var(--surface); border: 0; outline: none; }
dialog::backdrop { background: rgb(20 31 25 / 25%); }
.modal { width: 460px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); border-radius: 12px; box-shadow: var(--shadow-popover); }
.modal.modal-wide { width: 580px; }
.modal[open] { display: flex; flex-direction: column; animation: dialog-in 170ms cubic-bezier(.16, 1, .3, 1); }
.drawer { position: fixed; inset: 0 0 0 auto; width: 545px; max-width: min(100%, 650px); height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; box-shadow: -12px 0 45px rgb(20 31 25 / 9%); }
.drawer[open] { display: flex; flex-direction: column; animation: drawer-in 200ms cubic-bezier(.16, 1, .3, 1); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-shrink: 0; gap: 20px; min-height: 72px; padding: 22px 24px; border-bottom: 1px solid var(--border); }
.dialog-heading h2 { font-size: 17px; line-height: 1.55; }
.dialog-heading p { font-size: 11px; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
.dialog-heading > .icon-button { margin: -2px -6px 0 0; width: 30px; height: 30px; }
.dialog-heading > .icon-button .icon { width: 19px; height: 19px; }
.dialog-body { padding: 23px 24px; overflow-y: auto; min-height: 0; font-size: 12px; }
.dialog-body > p { line-height: 1.8; }
.dialog-footer { display: flex; align-items: center; justify-content: flex-end; flex-shrink: 0; gap: 9px; padding: 16px 24px; background: #fbfcfb; border-top: 1px solid var(--border); }
.dialog-footer .button { min-height: 36px; }
.drawer-body { overflow-y: auto; min-height: 0; padding: 24px; font-size: 12px; }
.drawer-body > .notice { margin-top: 20px; }
.drawer-body .loading-panel { border: 0; padding: 20px 0; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; margin-bottom: 18px; font-size: 12px; }
.field > span { color: #4c5b51; font-weight: 500; }
.field small { color: var(--muted); font-size: 10px; line-height: 1.7; }
input:not([type="checkbox"]), select, textarea { width: 100%; min-height: 37px; padding: 8px 10px; border: 1px solid #d7dfd9; border-radius: 6px; background: var(--surface); font-size: 12px; line-height: 1.5; }
select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23717c74' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; cursor: pointer; }
textarea { resize: vertical; max-width: 100%; }
.search-field input { min-height: 0; padding-left: 0; border: 0; background: transparent; font-size: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-error { color: #a43f3f; background: #fff1f1; padding: 11px 13px; margin: 14px 0 0; border-radius: 6px; font-size: 12px; line-height: 1.65; }
.form-error:empty { display: none; }
.form-note { color: var(--muted); font-size: 11px; line-height: 1.8; margin-top: 12px; }
.form-inline-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.form-inline-footer > span { font-size: 10px; color: var(--muted); }
.copy-area { display: block; width: 100%; margin-top: 16px; background: #f8faf8; line-height: 1.85; font-size: 11px; white-space: pre; }
.result-heading { display: flex; align-items: flex-start; gap: 12px; }
.result-heading > .icon { color: var(--accent); background: var(--accent-light); width: 34px; height: 34px; padding: 8px; border-radius: 50%; }
.result-heading strong { font-size: 14px; font-weight: 550; }
.result-heading p { font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.8; }
.confirm-reference { display: flex; align-items: center; gap: 7px; margin-top: 16px; padding: 13px 14px; border-radius: 6px; background: #f5f8f5; color: #4d6354; font-size: 12px; overflow-wrap: anywhere; }
.confirm-reference.mono { word-break: break-all; display: block; font-size: 11px; }
.session-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; gap: 15px; }
.session-heading label { color: #4c5b51; font-size: 12px; font-weight: 500; }
textarea.session-input { font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; line-height: 1.7; }
.check-field { display: flex; align-items: flex-start; gap: 8px; margin-top: 20px; font-size: 11px; line-height: 1.7; color: #44584b; }
input[type="checkbox"] { width: 15px; height: 15px; margin: 2px 0 0; accent-color: var(--accent); }
.key-detail-code { display: flex; align-items: center; gap: 12px; padding: 16px; background: #f4f7f4; border-radius: 8px; }
.key-detail-code code { flex: 1; overflow-wrap: anywhere; color: #3b5f48; font-size: 12px; line-height: 1.7; }
.detail-status { display: flex; align-items: center; gap: 10px; margin: 20px 0; }
.detail-status > .button { margin-left: auto; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; margin: 22px 0; }
.detail-grid .detail-pair { min-width: 0; }
.detail-grid dt { color: var(--muted); font-size: 10px; margin-bottom: 5px; }
.detail-grid dd { display: flex; align-items: center; gap: 5px; margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.detail-grid .span-two { grid-column: span 2; }
.drawer-section { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 23px; }
.drawer-section h3 { font-size: 13px; margin-bottom: 17px; }
.drawer-section.first-section { margin-top: 22px; }
.drawer-section .detail-grid { margin-bottom: 0; }
.action-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.timeline { list-style: none; padding: 0 0 0 4px; margin: 0; }
.timeline li { position: relative; padding: 0 0 23px 20px; border-left: 1px solid #dfe7e1; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; top: 5px; left: -3px; width: 5px; height: 5px; background: #99b09f; border-radius: 50%; }
.timeline li > div { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; }
.timeline strong { font-size: 11px; font-weight: 500; }
.timeline time { color: #7a867d; font-size: 10px; white-space: nowrap; }
.timeline p { color: var(--muted); font-size: 11px; margin-top: 5px; line-height: 1.8; overflow-wrap: anywhere; }
.cost-list { margin: 0; padding: 15px 17px; background: #f7f9f7; border-radius: 8px; }
.cost-list .detail-pair { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 8px 0; }
.cost-list dt { color: var(--muted); font-size: 11px; }
.cost-list dd { margin: 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.cost-list dd strong { font-size: 15px; font-weight: 550; }
.toasts { position: fixed; z-index: 100; bottom: 26px; left: 50%; width: max-content; max-width: min(90vw, 560px); transform: translateX(-50%); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 9px; padding: 13px 18px; border-radius: 8px; background: #263e30; color: #fff; box-shadow: 0 7px 24px rgb(26 50 34 / 18%); font-size: 12px; line-height: 1.65; }
.toast .icon { width: 17px; height: 17px; margin-top: 1px; }
.toast-error { background: #753d3d; }
.login-screen { display: flex; min-height: 100dvh; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 390px; max-width: 100%; padding: 35px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.login-card .brand { padding: 0; min-height: 49px; margin-bottom: 37px; }
.login-card h1 { font-size: 21px; margin-bottom: 9px; letter-spacing: -.3px; }
.login-card > p { color: var(--muted); font-size: 12px; margin-bottom: 27px; line-height: 1.8; }
.login-card .form-error { margin-bottom: 16px; }
.login-card .full-width { margin-top: 7px; min-height: 39px; }
.login-note { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 27px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--muted); font-size: 10px; }
.login-note .icon { width: 13px; height: 13px; }
@keyframes dialog-in { from { transform: translateY(7px); } to { transform: translateY(0); } }
@keyframes drawer-in { from { transform: translateX(24px); } to { transform: translateX(0); } }

@media (min-width: 1680px) {
  main#main { padding-top: 36px; }
  .page-heading { margin-bottom: 30px; }
  td { padding-top: 16px; padding-bottom: 16px; }
  .trend-chart { height: 240px; }
}
@media (max-width: 1200px) {
  .sidebar { width: 218px; padding-left: 14px; padding-right: 14px; }
  .workspace-main { margin-left: 218px; }
  main#main { padding: 27px 25px 20px; }
  .topbar, .environment-banner, .workspace-footer { padding-left: 25px; padding-right: 25px; }
  .page-heading { gap: 15px; }
  .page-heading p { max-width: 39ch; }
  .page-heading h1 { font-size: 23px; }
  .metric { padding-left: 19px; padding-right: 19px; }
  .metric > strong { font-size: 26px; }
  .filter-bar { flex-wrap: wrap; gap: 10px; }
  .filter-selects { flex: 1; }
  .filter-selects > label { min-width: 92px; }
  td, th { padding-left: 18px; padding-right: 18px; }
  .attention-title span { display: none; }
  .settings-layout { grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); }
  .overview-middle { grid-template-columns: minmax(0, 1.6fr) minmax(250px, 1fr); }
  .topbar-location { gap: 12px; }
}
@media (max-width: 1000px) {
  .metrics-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; }
  .metric { padding: 20px 23px; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .overview-middle { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .resource-panel { display: block; }
  .settings-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .settings-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .page-heading { flex-wrap: wrap; align-items: flex-start; }
  .page-heading p { max-width: none; }
  .page-actions { justify-content: flex-start; }
  .environment-banner > span { display: none; }
  .filter-bar .search-field { max-width: none; }
  .filter-selects { flex-basis: 100%; }
  .table-scroll table { min-width: 670px; }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); width: 240px; transition: transform 180ms cubic-bezier(.16, 1, .3, 1); }
  .workspace-main { margin-left: 0; }
  .mobile-menu { display: inline-flex; width: 32px; height: 32px; }
  .mobile-menu .icon { width: 20px; height: 20px; }
  .nav-open .sidebar { transform: translateX(0); }
  .nav-open .sidebar-scrim { display: block; position: fixed; z-index: 29; inset: 0; width: 100%; height: 100%; padding: 0; background: rgb(21 33 26 / 25%); border: 0; }
  .topbar { height: 61px; padding: 0 18px; gap: 12px; }
  .topbar-location { gap: 10px; }
  .topbar-right { gap: 8px; }
  .topbar-divider { margin: 0 4px; }
  .admin-name { max-width: 75px; }
  main#main { padding: 25px 20px 19px; }
  .environment-banner { padding: 9px 22px; }
  .page-heading { gap: 17px; margin-bottom: 22px; }
  .page-heading h1 { font-size: 23px; }
  .page-heading p { font-size: 12px; margin-top: 8px; }
  .page-actions { margin-left: auto; }
  .metrics-strip, .panel, .attention-bar { margin-bottom: 18px; }
  .resource-panel { display: block; }
  .resource-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-bottom: 18px; }
  .resource-list .detail-pair { display: block; }
  .resource-list dd { margin-top: 8px; }
  .resource-note p { max-width: none; }
  .workspace-footer { padding-left: 20px; padding-right: 20px; font-size: 9px; }
  .table-scroll table { min-width: 760px; }
}
@media (max-width: 480px) {
  .topbar { padding: 0 13px; }
  .workspace-name, .topbar-location > .icon, .admin-name { display: none; }
  .topbar-location { gap: 8px; }
  .topbar-right { gap: 7px; }
  .connection-state { font-size: 10px; }
  .topbar-divider { margin: 0 3px; }
  .avatar { width: 27px; height: 27px; font-size: 10px; }
  .environment-banner { padding: 9px 17px; gap: 7px; font-size: 10px; }
  .environment-banner a { font-size: 9px; }
  .environment-banner a .icon { display: none; }
  main#main { padding: 23px 16px 18px; }
  .page-heading { display: block; margin-bottom: 20px; }
  .page-heading h1 { font-size: 22px; }
  .page-heading p { max-width: 34ch; font-size: 11px; line-height: 1.8; }
  .page-actions { justify-content: flex-start; margin: 17px 0 0; gap: 8px; }
  .page-actions .button { min-height: 37px; padding: 8px 12px; font-size: 11px; }
  .metrics-strip { border-radius: 10px; }
  .metric { padding: 17px 16px; }
  .metric-label { font-size: 11px; }
  .metric-label .icon { width: 15px; height: 15px; }
  .metric > strong { margin-top: 9px; font-size: 25px; }
  .metric-unit { font-size: 10px; margin-left: 5px; }
  .metric p, .metric > a { font-size: 9px; margin-top: 9px; }
  .metric-dot { padding: 0 2px; }
  .panel-heading { min-height: 57px; padding: 16px; }
  .panel-heading h2 { font-size: 13px; }
  .panel-heading .text-button { font-size: 10px; }
  .chart-legend { gap: 10px; font-size: 9px; }
  .trend-chart { padding: 12px 16px 19px 11px; height: 214px; gap: 7px; }
  .chart-y { width: 20px; font-size: 8px; }
  .chart-columns { gap: 6px; }
  .chart-bars { gap: 3px; }
  .chart-bar { width: 10px; max-width: 33%; }
  .chart-day > span { font-size: 8px; }
  .resource-list { gap: 10px; padding: 0 16px 15px; }
  .resource-list dt { font-size: 9px; }
  .resource-list dd strong { font-size: 14px; }
  .resource-list dd > span { font-size: 9px; }
  .resource-note { margin-left: 16px; margin-right: 16px; }
  .panel-bottom-link { padding-left: 16px; padding-right: 16px; }
  .attention-bar { padding: 13px 14px; gap: 8px; }
  .attention-title { gap: 7px; }
  .attention-title strong { font-size: 11px; }
  .attention-title .icon { width: 14px; height: 14px; }
  .attention-bar .text-button { font-size: 10px; gap: 3px; }
  .attention-bar .text-button .icon { width: 12px; height: 12px; }
  .filter-bar { padding: 15px; gap: 11px; }
  .filter-selects { gap: 7px; }
  .filter-selects > label { flex: 1; min-width: 100px; }
  .filter-selects > .button { flex: 1; }
  .filter-bar select { max-width: none; min-height: 38px; height: 38px; }
  .filter-bar .search-field { height: 39px; }
  .filter-bar > .button { min-height: 39px; }
  .filter-summary { display: none; }
  .search-field input { font-size: 12px; }
  .table-footer { padding: 13px 15px; font-size: 10px; gap: 8px; }
  .pagination { gap: 8px; font-size: 10px; }
  .pagination .button { min-height: 32px; padding: 5px 7px; font-size: 10px; }
  .pagination-range { display: none; }
  .table-footer > span:last-child:not(:first-child) { max-width: 50%; text-align: right; }
  td, th { padding-left: 16px; padding-right: 16px; }
  .key-cell .icon-button, .row-actions .icon-button { width: 36px; height: 36px; }
  .table-action .button { min-height: 36px; }
  .notice { padding: 12px 13px; font-size: 10px; line-height: 1.8; }
  .notice > .icon { width: 15px; height: 15px; margin-top: 2px; }
  .inline-help { font-size: 10px; }
  .data-footnote { font-size: 9px; margin-top: -2px; line-height: 1.8; }
  .workspace-footer { flex-wrap: wrap; padding: 12px 17px 20px; gap: 5px; font-size: 9px; }
  .workspace-footer > span:first-child { display: none; }
  .settings-side { display: block; }
  .settings-list { padding-left: 16px; padding-right: 16px; }
  .settings-list .detail-pair { grid-template-columns: 78px minmax(0, 1fr); gap: 12px; }
  .settings-list dt, .settings-list dd { font-size: 11px; }
  .settings-list code { font-size: 10px; }
  .settings-note { padding: 14px 16px; font-size: 10px; }
  .billing-grid { padding: 0 16px 21px; gap: 16px; }
  .billing-grid > div > span { font-size: 10px; }
  .billing-grid strong { font-size: 20px; gap: 6px; }
  .billing-grid small { font-size: 9px; }
  .capability-list, .connection-result { padding-left: 16px; padding-right: 16px; }
  .capability-row { gap: 14px; }
  .capability-row strong { font-size: 11px; }
  .capability-row p { font-size: 10px; }
  .prose-block { padding-left: 16px; padding-right: 16px; font-size: 11px; }
  .modal { max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  .dialog-heading { padding: 18px 19px; min-height: 65px; }
  .dialog-heading h2 { font-size: 16px; }
  .dialog-body, .drawer-body { padding: 20px 19px; }
  .dialog-footer { padding: 14px 19px; flex-wrap: wrap; gap: 7px; }
  .dialog-footer .button { min-height: 39px; font-size: 11px; }
  .form-grid { gap: 0 12px; }
  .field { font-size: 11px; margin-bottom: 16px; }
  input:not([type="checkbox"]), select, textarea { min-height: 41px; font-size: 13px; }
  .search-field input { min-height: 0; font-size: 11px; }
  .filter-bar select { font-size: 11px; }
  textarea.session-input { font-size: 11px; }
  .check-field { font-size: 11px; }
  .detail-grid { gap: 16px; }
  .detail-grid dd { font-size: 11px; }
  .detail-grid dt { font-size: 10px; }
  .detail-grid code, .detail-grid .mono { font-size: 10px; }
  .dialog-heading p { font-size: 10px; }
  .key-detail-code { padding: 13px; }
  .key-detail-code code { font-size: 11px; }
  .form-inline-footer .button { min-height: 38px; }
  .login-card { padding: 27px; }
  .toasts { bottom: 17px; max-width: calc(100vw - 30px); }
  .toast { padding: 12px 14px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
