/*
 * aaya Platform Admin stylesheet.
 * Design language: connect's docs/design/DESIGN.md, adopted by ADR-0008; the aaya deltas are in
 * docs/design/DESIGN.md. The tokens below are the only source of colours, type, radii, shadows and
 * control sizes. Every class carries the prefix "ad-".
 */

/* Fonts: self-hosted. Inter and JetBrains Mono under the SIL Open Font License (fonts/Inter-OFL.txt,
   fonts/JetBrainsMono-OFL.txt); Aaya Rounded is aaya's own brand face, used only for the brand suffix. */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/inter-latin-ext-opsz-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/inter-latin-opsz-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/jetbrains-mono-latin-ext-400-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("fonts/jetbrains-mono-latin-ext-500-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Aaya";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("fonts/Aaya-Rounded-Variable.ttf") format("truetype");
}

/* Tokens */

:root {
    --ad-chrome: #F2F3F5;
    --ad-surface: #FFFFFF;
    --ad-surface-band: #F6F7F8;
    --ad-surface-hover: #F0F1F3;
    --ad-surface-filter: #ECEDEF;
    --ad-surface-active: #E4E6E9;
    --ad-panel-border: #DFE1E5;
    --ad-hairline: #E6E7EA;
    --ad-hairline-row: #EDEEF0;
    --ad-control-border: #CDD0D5;
    --ad-input-border: #8E9197;
    --ad-ink: #191B1D;
    --ad-on-ink: #FFFFFF;
    --ad-ink-muted: #5C6066;
    --ad-ink-label: #6B6F76;
    --ad-ink-disabled: #8E9197;
    --ad-mark-neutral: #7C8088;
    --ad-positive: #1F8A3B;
    --ad-signal: #D63426;
    --ad-signal-text: #C8281D;
    --ad-backdrop: rgba(25, 27, 29, 0.32);

    --ad-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --ad-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --ad-text-body: 13px;
    --ad-text-label: 12px;
    --ad-text-view-title: 15px;
    --ad-text-page-title: 18px;
    --ad-leading: 1.45;
    --ad-leading-title: 1.3;
    --ad-tracking-title: -0.015em;

    --ad-radius-control: 6px;
    --ad-radius-menu: 8px;
    --ad-radius-panel: 10px;

    --ad-space-xxs: 4px;
    --ad-space-xs: 8px;
    --ad-space-sm: 12px;
    --ad-space-md: 16px;
    --ad-space-lg: 20px;
    --ad-space-xl: 24px;

    --ad-shadow-menu: 0 8px 24px rgba(25, 27, 29, 0.12), 0 2px 6px rgba(25, 27, 29, 0.06);
    --ad-shadow-dialog: 0 16px 48px rgba(25, 27, 29, 0.18), 0 2px 6px rgba(25, 27, 29, 0.08);

    --ad-size-sidebar: 244px;
    --ad-size-view-header: 49px;
    --ad-size-nav-item: 30px;
    --ad-size-filter: 26px;
    --ad-size-button: 28px;
    --ad-size-input: 32px;
    --ad-size-table-header: 32px;
    --ad-size-table-group: 30px;
    --ad-size-table-row: 40px;
    --ad-size-menu-item: 30px;
    --ad-size-property-label: 124px;
    --ad-size-dialog: 520px;
    --ad-size-prose: 580px;
}

*, *::before, *::after { box-sizing: border-box; }

body { margin: 0; background: var(--ad-chrome); color: var(--ad-ink); font-family: var(--ad-font-sans); font-size: var(--ad-text-body); font-optical-sizing: auto; line-height: var(--ad-leading); font-weight: 400; letter-spacing: normal; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; user-select: text; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ad-ink); outline-offset: 2px; }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; }

.ad-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ad-spacer { flex: 1 1 auto; }
.ad-muted { color: var(--ad-ink-muted); }
.ad-emphasis { font-weight: 500; }
.ad-numeric { font-variant-numeric: tabular-nums; }
.ad-nowrap { white-space: nowrap; }
.ad-identifier { font-family: var(--ad-font-mono); font-size: var(--ad-text-label); }
.ad-text-link { color: var(--ad-ink); text-decoration: underline; text-underline-offset: 2px; }
button.ad-text-link { padding: 0; background: none; border: 0; font: inherit; cursor: pointer; }
.ad-prose { max-width: var(--ad-size-prose); color: var(--ad-ink-muted); }

/* Icons and the four status marks */

.ad-icon { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ad-icon--solid { fill: currentColor; stroke: none; }
.ad-icon--muted { color: var(--ad-ink-muted); }
.ad-icon--faint { color: var(--ad-ink-disabled); }

.ad-mark { flex: none; width: 12px; height: 12px; }
.ad-mark--positive { fill: var(--ad-positive); }
.ad-mark--signal { fill: none; stroke: var(--ad-signal); stroke-width: 1.5; }
.ad-mark--waiting { fill: none; stroke: var(--ad-mark-neutral); stroke-width: 1.5; }
.ad-mark--inactive { fill: var(--ad-mark-neutral); }

.ad-status { display: flex; align-items: center; gap: var(--ad-space-xs); white-space: nowrap; }
.ad-status-word { font-weight: 500; }
.ad-status-detail { color: var(--ad-ink-muted); font-variant-numeric: tabular-nums; }

/* Shell */

.ad-app { position: relative; display: flex; flex-wrap: wrap; min-height: 100vh; }

.ad-sidebar { flex: 1 0 var(--ad-size-sidebar); max-width: 100%; display: flex; flex-direction: column; gap: 14px; padding: 14px var(--ad-space-xxs) 14px var(--ad-space-sm); }

.ad-brand { display: flex; align-items: center; gap: 9px; padding: 2px var(--ad-space-xs); font-size: var(--ad-text-view-title); font-weight: 600; letter-spacing: var(--ad-tracking-title); }

.ad-brand-logo { display: block; width: auto; height: 20px; }

/* Brand row (docs/design/DESIGN.md): the logo moves down by the wordmark's 5.75px descender to share the baseline. */
.ad-brand:has(.ad-brand-suffix) { align-items: baseline; }
.ad-brand:has(.ad-brand-suffix) .ad-brand-logo { position: relative; top: 5.75px; }
.ad-brand-suffix { font-family: "Aaya", var(--ad-font-sans); font-size: 22px; font-weight: 675; line-height: 1; letter-spacing: 0; }

.ad-nav { display: flex; flex-direction: column; gap: 1px; }
.ad-nav-item { display: flex; align-items: center; gap: 9px; min-height: var(--ad-size-nav-item); padding: var(--ad-space-xxs) var(--ad-space-xs); border-radius: var(--ad-radius-control); font-weight: 500; color: var(--ad-ink-muted); }
.ad-nav-item:hover { color: var(--ad-ink); }
.ad-nav-item[aria-current] { background: var(--ad-surface-active); color: var(--ad-ink); }

.ad-sidebar-user { display: flex; flex-direction: column; gap: 1px; padding: 0 var(--ad-space-xs); }
.ad-sidebar-role { font-size: var(--ad-text-label); color: var(--ad-ink-muted); }

.ad-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; padding: var(--ad-space-xs); }
.ad-panel { position: relative; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; background: var(--ad-surface); border: 1px solid var(--ad-panel-border); border-radius: var(--ad-radius-panel); }

/* View header */

.ad-view-header { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ad-space-xs) var(--ad-space-lg); min-height: var(--ad-size-view-header); padding: 10px var(--ad-space-sm) 10px var(--ad-space-lg); border-bottom: 1px solid var(--ad-hairline); }
.ad-view-title { font-size: var(--ad-text-view-title); font-weight: 600; letter-spacing: var(--ad-tracking-title); line-height: var(--ad-leading-title); }
.ad-header-actions { display: flex; align-items: center; gap: var(--ad-space-xs); margin-left: auto; }

.ad-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ad-space-xxs); padding: 0; list-style: none; font-weight: 500; line-height: var(--ad-leading-title); }
.ad-breadcrumb li { display: flex; align-items: center; gap: var(--ad-space-xxs); }
.ad-breadcrumb a { color: var(--ad-ink-muted); }
.ad-breadcrumb a:hover { color: var(--ad-ink); }
.ad-breadcrumb-current { font: inherit; letter-spacing: inherit; }

.ad-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.ad-filter-item { display: flex; align-items: center; gap: 6px; height: var(--ad-size-filter); padding: 0 var(--ad-space-xs); border-radius: var(--ad-radius-control); font-weight: 500; color: var(--ad-ink-muted); white-space: nowrap; }
.ad-filter-item:hover { color: var(--ad-ink); }
.ad-filter-item[aria-current] { background: var(--ad-surface-filter); color: var(--ad-ink); }
.ad-filter-count { font-weight: 400; font-variant-numeric: tabular-nums; }

.ad-search { flex: 0 1 220px; }

/* View body */

.ad-view-body { flex: 1 1 auto; display: flex; flex-wrap: wrap; }
.ad-view-aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; box-shadow: -1px 0 0 var(--ad-hairline), 0 -1px 0 var(--ad-hairline); }
.ad-scroll-x { overflow-x: auto; }
.ad-hint { max-width: var(--ad-size-prose); padding: var(--ad-space-md) var(--ad-space-lg) var(--ad-space-lg); color: var(--ad-ink-muted); }

.ad-list-heading { display: flex; align-items: baseline; gap: var(--ad-space-xs); padding: 18px var(--ad-space-lg) var(--ad-space-xxs); }
.ad-list-heading a { margin-left: auto; font-weight: 500; color: var(--ad-ink-muted); }
.ad-list-heading a:hover { color: var(--ad-ink); }

.ad-figures { display: flex; flex-wrap: wrap; gap: var(--ad-space-sm) 56px; padding: 18px var(--ad-space-lg); border-bottom: 1px solid var(--ad-hairline); }
.ad-figure { display: flex; flex-direction: column; gap: 2px; }
.ad-figure dt { font-size: var(--ad-text-label); font-weight: 500; color: var(--ad-ink-label); }
.ad-figure a, .ad-figure-value { display: flex; align-items: baseline; gap: 6px; font-size: var(--ad-text-page-title); font-weight: 600; letter-spacing: var(--ad-tracking-title); line-height: var(--ad-leading-title); font-variant-numeric: tabular-nums; }
.ad-figure-note { font-size: var(--ad-text-body); font-weight: 400; letter-spacing: 0; color: var(--ad-ink-muted); }

.ad-section-title { font-size: var(--ad-text-body); font-weight: 600; }
.ad-count { font-weight: 400; color: var(--ad-ink-label); font-variant-numeric: tabular-nums; }

/* Tables */

.ad-table { width: 100%; border-collapse: collapse; text-align: left; }
.ad-table thead th { height: var(--ad-size-table-header); padding: 0 var(--ad-space-sm); border-bottom: 1px solid var(--ad-hairline); font-size: var(--ad-text-label); font-weight: 500; color: var(--ad-ink-label); white-space: nowrap; }
.ad-table tbody td { height: var(--ad-size-table-row); padding: 0 var(--ad-space-sm); border-bottom: 1px solid var(--ad-hairline-row); }
.ad-table thead th:first-child, .ad-table tbody td:first-child { padding-left: var(--ad-space-lg); }
.ad-table thead th:last-child, .ad-table tbody td:last-child { padding-right: var(--ad-space-lg); }
.ad-table--inset thead th:first-child, .ad-table--inset tbody td:first-child { padding-left: 0; }
.ad-table--inset thead th:last-child, .ad-table--inset tbody td:last-child { padding-right: 0; }
.ad-table tbody .ad-group-row td { height: var(--ad-size-table-group); background: var(--ad-surface-band); border-bottom: 1px solid var(--ad-hairline); font-size: var(--ad-text-label); font-weight: 500; }
.ad-group-label { display: flex; align-items: center; gap: var(--ad-space-xs); }
.ad-table tbody tr.ad-row:hover td, .ad-table tbody tr.ad-row--open td { background: var(--ad-surface-hover); }
.ad-table td.ad-cell-end { text-align: right; white-space: nowrap; }
.ad-table td.ad-cell-actions { width: 48px; padding: 0 var(--ad-space-sm) 0 0; }
.ad-cell-actions-inner { display: flex; justify-content: flex-end; }
.ad-stack { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; }
.ad-row-link { display: flex; align-items: center; gap: var(--ad-space-xs); font-weight: 500; white-space: nowrap; }
.ad-row-toggle { width: 100%; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.ad-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Buttons */

.ad-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--ad-size-button); padding: 0 var(--ad-space-sm); background: var(--ad-surface); border: 1px solid var(--ad-control-border); border-radius: var(--ad-radius-control); font-size: var(--ad-text-body); font-weight: 500; line-height: 1; color: var(--ad-ink); white-space: nowrap; cursor: pointer; }
.ad-button:hover { background: var(--ad-surface-hover); }
.ad-button--primary, .ad-button--primary:hover { background: var(--ad-ink); border-color: var(--ad-ink); color: var(--ad-on-ink); }
.ad-button--destructive { color: var(--ad-signal-text); }
.ad-button:disabled { background: var(--ad-surface); color: var(--ad-ink-disabled); cursor: default; }
.ad-button-row { display: flex; flex-wrap: wrap; gap: var(--ad-space-xs); }

.ad-icon-button { flex: none; display: flex; align-items: center; justify-content: center; width: var(--ad-size-button); height: var(--ad-size-button); padding: 0; background: transparent; border: 0; border-radius: var(--ad-radius-control); color: var(--ad-ink-muted); cursor: pointer; }
.ad-icon-button:hover { background: var(--ad-surface-hover); color: var(--ad-ink); }

/* Fields */

.ad-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ad-label { font-size: var(--ad-text-label); font-weight: 500; }
.ad-input, .ad-select, .ad-textarea { display: block; width: 100%; height: var(--ad-size-input); padding: 0 10px; background: var(--ad-surface); border: 1px solid var(--ad-input-border); border-radius: var(--ad-radius-control); font-size: var(--ad-text-body); color: var(--ad-ink); }
.ad-input--identifier { font-family: var(--ad-font-mono); font-size: var(--ad-text-label); }
.ad-input[aria-invalid="true"], .ad-textarea { height: auto; min-height: 120px; padding: var(--ad-space-xs) 10px; line-height: 1.55; resize: vertical; }
.ad-textarea--tall { min-height: 280px; }
.ad-select { appearance: none; -webkit-appearance: none; padding-right: 30px; }
.ad-select-wrap { position: relative; }
.ad-select-wrap .ad-icon { position: absolute; top: 8px; right: 8px; color: var(--ad-ink-muted); pointer-events: none; }
.ad-help { color: var(--ad-ink-muted); }
.ad-field-error { font-size: var(--ad-text-label); color: var(--ad-signal-text); }
.ad-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px var(--ad-space-md); }

.ad-choice-list { display: flex; flex-direction: column; margin: 0 calc(-1 * var(--ad-space-lg)); border-top: 1px solid var(--ad-hairline); }
.ad-choice { display: flex; align-items: center; gap: 10px; min-height: var(--ad-size-table-row); padding: 6px var(--ad-space-lg); border-bottom: 1px solid var(--ad-hairline-row); cursor: pointer; }
.ad-choice input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--ad-ink); }
.ad-choice:has(input:checked) { background: var(--ad-surface-hover); }
.ad-choice-name { flex: 0 0 132px; font-weight: 500; white-space: nowrap; }
.ad-choice-list--scroll { max-height: 240px; overflow-y: auto; }
.ad-fieldset { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.ad-fieldset > legend { margin-bottom: 6px; padding: 0; }

/* Menus: a details element whose summary is the trigger */

.ad-menu-host { position: relative; display: flex; }
.ad-menu-host > summary { list-style: none; }
.ad-menu-host > summary::-webkit-details-marker { display: none; }
.ad-menu-host[open] > summary.ad-icon-button, .ad-menu-host[open] > summary.ad-switcher-trigger { background: var(--ad-surface-active); color: var(--ad-ink); }
.ad-menu { position: absolute; top: calc(100% + var(--ad-space-xxs)); right: 0; z-index: 2; display: flex; flex-direction: column; gap: 1px; width: 232px; padding: var(--ad-space-xxs); background: var(--ad-surface); border: 1px solid var(--ad-panel-border); border-radius: var(--ad-radius-menu); box-shadow: var(--ad-shadow-menu); white-space: nowrap; }
.ad-menu--fill { left: 0; width: auto; }
.ad-menu--up { top: auto; bottom: calc(100% + var(--ad-space-xxs)); }
.ad-menu-label { padding: var(--ad-space-xxs) var(--ad-space-xs) 2px; font-size: var(--ad-text-label); font-weight: 500; color: var(--ad-ink-label); }
.ad-menu-item { display: flex; align-items: center; gap: var(--ad-space-xs); width: 100%; min-height: var(--ad-size-menu-item); padding: var(--ad-space-xxs) var(--ad-space-xs); background: transparent; border: 0; border-radius: var(--ad-radius-control); font-size: var(--ad-text-body); color: var(--ad-ink); text-align: left; cursor: pointer; }
.ad-menu-item:hover { background: var(--ad-surface-hover); }
.ad-menu-item-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ad-menu-item--destructive { color: var(--ad-signal-text); }
.ad-menu-item:disabled { color: var(--ad-ink-disabled); cursor: default; background: transparent; }
.ad-menu-separator { height: 1px; margin: 3px 0; background: var(--ad-hairline); }

.ad-switcher-trigger { display: flex; align-items: center; justify-content: space-between; gap: var(--ad-space-xs); width: 100%; min-height: var(--ad-size-nav-item); padding: var(--ad-space-xxs) var(--ad-space-xs); border-radius: var(--ad-radius-control); font-weight: 500; cursor: pointer; }
.ad-switcher-trigger:hover { background: var(--ad-surface-hover); }
.ad-switcher-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Dialog and toast */

.ad-dialog-backdrop { position: fixed; inset: 0; z-index: 10; display: flex; justify-content: center; align-items: flex-start; padding: 96px var(--ad-space-md) 32px; background: var(--ad-backdrop); overflow-y: auto; }
.ad-dialog { width: 100%; outline: none; max-width: var(--ad-size-dialog); background: var(--ad-surface); border: 1px solid var(--ad-panel-border); border-radius: var(--ad-radius-panel); box-shadow: var(--ad-shadow-dialog); overflow: hidden; }
.ad-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: var(--ad-space-sm); padding: var(--ad-space-md) var(--ad-space-sm) 0 var(--ad-space-lg); }
.ad-dialog-title { font-size: var(--ad-text-view-title); font-weight: 600; letter-spacing: var(--ad-tracking-title); line-height: 1.35; }
.ad-dialog-body { display: flex; flex-direction: column; gap: 14px; padding: var(--ad-space-sm) var(--ad-space-lg) var(--ad-space-lg); }
.ad-dialog-footer { display: flex; justify-content: flex-end; gap: var(--ad-space-xs); padding: var(--ad-space-sm) var(--ad-space-lg); border-top: 1px solid var(--ad-hairline); }

.ad-toast { position: fixed; right: var(--ad-space-xl); bottom: var(--ad-space-xl); z-index: 11; display: flex; align-items: center; gap: var(--ad-space-xs); padding: 10px 14px; background: var(--ad-surface); border: 1px solid var(--ad-panel-border); border-radius: var(--ad-radius-menu); box-shadow: var(--ad-shadow-menu); animation: ad-toast-leave 0.2s ease-in 8s forwards; }
@keyframes ad-toast-leave { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .ad-toast { animation-duration: 0.01s; } }

/* Detail pages */

.ad-detail { flex: 999 1 460px; min-width: 0; }
.ad-detail-content { display: flex; flex-direction: column; max-width: 840px; padding: 28px 32px 40px; }
.ad-detail-content--wide { max-width: none; }
.ad-page-title { font-size: var(--ad-text-page-title); font-weight: 600; letter-spacing: var(--ad-tracking-title); line-height: var(--ad-leading-title); }
.ad-page-status { margin-top: 6px; }
.ad-page-lead { margin-top: var(--ad-space-xs); max-width: var(--ad-size-prose); color: var(--ad-ink-muted); }

.ad-section { display: flex; flex-direction: column; gap: var(--ad-space-sm); margin-top: var(--ad-space-xl); padding-top: var(--ad-space-md); border-top: 1px solid var(--ad-hairline); }
.ad-detail-content > .ad-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.ad-section-heading { display: flex; flex-direction: column; gap: var(--ad-space-xxs); }
.ad-section-heading-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ad-space-sm); }

.ad-properties { display: grid; grid-template-columns: var(--ad-size-property-label) minmax(0, 1fr); gap: 10px 0; padding: 32px var(--ad-space-lg) var(--ad-space-lg); }
.ad-properties--inset { padding: 0; }
.ad-properties + .ad-properties { padding-top: 0; }
.ad-properties dt { font-weight: 400; color: var(--ad-ink-label); }
.ad-properties dd { min-width: 0; }

.ad-technical { padding: 14px var(--ad-space-lg) var(--ad-space-md); border-top: 1px solid var(--ad-hairline); color: var(--ad-ink-muted); }
.ad-technical > summary { font-size: var(--ad-text-label); cursor: pointer; }
.ad-technical > .ad-properties { margin-top: 10px; }

.ad-note-list { display: flex; flex-direction: column; gap: 6px; padding: 0; list-style: none; }
.ad-note-list li { display: flex; align-items: baseline; gap: var(--ad-space-xs); }
.ad-note-list .ad-mark { position: relative; top: 1px; }

.ad-empty { display: flex; flex-direction: column; align-items: flex-start; gap: var(--ad-space-xxs); padding: var(--ad-space-lg); }
.ad-empty-action { margin-top: var(--ad-space-xs); }

/* An admin action: its button and, below it, the result as a status line */

.ad-action { display: inline-flex; flex-direction: column; align-items: flex-start; gap: var(--ad-space-xs); max-width: 100%; }
.ad-action-result { display: flex; align-items: baseline; gap: var(--ad-space-xs); }
.ad-action-result .ad-mark { position: relative; top: 1px; }
.ad-action-result--failed { color: var(--ad-signal-text); }

/* Inline errors, form pieces, code, disclosures and the stored-result inspector */

.ad-error { color: var(--ad-signal-text); }
.ad-check { display: inline-flex; align-items: center; gap: var(--ad-space-xs); cursor: pointer; }
.ad-check input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--ad-ink); }
.ad-input--compact { height: var(--ad-size-button); }
.ad-field--narrow { max-width: 320px; }
.ad-file { display: block; width: 100%; padding: 6px 0; font-size: var(--ad-text-body); }
.ad-input-row { display: flex; flex-wrap: wrap; gap: var(--ad-space-xs); }
.ad-input-row .ad-input { flex: 1 1 200px; width: auto; }
.ad-input-row .ad-button { height: var(--ad-size-input); }
.ad-bullets { max-width: 760px; padding: 6px var(--ad-space-lg) 0 40px; list-style: disc; }
.ad-bullets li + li { margin-top: 6px; }
.ad-bullets--inset { padding: 0 0 0 var(--ad-space-lg); }
.ad-code { margin: 0; max-height: 32rem; overflow: auto; padding: var(--ad-space-xs) 10px; background: var(--ad-surface-band); border-radius: var(--ad-radius-control); font-family: var(--ad-font-mono); font-size: var(--ad-text-label); white-space: pre-wrap; overflow-wrap: anywhere; }
.ad-disclosure > summary { cursor: pointer; font-size: var(--ad-text-label); color: var(--ad-ink-muted); }
.ad-disclosure[open] > summary { margin-bottom: var(--ad-space-xs); }
.ad-inspector { display: flex; flex-direction: column; gap: var(--ad-space-sm); min-width: 0; }
.ad-inspector-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ad-space-sm); }
button.ad-filter-item { background: transparent; border: 0; font-size: var(--ad-text-body); cursor: pointer; }
.ad-action-host { display: contents; }
.ad-dialog-footer .ad-action { flex-direction: row-reverse; align-items: center; }
.ad-pager { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ad-space-xs); padding: var(--ad-space-sm) var(--ad-space-lg); color: var(--ad-ink-muted); }

/* Analysis receipts: a case and the frame of a customer page preview */

.ad-case { display: flex; flex-direction: column; gap: 6px; padding: var(--ad-space-sm) 0; border-top: 1px solid var(--ad-hairline-row); min-width: 0; }
.ad-chart { max-width: 840px; overflow-x: auto; }
.ad-chart svg { min-width: 540px; }
.ad-preview { display: flex; flex-direction: column; gap: var(--ad-space-xs); min-width: 0; padding: var(--ad-space-lg); border: 1px solid var(--ad-panel-border); border-radius: var(--ad-radius-panel); }

/* Table cells beyond the one-line row: wrapping text, cells aligned to the top, detail rows and sums */

.ad-table td.ad-cell-wrap { white-space: normal; overflow-wrap: anywhere; }
.ad-table tbody td.ad-cell-top { height: auto; padding-top: 10px; padding-bottom: 10px; vertical-align: top; }
.ad-table tbody tr.ad-detail-row td { height: auto; padding-top: var(--ad-space-xs); padding-bottom: var(--ad-space-sm); }
.ad-table tfoot td, .ad-table tfoot th { height: var(--ad-size-table-row); padding: 0 var(--ad-space-sm); font-weight: 500; text-align: left; }
.ad-table--inset tfoot :is(td, th):first-child { padding-left: 0; }
.ad-table .ad-input, .ad-table .ad-select { min-width: 96px; }

/* Standalone pages (sign-in, no access, not found, error): the brand row on the chrome, one panel of at most 560px */

.ad-standalone { display: flex; flex-direction: column; align-items: center; gap: var(--ad-space-md); min-height: 100vh; padding: 12vh var(--ad-space-md) var(--ad-space-xl); }
.ad-standalone-panel { display: flex; flex-direction: column; gap: var(--ad-space-xs); width: 100%; max-width: 560px; padding: var(--ad-space-xl); background: var(--ad-surface); border: 1px solid var(--ad-panel-border); border-radius: var(--ad-radius-panel); }
.ad-standalone-actions { display: flex; gap: var(--ad-space-xs); margin-top: var(--ad-space-sm); }

/* Account menu and the Blazor error bar */

.ad-account .ad-sidebar-user { padding: 0; }
#blazor-error-ui { position: fixed; right: var(--ad-space-xl); bottom: var(--ad-space-xl); z-index: 12; display: none; align-items: center; gap: var(--ad-space-sm); padding: 10px 14px; background: var(--ad-surface); border: 1px solid var(--ad-panel-border); border-radius: var(--ad-radius-menu); box-shadow: var(--ad-shadow-menu); }
#blazor-error-ui .reload { font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
#blazor-error-ui .dismiss { cursor: pointer; color: var(--ad-ink-muted); }

/* Below the width of sidebar plus panel the sidebar stacks above the panel. */
@media (max-width: 800px) {
    .ad-app { align-content: flex-start; }
    .ad-sidebar { flex-basis: 100%; }
    .ad-detail-content { padding: 24px 20px 32px; }
}

@media (max-width: 560px) {
    .ad-dialog-backdrop { padding-top: 48px; }
    .ad-toast, #blazor-error-ui { left: var(--ad-space-md); right: var(--ad-space-md); bottom: var(--ad-space-md); }
}
