:root {
  color-scheme: light;
  --canvas: #f1f3f6;
  --surface: #fff;
  --text: #323639;
  --ink: #18181b;
  --muted: #71717a;
  --line: #e4e4e7;
  --table-head: #f4f4f5;
  --hover: #f4f4f5;
  --primary: #1476ff;
  --primary-hover: #4392ff;
  --selected: rgb(20 118 255 / 15%);
  --radius: 4px;
  --mono: "Cascadia Mono", Consolas, monospace;
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, "Segoe UI", Arial, Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--canvas);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 18px; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 14px; }
a { color: var(--primary); }
code, pre, .mono { font-family: var(--mono); }
code { overflow-wrap: anywhere; }
small, .muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { width: 16px; height: 16px; display: block; flex: none; }
[data-icon]:is(span, i) { display: inline-flex; align-items: center; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }

button, input, select, .button { font: inherit; color: inherit; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  gap: 5px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
  cursor: pointer;
}
button:hover:not(:disabled), .button:hover { color: var(--primary); border-color: #acd0ff; background: #f1f7ff; }
button:disabled { color: #a1a1aa; cursor: default; }
.primary { color: white; background: var(--primary); border-color: var(--primary); }
.primary:hover:not(:disabled) { color: white; background: var(--primary-hover); border-color: var(--primary-hover); }
.icon-button {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
}
.icon-button:hover:not(:disabled) { color: var(--text); background: var(--hover); }

input, select, .range-value {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--surface);
}
select { appearance: none; padding-right: 28px; text-overflow: ellipsis; cursor: pointer; }
.select-control { display: block; min-width: 0; }
.select-trigger {
  width: 100%; min-width: 0; height: 32px; justify-content: space-between;
  padding: 0 10px 0 11px; font-weight: 400; line-height: 1.45; text-align: left;
}
.select-trigger:hover:not(:disabled) { color: var(--text); border-color: #c0c4cc; background: var(--surface); }
.select-trigger:is(:focus-visible,[aria-expanded="true"]) { border-color: var(--primary); outline-offset: 1px; }
.select-trigger[aria-invalid="true"] { border-color: #c13c3c; }
.select-trigger[aria-expanded="true"] .icon { transform: rotate(180deg); }
.select-trigger > .icon { width: 14px; height: 14px; color: #909399; }
.select-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
input::placeholder, .placeholder { color: #909399; }
:is(input, select, .range-value):hover { border-color: #c0c4cc; }
:is(input, select):focus, .range[open] .range-value { outline: none; border-color: var(--primary); }
label { display: grid; gap: 6px; min-width: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.notice { padding: 8px 12px; color: #1556aa; background: #ecf5ff; border-radius: var(--radius); overflow-wrap: anywhere; }
.notice.error { color: #a22b2b; background: #fef0f0; }
.badge {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid #e4e7ed;
  border-radius: var(--radius);
  background: #f4f4f5;
  color: #606266;
  font-size: 12px;
  white-space: nowrap;
}
.badge.ok { color: #237941; border-color: #d5ebd7; background: #f0f9f1; }
.badge.fail { color: #c13c3c; border-color: #fbdcdc; background: #fef0f0; }
.badge.warn { color: #9a641f; border-color: #faecd8; background: #fdf6ec; }
.badge.info { color: #1461be; border-color: #d9ecff; background: #ecf5ff; }
.badge.degraded { color: #a54d05; border-color: #ffe0c9; background: #fff1e8; }

.signin {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(ellipse at 20% 5%, #dce9ff, transparent 50%), var(--canvas);
}
.signin-card { width: min(100%, 376px); display: grid; gap: 18px; padding: 30px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 8px 28px #1727440a; }
.signin-card .brand { margin-bottom: 6px; }
.signin-card input, .signin-card .primary { height: 36px; }
.signin-card > a { justify-self: center; text-decoration: none; font-size: 13px; }

.shell {
  --top: 50px;
  --side: 224px;
  --tabs: 38px;
  display: grid;
  grid-template: var(--top) var(--tabs) minmax(0, 1fr) / var(--side) minmax(0, 1fr);
  height: 100dvh;
}
.shell.sidebar-closed { grid-template-columns: 60px minmax(0, 1fr); }
.topbar {
  grid-column: 2;
  grid-row: 1;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px 0 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.top-left, .top-actions, .breadcrumb, .breadcrumb > span { display: flex; align-items: center; min-width: 0; }
.top-left { gap: 4px; }
.top-actions { gap: 9px; }
.breadcrumb { gap: 7px; margin-left: 8px; white-space: nowrap; }
.breadcrumb > span { gap: 4px; }
.breadcrumb span span { min-width: 0; text-overflow: ellipsis; overflow: hidden; }
.crumb-group, .crumb-divider { color: var(--muted); }
.breadcrumb .crumb-divider { width: 12px; height: 12px; }
.tenant { display: flex; align-items: center; gap: 5px; white-space: nowrap; min-width: 0; }
#tenant { overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.account, .page-switcher { position: relative; flex: none; }
.account summary { display: flex; align-items: center; gap: 6px; }
.account summary > .icon { width: 13px; height: 13px; color: var(--muted); }
.account-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: grid; position: relative; place-items: center; background: #eaf2ff; color: #3979be; width: 32px; height: 32px; border-radius: 50%; }
.avatar::after { content: ""; position: absolute; width: 7px; height: 7px; right: 0; bottom: 0; background: #52b77b; border: 2px solid white; border-radius: 50%; }
.account-menu {
  display: grid;
  gap: 2px;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 148px;
  max-height: 60dvh;
  overflow: auto;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 6px 18px #202b3e19;
}
.account-menu :is(button, a) { display: flex; align-items: center; justify-content: flex-start; gap: 7px; border: 0; text-decoration: none; color: var(--text); font-weight: 400; padding: 7px 9px; }
.account-menu :is(button, a):hover { background: var(--hover); border-radius: var(--radius); }
.account-menu a[aria-current] { color: var(--primary); }
#identity-role { padding: 5px 9px; }

.sidebar {
  grid-row: 1 / -1;
  grid-column: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; white-space: nowrap; font-size: 18px; font-weight: 700; }
.sidebar .brand { flex: 0 0 var(--top); padding: 0 12px; }
.logo { display: inline-grid !important; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--selected); color: var(--primary); flex: none; }
.logo .icon { width: 19px; height: 19px; }
.sidebar nav { flex: 1; min-height: 0; padding: 7px 8px 0; overflow: auto; }
.nav-link, .nav-group summary {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  margin-bottom: 2px;
  padding: 0 12px 0 8px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 8px;
  line-height: 20px;
}
.nav-group .nav-link { padding-left: 32px; }
.nav-group .nav-arrow { width: 14px; height: 14px; margin-left: auto; }
.nav-group[open] .nav-arrow { transform: rotate(180deg); }
.nav-link:hover, .nav-group summary:hover { background: var(--hover); }
.nav-group:has(a[aria-current]) > summary, .nav-link[aria-current] { color: var(--primary); }
.nav-link[aria-current] { background: var(--selected); }
.sidebar-tools { padding: 8px 12px; }
.sidebar-tools .icon-button { width: 24px; height: 24px; background: var(--hover); color: var(--muted); border-radius: 3px; }
.sidebar-closed :is(.brand-title, .nav-label, .nav-arrow, .nav-group .nav-link) { display: none; }
.sidebar-closed .nav-link, .sidebar-closed .nav-group summary { justify-content: center; padding-inline: 0; }
.sidebar-closed #sidebar-toggle .icon { transform: rotate(180deg); }
.nav-scrim { display: none; }

.tabbar {
  grid-column: 2;
  grid-row: 2;
  z-index: 5;
  display: flex;
  min-width: 0;
  align-items: stretch;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.page-tabs { display: flex; flex: 1; align-items: end; min-width: 0; padding: 3px 10px 0; overflow: auto; scrollbar-width: none; }
.page-tabs:is(.scroll-left,.scroll-right) {
  mask-image: linear-gradient(to right,var(--tab-fade-left,#000),#000 14px,#000 calc(100% - 14px),var(--tab-fade-right,#000));
}
.page-tabs.scroll-left { --tab-fade-left: transparent; }
.page-tabs.scroll-right { --tab-fade-right: transparent; }
.page-tab { display: flex; height: 34px; align-items: center; flex: none; padding: 0 8px 0 14px; position: relative; border-radius: 7px 7px 0 0; color: var(--ink); }
.page-tab:not(:last-child)::after { content: ""; position: absolute; width: 1px; height: 16px; background: var(--line); right: 0; pointer-events: none; }
.page-tab:has(a[aria-current]) { color: var(--primary); background: var(--selected); }
.page-tab:has(a[aria-current])::after { display: none; }
.page-tab:hover:not(:has(a[aria-current])) { background: var(--hover); }
.page-tab a { display: flex; align-items: center; gap: 4px; align-self: stretch; color: inherit; text-decoration: none; white-space: nowrap; }
.page-tab > .icon { margin: 0 2px 0 9px; width: 14px; height: 14px; }
.page-tab .tab-close { color: inherit; width: 20px; min-height: 20px; height: 20px; margin-left: 5px; }
.tab-close .icon { width: 12px; height: 12px; }
.tabbar > .icon-button, .page-switcher > summary { width: 32px; height: 100%; border-left: 1px solid var(--hover); border-radius: 0; }
.page-switcher .account-menu { top: 100%; }
.content-focus { grid-template: 0 var(--tabs) minmax(0, 1fr) / 0 minmax(0, 1fr) !important; }
.content-focus :is(.sidebar, .topbar, .nav-scrim) { display: none !important; }

.main { grid-row: 3; grid-column: 2; min-width: 0; overflow: auto; padding: 10px; background: var(--canvas); }
.page-heading { display: flex; justify-content: space-between; }
#page-actions:not(:empty) { margin-bottom: 8px; }
#notice { margin-bottom: 8px; }
.view { display: grid; align-content: start; gap: 10px; min-width: 0; }
.panel, .data-panel, .filters { background: var(--surface); border-radius: var(--radius); min-width: 0; }
.panel { padding: 10px; }
.panel-heading { min-height: 34px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.panel-heading .muted { font-size: 12px; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.metric { min-height: 97px; padding: 12px 16px; display: grid; align-content: start; gap: 4px; }
.metric h2 { font-size: 13px; font-weight: 400; }
.metric strong { color: var(--primary); font-size: 25px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.metric small { font-size: 12px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: stretch; gap: 10px; }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.legend span::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: #b6d7ff; }
.legend span + span::before { background: var(--primary); }
.chart-scroll { overflow: auto; }
.chart-frame { display: grid; grid-template-columns: 36px 1fr; min-width: 375px; margin: 14px 12px 29px 0; }
.chart-scale { display: flex; flex-direction: column; justify-content: space-between; color: var(--muted); font: 11px var(--mono); text-align: right; padding-right: 8px; margin: -7px 0; }
.chart { height: 166px; display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 5px; padding: 0 3px; border-top: 1px solid var(--line); background: repeating-linear-gradient(to top, var(--line) 0 1px, transparent 1px 25%); }
.chart-column { position: relative; }
.chart-column:hover { background: #eff6ff; }
.chart-total, .chart-ok { position: absolute; inset: auto 0 1px; border-radius: 3px 3px 0 0; background: #b6d7ff; }
.chart-ok { background: var(--primary); }
.chart-column small { position: absolute; top: calc(100% + 6px); left: 0; font: 11px var(--mono); white-space: nowrap; }
.health-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.inline-field { display: flex; align-items: center; }
.inline-field .select-control { min-width: 130px; }

.list-layout { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.filters, .advanced-fields {
  display: grid; grid-template-columns: repeat(var(--filter-columns), minmax(0,1fr));
  align-items: center; gap: 10px 15px;
}
.filters { --filter-columns: 3; --filter-label: 7em; position: relative; z-index: 1; padding: 15px 10px 10px; }
:is(.filters, .advanced-fields) > label, .picker label, .range summary {
  display: grid;
  grid-template-columns: var(--filter-label) minmax(0,1fr);
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 32px;
  text-align: right;
  white-space: nowrap;
}
.filters > .actions { grid-column: -2 / -1; justify-content: flex-end; gap: 8px; }
.filters .actions button { line-height: 1.2; }
.filters .actions button .icon { width: 14px; height: 14px; }
.filter-more { border-color: transparent; padding-inline: 3px; color: var(--primary); background: transparent; }
.filter-more[aria-expanded="true"] .icon { transform: rotate(180deg); }
.filters-collapse { grid-column: 1 / -1; }
.filters-collapse:not(.expanded) { display: none; }
.picker, .range, .picker-control { position: relative; min-width: 0; }
.picker-control > .icon { position: absolute; right: 10px; top: 9px; width: 14px; height: 14px; color: #909399; pointer-events: none; }
.picker input { padding-right: 29px; }
.picker input::-webkit-search-cancel-button { display: none; }
.picker input[aria-expanded="true"] + .icon { transform: rotate(180deg); }
.picker-list, .range-panel {
  position: absolute;
  z-index: 3;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 5px 16px #1725381c;
}
.picker-list { top: calc(100% + 6px); right: 0; width: min(350px, 85vw); max-height: 244px; overflow: auto; padding: 5px 0; line-height: 1.4; }
.select-list { position: fixed; inset: auto; margin: 0; color: var(--text); text-align: left; white-space: normal; overflow-wrap: anywhere; }
.picker-option { display: grid; gap: 2px; padding: 6px 12px; cursor: pointer; }
.picker-option:is(:hover,.active,[aria-selected="true"]) { color: var(--primary); background: var(--hover); }
.select-list .picker-option[aria-disabled="true"] { color: var(--muted); cursor: default; }
.picker-option small { overflow-wrap: anywhere; }
.range-value { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 4px; padding: 0 7px; text-align: center; font-size: 12px; }
.range-value :is(#range-start,#range-end) { overflow: hidden; text-overflow: ellipsis; }
.range-value .icon { color: #909399; width: 14px; height: 14px; }
.range-divider { color: var(--muted); }
.range-panel { top: calc(100% + 6px); right: 0; width: min(318px, 85vw); display: grid; gap: 10px; padding: 12px; }
.range-panel > button { justify-self: end; }
.session-list { gap: 0; }
.session-list .data-panel { margin-top: 8px; }
.session-list .filters { border-radius: 0 0 var(--radius) var(--radius); }
.panel-tabs { background: white; padding-inline: 10px; border-radius: var(--radius) var(--radius) 0 0; }

.data-panel { padding: 9px 9px 8px; isolation: isolate; }
.table-toolbar { display: flex; align-items: center; gap: 8px; padding: 0 0 10px; }
#traffic, #sessions { min-height: 100%; grid-template-rows: minmax(0, 1fr); }
#traffic, #sessions { height: 100%; grid-template-rows: minmax(0, 1fr); }
:is(#traffic, #sessions) .data-panel { flex: 1; display: flex; flex-direction: column; min-height: 258px; }
:is(#traffic-table, #login-rows) { display: flex; flex-direction: column; min-height: 0; flex: 1; }
:is(#traffic-table, #login-rows) .table-scroll { flex: 1; }
#apps { min-height: 100%; grid-template-rows: 1fr; }
#apps .data-panel { flex: 1; }
#apps .table-toolbar { justify-content: flex-end; }
#apps .table-scroll { min-height: 251px; max-height: max(251px, calc(100dvh - 274px)); }

.table-scroll { overflow: auto; min-width: 0; container-type: inline-size; border: 1px solid var(--line); }
:is(.sidebar nav,.table-scroll)::-webkit-scrollbar { width: 5px; height: 5px; }
:is(.sidebar nav,.table-scroll)::-webkit-scrollbar-thumb { border-radius: 9px; background: #e3e4e8; }
:is(.sidebar nav,.table-scroll):hover::-webkit-scrollbar-thumb { background: #bfc2ca; }
.table-scroll:focus-visible { outline-offset: -2px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: center; font-size: 12.5px; line-height: 22px; }
th, td { padding: 6px; height: 40px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); vertical-align: middle; }
:is(th, td):last-child { border-right: 0; }
th { position: sticky; top: 0; z-index: 1; background: var(--table-head); color: rgb(0 0 0 / 70%); font-weight: 700; white-space: nowrap; }
td { background: var(--surface); overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
tr:hover td { background: #fafafa; }
.empty { padding: 22px 12px; color: var(--muted); text-align: center; font-weight: 400; }
td.empty { padding-inline: 0; }
td.empty > span { display: block; position: sticky; left: 0; width: 100cqw; }
.fixed-actions :is(th, td):last-child:not(.empty) { position: sticky; right: 0; border-left: 1px solid var(--line); }
.table-scroll.scroll-right .fixed-actions :is(th, td):last-child:not(.empty) { box-shadow: -8px 0 10px -5px rgb(0 0 0 / 12%); }
.fixed-actions th:last-child { z-index: 2; }
.row-actions { justify-content: center; flex-wrap: nowrap; gap: 8px; }
.table-action, .copy-button { min-height: 22px; padding: 0 2px; color: var(--primary); border: 0; background: transparent; font-size: 12px; }
.table-action:hover:not(:disabled), .copy-button:hover:not(:disabled) { color: var(--primary-hover); background: transparent; }
.stacked { display: grid; gap: 1px; line-height: 1.4; overflow-wrap: anywhere; }
.stacked small { font-size: 11.5px; }
.traffic-time { display: block; white-space: nowrap; line-height: 17px; }
.traffic-time small { display: block; line-height: 13px; }
td:has(.traffic-time small) { padding-block: 3px; }
.copy-value { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; }
.copy-value code { font-size: 12px; user-select: all; }
.copy-button .icon { width: 13px; height: 13px; }
.clipboard-proxy { position: fixed; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.record-count { padding-top: 7px; color: var(--muted); font-size: 12px; }
#traffic table { min-width: 1170px; }
#traffic table:has(th:nth-child(13)) { min-width: 1490px; }
#traffic table:has(th:nth-child(13)) {
  th { height: 56px; }
  th:nth-child(2) { min-width: 130px; }
  th:nth-child(3) { min-width: 150px; }
  th:nth-child(4) { min-width: 145px; }
  th:nth-child(5) { min-width: 115px; }
  th:nth-child(6) { min-width: 124px; }
  th:nth-child(7) { min-width: 100px; }
  th:nth-child(8) { min-width: 62px; }
  th:nth-child(9) { min-width: 152px; }
  th:nth-child(10), th:nth-child(11) { min-width: 136px; }
  th:nth-child(12) { min-width: 76px; }
}
#traffic th:last-child { width: 216px; min-width: 216px; }
#traffic .row-actions { gap: 3px; }
#traffic .table-action { padding-inline: 0; }
#traffic table:has(td.empty) { min-width: 0; }
#traffic table:has(td.empty) th:not(:last-child) { min-width: 0; }
#traffic table:has(td.empty) th:first-child { width: auto; }
#traffic table:has(td.empty) th:last-child { width: 190px; min-width: 190px; }
#traffic table:has(th:nth-child(13)) th:first-child, #apps th:first-child { width: 60px; min-width: 60px; }
#traffic td .stacked:has(.mono) { min-width: 120px; }
#traffic .copy-value code { max-width: 18ch; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
#traffic .taxpayer { white-space: nowrap; }
#traffic td > .mono { white-space: nowrap; }
.row-tasks { display: grid; gap: 4px; }
.row-tasks small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#apps table, #sessions table { min-width: 640px; }
#codes .table-scroll { max-height: 217px; }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 5px; min-height: 40px; padding: 3px 4px; font-size: 12.5px; }
.pagination:empty { display: none; }
.page-total { margin-right: 3px; }
.page-number { min-width: 27px; height: 27px; min-height: 27px; padding: 0 4px; border-color: transparent; font-size: inherit; }
.page-number[aria-current] { color: var(--primary); font-weight: 700; }
.page-number .icon { width: 14px; height: 14px; }
.page-size { width: 113px; margin-left: 3px; }
.page-size .select-trigger { min-height: 30px; height: 30px; }
.properties { margin: 0; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.properties > div { display: grid; gap: 4px; }
.properties dt { color: var(--muted); font-size: 12px; }
.properties dd { margin: 0; font-weight: 600; }

dialog {
  padding: 0;
  color: var(--text);
  border: 0;
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 0 16px 48px 16px #00000014, 0 12px 32px #0000001f, 0 8px 16px -8px #00000029;
}
dialog::backdrop { background: rgb(0 0 0 / 50%); }
.modal { width: min(calc(100vw - 24px), 480px); max-height: calc(100dvh - 24px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { font-size: 16px; font-weight: 500; }
.dialog-heading code { font-size: 12px; color: var(--muted); }
.dialog-heading .icon-button { width: 24px; height: 24px; min-height: 24px; }
.edit-fields { display: grid; gap: 12px; padding: 18px 20px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); padding: 12px 20px; }
#edit-notice, #detail-notice, #photo-notice { margin: 0 20px 10px; }
.org-options, .member-options { min-width: 0; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 7px; }
.org-options { max-height: 164px; overflow: auto; }
.checkbox-field { display: flex; align-items: center; gap: 8px; }
.checkbox-field input { width: 14px; height: 14px; accent-color: var(--primary); }
.role-field { display: grid; gap: 5px; }

.detail-dialog { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(980px, 88vw); max-width: none; height: 100dvh; max-height: none; border-radius: 0; }
.detail-dialog[open] { display: flex; flex-direction: column; }
.payload-dialog { width: max(610px, 50vw); }
.payload-dialog .dialog-heading { padding: 20px 20px 0; border: 0; }
.payload-dialog .dialog-heading h2 { font-weight: 400; line-height: 20px; }
.detail-summary { display: flex; flex-wrap: wrap; align-items: start; gap: 4px 16px; padding: 10px 20px; font-size: 12px; }
.detail-summary:empty { display: none; }
.detail-summary .stacked { min-width: 58px; }
.detail-grid { flex: 1; display: grid; grid-template-columns: minmax(200px, 30%) minmax(0, 1fr); min-height: 0; }
.detail-timeline, .detail-content { min-height: 0; overflow: auto; padding: 14px 20px; }
.payload-dialog .detail-grid { grid-template-columns: minmax(0, 1fr); }
.payload-dialog .detail-timeline { display: none; }
.payload-dialog .detail-content { padding-top: 6px; }
.detail-timeline { background: #fafafa; border-right: 1px solid var(--line); }
.detail-timeline h3 { margin-bottom: 7px; }
.detail-timeline p { margin: 6px 0 12px; font-size: 13px; }
.timeline-job { border: 1px solid var(--line); border-radius: 4px; background: white; margin-bottom: 10px; padding: 10px; }
.timeline-heading { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 13px; }
.timeline-steps { padding: 0 0 0 8px; margin: 8px 0 0; list-style: none; }
.timeline-step { position: relative; border-left: 1px solid var(--line); padding: 3px 0 8px 13px; font-size: 13px; }
.timeline-step::before { content: ""; position: absolute; left: -4px; top: 9px; width: 7px; height: 7px; background: var(--primary); border-radius: 50%; }
.timeline-step.ok::before { background: #3d9d62; }
.timeline-step.warn::before { background: #c07a1c; }
.timeline-step.fail::before { background: #ba4b43; }
.step-link, .related-link { justify-content: flex-start; text-align: left; width: 100%; font-size: 12px; white-space: normal; }
.step-link { border: 0; padding: 0 3px; color: var(--primary); }
.related-link { margin-bottom: 5px; }
.tabs { display: flex; gap: 40px; min-height: 40px; border-bottom: 2px solid var(--line); }
.tabs button { position: relative; min-height: 38px; padding: 0; border: 0; border-radius: 0; background: transparent; font-weight: 500; }
.tabs button:hover:not(:disabled) { color: var(--primary); background: transparent; }
.tabs button[aria-pressed="true"] { color: var(--primary); }
.tabs button[aria-pressed="true"]::after { content: ""; position: absolute; right: 0; bottom: -2px; left: 0; height: 2px; background: var(--primary); }
.payload-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 10px; }
.payload-search { flex: 1 1 175px; position: relative; max-width: 280px; }
.payload-search > span { position: absolute; left: 10px; top: 8px; color: #909399; pointer-events: none; }
.payload-search input { padding-left: 32px; }
.json { padding: 16px; overflow: auto; border-radius: 2px; background: #f7f7f7; font: 13px/1.6 var(--mono); }
.json summary { display: flex; align-items: baseline; width: fit-content; gap: 2px; }
.json summary .icon { align-self: center; width: 13px; height: 13px; }
.json details[open] > summary .icon { transform: rotate(90deg); }
.json details[open] > summary .json-compact { display: none; }
.json :is(details, .json-leaf) { margin-left: 1.1em; overflow-wrap: anywhere; }
.json > details { margin-left: 0; }
.json .json-bracket { color: var(--muted); }
@media (min-width: 680px) {
  #payload { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: end; row-gap: 12px; }
  #payload .payload-toolbar { justify-content: flex-end; align-self: stretch; margin: 0; padding: 0 0 4px 16px; border-bottom: 2px solid var(--line); }
  #payload .payload-search { flex-basis: 130px; }
  #payload .json { grid-column: 1 / -1; }
}
.media-grid { display: grid; gap: 9px; align-content: start; }
.media-card { border: 1px solid var(--line); border-radius: 4px; padding: 10px; display: grid; gap: 8px; }
.media-card video { display: block; width: 100%; max-height: 52dvh; background: #18181b; border-radius: 4px; }
.media-card .select-control { width: 88px; }

.guide { width: min(600px, 100vw); overflow: auto; }
.guide .panel { margin: 0; padding: 16px 20px; display: grid; gap: 9px; border-bottom: 1px solid var(--line); border-radius: 0; }
.guide pre { margin: 0; padding: 12px; border-radius: 4px; background: var(--hover); white-space: pre-wrap; overflow-wrap: anywhere; }
.guide ol { margin: 0; padding-left: 20px; }

.photo { margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; border-radius: 0; background: #15171c; color: white; }
.photo[open] { display: flex; flex-direction: column; }
.photo .dialog-heading { align-items: center; border-color: #343640; }
.photo button { color: white; background: #252935; border-color: #414552; }
.photo button:hover:not(:disabled) { color: white; background: #393f50; }
.photo button:disabled { opacity: .5; }
.photo-tools { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; border-top: 1px solid #343640; padding: 8px 12px; }
.photo-stage { display: flex; flex: 1; min-height: 0; overflow: auto; padding: 12px; }
.photo-frame { position: relative; flex: none; margin: auto; }
.photo-stage img { display: block; position: absolute; left: 50%; top: 50%; height: auto; }
.photo .notice { margin-top: 8px !important; }

@media (max-width: 1050px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { --filter-columns: 2; }
  .top-actions { gap: 5px; }
}
@media (min-width: 1250px) {
  #service-metrics { grid-template-columns: repeat(7,minmax(0,1fr)); }
}
@media (max-width: 840px) {
  .shell, .shell.sidebar-closed { grid-template-columns: 0 minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 9; width: var(--side); box-shadow: 5px 0 20px #16233726; }
  .sidebar-closed .sidebar { display: none; }
  .shell:not(.sidebar-closed) .nav-scrim { display: block; position: fixed; inset: 0; z-index: 8; border: 0; background: #0006; border-radius: 0; }
  .detail-dialog { width: min(100vw, 660px); }
}
@media (max-width: 580px) {
  .topbar { padding-inline: 4px 8px; gap: 0; }
  .top-left, .top-actions { gap: 2px; }
  .breadcrumb { margin-left: 3px; }
  .breadcrumb .crumb-group, .breadcrumb .crumb-divider, .account-name, .tenant, .account summary > .icon { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .metrics, .view { gap: 8px; }
  .metric { min-height: 82px; padding: 9px 10px; }
  .filters { --filter-columns: 1; padding-top: 10px; }
  .range-value { gap: 3px; padding-inline: 5px; grid-template-columns: 14px 1fr auto 1fr; font-size: 11px; }
  .range-value :is(#range-start, #range-end) { white-space: normal; line-height: 1.2; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 42%) minmax(0, 1fr); }
  .payload-dialog .detail-grid { grid-template-rows: minmax(0, 1fr); }
  .detail-timeline { border-right: 0; border-bottom: 1px solid var(--line); }
  .panel-tabs { gap: 22px; }
}
