/* ==========================================================================
   DYRES portal — UIDES design tokens and shared component styling
   Brand colours are preserved. Semantic colours, dimensions, spacing,
   typography, radii and elevation follow docs/standards/UIDES-IMPLEMENTATION.md.
   ========================================================================== */

:root {
    /* Brand */
    --dyres-navy: #0B2545;
    --dyres-azure: #1E9BF0;
    --dyres-primary: #0B6BCB;
    --dyres-red: #B91C1C;

    /* Spacing scale (UIDES 4.3) */
    --dyres-space-xs: 4px;
    --dyres-space-sm: 8px;
    --dyres-space-md: 12px;
    --dyres-space-lg: 16px;
    --dyres-space-xl: 24px;
    --dyres-space-xxl: 32px;
    --dyres-space-xxxl: 40px;

    /* Radii (UIDES 4.4) */
    --dyres-radius-control: 6px;
    --dyres-radius-card: 8px;
    --dyres-radius-dialog: 10px;
    --dyres-radius-menu: 8px;
    --dyres-radius-pill: 999px;

    /* Component dimensions (UIDES 7.3, 9.2) */
    --dyres-button-height: 36px;
    --dyres-button-padding-x: 16px;
    --dyres-input-height: 40px;
    --dyres-appbar-height: 64px;
    --dyres-drawer-width: 250px;
    --dyres-table-row-height: 48px;

    /* Elevation (UIDES 4.5) */
    --dyres-shadow-none: none;
    --dyres-shadow-dialog: 0 16px 48px rgba(15, 23, 42, .22);
    --dyres-shadow-menu: 0 8px 24px rgba(15, 23, 42, .14);
    --dyres-focus-ring: 0 0 0 3px color-mix(in srgb, var(--mud-palette-primary) 30%, transparent);

    /* Breakpoint reference (UIDES 17):
       small mobile < 600px, mobile 600–767px, tablet 768–1023px,
       desktop 1024–1439px, large desktop >= 1440px. */
}

html,
body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
    -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Application shell
   -------------------------------------------------------------------------- */

.mud-layout,
.mud-main-content {
    background: var(--mud-palette-background);
}

.mud-main-content {
    min-height: calc(100vh - var(--dyres-appbar-height));
}

.dyres-appbar {
    background: var(--dyres-navy) !important;
    color: #FFFFFF !important;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    box-shadow: none;
}

.dyres-appbar .mud-typography,
.dyres-appbar .mud-icon-root,
.dyres-appbar .mud-icon-button,
.dyres-appbar .mud-button-root {
    color: #FFFFFF;
}

.dyres-appbar .mud-icon-button:hover {
    background: rgba(255, 255, 255, .12);
}

.dyres-appbar .mud-icon-button:focus-visible {
    outline-color: #FFFFFF;
}

.dyres-appbar-chip {
    color: #E2E8F0 !important;
    background: rgba(255, 255, 255, .12) !important;
}

.dyres-appbar-divider {
    opacity: .35;
    height: 24px;
}

.dyres-appbar-avatar {
    font-size: .75rem;
    background: rgba(255, 255, 255, .18) !important;
    color: #FFFFFF !important;
}

.dyres-appbar-user {
    line-height: 1.15;
}

.dyres-appbar-user__name {
    font-weight: 600;
    color: #FFFFFF;
}

.dyres-appbar-user__role {
    color: #CBD5E1;
}

.mud-drawer {
    border-right: 1px solid var(--mud-palette-lines-default);
    box-shadow: none;
}

.dyres-drawer-label {
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
    font-size: .6875rem;
    font-weight: 600;
}

.dyres-drawer-footer {
    opacity: .9;
    font-size: .65rem;
    text-align: center;
    color: var(--mud-palette-text-secondary);
}

.mud-nav-link {
    min-height: 40px;
    border-radius: var(--dyres-radius-control);
    font-size: .875rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
}

.mud-nav-link.active:not(.mud-nav-link-disabled) {
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
    color: color-mix(in srgb, var(--mud-palette-primary) 70%, var(--mud-palette-text-primary)) !important;
    font-weight: 600;
}

.mud-nav-link.active .mud-icon-root {
    color: inherit;
}

.mud-nav-group > .mud-nav-link {
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.mud-nav-link:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: -2px;
}

/* --------------------------------------------------------------------------
   Page composition
   -------------------------------------------------------------------------- */

.dyres-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--dyres-space-lg);
    flex-wrap: wrap;
    margin-bottom: var(--dyres-space-xl);
}

.dyres-page-header__text {
    min-width: 0;
    flex: 1 1 320px;
}

.dyres-page-header__actions {
    display: flex;
    align-items: center;
    gap: var(--dyres-space-sm);
    flex-wrap: wrap;
}

.dyres-page-title {
    color: var(--mud-palette-text-primary);
    font-weight: 600 !important;
    letter-spacing: -.01em;
}

.dyres-page-description {
    color: var(--mud-palette-text-secondary);
    margin-top: var(--dyres-space-xs);
}

.dyres-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--dyres-space-md);
    flex-wrap: wrap;
    margin-bottom: var(--dyres-space-lg);
}

.dyres-toolbar__main,
.dyres-toolbar__actions {
    display: flex;
    align-items: center;
    gap: var(--dyres-space-sm);
    flex-wrap: wrap;
}

.dyres-toolbar__main {
    flex: 1 1 480px;
    min-width: 0;
}

.dyres-toolbar__actions {
    flex: 0 0 auto;
}

.dyres-toolbar__search {
    width: 260px;
    max-width: 100%;
}

.dyres-date-field {
    width: 180px;
    max-width: 100%;
}

.dyres-level-field {
    width: 160px;
    max-width: 100%;
}

.dyres-log-search {
    flex: 1 1 220px;
    min-width: 220px;
}

.dyres-menu-danger,
.dyres-menu-danger .mud-typography,
.dyres-menu-danger .mud-icon-root {
    color: var(--mud-palette-error) !important;
}

.dyres-stack {
    display: flex;
    flex-direction: column;
    gap: var(--dyres-space-lg);
}

.dyres-inline {
    display: flex;
    align-items: center;
    gap: var(--dyres-space-sm);
    flex-wrap: wrap;
}

.dyres-inline--end {
    justify-content: flex-end;
}

.dyres-muted {
    color: var(--mud-palette-text-secondary);
}

.dyres-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
}

.dyres-nowrap {
    white-space: nowrap;
}

.dyres-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dyres-pre-wrap {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.mud-card {
    border-radius: var(--dyres-radius-card);
    border: 1px solid var(--mud-palette-lines-default);
    box-shadow: none;
    background: var(--mud-palette-surface);
}

.mud-card-header {
    padding: var(--dyres-space-lg) var(--dyres-space-lg) 0;
}

.mud-card-header .mud-card-header-content {
    padding-bottom: var(--dyres-space-sm);
}

.mud-card-content {
    padding: var(--dyres-space-lg);
}

.mud-card-actions {
    padding: var(--dyres-space-sm) var(--dyres-space-lg) var(--dyres-space-lg);
}

.dyres-card--fill {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dyres-card--fill > .mud-card-content {
    flex: 1 1 auto;
}

.dyres-card--scroll > .mud-card-content {
    max-height: 360px;
    overflow: auto;
}

.dyres-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--dyres-space-md);
    flex-wrap: wrap;
}

.dyres-card__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--dyres-space-sm);
    flex-wrap: wrap;
}

.dyres-kpi {
    transition: border-color .15s ease;
}

.dyres-kpi:hover {
    border-color: color-mix(in srgb, var(--mud-palette-primary) 35%, var(--mud-palette-lines-default));
}

.dyres-kpi-label {
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--mud-palette-text-secondary);
}

.dyres-kpi-value {
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.1;
    color: var(--mud-palette-text-primary);
    font-variant-numeric: tabular-nums;
}

.dyres-surface {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--dyres-radius-card);
}

/* --------------------------------------------------------------------------
   Buttons (UIDES 7)
   -------------------------------------------------------------------------- */

.mud-button-root {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    font-size: .875rem;
    border-radius: var(--dyres-radius-control);
    box-shadow: none !important;
}

.mud-button-root:not(.mud-icon-button) {
    height: var(--dyres-button-height);
    min-height: var(--dyres-button-height);
    padding: 0 var(--dyres-button-padding-x);
}

.mud-button-root:not(.mud-icon-button).mud-button-full-width {
    width: 100%;
}

.mud-button-filled,
.mud-button-outlined,
.mud-button-text {
    box-shadow: none !important;
}

.mud-button-outlined {
    border-width: 1px;
}

.mud-icon-button {
    width: 36px;
    height: 36px;
    padding: 8px;
    border-radius: var(--dyres-radius-control);
}

.mud-icon-button-size-small {
    width: 36px;
    height: 36px;
    padding: 8px;
}

.mud-button-root:focus-visible,
.mud-icon-button:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

.dyres-button-row {
    display: flex;
    align-items: center;
    gap: var(--dyres-space-sm);
    flex-wrap: wrap;
}

.dyres-button-row--end {
    justify-content: flex-end;
}

/* --------------------------------------------------------------------------
   Forms (UIDES 9)
   -------------------------------------------------------------------------- */

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

.mud-input.mud-input-outlined .mud-input-outlined-border {
    border-radius: var(--dyres-radius-control);
}

.mud-input-control .mud-input.mud-input-outlined {
    min-height: var(--dyres-input-height);
}

.mud-input-root {
    font-size: .875rem;
}

.mud-input-label {
    font-size: .875rem;
    font-weight: 500;
}

.mud-input-helper-text,
.mud-input-error .mud-input-helper-text {
    font-size: .75rem;
}

.mud-input-control.mud-input-control-margin-dense .mud-input.mud-input-outlined {
    min-height: var(--dyres-input-height);
}

.dyres-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--dyres-space-lg);
}

.dyres-form-grid > .dyres-form-grid__full {
    grid-column: 1 / -1;
}

.dyres-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--dyres-space-sm);
    flex-wrap: wrap;
    margin-top: var(--dyres-space-xl);
}

.dyres-field-note {
    color: var(--mud-palette-text-secondary);
    font-size: .75rem;
    margin-top: var(--dyres-space-xs);
}

/* --------------------------------------------------------------------------
   Tables (UIDES 11)
   -------------------------------------------------------------------------- */

.mud-table-root {
    border-radius: 0;
}

.mud-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mud-table-root .mud-table-cell {
    font-size: .875rem;
    padding: 12px 16px;
    border-bottom-color: var(--mud-palette-table-lines);
    vertical-align: middle;
}

.mud-table-root .mud-table-head .mud-table-cell {
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--mud-palette-text-secondary);
    background: color-mix(in srgb, var(--mud-palette-surface) 92%, var(--mud-palette-background));
    white-space: nowrap;
}

.mud-table-root .mud-table-body .mud-table-row {
    min-height: var(--dyres-table-row-height);
}

.mud-table-root .mud-table-body .mud-table-cell:last-child,
.mud-table-root .mud-table-head .mud-table-cell:last-child {
    padding-right: 16px;
}

.mud-table-root .mud-table-cell.dyres-table-actions {
    text-align: right;
    white-space: nowrap;
}

.mud-table-sort-label {
    font-weight: 600;
    color: inherit;
}

.mud-table-sort-label .mud-table-sort-label-icon {
    opacity: .35;
}

.mud-table-sort-label:hover .mud-table-sort-label-icon,
.mud-table-sort-label .mud-table-sort-label-icon.mud-direction-asc,
.mud-table-sort-label .mud-table-sort-label-icon.mud-direction-desc {
    opacity: 1;
}

.mud-table-sort-label:has(.mud-direction-asc),
.mud-table-sort-label:has(.mud-direction-desc) {
    color: var(--mud-palette-primary);
}

.dyres-col-90 { width: 90px; }
.dyres-col-110 { width: 110px; }
.dyres-col-120 { width: 120px; }
.dyres-col-130 { width: 130px; }
.dyres-col-140 { width: 140px; }
.dyres-col-150 { width: 150px; }
.dyres-col-160 { width: 160px; }
.dyres-col-170 { width: 170px; }
.dyres-col-180 { width: 180px; }

.dyres-table-numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.dyres-table-scroll-hint {
    display: none;
}

/* UIDES: audit logs are bounded so the page does not grow without limit.
   The wrapper keeps the pager visible while the data rows scroll. */
.dyres-audit-table {
    display: flex;
    flex-direction: column;
    max-height: 56vh;
    min-height: 0;
}

.dyres-audit-table > .mud-table {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.dyres-audit-table > .mud-table > .mud-table-container {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.dyres-audit-table .mud-table-pagination {
    flex: 0 0 auto;
}

.dyres-audit-table .mud-table-head .mud-table-cell {
    position: sticky;
    top: 0;
    z-index: 2;
    background: color-mix(in srgb, var(--mud-palette-surface) 92%, var(--mud-palette-background));
    box-shadow: inset 0 -1px 0 var(--mud-palette-table-lines);
}

.mud-table-pagination {
    border-top: 1px solid var(--mud-palette-table-lines);
    padding: 8px 16px;
    font-size: .8125rem;
}

.mud-table-pagination select,
.mud-table-pagination .mud-select {
    min-width: 88px;
}

.mud-table-empty-row {
    padding: var(--dyres-space-xl);
}

.dyres-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--dyres-space-md);
    flex-wrap: wrap;
    padding: var(--dyres-space-md) var(--dyres-space-lg);
    border-bottom: 1px solid var(--mud-palette-table-lines);
}

.dyres-table-toolbar__group {
    display: flex;
    align-items: center;
    gap: var(--dyres-space-sm);
    flex-wrap: wrap;
}

.dyres-key-cell {
    display: inline-block;
    max-width: 340px;
    vertical-align: middle;
}

.dyres-definition-list {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: var(--dyres-space-xs) var(--dyres-space-lg);
    margin: 0;
    font-size: .875rem;
}

.dyres-definition-list dt {
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
}

.dyres-definition-list dd {
    margin: 0;
    color: var(--mud-palette-text-primary);
    overflow-wrap: anywhere;
}

.dyres-cell-primary {
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.dyres-cell-secondary {
    color: var(--mud-palette-text-secondary);
    font-size: .75rem;
}

.dyres-grow {
    flex: 1 1 220px;
    min-width: 0;
}

.dyres-min-width-0 {
    min-width: 0;
}

.dyres-member-list {
    display: flex;
    flex-direction: column;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--dyres-radius-card);
}

.dyres-member-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--dyres-space-md);
    padding: var(--dyres-space-sm) var(--dyres-space-md);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.dyres-member-row:last-child {
    border-bottom: none;
}

/* --------------------------------------------------------------------------
   Dialogs (UIDES 10)
   -------------------------------------------------------------------------- */

.mud-dialog {
    border-radius: var(--dyres-radius-dialog);
    box-shadow: var(--dyres-shadow-dialog);
}

.mud-dialog-title {
    padding: var(--dyres-space-xl) var(--dyres-space-xl) var(--dyres-space-sm);
    font-size: 1.125rem;
    font-weight: 600;
}

.mud-dialog-content {
    padding: var(--dyres-space-sm) var(--dyres-space-xl) var(--dyres-space-lg);
}

.mud-dialog-actions {
    padding: var(--dyres-space-md) var(--dyres-space-xl) var(--dyres-space-xl);
    gap: var(--dyres-space-sm);
    justify-content: flex-end;
}

.mud-popover,
.mud-popover .mud-paper,
.mud-menu-list {
    border-radius: var(--dyres-radius-menu);
}

.dyres-dialog-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--dyres-space-sm);
    flex-wrap: wrap;
    width: 100%;
}

.dyres-dialog-actions .dyres-dialog-actions__cancel {
    margin-right: auto;
}

.dyres-dialog-note {
    color: var(--mud-palette-text-secondary);
    font-size: .8125rem;
    margin-top: var(--dyres-space-sm);
}

/* --------------------------------------------------------------------------
   Feedback, states (UIDES 14, 15)
   -------------------------------------------------------------------------- */

.mud-alert {
    border-radius: var(--dyres-radius-card);
    border: 1px solid transparent;
    font-size: .875rem;
}

.mud-alert.mud-alert-filled-error,
.mud-alert.mud-alert-outlined-error {
    border-color: color-mix(in srgb, var(--mud-palette-error) 35%, transparent);
}

.mud-alert.mud-alert-filled-success,
.mud-alert.mud-alert-outlined-success {
    border-color: color-mix(in srgb, var(--mud-palette-success) 35%, transparent);
}

.mud-snackbar {
    border-radius: var(--dyres-radius-card);
    font-size: .875rem;
    box-shadow: var(--dyres-shadow-menu);
}

.dyres-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: var(--dyres-space-sm);
    padding: var(--dyres-space-xxl) var(--dyres-space-lg);
    color: var(--mud-palette-text-secondary);
}

.dyres-empty-state__icon {
    color: var(--mud-palette-text-secondary);
    opacity: .7;
}

.dyres-loading-state {
    display: flex;
    flex-direction: column;
    gap: var(--dyres-space-sm);
    padding: var(--dyres-space-lg) 0;
    color: var(--mud-palette-text-secondary);
    font-size: .875rem;
}

.dyres-loading-state--compact {
    padding: var(--dyres-space-sm) 0;
}

.dyres-error-state {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--dyres-space-md);
    padding: var(--dyres-space-lg);
}

.dyres-error-state__message {
    color: var(--mud-palette-error);
    font-size: .875rem;
}

/* --------------------------------------------------------------------------
   Badges, chips, code
   -------------------------------------------------------------------------- */

.dyres-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    border-radius: var(--dyres-radius-pill);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.dyres-badge-live {
    color: #166534;
    background: #DCFCE7;
}

.dyres-badge-role {
    color: var(--dyres-navy);
    background: #E0F2FE;
}

.mud-chip {
    border-radius: var(--dyres-radius-pill);
    font-weight: 600;
    font-size: .75rem;
}

.mud-chip.mud-chip-size-small {
    height: 24px;
}

.mud-chip.mud-chip-outlined {
    border-width: 1px;
}

.dyres-code {
    background: color-mix(in srgb, var(--mud-palette-text-primary) 6%, var(--mud-palette-surface));
    color: var(--mud-palette-text-primary);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--dyres-radius-card);
    padding: var(--dyres-space-md) var(--dyres-space-lg);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .8125rem;
    line-height: 1.6;
    overflow: auto;
    max-height: 320px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.dyres-code--short {
    max-height: 160px;
}

.dyres-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    background: #22C55E;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
    flex: 0 0 auto;
}

.dyres-status-dot--error {
    background: var(--mud-palette-error);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mud-palette-error) 20%, transparent);
}

/* --------------------------------------------------------------------------
   Login
   -------------------------------------------------------------------------- */

.dyres-login-shell {
    min-height: 100vh;
    background: var(--mud-palette-background);
    overflow-x: hidden;
}

.dyres-login-panel {
    background:
        linear-gradient(135deg, rgba(11, 37, 69, .96), rgba(11, 18, 32, .98)),
        url('/dyres-hero-banner.png') center/cover no-repeat;
    flex: 1.1;
    min-width: 0;
}

.dyres-login-panel .mud-typography {
    color: #FFFFFF;
}

.dyres-login-panel .dyres-login-panel__muted {
    color: #CBD5E1;
}

.dyres-login-side {
    flex: 1;
    min-width: 0;
    padding: var(--dyres-space-xxl);
    background: var(--mud-palette-background);
}
.dyres-auth-card {
    width: 100%;
    max-width: 460px;
}

.dyres-login-brand {
    color: #FFFFFF;
    font-weight: 600;
}

.dyres-login-headline {
    color: #FFFFFF;
    font-weight: 600;
    line-height: 1.15;
    max-width: 560px;
}

.dyres-login-lede {
    max-width: 480px;
    margin-top: var(--dyres-space-lg);
}

.dyres-qr {
    background: #FFFFFF;
    padding: var(--dyres-space-sm);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--dyres-radius-card);
}

.dyres-meta-list {
    display: flex;
    flex-direction: column;
}

.dyres-meta-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--dyres-space-lg);
    padding: var(--dyres-space-sm) 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.dyres-meta-row:last-child {
    border-bottom: none;
}

.dyres-security-list {
    margin: 0;
    padding-left: var(--dyres-space-xl);
    color: var(--mud-palette-text-secondary);
    font-size: .875rem;
    line-height: 1.7;
}

.dyres-error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--dyres-space-xl);
    background: var(--mud-palette-background);
}

.dyres-error-card {
    width: 100%;
    max-width: 520px;
}

.dyres-hero-chip {
    border-color: rgba(125, 211, 252, .55) !important;
    color: #E0F2FE !important;
    background: rgba(30, 155, 240, .12) !important;
}

/* --------------------------------------------------------------------------
   Theme-aware scrollbars
   -------------------------------------------------------------------------- */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--mud-palette-text-secondary) 45%, transparent);
    border-radius: var(--dyres-radius-pill);
}

::-webkit-scrollbar-track {
    background: transparent;
}

/* --------------------------------------------------------------------------
   Responsive (UIDES 17)
   -------------------------------------------------------------------------- */

@media (max-width: 959.98px) {
    .dyres-page-header__actions {
        width: 100%;
    }

    .dyres-toolbar__main,
    .dyres-toolbar__actions {
        flex: 1 1 100%;
    }

    .dyres-toolbar__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .dyres-page-header {
        margin-bottom: var(--dyres-space-lg);
    }

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

    .mud-card-header,
    .mud-card-content {
        padding-left: var(--dyres-space-md);
        padding-right: var(--dyres-space-md);
    }

    .mud-main-content > .mud-container {
        padding-left: var(--dyres-space-md) !important;
        padding-right: var(--dyres-space-md) !important;
        padding-top: var(--dyres-space-lg) !important;
    }

    .mud-dialog {
        max-width: calc(100vw - 24px);
    }
}

@media (max-width: 599.98px) {
    .dyres-appbar-chip,
    .dyres-appbar-divider,
    .dyres-appbar-user,
    .dyres-appbar .dyres-badge {
        display: none !important;
    }

    .mud-table-root {
        min-width: 640px;
    }

    .dyres-table-scroll-hint {
        display: block;
        padding: var(--dyres-space-xs) var(--dyres-space-md);
        color: var(--mud-palette-text-secondary);
        font-size: .75rem;
    }

    .dyres-toolbar__search,
    .dyres-toolbar__main > .mud-input-control,
    .dyres-toolbar__main > .mud-select {
        width: 100%;
        min-width: 100%;
    }

    .dyres-page-header__actions > .mud-button-root:not(.mud-icon-button) {
        flex: 1 1 auto;
    }

    .dyres-login-side {
        padding: var(--dyres-space-lg);
    }

    .mud-dialog-title {
        padding: var(--dyres-space-lg) var(--dyres-space-lg) var(--dyres-space-xs);
    }

    .mud-dialog-content {
        padding: var(--dyres-space-xs) var(--dyres-space-lg) var(--dyres-space-md);
    }

    .mud-dialog-actions {
        padding: var(--dyres-space-md) var(--dyres-space-lg) var(--dyres-space-lg);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
