/* DASH component layer (scoped). */

.dash-scope .dash-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2, 8px);
    padding: 10px 24px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    transition: background var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.dash-scope .dash-button:disabled,
.dash-scope .dash-button[aria-disabled="true"] {
    opacity: 0.45;
    pointer-events: none;
}

.dash-scope .dash-button--primary {
    background: var(--color-brand-blue);
    color: #fff;
    box-shadow: var(--shadow-btn);
}

.dash-scope .dash-button--primary:hover {
    background: var(--color-brand-blue-dark);
    box-shadow: var(--shadow-btn-hover);
}

.dash-scope .dash-button--secondary {
    background: var(--color-card-bg);
    border-color: var(--color-brand-blue);
    color: var(--color-brand-blue);
}

.dash-scope .dash-button--secondary:hover {
    background: rgba(16, 120, 190, 0.08);
}

.dash-scope .dash-button--sm {
    padding: 6px 12px;
    font-size: 12px;
}

.dash-scope .dash-button--lg {
    padding: 10px 22px;
    font-size: 15px;
}

.dash-scope .dash-button--loading {
    pointer-events: none;
}

.dash-scope .dash-button__spinner {
    flex-shrink: 0;
    animation: dash-spin 0.8s linear infinite;
}

@keyframes dash-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .dash-scope .dash-button__spinner {
        animation: none;
    }
}

.dash-scope .dash-icon-button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(16, 120, 190, 0.10);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-brand-blue);
    padding: 0;
    transition: background var(--transition-fast);
}

.dash-scope .dash-icon-button:hover {
    background: rgba(16, 120, 190, 0.18);
}

.dash-scope .dash-icon-button:disabled {
    opacity: 0.45;
    pointer-events: none;
}

.dash-scope .dash-icon-button svg {
    width: 16px;
    height: 16px;
    display: block;
}

.dash-scope .dash-button--ghost {
    background: transparent;
    color: var(--color-brand-blue);
    border-color: rgba(16, 120, 190, 0.35);
}

.dash-scope .dash-button--ghost:hover {
    background: rgba(16, 120, 190, 0.08);
}

/* Ghost / outline button variant used in topbars */
.dash-scope .dash-button--ghost.dash-button--topbar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--topbar-control-bg);
    border-color: var(--topbar-control-border);
    color: var(--topbar-control-color);
    border-width: 0.5px;
    border-style: solid;
    font-size: 12px;
    font-weight: 700;
}

.dash-scope .dash-button--ghost.dash-button--topbar svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.dash-scope .dash-button--ghost.dash-button--topbar:hover {
    border-color: var(--color-brand-blue);
    color: var(--color-brand-blue);
    background: var(--topbar-control-bg);
}

.dash-scope .dash-button--ghost.dash-button--topbar.dash-button--selected {
    background: var(--color-brand-blue);
    border-color: var(--color-brand-blue);
    color: #fff;
}

.dash-scope .dash-button--danger {
    background: var(--color-negative);
    color: #fff;
}

.dash-scope .dash-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.dash-scope .dash-card--accent-left::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 4px;
    border-radius: 2px;
    background: var(--color-brand-blue);
}

.dash-scope .dash-card__header {
    padding: 18px 20px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3, 12px);
}

.dash-scope .dash-card__body {
    padding: 18px 20px 20px;
}

/* ── Company / settings page chrome (company.html) ── */
.dash-scope .dash-card.dash-card--settings {
    border-radius: 14px;
    margin-bottom: 16px;
}

.dash-scope .dash-card.dash-card--settings .dash-card__header {
    padding: 18px 24px 14px;
    border-bottom: 1px solid var(--color-card-border);
    align-items: flex-start;
}

.dash-scope .dash-card.dash-card--settings .dash-card__body {
    padding: 0;
}

.dash-scope .dash-card__settings-title {
    font-family: var(--font-title);
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.dash-scope .dash-card__settings-sub {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 3px;
}

.dash-scope .dash-card__field-grid {
    display: grid;
    gap: 0;
}

.dash-scope .dash-card__field-grid--3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.dash-scope .dash-card__field-grid--2 {
    grid-template-columns: 1fr 1fr;
}

.dash-scope .dash-card__field {
    padding: 20px 24px;
    border-right: 1px solid var(--color-card-border);
    min-width: 0;
}

.dash-scope .dash-card__field:last-child {
    border-right: none;
}

.dash-scope .dash-card__metric-label {
    font-family: var(--font-title);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

.dash-scope .dash-card__metric-value {
    font-family: var(--font-title);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.35;
    word-break: break-word;
}

.dash-scope .dash-card__metric-hint {
    font-family: var(--font-body);
    font-size: 11.5px;
    color: var(--color-text-muted);
    margin-top: 6px;
}

.dash-scope .dash-card__field .dash-field {
    margin: 0;
}

@media (max-width: 900px) {
    .dash-scope .dash-card__field-grid--3,
    .dash-scope .dash-card__field-grid--2 {
        grid-template-columns: 1fr;
    }

    .dash-scope .dash-card__field {
        border-right: none;
        border-bottom: 1px solid var(--color-card-border);
    }

    .dash-scope .dash-card__field:last-child {
        border-bottom: none;
    }
}

.dash-scope .dash-page-heading__eyebrow {
    font-family: var(--font-title);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--color-brand-blue);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dash-scope .dash-page-heading__eyebrow-icon {
    display: inline-flex;
    flex-shrink: 0;
    opacity: 0.9;
}

.dash-scope .dash-page-heading__eyebrow-icon svg {
    width: 14px;
    height: 14px;
    display: block;
}

.dash-scope .dash-page-heading__title-row {
    margin-top: 0;
}

.dash-scope .dash-page-heading__title {
    margin-top: 0;
    font-family: var(--font-title);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--color-text-primary);
}

.dash-scope .dash-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid transparent;
}

.dash-scope .dash-badge--info {
    background: rgba(16, 120, 190, 0.09);
    color: var(--color-brand-blue);
    border-color: rgba(16, 120, 190, 0.22);
}

.dash-scope .dash-badge--positive {
    background: rgba(39, 181, 119, 0.10);
    color: var(--color-positive);
}

.dash-scope .dash-badge--negative {
    background: rgba(224, 82, 82, 0.10);
    color: var(--color-negative);
}

.dash-scope .dash-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dash-scope .dash-field__label {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text-secondary);
}

.dash-scope .dash-input,
.dash-scope .dash-select {
    width: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid var(--color-card-border);
    background: var(--color-card-bg);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.dash-scope .dash-select {
    appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23587f9b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px 14px;
}

.dash-scope .dash-input:focus,
.dash-scope .dash-select:focus {
    border-color: var(--color-brand-blue);
    box-shadow: 0 0 0 3px rgba(16, 120, 190, 0.12);
}

.dash-scope .dash-input--error,
.dash-scope .dash-select--error {
    border-color: var(--color-negative);
    box-shadow: 0 0 0 3px rgba(224, 82, 82, 0.12);
}

.dash-scope .dash-input--error:focus,
.dash-scope .dash-select--error:focus {
    border-color: var(--color-negative);
    box-shadow: 0 0 0 3px rgba(224, 82, 82, 0.16);
}

.dash-scope .dash-field__helper {
    font-family: var(--font-body);
    font-size: 11.5px;
    color: var(--color-text-muted);
}

.dash-scope .dash-field__helper--error {
    color: var(--color-negative);
}

.dash-scope .dash-field__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.dash-scope .dash-field__input-wrap .dash-input {
    padding-right: 40px;
}

.dash-scope .dash-field__toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: 0;
}

.dash-scope .dash-field__toggle:hover {
    color: var(--color-brand-blue);
    background: rgba(16, 120, 190, 0.08);
}

.dash-scope .dash-field__toggle svg {
    width: 16px;
    height: 16px;
    display: block;
}

.dash-scope .dash-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
    font-size: 13px;
}

.dash-scope .dash-table th {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-card-border);
}

.dash-scope .dash-table td {
    padding: 10px 12px;
    border-bottom: 0.5px solid var(--color-card-border);
    color: var(--color-text-primary);
}

.dash-scope .dash-table tr:hover td {
    background: rgba(16, 120, 190, 0.03);
}

.dash-scope .dash-dropdown {
    position: relative;
    display: inline-block;
}

.dash-scope .dash-dropdown__trigger {
    list-style: none;
    border-radius: var(--radius-btn);
    border: 1px solid var(--color-card-border);
    background: var(--color-card-bg);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    padding: 9px 12px;
    cursor: pointer;
    user-select: none;
}

.dash-scope details.dash-dropdown > summary::-webkit-details-marker {
    display: none;
}

.dash-scope .dash-dropdown__trigger::after {
    content: '▾';
    margin-left: 10px;
    color: var(--color-text-muted);
    font-size: 12px;
}

.dash-scope details.dash-dropdown[open] .dash-dropdown__trigger {
    border-color: var(--color-brand-blue);
    box-shadow: 0 0 0 3px rgba(16, 120, 190, 0.12);
}

.dash-scope .dash-dropdown__panel {
    --dash-dropdown-panel-radius: 12px;
    position: absolute;
    z-index: 50;
    min-width: 240px;
    margin-top: 6px;
    padding: 0;
    border-radius: var(--dash-dropdown-panel-radius);
    border: 1px solid var(--color-card-border);
    background: var(--color-card-bg);
    box-shadow: 0 18px 60px rgba(10, 20, 40, 0.16);
    overflow: hidden;
}

.dash-scope .dash-dropdown__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    border: none;
    background: transparent;
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 0;
    cursor: pointer;
}

.dash-scope .dash-dropdown__option:hover,
.dash-scope .dash-dropdown__option:focus-visible {
    background: rgba(16, 120, 190, 0.07);
}

.dash-scope .dash-dropdown__option:first-child:hover,
.dash-scope .dash-dropdown__option:first-child:focus-visible {
    border-top-left-radius: var(--dash-dropdown-panel-radius);
    border-top-right-radius: var(--dash-dropdown-panel-radius);
}

.dash-scope .dash-dropdown__option:last-child:hover,
.dash-scope .dash-dropdown__option:last-child:focus-visible {
    border-bottom-left-radius: var(--dash-dropdown-panel-radius);
    border-bottom-right-radius: var(--dash-dropdown-panel-radius);
}

.dash-scope .dash-sidebar {
    position: relative;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-gradient);
    padding: 0;
    border-radius: 18px;
    color: var(--color-sidebar-text);
    overflow: hidden;
    transition: width var(--transition-medium);
}

.dash-scope .dash-sidebar--gallery {
    border-radius: 0;
    min-height: 420px;
}

.dash-scope .dash-sidebar--collapsed {
    width: var(--sidebar-collapsed-width);
}

[data-theme="dark"] .dash-scope .dash-sidebar {
    background: linear-gradient(135deg, #0d2d45 0%, #1078be 100%);
}

/* Mountain illustrations (day / night) */
.dash-scope .dash-sidebar__illus {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 320px;
    pointer-events: none;
    z-index: 0;
}

.dash-scope .dash-sidebar__illus--night {
    display: none;
}

[data-theme="dark"] .dash-scope .dash-sidebar__illus--day {
    display: none;
}

[data-theme="dark"] .dash-scope .dash-sidebar__illus--night {
    display: block;
}

.dash-scope .dash-sidebar__header {
    position: relative;
    z-index: 2;
    padding: 10px 10px 10px 16px;
}

.dash-scope .dash-sidebar__header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding-bottom: 12px;
}

.dash-scope .dash-sidebar--collapsed .dash-sidebar__header {
    padding: 12px 0;
    align-items: center;
}

.dash-scope .dash-sidebar--collapsed .dash-sidebar__header-top {
    justify-content: center;
}

.dash-scope .dash-sidebar__brand {
    padding: 0;
    min-width: 0;
}

.dash-scope .dash-sidebar--collapsed .dash-sidebar__brand,
.dash-scope .dash-sidebar--collapsed .dash-logo-wrap--sidebar,
.dash-scope .dash-sidebar--collapsed .dash-sidebar__product,
.dash-scope .dash-sidebar--collapsed .dash-sidebar__label,
.dash-scope .dash-sidebar--collapsed .dash-sidebar__new,
.dash-scope .dash-sidebar--collapsed .dash-sidebar__chevron,
.dash-scope .dash-sidebar--collapsed .dash-sidebar__children,
.dash-scope .dash-sidebar--collapsed .dash-sidebar__user-meta,
.dash-scope .dash-sidebar--collapsed .dash-sidebar__theme-toggle span {
    display: none;
}

.dash-scope .dash-sidebar__toggle {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 7px;
    color: rgba(255, 255, 255, 0.80);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.dash-scope .dash-sidebar__toggle:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.dash-scope .dash-sidebar__toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.dash-scope .dash-sidebar__toggle svg {
    transition: transform var(--transition-medium);
}

.dash-scope .dash-sidebar--collapsed .dash-sidebar__toggle svg {
    transform: rotate(180deg);
}

.dash-scope .dash-sidebar__divider {
    height: 0.5px;
    margin: 4px 16px 12px;
    background: rgba(255, 255, 255, 0.10);
    border: none;
}

.dash-scope .dash-sidebar__product {
    font-family: var(--font-title);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.50);
    padding: 0 0 10px 20px;
}

.dash-scope .dash-sidebar--collapsed .dash-sidebar__divider {
    display: none;
}

.dash-scope .dash-sidebar--collapsed .dash-sidebar__divider--rail {
    display: block;
    margin: 10px 12px 8px;
}

/* DASH brand mark — sidebar / navbar crop (White and Colour asset) */
.dash-scope .dash-logo-wrap--sidebar,
.dash-scope .dash-logo-wrap--navbar {
    display: block;
    width: 144px;
    height: 50px;
    overflow: hidden;
    flex-shrink: 0;
}

.dash-scope .dash-logo__img--sidebar,
.dash-scope .dash-logo__img--navbar {
    display: block;
    /* Override app.css / Tailwind preflight img { max-width: 100% } so the
       oversized White-and-Colour asset can be cropped into the 144×50 window. */
    max-width: none;
    width: 303px;
    max-width: none;
    height: auto;
    margin-left: -86px;
    margin-top: -60px;
}

.dash-scope .dash-sidebar__link,
.dash-scope .dash-sidebar__child-link {
    display: block;
    padding: 9px 12px;
    border-radius: 7px;
    color: var(--color-sidebar-text);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 13px;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.dash-scope .dash-sidebar__link:hover,
.dash-scope .dash-sidebar__child-link:hover {
    background: var(--color-sidebar-hover);
    color: #fff;
}

.dash-scope .dash-sidebar__children {
    padding-left: 38px;
    margin-bottom: 6px;
}

/* Nested Admin section groups (Client config, KPI catalogue, …) */
.dash-scope .dash-sidebar__children .dash-sidebar__group {
    margin: 4px 0 2px -26px;
}

.dash-scope .dash-sidebar__children .dash-sidebar__group-trigger {
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.72);
}

.dash-scope .dash-sidebar__children .dash-sidebar__children {
    padding-left: 28px;
    margin-bottom: 4px;
}

.dash-scope .dash-sidebar__item-content {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.dash-scope .dash-sidebar__icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    flex-shrink: 0;
}

.dash-scope .dash-sidebar__icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.dash-scope .dash-sidebar__label {
    font-weight: 400;
}

.dash-scope .dash-sidebar__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dash-scope .dash-sidebar__link--active {
    background: var(--color-sidebar-active);
    color: var(--color-sidebar-text-active);
}

.dash-scope .dash-sidebar__link--active .dash-sidebar__label {
    font-weight: 700;
}

.dash-scope .dash-sidebar__link--active .dash-sidebar__icon {
    opacity: 1;
}

.dash-scope .dash-sidebar__group-label {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.35);
    padding: 14px 12px 4px;
}

.dash-scope .dash-sidebar__group-divider {
    height: 0.5px;
    margin: 10px 12px 6px;
    background: rgba(255, 255, 255, 0.10);
    border: none;
    flex-shrink: 0;
}

.dash-scope .dash-sidebar__new {
    background: var(--color-warning);
    color: #fff;
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 700;
    border-radius: 4px;
    padding: 2px 6px;
    letter-spacing: 0.04em;
}

/* Group trigger (accordion) */
.dash-scope .dash-sidebar__group-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-body);
    font-size: 13px;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.dash-scope .dash-sidebar__group-trigger:hover {
    background: var(--color-sidebar-hover);
    color: #fff;
}

.dash-scope .dash-sidebar__chevron {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    opacity: 0.45;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-medium), opacity var(--transition-medium);
}

.dash-scope .dash-sidebar__chevron svg {
    width: 12px;
    height: 12px;
    display: block;
}

.dash-scope .dash-sidebar__group-trigger--open .dash-sidebar__chevron {
    transform: rotate(180deg);
    opacity: 0.9;
}

.dash-scope .dash-sidebar__child-link {
    font-size: 12.5px;
    padding: 6px 10px;
    position: relative;
}

.dash-scope .dash-sidebar__child-link::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.40);
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
}

.dash-scope .dash-sidebar__child-link--active {
    color: #fff;
    font-weight: 700;
}

.dash-scope .dash-sidebar__child-link--active::before {
    background: #fff;
}

.dash-scope .dash-sidebar__nav {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 10px 12px;
    overflow-y: auto;
}

.dash-scope .dash-sidebar--collapsed .dash-sidebar__nav {
    padding: 4px 0 12px;
}

.dash-scope .dash-sidebar--collapsed .dash-sidebar__link,
.dash-scope .dash-sidebar--collapsed .dash-sidebar__group-trigger {
    justify-content: center;
    padding: 9px 0;
    gap: 0;
}

.dash-scope .dash-sidebar--collapsed .dash-sidebar__item-content {
    justify-content: center;
}

.dash-scope .dash-sidebar--collapsed .dash-sidebar__link--active {
    /* Keep white pill readable when only icon shows */
    margin: 0 8px;
    border-radius: 7px;
}

/* Footer — theme, user, logout */
.dash-scope .dash-sidebar__footer {
    position: relative;
    z-index: 2;
    padding: 12px 16px;
    margin-top: auto;
}

.dash-scope .dash-sidebar--collapsed .dash-sidebar__footer {
    padding: 12px 0;
}

.dash-scope .dash-sidebar__theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 10px;
    padding: 0;
    border: none;
    background: none;
    font-family: var(--font-body);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.dash-scope .dash-sidebar__theme-toggle:hover {
    color: rgba(255, 255, 255, 0.8);
}

.dash-scope .dash-sidebar__theme-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    border-radius: 4px;
}

.dash-scope .dash-sidebar--collapsed .dash-sidebar__theme-toggle {
    justify-content: center;
}

.dash-scope .dash-sidebar__theme-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.dash-scope .dash-sidebar__user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.dash-scope .dash-sidebar--collapsed .dash-sidebar__user-row {
    justify-content: center;
    margin-bottom: 0;
}

.dash-scope .dash-sidebar__avatar {
    position: relative;
    overflow: hidden;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 1.5px solid rgba(255, 255, 255, 0.30);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-title);
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    text-decoration: none;
    cursor: default;
    padding: 0;
    transition: border-color var(--transition-fast);
}

a.dash-sidebar__avatar,
button.dash-sidebar__avatar {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

button.dash-sidebar__avatar {
    font: inherit;
}

.dash-scope .dash-sidebar__avatar:hover {
    border-color: rgba(255, 255, 255, 0.70);
}

.dash-scope .dash-sidebar__avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.dash-scope .dash-sidebar__user-meta {
    min-width: 0;
    text-align: left;
}

.dash-scope .dash-sidebar__user-meta--link {
    display: block;
    padding: 0;
    border: none;
    background: none;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    border-radius: 6px;
    transition: opacity var(--transition-fast);
}

.dash-scope a.dash-sidebar__user-meta--link:hover,
.dash-scope button.dash-sidebar__user-meta--link:hover {
    opacity: 0.85;
}

.dash-scope a.dash-sidebar__user-meta--link:focus-visible,
.dash-scope button.dash-sidebar__user-meta--link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.55);
    outline-offset: 2px;
}

.dash-scope .dash-sidebar__user-name {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.2;
    transition: color var(--transition-fast);
}

.dash-scope .dash-sidebar__user-email {
    font-family: var(--font-body);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.40);
    line-height: 1.3;
}

.dash-scope .dash-sidebar__user-row--account-menu {
    position: relative;
}

.dash-scope .dash-sidebar__user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 6px 8px;
    margin: -6px -8px 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background var(--transition-fast);
}

.dash-scope .dash-sidebar__user-trigger--collapsed {
    width: auto;
    justify-content: center;
    margin: 0;
    padding: 4px;
}

.dash-scope .dash-sidebar__user-trigger:hover,
.dash-scope .dash-sidebar__user-trigger:focus-visible {
    background: var(--color-sidebar-hover);
}

.dash-scope .dash-sidebar__user-trigger:hover .dash-sidebar__avatar--menu,
.dash-scope .dash-sidebar__user-trigger:focus-visible .dash-sidebar__avatar--menu {
    border-color: rgba(255, 255, 255, 0.70);
    background: rgba(255, 255, 255, 0.28);
}

.dash-scope .dash-sidebar__user-trigger:hover .dash-sidebar__user-name,
.dash-scope .dash-sidebar__user-trigger:focus-visible .dash-sidebar__user-name {
    color: #fff;
}

.dash-scope .dash-sidebar__user-trigger:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.dash-scope .dash-sidebar__avatar--menu {
    pointer-events: none;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.dash-scope .dash-sidebar__user-trigger .dash-sidebar__user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.dash-scope .dash-sidebar__account-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 4;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: default;
}

.dash-scope .dash-sidebar__account-menu {
    --dash-sidebar-account-menu-radius: 10px;
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    border-radius: var(--dash-sidebar-account-menu-radius);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(18, 28, 38, 0.98);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.dash-scope .dash-sidebar__account-menu--rail {
    left: calc(100% + 10px);
    right: auto;
    bottom: 0;
    min-width: 180px;
}

.dash-scope .dash-sidebar__account-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.dash-scope .dash-sidebar__account-menu-item:first-child:hover,
.dash-scope .dash-sidebar__account-menu-item:first-child:focus-visible {
    border-top-left-radius: var(--dash-sidebar-account-menu-radius);
    border-top-right-radius: var(--dash-sidebar-account-menu-radius);
}

.dash-scope .dash-sidebar__account-menu-item:last-child:hover,
.dash-scope .dash-sidebar__account-menu-item:last-child:focus-visible {
    border-bottom-left-radius: var(--dash-sidebar-account-menu-radius);
    border-bottom-right-radius: var(--dash-sidebar-account-menu-radius);
}

.dash-scope .dash-sidebar__account-menu-item:hover,
.dash-scope .dash-sidebar__account-menu-item:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    outline: none;
}

.dash-scope .dash-sidebar__logout {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    font-family: var(--font-body);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.dash-scope .dash-sidebar__logout:hover {
    color: rgba(255, 255, 255, 0.8);
}

.dash-scope .dash-sidebar__logout:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    border-radius: 4px;
}

.dash-scope .dash-sidebar__logout-form {
    margin: 0;
}

.dash-scope .dash-sidebar--collapsed .dash-sidebar__logout-form {
    display: flex;
    justify-content: center;
}

.dash-scope .dash-sidebar--collapsed .dash-sidebar__logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 4px;
}

/* ── Production app sidebar (Ascent / Pinnacle hosts) ─────────────────────── */
.dash-scope .dash-sidebar--app {
    border-radius: 0;
    min-height: 0;
    align-self: stretch;
    flex-shrink: 0;
    height: auto;
    width: var(--sidebar-width);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.dash-scope .dash-sidebar--app.dash-sidebar--collapsed {
    width: var(--sidebar-collapsed-width);
}

.dash-scope .dash-sidebar__link--action {
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.dash-scope .dash-sidebar__group {
    position: relative;
    display: flex;
    flex-direction: column;
}

.dash-scope .dash-sidebar__group-trigger--flyout-open {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.dash-scope .dash-sidebar__flyout-backdrop {
    display: none;
}

.dash-scope .dash-sidebar__flyout {
    position: absolute;
    left: calc(100% + 8px);
    top: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 212px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: var(--ascent-sidebar-flyout-bg, linear-gradient(135deg, #5a3f8a 0%, #0e9db8 100%));
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.35);
    opacity: 0;
}

.dash-scope .dash-sidebar__flyout-link {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 12.5px;
    white-space: nowrap;
    transition: background var(--transition-fast);
}

.dash-scope .dash-sidebar__flyout-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.dash-scope .dash-sidebar__flyout-link--active {
    color: #fff;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.16);
}

.dash-scope .dash-sidebar__mobile-scrim {
    display: none;
}

.dash-scope .dash-sidebar__mobile-close {
    display: none;
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 7px;
    color: rgba(255, 255, 255, 0.80);
    cursor: pointer;
}

.dash-scope .dash-sidebar__mobile-close:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.dash-scope .dash-sidebar--app .dash-sidebar__nav {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-sidebar-thumb) var(--scrollbar-track);
    overscroll-behavior: contain;
    gap: 0;
}

.dash-scope .dash-sidebar--app .dash-sidebar__link,
.dash-scope .dash-sidebar--app .dash-sidebar__group-trigger {
    padding-top: 7px;
    padding-bottom: 7px;
}

.dash-scope .dash-sidebar--app.dash-sidebar--collapsed .dash-sidebar__link,
.dash-scope .dash-sidebar--app.dash-sidebar--collapsed .dash-sidebar__group-trigger {
    padding-top: 7px;
    padding-bottom: 7px;
}

.dash-scope .dash-sidebar--app .dash-sidebar__group-label {
    padding-top: 10px;
}

.dash-scope .dash-sidebar--app .dash-sidebar__nav::-webkit-scrollbar {
    width: var(--scrollbar-sidebar-size);
}

.dash-scope .dash-sidebar--app .dash-sidebar__nav::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-sidebar-thumb);
    border-radius: var(--radius-pill);
}

.dash-scope .dash-sidebar--app .dash-sidebar__nav::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-sidebar-thumb-hover);
}

.dash-scope .dash-sidebar--app .dash-sidebar__nav::-webkit-scrollbar-thumb:active {
    background-color: var(--scrollbar-sidebar-thumb-active);
}

@media (min-width: 901px) {
    .dash-scope .dash-sidebar--app.dash-sidebar--collapsed {
        position: relative;
        z-index: 2;
    }

    .dash-scope .dash-sidebar--app.dash-sidebar--collapsed .dash-sidebar__flyout-backdrop {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: var(--sidebar-collapsed-width);
        /* Below .dash-sidebar__nav (z-index 2) so fixed flyout links stay clickable */
        z-index: 1;
        background: transparent;
        cursor: default;
    }

    .dash-scope .dash-sidebar--app.dash-sidebar--collapsed:has(.dash-sidebar__flyout) {
        overflow: visible;
    }

    .dash-scope .dash-sidebar--app.dash-sidebar--collapsed:has(.dash-sidebar__flyout) .dash-sidebar__nav {
        overflow: visible;
    }

    .dash-scope .dash-sidebar--app.dash-sidebar--collapsed .dash-sidebar__flyout {
        z-index: 50;
        pointer-events: auto;
    }
}

@media (max-width: 900px) {
    html[data-gcx-narrow-viewport="true"] .dash-scope .dash-sidebar--app .dash-sidebar__toggle {
        display: none !important;
    }

    html[data-gcx-narrow-viewport="true"] .dash-scope .dash-sidebar--app .dash-sidebar__mobile-close {
        display: inline-flex;
    }

    .dash-scope .dash-sidebar--app {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(320px, 88vw);
        max-width: 320px;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        box-shadow: none;
    }

    .dash-scope .dash-sidebar--app.dash-sidebar--mobile-open {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(15, 23, 42, 0.28);
    }

    .dash-scope .dash-sidebar--app.dash-sidebar--collapsed {
        width: min(320px, 88vw);
    }

    .dash-scope .dash-sidebar__mobile-close {
        display: inline-flex;
    }

    .dash-scope .dash-sidebar--app .dash-sidebar__toggle {
        display: none !important;
    }

    .dash-scope .dash-sidebar--app .dash-sidebar__link,
    .dash-scope .dash-sidebar--app .dash-sidebar__child-link,
    .dash-scope .dash-sidebar--app .dash-sidebar__group-trigger {
        min-height: 44px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .dash-scope .dash-sidebar__mobile-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1046;
        background: rgba(15, 23, 42, 0.42);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
}

@media (prefers-reduced-motion: reduce) {
    @media (max-width: 900px) {
        .dash-scope .dash-sidebar--app {
            transition: none;
        }

        .dash-scope .dash-sidebar__mobile-scrim {
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
        }
    }
}

/* Filter dropdown pills (matches Design Elements filter-dd pattern) */
.dash-scope details.dash-filter-dd {
    position: relative;
    display: inline-block;
}

.dash-scope summary.dash-filter-dd__trigger {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--topbar-control-border, rgba(16,120,190,0.35));
    background: var(--topbar-control-bg, #fff);
    color: var(--topbar-control-color, var(--color-brand-blue));
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.dash-scope details.dash-filter-dd > summary::-webkit-details-marker {
    display: none;
}

.dash-scope summary.dash-filter-dd__trigger::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    opacity: 0.55;
    margin-left: 2px;
}

.dash-scope details.dash-filter-dd[open] summary.dash-filter-dd__trigger {
    border-color: var(--color-brand-blue);
    box-shadow: 0 0 0 3px rgba(16,120,190,0.12);
}

.dash-scope details.dash-filter-dd[open] summary.dash-filter-dd__trigger::after {
    transform: rotate(-135deg) translateY(-1px);
    opacity: 0.75;
}

.dash-scope .dash-filter-dd__panel {
    --dash-filter-dd-panel-radius: 14px;
    position: absolute;
    z-index: 60;
    top: calc(100% + 8px);
    left: 0;
    min-width: 260px;
    padding: 0;
    border-radius: var(--dash-filter-dd-panel-radius);
    border: 1px solid var(--color-card-border);
    background: var(--color-card-bg);
    box-shadow: 0 18px 60px rgba(10,20,40,0.16);
    animation: dashFilterDdIn 150ms ease-out;
    overflow: hidden;
}

@keyframes dashFilterDdIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.dash-scope .dash-filter-dd__option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 0;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.dash-scope .dash-filter-dd__option:hover,
.dash-scope .dash-filter-dd__option:focus-visible {
    background: var(--color-hover-bg);
}

.dash-scope .dash-filter-dd__option:first-child:hover,
.dash-scope .dash-filter-dd__option:first-child:focus-visible,
.dash-scope .dash-filter-dd__option:first-child.dash-filter-dd__option--selected {
    border-top-left-radius: var(--dash-filter-dd-panel-radius);
    border-top-right-radius: var(--dash-filter-dd-panel-radius);
}

.dash-scope .dash-filter-dd__option:last-child:hover,
.dash-scope .dash-filter-dd__option:last-child:focus-visible,
.dash-scope .dash-filter-dd__option:last-child.dash-filter-dd__option--selected {
    border-bottom-left-radius: var(--dash-filter-dd-panel-radius);
    border-bottom-right-radius: var(--dash-filter-dd-panel-radius);
}

.dash-scope .dash-filter-dd__option--selected {
    font-weight: 700;
}

.dash-scope .dash-filter-dd__check {
    color: var(--color-brand-blue);
}

/* Search input (Locations live search pattern) */
.dash-scope .dash-search {
    position: relative;
    display: flex;
    align-items: center;
    height: 36px;
    border: 1px solid var(--color-card-border);
    border-radius: 8px;
    background: var(--color-card-bg);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.dash-scope .dash-search:focus-within {
    border-color: var(--color-brand-blue);
    box-shadow: 0 0 0 3px rgba(16,120,190,0.10);
}

.dash-scope .dash-search__icon {
    position: absolute;
    left: 10px;
    color: var(--color-text-muted);
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dash-scope .dash-search__icon svg {
    width: 16px;
    height: 16px;
}

.dash-scope .dash-search__input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    padding: 0 12px 0 34px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.dash-scope .dash-search__input::placeholder {
    color: var(--color-text-muted);
    font-weight: 500;
}

/* Tags (COMPONENTS.md §10) */
.dash-scope .dash-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 20px;
    padding: 3px 10px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid transparent;
}

.dash-scope .dash-tag--consolidated {
    background: rgba(16,120,190,0.08);
    color: var(--color-brand-blue);
    border-color: rgba(16,120,190,0.20);
}

.dash-scope .dash-tag--per-period {
    background: rgba(93,195,221,0.10);
    color: #12a0be;
    border-color: rgba(93,195,221,0.25);
}

.dash-scope .dash-tag--multi-file {
    background: rgba(176,124,16,0.10);
    color: var(--color-warning);
    border-color: rgba(176,124,16,0.25);
}

.dash-scope .dash-tag--new {
    background: rgba(176,124,16,0.10);
    color: var(--color-warning);
    border-color: rgba(176,124,16,0.25);
}

.dash-scope .dash-tag--premium {
    background: rgba(16,120,190,0.09);
    color: var(--color-brand-blue);
    border-color: rgba(16,120,190,0.22);
}

.dash-scope .dash-tag--active {
    background: rgba(39, 181, 119, 0.12);
    color: var(--color-positive);
}

.dash-scope .dash-tag--inactive {
    background: rgba(138, 172, 191, 0.15);
    color: var(--color-text-muted);
}

.dash-scope .dash-tag--pending {
    background: rgba(240, 172, 70, 0.15);
    color: #c08010;
}

.dash-scope .dash-tag--emissions {
    background: rgba(107, 75, 158, 0.12);
    color: var(--color-brand-purple);
}

.dash-scope .dash-tag--energy {
    background: rgba(16, 120, 190, 0.12);
    color: var(--color-brand-blue);
}

.dash-scope .dash-tag--esg {
    background: rgba(39, 181, 119, 0.12);
    color: var(--color-positive);
}

.dash-scope .dash-tag--activities {
    background: rgba(92, 195, 221, 0.15);
    color: #3a9db5;
}

.dash-scope .dash-chip-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 120, 190, 0.10);
    color: var(--color-brand-blue);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 99px;
}

/* Status dot (COMPONENTS.md §9) */
.dash-scope .dash-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 8px;
}

.dash-scope .dash-status-dot--active { background: rgba(39,181,119,0.95); }
.dash-scope .dash-status-dot--pending { background: rgba(240,172,70,0.95); }
.dash-scope .dash-status-dot--inactive { background: rgba(138,172,191,0.95); }
.dash-scope .dash-status-dot--missing { background: rgba(224,82,82,0.95); }
.dash-scope .dash-status-dot--attention { background: rgba(240,172,70,0.95); }
.dash-scope .dash-status-dot--notdue { background: rgba(138,172,191,0.70); }
.dash-scope .dash-status-dot--received { background: rgba(39,181,119,0.95); }
.dash-scope .dash-status-dot--muted {
    width: 6px;
    height: 6px;
    flex-basis: 6px;
    background: var(--color-text-muted);
}

/* Empty state */
.dash-scope .dash-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--color-text-muted);
    font-family: var(--font-body);
    font-size: 13px;
}

.dash-scope .dash-empty-state__title {
    font-family: var(--font-title);
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 6px;
}

.dash-scope .dash-empty-state__body {
    color: var(--color-text-muted);
    margin-bottom: 12px;
    line-height: 1.5;
}

.dash-scope .dash-empty-state__actions {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

/* Inline error */
.dash-scope .dash-inline-error {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(224,82,82,0.30);
    background: rgba(224,82,82,0.10);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 13px;
}

.dash-scope .dash-inline-error__icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(224,82,82,0.18);
    color: var(--color-negative);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex: 0 0 20px;
}

.dash-scope .dash-inline-error__actions {
    margin-top: 10px;
}

/* Tab bar (COMPONENTS.md §11) */
.dash-scope .dash-tabs {
    display: flex;
    gap: 4px;
    margin: 20px 0;
}

.dash-scope .dash-tabs__tab {
    padding: 7px 18px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.dash-scope .dash-tabs__tab:hover:not(.dash-tabs__tab--active) {
    background: var(--color-hover-bg);
    color: var(--color-brand-blue);
}

.dash-scope .dash-tabs__tab--active {
    background: var(--color-brand-blue);
    color: #fff;
}

/* Portal tabs (client-uploads Upload / Reporting) */
.dash-scope .dash-tabs--portal {
    display: inline-flex;
    gap: 0;
    margin: 0 0 20px;
    border: 1px solid var(--color-card-border);
    border-radius: 8px;
    overflow: hidden;
}

.dash-scope .dash-tabs--portal .dash-tabs__tab {
    padding: 7px 20px;
    border-radius: 0;
    font-weight: 700;
}

.dash-scope .dash-tabs--portal .dash-tabs__tab:hover:not(.dash-tabs__tab--active) {
    background: var(--color-hover-bg);
    color: var(--color-text-secondary);
}

/* App-level toast island (Routes → DashToastRoot). Must sit above full-viewport
   shells such as .dash-landing-page (position:fixed; z-index:1), otherwise the
   welcome toast paints behind the landing page after login. */
.dash-scope.dash-toast-root {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
}

/* Toast (pill, bottom-centre) — design-system transient feedback */
.dash-scope .dash-toast {
    --dash-toast-accent: var(--color-positive);
    --dash-toast-accent-rgb: 39, 181, 119;
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    z-index: 9000;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 22px 12px 16px;
    border-radius: var(--radius-pill);
    border: 0.5px solid rgba(var(--dash-toast-accent-rgb), 0.30);
    background: var(--color-card-bg, #fff);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    box-shadow:
        0 8px 32px rgba(var(--dash-toast-accent-rgb), 0.18),
        0 2px 8px rgba(0, 0, 0, 0.06);
    max-width: min(860px, calc(100vw - 24px));
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    pointer-events: none;
}

.dash-scope .dash-toast--success {
    --dash-toast-accent: var(--color-positive);
    --dash-toast-accent-rgb: 39, 181, 119;
}

.dash-scope .dash-toast--error {
    --dash-toast-accent: var(--color-negative);
    --dash-toast-accent-rgb: 224, 82, 82;
}

.dash-scope .dash-toast--warning {
    --dash-toast-accent: var(--color-warning);
    --dash-toast-accent-rgb: 176, 124, 16;
}

.dash-scope .dash-toast--info {
    --dash-toast-accent: var(--color-brand-blue);
    --dash-toast-accent-rgb: 16, 120, 190;
}

.dash-scope .dash-toast__icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(var(--dash-toast-accent-rgb), 0.12);
    color: var(--dash-toast-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    font-weight: 800;
}

.dash-scope .dash-toast__label {
    font-family: var(--font-title);
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-scope .dash-toast__sub {
    font-weight: 600;
    font-size: 12px;
    color: var(--color-text-secondary);
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-scope .dash-toast__tag {
    margin-left: 4px;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    background: rgba(var(--dash-toast-accent-rgb), 0.12);
    color: var(--dash-toast-accent);
    flex: 0 0 auto;
}

.dash-scope .dash-toast__dismiss {
    margin-left: 2px;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dash-scope .dash-toast__dismiss:hover {
    background: var(--color-hover-bg);
    color: var(--color-text-primary);
}

.dash-scope .dash-toast--in {
    opacity: 1;
    pointer-events: none;
    animation: dashToastIn 300ms ease-out;
}

.dash-scope .dash-toast--out {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
    transition: opacity 300ms ease, transform 300ms ease;
    pointer-events: none;
}

@keyframes dashToastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .dash-scope .dash-toast--in {
        animation: none;
    }

    .dash-scope .dash-toast--out {
        transition: none;
    }
}

[data-theme="dark"] .dash-scope .dash-toast {
    background: var(--color-card-bg, #0f2a3f);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Inline success (COMPONENTS.md §13) */
.dash-scope .dash-inline-success {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--color-positive);
}

.dash-scope .dash-inline-success__icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(39,181,119,0.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
}

/* Skeletons */
.dash-scope .dash-skeleton {
    height: 12px;
    width: 100%;
    border-radius: 10px;
    background: linear-gradient(
        90deg,
        var(--dash-skeleton-shimmer-a, rgba(16,120,190,0.06)) 0%,
        var(--dash-skeleton-shimmer-b, rgba(16,120,190,0.12)) 35%,
        var(--dash-skeleton-shimmer-c, rgba(16,120,190,0.06)) 70%
    );
    background-size: 220% 100%;
    animation: dashSkeletonShimmer 1.2s ease-in-out infinite;
}

@keyframes dashSkeletonShimmer {
    from { background-position: 120% 0; }
    to { background-position: -120% 0; }
}

html[data-theme="dark"] .dash-scope .dash-skeleton,
[data-theme="dark"] .dash-scope .dash-skeleton {
    --dash-skeleton-shimmer-a: rgba(148, 163, 184, 0.12);
    --dash-skeleton-shimmer-b: rgba(148, 163, 184, 0.22);
    --dash-skeleton-shimmer-c: rgba(148, 163, 184, 0.12);
}

.dash-scope .dash-skeleton-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dash-scope .dash-skeleton-text__line {
    width: 100%;
}

/* Page skeleton (first-paint / route shimmer) */
.dash-scope .dash-page-skeleton {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.dash-scope .dash-page-skeleton__heading {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.dash-scope .dash-page-skeleton__metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.75rem;
}

.dash-scope .dash-page-skeleton__metric-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1rem;
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-card);
    background: var(--color-card-bg);
    box-shadow: var(--shadow-card);
}

.dash-scope .dash-page-skeleton__content {
    min-width: 0;
}

/* Standalone spinner */
.dash-scope .dash-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--color-brand-blue);
}

.dash-scope .dash-spinner__icon {
    flex-shrink: 0;
    animation: dash-spin 0.8s linear infinite;
}

.dash-scope .dash-spinner__label {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--color-text-muted);
}

.dash-scope .dash-spinner--with-label {
    flex-direction: column;
    gap: 0.65rem;
}

/* Component loading overlay (in-place refresh spinner) */
.dash-scope .dash-loading-overlay {
    position: relative;
    min-width: 0;
    isolation: isolate;
    --dash-loading-overlay-radius: var(--radius-card);
    --dash-loading-overlay-scrim: rgba(248, 251, 255, 0.78);
    --dash-loading-overlay-scrim-end: rgba(255, 255, 255, 0.88);
    --dash-loading-overlay-border: var(--color-card-border);
    --dash-loading-overlay-halo: rgba(255, 255, 255, 0.72);
    --dash-loading-overlay-halo-border: rgba(255, 255, 255, 0.86);
    --dash-loading-overlay-inset-highlight: rgba(255, 255, 255, 0.82);
    --dash-loading-overlay-shadow: 0 8px 26px rgba(16, 120, 190, 0.08);
}

.dash-scope .dash-loading-overlay--fill {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.dash-scope .dash-loading-overlay--fill ::deep canvas {
    flex: 1 1 auto;
}

.dash-scope .dash-loading-overlay.is-loading ::deep canvas {
    filter: saturate(0.92) opacity(0.62);
}

.dash-scope .dash-loading-overlay__scrim {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--dash-loading-overlay-border);
    border-radius: var(--dash-loading-overlay-radius);
    background:
        radial-gradient(circle at 30% 18%, rgba(92, 195, 221, 0.10), transparent 34%),
        radial-gradient(circle at 78% 78%, rgba(39, 181, 119, 0.10), transparent 30%),
        linear-gradient(180deg, var(--dash-loading-overlay-scrim) 0%, var(--dash-loading-overlay-scrim-end) 100%);
    box-shadow:
        inset 0 1px 0 var(--dash-loading-overlay-inset-highlight),
        var(--dash-loading-overlay-shadow);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    cursor: progress;
    pointer-events: auto;
    animation: dash-loading-overlay-fade-in 160ms ease-out;
}

.dash-scope .dash-loading-overlay--non-blocking .dash-loading-overlay__scrim {
    pointer-events: none;
}

.dash-scope .dash-loading-overlay__scrim::before {
    content: "";
    position: absolute;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 999px;
    background: var(--dash-loading-overlay-halo);
    box-shadow:
        0 12px 28px rgba(16, 120, 190, 0.12),
        inset 0 0 0 1px var(--dash-loading-overlay-halo-border);
}

.dash-scope .dash-loading-overlay__scrim--with-message {
    gap: 0.75rem;
    flex-direction: column;
    padding: 1rem;
    text-align: center;
}

.dash-scope .dash-loading-overlay__scrim--with-message::before {
    width: min(15rem, calc(100% - 2rem));
    height: auto;
    min-height: 6.25rem;
    border-radius: 22px;
}

.dash-scope .dash-loading-overlay__spinner {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 6px rgba(16, 120, 190, 0.20));
}

.dash-scope .dash-loading-overlay__message {
    position: relative;
    z-index: 1;
    max-width: min(14rem, calc(100% - 2rem));
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.35;
}

@keyframes dash-loading-overlay-fade-in {
    from {
        opacity: 0;
        transform: scale(0.985);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

html[data-theme="dark"] .dash-scope .dash-loading-overlay,
[data-theme="dark"] .dash-scope .dash-loading-overlay {
    --dash-loading-overlay-scrim: rgba(11, 31, 48, 0.82);
    --dash-loading-overlay-scrim-end: rgba(11, 31, 48, 0.92);
    --dash-loading-overlay-halo: rgba(15, 35, 52, 0.72);
    --dash-loading-overlay-halo-border: rgba(148, 163, 184, 0.18);
    --dash-loading-overlay-inset-highlight: rgba(255, 255, 255, 0.06);
    --dash-loading-overlay-shadow: 0 8px 26px rgba(0, 0, 0, 0.28);
}

@media (prefers-reduced-motion: reduce) {
    .dash-scope .dash-spinner__icon {
        animation: none;
    }

    .dash-scope .dash-loading-overlay__scrim {
        animation: none;
    }

    .dash-scope .dash-loading-overlay.is-loading ::deep canvas {
        filter: opacity(0.68);
    }
}

/* Delta chip (KPI cards) */
.dash-scope .dash-delta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.dash-scope .dash-delta-chip--compact {
    gap: 3px;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 11px;
}

.dash-scope .dash-delta-chip--positive {
    background: rgba(39,181,119,0.12);
    color: var(--color-positive);
}

.dash-scope .dash-delta-chip--negative {
    background: rgba(224,82,82,0.12);
    color: var(--color-negative);
}

.dash-scope .dash-delta-chip--neutral {
    background: rgba(138,172,191,0.12);
    color: var(--color-text-muted);
}

/* KPI strip (emissions / energy / explore) */
.dash-scope .dash-kpi-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 900px) {
    .dash-scope .dash-kpi-strip {
        grid-template-columns: 1fr;
    }
}

.dash-scope .dash-kpi-card {
    border-radius: var(--radius-card);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.dash-scope .dash-kpi-card--strip {
    background: linear-gradient(135deg, #1078be 0%, #12b7d6 100%);
    border: none;
    box-shadow: 0 6px 28px rgba(16,120,190,0.22), 0 1px 6px rgba(16,120,190,0.12);
}

.dash-scope .dash-kpi-card--strip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 100% 0%, rgba(255,255,255,0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.dash-scope .dash-kpi-card--illus {
    box-shadow: 0 6px 28px rgba(0,0,0,0.18), 0 1px 6px rgba(0,0,0,0.10);
}

.dash-scope .dash-kpi-card--illus.dash-kpi-card--strip {
    background: transparent;
}

.dash-scope .dash-kpi-card--illus.dash-kpi-card--strip::before {
    display: none;
}

.dash-scope .dash-kpi-card__illus-host {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.dash-scope .dash-kpi-card__illus-host > svg,
.dash-scope .dash-kpi-card__illus {
    width: 100%;
    height: 100%;
    display: block;
}

.dash-scope .dash-kpi-card__content {
    position: relative;
    z-index: 1;
}

.dash-scope .dash-kpi-card--surface {
    background: var(--color-card-bg);
    border: 0.5px solid var(--color-card-border);
    box-shadow: var(--shadow-card);
    padding: 20px 22px 22px;
}

.dash-scope .dash-kpi-card--surface:hover {
    box-shadow: 0 6px 32px rgba(16,120,190,0.12), 0 1px 6px rgba(16,120,190,0.06);
    transform: translateY(-1px);
}

.dash-scope .dash-kpi-card__label {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 6px;
}

.dash-scope .dash-kpi-card--strip .dash-kpi-card__label {
    color: rgba(255,255,255,0.70);
}

.dash-scope .dash-kpi-card--surface .dash-kpi-card__label {
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
}

.dash-scope .dash-kpi-card__value {
    font-family: var(--font-title);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.4px;
    line-height: 1;
}

.dash-scope .dash-kpi-card--strip .dash-kpi-card__value {
    color: #ffffff;
}

.dash-scope .dash-kpi-card--surface .dash-kpi-card__value {
    font-size: 32px;
    letter-spacing: -0.5px;
    color: var(--color-text-primary);
}

.dash-scope .dash-kpi-card--value-sm .dash-kpi-card__value {
    font-size: 20px;
}

.dash-scope .dash-kpi-card__fraction {
    font-size: 17px;
    font-weight: 600;
}

.dash-scope .dash-kpi-card__unit {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 400;
    margin-top: 4px;
}

.dash-scope .dash-kpi-card--strip .dash-kpi-card__unit {
    color: rgba(255,255,255,0.65);
}

.dash-scope .dash-kpi-card--surface .dash-kpi-card__unit {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 0;
    margin-left: 0;
}

.dash-scope .dash-kpi-card__delta {
    margin-top: 6px;
}

.dash-scope .dash-kpi-card--strip .dash-delta-chip--positive {
    background: rgba(255,255,255,0.18);
    color: #ffffff;
}

.dash-scope .dash-kpi-card--strip .dash-delta-chip--negative {
    background: rgba(0,0,0,0.18);
    color: #ffd0d0;
}

.dash-scope .dash-kpi-card--strip .dash-delta-chip--neutral {
    background: rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.85);
}

.dash-scope .dash-kpi-card__subtitle {
    margin-top: 8px;
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 1.4;
}

.dash-scope .dash-kpi-card--strip .dash-kpi-card__subtitle {
    color: rgba(255,255,255,0.65);
}

.dash-scope .dash-kpi-card--surface .dash-kpi-card__subtitle {
    color: var(--color-text-muted);
}

.dash-scope .dash-kpi-card__sparkline {
    margin-top: 14px;
}

/* Topbar */
.dash-scope .dash-topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    height: var(--topbar-height);
    background: var(--topbar-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(16, 120, 190, 0.10);
}

.dash-scope .dash-topbar__inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
}

.dash-scope .dash-topbar__left,
.dash-scope .dash-topbar__right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-scope .dash-topbar__left {
    min-width: 0;
}

.dash-scope .dash-topbar__sep {
    width: 1px;
    height: 22px;
    background: var(--topbar-separator);
    flex: 0 0 auto;
}

.dash-scope .dash-topbar__range {
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
}

.dash-scope .dash-topbar__right {
    margin-left: auto;
    flex: 0 0 auto;
}

/* Topbar pill (period selector) */
.dash-scope .dash-filter-dd.dash-filter-dropdown--topbar .dash-filter-dd__trigger {
    padding: 8px 14px;
    border-radius: var(--radius-btn);
    border: 1px solid var(--topbar-pill-border);
    background: var(--topbar-pill-bg);
    color: var(--topbar-pill-color);
    font-weight: 700;
    font-size: 13px;
}

.dash-scope .dash-filter-dd.dash-filter-dropdown--topbar .dash-filter-dd__trigger:hover {
    border-color: var(--color-brand-blue);
    box-shadow: 0 0 0 3px rgba(16,120,190,0.10);
}

.dash-scope .dash-filter-dd.dash-filter-dropdown--topbar .dash-filter-dd__panel {
    margin-top: 8px;
}

/* Theme toggle */
/* Fixed top-right theme cycle control on anonymous auth/legal pages */
.dash-scope.dash-auth-theme-toggle {
    position: fixed;
    top: var(--space-5, 20px);
    right: var(--space-6, 24px);
    z-index: 1100;
    pointer-events: none;
}

.dash-scope .dash-auth-theme-toggle__btn {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--color-text-primary);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}

.dash-scope .dash-auth-theme-toggle__btn:hover {
    color: var(--color-brand-blue);
}

.dash-scope .dash-auth-theme-toggle__btn:focus-visible {
    outline: 2px solid var(--color-brand-blue);
    outline-offset: 2px;
}

.dash-scope .dash-auth-theme-toggle__glyph {
    display: none;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.dash-scope .dash-auth-theme-toggle__glyph svg {
    display: block;
    width: 100%;
    height: 100%;
}

.dash-scope .dash-auth-theme-toggle__btn--system .dash-auth-theme-toggle__glyph--system,
.dash-scope .dash-auth-theme-toggle__btn--light .dash-auth-theme-toggle__glyph--light,
.dash-scope .dash-auth-theme-toggle__btn--dark .dash-auth-theme-toggle__glyph--dark {
    display: inline-flex;
}

.dash-scope .dash-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--topbar-control-color, var(--color-brand-blue));
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    transition: color var(--transition-fast), opacity var(--transition-fast), transform var(--transition-fast);
}

.dash-scope .dash-theme-toggle:hover {
    color: var(--color-brand-blue);
}

.dash-scope .dash-theme-toggle:active {
    transform: scale(0.94);
}

.dash-scope .dash-theme-toggle:focus-visible {
    outline: 2px solid var(--color-brand-blue);
    outline-offset: 2px;
}

.dash-scope .dash-theme-toggle__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    pointer-events: none;
}

.dash-scope .dash-theme-toggle__icon svg {
    display: block;
    width: 16px;
    height: 16px;
}

.dash-scope .dash-theme-toggle--light {
    color: #b45309;
}

.dash-scope .dash-theme-toggle--dark {
    color: var(--color-brand-blue);
}

.dash-scope .dash-theme-toggle--mobile-nav {
    min-width: 44px;
    min-height: 44px;
}

.dash-scope .dash-theme-toggle--mobile-nav .dash-theme-toggle__icon,
.dash-scope .dash-theme-toggle--mobile-nav .dash-theme-toggle__icon svg {
    width: 18px;
    height: 18px;
}

[data-theme="dark"] .dash-scope .dash-theme-toggle {
    color: var(--topbar-control-color, #e4f0f8);
}

[data-theme="dark"] .dash-scope .dash-theme-toggle:hover {
    color: var(--color-brand-teal, #00b6d5);
}

[data-theme="dark"] .dash-scope .dash-theme-toggle--light {
    color: #fbbf24;
}

[data-theme="dark"] .dash-scope .dash-theme-toggle--dark {
    color: var(--color-brand-teal, #00b6d5);
}

/* Theme preference picker (My Account) */
.dash-scope .dash-theme-preference {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-3, 12px);
    width: 100%;
    box-sizing: border-box;
}

.dash-scope .dash-card--settings .dash-card__body > .dash-theme-preference {
    padding: var(--space-5, 20px) var(--space-6, 24px) var(--space-6, 24px);
}

.dash-scope .dash-theme-preference__option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1, 4px);
    margin: 0;
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid var(--color-border, #d7e2ec);
    background: var(--color-card-bg, #fff);
    color: var(--color-text-primary, #0f172a);
    font-family: var(--font-body);
    cursor: pointer;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.dash-scope .dash-theme-preference__option:hover {
    border-color: var(--color-brand-blue);
}

.dash-scope .dash-theme-preference__option:focus-visible {
    outline: 2px solid var(--color-brand-blue);
    outline-offset: 2px;
}

.dash-scope .dash-theme-preference__option--selected {
    border-color: var(--color-brand-blue);
    box-shadow: 0 0 0 1px var(--color-brand-blue);
    background: rgba(16, 120, 190, 0.06);
}

.dash-scope .dash-theme-preference__icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    color: var(--color-brand-blue);
    margin-bottom: 4px;
}

.dash-scope .dash-theme-preference__icon svg {
    width: 20px;
    height: 20px;
}

.dash-scope .dash-theme-preference__label {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.dash-scope .dash-theme-preference__hint {
    font-size: 11px;
    color: var(--color-text-secondary, #64748b);
    line-height: 1.3;
}

[data-theme="dark"] .dash-scope .dash-theme-preference__option {
    background: var(--color-card-bg);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .dash-scope .dash-theme-preference__option--selected {
    background: rgba(16, 120, 190, 0.18);
}

@media (max-width: 640px) {
    .dash-scope .dash-theme-preference {
        grid-template-columns: 1fr;
        gap: var(--space-2, 8px);
    }

    .dash-scope .dash-card--settings .dash-card__body > .dash-theme-preference {
        padding: var(--space-4, 16px) var(--space-5, 20px) var(--space-5, 20px);
    }
}

/* Tooltips (design-system.html, emissions pivot) */
.dash-scope .dash-tooltip-wrap {
    position: relative;
    display: inline-block;
}

.dash-scope .dash-tooltip-box {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #0d2d45;
    color: #cce6f4;
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 8px;
    padding: 7px 11px;
    max-width: 210px;
    white-space: normal;
    width: max-content;
    line-height: 1.45;
    pointer-events: none;
    z-index: 10;
}

.dash-scope .dash-tooltip-box::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-top: 6px solid #0d2d45;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
}

.dash-scope .dash-tooltip-box--light {
    background: #fff;
    color: var(--color-text-primary);
    border: 1px solid var(--color-card-border);
    box-shadow: var(--shadow-card);
}

.dash-scope .dash-tooltip-box--light::after {
    border-top-color: #fff;
}

.dash-scope .dash-tooltip-box--right {
    top: 50%;
    bottom: auto;
    left: calc(100% + 10px);
    transform: translateY(-50%);
}

.dash-scope .dash-tooltip-box--right::after {
    top: 50%;
    left: auto;
    right: 100%;
    transform: translateY(-50%);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-right: 6px solid #0d2d45;
    border-left: none;
}

.dash-scope .dash-tooltip-trigger {
    font-family: var(--font-body);
    font-size: 13px;
    text-decoration: underline dotted;
    color: var(--color-text-secondary);
    cursor: default;
    margin-top: 10px;
    display: block;
}

/* Interactive hover tooltips (body portal — matches design-system.html §18) */
.dash-scope .dash-hover-tooltip {
    display: inline-flex;
    max-width: 100%;
}

.dash-scope .dash-hover-tooltip > [data-dash-tip] {
    display: inline-flex;
    max-width: 100%;
}

#dash-hover-tooltip-host.dash-hover-tooltip__bubble {
    position: fixed;
    z-index: 10050;
    pointer-events: none;
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 8px;
    padding: 7px 11px;
    max-width: 210px;
    width: max-content;
    white-space: normal;
    line-height: 1.45;
    animation: dash-hover-tooltip-in 0.12s ease-out;
}

#dash-hover-tooltip-host.dash-hover-tooltip__bubble--multiline {
    max-width: 22rem;
}

#dash-hover-tooltip-host .dash-hover-tooltip__text--multiline {
    display: block;
    white-space: pre-line;
    max-width: 22rem;
    line-height: 1.45;
    font-weight: 500;
}

#dash-hover-tooltip-host.dash-hover-tooltip__bubble--dark {
    background: #0d2d45;
    color: #cce6f4;
}

[data-theme="dark"] #dash-hover-tooltip-host.dash-hover-tooltip__bubble--dark {
    background: #164060;
    color: #e4f0f8;
    border: 1px solid rgba(255, 255, 255, 0.10);
}

#dash-hover-tooltip-host.dash-hover-tooltip__bubble--light {
    background: #fff;
    color: var(--color-text-primary);
    border: 1px solid var(--color-card-border);
    box-shadow: var(--shadow-card);
}

[data-theme="dark"] #dash-hover-tooltip-host.dash-hover-tooltip__bubble--light {
    background: var(--color-card-bg);
    color: var(--color-text-primary);
    border-color: var(--color-card-border);
}

#dash-hover-tooltip-host.dash-hover-tooltip__bubble--right,
#dash-hover-tooltip-host.dash-hover-tooltip__bubble--left {
    background: #0d2d45;
    color: #cce6f4;
}

[data-theme="dark"] #dash-hover-tooltip-host.dash-hover-tooltip__bubble--right,
[data-theme="dark"] #dash-hover-tooltip-host.dash-hover-tooltip__bubble--left {
    background: #164060;
    color: #e4f0f8;
    border: 1px solid rgba(255, 255, 255, 0.10);
}

#dash-hover-tooltip-host.dash-hover-tooltip__bubble--above::after,
#dash-hover-tooltip-host.dash-hover-tooltip__bubble--below::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
}

#dash-hover-tooltip-host.dash-hover-tooltip__bubble--above::after {
    top: 100%;
    border-top: 6px solid #0d2d45;
}

#dash-hover-tooltip-host.dash-hover-tooltip__bubble--below::after {
    bottom: 100%;
    border-bottom: 6px solid #0d2d45;
}

[data-theme="dark"] #dash-hover-tooltip-host.dash-hover-tooltip__bubble--dark.dash-hover-tooltip__bubble--above::after,
[data-theme="dark"] #dash-hover-tooltip-host.dash-hover-tooltip__bubble--dark.dash-hover-tooltip__bubble--below::after {
    border-top-color: #164060;
    border-bottom-color: #164060;
}

#dash-hover-tooltip-host.dash-hover-tooltip__bubble--light.dash-hover-tooltip__bubble--above::after {
    border-top-color: #fff;
}

#dash-hover-tooltip-host.dash-hover-tooltip__bubble--light.dash-hover-tooltip__bubble--below::after {
    border-bottom-color: #fff;
}

[data-theme="dark"] #dash-hover-tooltip-host.dash-hover-tooltip__bubble--light.dash-hover-tooltip__bubble--above::after {
    border-top-color: var(--color-card-bg);
}

[data-theme="dark"] #dash-hover-tooltip-host.dash-hover-tooltip__bubble--light.dash-hover-tooltip__bubble--below::after {
    border-bottom-color: var(--color-card-bg);
}

#dash-hover-tooltip-host.dash-hover-tooltip__bubble--right::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-right: 6px solid #0d2d45;
}

#dash-hover-tooltip-host.dash-hover-tooltip__bubble--left::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid #0d2d45;
}

[data-theme="dark"] #dash-hover-tooltip-host.dash-hover-tooltip__bubble--right::after,
[data-theme="dark"] #dash-hover-tooltip-host.dash-hover-tooltip__bubble--left::after {
    border-right-color: #164060;
    border-left-color: #164060;
}

.dash-hover-tooltip--hidden {
    opacity: 0 !important;
    visibility: hidden !important;
}

@keyframes dash-hover-tooltip-in {
    from {
        opacity: 0;
        transform: translate(-50%, calc(-100% - 6px));
    }
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    #dash-hover-tooltip-host.dash-hover-tooltip__bubble {
        animation: none;
    }
}

[data-theme="dark"] .dash-scope .dash-tooltip-box--light {
    background: var(--color-card-bg);
    color: var(--color-text-primary);
    border-color: var(--color-card-border);
}

[data-theme="dark"] .dash-scope .dash-tooltip-box--light::after {
    border-top-color: var(--color-card-bg);
}

[data-theme="dark"] .dash-scope .dash-tooltip-box--right::after {
    border-right-color: #164060;
}

[data-theme="dark"] .dash-scope .dash-tooltip-box {
    background: #164060;
    color: #e4f0f8;
    border: 1px solid rgba(255, 255, 255, 0.10);
}

[data-theme="dark"] .dash-scope .dash-tooltip-box::after {
    border-top-color: #164060;
}

.dash-scope .dash-dropdown-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(16, 120, 190, 0.12);
    color: var(--color-brand-blue);
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: auto;
}

