/* Command output is a dark terminal in either application theme. Keep these
   tokens local: the surrounding workspace, reviews and reports still follow
   the user's theme. Explicit foregrounds also protect nested CLI text from
   the global light-mode contrast and dark-mode typography rules. */
html[data-theme] body .device-command-terminal {
    color-scheme: dark;
    --terminal-bg: #05070d;
    --terminal-surface: #101827;
    --terminal-border: #334155;
    --terminal-text: #e2e8f0;
    --terminal-muted: #94a3b8;
    --terminal-info: #7dd3fc;
    --terminal-error: #fca5a5;
    --terminal-warning: #fde68a;
    --terminal-success: #86efac;
    --text: var(--terminal-text);
    --text-strong: var(--terminal-text);
    --text-soft: var(--terminal-muted);
    --text-muted: var(--terminal-muted);
    --ds-text: var(--terminal-text);
    --ds-text-muted: var(--terminal-muted);
    color: var(--terminal-text) !important;
    border-color: var(--terminal-border) !important;
    background: var(--terminal-bg) !important;
    box-shadow: inset 0 1px 0 #ffffff0a, 0 12px 28px #02061726 !important;
    scrollbar-color: #64748b var(--terminal-bg);
}
html[data-theme] body .device-command-terminal .device-command-terminal__chrome {
    background: var(--terminal-surface) !important;
    border-color: var(--terminal-border) !important;
}
html[data-theme] body .device-command-terminal :is(
    .device-command-terminal__body, .device-command-terminal__device,
    .device-command-terminal__group
) {
    background: var(--terminal-bg) !important;
    border-color: var(--terminal-border) !important;
}
html[data-theme] body .device-command-terminal :is(
    .device-command-terminal__caption :where(strong), .device-command-terminal__device-target,
    .device-command-terminal__line
) {
    color: var(--terminal-text) !important;
}
html[data-theme] body .device-command-terminal :is(
    .device-command-terminal__caption :where(small), .device-command-terminal__device-meta,
    .device-command-terminal__title, .device-command-terminal__line-number,
    .device-command-terminal__line--muted, .device-command-terminal__line--comment
) {
    color: var(--terminal-muted) !important;
    border-color: var(--terminal-border) !important;
}
html[data-theme] body .device-command-terminal :is(
    .device-command-terminal__status, .device-command-terminal__device-status,
    .device-command-terminal__title--command, .device-command-terminal__title--info,
    .device-command-terminal__line--command, .device-command-terminal__line--info,
    .device-command-terminal__line--config
) {
    color: var(--terminal-info) !important;
}
html[data-theme] body .device-command-terminal :is(
    .device-command-terminal__status--critical, .device-command-terminal__status--danger,
    .device-command-terminal__device-status--critical, .device-command-terminal__device-status--danger,
    .device-command-terminal__title--stderr, .device-command-terminal__title--critical,
    .device-command-terminal__title--danger, .device-command-terminal__line--stderr,
    .device-command-terminal__line--critical, .device-command-terminal__line--danger
) {
    color: var(--terminal-error) !important;
}
html[data-theme] body .device-command-terminal :is(
    .device-command-terminal__status--warning, .device-command-terminal__device-status--warning,
    .device-command-terminal__title--warning, .device-command-terminal__line--warning,
    .device-command-terminal__title--heading, .device-command-terminal__line--heading
) {
    color: var(--terminal-warning) !important;
}
html[data-theme] body .device-command-terminal :is(
    .device-command-terminal__status--success, .device-command-terminal__device-status--success,
    .device-command-terminal__title--success, .device-command-terminal__line--success
) {
    color: var(--terminal-success) !important;
}
html[data-theme] body .device-command-terminal .device-command-terminal__line--section {
    color: #c4b5fd !important;
}
html[data-theme] body .device-command-terminal :is(
    .device-command-terminal__status, .device-command-terminal__device-status
) {
    background: #101c2c !important;
    border-color: currentColor !important;
}
html[data-theme] body .device-command-terminal :is(
    .device-command-terminal__group--command, .device-command-terminal__group--info,
    .device-command-terminal__group--heading
) { border-left-color: var(--terminal-info) !important; }
html[data-theme] body .device-command-terminal :is(
    .device-command-terminal__group--stderr, .device-command-terminal__group--critical,
    .device-command-terminal__group--danger
) { border-left-color: var(--terminal-error) !important; }
html[data-theme] body .device-command-terminal .device-command-terminal__group--warning {
    border-left-color: var(--terminal-warning) !important;
}
html[data-theme] body .device-command-terminal .device-command-terminal__group--success {
    border-left-color: var(--terminal-success) !important;
}
html[data-theme] body .device-command-terminal .automation-result-detail__output-icon {
    color: #a5b4fc !important;
    background: #1e293b !important;
    border-color: #818cf8 !important;
}
html[data-theme] body .device-command-terminal .device-command-terminal__line-content {
    color: inherit !important;
    background: transparent !important;
}
html[data-theme] body .device-command-terminal * {
    -webkit-text-fill-color: currentColor !important;
}
html[data-theme] body .device-command-terminal .automation-result-match {
    color: #080d16 !important;
    background: #f7b955 !important;
}
html[data-theme] body .device-command-terminal .automation-result-match.is-current {
    color: #080d16 !important;
    background: #fda4af !important;
    box-shadow: 0 0 0 2px #fda4af66 !important;
}
html[data-theme] body .device-command-terminal .device-command-terminal__line.is-selected-section {
    background: #1e1b38 !important;
    box-shadow: inset 0.18rem 0 #a78bfa !important;
}
html[data-theme] body .device-command-terminal ::selection {
    color: #f8fafc;
    background: #1e40af;
}

/* Numbered controls remain available through ENDO voice navigation. */
.voice-gui-number { position: fixed; pointer-events: none; z-index: 100000; background: #355ec9; color: white; border: 1px solid white; border-radius: .35rem; padding: .05rem .3rem; font: 600 .8rem/1.5 sans-serif; }

/* Five ranked FAQ cards in two columns; no additional starter cards. */
.agentic-faq-section .agentic-faq-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    list-style: none;
    padding: 0;
    margin: 0;
    gap: .45rem;
}
.agentic-faq-section .agentic-faq-list li { min-width: 0; }
.agentic-faq-section .agentic-prompt-card {
    display: grid;
    grid-template-columns: 1.8rem minmax(0, 1fr) 1rem;
    align-items: center;
    gap: .65rem;
    width: 100%;
    height: 100%;
    padding: .65rem .8rem;
    text-align: left;
    border-radius: .75rem;
}
.agentic-faq-section .agentic-prompt-card strong {
    font-weight: 500;
    overflow-wrap: anywhere;
}
.agentic-faq-section .agentic-prompt-card small {
    white-space: normal;
    overflow-wrap: anywhere;
}
.agentic-faq-section .agentic-prompt-card:focus-visible {
    outline: 2px solid #8596ff;
    outline-offset: 2px;
}
.agentic-faq-section .agentic-faq-notice { margin: .6rem; color: var(--muted); }
@media (max-width: 700px) {
    .agentic-faq-section .agentic-faq-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Document pages stay light even inside the dark dashboard. The platform-wide
   dark h1-h6 !important rule must not turn report headings white on white. */
html[data-theme] body .hld-document-popup .hld-report {
    color-scheme: light;
    --ds-text: #192d49;
    --ds-text-muted: #53647c;
    --text: #192d49;
    --text-strong: #142239;
    --text-soft: #53647c;
    color: #192d49 !important;
    background-color: #ffffff !important;
}
html[data-theme] body .hld-document-popup .hld-report :is(h1, h2, h3, h4, h5, h6) {
    color: #142239 !important;
    -webkit-text-fill-color: #142239 !important;
    background: transparent !important;
    text-shadow: none !important;
    opacity: 1 !important;
    filter: none !important;
}
html[data-theme] body .hld-document-popup .hld-report ::selection {
    color: #102749;
    background: #bdd7ff;
}

/* HLD/LLD is a Knowledge Base document workflow; keep its menu nesting visible. */
html[data-theme] body .agentic-icon-menu__option--hld_lld,
html[data-theme] body .agentic-icon-menu__option--all_docs,
html[data-theme] body .agentic-icon-menu__option--operations_doc,
html[data-theme] body .agentic-icon-menu__option--lifecycle_doc,
html[data-theme] body .agentic-icon-menu__option--security_doc {
    margin-left: 0.65rem;
    width: calc(100% - 0.65rem);
    border-left: 2px solid #829bf8;
}
.hld-document-popup .popup-window__dialog {
    width: min(96vw, 1500px);
    max-width: 96vw;
}
.hld-document-popup .popup-window__body {
    min-width: 0;
}

/* Keep the pagination progress badge compact, including inside table toolbars. */
html[data-theme] body .modern-pagination .modern-pagination__progress > strong {
    font-size: 0.64rem !important;
    line-height: 1 !important;
}
html[data-theme] body .modern-pagination .modern-pagination__progress > small {
    font-size: 0.54rem !important;
    line-height: 1 !important;
}

/* Removing recent changes leaves the remaining dashboard table full-width. */
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-grid--ops-tables-single {
    grid-template-columns: minmax(0, 1fr) !important;
}

/* Larger, regular-weight analysis copy and accessible review-only CLI colors. */
html[data-theme] body .automation-result-window .automation-result-detail__analysis {
    --analysis-command-remove: #fca5a5;
    --analysis-command-add: #86efac;
    container-type: inline-size;
    container-name: automation-analysis;
}
html[data-theme="light"] body .automation-result-window .automation-result-detail__analysis {
    --analysis-command-remove: #b91c1c;
    --analysis-command-add: #166534;
}
html[data-theme] body .automation-result-window .automation-result-detail__analysis h3 {
    font-size: 1rem;
}
html[data-theme] body .automation-result-window .automation-result-detail__analysis-grid h4 {
    font-size: 0.88rem;
}
html[data-theme] body .automation-result-window .automation-result-detail__analysis-grid :is(p, ul) {
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
html[data-theme] body .automation-result-window .automation-result-detail__analysis-grid article > div {
    min-width: 0;
}
html[data-theme] body .automation-result-window .automation-analysis-command-notice {
    grid-column: 1 / -1;
    padding: 0.65rem 0.75rem;
    border-left: 3px solid var(--ds-primary, #8697ff);
    background: var(--ds-surface-raised, var(--panel));
}
html[data-theme] body .automation-result-window .automation-analysis-commands--remove {
    --analysis-command-color: var(--analysis-command-remove);
}
html[data-theme] body .automation-result-window .automation-analysis-commands--add {
    --analysis-command-color: var(--analysis-command-add);
}
html[data-theme] body .automation-result-window .automation-analysis-commands :is(h4, code, .automation-analysis-command-caption) {
    color: var(--analysis-command-color) !important;
    -webkit-text-fill-color: var(--analysis-command-color) !important;
}
html[data-theme] body .automation-result-window .automation-analysis-command-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}
html[data-theme] body .automation-result-window .automation-analysis-command-list li {
    min-width: 0;
    padding-top: 0.6rem;
    border-top: 1px solid var(--panel-border);
}
html[data-theme] body .automation-result-window .automation-analysis-command-list pre {
    margin: 0 0 0.4rem;
    padding: 0.6rem;
    border: 1px solid var(--panel-border);
    border-radius: 0.4rem;
    background: var(--panel);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
html[data-theme] body .automation-result-window .automation-analysis-command-list code {
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Consolas, monospace);
    font-size: 0.8rem;
    font-weight: 400 !important;
    line-height: 1.6;
}
@container automation-analysis (max-width: 760px) {
    html[data-theme] body .automation-result-window .automation-result-detail__analysis-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (max-width: 760px) {
    html[data-theme] body .automation-result-window .automation-result-detail__analysis-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Evidence context is conveyed by labels/icons as well as color. */
html[data-theme] body .automation-result-window .automation-result-detail__analysis {
    --analysis-summary: #93c5fd;
    --analysis-issue: #fda4af;
    --analysis-warning: #fcd34d;
    --analysis-fix: #67e8f9;
    --analysis-recommend: #c4b5fd;
    --analysis-success: #86efac;
}
html[data-theme="light"] body .automation-result-window .automation-result-detail__analysis {
    --analysis-summary: #1e40af;
    --analysis-issue: #9f1239;
    --analysis-warning: #854d0e;
    --analysis-fix: #155e75;
    --analysis-recommend: #5b21b6;
    --analysis-success: #166534;
}
html[data-theme] body .automation-result-window .automation-analysis-tone--summary { --analysis-accent: var(--analysis-summary); }
html[data-theme] body .automation-result-window .automation-analysis-tone--issue { --analysis-accent: var(--analysis-issue); }
html[data-theme] body .automation-result-window .automation-analysis-tone--warning { --analysis-accent: var(--analysis-warning); }
html[data-theme] body .automation-result-window .automation-analysis-tone--fix { --analysis-accent: var(--analysis-fix); }
html[data-theme] body .automation-result-window .automation-analysis-tone--recommend { --analysis-accent: var(--analysis-recommend); }
html[data-theme] body .automation-result-window .automation-analysis-tone--success { --analysis-accent: var(--analysis-success); }
html[data-theme] body .automation-result-window .automation-analysis-commands { --analysis-accent: var(--analysis-command-color); }
html[data-theme] body .automation-result-window .automation-result-detail__analysis-grid {
    align-items: start;
    gap: .8rem;
}
html[data-theme] body .automation-result-window .automation-result-detail__analysis-grid .automation-analysis-card {
    gap: .7rem;
    padding: .85rem;
    border: 1px solid color-mix(in srgb, var(--analysis-accent) 25%, var(--panel-border));
    border-inline-start: 3px solid var(--analysis-accent);
    border-radius: .7rem;
    background: color-mix(in srgb, var(--analysis-accent) 3%, var(--panel));
    box-shadow: 0 2px 8px #00000008;
}
html[data-theme] body .automation-result-window :is(.automation-analysis-card--summary, .automation-analysis-card--recommend) {
    grid-column: 1 / -1;
}
html[data-theme] body .automation-result-window .automation-analysis-card .automation-result-detail__analysis-section-icon {
    width: 2rem;
    height: 2rem;
    border-radius: .6rem;
    color: var(--analysis-accent) !important;
    background: color-mix(in srgb, var(--analysis-accent) 12%, transparent) !important;
}
html[data-theme] body .automation-result-window .automation-analysis-card .automation-result-detail__analysis-section-icon svg {
    width: 1.05rem;
    height: 1.05rem;
}
html[data-theme] body .automation-result-window .automation-analysis-card__heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem .7rem;
    margin-bottom: .65rem;
}
html[data-theme] body .automation-result-window .automation-analysis-card__heading h4 {
    margin: 0;
    color: var(--analysis-accent) !important;
    -webkit-text-fill-color: var(--analysis-accent) !important;
    font-weight: 650;
}
html[data-theme] body .automation-result-window :is(.automation-analysis-count, .automation-analysis-label) {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: .12rem .45rem;
    border-radius: .35rem;
    font-size: .67rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--analysis-accent) !important;
    background: color-mix(in srgb, var(--analysis-accent) 9%, transparent);
    overflow-wrap: anywhere;
}
html[data-theme] body .automation-result-window .automation-analysis-count { margin-inline-start: auto; }
html[data-theme] body .automation-result-window .automation-analysis-findings {
    display: grid;
    gap: .7rem;
    list-style: none;
    padding: 0;
}
html[data-theme] body .automation-result-window .automation-analysis-item {
    display: grid;
    grid-template-columns: 1rem minmax(0, 1fr);
    gap: .5rem;
    margin: 0;
    padding-bottom: .7rem;
    border-bottom: 1px solid color-mix(in srgb, var(--panel-border) 65%, transparent);
}
html[data-theme] body .automation-result-window .automation-analysis-item:last-child { border-bottom: 0; padding-bottom: 0; }
html[data-theme] body .automation-result-window .automation-analysis-item__icon {
    color: var(--analysis-accent);
    padding-top: .15rem;
}
html[data-theme] body .automation-result-window :is(.automation-analysis-item__icon, .automation-analysis-command-label) svg { width: 1rem; height: 1rem; }
html[data-theme] body .automation-result-window .automation-analysis-item p {
    color: var(--analysis-accent) !important;
    margin-top: .25rem;
    font-size: .82rem;
    line-height: 1.65;
}
html[data-theme] body .automation-result-window .automation-analysis-summary-copy {
    color: var(--analysis-summary) !important;
    line-height: 1.7;
}
html[data-theme] body .automation-result-window .automation-analysis-inline-code {
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: .94em;
    color: inherit;
    background: color-mix(in srgb, var(--analysis-accent) 8%, transparent);
    border-radius: .25rem;
    padding: .05em .2em;
}
html[data-theme] body .automation-result-window .automation-analysis-command-notice {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin: 0;
    border-color: var(--analysis-warning);
    border-radius: .35rem;
    background: color-mix(in srgb, var(--analysis-warning) 6%, var(--panel));
}
html[data-theme] body .automation-result-window .automation-analysis-command-notice > span { color: var(--analysis-warning); flex: 0 0 1rem; }
html[data-theme] body .automation-result-window .automation-analysis-command-notice svg { width: 1rem; height: 1rem; }
html[data-theme] body .automation-result-window .automation-analysis-command-notice strong { color: var(--analysis-warning); font-size: .8rem; }
html[data-theme] body .automation-result-window .automation-analysis-command-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    color: var(--analysis-command-color);
    font-size: .73rem;
    margin-bottom: .45rem;
}
html[data-theme] body .automation-result-window .automation-analysis-command-list pre {
    border-inline-start: 3px solid var(--analysis-command-color);
    background: color-mix(in srgb, var(--analysis-command-color) 5%, var(--panel));
    tab-size: 2;
}
html[data-theme] body .automation-result-window .automation-analysis-command-context { display: grid; gap: .35rem; }
html[data-theme] body .automation-result-window .automation-analysis-command-context strong { color: var(--text); font-weight: 600; }
html[data-theme] body .automation-result-window .automation-analysis-prerequisites { color: var(--analysis-warning) !important; }
html[data-theme] body .automation-result-window .automation-analysis-empty { margin-top: .4rem; color: var(--text-muted); }

/* Only an in-flight, explicitly requested analysis gets the animated frame. */
html[data-theme] body .automation-result-window .automation-result-detail__analysis {
    --analysis-border-blue: #60a5fa;
    --analysis-border-violet: #a78bfa;
    --analysis-border-cyan: #22d3ee;
    scroll-margin-block-start: 0.75rem;
}
html[data-theme="light"] body .automation-result-window .automation-result-detail__analysis {
    --analysis-border-blue: #2563eb;
    --analysis-border-violet: #7c3aed;
    --analysis-border-cyan: #0891b2;
}
html[data-theme] body .automation-result-window .automation-result-detail__analysis.is-loading {
    position: relative;
}
html[data-theme] body .automation-result-window .automation-result-detail__analysis.is-loading::after {
    content: "";
    position: absolute;
    inset: -1px;
    border: 2px solid var(--analysis-border-blue);
    border-radius: inherit;
    pointer-events: none;
    animation: automation-ai-analysis-border 3.6s ease-in-out infinite;
}
html[data-theme] body .automation-result-window .automation-result-detail__analysis:focus-visible {
    outline: 2px solid var(--ds-primary, #8697ff);
    outline-offset: 3px;
}
@keyframes automation-ai-analysis-border {
    0%, 100% { border-color: var(--analysis-border-blue); }
    33% { border-color: var(--analysis-border-violet); }
    66% { border-color: var(--analysis-border-cyan); }
}
@media (prefers-reduced-motion: reduce) {
    html[data-theme] body .automation-result-window .automation-result-detail__analysis.is-loading::after {
        animation: none;
    }
}

/* Keep the shared UTC picker above the Automation metrics, at the top right. */
html[data-theme] body #appContent .automation-center .automation-center__summary-frame {
    grid-template-columns: minmax(0, 1fr) !important;
    overflow: visible;
}
html[data-theme] body #appContent .automation-center .automation-center__summary-frame > :is(.automation-center__summary-frame-head, .automation-center__summary-rail, .automation-center__summary-range-note) {
    grid-column: 1 / -1 !important;
    min-width: 0;
}
html[data-theme] body #appContent .automation-center .automation-center__summary-frame-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.8rem;
}
html[data-theme] body #appContent .automation-center .automation-center__summary-frame-actions {
    margin-left: auto;
    max-width: 100%;
    min-width: 0;
}
html[data-theme] body #appContent .automation-center .automation-center__summary-frame-actions .modern-time-range {
    width: min(100%, 24rem);
    min-width: 0;
    max-width: 100%;
}
html[data-theme] body #appContent .automation-center .automation-center__summary-range-note {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.64rem;
    font-weight: 400;
    line-height: 1.4;
}
@media (max-width: 640px) {
    html[data-theme] body #appContent .automation-center .automation-center__summary-frame-actions {
        flex: 1 1 100%;
    }
    html[data-theme] body #appContent .automation-center .automation-center__summary-frame-actions .modern-time-range {
        width: 100%;
    }
}

/* Automation activity matches dashboard cards without re-enabling the global
   card theme. Preserve the existing rail, data, tooltips and navigation. */
html[data-theme] body #appContent .automation-center.automation-center--unified .automation-center__summary-frame .automation-center__summary-rail {
    display: flex !important;
    flex-flow: row nowrap !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 0.42rem !important;
    padding: 0.3rem 0.04rem !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
}
html[data-theme] body #appContent .automation-center.automation-center--unified .automation-center__summary-frame .automation-center__summary-chip {
    box-sizing: border-box;
    display: grid !important;
    grid-template-columns: 1.75rem minmax(0, 1fr) !important;
    grid-template-areas: "icon value" "icon label" !important;
    grid-template-rows: auto auto !important;
    align-content: center !important;
    align-items: center !important;
    justify-items: start !important;
    flex: 0 0 clamp(6.25rem, 6.75vw, 7.25rem) !important;
    width: clamp(6.25rem, 6.75vw, 7.25rem) !important;
    min-width: 6.25rem !important;
    max-width: 7.25rem !important;
    min-height: 3.65rem !important;
    height: auto !important;
    max-height: none !important;
    gap: 0.08rem 0.32rem !important;
    padding: 0.38rem 0.38rem 0.38rem 0.48rem !important;
    border: 1px solid var(--panel-border) !important;
    border-radius: 0.8rem !important;
    background: var(--ds-surface-raised, var(--panel)) !important;
    color: var(--text) !important;
    text-align: left !important;
    box-shadow: none !important;
    transform: none !important;
    transition: border-color 150ms ease, background-color 150ms ease !important;
}
html[data-theme] body #appContent .automation-center.automation-center--unified .automation-center__summary-frame .automation-center__summary-chip:is(:hover, :focus-within, :focus-visible) {
    border-color: var(--ds-primary, #8697ff) !important;
    background: var(--ds-surface-hover, var(--panel)) !important;
    color: var(--text) !important;
    box-shadow: none !important;
    transform: none !important;
}
html[data-theme] body #appContent .automation-center.automation-center--unified .automation-center__summary-frame .automation-center__summary-chip:focus-visible {
    outline: 2px solid var(--ds-primary, #8697ff) !important;
    outline-offset: 2px;
}
html[data-theme] body #appContent .automation-center.automation-center--unified .automation-center__summary-frame .automation-center__summary-chip::before,
html[data-theme] body #appContent .automation-center.automation-center--unified .automation-center__summary-frame .automation-center__summary-chip::after {
    content: none !important;
    display: none !important;
}
html[data-theme] body #appContent .automation-center.automation-center--unified .automation-center__summary-frame .automation-center__summary-chip > span {
    grid-area: icon !important;
    display: grid !important;
    place-items: center !important;
    justify-self: start !important;
    align-self: center !important;
    width: 1.75rem !important;
    min-width: 1.75rem !important;
    height: 1.75rem !important;
    padding: 0 !important;
    color: var(--ds-primary, #8697ff) !important;
    border: 1px solid var(--panel-border) !important;
    border-radius: 0.4rem !important;
    background: var(--panel) !important;
    box-shadow: none !important;
    filter: none !important;
}
html[data-theme] body #appContent .automation-center.automation-center--unified .automation-center__summary-frame .automation-center__summary-chip > span svg {
    width: 0.9rem !important;
    height: 0.9rem !important;
    color: inherit !important;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
html[data-theme] body #appContent .automation-center.automation-center--unified .automation-center__summary-frame .automation-center__summary-chip > :is(small, strong) {
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}
html[data-theme] body #appContent .automation-center.automation-center--unified .automation-center__summary-frame .automation-center__summary-chip > strong {
    grid-area: value !important;
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    color: var(--text) !important;
    overflow-wrap: anywhere;
}
html[data-theme] body #appContent .automation-center.automation-center--unified .automation-center__summary-frame .automation-center__summary-chip > small {
    grid-area: label !important;
    font-size: 0.6rem !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    color: var(--text-soft) !important;
    overflow-wrap: normal;
}
html[data-theme] body #appContent .automation-center.automation-center--unified .automation-center__summary-frame .automation-center__summary-chip--roi {
    flex-basis: clamp(11rem, 14vw, 14rem) !important;
    width: clamp(11rem, 14vw, 14rem) !important;
    min-width: 11rem !important;
    max-width: 14rem !important;
}
/* Match the existing rail's tooltip-only metadata even before it initializes. */
html[data-theme] body #appContent .automation-center.automation-center--unified .automation-center__summary-frame .automation-center__summary-chip--roi > em {
    display: none !important;
}
@media (prefers-reduced-motion: reduce) {
    html[data-theme] body #appContent .automation-center.automation-center--unified .automation-center__summary-frame .automation-center__summary-chip { transition: none !important; }
}

/* Infrastructure Snapshot and ROI share one card-size contract. */
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--overview[data-dashboard-flash-scope] .dashboard-flash-group__grid > .dashboard-mini-card {
    box-sizing: border-box;
    flex: 0 0 clamp(6.25rem, 6.75vw, 7.25rem) !important;
    min-width: 6.25rem !important;
    max-width: 7.25rem !important;
    min-height: 3.65rem !important;
    grid-template-columns: 1.75rem minmax(0, 1fr) !important;
    gap: 0.32rem !important;
    padding: 0.38rem 0.38rem 0.38rem 0.48rem !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--overview[data-dashboard-flash-scope] .dashboard-flash-group__grid {
    gap: 0.42rem !important;
    padding: 0.3rem 0.04rem !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--overview[data-dashboard-flash-scope] :is(.dashboard-mini-card__top, .dashboard-mini-card__icon) {
    width: 1.75rem !important;
    height: 1.75rem !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--overview[data-dashboard-flash-scope] .dashboard-mini-card__icon svg {
    width: 0.9rem !important;
    height: 0.9rem !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--overview[data-dashboard-flash-scope] .dashboard-mini-card__label {
    font-size: 0.6rem !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--overview[data-dashboard-flash-scope] .dashboard-mini-card__value {
    font-size: 0.86rem !important;
}

/* Restore ROI's floating circular navigation rather than bare triangles. */
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--value[data-dashboard-flash-scope="value"] .dashboard-flash-group__rail {
    position: relative;
    padding-inline: 0 !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--value[data-dashboard-flash-scope="value"] .dashboard-flash-group__nav {
    position: absolute !important;
    z-index: 6;
    top: 50% !important;
    bottom: auto !important;
    display: none !important;
    place-items: center;
    width: 2.2rem !important;
    min-width: 2.2rem !important;
    max-width: 2.2rem !important;
    height: 2.2rem !important;
    min-height: 2.2rem !important;
    max-height: 2.2rem !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid color-mix(in srgb, var(--ds-primary) 44%, var(--ds-border)) !important;
    border-radius: 50% !important;
    color: var(--ds-text) !important;
    background: color-mix(in srgb, var(--ds-surface-raised) 92%, transparent) !important;
    box-shadow: 0 0.55rem 1.35rem color-mix(in srgb, #000 34%, transparent) !important;
    backdrop-filter: blur(0.55rem) !important;
    transform: translateY(-50%) !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--value[data-dashboard-flash-scope="value"] .dashboard-flash-group__rail.has-overflow .dashboard-flash-group__nav {
    display: grid !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--value[data-dashboard-flash-scope="value"] .dashboard-flash-group__nav--previous {
    left: 0.18rem !important;
    right: auto !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--value[data-dashboard-flash-scope="value"] .dashboard-flash-group__nav--next {
    right: 0.18rem !important;
    left: auto !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--value[data-dashboard-flash-scope="value"] .dashboard-flash-group__nav svg {
    display: block !important;
    width: 0.92rem !important;
    height: 0.92rem !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--value[data-dashboard-flash-scope="value"] .dashboard-flash-group__nav::before {
    content: none !important;
    display: none !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--value[data-dashboard-flash-scope="value"] .dashboard-flash-group__nav:is(:hover, :focus-visible):not(:disabled) {
    border-color: var(--ds-primary) !important;
    color: #fff !important;
    background: var(--ds-primary) !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--value[data-dashboard-flash-scope="value"] .dashboard-flash-group__nav:focus-visible {
    outline: 2px solid var(--ds-primary);
    outline-offset: 2px;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--value[data-dashboard-flash-scope="value"] .dashboard-flash-group__nav:disabled {
    opacity: 0.2;
    cursor: default;
}

/* Glossary stays text-only; hide the old duplicate stacked-layers trigger. */
html[data-theme] body .donut-card .chart-controls .donut-glossary-trigger__icon,
html[data-theme] body .donut-card .chart-controls [data-open-donut-glossary] > svg,
html[data-theme] body .donut-card .chart-controls [data-open-donut-glossary] > .toolbar-button__icon {
    display: none !important;
}

/* Dashboard dropdown tables inherit the readable popup surface, not an opaque
   table fill or the full-page table's 48rem minimum width. */
html[data-theme] body :is(#dashboard-attention-preview-popover, #dashboard-value-explanation-popover) :is(.dashboard-attention-preview__table-wrap, .dashboard-value-explanation__table-wrap, table, thead, tbody, tr, th, td) {
    background: transparent !important;
}

html[data-theme] body :is(#dashboard-attention-preview-popover, #dashboard-value-explanation-popover) table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.68rem !important;
}

html[data-theme] body :is(#dashboard-attention-preview-popover, #dashboard-value-explanation-popover) table :is(th, td) {
    position: static !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0.28rem 0.32rem !important;
    font-size: 0.68rem !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
    vertical-align: top;
    color: var(--text) !important;
}

html[data-theme] body :is(#dashboard-attention-preview-popover, #dashboard-value-explanation-popover) table thead th {
    font-size: 0.62rem !important;
    font-weight: 500 !important;
    color: var(--text-soft) !important;
}

html[data-theme] body :is(#dashboard-attention-preview-popover, #dashboard-value-explanation-popover) table :is(th, td) :is(strong, b, a, span, small) {
    font-size: inherit !important;
    font-weight: 400 !important;
    letter-spacing: normal !important;
}

/* Notification badge counts use regular-weight numerals. */
html[data-theme] body .topbar .topbar__utility-group > .topbar-utility-button--circle .topbar-utility-button__badge {
    font-weight: 400 !important;
}

/* Table text remains regular-weight, including links and legacy strong tags. */
html[data-theme] body table tbody :is(td, th),
html[data-theme] body :is(#appContent, #popupWindow, #detailDrawer) table tbody :is(td, th),
html[data-theme] body table tbody :is(td, th) :is(strong, b, a, button, span, input, textarea),
html[data-theme] body :is(#appContent, #popupWindow, #detailDrawer) table tbody :is(td, th) :is(strong, b, a, button, span, input, textarea) {
    font-weight: 400 !important;
}

/* Checkbox prefix preserves logical data columns, sort/filter indexes and CSV. */
html[data-theme] body table [data-table-row-selector] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin: 0 0.45rem 0 0;
    padding: 0.2rem;
    cursor: pointer;
}

html[data-theme] body table input[data-table-highlight-check] {
    appearance: auto !important;
    width: 0.95rem !important;
    min-width: 0.95rem !important;
    height: 0.95rem !important;
    min-height: 0.95rem !important;
    margin: 0 !important;
    padding: 0 !important;
    accent-color: var(--ds-primary, #8697ff);
    cursor: pointer;
}

html[data-theme] body table input[data-table-highlight-check]:focus-visible {
    outline: 2px solid var(--ds-primary, #8697ff);
    outline-offset: 2px;
}

html[data-theme] body table[data-row-highlights] > tbody > tr[data-row-highlighted="true"] > :is(td, th),
html[data-theme] body :is(#appContent, #popupWindow, #detailDrawer) table[data-row-highlights] > tbody > tr[data-row-highlighted="true"] > :is(td, th) {
    background: color-mix(in srgb, var(--ds-primary, #8697ff) 17%, var(--ds-surface-raised, var(--panel))) !important;
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ds-primary, #8697ff) 45%, transparent), inset 0 -1px 0 color-mix(in srgb, var(--ds-primary, #8697ff) 45%, transparent) !important;
}

@media print {
    [data-table-row-selector] { display: none !important; }
}

/* Dashboard frame titles remain inline, with optional category prefixes. */
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group__head .dashboard-frame-heading {
    display: flex !important;
    flex: 1 1 18rem;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 0.5rem !important;
    min-width: 0;
    max-width: 100%;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-frame-heading > .eyebrow {
    flex: 0 0 auto;
    margin: 0 !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    white-space: nowrap;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-frame-heading__separator {
    flex: 0 0 auto;
    color: var(--text-soft);
    font-weight: 700;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-frame-heading .dashboard-frame-title {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-frame-heading .dashboard-frame-title > h3 {
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dashboard chart titles use the former Distribution label's compact type. */
html[data-theme] body #appContent[data-view-kind="dashboard"] .chart-card__head > .dashboard-chart-heading {
    flex: 1 1 auto;
    min-width: 0;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .chart-card__head .dashboard-chart-heading > .dashboard-chart-title {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font-family: var(--frame-heading-font) !important;
    font-size: 0.64rem !important;
    font-weight: 750 !important;
    line-height: 1.1 !important;
    letter-spacing: 0.13em !important;
    text-transform: uppercase;
    color: var(--gui-section-label, var(--text-soft)) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* VM summary cards fit their actual frame rather than becoming a scrolling rail. */
html[data-theme] body #appContent .vm-inventory-summary {
    container: vm-inventory / inline-size;
    min-width: 0;
    margin: 0 0 0.6rem;
}

html[data-theme] body #appContent .vm-inventory-summary__grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.5rem;
    min-width: 0;
}

html[data-theme] body #appContent .vm-inventory-stat {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    padding: 0.7rem 0.75rem;
    border: 1px solid var(--panel-border);
    border-radius: 0.8rem;
    background: var(--ds-surface-raised, var(--panel));
    color: var(--text);
    transition: border-color 150ms ease, background-color 150ms ease;
}

html[data-theme] body #appContent .vm-inventory-stat:hover {
    border-color: var(--ds-primary, #8697ff);
    background: var(--ds-surface-hover, var(--panel));
}

html[data-theme] body #appContent .vm-inventory-stat__icon {
    display: grid;
    place-items: center;
    flex: 0 0 2.1rem;
    width: 2.1rem;
    height: 2.1rem;
    border: 1px solid var(--panel-border);
    border-radius: 0.6rem;
    color: var(--ds-primary, #8697ff);
    background: var(--panel);
}

html[data-theme] body #appContent .vm-inventory-stat__icon svg {
    width: 1.15rem;
    height: 1.15rem;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

html[data-theme] body #appContent .vm-inventory-stat__content {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

html[data-theme] body #appContent .vm-inventory-stat__content strong {
    font-size: clamp(1rem, 1.8cqi, 1.2rem) !important;
    line-height: 1.15;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

html[data-theme] body #appContent .vm-inventory-stat__content > span {
    font-size: 0.72rem !important;
    line-height: 1.25;
    color: var(--text-soft);
}

html[data-theme] body #appContent .vm-inventory-summary__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

@container vm-inventory (max-width: 58rem) {
    html[data-theme] body #appContent .vm-inventory-summary__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@container vm-inventory (max-width: 32rem) {
    html[data-theme] body #appContent .vm-inventory-summary__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@container vm-inventory (max-width: 18rem) {
    html[data-theme] body #appContent .vm-inventory-summary__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* VM Explorer: a single compact primary toolbar, with optional controls on demand. */
html[data-theme] body #appContent .vm-explorer-toolbar {
    display: grid;
    gap: 0.5rem;
    min-width: 0;
    margin-block: 0.4rem;
}

html[data-theme] body #appContent .vm-explorer-toolbar__main {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.5rem;
    border: 1px solid var(--panel-border);
    border-radius: 0.8rem;
    background: var(--panel);
}

html[data-theme] body #appContent .vm-explorer-toolbar__main > :is(.toolbar-search, .search-field) {
    flex: 1 1 16rem !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
}

html[data-theme] body #appContent .vm-explorer-toolbar__main :is(.table-widget__meta, .table-widget__rows, .easyclick-table-tool-actions) {
    display: flex !important;
    flex: 0 0 auto;
    flex-wrap: nowrap !important;
    align-items: center;
    width: auto !important;
    gap: 0.45rem;
    margin: 0;
    white-space: nowrap;
}

html[data-theme] body #appContent .vm-explorer-toolbar__main :is(.toolbar-search, .toolbar-select) {
    min-height: 2.35rem !important;
    height: 2.35rem;
    font-size: 0.8rem !important;
    padding-block: 0.35rem;
}

html[data-theme] body #appContent .vm-explorer-toolbar__main .toolbar-select {
    width: 4.6rem !important;
    min-width: 4.6rem !important;
}

html[data-theme] body #appContent .vm-explorer-toolbar__main .toolbar-button--icon {
    flex: 0 0 2.35rem;
    width: 2.35rem !important;
    min-width: 2.35rem !important;
    min-height: 2.35rem !important;
    height: 2.35rem !important;
    padding: 0.4rem !important;
}

html[data-theme] body #appContent .vm-explorer-toolbar__main .toolbar-button--icon svg {
    width: 1rem;
    height: 1rem;
}

html[data-theme] body #appContent .vm-explorer-toolbar__count {
    font-size: 0.78rem !important;
    white-space: nowrap;
}

html[data-theme] body #appContent .vm-explorer-toolbar__columns {
    position: relative;
    padding: 0 !important;
}

html[data-theme] body #appContent .vm-explorer-toolbar__columns > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 0 !important;
    min-height: 2.35rem;
    padding: 0.4rem 0.55rem !important;
    font-size: 0.68rem !important;
}

html[data-theme] body #appContent .vm-explorer-toolbar #columnChooserBody {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    z-index: 30;
    width: min(19rem, 80vw);
    max-height: 22rem;
    overflow: auto;
    padding: 0.65rem;
    border: 1px solid var(--panel-border);
    border-radius: 0.75rem;
    background: var(--panel);
    box-shadow: 0 0.6rem 1.6rem #0004;
    white-space: normal;
}

html[data-theme] body #appContent .vm-explorer-toolbar__options {
    display: grid;
    gap: 0.65rem;
    min-width: 0;
    padding: 0.65rem;
    border: 1px solid var(--panel-border);
    border-radius: 0.75rem;
}

html[data-theme] body #appContent .vm-explorer-toolbar__options[hidden] {
    display: none !important;
}

html[data-theme] body #appContent .vm-explorer-toolbar__options :is(.saved-view, .advanced-search__controls) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

html[data-theme] body #appContent .vm-explorer-toolbar__options .search-field {
    flex: 1 1 14rem;
    min-width: 0;
}

html[data-theme] body #appContent .vm-explorer-toolbar .is-active {
    border-color: var(--accent, #8697ff);
    color: var(--accent, #8697ff);
}

/* Match every VM donut title to the existing Location eyebrow typography. */
html[data-theme] body #appContent[data-view-kind] .vm-explorer-overview .donut-card .chart-card__head :is(.eyebrow, h3) {
    font-family: var(--frame-heading-font) !important;
    font-size: 0.64rem !important;
    font-weight: 750 !important;
    line-height: 1.1 !important;
    letter-spacing: 0.13em !important;
}

@media (max-width: 42rem) {
    html[data-theme] body #appContent .vm-explorer-toolbar__main {
        flex-wrap: wrap !important;
    }
    html[data-theme] body #appContent .vm-explorer-toolbar__main > :is(.toolbar-search, .search-field) {
        flex-basis: 100% !important;
    }
    html[data-theme] body #appContent .vm-explorer-toolbar__main .table-widget__meta {
        flex: 1 1 100%;
        flex-wrap: wrap !important;
        justify-content: flex-end;
    }
    html[data-theme] body #appContent .vm-explorer-toolbar__count {
        margin-right: auto;
    }
}

/* Theme boundary: light workspace cards, permanently dark navigation rail. */
html[data-theme="light"] body .sidebar.sidebar {
    --workspace-chrome-bg: #080d16;
    --workspace-chrome-border: #344057;
    --workspace-chrome-text: #f0f4ff;
    --workspace-chrome-muted: #abb9d0;
    --workspace-unified-raised: #111b2b;
    --shell-bg: #080d16;
    --shell-surface: #080d16;
    --shell-surface-strong: #111b2b;
    --shell-border: #344057;
    --shell-text: #f0f4ff;
    --shell-text-soft: #abb9d0;
    --panel: #0e1726;
    --panel-strong: #172236;
    --panel-border: #344057;
    --text: #f0f4ff;
    --text-soft: #abb9d0;
    --ds-text-muted: #abb9d0;
    border-color: #344057 !important;
    background: #080d16 !important;
    color: #f0f4ff !important;
}

html[data-theme="light"] body .sidebar :is(.sidebar-agent-card, .sidebar-foot, .sidebar-active-view-label, .sidebar-nav-search) {
    border-color: #344057 !important;
    background: #111b2b !important;
    color: #f0f4ff !important;
}

html[data-theme="light"] body .sidebar :is(.nav-link, .nav-group__toggle) {
    color: #c5d0e3 !important;
}

html[data-theme="light"] body .sidebar :is(.nav-link, .nav-group__toggle) :is(.nav-link__label, .nav-link__label strong, .nav-link__icon, .nav-group__chevron) {
    color: inherit !important;
}

html[data-theme="light"] body .sidebar :is(.muted-copy, .nav-link__label .muted-copy, .sidebar-section__title, .sidebar-utility__caption, .sidebar-foot__label) {
    color: #abb9d0 !important;
}

html[data-theme="light"] body .sidebar .sidebar-nav-search input {
    color: #f0f4ff !important;
}

html[data-theme="light"] body .sidebar .sidebar-nav-search input::placeholder {
    color: #abb9d0 !important;
}

html[data-theme="light"] body .sidebar .nav-group:is([data-nav-group="admin"], [data-nav-group="super_admin"]) .nav-link--child {
    background: #0e1726 !important;
    border-color: #283950 !important;
}

html[data-theme="light"] body .sidebar.sidebar .nav-link.nav-link.active,
html[data-theme="light"] body .sidebar.sidebar .nav-group.is-active > .nav-group__toggle.nav-group__toggle {
    border-color: #6389bd !important;
    background: #173456 !important;
    color: #fff !important;
}

html[data-theme="light"] body .sidebar .nav-link.active :is(.nav-link__label, .nav-link__label strong, .nav-group__chevron) {
    color: #fff !important;
}

html[data-theme="light"] body .sidebar .nav-link.active .nav-link__icon,
html[data-theme="light"] body .sidebar .nav-group:is([data-nav-group="admin"], [data-nav-group="super_admin"]) .nav-link--child.active .nav-link__icon {
    border-color: #8db7f0 !important;
    background: #376da9 !important;
    color: #fff !important;
}

html[data-theme="light"] body .sidebar .nav-link.active .nav-link__icon svg {
    color: #fff !important;
    stroke: currentColor !important;
}

/* Dashboard flash cards and donut/glossary controls belong to the light
   workspace, not to the sidebar's dark navigation palette. */
html[data-theme="light"] body :is(.dashboard-flash-group, .dashboard-mini-card, .metric-card, .donut-card, .donut-glossary-popup-window .popup-window__dialog) {
    border-color: #d0d7e2 !important;
    background: #fff !important;
    background-image: none !important;
    color: #1e293b !important;
}

html[data-theme="light"] body #appContent[data-view-kind="dashboard"] :is(.dashboard-flash-group, .dashboard-mini-card, .metric-card),
html[data-theme="light"] body #appContent :is(.dashboard-flash-group, .dashboard-mini-card, .metric-card) {
    border-color: #d0d7e2 !important;
    background: #fff !important;
    background-image: none !important;
    color: #1e293b !important;
}

html[data-theme="light"] body #appContent :is(.dashboard-flash-group__head, .dashboard-mini-card__label, .dashboard-mini-card__value) {
    color: #1e293b !important;
}

html[data-theme="light"] body :is(.dashboard-grid, .chart-grid) > article.chart-card.donut-card,
html[data-theme="light"] body .donut-card > :is(.chart-card__head, .donut-card__body, .donut-card__footer),
html[data-theme="light"] body .donut-card .chart-controls > .icon-button,
html[data-theme="light"] body .donut-card .donut-glossary-trigger {
    border-color: #d0d7e2 !important;
    background: #fff !important;
    background-image: none !important;
    color: #1e293b !important;
}

html[data-theme="light"] body .donut-glossary-popup-window :is(.popup-window__body, .donut-glossary__item, .donut-glossary__row, .legend-row, .donut-glossary__search-shell) {
    border-color: #d0d7e2 !important;
    background: #f7f9fc !important;
    color: #1e293b !important;
}

html[data-theme="light"] body .donut-glossary-popup-window :is(.donut-glossary__label, .legend-row__label, .donut-glossary__row strong),
html[data-theme="light"] body .donut-card :is(.donut-chart__total, .legend-row__label, .legend-row__share) {
    color: #1e293b !important;
}

/* High-specificity legacy dashboard rules painted light-mode cards with the
   dark navigation surface. Keep each workspace surface independent of it. */
html[data-theme="light"] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--overview .dashboard-mini-card,
html[data-theme="light"] body .dashboard-flash-group--overview .dashboard-mini-card {
    border-color: #ccd7e6 !important;
    background: #f8fbff !important;
    background-image: none !important;
    color: #17243b !important;
    box-shadow: 0 0.25rem 0.8rem rgba(27, 48, 78, 0.07) !important;
}

html[data-theme="light"] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--overview .dashboard-mini-card__label,
html[data-theme="light"] body .dashboard-flash-group--overview .dashboard-mini-card__label {
    color: #475569 !important;
}

html[data-theme="light"] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--overview .dashboard-mini-card__value,
html[data-theme="light"] body .dashboard-flash-group--overview .dashboard-mini-card__value {
    color: #101b31 !important;
}

html[data-theme="light"] body :is(.dashboard-flash-group, .content-card, .chart-card, .popup-window__dialog):not(.sidebar *) {
    border-color: #d6dfeb !important;
    background: #fff !important;
    background-image: none !important;
    color: #17243b !important;
}

html[data-theme="light"] body .donut-card :is(.chart-card__head, .donut-card__body, .donut-card__footer),
html[data-theme="light"] body :is(.dashboard-grid, .chart-grid) > article.chart-card.donut-card {
    border-color: #d6dfeb !important;
    background: #fff !important;
    background-image: none !important;
}

html[data-theme="light"] body .donut-card .chart-controls .donut-glossary-trigger,
html[data-theme="light"] body .donut-card .chart-controls .donut-glossary-trigger__button,
html[data-theme="light"] body .donut-card .chart-controls .donut-glossary-trigger .muted-copy {
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
    background-image: none !important;
    color: #1e293b !important;
}

html[data-theme="light"] body .donut-card .donut-legend .legend-row,
html[data-theme="light"] body .donut-glossary-popup-window .donut-glossary__item {
    border-color: #d7e0ec !important;
    background: #f8fafc !important;
    background-image: none !important;
    color: #17243b !important;
}

html[data-theme="light"] body .donut-card .donut-legend .legend-row:is(.legend-row--selected, .is-active),
html[data-theme="light"] body .donut-glossary-popup-window .donut-glossary__item.is-active {
    border-color: #8ea9e2 !important;
    background: #edf3ff !important;
}

html[data-theme="light"] body .donut-card .donut-legend .legend-row :is(.legend-row__label, strong),
html[data-theme="light"] body .donut-glossary-popup-window .donut-glossary__item :is(.donut-glossary__label, strong) {
    color: #17243b !important;
}

html[data-theme="light"] body .donut-card .donut-legend .legend-row__share {
    color: #52647d !important;
}

/* Smaller donut legend text without changing selection controls or values. */
html[data-theme] body .donut-card .donut-legend .legend-row {
    font-size: 0.68rem !important;
}
html[data-theme] body .donut-card .donut-legend .legend-row__label,
html[data-theme] body .donut-card .donut-legend .legend-row > strong {
    font-size: 0.68rem !important;
    line-height: 1.2 !important;
}
html[data-theme] body .donut-card .donut-legend .legend-row__share {
    font-size: 0.62rem !important;
    line-height: 1.2 !important;
}

html[data-theme="light"] body .dashboard-snapshot-time-series__legend :is(.dashboard-snapshot-time-series__key, .dashboard-snapshot-time-series__all) {
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
    color: #334155 !important;
}

html[data-theme="light"] body .dashboard-snapshot-time-series__legend .dashboard-snapshot-time-series__key.is-active {
    border-color: color-mix(in srgb, var(--snapshot-series-color) 50%, #cbd5e1) !important;
    background: color-mix(in srgb, var(--snapshot-series-color) 9%, #fff) !important;
}

html[data-theme="light"] body .dashboard-snapshot-time-series__legend :is(.dashboard-snapshot-time-series__key strong, .dashboard-snapshot-time-series__all strong) {
    color: #17243b !important;
}

/* Logout is a destructive account action and should read that way in either theme. */
html[data-theme] body .topbar-profile-actions a.toolbar-button.danger[href="/logout"],
html[data-theme] body .sidebar a.sidebar-logout-button[href="/logout"] {
    border-color: #b91c1c !important;
    background: #dc2626 !important;
    background-image: none !important;
    color: #fff !important;
}

html[data-theme] body .topbar-profile-actions a.toolbar-button.danger[href="/logout"]:is(:hover, :focus-visible),
html[data-theme] body .sidebar a.sidebar-logout-button[href="/logout"]:is(:hover, :focus-visible) {
    border-color: #991b1b !important;
    background: #b91c1c !important;
    color: #fff !important;
}
/* Troubleshooting drawers need room for the full case table and full labels. */
html[data-theme] body .topbar-cases-popup-window .popup-window__dialog {
    width: min(72rem, calc(100vw - 1rem)) !important;
    max-width: none !important;
}
html[data-theme] body .topbar-cases-popup-window .summary-cards {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)) !important;
    gap: 0.65rem;
}
html[data-theme] body .topbar-cases-popup-window .summary-cards > .metric-card {
    min-width: 0;
    min-height: 5rem;
    height: auto;
    overflow: visible !important;
    padding: 0.7rem 0.8rem;
}
html[data-theme] body .topbar-cases-popup-window .summary-cards > .metric-card .metric-card__label {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: normal;
    line-height: 1.25;
}
html[data-theme] body .topbar-cases-popup-window .topbar-case-table {
    min-width: 54rem;
}
@media (max-width: 38rem) {
    html[data-theme] body .topbar-cases-popup-window .summary-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* SLA queue filters keep their full labels and resize inside the popup frame.
   Do not use the fixed-width, globally enhanced metric-card rail here. */
html[data-theme] body .topbar-alerts-popup-window .topbar-sla-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    grid-auto-rows: 1fr;
    align-self: start;
    gap: 0.65rem;
    width: 100%;
    min-width: 0;
}
html[data-theme] body .topbar-alerts-popup-window .topbar-sla-summary__card {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
    min-height: 4.5rem;
    height: auto;
    padding: 0.75rem;
    border: 1px solid var(--panel-border);
    border-radius: 0.8rem;
    background: var(--ds-surface-raised, var(--panel));
    color: var(--text);
    font: inherit;
    text-align: left;
    box-shadow: none;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease;
}
html[data-theme] body .topbar-alerts-popup-window .topbar-sla-summary__card:is(:hover, :focus-visible, [aria-pressed="true"]) {
    border-color: var(--ds-primary, #8697ff);
    background: var(--ds-surface-hover, var(--panel-soft));
}
html[data-theme] body .topbar-alerts-popup-window .topbar-sla-summary__card:focus-visible {
    outline: 2px solid var(--ds-primary, #8697ff);
    outline-offset: 2px;
}
html[data-theme] body .topbar-alerts-popup-window .topbar-sla-summary__card[aria-pressed="true"] {
    box-shadow: inset 0 -2px 0 var(--ds-primary, #8697ff);
}
html[data-theme] body .topbar-alerts-popup-window .topbar-sla-summary__card:disabled {
    cursor: default;
    opacity: 0.6;
}
html[data-theme] body .topbar-alerts-popup-window .topbar-sla-summary__icon {
    display: grid;
    place-items: center;
    flex: 0 0 2.25rem;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--panel-border);
    border-radius: 0.55rem;
    background: var(--panel);
    color: var(--ds-primary, #8697ff);
}
html[data-theme] body .topbar-alerts-popup-window .topbar-sla-summary__icon svg {
    width: 1.25rem;
    height: 1.25rem;
}
html[data-theme] body .topbar-alerts-popup-window .topbar-sla-summary__copy {
    display: grid;
    min-width: 0;
    gap: 0.15rem;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
}
html[data-theme] body .topbar-alerts-popup-window .topbar-sla-summary__copy strong {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.15;
    overflow-wrap: anywhere;
}
html[data-theme] body .topbar-alerts-popup-window .topbar-sla-summary__copy > span {
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.3;
}
html[data-theme] body .topbar-alerts-popup-window .topbar-sla-summary__copy small {
    color: var(--text-soft);
    font-size: 0.7rem;
    font-weight: 400;
    line-height: 1.3;
}
@media (prefers-reduced-motion: reduce) {
    html[data-theme] body .topbar-alerts-popup-window .topbar-sla-summary__card { transition: none; }
}

/* Shared complete case queues: compact controls and an on-demand email form. */
html[data-theme] body .topbar-case-queue {
    display: grid;
    gap: 0.65rem;
    min-width: 0;
}
html[data-theme] body .topbar-case-queue__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}
html[data-theme] body .topbar-case-queue .compact-table__toolbar {
    flex-wrap: wrap;
    gap: 0.5rem;
}
html[data-theme] body .topbar-case-queue .compact-search {
    min-width: min(16rem, 100%);
    flex: 1 1 16rem;
}
html[data-theme] body .topbar-case-queue .table-wrap {
    max-width: 100%;
    overflow-x: auto;
}
html[data-theme] body .topbar-case-queue :is(th, td) {
    padding: 0.45rem 0.55rem;
    font-size: 0.76rem;
}
html[data-theme] body .topbar-case-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--brand);
    font: inherit;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
}
html[data-theme] body .topbar-case-link:is(:hover, :focus-visible) {
    text-decoration: underline;
}
html[data-theme] body .topbar-case-sla {
    display: inline-block;
    min-width: 8rem;
    white-space: normal;
}
html[data-theme] body .topbar-case-sla.is-violated {
    color: var(--danger);
}
html[data-theme] body .topbar-case-email {
    display: grid;
    gap: 0.65rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.7rem;
    background: var(--panel-soft);
}
html[data-theme] body .topbar-case-email[hidden] {
    display: none !important;
}
html[data-theme] body .topbar-case-email__fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: 0.6rem;
}
html[data-theme] body .topbar-case-email label {
    display: grid;
    min-width: 0;
    gap: 0.25rem;
    font-size: 0.76rem;
}
html[data-theme] body .topbar-case-email__wide {
    grid-column: 1 / -1;
}
html[data-theme] body .topbar-case-email :is(input, textarea) {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font: inherit;
}
html[data-theme] body .topbar-case-email textarea {
    resize: vertical;
    max-height: 20rem;
}
html[data-theme] body .topbar-case-queue :is(.toolbar-button, .primary-button) svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
}

/* Size the ROI controls to their content. Wrap at narrow widths instead of
   squeezing the selected period down to an icon and UTC. */
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--value > .dashboard-flash-group__head {
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0.4rem 0.75rem !important;
}
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--value .dashboard-frame-heading {
    flex: 1 1 auto;
}
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--value .dashboard-frame-info {
    width: 1.7rem !important;
    height: 1.7rem !important;
    min-width: 1.7rem !important;
    min-height: 1.7rem !important;
    padding: 0.2rem !important;
}

html[data-theme] body .dashboard-flash-group__head .dashboard-value-head-actions,
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-value-head-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 0 1 auto;
    width: max-content !important;
    max-width: 100%;
    min-width: 0 !important;
    margin-left: auto;
    gap: 0.35rem !important;
}
html[data-theme] body .dashboard-value-head-actions .dashboard-value-range {
    flex: 0 1 auto;
    width: 16rem;
    max-width: 100%;
    min-width: min(100%, 16rem) !important;
}
html[data-theme] body .dashboard-value-head-actions .modern-time-range {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
}
html[data-theme] body .dashboard-value-head-actions .modern-time-range__summary strong {
    min-width: 6ch;
    max-width: 12rem;
}
html[data-theme] body .dashboard-value-head-actions .modern-time-range__summary em {
    flex-shrink: 0;
}
html[data-theme] body .dashboard-value-head-actions :is(.modern-time-range__step, .modern-time-range__search-button) {
    flex: 0 0 1.75rem;
    width: 1.75rem;
    min-width: 1.75rem;
}
html[data-theme] body .dashboard-value-head-actions .modern-time-range__summary {
    gap: 0.25rem;
    padding-inline: 0.35rem;
    white-space: nowrap;
}
html[data-theme] body .dashboard-value-head-actions .dashboard-flash-group__maximize {
    flex: 0 0 2rem;
    width: 2rem !important;
    min-width: 2rem !important;
    height: 2rem !important;
    min-height: 2rem !important;
    padding: 0.3rem !important;
}

/* VM Explorer context and selected inventory title share a single header row.
   Only the name may ellipsize; keep the information trigger accessible. */
html[data-theme] body .selection-flash__title {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    column-gap: 0.55rem;
    min-width: 0;
    max-width: 100%;
    flex: 1 1 20rem;
}
html[data-theme] body .selection-flash__title > .eyebrow {
    margin: 0 !important;
    font-size: 0.64rem !important;
    line-height: 1.2;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
html[data-theme] body .selection-flash__title > h3 {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
    min-width: 0;
    margin: 0 !important;
    font-size: 1rem !important;
    line-height: 1.25;
    white-space: nowrap;
}
html[data-theme] body .selection-flash__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
html[data-theme] body .selection-flash__title .header-description__info {
    position: relative;
    inset: auto;
    flex: 0 0 1.25rem;
    width: 1.25rem;
    min-width: 1.25rem;
    height: 1.25rem;
    min-height: 1.25rem;
    padding: 0;
    font-size: 0.72rem;
}
html[data-theme] body .selection-flash__title > .muted-copy {
    /* The shared enhancer moves this description to the adjacent info icon. */
    display: none;
}

/* The theme controls keep the same lavender treatment in either color mode. */
html[data-theme] body :is(.topbar .topbar-theme-toggle, .sidebar .sidebar-theme-button),
html[data-theme] body :is(.topbar .topbar-theme-toggle, .sidebar .sidebar-theme-button):is(:hover, :focus-visible) {
    border-color: #a6ace6 !important;
    background: #e9ebfa !important;
    background-image: none !important;
    color: #4654aa !important;
    filter: none !important;
    box-shadow: 0 0.18rem 0.55rem rgba(14, 22, 55, 0.18) !important;
    transition: transform 180ms ease, box-shadow 180ms ease !important;
}

html[data-theme] body :is(.topbar .topbar-theme-toggle, .sidebar .sidebar-theme-button):focus-visible {
    outline: 2px solid #f6c84c;
    outline-offset: 2px;
}

/* Semantic action colors apply to every tenant and platform admin row. */
html[data-theme="light"] body .admin-page .table-row-actions .icon-button[data-admin-action-tone="view"] {
    --admin-action-ink: #155eaf; --admin-action-bg: #e9f3ff; --admin-action-border: #9dc9f4;
}
html[data-theme="light"] body .admin-page .table-row-actions .icon-button[data-admin-action-tone="edit"] {
    --admin-action-ink: #946000; --admin-action-bg: #fff4da; --admin-action-border: #edc670;
}
html[data-theme="light"] body .admin-page .table-row-actions .icon-button[data-admin-action-tone="success"] {
    --admin-action-ink: #08784e; --admin-action-bg: #e7f7ef; --admin-action-border: #8bd0ad;
}
html[data-theme="light"] body .admin-page .table-row-actions .icon-button[data-admin-action-tone="warning"] {
    --admin-action-ink: #a45711; --admin-action-bg: #fff0dc; --admin-action-border: #f1bc83;
}
html[data-theme="light"] body .admin-page .table-row-actions .icon-button[data-admin-action-tone="danger"] {
    --admin-action-ink: #b42342; --admin-action-bg: #fff0f3; --admin-action-border: #eda8b6;
}
html[data-theme="light"] body .admin-page .table-row-actions .icon-button[data-admin-action-tone="other"] {
    --admin-action-ink: #6746aa; --admin-action-bg: #f2edff; --admin-action-border: #c7b5ed;
}
html[data-theme="dark"] body .admin-page .table-row-actions .icon-button[data-admin-action-tone="view"] {
    --admin-action-ink: #82c8ff; --admin-action-bg: #102d49; --admin-action-border: #376b96;
}
html[data-theme="dark"] body .admin-page .table-row-actions .icon-button[data-admin-action-tone="edit"] {
    --admin-action-ink: #f4ce72; --admin-action-bg: #423113; --admin-action-border: #8d6b35;
}
html[data-theme="dark"] body .admin-page .table-row-actions .icon-button[data-admin-action-tone="success"] {
    --admin-action-ink: #82e2af; --admin-action-bg: #12392b; --admin-action-border: #387e5b;
}
html[data-theme="dark"] body .admin-page .table-row-actions .icon-button[data-admin-action-tone="warning"] {
    --admin-action-ink: #ffc181; --admin-action-bg: #46301a; --admin-action-border: #93633d;
}
html[data-theme="dark"] body .admin-page .table-row-actions .icon-button[data-admin-action-tone="danger"] {
    --admin-action-ink: #ffa3b2; --admin-action-bg: #481e2b; --admin-action-border: #9a4d61;
}
html[data-theme="dark"] body .admin-page .table-row-actions .icon-button[data-admin-action-tone="other"] {
    --admin-action-ink: #c4a9ff; --admin-action-bg: #30254a; --admin-action-border: #6e579c;
}
html[data-theme] body .admin-page .table-row-actions .icon-button[data-admin-action-tone] {
    color: var(--admin-action-ink) !important;
    border-color: var(--admin-action-border) !important;
    background: var(--admin-action-bg) !important;
    background-image: none !important;
    transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}
html[data-theme] body .admin-page .table-row-actions .icon-button[data-admin-action-tone]:is(:hover, :focus-visible):not(:disabled) {
    color: var(--admin-action-ink) !important;
    border-color: var(--admin-action-ink) !important;
    background: color-mix(in srgb, var(--admin-action-ink) 15%, var(--admin-action-bg)) !important;
    box-shadow: 0 0 0 0.16rem color-mix(in srgb, var(--admin-action-ink) 20%, transparent);
    transform: translateY(-1px);
}
html[data-theme] body .admin-page .table-row-actions .icon-button[data-admin-action-tone]:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

/* Distinct, accessible colors for meeting playback actions; disabled actions stay neutral. */
html[data-theme="light"] body .meeting-history-table__actions .meeting-history-action--play:not(:disabled) { --meeting-action-ink:#15803d; --meeting-action-bg:#ecfdf3; --meeting-action-border:#86cfa0; }
html[data-theme="light"] body .meeting-history-table__actions .meeting-history-action--pause:not(:disabled) { --meeting-action-ink:#a16207; --meeting-action-bg:#fffbeb; --meeting-action-border:#e6c36b; }
html[data-theme="light"] body .meeting-history-table__actions .meeting-history-action--stop:not(:disabled) { --meeting-action-ink:#be123c; --meeting-action-bg:#fff1f2; --meeting-action-border:#f3a1b3; }
html[data-theme="light"] body .meeting-history-table__actions .meeting-history-action--download:not(:disabled) { --meeting-action-ink:#1d4ed8; --meeting-action-bg:#eff6ff; --meeting-action-border:#9dbcf4; }
html[data-theme="light"] body .meeting-history-table__actions .meeting-history-action--view:not(:disabled) { --meeting-action-ink:#7c3aed; --meeting-action-bg:#f5f3ff; --meeting-action-border:#c5aff8; }
html[data-theme="dark"] body .meeting-history-table__actions .meeting-history-action--play:not(:disabled) { --meeting-action-ink:#86e5a5; --meeting-action-bg:#123526; --meeting-action-border:#3e8a58; }
html[data-theme="dark"] body .meeting-history-table__actions .meeting-history-action--pause:not(:disabled) { --meeting-action-ink:#f5cb72; --meeting-action-bg:#3a2c13; --meeting-action-border:#92713c; }
html[data-theme="dark"] body .meeting-history-table__actions .meeting-history-action--stop:not(:disabled) { --meeting-action-ink:#ffa3b4; --meeting-action-bg:#421c29; --meeting-action-border:#9a4b61; }
html[data-theme="dark"] body .meeting-history-table__actions .meeting-history-action--download:not(:disabled) { --meeting-action-ink:#8eb9ff; --meeting-action-bg:#162e50; --meeting-action-border:#4d79b2; }
html[data-theme="dark"] body .meeting-history-table__actions .meeting-history-action--view:not(:disabled) { --meeting-action-ink:#c5a5ff; --meeting-action-bg:#30234b; --meeting-action-border:#7156a0; }
html[data-theme] body .meeting-history-table__actions .meeting-history-action:not(:disabled) {
    color:var(--meeting-action-ink) !important;
    border-color:var(--meeting-action-border) !important;
    background:var(--meeting-action-bg) !important;
    opacity:1 !important;
    filter:none !important;
}
html[data-theme] body .meeting-history-table__actions .meeting-history-action:not(:disabled):is(:hover,:focus-visible) {
    color:var(--meeting-action-ink) !important;
    border-color:var(--meeting-action-ink) !important;
    background:color-mix(in srgb,var(--meeting-action-ink) 17%,var(--meeting-action-bg)) !important;
    box-shadow:0 0 0 .16rem color-mix(in srgb,var(--meeting-action-ink) 22%,transparent);
}
html[data-theme] body .meeting-history-table__actions .meeting-history-action:disabled {
    color:#9ca3af !important;
    border-color:color-mix(in srgb,#9ca3af 34%,var(--border)) !important;
    background:color-mix(in srgb,#9ca3af 7%,var(--surface)) !important;
    opacity:.48 !important;
    filter:none !important;
}

/* Speaker and copy are usable message actions, not disabled placeholders. */
html[data-theme="light"] body .app-shell[data-view-kind="agentic_network"] .agentic-message__meta-actions button[data-agentic-read-message] { --message-action-ink:#1d4ed8; --message-action-bg:#eff6ff; --message-action-border:#a8c4f4; }
html[data-theme="light"] body .app-shell[data-view-kind="agentic_network"] .agentic-message__meta-actions button[data-agentic-copy-message] { --message-action-ink:#7c3aed; --message-action-bg:#f5f3ff; --message-action-border:#c8b6f4; }
html[data-theme="dark"] body .app-shell[data-view-kind="agentic_network"] .agentic-message__meta-actions button[data-agentic-read-message] { --message-action-ink:#9ac2ff; --message-action-bg:#172e50; --message-action-border:#507aaa; }
html[data-theme="dark"] body .app-shell[data-view-kind="agentic_network"] .agentic-message__meta-actions button[data-agentic-copy-message] { --message-action-ink:#d0afff; --message-action-bg:#302448; --message-action-border:#77609e; }
html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-conversation .agentic-message__meta-actions button:is([data-agentic-read-message],[data-agentic-copy-message]):not(:disabled) {
    color:var(--message-action-ink) !important;
    border-color:var(--message-action-border) !important;
    background:var(--message-action-bg) !important;
    opacity:1 !important;
    filter:none !important;
}
html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-conversation .agentic-message__meta-actions button:is([data-agentic-read-message],[data-agentic-copy-message]):not(:disabled):is(:hover,:focus-visible) {
    color:var(--message-action-ink) !important;
    border-color:var(--message-action-ink) !important;
    background:color-mix(in srgb,var(--message-action-ink) 16%,var(--message-action-bg)) !important;
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-message__quota-period {
    color: currentColor;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    opacity: 0.78;
}

/* Enterprise Value flash cards: a gold hover/focus surface with readable ink
   in both themes. Keep each card's accent icon and existing lift behavior. */
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--overview.dashboard-flash-group--value .dashboard-mini-card:is(:hover, :focus-visible) {
    border-color: #b98220 !important;
    background: linear-gradient(135deg, #ffe7a0 0%, #e9b844 58%, #d99b2a 100%) !important;
    color: #241906 !important;
    box-shadow: 0 0.7rem 1.5rem rgba(130, 83, 12, 0.28) !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--overview.dashboard-flash-group--value .dashboard-mini-card:is(:hover, :focus-visible) :is(.dashboard-mini-card__label, .dashboard-mini-card__value, .dashboard-mini-card__footer) {
    color: #241906 !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--overview.dashboard-flash-group--value .dashboard-mini-card:focus-visible {
    outline: 2px solid #7b4d0b !important;
    outline-offset: 2px;
}

/* Portal-mounted so the compact, horizontally scrolling flash rail cannot
   clip the breakdown or its copy control. */
.dashboard-value-explanation {
    position: fixed;
    z-index: 20000;
    width: min(17rem, calc(100vw - 1rem));
    max-height: min(55vh, 20rem);
    overflow: auto;
    padding: 0.48rem 0.55rem;
    border: 1px solid #d7aa49;
    border-radius: 0.35rem;
    color: #eef3ff;
    background: #101827;
    box-shadow: 0 0.9rem 2.2rem rgba(0, 0, 0, 0.32);
    font-size: 0.62rem;
    line-height: 1.35;
}

html[data-theme="light"] .dashboard-value-explanation {
    color: #1f2937;
    background: #fffaf0;
    box-shadow: 0 0.9rem 2.2rem rgba(60, 42, 9, 0.18);
}

.dashboard-value-explanation__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.55rem;
    color: #f4c663;
}

html[data-theme="light"] .dashboard-value-explanation__head { color: #76500d; }
.dashboard-value-explanation__head strong { font-size: 0.68rem; }
.dashboard-value-explanation__head small { flex: 0 0 auto; font-size: 0.56rem; opacity: 0.75; }
.dashboard-value-explanation__formula,
.dashboard-value-explanation__calculation,
.dashboard-value-explanation__note { margin: 0.45rem 0 0; }
.dashboard-value-explanation__calculation { font-weight: 700; overflow-wrap: anywhere; }
.dashboard-value-explanation__note { opacity: 0.78; font-size: 0.58rem; }
.dashboard-value-explanation__table-wrap { margin-top: 0.48rem; overflow-x: auto; }
.dashboard-value-explanation table { width: 100%; border-collapse: collapse; font-size: 0.58rem; }
.dashboard-value-explanation th,
.dashboard-value-explanation td {
    padding: 0.15rem 0.22rem;
    border-bottom: 1px solid rgba(168, 174, 188, 0.18);
    text-align: left;
    overflow-wrap: anywhere;
}
.dashboard-value-explanation thead th { color: #f4c663; }
html[data-theme="light"] .dashboard-value-explanation thead th { color: #76500d; }
.dashboard-value-explanation tbody th { font-weight: 550; }
.dashboard-value-explanation tbody td { font-weight: 700; text-align: right; }
.dashboard-value-explanation__actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.65rem; }
.dashboard-value-explanation__actions button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.55rem;
    border: 1px solid #d7aa49;
    border-radius: 0.5rem;
    color: #241906;
    background: #f3cb70;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}
.dashboard-value-explanation__actions button svg { width: 0.85rem; height: 0.85rem; }
.dashboard-value-explanation__actions button:is(:hover, :focus-visible) { background: #ffe4a2; outline-color: #a66c13; }

/* Action queue cards keep their status color, with a gold lower edge on
   hover or keyboard focus. */
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention__item {
    position: relative;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention__item::after {
    content: "";
    position: absolute;
    right: 0.45rem;
    bottom: 0;
    left: 0.45rem;
    height: 0.2rem;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(90deg, #b87916, #ffd879 50%, #b87916);
    box-shadow: 0 0 0.65rem rgba(236, 174, 60, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention__item:is(:hover, :focus-visible)::after {
    opacity: 1;
}

.dashboard-attention-preview {
    position: fixed;
    z-index: 20010;
    width: min(16rem, calc(100vw - 1rem));
    max-height: min(50vh, 16rem);
    overflow: auto;
    padding: 0.45rem;
    border: 1px solid #d7aa49;
    border-radius: 0.35rem;
    color: #eef3ff;
    background: #101827;
    box-shadow: 0 0.9rem 2.2rem rgba(0, 0, 0, 0.34);
    font-size: 0.59rem;
}

html[data-theme="light"] .dashboard-attention-preview {
    color: #1f2937;
    background: #fffaf0;
    box-shadow: 0 0.9rem 2.2rem rgba(60, 42, 9, 0.18);
}

.dashboard-attention-preview__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    color: #f4c663;
    font-size: 0.66rem;
}
html[data-theme="light"] .dashboard-attention-preview__head { color: #76500d; }
.dashboard-attention-preview__head span { font-weight: 750; }
.dashboard-attention-preview__table-wrap { margin-top: 0.5rem; overflow-x: auto; }
.dashboard-attention-preview table { width: 100%; border-collapse: collapse; font-size: 0.56rem; }
.dashboard-attention-preview th,
.dashboard-attention-preview td {
    padding: 0.13rem 0.2rem;
    border-bottom: 1px solid rgba(168, 174, 188, 0.2);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}
.dashboard-attention-preview thead th { color: #f4c663; font-weight: 750; }
html[data-theme="light"] .dashboard-attention-preview thead th { color: #76500d; }
.dashboard-attention-preview tbody th { font-weight: 650; }
.dashboard-attention-preview__note { margin: 0.32rem 0 0; opacity: 0.78; font-size: 0.56rem; line-height: 1.3; }
.dashboard-attention-preview__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.dashboard-attention-preview__actions a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #f4c663;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.15rem;
}
html[data-theme="light"] .dashboard-attention-preview__actions a { color: #76500d; }
.dashboard-attention-preview__actions a svg { width: 0.78rem; height: 0.78rem; }
.dashboard-attention-preview__tools { display: flex; gap: 0.3rem; }
.dashboard-attention-preview__tools button {
    display: inline-grid;
    place-items: center;
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    border: 1px solid #d7aa49;
    border-radius: 0.45rem;
    color: #241906;
    background: #f3cb70;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}
.dashboard-attention-preview__tools button svg { width: 0.85rem; height: 0.85rem; }
.dashboard-attention-preview__tools button:is(:hover, :focus-visible) { background: #ffe4a2; outline-color: #a66c13; }
.dashboard-attention-preview__tools button:disabled { cursor: not-allowed; opacity: 0.5; }
.dashboard-value-explanation .dashboard-hover-close,
.dashboard-attention-preview .dashboard-hover-close {
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: 1px solid #d65a5a;
    border-radius: 0.22rem;
    background: #b91c1c;
    color: #fff;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
}
.dashboard-value-explanation .dashboard-hover-close:is(:hover, :focus-visible),
.dashboard-attention-preview .dashboard-hover-close:is(:hover, :focus-visible) { background: #dc2626; }
.dashboard-hover-copy-feedback {
    align-self: center;
    padding: 0.18rem 0.35rem;
    border-radius: 0.2rem;
    color: #fff;
    background: #22714e;
    border: 1px solid #9be0b6;
    box-shadow: 0 0.2rem 0.6rem rgba(0, 0, 0, 0.28);
    font-size: 0.56rem;
    font-weight: 700;
    opacity: 0;
    transition: opacity 120ms ease;
    pointer-events: none;
}
.dashboard-hover-copy-feedback.is-visible { opacity: 1; }
html[data-theme] body .admin-edit-modal__header .icon-button {
    color: #fff;
    background: #b91c1c;
    border-color: #dc3545;
}
html[data-theme] body .admin-edit-modal__header .icon-button:is(:hover, :focus-visible) {
    color: #fff;
    background: #dc2626;
    border-color: #f87171;
}
.tenant-context-policy__form { display: grid; gap: 1rem; margin-top: 1rem; padding: 1.1rem; }
.tenant-context-policy__checks,
.tenant-context-policy__numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.7rem; }
.tenant-context-policy__check { display: flex; align-items: flex-start; gap: 0.55rem; padding: 0.7rem; border: 1px solid var(--line, #384560); border-radius: 0.55rem; }
.tenant-context-policy__check span { display: grid; gap: 0.2rem; }
.tenant-context-policy__check small { opacity: 0.72; }
.tenant-context-policy__numbers label { display: grid; gap: 0.3rem; }
.tenant-context-policy__numbers input { width: 100%; padding: 0.55rem; border: 1px solid var(--line, #384560); border-radius: 0.4rem; color: inherit; background: var(--surface, #101827); }
.tenant-context-policy__form > .primary-button { justify-self: start; }

/* Carry the landing workflow's gold hover cue through workspace flash cards.
   Keep status accents and the Enterprise Value cards' full-gold surface. */
html[data-theme] body #appContent [data-foundation-flash-rail="true"]:not([data-foundation-action-rail="true"]) > [data-foundation-flash-card="true"]:is(:hover, :focus-within) {
    border-color: #d6a528 !important;
    box-shadow:
        inset 0 -0.2rem 0 #d6a528,
        0 0 0 1px rgba(244, 193, 63, 0.24),
        0 0.72rem 1.55rem rgba(188, 132, 21, 0.25) !important;
}

html[data-theme="dark"] body #appContent [data-foundation-flash-rail="true"]:not([data-foundation-action-rail="true"]) > [data-foundation-flash-card="true"]:not(.dashboard-mini-card):not(.dashboard-attention__item):is(:hover, :focus-within) {
    background: linear-gradient(135deg, #272312, #111723 76%) !important;
}

html[data-theme="light"] body #appContent [data-foundation-flash-rail="true"]:not([data-foundation-action-rail="true"]) > [data-foundation-flash-card="true"]:not(.dashboard-mini-card):not(.dashboard-attention__item):is(:hover, :focus-within) {
    background: linear-gradient(135deg, #fff1ca, #ffffff 76%) !important;
}

/* The Enterprise Value surface retains its existing full-gold highlight. */
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--overview.dashboard-flash-group--value [data-foundation-flash-rail="true"] > .dashboard-mini-card:is(:hover, :focus-within) {
    background: linear-gradient(135deg, #ffe7a0 0%, #e9b844 58%, #d99b2a 100%) !important;
    color: #241906 !important;
}

/* Profile-only flash rail: five readable, compact cards fit the drawer width. */
html[data-theme] body[data-foundation-flash-rails-ready="1"] .user-profile-popup-window .topbar-profile-popup__stats[data-foundation-flash-rail="true"] {
    gap: 0.28rem !important;
    padding: 0.12rem 0 0.2rem !important;
}

html[data-theme] body[data-foundation-flash-rails-ready="1"] .user-profile-popup-window .topbar-profile-popup__stats[data-foundation-flash-rail="true"] > .metric-card {
    display: grid !important;
    grid-template-areas: "top" "body" !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 1.25rem minmax(0, 1fr) !important;
    align-content: center !important;
    gap: 0.08rem !important;
    flex: 0 0 5.65rem !important;
    width: 5.65rem !important;
    min-width: 5.65rem !important;
    max-width: 5.65rem !important;
    min-height: 3.55rem !important;
    max-height: 3.55rem !important;
    padding: 0.24rem 0.32rem !important;
    border-radius: 0.62rem !important;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup__stats.summary-cards > .metric-card.metric-card--compact > .metric-card__top {
    grid-area: top !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 1.25rem !important;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup__stats.summary-cards > .metric-card.metric-card--compact > .metric-card__top > .metric-card__icon {
    width: 1.23rem !important;
    min-width: 1.23rem !important;
    height: 1.23rem !important;
    min-height: 1.23rem !important;
    border-radius: 0.36rem !important;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup__stats .metric-card__icon svg {
    width: 0.84rem !important;
    height: 0.84rem !important;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup__stats.summary-cards > .metric-card.metric-card--compact > .metric-card__top > .metric-card__info {
    top: 0 !important;
    right: 0 !important;
    width: 1.28rem !important;
    min-width: 1.28rem !important;
    height: 1.28rem !important;
    min-height: 1.28rem !important;
    padding: 0 !important;
    font-size: 0.64rem !important;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup__stats.summary-cards > .metric-card.metric-card--compact > .metric-card__body {
    grid-area: body !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 0.08rem !important;
    min-width: 0 !important;
    padding: 0 !important;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup__stats .metric-card__value,
html[data-theme] body .user-profile-popup-window .topbar-profile-popup__stats .metric-card__label {
    display: block !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
    line-height: 1.1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup__stats .metric-card__value {
    order: 0;
    font-size: 0.78rem !important;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup__stats .metric-card__label {
    order: 1;
    font-size: 0.56rem !important;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup__stats .metric-card__footer {
    display: none !important;
}

/* Match the profile drawer's chrome to the smaller flash cards. */
html[data-theme] body .user-profile-popup-window .popup-window__head #popupWindowClose,
html[data-theme] body .user-profile-popup-window .popup-window__scroll-button {
    flex: 0 0 1.75rem !important;
    width: 1.75rem !important;
    min-width: 1.75rem !important;
    height: 1.75rem !important;
    min-height: 1.75rem !important;
    padding: 0 !important;
}

html[data-theme] body .user-profile-popup-window #popupWindowClose { font-size: 1.18rem !important; }
html[data-theme] body .user-profile-popup-window .popup-window__scroll-button svg {
    width: 0.9rem !important;
    height: 0.9rem !important;
}
html[data-theme] body .user-profile-popup-window .popup-window__scroll-nav {
    right: 0.7rem;
    bottom: 0.7rem;
    gap: 0.25rem;
    padding: 0.28rem;
}

/* Keep profile labels, controls, and settings tabs within a short drawer. */
html[data-theme] body .user-profile-popup-window .popup-window__head {
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
    min-height: 2.9rem;
    padding: 0.4rem 0.75rem;
}

html[data-theme] body .user-profile-popup-window .popup-window__head-main {
    display: flex;
    flex: 1 1 auto;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.1rem 0.45rem;
}

html[data-theme] body .user-profile-popup-window .popup-window__head-main .eyebrow {
    margin: 0;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
}

html[data-theme] body .user-profile-popup-window .popup-window__head h3 {
    margin: 0;
    font-size: 0.96rem;
}

html[data-theme] body .user-profile-popup-window .popup-window__body {
    padding: 0.55rem 0.7rem 0.8rem;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup {
    gap: 0.45rem;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup .topbar-popup-card {
    padding: 0.6rem 0.7rem;
    gap: 0.4rem;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup .eyebrow {
    margin: 0;
    font-size: 0.6rem;
    letter-spacing: 0.08em;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup .table-head h3,
html[data-theme] body .user-profile-popup-window .topbar-profile-popup__account h3 {
    margin: 0.12rem 0 0;
    font-size: 0.95rem;
    line-height: 1.18;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup .muted-copy {
    margin: 0.2rem 0 0;
    font-size: 0.7rem;
    line-height: 1.3;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup__tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.25rem;
    padding: 0.2rem;
    border-radius: 0.65rem;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup__tabs--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup__tab {
    min-width: 0;
    min-height: 2rem;
    padding: 0.28rem 0.4rem;
    gap: 0.3rem;
    border-radius: 0.5rem;
    font-size: 0.73rem;
    line-height: 1.1;
    white-space: nowrap;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup__tab svg {
    flex: none;
    width: 0.82rem;
    height: 0.82rem;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup__tab[data-profile-tab="voice"] svg {
    color: #9b67ed;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup__tab[data-profile-tab="time"] svg {
    color: #25a8a0;
    width: 0.94rem;
    height: 0.94rem;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup .topbar-profile-popup__identity {
    padding: 0.45rem 0.5rem;
}

html[data-theme] body .user-profile-popup-window .profile-identity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem;
}

html[data-theme] body .user-profile-popup-window .profile-identity-grid > .profile-identity-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    min-height: 2.45rem;
    padding: 0.33rem 0.43rem;
    border: 1px solid color-mix(in srgb, var(--profile-icon-color) 22%, var(--border));
    border-radius: 0.55rem;
    background: color-mix(in srgb, var(--profile-icon-color) 5%, var(--panel));
    box-shadow: none;
}

html[data-theme] body .user-profile-popup-window .profile-identity-item--wide {
    grid-column: 1 / -1;
}

html[data-theme] body .user-profile-popup-window .profile-identity-item__icon {
    display: grid;
    flex: 0 0 1.55rem;
    place-items: center;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 0.42rem;
    color: var(--profile-icon-color);
    background: color-mix(in srgb, var(--profile-icon-color) 14%, transparent);
}

html[data-theme] body .user-profile-popup-window .profile-identity-item__icon svg {
    width: 0.9rem;
    height: 0.9rem;
}

html[data-theme] body .user-profile-popup-window .profile-identity-item__content {
    min-width: 0;
}

html[data-theme] body .user-profile-popup-window .profile-identity-item .detail-item__label {
    margin: 0;
    font-size: 0.6rem;
    line-height: 1.1;
}

html[data-theme] body .user-profile-popup-window .profile-identity-item .detail-item__value {
    margin: 0.12rem 0 0;
    font-size: 0.78rem;
    line-height: 1.15;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup__tab-panel {
    gap: 0.45rem;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup__voice-icon {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 0.5rem;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup__voice-icon svg {
    width: 0.82rem;
    height: 0.82rem;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup :is(.primary-button, .toolbar-button) svg {
    flex: none;
    width: 0.8rem;
    height: 0.8rem;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-popup__action .toolbar-button__icon {
    width: 0.8rem;
    height: 0.8rem;
}

@media (max-width: 28rem) {
    html[data-theme] body .user-profile-popup-window .topbar-profile-popup__tab {
        padding-inline: 0.2rem;
        gap: 0.18rem;
        font-size: 0.68rem;
    }

    html[data-theme] body .user-profile-popup-window .profile-identity-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Compact the paired left/right controls on scrollable tables and flash rails. */
html[data-theme] body .table-scroll-nav__button,
html[data-theme] body .foundation-flash-rail-nav__button,
html[data-theme] body #appContent [data-dashboard-flash-nav],
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--overview .dashboard-flash-group__nav {
    box-sizing: border-box !important;
    width: 1.75rem !important;
    min-width: 1.75rem !important;
    max-width: 1.75rem !important;
    height: 1.75rem !important;
    min-height: 1.75rem !important;
    max-height: 1.75rem !important;
    aspect-ratio: 1 / 1 !important;
    padding: 0 !important;
    border-radius: 50% !important;
}

html[data-theme] body :is(.table-scroll-nav__button, .foundation-flash-rail-nav__button) svg,
html[data-theme] body #appContent [data-dashboard-flash-nav] svg {
    width: 0.72rem !important;
    height: 0.72rem !important;
}

/* Dashboard KPI rails: transparent frames, compact type, and small triangle arrows. */
html[data-theme] body #appContent[data-view-kind="dashboard"] :is(.dashboard-attention--top-row, .dashboard-flash-group--value) {
    background: transparent !important;
    border-color: color-mix(in srgb, var(--ds-border) 45%, transparent) !important;
    box-shadow: none !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention--top-row .dashboard-attention__grid {
    grid-template-columns: repeat(8, minmax(7.6rem, 1fr)) !important;
    grid-auto-rows: minmax(2.6rem, auto) !important;
    gap: 0.3rem !important;
    padding: 0.04rem 0.04rem 0.22rem !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention--top-row .dashboard-attention__grid > .dashboard-attention__item {
    min-height: 2.6rem !important;
    padding: 0.3rem 0.38rem !important;
    gap: 0.25rem !important;
    grid-template-columns: 0.95rem minmax(0, 1fr) 0.45rem !important;
    border-color: color-mix(in srgb, var(--ds-border) 55%, transparent) !important;
    border-radius: 0.55rem !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention--top-row .dashboard-attention__item:is(:hover, :focus-visible) {
    background: color-mix(in srgb, var(--ds-primary) 7%, transparent) !important;
    box-shadow: none !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention--top-row .dashboard-attention__icon svg {
    width: 0.82rem !important;
    height: 0.82rem !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention--top-row .dashboard-attention__item strong {
    font-size: 0.88rem !important;
    line-height: 1 !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention--top-row .dashboard-attention__item small {
    margin-top: 0.08rem !important;
    font-size: 0.6rem !important;
    line-height: 1.1 !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--value .dashboard-flash-group__grid {
    gap: 0.3rem !important;
    padding-block: 0.15rem !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--overview.dashboard-flash-group--value .dashboard-mini-card {
    flex-basis: clamp(6rem, 6.3vw, 6.8rem) !important;
    min-width: 6rem !important;
    max-width: 6.8rem !important;
    min-height: 3.1rem !important;
    grid-template-columns: 1.1rem minmax(0, 1fr) !important;
    gap: 0.24rem !important;
    padding: 0.28rem 0.35rem !important;
    border-color: color-mix(in srgb, var(--ds-border) 55%, transparent) !important;
    border-radius: 0.58rem !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--overview.dashboard-flash-group--value .dashboard-mini-card::before,
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--overview.dashboard-flash-group--value .dashboard-mini-card::after {
    display: none !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--overview.dashboard-flash-group--value .dashboard-mini-card:is(:hover, :focus-within, :focus-visible) {
    color: var(--ds-text) !important;
    background: color-mix(in srgb, var(--dashboard-card-accent) 8%, transparent) !important;
    box-shadow: none !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--overview.dashboard-flash-group--value .dashboard-mini-card:is(:hover, :focus-within, :focus-visible) :is(.dashboard-mini-card__label, .dashboard-mini-card__value, .dashboard-mini-card__footer) {
    color: var(--ds-text) !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--value .dashboard-mini-card__top,
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--value .dashboard-mini-card__icon {
    width: 1.1rem !important;
    height: 1.1rem !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--value .dashboard-mini-card__icon svg {
    width: 0.78rem !important;
    height: 0.78rem !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--value .dashboard-mini-card__label {
    font-size: 0.52rem !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--value .dashboard-mini-card__value {
    font-size: 0.78rem !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group--value .dashboard-mini-card__footer {
    -webkit-line-clamp: 1 !important;
    font-size: 0.52rem !important;
    line-height: 1.1 !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] :is(.dashboard-attention--top-row .dashboard-attention__nav, .dashboard-flash-group--value .dashboard-flash-group__nav) {
    width: 1.5rem !important;
    min-width: 1.5rem !important;
    max-width: 1.5rem !important;
    height: 1.5rem !important;
    min-height: 1.5rem !important;
    max-height: 1.5rem !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: var(--ds-primary, #8da2fb) !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] :is(.dashboard-attention--top-row .dashboard-attention__nav, .dashboard-flash-group--value .dashboard-flash-group__nav):is(:hover, :focus-visible) {
    color: var(--ds-text) !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] :is(.dashboard-attention--top-row .dashboard-attention__nav, .dashboard-flash-group--value .dashboard-flash-group__nav) svg,
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention--top-row .dashboard-attention__arrow svg {
    display: none !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] :is(.dashboard-attention--top-row .dashboard-attention__nav, .dashboard-flash-group--value .dashboard-flash-group__nav)::before,
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention--top-row .dashboard-attention__arrow::before {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-top: 0.22rem solid transparent;
    border-bottom: 0.22rem solid transparent;
    border-left: 0.32rem solid currentColor;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] :is(.dashboard-attention--top-row .dashboard-attention__nav--previous, .dashboard-flash-group--value .dashboard-flash-group__nav--previous)::before {
    border-left: 0;
    border-right: 0.32rem solid currentColor;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention--top-row .dashboard-attention__arrow::before {
    border-top-width: 0.17rem;
    border-bottom-width: 0.17rem;
    border-left-width: 0.24rem;
}

/* Shared, data-driven allowance chart for the profile and detail views. */
.token-usage-ring {
    --token-chart-used: #c9364c;
    --token-chart-track: #16845d;
    position: relative;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 4.2rem;
    aspect-ratio: 1;
    border-radius: 50%;
    color: var(--token-chart-ink, var(--text));
    background: conic-gradient(var(--token-chart-used) 0 var(--token-usage-percent, 0%), var(--token-chart-track) 0 100%);
}

.token-usage-ring::before {
    content: "";
    position: absolute;
    inset: 0.46rem;
    border-radius: 50%;
    background: var(--token-chart-surface, var(--panel));
}

.token-usage-ring > strong {
    position: relative;
    z-index: 1;
    font-size: 0.8rem;
    line-height: 1;
}

.token-usage-ring.is-unlimited {
    --token-chart-track: color-mix(in srgb, var(--text-muted) 28%, transparent);
}

.token-usage-chart {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.token-usage-chart__key {
    display: grid;
    gap: 0.23rem;
    min-width: 0;
    color: var(--token-chart-ink, var(--text));
    font-size: 0.7rem;
}

.token-usage-chart__key > span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.token-usage-chart__swatch {
    display: inline-block;
    flex: 0 0 0.52rem;
    width: 0.52rem;
    height: 0.52rem;
    border-radius: 0.15rem;
    background: #c9364c;
}

.token-usage-chart__swatch--remaining {
    background: #16845d;
}

html[data-theme="dark"] body .token-usage-ring {
    --token-chart-used: #fb7185;
    --token-chart-track: #4adea4;
}

html[data-theme="dark"] body .token-usage-ring.is-unlimited {
    --token-chart-track: color-mix(in srgb, var(--text-muted) 28%, transparent);
}

html[data-theme="dark"] body .token-usage-chart__swatch {
    background: #fb7185;
}

html[data-theme="dark"] body .token-usage-chart__swatch--remaining {
    background: #4adea4;
}

html[data-theme] body .user-profile-popup-window .token-usage-chart--profile {
    padding: 0.25rem 0 0;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-channel-breakdown {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-channel-breakdown__item {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    min-width: 0;
    min-height: 1.8rem;
    padding: 0.24rem 0.45rem;
    border: 1px solid color-mix(in srgb, var(--channel-accent) 32%, var(--border));
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--channel-accent) 6%, var(--panel));
    color: var(--text-muted);
    font-size: 0.68rem;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-channel-breakdown__item--chat {
    --channel-accent: #7099e8;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-channel-breakdown__item--voice {
    --channel-accent: #b48add;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-channel-breakdown__item i {
    display: grid;
    flex: none;
    place-items: center;
    color: var(--channel-accent);
    font-style: normal;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-channel-breakdown__item svg {
    width: 0.83rem;
    height: 0.83rem;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-channel-breakdown__item strong {
    margin-left: auto;
    color: var(--channel-accent);
    font-size: 0.72rem;
}

html[data-theme] body .user-profile-popup-window .token-usage-chart--profile .token-usage-ring {
    width: 3.5rem;
}

html[data-theme] body .user-profile-popup-window .token-usage-chart--profile .token-usage-ring::before {
    inset: 0.38rem;
}

html[data-theme] body .user-profile-popup-window .token-usage-chart--profile .token-usage-ring > strong {
    font-size: 0.68rem;
}

/* Small profile usage cards keep their numbers prominent and reveal context on hover. */
html[data-theme] body .user-profile-popup-window .topbar-profile-usage-card {
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-usage-card--used {
    --profile-usage-accent: #c9364c;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-usage-card--remaining {
    --profile-usage-accent: #16845d;
}

html[data-theme="dark"] body .user-profile-popup-window .topbar-profile-usage-card--used {
    --profile-usage-accent: #fb7185;
}

html[data-theme="dark"] body .user-profile-popup-window .topbar-profile-usage-card--remaining {
    --profile-usage-accent: #4adea4;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-usage-card:is(.topbar-profile-usage-card--used, .topbar-profile-usage-card--remaining) > strong {
    color: var(--profile-usage-accent);
}

html[data-theme] body .user-profile-popup-window .topbar-profile-usage-card--usage {
    --profile-usage-accent: #a57aea;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-usage-card--requests {
    --profile-usage-accent: #d5a44b;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-usage-card__label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-usage-card__icon {
    display: grid;
    flex: 0 0 1.22rem;
    place-items: center;
    width: 1.22rem;
    height: 1.22rem;
    border-radius: 0.34rem;
    color: var(--profile-usage-accent);
    background: color-mix(in srgb, var(--profile-usage-accent) 15%, transparent);
    font-style: normal;
}

html[data-theme] body .user-profile-popup-window .topbar-profile-usage-card__icon svg {
    width: 0.77rem;
    height: 0.77rem;
}

@media (hover: hover) {
    html[data-theme] body .user-profile-popup-window .topbar-profile-usage-card:hover {
        transform: translateY(-2px);
        border-color: color-mix(in srgb, var(--profile-usage-accent) 65%, var(--border));
        background: color-mix(in srgb, var(--profile-usage-accent) 8%, var(--panel));
        box-shadow: 0 6px 16px color-mix(in srgb, var(--profile-usage-accent) 14%, transparent);
    }
}

@media (prefers-reduced-motion: reduce) {
    html[data-theme] body .user-profile-popup-window .topbar-profile-usage-card {
        transition: none;
    }
}

/* Both administrator rails use the same compact geometry and restrained brand accents. */
html[data-theme] body .sidebar .nav-group[data-nav-group="admin"] {
    --admin-nav-accent: #78aaf5;
}

html[data-theme] body .sidebar .nav-group[data-nav-group="super_admin"] {
    --admin-nav-accent: #dfb963;
}

html[data-theme] body .sidebar .nav-group:is([data-nav-group="admin"], [data-nav-group="super_admin"]) .nav-group__toggle {
    grid-template-columns: 1.75rem minmax(0, 1fr) 0.8rem !important;
    gap: 0.48rem;
    min-height: 2.95rem;
    padding: 0.43rem 0.52rem;
    border-color: color-mix(in srgb, var(--admin-nav-accent) 32%, var(--shell-border));
    border-radius: 0.72rem;
    background: color-mix(in srgb, var(--admin-nav-accent) 6%, var(--shell-surface));
}

html[data-theme] body .sidebar .nav-group:is([data-nav-group="admin"], [data-nav-group="super_admin"]) .nav-group__items {
    border-left-color: color-mix(in srgb, var(--admin-nav-accent) 45%, var(--shell-border));
}

html[data-theme] body .sidebar .nav-group:is([data-nav-group="admin"], [data-nav-group="super_admin"]) .nav-link--child {
    grid-template-columns: 1.75rem minmax(0, 1fr);
    gap: 0.48rem;
    min-height: 2.55rem;
    padding: 0.35rem 0.5rem;
    border-radius: 0.68rem;
    background: color-mix(in srgb, var(--admin-nav-accent) 3%, var(--shell-surface));
}

html[data-theme] body .sidebar .nav-group:is([data-nav-group="admin"], [data-nav-group="super_admin"]) :is(.nav-group__toggle, .nav-link--child) .nav-link__icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.54rem;
    color: var(--admin-nav-accent);
    box-shadow: none;
}

html[data-theme] body .sidebar .nav-group:is([data-nav-group="admin"], [data-nav-group="super_admin"]) :is(.nav-group__toggle, .nav-link--child) .nav-link__icon svg {
    width: 1rem;
    height: 1rem;
    stroke-width: 1.8;
}

html[data-theme="light"] body .sidebar .nav-group:is([data-nav-group="admin"], [data-nav-group="super_admin"]) :is(.nav-group__toggle, .nav-link--child):not(.active) .nav-link__icon {
    color: var(--admin-nav-accent) !important;
}

html[data-theme] body .sidebar .nav-group:is([data-nav-group="admin"], [data-nav-group="super_admin"]) .nav-link__label strong {
    font-size: 0.78rem;
}

html[data-theme] body .sidebar .nav-group:is([data-nav-group="admin"], [data-nav-group="super_admin"]) .nav-link__label .muted-copy {
    font-size: 0.59rem;
}

html[data-theme] body .sidebar .nav-group:is([data-nav-group="admin"], [data-nav-group="super_admin"]) :is(.nav-group__toggle, .nav-link--child):hover {
    border-color: color-mix(in srgb, var(--admin-nav-accent) 54%, var(--shell-border));
}

html[data-theme] body .sidebar .nav-group:is([data-nav-group="admin"], [data-nav-group="super_admin"]) .nav-link--child.active {
    border-color: color-mix(in srgb, var(--admin-nav-accent) 60%, var(--shell-border)) !important;
    background: color-mix(in srgb, var(--admin-nav-accent) 15%, var(--shell-surface)) !important;
    box-shadow: inset 0.18rem 0 0 var(--admin-nav-accent);
}

html[data-theme] body .app-shell.sidebar-collapsed .sidebar .nav-group:is([data-nav-group="admin"], [data-nav-group="super_admin"]) :is(.nav-group__toggle, .nav-link--child) {
    grid-template-columns: 1fr !important;
    min-height: 2.6rem;
    padding: 0.38rem;
}

/* Agentic sidebar: history owns the available height; secondary copy lives in help. */
html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-history-panel {
    gap: 0.35rem !important;
    padding: 0.55rem !important;
    min-height: 0;
    overflow-y: auto;
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-history-tree {
    flex: 1 1 0 !important;
    min-height: 4rem !important;
    max-height: none !important;
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-history-panel__section-label {
    flex: 0 0 auto;
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-sidebar-summary {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    margin: 0;
    padding: 0.35rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: 0.55rem;
    background: color-mix(in srgb, var(--surface) 65%, transparent);
    color: var(--text);
    line-height: 1.25;
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-sidebar-summary__icon {
    display: grid;
    flex: 0 0 1.45rem;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    color: var(--brand);
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-sidebar-summary__icon svg {
    width: 1.05rem;
    height: 1.05rem;
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-voice-card .agentic-sidebar-summary__icon {
    color: #a78bea;
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-safety-card .agentic-sidebar-summary__icon {
    color: var(--success);
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-sidebar-summary__copy {
    flex: 1 1 auto;
    min-width: 0;
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-sidebar-summary__copy strong {
    display: block;
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.3;
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-sidebar-summary__copy small {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.67rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] :is(.agentic-sidebar-info, .agentic-sidebar-summary__action) {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 1.5rem;
    padding: 0.2rem 0.45rem;
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.7rem;
    line-height: 1;
    cursor: pointer;
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-sidebar-info {
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border-radius: 50%;
    color: var(--muted);
    font-weight: 750;
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] :is(.agentic-sidebar-info, .agentic-sidebar-summary__action):is(:hover, :focus-visible) {
    border-color: var(--brand);
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 10%, var(--surface));
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] :is(.agentic-sidebar-info, .agentic-sidebar-summary__action):focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-sidebar-summary__action:disabled {
    opacity: 0.55;
    cursor: wait;
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] .is-history-collapsed .agentic-history-panel__section-label {
    display: none;
}

.agentic-sidebar-tooltip {
    position: fixed;
    z-index: 20000;
    box-sizing: border-box;
    width: max-content;
    max-width: min(20rem, calc(100vw - 1rem));
    max-height: calc(100dvh - 1rem);
    overflow-y: auto;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--border-strong);
    border-radius: 0.65rem;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 8px 28px rgb(0 0 0 / 22%);
    font-family: var(--easyclick-font-sans-ui, sans-serif);
    font-size: 0.78rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.agentic-sidebar-tooltip[hidden] {
    display: none;
}

/* Microphone state remains visible without pulsing, spinning or fading. */
html[data-theme] body :is(.agentic-voice-button, .agentic-wake-button, .agentic-voice-toolbar__status, .agentic-composer__status),
html[data-theme] body :is(.agentic-voice-button, .agentic-wake-button, .agentic-voice-toolbar__status) :is(svg, span),
html[data-theme] body .agentic-history-panel__rail-action[data-agentic-voice],
html[data-theme] body .agentic-history-panel__rail-action[data-agentic-voice] svg {
    animation: none !important;
    transition: none !important;
}

html[data-theme] body :is(.agentic-voice-button, .agentic-wake-button, .agentic-voice-toolbar__status)::before,
html[data-theme] body :is(.agentic-voice-button, .agentic-wake-button, .agentic-voice-toolbar__status)::after {
    animation: none !important;
    transition: none !important;
}

/* Keep a labelled Stop control visible when HITL pauses for the next approval. */
.agentic-progress-fab-shell.is-in-workspace {
    bottom: var(--agentic-composer-offset, 8rem);
    right: 1rem;
    max-width: min(22rem, calc(100vw - 2rem));
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-composer {
    grid-template-areas:
        'status notice'
        'attachments attachments'
        'execution execution'
        'input input';
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-composer__execution-controls {
    grid-area: execution;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.73rem;
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-execution-stop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2rem;
    padding: 0.3rem 0.65rem;
    border: 1px solid color-mix(in srgb, var(--danger, #df6579) 60%, var(--border));
    border-radius: 0.55rem;
    color: var(--danger, #df6579);
    background: color-mix(in srgb, var(--danger, #df6579) 10%, var(--surface));
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-execution-stop:is(:hover, :focus-visible) {
    outline: 2px solid var(--danger, #df6579);
    outline-offset: 2px;
}

html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-execution-stop:disabled {
    opacity: 0.65;
    cursor: wait;
}

@media (max-width: 56.25rem) {
    html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-composer {
        grid-template-areas: 'status' 'attachments' 'execution' 'input' 'notice';
        grid-template-columns: minmax(0, 1fr);
    }

    html[data-theme] body .app-shell[data-view-kind="agentic_network"] .agentic-workspace:not(.is-history-collapsed) .agentic-history-panel {
        height: clamp(22rem, 55dvh, 30rem);
        max-height: none;
    }
}

/* Dashboard summary cards share the VM inventory palette and quiet hover.
   Keep this after the legacy gold/semantic rail skins. Include the top Action
   Queue, while excluding charts, navigation buttons, and other workspaces. */
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group[data-dashboard-flash-scope] .dashboard-flash-group__grid > .dashboard-mini-card,
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__grid > .dashboard-attention__item {
    border: 1px solid var(--panel-border) !important;
    border-radius: 0.8rem !important;
    background: var(--ds-surface-raised, var(--panel)) !important;
    color: var(--text) !important;
    box-shadow: none !important;
    transform: none !important;
    transition: border-color 150ms ease, background-color 150ms ease !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group[data-dashboard-flash-scope] .dashboard-flash-group__grid > .dashboard-mini-card:is(:hover, :focus-within, :focus-visible),
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__grid > .dashboard-attention__item:is(:hover, :focus-within, :focus-visible) {
    border-color: var(--ds-primary, #8697ff) !important;
    background: var(--ds-surface-hover, var(--panel)) !important;
    color: var(--text) !important;
    box-shadow: none !important;
    transform: none !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group[data-dashboard-flash-scope] .dashboard-flash-group__grid > .dashboard-mini-card:focus-visible,
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__grid > .dashboard-attention__item:focus-visible {
    outline: 2px solid var(--ds-primary, #8697ff) !important;
    outline-offset: 2px;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group[data-dashboard-flash-scope] .dashboard-flash-group__grid > .dashboard-mini-card .dashboard-mini-card__icon,
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__grid > .dashboard-attention__item .dashboard-attention__icon {
    color: var(--ds-primary, #8697ff) !important;
    border: 1px solid var(--panel-border) !important;
    border-radius: 0.4rem !important;
    background: var(--panel) !important;
    box-shadow: none !important;
    filter: none !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group[data-dashboard-flash-scope] .dashboard-flash-group__grid > .dashboard-mini-card .dashboard-mini-card__icon svg,
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__grid > .dashboard-attention__item .dashboard-attention__icon svg {
    color: inherit !important;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group[data-dashboard-flash-scope] .dashboard-flash-group__grid > .dashboard-mini-card .dashboard-mini-card__value,
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group[data-dashboard-flash-scope] .dashboard-flash-group__grid > .dashboard-mini-card:is(:hover, :focus-within, :focus-visible) .dashboard-mini-card__value,
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__grid > .dashboard-attention__item strong,
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__grid > .dashboard-attention__item:is(:hover, :focus-within, :focus-visible) strong {
    color: var(--text) !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group[data-dashboard-flash-scope] .dashboard-flash-group__grid > .dashboard-mini-card :is(.dashboard-mini-card__label, .dashboard-mini-card__footer),
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group[data-dashboard-flash-scope] .dashboard-flash-group__grid > .dashboard-mini-card:is(:hover, :focus-within, :focus-visible) :is(.dashboard-mini-card__label, .dashboard-mini-card__footer),
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__grid > .dashboard-attention__item small,
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__grid > .dashboard-attention__item:is(:hover, :focus-within, :focus-visible) small {
    color: var(--text-soft) !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__grid > .dashboard-attention__item::before,
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__grid > .dashboard-attention__item::after {
    content: none !important;
}

@media (prefers-reduced-motion: reduce) {
    html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-flash-group[data-dashboard-flash-scope] .dashboard-flash-group__grid > .dashboard-mini-card,
    html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__grid > .dashboard-attention__item {
        transition: none !important;
    }
}

/* Match the Action Queue's vertical size to the regular summary cards. */
html[data-theme] body #appContent .vm-inventory-stat,
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__grid > .dashboard-attention__item {
    min-height: 3.65rem !important;
    max-height: none !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__grid {
    grid-auto-rows: minmax(3.65rem, auto) !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__grid > .dashboard-attention__item {
    padding-block: 0.7rem !important;
    align-items: center !important;
}

/* Status cards keep the entire surface clickable without a trailing arrow. */
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__grid > .dashboard-attention__item {
    grid-template-columns: 1.65rem minmax(0, 1fr) !important;
    column-gap: 0.4rem !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__item > .dashboard-attention__arrow {
    display: none !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__item strong {
    font-size: 1rem !important;
    line-height: 1.1 !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__item small {
    font-size: 0.68rem !important;
    line-height: 1.2 !important;
}

/* Larger status-card icons without changing card height or text sizing. */
html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__grid > .dashboard-attention__item .dashboard-attention__icon {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 1.65rem !important;
    min-width: 1.65rem !important;
    height: 1.65rem !important;
    padding: 0 !important;
}

html[data-theme] body #appContent[data-view-kind="dashboard"] .dashboard-attention.dashboard-attention--top-row .dashboard-attention__grid > .dashboard-attention__item .dashboard-attention__icon svg {
    width: 1.2rem !important;
    height: 1.2rem !important;
}
/* vCenter diagnostics: aligned form rows and the compact icon/copy header. */
html[data-theme] body #appContent .tshoot-vcenter-shell {
    container: vcenter-form / inline-size;
    gap: 0.8rem !important;
    min-width: 0;
}
html[data-theme] body #appContent .tshoot-vcenter-page-header {
    display: flex !important;
    align-items: center;
    gap: 0.7rem;
    padding: 0.25rem 0 0.55rem;
    margin: 0 !important;
}
html[data-theme] body #appContent .tshoot-vcenter-page-header > div {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}
html[data-theme] body #appContent .tshoot-vcenter-page-header__icon {
    display: grid;
    place-items: center;
    flex: 0 0 2.2rem;
    width: 2.2rem;
    height: 2.2rem;
    color: var(--ds-primary, #8697ff);
}
html[data-theme] body #appContent .tshoot-vcenter-page-header__icon svg {
    width: 1.7rem;
    height: 1.7rem;
}
html[data-theme] body #appContent .tshoot-vcenter-page-header h3 {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    color: var(--text) !important;
}
html[data-theme] body #appContent .tshoot-vcenter-page-header .muted-copy {
    display: block !important;
    margin: 0 !important;
    color: var(--text-soft) !important;
    font-size: 0.78rem !important;
    font-weight: 400 !important;
    line-height: 1.4;
    text-transform: none !important;
    letter-spacing: normal !important;
}
html[data-theme] body #appContent #tshootVcenterForm { gap: 0.8rem !important; }
html[data-theme] body #appContent #tshootVcenterForm > section:not(.tshoot-savebar) {
    display: grid;
    gap: 0.65rem;
    padding: 0.8rem !important;
    border: 1px solid var(--panel-border) !important;
    border-radius: 0.8rem !important;
    background: var(--ds-surface-raised, var(--panel)) !important;
    box-shadow: none !important;
    min-width: 0;
}
html[data-theme] body #appContent #tshootVcenterForm .tshoot-section-heading {
    margin: 0 !important;
    padding: 0 0 0.4rem !important;
    border-color: var(--panel-border) !important;
}
html[data-theme] body #appContent #tshootVcenterForm .tshoot-section-heading h4 {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}
html[data-theme] body #appContent #tshootVcenterForm .tshoot-form__grid {
    align-items: start !important;
    gap: 0.75rem !important;
}
html[data-theme] body #appContent #tshootVcenterForm .tshoot-field {
    align-content: start !important;
    grid-auto-rows: max-content;
    gap: 0.35rem !important;
    min-width: 0;
}
html[data-theme] body #appContent #tshootVcenterForm .tshoot-field > span {
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}
html[data-theme] body #appContent #tshootVcenterForm .tshoot-field > .tshoot-field__helper,
html[data-theme] body #appContent #tshootVcenterForm .tshoot-field__helper strong {
    font-size: 0.68rem !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    color: var(--text-soft) !important;
    white-space: normal !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}
html[data-theme] body #appContent #tshootVcenterForm :is(.toolbar-select, .toolbar-search) {
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0 !important;
    height: 2.35rem !important;
    min-height: 2.35rem !important;
    margin: 0 !important;
    padding: 0.4rem 0.65rem !important;
    font-size: 0.8rem !important;
    font-weight: 400 !important;
    background: var(--panel) !important;
    border-color: var(--panel-border) !important;
    color: var(--text) !important;
}
html[data-theme] body #appContent #tshootVcenterForm .tshoot-vcenter-target-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}
html[data-theme] body #appContent #tshootVcenterForm .tshoot-vcenter-target-actions .toolbar-button {
    min-height: 2.35rem !important;
    font-size: 0.76rem !important;
    font-weight: 500 !important;
    padding: 0.4rem 0.65rem !important;
}
html[data-theme] body #appContent #tshootVcenterForm .tshoot-vcenter-time-range {
    width: min(100%, 36rem);
    max-width: 100%;
}
@container vcenter-form (max-width: 50rem) {
    html[data-theme] body #appContent #tshootVcenterForm .tshoot-form__grid--triple {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    html[data-theme] body #appContent #tshootVcenterForm .tshoot-vcenter-check-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@container vcenter-form (max-width: 34rem) {
    html[data-theme] body #appContent #tshootVcenterForm .tshoot-form__grid,
    html[data-theme] body #appContent #tshootVcenterForm .tshoot-vcenter-check-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    html[data-theme] body #appContent #tshootVcenterForm .tshoot-form__grid > .tshoot-field {
        grid-column: 1 / -1;
    }
}

/* Shared dashboard treatment for resource navigation and subscription comparisons. */
html[data-theme] body .admin-resource-tabs .admin-resource-tab {
 min-height:76px!important; height:auto!important; padding:10px 12px!important;
 border:1px solid var(--panel-border)!important; border-left:4px solid var(--ds-primary,#8697ff)!important;
 border-radius:.8rem!important; background:var(--ds-surface-raised,var(--panel))!important;
 color:var(--text)!important; box-shadow:none!important; transform:none!important;
 grid-template-columns:28px minmax(0,1fr) auto!important; gap:4px 8px!important;
}
html[data-theme] body .admin-resource-tabs .admin-resource-tab:is(.active,:hover,:focus-visible) {
 border-color:var(--ds-primary,#8697ff)!important; background:var(--ds-surface-hover,var(--panel))!important;
}
html[data-theme] body .admin-resource-tab__icon { width:28px!important; height:28px!important; color:var(--ds-primary,#8697ff)!important; border-radius:6px!important; background:var(--panel)!important; }
html[data-theme] body .admin-resource-tab__icon svg { width:20px!important; height:20px!important; }
html[data-theme] body .admin-resource-tab__copy strong { font-size:14px!important; line-height:1.2!important; }
html[data-theme] body .admin-resource-tab__copy small { font-size:12px!important; color:var(--text-soft)!important; }
html[data-theme] body .admin-resource-tab__count { font-size:15px!important; color:var(--text)!important; background:transparent!important; border:0!important; }
html[data-theme] body .admin-resource-tab__scope { font-size:10px!important; color:var(--text-soft)!important; }
.subscription-overview { display:grid; gap:16px; min-width:0; }
.subscription-plan-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; align-items:stretch; }
.subscription-plan-card { display:flex; flex-direction:column; align-items:stretch; gap:12px; padding:18px; border:1px solid var(--panel-border); border-top:3px solid var(--ds-primary,#8697ff); border-radius:14px; background:var(--ds-surface-raised,var(--panel)); color:var(--text); min-width:0; }
.subscription-plan-card h4 { margin:0; font-size:20px; }
.subscription-plan-card p { margin:0; font-size:14px; color:var(--text-soft); }
.subscription-plan-card__label { display:flex; align-items:center; gap:8px; color:var(--ds-primary,#8697ff); font-size:13px; }
.subscription-plan-card__label svg { width:22px; height:22px; }
.subscription-price { display:flex; flex-wrap:wrap; gap:8px; align-items:baseline; }
.subscription-price strong { font-size:28px; }.subscription-price span,.subscription-plan-card small { font-size:12px; color:var(--text-soft); }
.subscription-allowances { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:0; padding:12px 0; border-block:1px solid var(--panel-border); }
.subscription-allowances dt { font-size:12px; color:var(--text-soft); }.subscription-allowances dd { margin:4px 0 0; font-weight:650; font-size:16px; }
.subscription-plan-card details { font-size:14px; }.subscription-plan-card details ul { padding-left:20px; }.subscription-plan-card h5 { margin:14px 0 6px; }
.subscription-plan-card > a { margin-top:auto; align-self:flex-start; }
.subscription-records { font-size:13px; }.subscription-records td { padding:10px!important; vertical-align:top; }.subscription-records small { display:block; color:var(--text-soft); margin-top:4px; }
@media(max-width:760px) { .subscription-plan-grid { grid-template-columns:1fr; } }
