/* Dashboard presentation only. Operational forms retain their own layout. */
html:root .ginoma-dashboard {
    --dash-paper: #18212e;
    --dash-soft: #1d2938;
    --dash-line: #314052;
    --dash-ink: #edf2f7;
    --dash-muted: #acbbcb;
    color: var(--dash-ink);
    font-family: "Segoe UI", Arial, sans-serif;
    font-variant-numeric: tabular-nums;
}
html:root[data-theme="light"] .ginoma-dashboard {
    --dash-paper: #fff;
    --dash-soft: color-mix(in srgb, var(--ginoma-primary) 5%, white);
    --dash-line: color-mix(in srgb, var(--ginoma-primary) 14%, #e4e9ee);
    --dash-ink: #233447;
    --dash-muted: #526477;
}
html:root .ginoma-dashboard.ginoma-dashboard > .adm-header {
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--dash-line) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 8px 0 20px;
    margin-bottom: 24px;
}
html:root .ginoma-dashboard.ginoma-dashboard > .adm-header h1 {
    color: var(--dash-ink) !important;
    font-size: clamp(20px, 2vw, 27px);
    font-weight: 600;
    letter-spacing: -.6px;
}
html:root .ginoma-dashboard.ginoma-dashboard :is(.dashboard-chart-panel, .dashboard-radar-panel, .gio-chart-card, .gio-company-chart, .sgm-dashboard-section, .sge-health-card) {
    background: var(--dash-paper) !important;
    border: 1px solid var(--dash-line) !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    padding: 22px !important;
    color: var(--dash-ink) !important;
    min-width: 0;
}
html:root .ginoma-dashboard.ginoma-dashboard :is(.gma-kpi, .sgm-dashboard-metric, .sge-indicator-card) {
    background: var(--dash-paper) !important;
    border: 1px solid var(--dash-line) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    padding: 18px 20px !important;
    min-height: 112px;
    text-align: left;
    transform: none !important;
}
html:root .ginoma-dashboard.ginoma-dashboard :is(.gma-kpi, .sgm-dashboard-metric, .sge-indicator-card)::before,
html:root .ginoma-dashboard.ginoma-dashboard :is(.gma-kpi, .sgm-dashboard-metric, .sge-indicator-card)::after {
    display: none !important;
}
html:root .ginoma-dashboard.ginoma-dashboard :is(.gma-kpi-button, .sgm-dashboard-metric.is-clickable, .sge-indicator-card):hover {
    border-color: var(--ginoma-primary) !important;
    background: var(--dash-soft) !important;
}
html:root .ginoma-dashboard.ginoma-dashboard :is(.gma-kpi, .sgm-dashboard-metric) strong {
    font-size: clamp(25px, 2.2vw, 34px) !important;
    font-weight: 600 !important;
    line-height: 1.2;
    letter-spacing: -.8px;
    color: var(--dash-ink) !important;
    text-shadow: none !important;
}
html:root .ginoma-dashboard.ginoma-dashboard :is(.gma-kpi > span, .sgm-dashboard-metric-top span) {
    color: var(--dash-muted) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: .15px;
    text-transform: none;
}
html:root .ginoma-dashboard.ginoma-dashboard :is(.gma-kpi em, .sgm-dashboard-metric small) {
    color: var(--dash-muted) !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    font-style: normal;
}
html:root .ginoma-dashboard.ginoma-dashboard :is(.gma-kpi.is-selected, .gma-kpi.is-active, .gma-kpi.active, .sgm-dashboard-metric.is-selected) {
    border-color: var(--ginoma-primary) !important;
    box-shadow: inset 0 -3px var(--ginoma-primary) !important;
}
html:root .ginoma-dashboard.ginoma-dashboard :is(.gma-kpi.critical, .sgm-dashboard-metric.is-critical) { border-left: 3px solid #e57575 !important; }
html:root .ginoma-dashboard.ginoma-dashboard :is(.gma-kpi.success, .sgm-dashboard-metric.is-success) { border-left: 3px solid #4ba68a !important; }
html:root .ginoma-dashboard.ginoma-dashboard :is(.ginoma-chart-title, .sge-chart-heading h3, .sga-panel-title, .gio-chart-head strong, .gio-company-chart-head strong, .dashboard-chart-panel > h3) {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--dash-ink) !important;
    letter-spacing: -.15px;
    text-transform: none !important;
    text-shadow: none !important;
}
html:root .ginoma-dashboard.ginoma-dashboard :is(.sge-dashboard-filters, .sgd-dashboard-filters, .sgm-dashboard-filter-panel, .gio-dashboard-filters, .sga-command-bar, .sct-filter-row, .sup-filter-row) {
    background: var(--dash-soft) !important;
    border: 1px solid var(--dash-line) !important;
    box-shadow: none !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin-block: 18px !important;
    gap: 12px;
}
html:root .ginoma-dashboard.ginoma-dashboard :is(.sge-dashboard-filter, .sgd-dashboard-filter) > span { color: var(--dash-muted) !important; }
html:root .ginoma-dashboard.ginoma-dashboard :is(.mud-tabs-tabbar, .mud-tabs-toolbar) {
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: 1px solid var(--dash-line);
    margin-bottom: 20px;
}
html:root .ginoma-dashboard.ginoma-dashboard .mud-tab {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
    color: var(--dash-muted) !important;
}
html:root .ginoma-dashboard.ginoma-dashboard .mud-tab.mud-tab-active { color: var(--ginoma-primary) !important; }
html:root .ginoma-dashboard.ginoma-dashboard :is(.ginoma-horizontal-bar-track, .dashboard-bar-track) {
    background: var(--dash-soft) !important;
    border: 0 !important;
    box-shadow: none !important;
    height: 8px;
    border-radius: 4px;
}
html:root .ginoma-dashboard.ginoma-dashboard :is(.ginoma-horizontal-bar-fill, .ginoma-vertical-bar-fill) {
    background: var(--bar-color, var(--ginoma-primary)) !important;
    box-shadow: none !important;
    border-radius: 4px;
}
html:root .ginoma-dashboard.ginoma-dashboard :is(.ginoma-horizontal-bar-label, .ginoma-vertical-bar-label, .ginoma-vertical-bar-value, .ginoma-donut-value-row span, .ginoma-donut-value-row strong, .gio-chart-legend span, .gio-chart-legend strong) {
    color: var(--dash-ink) !important;
    font-weight: 500;
    text-shadow: none !important;
}
html:root .ginoma-dashboard.ginoma-dashboard :is(.ginoma-donut-value-row, .gio-chart-legend > div, .sge-pie-legend > button) {
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--dash-line) !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding-block: 10px;
}
html:root .ginoma-dashboard.ginoma-dashboard :is(.gio-donut, .sge-pie-visual) { box-shadow: none !important; filter: none !important; }
html:root .ginoma-dashboard.ginoma-dashboard :is(.gio-donut > div, .sge-pie-center) { background: var(--dash-paper) !important; box-shadow: none !important; color: var(--dash-ink) !important; }
html:root .ginoma-dashboard.ginoma-dashboard .gio-donut > div { width: 108px; }
html:root .ginoma-dashboard.ginoma-dashboard :is(.gio-donut strong, .sge-pie-center strong) { color: var(--dash-ink) !important; }
html:root .ginoma-dashboard.ginoma-dashboard :is(.gio-chart-head span, .gio-company-chart-head span, .gio-chart-legend em, .ginoma-donut-value-row em) { color: var(--dash-muted) !important; font-weight: 400; }
html:root .ginoma-dashboard.ginoma-dashboard :is(.dashboard-chart-grid, .adm-dashboard-chart-grid, .sge-dashboard-grid, .sgm-dashboard-layout, .gio-chart-grid, .sgc-chart-grid, .sga-executive-grid) { gap: 20px; }
html:root .ginoma-dashboard.ginoma-dashboard button:focus-visible { outline: 2px solid var(--ginoma-primary); outline-offset: 3px; }
html:root .ginoma-dashboard.ginoma-dashboard :is(.adm-tabs, .sgm-dashboard-tabs, .mud-tabs-panels, .mud-tab-panel, .ginoma-donut-shell, .sge-static-bars, .sge-chart-heading) {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
}
html:root .ginoma-dashboard.ginoma-dashboard .mud-tab::before,
html:root .ginoma-dashboard.ginoma-dashboard .mud-tab::after { display: none !important; }
html:root .ginoma-dashboard.ginoma-dashboard .mud-tab .mud-icon-root { color: inherit !important; }
html:root .ginoma-dashboard.ginoma-dashboard .gma-kpi { justify-items: start !important; align-content: start; gap: 9px; }
html:root .ginoma-dashboard.ginoma-dashboard .gma-kpi strong { text-align: left !important; justify-self: start !important; }
html:root .ginoma-dashboard.ginoma-dashboard .gma-kpi > .mud-icon-root { width: 21px; height: 21px; }
html:root .ginoma-dashboard.ginoma-dashboard .adm-dashboard-kpi {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto auto !important;
}
html:root .ginoma-dashboard.ginoma-dashboard .adm-dashboard-kpi > span { grid-column: 1; grid-row: 1; }
html:root .ginoma-dashboard.ginoma-dashboard .adm-dashboard-kpi > .mud-icon-root { grid-column: 2; grid-row: 1; }
html:root .ginoma-dashboard.ginoma-dashboard .adm-dashboard-kpi > strong { grid-column: 1 / -1; grid-row: 2; }
html:root .ginoma-dashboard.ginoma-dashboard .adm-dashboard-kpi > em { grid-column: 1 / -1; grid-row: 3; }
html:root .ginoma-dashboard.ginoma-dashboard :is(.adm-dashboard-chart-grid, .adm-dashboard-executive-grid, .sga-dashboard-shell, .gio-dashboard-shell) {
    background: transparent !important; border: 0 !important; box-shadow: none !important;
}
html:root .ginoma-dashboard.ginoma-dashboard .adm-dashboard-executive-grid { margin-block: 20px; }
html:root .ginoma-dashboard.ginoma-dashboard .adm-dashboard-alerts { padding: 14px 18px !important; background: var(--dash-soft) !important; }
html:root .ginoma-dashboard.ginoma-dashboard .adm-alert-item { background: transparent !important; border: 0 !important; box-shadow: none !important; min-height: 60px; }
html:root .ginoma-dashboard.ginoma-dashboard .ginoma-vertical-bar-track { background: transparent !important; border: 0 !important; box-shadow: none !important; }
html:root .ginoma-dashboard.ginoma-dashboard .sge-static-bar span { border-radius: 5px 5px 0 0; max-width: 48px; }
html:root .ginoma-dashboard.ginoma-dashboard .adm-stack > .adm-panel {
    background: var(--dash-paper) !important; border: 1px solid var(--dash-line) !important; border-radius: 14px; box-shadow: none !important;
}
html:root .ginoma-dashboard.ginoma-dashboard .ginoma-apex-card { container-type: inline-size; }
@container (max-width: 500px) {
    html:root .ginoma-dashboard.ginoma-dashboard .ginoma-donut-shell { grid-template-columns: minmax(0, 1fr); }
    html:root .ginoma-dashboard.ginoma-dashboard .ginoma-donut-value-legend { width: 100%; min-width: 0; }
}
@media (max-width: 700px) {
    html:root .ginoma-dashboard.ginoma-dashboard :is(.dashboard-chart-panel, .gio-chart-card, .gio-company-chart) { padding: 15px !important; }
    html:root .ginoma-dashboard.ginoma-dashboard .gio-donut-wrap { grid-template-columns: 1fr; justify-items: center; }
    html:root .ginoma-dashboard.ginoma-dashboard .gio-chart-legend { width: 100%; }
}

/* Record dialog sits above dashboard drill-down panels. */
.mud-dialog-container:has(.dashboard-record-dialog) { z-index: 25000 !important; }
.dashboard-record-editor { width: 100%; height: 75vh; border: 0; display: block; }
.dashboard-record-embedded > .mud-appbar, .dashboard-record-embedded > .mud-drawer { display: none !important; }
.dashboard-record-embedded > .mud-main-content { padding: 0 !important; margin: 0 !important; }
.dashboard-record-link { font: inherit; color: var(--ginoma-primary); background: transparent; border: 0; text-align: left; cursor: pointer; }
.dashboard-record-link:hover { text-decoration: underline; }
.dashboard-record-link:focus-visible { outline: 2px solid var(--ginoma-primary); outline-offset: 2px; }
button.sgm-dashboard-alert { width: 100%; font: inherit; text-align: left; cursor: pointer; }
button.sgm-dashboard-alert:hover { filter: brightness(1.1); }
