h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    inset-inline-start: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    inset-inline-end: 0.75rem;
    top: 0.5rem;
}

/* ---------- Dashboard shell ---------- */

body {
    background-color: var(--bs-tertiary-bg);
}

html[lang=ar] body {
    font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", system-ui, sans-serif;
}

.dash-shell {
    min-height: 100vh;
}

.dash-logo {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    border-radius: var(--rax-radius);
    color: var(--bs-white);
    background: linear-gradient(135deg, var(--bs-primary), color-mix(in srgb, var(--bs-primary) 55%, var(--bs-info)));
}

.dash-logo-brand,
img.dash-logo {
    background: transparent;
    object-fit: contain;
    border-radius: 6px;
}

.dash-logo svg {
    width: 1.125rem;
    height: 1.125rem;
}

.dash-brand {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.dash-brand strong {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-brand small {
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-topbar {
    border-start-start-radius: inherit;
    border-start-end-radius: inherit;
}

.dash-topbar .rax-navbar-bar {
    gap: 0.5rem;
    padding-inline: 0.75rem;
}

.dash-search {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: min(22rem, 100%);
    height: 2.25rem;
    padding-inline: 0.75rem 0.375rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--rax-radius);
    background: color-mix(in srgb, var(--bs-body-bg) 70%, transparent);
    color: var(--bs-secondary-color);
    font-size: 0.875rem;
    text-align: start;
    transition: border-color 150ms ease, color 150ms ease;
}

.dash-search:hover {
    border-color: color-mix(in srgb, var(--bs-primary) 45%, var(--bs-border-color));
    color: var(--bs-body-color);
}

.dash-search:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.dash-search span {
    flex: 1;
}

.dash-search kbd {
    padding: 0.125rem 0.375rem;
    border: 1px solid var(--bs-border-color);
    border-radius: calc(var(--rax-radius) * 0.6);
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    font-size: 0.6875rem;
    font-family: inherit;
}

.dash-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-inline-start: auto;
}

.dash-actions .btn-icon {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    display: inline-grid;
    place-items: center;
}

.dash-lang {
    gap: 0.375rem;
}

.dash-user-trigger {
    padding: 0.125rem;
    border-radius: 999px;
}

.dash-check,
.dash-check-end {
    display: inline-flex;
    width: 1rem;
    color: var(--bs-primary);
}

.dash-check-end {
    margin-inline-start: auto;
}

.dash-swatch {
    width: 0.875rem;
    height: 0.875rem;
    border-radius: 999px;
    background: var(--bs-primary);
    box-shadow: inset 0 0 0 1px rgba(var(--bs-emphasis-color-rgb), 0.15);
}

.dash-swatch[data-rax-accent=blue] {
    background: var(--bs-blue);
}

[dir=rtl] .dash-flip-rtl {
    transform: scaleX(-1);
}

.dash-main {
    flex: 1;
    width: 100%;
    max-width: 96rem;
    margin-inline: auto;
    padding: 1.5rem;
}

/* Workaround: Chart's screen-reader <table class="visually-hidden"> cannot shrink below its rows (tables ignore
   height), so it overflowed the chart and lengthened the page. Clipping keeps it readable but out of layout. */
.rax-chart {
    overflow: clip;
}

/* ---------- Pages ---------- */

.dash-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dash-page-header h1 {
    margin: 0 0 0.25rem;
    font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.75rem);
    font-weight: 650;
    letter-spacing: -0.02em;
}

.dash-page-header p {
    margin: 0;
    color: var(--bs-secondary-color);
}

.dash-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 575.98px) {
    .dash-kpis { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 1200px) {
    .dash-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.dash-kpi-icon {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--rax-radius);
    color: var(--bs-primary);
    background: color-mix(in srgb, var(--bs-primary) 12%, transparent);
}

.dash-kpi-value {
    font-size: 1.75rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    direction: ltr;
    unicode-bidi: isolate;
}

.dash-kpi-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--bs-secondary-color);
    font-size: 0.8125rem;
}

.dash-kpi-trend svg {
    width: 0.875rem;
    height: 0.875rem;
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
}

.dash-grid > * {
    grid-column: 1 / -1;
    min-width: 0;
}

.dash-grid h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

@media (min-width: 992px) {
    .dash-grid > .dash-span-8 { grid-column: span 8; }
    .dash-grid > .dash-span-4 { grid-column: span 4; }
    .dash-grid > .dash-span-5 { grid-column: span 5; }
    .dash-grid > .dash-span-7 { grid-column: span 7; }
}

@media (min-width: 992px) and (max-width: 1399.98px) {
    .dash-grid > .dash-span-5,
    .dash-grid > .dash-span-7 { grid-column: 1 / -1; }
}

.dash-table-content {
    padding-inline: 0;
    padding-bottom: 0.5rem;
}

.dash-table-content th:first-child,
.dash-table-content td:first-child {
    padding-inline-start: 1.5rem;
}

.dash-table-content th:last-child,
.dash-table-content td:last-child {
    padding-inline-end: 1.5rem;
}

.dash-customer {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
}

.dash-num {
    text-align: end;
    font-variant-numeric: tabular-nums;
}

.dash-table-content td,
.dash-table-content th {
    white-space: nowrap;
}

.dash-mono {
    font-family: var(--bs-font-monospace);
    font-size: 0.8125rem;
    color: var(--bs-secondary-color);
}

.dash-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.dash-link svg {
    width: 1rem;
    height: 1rem;
}

.dash-placeholder {
    display: grid;
    gap: 1.25rem;
    padding-block: 0.5rem;
}

.dash-placeholder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 1rem;
}

.dash-page-header > .rax-button,
.dash-page-header > .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
}

.dash-page-header svg,
.dash-stat svg,
.rax-data-table-toolbar svg {
    width: 1rem;
    height: 1rem;
}

.dash-status {
    display: block;
    min-height: 1.25rem;
    margin-top: 0.5rem;
    color: var(--bs-secondary-color);
    font-size: 0.8125rem;
}

.dash-grid > .dash-span-12 { grid-column: 1 / -1; }

/* E-commerce dashboard */

.dash-page-header-end {
    align-items: flex-end;
    flex-wrap: wrap;
}

.dash-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dash-filter {
    min-width: 10rem;
}

.dash-small { font-size: 0.8125rem; }

.dash-headline {
    font-size: 1.625rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.dash-headline small {
    color: var(--bs-secondary-color);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0;
}

/* Six headline figures in one card, divided by hairlines instead of six boxes. */
.dash-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
}

.dash-kpi-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    padding: 1.125rem 1.25rem;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.dash-kpi-stat:nth-child(odd) {
    border-inline-end: 1px solid var(--bs-border-color-translucent);
}

.dash-kpi-stat:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.dash-kpi-stat-label {
    color: var(--bs-secondary-color);
    font-size: 0.8125rem;
}

.dash-kpi-stat-value {
    font-size: 1.625rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.dash-kpi-stat-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
}

.dash-kpi-stat-foot svg {
    width: 0.75rem;
    height: 0.75rem;
}

/* Category share: one bar split into segments with a 2px surface gap. The --rax-chart-* slots are only
   defined inside .rax-chart, so map the same four here to keep identical colours. */
.dash-split,
.dash-legend-row {
    --rax-chart-1: var(--bs-primary);
    --rax-chart-2: var(--bs-info);
    --rax-chart-3: var(--bs-success);
    --rax-chart-4: var(--bs-warning);
}

.dash-split {
    display: flex;
    gap: 2px;
    height: 0.625rem;
    overflow: hidden;
    border-radius: 999px;
}

.dash-split > span:first-child { border-start-start-radius: 999px; border-end-start-radius: 999px; }
.dash-split > span:last-child { border-start-end-radius: 999px; border-end-end-radius: 999px; }

.dash-legend-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.875rem;
    margin: 0.625rem 0 1rem;
    padding: 0;
    list-style: none;
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
}

.dash-legend-row li {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.dash-swatch-sq {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 2px;
}

.dash-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dash-list > li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.dash-list-value {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dash-stock-item .rax-progress,
.dash-stock-item > :last-child {
    width: 6rem;
    flex-shrink: 0;
}

.dash-counters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 1rem 0;
}

.dash-counters > div {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--rax-radius);
    background: rgba(var(--bs-emphasis-color-rgb), 0.04);
}

.dash-counters span {
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
}

.dash-counters strong {
    font-size: 1.125rem;
    font-variant-numeric: tabular-nums;
}

.dash-subhead {
    margin: 0 0 0.625rem;
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dash-bars {
    display: grid;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.dash-bars > li {
    display: grid;
    grid-template-columns: 2rem 1fr 3rem;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.75rem;
}

.dash-bars-label {
    color: var(--bs-secondary-color);
    white-space: nowrap;
}

.dash-bars-value {
    color: var(--bs-secondary-color);
    font-variant-numeric: tabular-nums;
    text-align: end;
}

.dash-reviewers {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dash-quote {
    margin: 0;
    padding: 0.875rem 1rem;
    border-radius: var(--rax-radius);
    background: rgba(var(--bs-emphasis-color-rgb), 0.04);
}

.dash-quote p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
}

.dash-quote footer {
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
}

.dash-soon {
    margin-inline-start: auto;
    padding: 0 0.375rem;
    border-radius: 999px;
    background: rgba(var(--bs-emphasis-color-rgb), 0.06);
    color: var(--bs-secondary-color);
    font-size: 0.625rem;
}

@media (min-width: 992px) {
    .dash-grid > .dash-span-4 { grid-column: span 4; }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .dash-grid > .dash-span-4 { grid-column: span 6; }
}

/* CRM dashboard */

.dash-gap { margin: 0.625rem 0 0; }

@media (min-width: 992px) {
    .dash-grid > .dash-span-8 { grid-column: span 8; }
    .dash-kpi-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .dash-kpi-grid-4 > .dash-kpi-stat { border-bottom: 0; border-inline-end: 1px solid var(--bs-border-color-translucent); }
    .dash-kpi-grid-4 > .dash-kpi-stat:last-child { border-inline-end: 0; }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .dash-grid > .dash-span-8,
    .dash-grid > .dash-span-4 { grid-column: 1 / -1; }
}

/* Chart with a narrow summary column beside it. */
.dash-chart-aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 13rem;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 767.98px) {
    .dash-chart-aside { grid-template-columns: minmax(0, 1fr); }
}

.dash-aside {
    display: grid;
    gap: 1.25rem;
}

.dash-aside > div {
    display: grid;
    gap: 0.375rem;
}

.dash-aside > div + div {
    padding-top: 1.25rem;
    border-top: 1px solid var(--bs-border-color-translucent);
}

.dash-aside-value {
    font-size: 1.5rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.dash-funnel {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dash-funnel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
}

.dash-dot[data-stage="0"] { background: var(--bs-secondary-color); }
.dash-dot[data-stage="1"] { background: var(--bs-primary); }
.dash-dot[data-stage="2"] { background: var(--bs-info); }
.dash-dot[data-stage="3"] { background: var(--bs-warning); }
.dash-dot[data-stage="4"] { background: var(--bs-success); }

.dash-counters-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0;
}

.dash-health {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 11rem;
    font-size: 0.8125rem;
}

.dash-health .rax-progress,
.dash-health > :first-child {
    width: 4.5rem;
    flex-shrink: 0;
}

/* Analytics dashboard */

.dash-tabs > [role=tabpanel] {
    margin-top: 1rem;
}

/* RaxUI Tabs lists don't scroll on their own; five tabs overflow a phone and widened the whole page. */
.dash-tabs > .rax-tabs-list {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.dash-tabs > .rax-tabs-list > .rax-tabs-trigger {
    flex-shrink: 0;
}

@media (min-width: 992px) {
    .dash-kpi-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .dash-kpi-grid-5 > .dash-kpi-stat { border-bottom: 0; border-inline-end: 1px solid var(--bs-border-color-translucent); }
    .dash-kpi-grid-5 > .dash-kpi-stat:last-child { border-inline-end: 0; }
    .dash-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; }
}

.dash-country {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.dash-code {
    display: inline-grid;
    place-items: center;
    min-width: 1.75rem;
    padding: 0.0625rem 0.25rem;
    border-radius: 4px;
    background: rgba(var(--bs-emphasis-color-rgb), 0.06);
    color: var(--bs-secondary-color);
    font-family: var(--bs-font-monospace);
    font-size: 0.6875rem;
}

/* Customers */

.dash-customer-trigger {
    min-height: 2.5rem;
    padding: 0;
    border: 0;
    border-radius: var(--rax-radius);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: start;
    cursor: pointer;
}

.dash-customer-trigger:hover .dash-brand strong {
    color: var(--bs-primary-text-emphasis);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.dash-customer-trigger:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 4px; }

.dash-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.dash-stat { min-width: 0; }

.dash-stat .card-body {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
}

.dash-stat-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 2rem;
}

.dash-stat-heading svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    color: var(--bs-primary-text-emphasis);
}

.dash-stat-label {
    color: var(--bs-secondary-color);
    font-size: 0.8125rem;
}

.dash-stat-value {
    font-size: clamp(1.5rem, 2vw, 1.875rem);
    font-weight: 650;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
    text-align: start;
    unicode-bidi: plaintext;
}

.dash-stat-detail {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    margin-top: 1.125rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--bs-border-color-translucent);
    color: var(--bs-secondary-color);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.dash-stat-detail strong {
    color: var(--bs-emphasis-color);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

@media (min-width: 1200px) {
    .dash-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .dash-stats { gap: 0.75rem; }
    .dash-stat .card-body { padding: 1rem; }
    .dash-stat-label, .dash-stat-detail { font-size: 0.75rem; }
    .dash-stat-heading { min-height: 2.5rem; }
}

/* Customer details */

dialog.rax-sheet-content.dash-customer-sheet[data-side],
dialog.rax-sheet-content.dash-task-sheet[data-side] {
    width: min(30rem, calc(100vw - 1rem));
    height: calc(100dvh - 1rem);
    bottom: 0.5rem;
    max-height: calc(100dvh - 1rem);
}

.dash-customer-sheet .rax-sheet-header,
.dash-task-sheet .rax-sheet-header {
    padding-block: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.dash-customer-sheet .rax-sheet-title, .dash-task-sheet .rax-sheet-title { font-size: 0.9375rem; }
.dash-customer-sheet .rax-sheet-body, .dash-task-sheet .rax-sheet-body { flex: 1 1 auto; padding-block: 1.5rem; }
.dash-customer-identity { display: flex; align-items: flex-start; gap: 1rem; }
.dash-customer-identity-text { min-width: 0; }
.dash-customer-identity h3 { margin: 0 0 0.25rem; font-size: 1.25rem; font-weight: 650; overflow-wrap: anywhere; }
.dash-customer-identity p { margin: 0; color: var(--bs-secondary-color); font-size: 0.8125rem; overflow-wrap: anywhere; text-align: start; }
[dir=rtl] .dash-customer-identity p { text-align: right; }
.dash-customer-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.875rem; }

.dash-customer-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 1.5rem 0;
    border-block: 1px solid var(--bs-border-color-translucent);
}

.dash-customer-metrics > div { min-width: 0; padding-block: 1rem; }
.dash-customer-metrics dt { color: var(--bs-secondary-color); font-size: 0.8125rem; font-weight: 400; }
.dash-customer-metrics dd { margin: 0.375rem 0 0; font-size: 1.125rem; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; text-align: start; unicode-bidi: plaintext; }
.dash-customer-metrics > .dash-customer-spent { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--bs-border-color-translucent); }
.dash-customer-spent dd { margin: 0; font-size: 1.75rem; }
.dash-customer-metrics > div:last-child { padding-inline-start: 1rem; border-inline-start: 1px solid var(--bs-border-color-translucent); }
.dash-customer-account h3 { margin: 0 0 0.625rem; font-size: 0.875rem; font-weight: 600; }
.dash-customer-account dl { margin: 0; }
.dash-customer-account dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1.25rem; padding-block: 0.625rem; font-size: 0.8125rem; }
.dash-customer-account dt { flex-shrink: 0; color: var(--bs-secondary-color); font-weight: 400; }
.dash-customer-account dd { margin: 0; text-align: end; overflow-wrap: anywhere; }
.dash-customer-sheet .rax-sheet-footer, .dash-task-sheet .rax-sheet-footer { flex-direction: row; justify-content: space-between; border-top: 1px solid var(--bs-border-color-translucent); padding-block: 1rem; }
.dash-customer-sheet .rax-sheet-footer .rax-button, .dash-task-sheet .rax-sheet-footer .rax-button { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; }

/* Task details */

.dash-task-detail-heading h3 { margin: 0; font-size: 1.5rem; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.dash-task-detail-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1rem; }
.dash-task-detail-state { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--bs-secondary-color); font-size: 0.8125rem; }
.dash-task-detail-owner { display: flex; align-items: center; gap: 0.875rem; margin-block: 1.5rem; padding-block: 1.25rem; border-block: 1px solid var(--bs-border-color-translucent); }
.dash-task-detail-owner > div { display: grid; min-width: 0; gap: 0.25rem; }
.dash-task-detail-owner > div > span { color: var(--bs-secondary-color); font-size: 0.8125rem; }
.dash-task-detail-owner strong { font-size: 0.9375rem; font-weight: 600; overflow-wrap: anywhere; }
.dash-task-detail-schedule { display: flex; align-items: flex-start; gap: 0.875rem; margin: 0 0 1.75rem; padding: 1rem; border-radius: var(--rax-radius); background: var(--bs-tertiary-bg); }
.dash-task-detail-calendar { display: grid; place-items: center; padding-top: 0.125rem; color: var(--bs-secondary-color); }
.dash-task-detail-calendar svg { width: 1.25rem; height: 1.25rem; }
.dash-task-detail-schedule[data-overdue] .dash-task-detail-calendar { color: var(--bs-danger-text-emphasis); }
.dash-task-detail-schedule > dl { min-width: 0; margin: 0; }
.dash-task-detail-schedule dt { color: var(--bs-secondary-color); font-size: 0.8125rem; font-weight: 400; }
.dash-task-detail-schedule dd { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.375rem 0 0; font-size: 0.9375rem; font-weight: 550; }
.dash-task-detail-properties h3 { margin: 0 0 0.625rem; font-size: 0.875rem; font-weight: 600; }
.dash-task-detail-properties dl { margin: 0; }
.dash-task-detail-properties dl > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.875rem; font-size: 0.8125rem; }
.dash-task-detail-properties dl > div + div { border-top: 1px solid var(--bs-border-color-translucent); }
.dash-task-detail-properties dt { color: var(--bs-secondary-color); font-weight: 400; }
.dash-task-detail-properties dd { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-variant-numeric: tabular-nums; }
.dash-task-detail-properties dd svg { width: 1rem; height: 1rem; color: var(--bs-secondary-color); }

/* Tasks */

.dash-board {
    --rax-kanban-column-width: 16rem;
    min-height: 32rem;
}

/* Fill the width when there is room; below that the board scrolls sideways as designed. */
.dash-board > .rax-kanban-column {
    flex-grow: 1;
}

.dash-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    flex-shrink: 0;
    border-radius: 999px;
    background: var(--bs-secondary-color);
}

.dash-dot[data-column=todo], .dash-dot[data-kind=meeting] { background: var(--bs-primary); }
.dash-dot[data-column=doing], .dash-dot[data-kind=event] { background: var(--bs-warning); }
.dash-dot[data-column=done], .dash-dot[data-kind=call] { background: var(--bs-success); }
.dash-dot[data-kind=review] { background: var(--bs-info); }
.dash-dot[data-kind=launch] { background: var(--bs-danger); }

.dash-task {
    display: grid;
    gap: 0.5rem;
}

.dash-task-head {
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
}

.dash-task-head .dash-task-title {
    flex: 1;
    min-width: 0;
}

.dash-task-menu,
.dash-row-menu {
    width: 1.75rem;
    height: 1.75rem;
    margin: -0.25rem;
    padding: 0;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    color: var(--bs-secondary-color);
}

.dash-task-menu svg,
.dash-row-menu svg {
    stroke-width: 3;
}

.dash-task-menu svg,
.dash-row-menu svg,
.rax-dropdown-item svg,
.rax-sheet-footer svg {
    width: 1rem;
    height: 1rem;
}

.dash-sheet-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dash-details {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.875rem 1.5rem;
    margin: 0;
}

.dash-details dt {
    color: var(--bs-secondary-color);
    font-size: 0.8125rem;
    font-weight: 500;
}

.dash-details dd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.dash-muted {
    color: var(--bs-secondary-color);
}

.dash-task-title {
    color: var(--bs-emphasis-color);
    font-weight: 500;
    line-height: 1.3;
}

.dash-task-meta,
.dash-task-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
}

.dash-task-foot {
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
}

.dash-task-due {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.dash-task-due svg {
    width: 0.8125rem;
    height: 0.8125rem;
}

.dash-task-due[data-overdue] {
    color: var(--bs-danger-text-emphasis);
}

.dash-task-avatar {
    margin-inline-start: auto;
}

/* Calendar */

.dash-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    color: var(--bs-secondary-color);
    font-size: 0.8125rem;
}

.dash-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.dash-calendar-card .card-body,
.dash-calendar-card > div {
    display: flex;
    justify-content: center;
}

.dash-calendar {
    --rax-cal-cell: clamp(2.5rem, 4.6vw, 3.75rem);
}

.dash-day-dots {
    display: inline-flex;
    gap: 2px;
}

.dash-day-dots .dash-dot {
    width: 0.3125rem;
    height: 0.3125rem;
}

.dash-empty {
    margin: 0;
    padding-block: 2rem;
    color: var(--bs-secondary-color);
    text-align: center;
}

.dash-upcoming {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.75rem;
}

.dash-upcoming-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: var(--rax-radius);
    background: transparent;
    color: inherit;
    text-align: start;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.dash-upcoming-item:hover {
    border-color: color-mix(in srgb, var(--bs-primary) 40%, var(--bs-border-color));
    background: color-mix(in srgb, var(--bs-primary) 5%, transparent);
}

.dash-upcoming-item:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.dash-upcoming-item small {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.dash-upcoming-date {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border-radius: var(--rax-radius);
    background: color-mix(in srgb, var(--bs-primary) 10%, transparent);
    color: var(--bs-primary-text-emphasis);
    line-height: 1.05;
}

.dash-upcoming-date strong {
    font-size: 1rem;
}

.dash-upcoming-date small {
    font-size: 0.625rem;
    text-transform: uppercase;
}

/* AI Assistant */

.dash-chat {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 13rem);
    min-height: 28rem;
    overflow: hidden;
}

.dash-chat-scroll {
    flex: 1;
    display: flex;
    flex-direction: column-reverse;
    overflow-y: auto;
    padding: 1.5rem;
}

.dash-chat-scroll > div {
    width: 100%;
    max-width: 48rem;
    margin-inline: auto;
}

.dash-chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 100%;
    text-align: center;
}

.dash-chat-empty h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.dash-logo-lg {
    width: 3rem;
    height: 3rem;
}

.dash-logo-lg svg {
    width: 1.5rem;
    height: 1.5rem;
}

.dash-chat-input {
    width: 100%;
    max-width: 48rem;
    margin-inline: auto;
    padding: 0 1.5rem 1.5rem;
}

/* Submit buttons: keep the width steady while the label swaps to the spinner. */
.dash-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 8.5rem;
}

.dash-submit[aria-busy=true] {
    cursor: progress;
}

/* Dialog forms */

.dash-task-choices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.dash-task-column-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-task-column-choices > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.dash-task-column-choices .dash-task-choice { flex-wrap: nowrap; }

@media (min-width: 576px) {
    .rax-dialog.dash-task-dialog,
    .rax-dialog:has(> #add-task) { width: min(40rem, calc(100% - 2rem)); }
}

@media (min-width: 768px) {
    .dash-task-column-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dash-task-column-choices:has(> :nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .dash-task-column-choices > :last-child:nth-child(odd) { grid-column: auto; }
}

.dash-task-choice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    min-height: 3.25rem;
    padding: 0.75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--rax-radius);
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.dash-task-choice:hover { border-color: var(--bs-primary); }
.dash-task-choice:has(:checked) { border-color: var(--bs-primary); background: color-mix(in srgb, var(--bs-primary) 7%, var(--bs-body-bg)); }
.dash-task-choice:has(:focus-visible) { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.dash-task-choice > span { overflow-wrap: anywhere; }
.dash-task-radio { appearance: none; flex: 0 0 1rem; width: 1rem; height: 1rem; margin: 0; border: 1.5px solid var(--bs-secondary-color); border-radius: 50%; background: var(--bs-body-bg); cursor: inherit; }
.dash-task-radio:checked { border-color: var(--bs-primary); background: var(--bs-primary); box-shadow: inset 0 0 0 3px var(--bs-body-bg); }
.dash-task-radio.valid.modified, .dash-task-radio:focus-visible { outline: none; }

@media (forced-colors: active) {
    .dash-task-radio { appearance: auto; }
    .dash-task-choice:has(:checked) { border-color: Highlight; }
}

@media (max-width: 575.98px) {
    .dash-task-choice { padding: 0.625rem; }
}

.dash-dialog-form {
    display: grid;
    gap: 1rem;
    min-width: min(28rem, 100%);
}

.dash-dialog-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 575.98px) {
    .dash-dialog-row { grid-template-columns: minmax(0, 1fr); }
}

/* Settings */

.dash-account-header,
.settings-page,
.profile-page {
    width: 100%;
    max-width: 76rem;
    margin-inline: auto;
}

.settings-page {
    border: 1px solid var(--bs-border-color);
    border-radius: calc(var(--rax-radius) * 1.5);
    background: var(--bs-body-bg);
}

.settings-page .settings-tabs { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.settings-page .settings-tabs > .rax-tabs-list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 1.5rem;
    width: 100%;
    min-width: 0;
    padding-inline: 2rem;
    border-bottom: 1px solid var(--bs-border-color);
    overflow-x: auto;
    scrollbar-width: thin;
}
.settings-page .settings-tabs > .rax-tabs-list .rax-tabs-trigger { flex: 0 0 auto; padding: 1rem 0.25rem; font-size: 0.9375rem; }
.settings-page .settings-tabs > .rax-tabs-list .rax-tabs-trigger[data-state=active] { color: var(--bs-primary-text-emphasis); }
.settings-page .settings-tabs > .rax-tabs-content { margin: 0; min-width: 0; }

.settings-section { display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(0, 2.1fr); gap: 3rem; padding: 2rem; }
.settings-section-heading h2 { margin: 0 0 0.5rem; color: var(--bs-emphasis-color); font-size: 1rem; font-weight: 650; }
.settings-section-heading p { margin: 0; max-width: 28ch; color: var(--bs-secondary-color); font-size: 0.875rem; line-height: 1.75; }
.settings-preferences { min-width: 0; }
.settings-preferences .rax-form-section:first-child { margin-top: 0; }
.settings-preferences .rax-form-section-title { padding-inline: 0; margin-bottom: 0.875rem; color: var(--bs-emphasis-color); font-size: 0.875rem; font-weight: 600; text-transform: none; }
.settings-preferences .rax-form-section-card { border-radius: 0; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.settings-preferences .rax-form-row { padding: 1rem 0; gap: 1.25rem; }
.settings-preferences .rax-form-row:first-child { padding-top: 0.25rem; }
.settings-preferences .rax-form-row + .rax-form-row::before { inset-inline: 0; transform: none; background: var(--bs-border-color); }
.settings-preferences .rax-form-row-text { gap: 0.375rem; }
.settings-preferences .rax-field-description { line-height: 1.6; font-size: 0.8125rem; }
.settings-preferences .rax-form-section-footer { padding: 1rem 0 0; margin-top: 0.5rem; border-top: 1px solid var(--bs-border-color); line-height: 1.75; }
.settings-note { display: inline-flex; align-items: center; gap: 0.375rem; margin-top: 1.25rem; color: var(--bs-secondary-color); font-size: 0.75rem; }

@media (max-width: 991.98px) {
    .settings-section { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
    .settings-section-heading p { max-width: 65ch; }
}

@media (max-width: 575.98px) {
    .settings-page .settings-tabs > .rax-tabs-list { padding-inline: 1.25rem; gap: 1.25rem; }
    .settings-page .settings-tabs > .rax-tabs-list .rax-tabs-trigger { font-size: 0.8125rem; }
    .settings-section { padding: 1.5rem 1.25rem; }
}

/* Profile */

.profile-page {
    border: 1px solid var(--bs-border-color);
    border-radius: calc(var(--rax-radius) * 1.5);
    background: var(--bs-body-bg);
}

.profile-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
}

.profile-identity-text { min-width: 0; }
.profile-identity h2 { margin: 0 0 0.25rem; font-size: 1.25rem; font-weight: 650; }
.profile-identity-text > span { display: block; color: var(--bs-secondary-color); font-size: 0.875rem; overflow-wrap: anywhere; }
.profile-role { display: inline-flex; align-items: center; gap: 0.375rem; margin-inline-start: auto; padding: 0.375rem 0.75rem; border-radius: var(--rax-radius); background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); font-size: 0.8125rem; white-space: nowrap; }
.profile-role svg, .profile-note svg { width: 1rem; height: 1rem; flex-shrink: 0; }

.profile-section { display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(0, 2.1fr); gap: 3rem; padding: 2rem; }
.profile-section-heading h2 { margin: 0 0 0.5rem; color: var(--bs-emphasis-color); font-size: 1rem; font-weight: 650; }
.profile-section-heading p { margin: 0; max-width: 28ch; color: var(--bs-secondary-color); font-size: 0.875rem; line-height: 1.75; }
.profile-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; min-width: 0; }
.profile-fields .profile-field-wide { grid-column: 1 / -1; }
.profile-fields .rax-field { min-width: 0; }
.profile-fields .rax-field-label { font-size: 0.8125rem; font-weight: 550; }
.profile-fields .form-control, .profile-fields .form-select { min-height: 2.75rem; }
.profile-fields .rax-field-description { font-size: 0.8125rem; }
.profile-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1.25rem 2rem; border-top: 1px solid var(--bs-border-color); }
.profile-actions .dash-status { margin: 0; }
.profile-actions .dash-submit { margin-inline-start: auto; }

@media (max-width: 991.98px) {
    .profile-section { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
    .profile-section-heading p { max-width: 65ch; }
}

@media (max-width: 575.98px) {
    .profile-identity { padding: 1.25rem; flex-wrap: wrap; gap: 0.75rem; }
    .profile-identity h2 { font-size: 1.0625rem; }
    .profile-identity .rax-avatar { width: 3rem; height: 3rem; }
    .profile-role { margin-inline-start: 0; }
    .profile-section { padding: 1.5rem 1.25rem; }
    .profile-fields { grid-template-columns: minmax(0, 1fr); }
    .profile-actions { padding: 1.25rem; }
}

.profile-identity { border-bottom: 1px solid var(--bs-border-color); }

.dash-settings .rax-form-section {
    margin-top: 1.5rem;
}

.dash-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.dash-form-actions .dash-status {
    margin: 0;
}

@media (max-width: 767.98px) {
    .dash-main { padding: 1rem; }
    .dash-chat { height: calc(100vh - 11rem); }
    .dash-chat-scroll { padding: 1rem; }
    .dash-chat-input { padding: 0 1rem 1rem; }
    .dash-hide-sm { display: none; }
    .dash-search span, .dash-search kbd, .dash-lang span { display: none; }
    .dash-search { width: 2.25rem; padding: 0; justify-content: center; }
}
