html,
body {
    background:#f4f7fb;
    color:#0f172a;
    font-family:Inter,"Segoe UI",sans-serif;
    margin:0;
}

* {
    box-sizing:border-box;
}

.font-weight-semibold {
    font-weight:600;
}

.status-chip {
    font-weight:600;
}

.justify-start {
    justify-content:flex-start!important;
}

#blazor-error-ui {
    background:#fff3cd;
    bottom:0;
    box-shadow:0 -1px 8px rgba(0,0,0,.2);
    display:none;
    left:0;
    padding:.75rem 1.25rem;
    position:fixed;
    width:100%;
    z-index:10000;
}

#blazor-error-ui .dismiss {
    cursor:pointer;
    position:absolute;
    right:.75rem;
    top:.5rem;
}

.mud-paper {
    border-radius:8px;
}

.mud-dialog {
    border-radius:8px;
}

.mud-dialog-title {
    padding:18px 22px 10px;
}

.mud-dialog-content {
    padding:12px 22px;
}

.mud-dialog-actions {
    padding:12px 22px 18px;
}

.mud-table {
    border:1px solid var(--mud-palette-divider);
    border-radius:8px;
    overflow:hidden;
}

.mud-table-container {
    max-height:min(65vh, 720px);
    overflow:auto;
    overscroll-behavior:contain;
}

.mud-table-cell {
    white-space:nowrap;
}

.mud-table-head .mud-table-cell {
    background:#f8fafc;
    box-shadow:inset 0 -1px 0 var(--mud-palette-divider);
    color:#334155;
    font-size:.78rem;
    font-weight:800;
    position:sticky;
    top:0;
    text-transform:none;
    z-index:2;
}

.mud-dialog .mud-table-container {
    max-height:min(48vh, 480px);
}

@media print {
    .mud-table-container {
        max-height:none;
        overflow:visible;
    }

    .mud-table-head .mud-table-cell {
        position:static;
    }
}

.mud-table-row:hover .mud-table-cell {
    background:#f8fbff;
}

.row-actions {
    display:flex;
    gap:4px;
    justify-content:flex-start;
}

.table-cell-stack {
    align-items:flex-start;
    display:grid;
    gap:2px;
    min-width:0;
}

.table-reference {
    color:#0f172a;
    display:block;
    font-size:.875rem;
    font-weight:700;
    max-width:15rem;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.table-wrap-cell {
    max-width:30rem;
    white-space:normal!important;
}

.report-filter-shell .mud-grid-item {
    min-width:0;
}

.report-filter-shell .mud-input-control,
.report-filter-shell .mud-input-control-input-container,
.report-filter-shell .mud-input {
    min-width:0;
    width:100%;
}

.report-filter-shell .mud-input-slot {
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
}

.report-filter-shell .report-filter-actions {
    align-items:center;
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    justify-content:flex-end;
    padding-top:4px;
}

.report-filter-shell .report-filter-actions .mud-button-root {
    min-height:38px;
}

.mud-input-control {
    margin-top:0;
}

.mud-input-root-outlined,
.mud-input-outlined-border {
    border-radius:8px!important;
}

.mud-button-root {
    letter-spacing:0;
    text-transform:none;
}

.mud-button-root.mud-button-filled {
    box-shadow:0 8px 18px rgba(25,118,210,.2);
}

.mud-button-root.mud-button-filled:hover {
    box-shadow:0 10px 22px rgba(25,118,210,.24);
}

h1:focus,
h2:focus,
.mud-typography:focus {
    outline: none;
}

.mud-input-required,
.mud-input-label-asterisk,
.mud-input-label .mud-input-required,
.mud-input-label > span:last-child {
    color:#E53935!important;
}

.CureBucket-drawer .mud-nav-link.mud-nav-link-disabled,
.CureBucket-drawer .mud-nav-link.mud-nav-link-disabled .mud-nav-link-text,
.CureBucket-drawer .mud-nav-link.mud-nav-link-disabled .mud-nav-link-icon {
    color:#B8C8D8!important;
    opacity:.82!important;
}

.data-grid-shell {
    background:#fff;
    border:1px solid var(--mud-palette-divider);
    border-radius:8px;
    overflow:hidden;
}

.data-grid-shell.pa-4 {
    overflow:visible;
}

.metric-card,
.summary-card {
    background:#fff;
    border:1px solid var(--mud-palette-divider);
    border-radius:8px;
    height:100%;
    transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.metric-card:hover,
.summary-card:hover {
    border-color:rgba(25,118,210,.24);
    box-shadow:0 12px 28px rgba(15,23,42,.08);
    transform:translateY(-1px);
}

.metric-card .mud-card-content {
    padding:16px;
}

.access-state-card {
    max-width:560px;
}

.access-state-card-wide {
    max-width:620px;
}

@media (max-width:600px) {
    .mud-table-cell {
        white-space:normal;
    }

    .mud-table-smalldevices-sortselect {
        align-items:center;
        display:flex;
        gap:10px;
        padding:8px 12px;
    }

    .mud-table-smalldevices-sortselect::before {
        color:var(--mud-palette-text-secondary);
        content:"Sort by";
        flex:0 0 auto;
        font-size:.78rem;
        font-weight:700;
    }

    .mud-table-smalldevices-sortselect > .mud-select {
        flex:1 1 auto;
        min-width:0;
    }

    .payments-tabs .mud-tab,
    .settings-tabs .mud-tab {
        min-width:max-content!important;
        padding-inline:10px!important;
    }

    .payments-tabs .mud-tab {
        padding-inline:4px!important;
        font-size:13px;
    }

    .payments-tabs .mud-tabs-scroll-button {
        display:none;
    }

    .payments-tabs .mud-tab .mud-tab-icon-text,
    .settings-tabs .mud-tab .mud-tab-icon-text {
        display:none;
    }

    .report-filter-shell .report-filter-actions {
        display:grid;
        grid-template-columns:repeat(2, minmax(0, 1fr));
        justify-content:stretch;
        padding-top:2px;
    }

    .report-filter-shell .report-filter-actions .mud-button-root {
        width:100%;
    }
}
