@font-face { font-family: "Outfit"; src: url("/fonts/outfit-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("/fonts/outfit-latin-500-normal.woff2") format("woff2"); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("/fonts/outfit-latin-600-normal.woff2") format("woff2"); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("/fonts/outfit-latin-700-normal.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: "Ubuntu Mono"; src: url("/fonts/ubuntu-mono-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Ubuntu Mono"; src: url("/fonts/ubuntu-mono-latin-700-normal.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --logo-brown: #584738;
  --brand-orange: #ff703b;
  --brand-orange-rgb: 255 112 59;
  --brand-orange-bright: #ff8b5c;
  --brand-orange-strong: #e65f2f;
  --brand-orange-readable: #ac4118;
  --brand-orange-soft: #ffecdd;
  --admin-accent: oklch(0.47 0.075 38);
  --admin-accent-strong: oklch(0.39 0.06 38);
  --admin-accent-soft: oklch(0.95 0.024 45);
  --admin-sidebar: oklch(0.972 0.014 55);
  --admin-border: oklch(0.905 0.02 50);
  --admin-muted: oklch(0.5 0.035 45);
  --bg: #fcfaf6;
  --surface: #fffefb;
  --surface-strong: #f7f1ea;
  --border: #ebe5de;
  --text: #302d29;
  --text-muted: #7b6b61;
  --success: #007f4e;
  --success-soft: #e1f8eb;
  --warning: #465200;
  --warning-soft: #f4f3d1;
  --danger: #c13140;
  --danger-soft: #ffe9e8;
  --route-padding-x: 2.5rem;
  --route-padding-y: 2rem;
  --header-content-gap: 2rem;
  --section-gap: 2rem;
  --surface-padding: 1.25rem;
  --row-padding-y: .875rem;
  --radius-sm: 6px;
  --radius: 8px;
  --shadow: 0 6px 8px rgba(48, 45, 41, .12);
  font-family: "Outfit", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis-weight: none;
}

html[data-resolved-theme="dark"] {
  color-scheme: dark;
  --logo-brown: #f0e5d9;
  --brand-orange-readable: #ff9d73;
  --brand-orange-soft: #3a241b;
  --admin-accent: oklch(0.76 0.075 38);
  --admin-accent-strong: oklch(0.84 0.055 42);
  --admin-accent-soft: oklch(0.25 0.025 42);
  --admin-sidebar: oklch(0.19 0.012 48);
  --admin-border: oklch(0.31 0.016 48);
  --admin-muted: oklch(0.72 0.025 45);
  --bg: #121110;
  --surface: #191715;
  --surface-strong: #24211e;
  --border: #39342f;
  --text: #f5f1eb;
  --text-muted: #b8ada4;
  --success: #69d8a4;
  --success-soft: #183329;
  --warning: #d4dc76;
  --warning-soft: #30321d;
  --danger: #ff8d98;
  --danger-soft: #3b2024;
  --shadow: 0 6px 8px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { background: var(--bg); }
body { min-width: 320px; margin: 0; overflow: hidden; background: var(--bg); color: var(--text); font-kerning: normal; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--admin-accent); outline-offset: 2px; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.app-shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); height: 100vh; }
.sidebar { position: relative; z-index: 20; display: flex; min-height: 0; flex-direction: column; overflow: visible; border-right: 1px solid var(--admin-border); background: var(--admin-sidebar); }
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 24px 24px; }
.brand img { display: block; flex: 0 0 35px; }
.brand-copy { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.wordmark { font-size: 20px; line-height: 1; letter-spacing: -.04em; }
.wordmark strong { color: var(--logo-brown); font-weight: 700; }
.wordmark b { color: var(--brand-orange-bright); font-weight: 700; }
.console-identity { display: flex; align-items: center; gap: 5px; color: var(--admin-accent-strong); font-size: 12px; font-weight: 600; line-height: 14px; }
.console-identity svg, .mobile-context-icon { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-list { display: grid; gap: 4px; min-height: 0; padding: 0 12px; overflow-y: auto; }
.nav-list a { position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--text-muted); font-size: 14px; font-weight: 500; text-decoration: none; transition: color 160ms ease, background-color 160ms ease; }
.nav-list a:hover { background: var(--admin-accent-soft); color: var(--text); }
.nav-list a[aria-current="page"] { background: var(--admin-accent-soft); color: var(--text); font-weight: 600; }
.nav-icon { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--admin-muted); transition: color 160ms ease; }
.nav-list a:hover .nav-icon { color: var(--text); }
.nav-list a[aria-current="page"] .nav-icon { color: var(--admin-accent); }
.admin-account-bar { position: relative; margin-top: auto; padding: 12px 12px 20px; border-top: 1px solid var(--admin-border); background: var(--surface); }
.admin-account-trigger { display: flex; width: 100%; min-height: 52px; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 8px; border: 1px solid transparent; border-radius: var(--radius); background: transparent; color: var(--text); cursor: pointer; text-align: left; transition: border-color 160ms ease, background-color 160ms ease; }
.admin-account-trigger:hover, .admin-account-trigger[aria-expanded="true"] { border-color: var(--border); background: var(--bg); }
.admin-profile { display: flex; min-width: 0; align-items: center; gap: 12px; }
.admin-profile > span:last-child { min-width: 0; }
.admin-profile strong, .admin-profile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-profile strong { font-size: 14px; font-weight: 700; line-height: 20px; }
.admin-profile small { color: var(--text-muted); font-size: 12px; line-height: 16px; }
.avatar { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text-muted); font: 700 12px/1 "Ubuntu Mono", ui-monospace, monospace; }
.admin-account-chevron { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border: 1px solid transparent; border-radius: var(--radius-sm); transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease; }
.admin-account-trigger:hover .admin-account-chevron { border-color: var(--border); background: var(--surface); }
.admin-account-trigger[aria-expanded="true"] .admin-account-chevron { transform: rotate(180deg); }
.admin-account-chevron svg, .account-menu-item-chevron, .account-menu-icon svg, .theme-option-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.admin-account-menu { position: absolute; right: 12px; bottom: calc(100% + 8px); left: 12px; z-index: 70; overflow: visible; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); transform-origin: bottom center; animation: account-menu-in 180ms cubic-bezier(.16, 1, .3, 1); }
.admin-account-menu[hidden], .theme-menu[hidden] { display: none; }
.admin-account-summary { display: flex; min-width: 0; align-items: center; gap: 12px; padding: 16px; }
.admin-account-summary > span:last-child { min-width: 0; }
.admin-account-summary strong, .admin-account-summary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-account-summary strong { font-size: 14px; line-height: 20px; }
.admin-account-summary small { color: var(--text-muted); font: 12px/16px "Ubuntu Mono", ui-monospace, monospace; }
.account-menu-avatar { width: 44px; height: 44px; flex-basis: 44px; border-color: color-mix(in srgb, var(--brand-orange) 24%, var(--border)); background: var(--admin-accent-soft); color: var(--admin-accent-strong); font-size: 14px; }
.admin-account-section { position: relative; padding: 8px; border-top: 1px solid var(--border); }
.account-menu-item { display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); cursor: pointer; text-align: left; transition: color 160ms ease, background-color 160ms ease; }
.account-menu-item:hover, .account-menu-item[aria-expanded="true"] { background: var(--bg); color: var(--text); }
.account-menu-item-copy { display: flex; min-width: 0; align-items: center; gap: 12px; }
.account-menu-item-copy > span:last-child, .account-menu-item-copy strong, .account-menu-item-copy small { display: block; }
.account-menu-item strong { font-size: 14px; line-height: 20px; }
.account-menu-item small { color: var(--text-muted); font-size: 12px; line-height: 16px; }
.account-menu-icon { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); }
.account-menu-item-chevron { flex: 0 0 16px; opacity: .65; transition: transform 160ms ease; }
.theme-menu-trigger[aria-expanded="true"] .account-menu-item-chevron { transform: rotate(180deg); }
.theme-menu { position: absolute; bottom: 0; left: calc(100% + 8px); z-index: 80; width: 192px; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); animation: account-menu-in 160ms cubic-bezier(.16, 1, .3, 1); }
.theme-menu button { display: flex; width: 100%; min-height: 36px; align-items: center; gap: 10px; padding: 6px 8px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); cursor: pointer; font-size: 14px; font-weight: 500; text-align: left; }
.theme-menu button:hover, .theme-menu button:focus-visible { background: var(--bg); color: var(--text); }
.theme-menu button[aria-checked="true"] { background: var(--admin-accent-soft); color: var(--admin-accent-strong); }
.theme-option-icon, .theme-check { display: grid; width: 20px; height: 20px; flex: 0 0 20px; place-items: center; }
.theme-check { margin-left: auto; }
.theme-menu button[aria-checked="true"] .theme-check::before { content: ""; width: 10px; height: 5px; border-bottom: 2px solid currentColor; border-left: 2px solid currentColor; transform: rotate(-45deg) translateY(-1px); }
.admin-logout { min-height: 40px; justify-content: flex-start; color: var(--danger); }
.admin-logout:hover { background: var(--danger-soft); color: var(--danger); }
.admin-logout .account-menu-icon { border-color: transparent; background: transparent; }
.admin-logout:disabled { cursor: wait; opacity: .65; }
@keyframes account-menu-in { from { opacity: 0; transform: translateY(6px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }

.workspace-shell { min-width: 0; min-height: 0; background: var(--bg); }
.mobile-header { display: none; }
.mobile-menu { display: none; }
main { height: 100%; max-width: 1536px; margin: 0 auto; padding: var(--route-padding-y) var(--route-padding-x) 64px; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; }
main:focus { outline: none; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: var(--header-content-gap); }
.page-header > div:first-child { min-width: 0; max-width: 768px; }
h1 { margin: 0; color: var(--text); font-size: 1.875rem; font-weight: 600; letter-spacing: 0; line-height: 2.25rem; text-wrap: balance; }
h2 { margin: 0; color: var(--text); font-size: 1.25rem; font-weight: 600; letter-spacing: 0; line-height: 1.75rem; text-wrap: balance; }
h3 { margin: 0; font-size: .875rem; font-weight: 600; line-height: 1.25rem; }
.lede { max-width: 72ch; margin: 8px 0 0; color: var(--text-muted); font-size: .875rem; font-weight: 400; line-height: 1.5rem; text-wrap: pretty; }
.audit-page-header .lede { max-width: none; white-space: nowrap; }
.section-title { margin-top: 0; }
.compact-lede { margin-top: 4px; }
.spaced-lede { margin-top: 8px; }
.inset-heading { padding: 0 0 16px; }
.top-spaced { margin-top: 16px; }
.full-action { width: 100%; margin-top: 16px; }
.full-action.compact { margin-top: 12px; }
.page-actions { display: flex; flex: 0 0 auto; gap: 8px; flex-wrap: wrap; }

.button, .icon-button { border: 0; cursor: pointer; }
.button { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: 8px; padding: 7px 13px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; line-height: 20px; text-decoration: none; transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease; }
.button.primary { background: var(--text); color: var(--bg); }
.button.primary:hover { background: #464140; }
.button.accent { background: var(--brand-orange); color: var(--text); }
.button.accent:hover { background: var(--brand-orange-bright); }
.button.secondary { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.button.secondary:hover { background: var(--surface-strong); }
.button.danger { background: var(--danger); color: white; }
.button.danger:hover { background: #9a1c2e; }
.button.danger-secondary { border-color: #ecd2d2; background: var(--danger-soft); color: var(--danger); }
.button.danger-secondary:hover { border-color: var(--danger); background: var(--danger); color: white; }
.button:disabled { cursor: not-allowed; opacity: .5; }
.icon-button { width: 40px; height: 40px; border-radius: var(--radius-sm); background: transparent; color: var(--text); }

.ledger { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.ledger-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px var(--surface-padding); border-bottom: 1px solid var(--border); background: var(--bg); }
.ledger-heading p { margin: 4px 0 0; color: var(--text-muted); font-size: 12px; line-height: 20px; }
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; color: var(--text); font-size: 13px; }
th { padding: 10px var(--surface-padding); background: var(--bg); color: var(--text-muted); font-size: 11px; font-weight: 600; text-align: left; text-transform: uppercase; letter-spacing: .055em; white-space: nowrap; }
td { padding: var(--row-padding-y) var(--surface-padding); border-top: 1px solid var(--border); vertical-align: middle; }
tbody tr { transition: background-color 160ms ease; }
tbody tr:hover { background: var(--bg); }
tbody tr[data-href], tbody tr[data-user-id], tbody tr[data-workspace-id] { cursor: pointer; }
tbody tr[data-user-id][aria-selected="true"], tbody tr[data-workspace-id][aria-selected="true"] { background: var(--admin-accent-soft); }
.primary-cell { display: block; color: var(--text); font-size: 14px; font-weight: 600; line-height: 20px; }
.secondary-cell { display: block; margin-top: 2px; color: var(--text-muted); font: 12px/16px "Ubuntu Mono", ui-monospace, monospace; }
.status { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.verification-status { display: inline-grid; grid-template-columns: 7px auto; align-items: center; column-gap: 6px; padding: 0; background: transparent; }
.status.active, .status.success, .status.ready, .status.ok, .status.verified { color: var(--success); }
.status.unverified { color: var(--brand-orange-readable); }
.workspace-directory-status { padding: 3px 8px; border-radius: var(--radius-sm); }
.tag { display: inline-flex; padding: 3px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-muted); font-size: 11px; font-weight: 600; line-height: 18px; }

.overview-report { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.overview-report-heading, .overview-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.overview-report-heading { padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--bg); }
.overview-report-heading h2, .overview-section-heading h2 { font-size: 16px; line-height: 24px; }
.overview-report-heading p { margin: 3px 0 0; color: var(--text-muted); font-size: 12px; line-height: 18px; }
.footprint-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.footprint-metrics > div { min-width: 0; padding: 16px 18px; }
.footprint-metrics > div + div { border-left: 1px solid var(--border); }
.footprint-metrics dt { color: var(--text-muted); font-size: 12px; font-weight: 600; line-height: 18px; }
.footprint-metrics dd { margin: 6px 0 2px; font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 34px; }
.footprint-metrics span { display: block; color: var(--text-muted); font-size: 11px; line-height: 17px; }
.overview-analysis-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); gap: 16px; margin-top: 16px; }
.overview-section { min-width: 0; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.overview-section-heading { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.overview-section-heading a, .overview-section-heading > span { color: var(--admin-accent-strong); font-size: 12px; font-weight: 600; line-height: 20px; }
.overview-section-heading > span { color: var(--text-muted); font-weight: 500; }
.overview-section-heading > div p { margin: 3px 0 0; color: var(--text-muted); font-size: 12px; line-height: 18px; }
.leaderboard-group { margin: 0; padding: 8px 0 0; list-style: none; }
.leaderboard-group li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 0 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.leaderboard-group li:first-child { border-top: 0; }
.leaderboard-rank { grid-row: 1 / span 2; display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--surface-strong); color: var(--text-muted); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.leaderboard-group a { min-width: 0; overflow: hidden; color: var(--text); font-size: 13px; font-weight: 600; line-height: 18px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-group strong { color: var(--text-muted); font-size: 11px; font-weight: 500; line-height: 16px; }
.product-signals { padding-bottom: 6px; }
.signal-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 13px; padding: 13px 0; }
.signal-row + .signal-row { border-top: 1px solid var(--border); }
.signal-marker { display: grid; width: 44px; height: 36px; place-items: center; border-radius: var(--radius-sm); background: var(--surface-strong); color: var(--text); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.signal-marker.healthy { background: var(--success-soft); color: var(--success); }
.signal-marker.attention { background: var(--brand-orange-soft); color: var(--brand-orange-readable); }
.signal-row h3 { margin: 0; font-size: 13px; font-weight: 600; line-height: 18px; }
.signal-row p { margin: 3px 0 0; color: var(--text-muted); font-size: 12px; line-height: 18px; }
.signal-row a { color: var(--admin-accent-strong); font-weight: 600; white-space: nowrap; }
.overview-boundary { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-strong); color: var(--text-muted); font-size: 11px; line-height: 17px; }
.overview-boundary svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: var(--admin-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.overview-boundary strong { flex: 0 0 auto; color: var(--text); }
.overview-empty { margin: 0; color: var(--text-muted); font-size: 13px; }

.filters { display: flex; gap: 8px; align-items: center; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.directory-toolbar { display: grid; grid-template-columns: minmax(15rem, 1fr) minmax(13rem, .7fr) 12rem auto; align-items: center; gap: 12px; padding: 20px var(--surface-padding); border-bottom: 1px solid var(--border); background: var(--surface); }
.workspace-directory-toolbar { grid-template-columns: minmax(16rem, 1fr) minmax(12rem, .55fr) auto; }
.directory-search, .workspace-filter-control { position: relative; min-width: 0; }
.directory-search > svg, .workspace-filter-control > svg { position: absolute; top: 50%; left: 14px; width: 17px; height: 17px; pointer-events: none; transform: translateY(-50%); fill: none; stroke: var(--text-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.directory-search .input, .workspace-filter-control .input { min-height: 44px; padding-left: 42px; }
.workspace-filter-control .input { padding-right: 44px; box-shadow: 0 1px 2px rgba(48, 45, 41, .05); font-size: 14px; line-height: 20px; }
.workspace-filter-control.has-value .input { padding-right: 78px; }
.workspace-filter-control input[type="search"]::-webkit-search-cancel-button { display: none; appearance: none; -webkit-appearance: none; }
.workspace-filter-control input[type="search"]::-ms-clear { display: none; }
.workspace-filter-control .input:focus-visible { outline: 0; border-color: rgba(255, 112, 59, .35); background: var(--bg); box-shadow: 0 0 0 2px rgba(255, 112, 59, .15); }
.workspace-filter-control.menu-open .input { border-color: rgba(255, 112, 59, .35); background: var(--bg); box-shadow: 0 0 0 2px rgba(255, 112, 59, .1); }
.directory-filter { min-height: 44px; }
.result-count { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 8px 13px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--text-muted); font-size: 11px; font-weight: 600; line-height: 20px; white-space: nowrap; }
.pagination-footer { display: flex; justify-content: center; padding: 16px var(--surface-padding); border-top: 1px solid var(--border); background: var(--surface); }
.pagination-footer[hidden] { display: none; }
.field { display: grid; gap: 6px; margin: 16px 0; }
.field label { color: var(--text-muted); font-size: 12px; font-weight: 600; }
.input, select, textarea { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.input:hover, select:hover, textarea:hover { border-color: #cfc3ba; }
.select-control { position: relative; min-width: 0; width: 100%; }
.select-trigger { display: flex; width: 100%; height: 44px; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(48, 45, 41, .05); cursor: pointer; font-size: 14px; font-weight: 500; letter-spacing: 0; line-height: 20px; transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }
.select-trigger > span { min-width: 0; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.select-trigger:hover { border-color: rgba(255, 112, 59, .25); background: var(--bg); }
.select-trigger:focus-visible { outline: 0; border-color: rgba(255, 112, 59, .35); background: var(--bg); box-shadow: 0 0 0 2px rgba(255, 112, 59, .15); }
.select-trigger.open { outline: 0; border-color: rgba(255, 112, 59, .35); background: var(--bg); box-shadow: 0 0 0 2px rgba(255, 112, 59, .1); }
.select-trigger:disabled { cursor: not-allowed; opacity: .6; }
.select-chevron { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: var(--text-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: color 160ms ease, transform 160ms ease; }
.select-trigger.open .select-chevron, .combobox-toggle.open .select-chevron { stroke: var(--text-muted); transform: rotate(180deg); }
.select-menu { position: fixed; z-index: 140; max-height: 256px; padding: 4px 0; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); box-shadow: 0 10px 15px -3px rgba(48, 45, 41, .1), 0 4px 6px -4px rgba(48, 45, 41, .1); font-size: 14px; font-weight: 500; letter-spacing: 0; line-height: 20px; }
.select-menu[hidden] { display: none; }
.select-menu { scrollbar-color: rgb(var(--brand-orange-rgb) / 22%) transparent; scrollbar-width: thin; }
.select-menu::-webkit-scrollbar { width: 5px; height: 5px; }
.select-menu::-webkit-scrollbar-track { background: transparent; }
.select-menu::-webkit-scrollbar-thumb { border-radius: 999px; background: rgb(var(--brand-orange-rgb) / 22%); }
.select-menu::-webkit-scrollbar-thumb:hover { background: rgb(var(--brand-orange-rgb) / 40%); }
.menu-option { display: flex; width: 100%; min-height: 44px; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 0; background: transparent; color: var(--text); cursor: pointer; font: inherit; text-align: left; transition: background-color 140ms ease; }
.menu-option:hover, .menu-option.active, .menu-option.selected { background: var(--bg); }
.menu-option:disabled { cursor: not-allowed; opacity: .45; }
.menu-option-copy { display: grid; min-width: 0; }
.menu-option-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-option-copy small { overflow: hidden; color: var(--text-muted); font: 11px/16px "Ubuntu Mono", ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.menu-check { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: var(--brand-orange-strong); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.menu-empty { margin: 0; padding: 10px 12px; color: var(--text-muted); font-size: 12px; line-height: 20px; }
.combobox-toggle, .combobox-clear { position: absolute; top: 50%; display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); cursor: pointer; transform: translateY(-50%); }
.combobox-toggle { right: 5px; }
.combobox-clear { right: 39px; }
.combobox-clear[hidden] { display: none; }
.combobox-toggle:hover, .combobox-clear:hover { background: var(--bg); color: var(--text); }
.combobox-toggle:focus-visible, .combobox-clear:focus-visible { outline: 2px solid rgba(255, 112, 59, .35); outline-offset: -2px; }
.combobox-clear-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.filters .select-control { min-width: 170px; }
.compact.select-control .select-trigger { height: 44px; padding: 0 12px; font-size: 12px; }
.input-search { min-width: 250px; padding-left: 36px; background-image: radial-gradient(circle, transparent 43%, var(--text-muted) 47%, var(--text-muted) 54%, transparent 58%), linear-gradient(45deg, transparent 45%, var(--text-muted) 46%, var(--text-muted) 55%, transparent 56%); background-size: 12px 12px, 7px 7px; background-position: 12px 12px, 22px 23px; background-repeat: no-repeat; }
textarea { min-height: 88px; resize: vertical; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); gap: 16px; }
.detail-stack { display: grid; gap: 16px; align-content: start; }
.panel { padding: 20px; }
.definition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; margin: 20px 0 0; }
.definition-grid dt { color: var(--text-muted); font-size: 11px; font-weight: 600; line-height: 16px; text-transform: uppercase; letter-spacing: .04em; }
.definition-grid dd { margin: 4px 0 0; font-size: 14px; font-weight: 500; line-height: 20px; overflow-wrap: anywhere; }
.mono { font-family: "Ubuntu Mono", ui-monospace, monospace; font-size: 13px !important; }
.quota-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); font-size: 13px; }
.quota-row:first-of-type { margin-top: 14px; }
.notice { padding: 14px; border: 1px solid #dfddae; border-radius: var(--radius-sm); background: var(--warning-soft); color: var(--warning); font-size: 12px; line-height: 18px; }
.notice strong { display: block; margin-bottom: 3px; }
.notice.owner-safeguard { margin-top: 16px; border-color: #ecd2d2; background: #fff4f2; color: #8b3540; }
.notice.owner-safeguard p { margin: 0; }
.notice.owner-safeguard ul { margin: 8px 0 0; padding-left: 18px; }
.notice.owner-safeguard li + li { margin-top: 3px; }
.action-list { display: grid; gap: 8px; margin-top: 16px; }
.action-list .button { width: 100%; justify-content: flex-start; }
.action-hint { margin: 6px 0 0; color: var(--text-muted); font-size: 11px; line-height: 16px; }

.selected-record { margin: 16px 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); font-size: 12px; line-height: 18px; }
.selected-record strong { display: block; margin-bottom: 3px; }
.audit-filters { padding: 16px var(--surface-padding); border-bottom: 1px solid var(--border); }
.audit-filter-grid { display: grid; grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(150px, .8fr)) minmax(150px, .7fr); gap: 10px; }
.audit-filter-grid .select-control, .audit-filter-grid .audit-filter-input { min-width: 0; }
.audit-filter-grid .input, .audit-filter-grid .select-trigger { width: 100%; height: 36px; min-height: 36px; }
.audit-time-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.audit-time-toolbar fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.audit-time-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.audit-time-presets button { min-height: 32px; padding: 5px 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.audit-time-presets button:hover, .audit-time-presets button.active { border-color: var(--admin-accent); background: var(--admin-accent-soft); color: var(--admin-accent-strong); }
.audit-filter-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.audit-custom-range { display: flex; gap: 10px; margin-top: 12px; }
.audit-custom-range[hidden] { display: none; }
.audit-custom-range label { display: grid; grid-template-columns: auto minmax(190px, 1fr); align-items: center; gap: 8px; color: var(--text-muted); font-size: 11px; font-weight: 600; }
.audit-custom-range .input { min-height: 36px; }
.audit-loading { padding: 42px 24px; color: var(--text-muted); font-size: 12px; text-align: center; }
.audit-columns, .audit-event { display: grid; grid-template-columns: 145px minmax(250px, 1.2fr) minmax(140px, .55fr) minmax(180px, .8fr) 52px; gap: 16px; }
.audit-columns { align-items: center; padding: 10px var(--surface-padding); border-bottom: 1px solid var(--border); background: var(--bg); color: var(--text-muted); font-size: 10px; font-weight: 600; letter-spacing: .05em; line-height: 14px; text-transform: uppercase; }
.audit-event { padding: 16px var(--surface-padding); align-items: start; font-size: 12px; }
.audit-event + .audit-event { border-top: 1px solid var(--border); }
.audit-event time { color: var(--text-muted); font-family: "Ubuntu Mono", ui-monospace, monospace; }
.audit-action { font-size: 14px; font-weight: 600; }
.audit-reason { margin-top: 4px; color: var(--text-muted); line-height: 18px; }
.audit-affected-primary { display: flex; align-items: baseline; gap: 5px; font-size: 11px; }
.audit-affected-primary > span, .audit-context > span:first-child { color: var(--text-muted); }
.audit-affected-primary .mono { color: var(--text); font-weight: 600; }
.audit-context { display: flex; align-items: baseline; gap: 5px; margin-top: 4px; color: var(--text-muted); font-size: 10px; line-height: 15px; }
.audit-context .mono { font-size: 11px !important; }
.audit-details-heading { text-align: right; }
.audit-details-cell { display: flex; justify-content: flex-end; }
.audit-details-button { display: grid; width: 36px; height: 36px; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-muted); cursor: pointer; }
.audit-details-button:hover, .audit-details-button:focus-visible { border-color: var(--admin-accent); background: var(--admin-accent-soft); color: var(--admin-accent-strong); }
.audit-details-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.audit-cell-label { display: none; margin-bottom: 3px; color: var(--text-muted); font-size: 10px; font-weight: 600; letter-spacing: .04em; line-height: 14px; text-transform: uppercase; }
.audit-pagination { padding: 16px var(--surface-padding); border-top: 1px solid var(--border); text-align: center; }
#audit-load-more-trigger { height: 1px; }
.audit-pagination-error { margin: 8px 0 0; color: var(--danger); font-size: 12px; line-height: 18px; }
.audit-reference-header { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 18px; background: var(--surface); }
.audit-reference-header > div { min-width: 0; }
.audit-reference-header p { margin: 0 0 8px; color: var(--text-muted); font-size: 11px; font-weight: 700; letter-spacing: .055em; line-height: 16px; text-transform: uppercase; }
.audit-reference-header h2 { margin: 0; overflow-wrap: anywhere; font-size: 22px; letter-spacing: -.02em; line-height: 28px; }
.audit-reference-close { width: 44px; height: 44px; border: 1px solid var(--text-muted); background: var(--surface); box-shadow: 0 2px 4px rgba(48, 45, 41, .08); }
.audit-reference-close:hover { border-color: var(--text); background: var(--surface-strong); }
.audit-reference-content { padding: 0 24px 28px; }
.audit-detail-grid { margin: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.audit-detail-grid > div { display: grid; min-width: 0; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; align-items: center; padding: 13px 4px; border-bottom: 1px solid var(--border); }
.audit-detail-grid > div:last-child { border-bottom: 0; }
.audit-detail-grid dt { color: var(--text-muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; line-height: 16px; text-transform: uppercase; }
.audit-detail-grid dd { margin: 0; overflow-wrap: anywhere; color: var(--text); font-family: inherit; font-size: 14px; font-weight: 500; line-height: 20px; }
.audit-raw-section { margin-top: 16px; }
.audit-data-block { position: relative; }
.audit-data-block .audit-copy-raw { position: absolute; top: 10px; right: 10px; z-index: 1; display: grid; width: 32px; height: 32px; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-muted); cursor: pointer; }
.audit-copy-raw:hover, .audit-copy-raw:focus-visible { border-color: var(--admin-accent); background: var(--admin-accent-soft); color: var(--admin-accent-strong); }
.audit-copy-raw svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.audit-raw-values { max-height: 360px; margin: 0; padding: 16px 52px 16px 16px; overflow: auto; border: 1px solid var(--border); border-radius: 0; background: var(--surface); color: var(--text); font: 12px/19px "Ubuntu Mono", ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty-state { padding: 48px 24px; text-align: center; color: var(--text-muted); }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--text); }
.loading { min-height: 280px; display: grid; place-items: center; color: var(--text-muted); font-size: 14px; }
.form-error { min-height: 18px; color: var(--danger); font-size: 12px; }

.user-panel-layer { position: fixed; inset: 0; z-index: 40; display: flex; justify-content: flex-end; background: rgba(48, 45, 41, .28); opacity: 0; transition: opacity 140ms ease-out; }
.user-panel-layer[hidden] { display: none; }
.user-panel-layer.open { opacity: 1; }
.user-panel { display: flex; width: min(720px, calc(100vw - 256px)); height: 100%; flex-direction: column; overflow: hidden; border-left: 1px solid var(--border); background: var(--surface); box-shadow: -6px 0 8px rgba(48, 45, 41, .12); transform: translateX(100%); transition: transform 180ms cubic-bezier(.22, 1, .36, 1); }
.user-panel-layer.open .user-panel { transform: translateX(0); }
.user-panel-header { display: flex; min-height: 76px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 24px; border-bottom: 1px solid var(--border); background: var(--surface); }
.user-panel-header > div { min-width: 0; }
.user-panel-header h2, .user-panel-header p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-panel-header h2 { font-size: 1.25rem; line-height: 1.75rem; }
.user-panel-header p { margin: 2px 0 0; color: var(--text-muted); font-size: 13px; line-height: 18px; }
.panel-close { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); cursor: pointer; }
.panel-close:hover { background: var(--surface-strong); }
.panel-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.user-panel-content { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.panel-loading { display: grid; min-height: 260px; place-items: center; color: var(--text-muted); font-size: 14px; }
.panel-error { padding: 40px 24px; text-align: center; }
.panel-error strong { display: block; }
.panel-error p { margin: 6px 0 18px; color: var(--text-muted); }
.panel-section { padding: 20px 24px; border-bottom: 1px solid var(--border); }
.panel-section-heading h3 { font-size: 14px; line-height: 20px; }
.panel-section-heading p { margin: 4px 0 0; color: var(--text-muted); font-size: 12px; line-height: 18px; }
.panel-section-copy { max-width: 62ch; margin: 8px 0 0; color: var(--text-muted); font-size: 12px; line-height: 18px; }
.panel-definition-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 24px; margin: 14px 0 0; }
.panel-definition-grid dt { color: var(--text-muted); font-size: 11px; font-weight: 600; line-height: 16px; text-transform: uppercase; letter-spacing: .04em; }
.panel-definition-grid dd { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 500; line-height: 20px; }
.workspace-lifecycle-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.workspace-plan-value { display: flex; align-items: center; gap: 8px; }
.workspace-plan-value .button { min-height: 28px; padding: 3px 8px; font-size: 11px; }
.capacity-badge { display: inline-flex; min-width: 54px; align-items: center; justify-content: center; padding: 3px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-strong); color: var(--text); font-size: 11px; font-variant-numeric: tabular-nums; font-weight: 600; line-height: 18px; white-space: nowrap; }
.capacity-badge.over-limit { border-color: color-mix(in srgb, var(--danger) 28%, var(--border)); background: var(--danger-soft); color: var(--danger); }
.capacity-badge.unknown { color: var(--text-muted); }
.workspace-members-section { padding-bottom: 0; }
.workspace-members-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.workspace-members-heading > div { min-width: 0; }
.workspace-members-heading .button { min-height: 36px; flex: 0 0 auto; }
.workspace-members-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.workspace-add-access { display: grid; width: 36px; height: 36px; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease; }
.workspace-add-access[hidden] { display: none; }
.workspace-add-access:hover { border-color: #cfc3ba; background: var(--surface-strong); }
.workspace-add-access svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.workspace-access-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.workspace-members-loading, .workspace-members-empty, .workspace-members-error { margin: 14px -24px 0; padding: 24px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 12px; line-height: 18px; text-align: center; }
.workspace-members-empty strong, .workspace-members-error strong { display: block; color: var(--text); font-size: 13px; }
.workspace-members-empty p, .workspace-members-error p { margin: 4px 0 0; }
.workspace-members-table-wrap { margin: 14px -24px 0; overflow-x: auto; border-top: 1px solid var(--border); }
.workspace-members-table { min-width: 520px; }
.workspace-members-table th { padding-top: 8px; padding-bottom: 8px; }
.workspace-members-table td { padding-top: 11px; padding-bottom: 11px; }
.workspace-members-table tbody tr:hover { background: transparent; }
.workspace-member-link { color: var(--text); font-weight: 600; text-decoration-color: var(--admin-border); text-underline-offset: 3px; }
.workspace-member-link:hover { color: var(--admin-accent-strong); text-decoration-color: currentColor; }
.workspace-member-email-mobile { display: none; }
.workspace-members-section.managing-access { padding-bottom: 0; }
.workspace-access-editor-list { margin: 10px -24px 0; border-top: 1px solid var(--border); }
.workspace-access-editor { display: grid; grid-template-columns: minmax(150px, .9fr) minmax(180px, 1fr) auto 36px; gap: 8px; align-items: center; padding: 9px 24px; border-bottom: 1px solid var(--border); }
.workspace-access-identity { min-width: 0; align-self: center; }
.workspace-access-identity strong, .workspace-access-identity span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-access-identity strong { font-size: 13px; line-height: 18px; }
.workspace-access-identity span { margin-top: 2px; color: var(--text-muted); font-size: 11px; line-height: 16px; }
.workspace-access-role { min-width: 0; }
.workspace-access-editor .select-trigger, .workspace-access-editor .button { min-height: 36px; height: 36px; }
.workspace-access-editor .membership-revoke { width: 36px; height: 36px; }
.workspace-owner-note { grid-column: 2 / -1; margin: -2px 0 0; color: var(--danger); font-size: 11px; line-height: 14px; }
.workspace-access-editor button:disabled { cursor: not-allowed; opacity: .5; }
.workspace-lifecycle-section { border-bottom: 0; }
.workspace-lifecycle-copy { max-width: none; white-space: nowrap; }
.workspace-lifecycle-status { min-height: 28px; padding: 4px 10px; border-radius: var(--radius-sm); font-size: 12px; }
.workspace-lifecycle-section .full-action { margin-top: 14px; }
.status.active { background: var(--success-soft); color: var(--success); }
.status.suspended { background: var(--danger-soft); color: var(--danger); }
.confirmation-hint { margin: -8px 0 14px; color: var(--text-muted); font-size: 11px; line-height: 16px; }
.membership-section { padding-bottom: 8px; }
.membership-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.membership-section-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.membership-section-actions > span { color: var(--text-muted); font-size: 11px; font-weight: 600; line-height: 20px; white-space: nowrap; }
.grant-workspace-access { min-height: 32px; padding: 5px 9px; font-size: 12px; }
.membership-list { margin: 16px -24px 0; }
.membership-editor { padding: 20px 24px; border-top: 1px solid var(--border); }
.membership-heading { display: flex; align-items: flex-start; gap: 16px; }
.membership-heading h4 { margin: 0; font-size: 14px; font-weight: 600; line-height: 20px; }
.membership-role-control { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; align-items: end; gap: 10px; margin-top: 16px; }
.compact-field { margin: 0; }
.membership-role-control .button { min-width: 112px; min-height: 44px; }
.membership-role-control .button:disabled:hover { background: var(--surface); }
.membership-role-control .select-trigger { border-color: var(--admin-border); }
.membership-revoke { display: grid; width: 44px; height: 44px; place-items: center; padding: 0; border: 1px solid #ecd2d2; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease; }
.membership-revoke:hover { border-color: var(--danger); background: var(--danger); color: white; }
.membership-revoke svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tooltip-button { position: relative; }
.tooltip-button::after { position: absolute; right: 0; bottom: calc(100% + 7px); z-index: 10; padding: 5px 8px; border-radius: var(--radius-sm); background: var(--text); color: var(--surface); content: attr(data-tooltip); font-size: 11px; font-weight: 500; line-height: 16px; opacity: 0; pointer-events: none; transform: translateY(3px); transition: opacity 140ms ease-out, transform 140ms ease-out; visibility: hidden; white-space: nowrap; }
.tooltip-button:hover::after, .tooltip-button:focus-visible::after { opacity: 1; transform: translateY(0); visibility: visible; }
.membership-meta { display: flex; flex-wrap: wrap; gap: 4px; margin: 9px 0 0; color: var(--text-muted); font-size: 11px; font-weight: 400; line-height: 16px; }
.membership-meta > span + span::before { content: "·"; margin-right: 4px; }
.membership-meta time { font: inherit; }
.membership-footer { min-height: 25px; }
.panel-empty { padding: 28px 24px; border-top: 1px solid var(--border); text-align: center; }
.panel-empty strong { display: block; font-size: 14px; }
.panel-empty p { margin: 4px 0 0; color: var(--text-muted); font-size: 12px; }

dialog { width: min(520px, calc(100vw - 28px)); max-height: calc(100vh - 36px); padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(48, 45, 41, .48); }
dialog form { padding: 24px; }
.dialog-heading { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.dialog-heading h2 { margin-top: 0; }
.dialog-heading p { margin: 8px 0 0; color: var(--text-muted); font-size: 13px; line-height: 20px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.toast-viewport { position: fixed; right: 0; bottom: 24px; left: 0; z-index: 50; display: flex; justify-content: center; padding: 0 16px; pointer-events: none; }
.toast { width: 100%; max-width: 352px; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 8px 15px rgba(48, 45, 41, .14); transform: translateY(10px) scale(.98); opacity: 0; pointer-events: none; transition: transform 180ms ease-out, opacity 180ms ease-out; }
.toast.visible { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.toast-body { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; }
.toast-body p { min-width: 0; flex: 1; margin: 0; padding-top: 1px; font-size: 14px; font-weight: 500; line-height: 20px; }
.toast-status-icon { display: grid; width: 20px; height: 20px; flex: 0 0 20px; place-items: center; margin-top: 2px; border-radius: 50%; background: var(--success-soft); color: var(--success); }
.toast-status-icon svg { grid-area: 1 / 1; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.toast-danger-mark { display: none; }
.toast[data-tone="danger"] .toast-status-icon { background: var(--danger-soft); color: var(--danger); }
.toast[data-tone="danger"] .toast-success-mark { display: none; }
.toast[data-tone="danger"] .toast-danger-mark { display: block; }
.toast-close { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; margin: -2px -6px -2px 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); cursor: pointer; }
.toast-close:hover { background: var(--surface-strong); color: var(--text); }
.toast-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.toast-progress { display: block; width: 100%; height: 2px; background: var(--brand-orange); transform-origin: left; }
.toast.visible .toast-progress { animation: toast-expiry 3.8s linear forwards; }
@keyframes toast-expiry { to { transform: scaleX(0); } }
.scrim { display: none; }
.scrim[hidden] { display: none !important; }

@media (max-width: 1023px) {
  :root { --route-padding-x: 1.5rem; --route-padding-y: 1.5rem; --section-gap: 1.5rem; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); transform: translateX(-102%); box-shadow: var(--shadow); transition: transform 200ms ease; }
  .sidebar.open { transform: translateX(0); }
  .workspace-shell { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr); height: 100vh; }
  .mobile-header { display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 1px solid var(--admin-border); background: var(--admin-sidebar); color: var(--admin-accent-strong); font-size: 14px; font-weight: 600; }
  .mobile-menu { display: block; flex: 0 0 40px; }
  main { width: 100%; min-width: 0; height: auto; padding-bottom: 48px; }
  .scrim { position: fixed; inset: 0; z-index: 19; display: block; background: rgba(48, 45, 41, .42); }
  .overview-analysis-grid, .detail-grid { grid-template-columns: 1fr; }
  .footprint-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .directory-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-count { grid-column: auto; justify-self: stretch; }
  .audit-page-header .lede { white-space: normal; }
  .audit-columns { display: none; }
  .audit-cell-label { display: block; }
  .audit-event { grid-template-columns: 140px 1fr; }
  .audit-event > :nth-child(n + 3) { grid-column: 2; }
  .audit-event .audit-details-cell { grid-column: 2; justify-content: flex-start; }
  .user-panel { width: min(720px, 100vw); }
  .theme-menu { right: 0; bottom: calc(100% + 8px); left: 0; width: auto; }
}

@media (min-width: 640px) {
  .menu-option { min-height: 36px; }
  .compact.select-control .select-trigger { height: 36px; }
}

@media (max-width: 639px) {
  :root { --route-padding-x: 1rem; --route-padding-y: 1.5rem; --header-content-gap: 1.5rem; --surface-padding: 1rem; }
  .page-header { flex-direction: column; gap: 16px; }
  .page-actions, .page-actions .button { width: 100%; }
  .button { min-height: 44px; }
  .filters { width: 100%; flex-direction: column; align-items: stretch; }
  .directory-toolbar { grid-template-columns: 1fr; gap: 10px; }
  .audit-filter-grid { grid-template-columns: 1fr; }
  .audit-reference-header { padding: 18px 16px 16px; }
  .audit-reference-header h2 { font-size: 20px; line-height: 26px; }
  .audit-reference-content { padding: 0 16px 24px; }
  .audit-detail-grid > div { grid-template-columns: 1fr; gap: 4px; align-items: start; padding: 11px 2px; }
  .audit-time-toolbar { align-items: stretch; flex-direction: column; }
  .audit-filter-actions, .audit-filter-actions .button { flex: 1 1 0; }
  .audit-custom-range { flex-direction: column; }
  .audit-custom-range label { grid-template-columns: 1fr; gap: 4px; }
  .result-count { grid-column: auto; justify-self: stretch; }
  .input-search { min-width: 0; }
  .footprint-metrics { grid-template-columns: 1fr; }
  .footprint-metrics > div + div { border-top: 1px solid var(--border); border-left: 0; }
  .overview-boundary { display: grid; grid-template-columns: auto minmax(0, 1fr); }
  .overview-boundary svg { grid-row: 1 / span 2; }
  .definition-grid { grid-template-columns: 1fr; }
  .audit-event { grid-template-columns: 1fr; gap: 7px; }
  .audit-event > :nth-child(n + 3) { grid-column: 1; }
  .audit-event .audit-details-cell { grid-column: 1; }
  .audit-detail-grid { grid-template-columns: 1fr; }
  .ledger-heading { align-items: flex-start; flex-direction: column; }
  .user-panel { width: 100vw; border-left: 0; box-shadow: none; }
  .user-panel-header { min-height: 72px; padding: 12px 16px; }
  .panel-section { padding: 20px 16px; }
  .workspace-plan-value { align-items: flex-start; flex-direction: column; }
  .workspace-plan-value .button { min-height: 44px; }
  .workspace-lifecycle-copy { white-space: normal; }
  .workspace-members-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .workspace-members-heading .button { width: 100%; min-height: 44px; }
  .workspace-members-loading, .workspace-members-empty, .workspace-members-error { margin-right: -16px; margin-left: -16px; }
  .workspace-members-table-wrap { margin-right: -16px; margin-left: -16px; }
  .workspace-members-table { min-width: 0; }
  .workspace-member-email-column { display: none; }
  .workspace-member-email-mobile { display: block; max-width: 220px; margin-top: 2px; overflow: hidden; color: var(--text-muted); font-size: 11px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
  .workspace-members-actions { width: 100%; }
  .workspace-members-actions [data-manage-workspace-access] { flex: 1 1 auto; }
  .workspace-add-access { width: 44px; height: 44px; flex: 0 0 44px; }
  .workspace-access-editor-list { margin-right: -16px; margin-left: -16px; }
  .workspace-access-editor { grid-template-columns: minmax(0, 1fr) 44px; padding-right: 16px; padding-left: 16px; }
  .workspace-access-identity, .workspace-access-role { grid-column: 1 / -1; }
  .workspace-access-editor [data-update-workspace-role] { grid-column: 1; }
  .workspace-access-editor .membership-revoke { grid-column: 2; }
  .workspace-owner-note { grid-column: 1 / -1; }
  .membership-list { margin-right: -16px; margin-left: -16px; }
  .membership-editor { padding: 18px 16px; }
  .membership-role-control .button { min-height: 44px; }
  .compact.select-control .select-trigger { height: 44px; }
  .membership-revoke { width: 44px; height: 44px; }
  .panel-definition-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .membership-section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .membership-section-actions { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .membership-section-actions > span { margin-right: auto; }
  .membership-role-control { grid-template-columns: minmax(0, 1fr) 44px; }
  .membership-role-control .compact-field { grid-column: 1 / -1; }
  .membership-role-control [data-update-role] { grid-column: 1; justify-self: end; }
  .membership-role-control [data-remove-membership] { grid-column: 2; }
}

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