.fd-dashboard {
    --fd-dashboard-surface: #ffffff;
    --fd-dashboard-surface-soft: #f7f9fc;
    --fd-dashboard-line: #e3e8ef;
    --fd-dashboard-line-strong: #cfd7e3;
    --fd-dashboard-text: #172033;
    --fd-dashboard-muted: #69758a;
    --fd-dashboard-blue: #2563eb;
    --fd-dashboard-blue-soft: #eaf2ff;
    --fd-dashboard-violet: #7c3aed;
    --fd-dashboard-violet-soft: #f1eafe;
    --fd-dashboard-green: #16845b;
    --fd-dashboard-green-soft: #e7f7ef;
    --fd-dashboard-amber: #a35d00;
    --fd-dashboard-amber-soft: #fff3d7;
    --fd-dashboard-red: #c4322b;
    --fd-dashboard-red-soft: #ffebe9;
    color: var(--fd-dashboard-text);
    position: relative;
}

.dark .fd-dashboard {
    --fd-dashboard-surface: #111827;
    --fd-dashboard-surface-soft: #182235;
    --fd-dashboard-line: #2d394c;
    --fd-dashboard-line-strong: #455268;
    --fd-dashboard-text: #f5f7fa;
    --fd-dashboard-muted: #a6b0c0;
    --fd-dashboard-blue: #73a5ff;
    --fd-dashboard-blue-soft: #182d53;
    --fd-dashboard-violet: #b99aff;
    --fd-dashboard-violet-soft: #302550;
    --fd-dashboard-green: #6bd6a9;
    --fd-dashboard-green-soft: #153a2d;
    --fd-dashboard-amber: #f6be64;
    --fd-dashboard-amber-soft: #463219;
    --fd-dashboard-red: #ff8f89;
    --fd-dashboard-red-soft: #4b2427;
}

.fd-dashboard [x-cloak] {
    display: none !important;
}

.fd-dashboard-header {
    align-items: flex-start;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    padding: 2px 0 20px;
}

.fd-dashboard-header h1,
.fd-dashboard-error h1 {
    color: var(--fd-dashboard-text);
    font-size: 25px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.25;
    margin: 0;
}

.fd-dashboard-header p,
.fd-dashboard-error p {
    color: var(--fd-dashboard-muted);
    font-size: 13px;
    line-height: 1.6;
    margin: 5px 0 0;
}

.fd-dashboard-header__actions {
    align-items: center;
    display: flex;
    flex: none;
    gap: 12px;
}

.fd-dashboard-updated {
    color: var(--fd-dashboard-muted);
    font-size: 12px;
    white-space: nowrap;
}

.fd-dashboard-button {
    align-items: center;
    background: var(--fd-dashboard-blue);
    border: 1px solid var(--fd-dashboard-blue);
    border-radius: 6px;
    color: #ffffff;
    display: inline-flex;
    font-size: 13px;
    font-weight: 650;
    gap: 7px;
    justify-content: center;
    min-height: 38px;
    padding: 0 13px;
    text-decoration: none;
}

.fd-dashboard-button:hover {
    filter: brightness(.95);
}

.fd-dashboard-button .material-symbols-outlined {
    font-size: 18px;
}

.fd-dashboard-button--secondary {
    background: var(--fd-dashboard-surface);
    border-color: var(--fd-dashboard-line-strong);
    color: var(--fd-dashboard-text);
}

.fd-dashboard-notice {
    align-items: center;
    background: var(--fd-dashboard-blue-soft);
    border: 1px solid color-mix(in srgb, var(--fd-dashboard-blue) 25%, transparent);
    border-radius: 6px;
    color: var(--fd-dashboard-text);
    display: flex;
    font-size: 12px;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 12px;
}

.fd-dashboard-notice .material-symbols-outlined {
    color: var(--fd-dashboard-blue);
    font-size: 18px;
}

.fd-dashboard-toolbar {
    align-items: center;
    border-bottom: 1px solid var(--fd-dashboard-line);
    border-top: 1px solid var(--fd-dashboard-line);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    min-height: 64px;
    padding: 11px 0;
}

.fd-dashboard-periods,
.fd-dashboard-metric-tabs,
.fd-dashboard-focus-tabs {
    align-items: center;
    display: flex;
    gap: 3px;
}

.fd-dashboard-periods {
    background: var(--fd-dashboard-surface-soft);
    border: 1px solid var(--fd-dashboard-line);
    border-radius: 7px;
    padding: 3px;
}

.fd-dashboard-period {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 5px;
    color: var(--fd-dashboard-muted);
    cursor: pointer;
    display: inline-flex;
    font-size: 12px;
    font-weight: 650;
    gap: 5px;
    justify-content: center;
    min-height: 32px;
    padding: 0 11px;
    text-decoration: none;
    white-space: nowrap;
}

.fd-dashboard-period:hover {
    color: var(--fd-dashboard-text);
}

.fd-dashboard-period.is-active {
    background: var(--fd-dashboard-surface);
    box-shadow: 0 1px 3px rgba(23, 32, 51, .12);
    color: var(--fd-dashboard-text);
}

.fd-dashboard-period .material-symbols-outlined {
    font-size: 17px;
}

.fd-dashboard-custom {
    position: relative;
}

.fd-dashboard-custom__popover {
    background: var(--fd-dashboard-surface);
    border: 1px solid var(--fd-dashboard-line-strong);
    border-radius: 8px;
    box-shadow: 0 14px 35px rgba(23, 32, 51, .17);
    left: 0;
    min-width: 410px;
    padding: 15px;
    position: absolute;
    top: calc(100% + 9px);
    z-index: 50;
}

.fd-dashboard-custom__heading {
    align-items: baseline;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.fd-dashboard-custom__heading strong {
    color: var(--fd-dashboard-text);
    font-size: 13px;
}

.fd-dashboard-custom__heading span {
    color: var(--fd-dashboard-muted);
    font-size: 11px;
}

.fd-dashboard-custom form {
    align-items: flex-end;
    display: grid;
    gap: 9px;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.fd-dashboard-custom label {
    display: grid;
    gap: 6px;
}

.fd-dashboard-custom label span {
    color: var(--fd-dashboard-muted);
    font-size: 11px;
    font-weight: 650;
}

.fd-dashboard-custom input[type="date"] {
    background: var(--fd-dashboard-surface);
    border: 1px solid var(--fd-dashboard-line-strong);
    border-radius: 6px;
    color: var(--fd-dashboard-text);
    min-height: 39px;
    padding: 0 9px;
    width: 100%;
}

.fd-dashboard-custom__separator {
    color: var(--fd-dashboard-muted);
    font-size: 11px;
    padding-bottom: 11px;
}

.fd-dashboard-quick-links {
    align-items: center;
    display: flex;
    gap: 5px;
}

.fd-dashboard-quick-links a {
    align-items: center;
    border-radius: 5px;
    color: var(--fd-dashboard-muted);
    display: inline-flex;
    font-size: 12px;
    font-weight: 600;
    gap: 5px;
    min-height: 34px;
    padding: 0 9px;
    text-decoration: none;
}

.fd-dashboard-quick-links a:hover {
    background: var(--fd-dashboard-surface-soft);
    color: var(--fd-dashboard-blue);
}

.fd-dashboard-quick-links .material-symbols-outlined {
    font-size: 17px;
}

.fd-dashboard-metrics {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 20px 0 24px;
}

.fd-dashboard-metric {
    background: var(--fd-dashboard-surface);
    border: 1px solid var(--fd-dashboard-line);
    border-radius: 8px;
    min-width: 0;
    padding: 17px;
}

.fd-dashboard-metric__heading {
    align-items: center;
    color: var(--fd-dashboard-muted);
    display: flex;
    font-size: 12px;
    font-weight: 650;
    gap: 8px;
}

.fd-dashboard-metric__icon {
    align-items: center;
    background: var(--fd-dashboard-blue-soft);
    border-radius: 6px;
    color: var(--fd-dashboard-blue);
    display: inline-flex;
    font-size: 19px;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.fd-dashboard-metric--violet .fd-dashboard-metric__icon {
    background: var(--fd-dashboard-violet-soft);
    color: var(--fd-dashboard-violet);
}

.fd-dashboard-metric--green .fd-dashboard-metric__icon {
    background: var(--fd-dashboard-green-soft);
    color: var(--fd-dashboard-green);
}

.fd-dashboard-metric--amber .fd-dashboard-metric__icon {
    background: var(--fd-dashboard-amber-soft);
    color: var(--fd-dashboard-amber);
}

.fd-dashboard-metric > strong {
    color: var(--fd-dashboard-text);
    display: block;
    font-size: 27px;
    font-weight: 750;
    letter-spacing: 0;
    line-height: 1.15;
    margin-top: 17px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fd-dashboard-metric__footer {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-top: 15px;
    min-height: 24px;
}

.fd-dashboard-delta {
    align-items: center;
    color: var(--fd-dashboard-muted);
    display: inline-flex;
    font-size: 11px;
    gap: 4px;
    min-width: 0;
}

.fd-dashboard-delta .material-symbols-outlined {
    font-size: 16px;
}

.fd-dashboard-delta--up {
    color: var(--fd-dashboard-green);
}

.fd-dashboard-delta--down {
    color: var(--fd-dashboard-red);
}

.fd-dashboard-metric__footer > a {
    align-items: center;
    color: var(--fd-dashboard-blue);
    display: inline-flex;
    flex: none;
    font-size: 11px;
    font-weight: 650;
    gap: 2px;
    text-decoration: none;
}

.fd-dashboard-metric__footer > a .material-symbols-outlined {
    font-size: 15px;
}

.fd-dashboard-section {
    border-top: 1px solid var(--fd-dashboard-line);
    padding: 24px 0 28px;
}

.fd-dashboard-section__header {
    align-items: flex-start;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.fd-dashboard-section__header h2,
.fd-dashboard-failures__heading h3 {
    color: var(--fd-dashboard-text);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0;
}

.fd-dashboard-section__header p,
.fd-dashboard-failures__heading p {
    color: var(--fd-dashboard-muted);
    font-size: 11px;
    line-height: 1.5;
    margin: 4px 0 0;
}

.fd-dashboard-metric-tabs {
    border-bottom: 1px solid var(--fd-dashboard-line);
    gap: 15px;
}

.fd-dashboard-metric-tab {
    align-items: center;
    border-bottom: 2px solid transparent;
    color: var(--fd-dashboard-muted);
    display: inline-flex;
    font-size: 12px;
    font-weight: 650;
    gap: 5px;
    margin-bottom: -1px;
    min-height: 34px;
    padding: 0 2px;
    text-decoration: none;
}

.fd-dashboard-metric-tab:hover,
.fd-dashboard-metric-tab.is-active {
    color: var(--fd-dashboard-blue);
}

.fd-dashboard-metric-tab.is-active {
    border-bottom-color: var(--fd-dashboard-blue);
}

.fd-dashboard-metric-tab .material-symbols-outlined {
    font-size: 17px;
}

.fd-dashboard-chart {
    height: 290px;
    position: relative;
    width: 100%;
}

.fd-dashboard-chart canvas {
    height: 100% !important;
    width: 100% !important;
}

.fd-dashboard-health {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fd-dashboard-health__item {
    border-left: 3px solid var(--fd-dashboard-line-strong);
    min-width: 0;
    padding: 4px 14px;
}

.fd-dashboard-health__item--success {
    border-left-color: var(--fd-dashboard-green);
}

.fd-dashboard-health__item--warning {
    border-left-color: var(--fd-dashboard-amber);
}

.fd-dashboard-health__item--danger {
    border-left-color: var(--fd-dashboard-red);
}

.fd-dashboard-health__item > span,
.fd-dashboard-health__item > small {
    color: var(--fd-dashboard-muted);
    display: block;
    font-size: 11px;
}

.fd-dashboard-health__item > strong {
    color: var(--fd-dashboard-text);
    display: block;
    font-size: 22px;
    margin: 7px 0 4px;
}

.fd-dashboard-focus-tabs {
    background: var(--fd-dashboard-surface-soft);
    border: 1px solid var(--fd-dashboard-line);
    border-radius: 7px;
    padding: 3px;
}

.fd-dashboard-focus-tab {
    border-radius: 5px;
    color: var(--fd-dashboard-muted);
    font-size: 11px;
    font-weight: 650;
    min-height: 29px;
    padding: 7px 10px;
    text-decoration: none;
}

.fd-dashboard-focus-tab:hover,
.fd-dashboard-focus-tab.is-active {
    color: var(--fd-dashboard-text);
}

.fd-dashboard-focus-tab.is-active {
    background: var(--fd-dashboard-surface);
    box-shadow: 0 1px 3px rgba(23, 32, 51, .1);
}

.fd-dashboard-attention__grid {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
}

.fd-dashboard-attention__summary {
    border-top: 1px solid var(--fd-dashboard-line);
}

.fd-dashboard-attention-row {
    align-items: center;
    border-bottom: 1px solid var(--fd-dashboard-line);
    display: grid;
    gap: 12px;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    min-height: 76px;
    padding: 12px 4px;
}

.fd-dashboard-attention-row__indicator {
    background: var(--fd-dashboard-amber);
    border-radius: 50%;
    height: 8px;
    width: 8px;
}

.fd-dashboard-attention-row--danger .fd-dashboard-attention-row__indicator {
    background: var(--fd-dashboard-red);
}

.fd-dashboard-attention-row__title {
    align-items: center;
    display: flex;
    gap: 8px;
}

.fd-dashboard-attention-row__title strong {
    color: var(--fd-dashboard-text);
    font-size: 13px;
}

.fd-dashboard-attention-row__title span {
    background: var(--fd-dashboard-surface-soft);
    border-radius: 5px;
    color: var(--fd-dashboard-text);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
}

.fd-dashboard-attention-row p {
    color: var(--fd-dashboard-muted);
    font-size: 11px;
    line-height: 1.45;
    margin: 4px 0 0;
}

.fd-dashboard-attention-row > a {
    align-items: center;
    border-radius: 5px;
    color: var(--fd-dashboard-blue);
    display: inline-flex;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.fd-dashboard-attention-row > a:hover {
    background: var(--fd-dashboard-blue-soft);
}

.fd-dashboard-attention-row > a .material-symbols-outlined {
    font-size: 18px;
}

.fd-dashboard-failures {
    background: var(--fd-dashboard-surface-soft);
    border: 1px solid var(--fd-dashboard-line);
    border-radius: 8px;
    overflow: hidden;
}

.fd-dashboard-failures__heading {
    align-items: flex-start;
    border-bottom: 1px solid var(--fd-dashboard-line);
    display: flex;
    justify-content: space-between;
    padding: 14px 16px;
}

.fd-dashboard-failures__heading h3 {
    font-size: 13px;
}

.fd-dashboard-failures__heading > span {
    color: var(--fd-dashboard-muted);
    font-size: 11px;
}

.fd-dashboard-failures ol {
    list-style: none;
    margin: 0;
    padding: 0 16px;
}

.fd-dashboard-failures li {
    align-items: center;
    border-bottom: 1px solid var(--fd-dashboard-line);
    display: grid;
    gap: 11px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 61px;
    padding: 9px 0;
}

.fd-dashboard-failures li:last-child {
    border-bottom: 0;
}

.fd-dashboard-task-status {
    background: var(--fd-dashboard-red-soft);
    border-radius: 5px;
    color: var(--fd-dashboard-red);
    font-size: 9px;
    font-weight: 750;
    padding: 4px 6px;
}

.fd-dashboard-task-status--settlement_failed {
    background: var(--fd-dashboard-amber-soft);
    color: var(--fd-dashboard-amber);
}

.fd-dashboard-failures li strong,
.fd-dashboard-failures li small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fd-dashboard-failures li strong {
    color: var(--fd-dashboard-text);
    font-size: 12px;
}

.fd-dashboard-failures li small {
    color: var(--fd-dashboard-muted);
    font-size: 10px;
    margin-top: 3px;
}

.fd-dashboard-failures li > a {
    align-items: center;
    color: var(--fd-dashboard-blue);
    display: inline-flex;
    font-size: 11px;
    font-weight: 650;
    gap: 2px;
    text-decoration: none;
}

.fd-dashboard-failures li > a .material-symbols-outlined {
    font-size: 15px;
}

.fd-dashboard-empty {
    align-items: center;
    color: var(--fd-dashboard-muted);
    display: flex;
    flex-direction: column;
    gap: 7px;
    justify-content: center;
    min-height: 150px;
    text-align: center;
}

.fd-dashboard-empty .material-symbols-outlined {
    color: var(--fd-dashboard-green);
    font-size: 26px;
}

.fd-dashboard-empty strong {
    color: var(--fd-dashboard-text);
    font-size: 12px;
}

.fd-dashboard-error {
    align-items: center;
    background: var(--fd-dashboard-surface);
    border: 1px solid var(--fd-dashboard-line);
    border-radius: 8px;
    display: grid;
    gap: 16px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin-top: 10px;
    min-height: 140px;
    padding: 24px;
}

.fd-dashboard-error > .material-symbols-outlined {
    color: var(--fd-dashboard-red);
    font-size: 30px;
}

.fd-dashboard-error h1 {
    font-size: 17px;
}

.fd-dashboard-loading {
    align-items: center;
    background: color-mix(in srgb, var(--fd-dashboard-surface) 72%, transparent);
    display: none;
    inset: 0;
    justify-content: center;
    position: absolute;
    z-index: 60;
}

.fd-dashboard[aria-busy="true"] .fd-dashboard-loading {
    display: flex;
}

.fd-dashboard-loading .material-symbols-outlined {
    animation: fd-dashboard-spin .8s linear infinite;
    color: var(--fd-dashboard-blue);
    font-size: 28px;
}

.fd-dashboard-async-status:empty {
    display: none;
}

.fd-dashboard-async-status {
    background: var(--fd-dashboard-red-soft);
    border: 1px solid color-mix(in srgb, var(--fd-dashboard-red) 28%, transparent);
    border-radius: 6px;
    bottom: 18px;
    color: var(--fd-dashboard-red);
    font-size: 12px;
    left: 50%;
    padding: 9px 12px;
    position: fixed;
    transform: translateX(-50%);
    z-index: 80;
}

@keyframes fd-dashboard-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1199px) {
    .fd-dashboard-metrics,
    .fd-dashboard-health {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fd-dashboard-attention__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 899px) {
    .fd-dashboard-header,
    .fd-dashboard-section__header,
    .fd-dashboard-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .fd-dashboard-header__actions {
        justify-content: space-between;
    }

    .fd-dashboard-periods,
    .fd-dashboard-quick-links,
    .fd-dashboard-metric-tabs,
    .fd-dashboard-focus-tabs {
        overflow-x: auto;
        width: 100%;
    }

    .fd-dashboard-custom__popover {
        left: auto;
        right: 0;
    }
}

@media (max-width: 639px) {
    .fd-dashboard-metrics,
    .fd-dashboard-health {
        grid-template-columns: minmax(0, 1fr);
    }

    .fd-dashboard-periods {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        overflow: visible;
    }

    .fd-dashboard-period {
        min-width: 0;
        padding: 0 6px;
    }

    .fd-dashboard-header__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .fd-dashboard-updated {
        white-space: normal;
    }

    .fd-dashboard-custom {
        grid-column: 1 / -1;
        position: static;
    }

    .fd-dashboard-period--custom {
        width: 100%;
    }

    .fd-dashboard-custom__popover {
        left: 0;
        min-width: 0;
        right: 0;
        width: 100%;
    }

    .fd-dashboard-custom form {
        grid-template-columns: minmax(0, 1fr);
    }

    .fd-dashboard-custom__separator {
        display: none;
    }

    .fd-dashboard-metric__footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .fd-dashboard-chart {
        height: 250px;
    }

    .fd-dashboard-error {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .fd-dashboard-loading .material-symbols-outlined {
        animation-duration: 1.8s;
    }
}
