html {
    font-size: 16px;
}

/*
 * Preserve the 2560px desktop composition at narrower wide-desktop widths.
 * Compact laptop, tablet, and mobile modes keep their independently tuned
 * 16px root size and responsive reflow.
 */
@media (min-width: 1367px) and (min-height: 821px) {
    html {
        font-size: clamp(12px, 0.625vw, 16px);
    }
}

html, body, #app {
    width: 100%;
    height: 100dvh;
    min-height: 100svh;
    overflow: hidden;
}

:root {
    --connect-appbar-height: 5rem;
    --connect-sidebar-width: 15.625rem;
    --connect-page-padding-x: 1.5rem;
    --connect-page-padding-top: 1.25rem;
    --connect-page-padding-bottom: 1.5rem;
    --connect-page-surface-padding-x: 2rem;
    --connect-page-surface-padding-y: 1rem;
    --connect-section-gap: 1.125rem;
    --connect-card-padding: 1.125rem;
    --connect-card-gap: 1rem;
    --connect-summary-card-min-height: 6.75rem;
    --connect-sidebar-padding-y: 2.5rem;
    --connect-sidebar-nav-padding: 0.5rem;
    --connect-sidebar-nav-gap: 0.75rem;
    --connect-sidebar-footer-padding-x: 0.75rem;
    --connect-sidebar-support-height: 2.75rem;
    --connect-sidebar-account-padding-y: 0.75rem;
    --connect-page-header-gap: 1rem;
    --connect-filter-gap: 1rem;
    --connect-side-sheet-width: 45rem;
    --connect-side-sheet-max-width: 90vw;
    --connect-mobile-action-height: 4rem;
    --connect-touch-target: 44px;
    --auth-card-width: 32.5rem;
    --auth-card-radius: 1.25rem;
    --auth-content-padding-x: 3rem;
    --auth-content-padding-top: 2.75rem;
    --auth-content-padding-bottom: 1.75rem;
    --auth-actions-padding-bottom: 2.75rem;
    --auth-logo-size: 5.125rem;
    --auth-brand-gap: 1.5rem;
    --auth-section-gap: 1.875rem;
}

.connect-shell {
    --mud-appbar-height: var(--connect-appbar-height);
    width: 100%;
    height: 100dvh;
    min-height: 100svh;
    overflow: hidden;
}

.connect-appbar {
    height: var(--connect-appbar-height);
    min-height: var(--connect-appbar-height);
}

.connect-navigation-toggle {
    display: none !important;
}

.connect-appbar-logo {
    width: 2rem !important;
    height: 2rem !important;
    margin-left: -0.25rem;
}

.connect-appbar-title {
    padding-top: 0.1875rem;
    font-weight: 300;
}

.connect-appbar-subtitle {
    font-size: 1rem;
}

.connect-sidebar-drawer {
    width: var(--connect-sidebar-width);
}

.connect-main-content {
    min-width: 0;
    height: 100dvh;
    box-sizing: border-box;
    overflow: hidden;
}

.connect-page-container {
    min-width: 0;
    max-width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background-color: #fafafa;
    padding: var(--connect-page-padding-top) var(--connect-page-padding-x) var(--connect-page-padding-bottom) !important;
}

.connect-page-container > * {
    min-width: 0;
    max-width: 100%;
}

.connect-page-container .mud-grid,
.connect-page-container .mud-grid-item,
.connect-page-container .mud-paper,
.connect-page-container .mud-stack {
    min-width: 0;
}

/*
 * MudBlazor defines small-chip geometry in fixed pixels. Mirror those defaults
 * in rem so chips participate in the wide-desktop density scale while keeping
 * their existing 24px size in compact, tablet, and mobile modes.
 */
html .mud-chip.mud-chip-size-small {
    height: 1.5rem;
    margin: 0.25rem;
    padding: 0 0.5rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
}

html .mud-chip.mud-chip-size-small .mud-avatar {
    width: 1.125rem;
    height: 1.125rem;
    margin-left: -0.25rem;
    margin-right: 0.25rem;
    margin-inline-start: -0.25rem;
    margin-inline-end: 0.25rem;
}

html .mud-chip.mud-chip-size-small .mud-chip-close-button {
    margin-right: -0.25rem;
    margin-left: 0.25rem;
    margin-inline-end: -0.25rem;
    margin-inline-start: 0.25rem;
}

.connect-page-container .mud-table-container,
.connect-table-scroll {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-gutter: stable;
}

.connect-page-container :where(
    .preview-data-grid .mud-table-container,
    .observer-table-panel .mud-table-container,
    .observer-decision-panel .mud-table-container,
    .plugin-settings-profile-table .mud-table-container,
    .plugin-data-grid-wrap,
    .template-wizard-line-mapping-matrix,
    .template-wizard-tax-profile-table,
    .report-results-table-wrap) {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
}

.connect-page-container :where([class$="-header-actions"]) {
    flex-wrap: wrap;
}

.connect-side-sheet {
    width: min(var(--connect-side-sheet-width), var(--connect-side-sheet-max-width));
    max-width: 100vw;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.connect-side-sheet-body {
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
}

.connect-side-sheet-header,
.connect-side-sheet-footer {
    flex: 0 0 auto;
}

.mud-dialog-title {
    padding: 1rem 1.5rem 0.375rem 1.5rem !important;
}

.mud-table-cell .mud-checkbox > .mud-icon-button {
    color: var(--mud-palette-primary) !important;
}

.blur-bg {
    backdrop-filter: blur(2px);
}

#editor {
    border-radius: 0.25rem;
    overflow: hidden;
}

a:hover, a:active {
    color: #0085CA;
}

.mud-button {
    text-transform: none !important;
}

.mud-tab {
    text-transform: none !important;
}

.mud-input {
    font-size: 0.875rem !important;
    background: #fff;
}

.mud-input-label-outlined {
    font-size: 0.875rem !important;
    margin-top: -0.125rem;
}

.mud-list-item-text > p {
    font-size: 0.875rem;
}

.mud-checkbox > p {
    font-size: 0.875rem;
    padding-top: 0.0625rem;
}

.mud-input-adornment.mud-input-adornment-end.mud-text > p {
    font-size: 0.8125rem;
    font-weight: 500;
}

li.mud-breadcrumb-item.mud-disabled > a {
    color: var(--mud-palette-primary);
}

.mud-table-cell {
    --mud-palette-table-lines: #eee;
}

.highlight {
    background-color: red;
}

.mud-table-pagination-toolbar {
    border-top: 0px !important;
}

.mud-table-sort-label {
    color: #1f2a44 !important;
    font-weight: 600 !important;
}

.mud-table-sort-label:hover,
.mud-table-sort-label.mud-table-sort-label-active {
    color: #0085CA !important;
}

.mud-switch-label-medium {
    font-size: .875rem !important;
}

.mud-input-slot:empty:before {
    content: attr(placeholder);
    color: #ccc;
    pointer-events: none;
}

.highlight {
    background-color: yellow;
    font-weight: bold;
}

.highlight-yellow {
    background-color: yellow;
    font-weight: bold;
}

.highlight-orange {
    background-color: orange;
    font-weight: bold;
}

.highlight-green {
    background-color: lawngreen;
    font-weight: bold;
}

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

.dashboard-widget {
    min-width: 0;
}

.dashboard-widget-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dashboard-widget-card .mud-card-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.dashboard-widget-card .mud-chart,
.dashboard-widget-card .mud-chart canvas,
.dashboard-widget-card .mud-chart svg {
    width: 100% !important;
    height: 100% !important;
}

.dashboard-widget-card .mud-chart,
.dashboard-widget-card .mud-chart svg {
    overflow: visible;
}

.dashboard-chart {
    min-height: 13.75rem;
}

.donut-inner-text {
    fill: #444;
    font-weight: 400;
    font-size: 1.125rem;
}

.donut-inner-value {
    font-size: 2rem;
}

.dashboard-fab {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1000;
}

.dashboard-fab-button {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 999px;
    box-shadow: 0 0.375rem 1.125rem rgba(0, 0, 0, 0.15);
}

@media (min-width: 961px) and (max-width: 1366px), (min-width: 961px) and (max-height: 820px) {
    :root {
        --connect-appbar-height: 64px;
        --connect-sidebar-width: 220px;
        --connect-page-padding-x: 16px;
        --connect-page-padding-top: 14px;
        --connect-page-padding-bottom: 18px;
        --connect-page-surface-padding-x: 20px;
        --connect-page-surface-padding-y: 12px;
        --connect-section-gap: 12px;
        --connect-card-padding: 14px;
        --connect-card-gap: 12px;
        --connect-summary-card-min-height: 88px;
        --connect-sidebar-padding-y: 20px;
        --connect-sidebar-nav-padding: 6px;
        --connect-sidebar-nav-gap: 6px;
        --connect-sidebar-footer-padding-x: 10px;
        --connect-sidebar-support-height: 38px;
        --connect-sidebar-account-padding-y: 9px;
        --connect-page-header-gap: 12px;
        --connect-filter-gap: 12px;
        --auth-card-width: 430px;
        --auth-content-padding-x: 32px;
        --auth-content-padding-top: 28px;
        --auth-content-padding-bottom: 18px;
        --auth-actions-padding-bottom: 28px;
        --auth-logo-size: 62px;
        --auth-brand-gap: 16px;
        --auth-section-gap: 20px;
    }

    .connect-appbar-logo {
        width: 28px !important;
        height: 28px !important;
    }

    .connect-appbar-title {
        font-size: 1.25rem !important;
    }

    .connect-appbar-subtitle {
        font-size: 0.85rem;
    }

    .connect-shell .mud-table-cell {
        padding: 8px 12px;
    }

    .connect-shell .mud-input-control {
        margin-top: 8px;
        margin-bottom: 4px;
    }

    .connect-shell .dashboard-shell,
    .connect-shell .nodes-shell {
        padding: var(--connect-page-surface-padding-y) var(--connect-page-surface-padding-x) calc(var(--connect-page-surface-padding-y) + 4px);
    }

    .connect-shell .dashboard-header,
    .connect-shell .nodes-header {
        margin-bottom: var(--connect-section-gap);
        gap: var(--connect-card-gap);
    }

    .connect-shell .dashboard-header-icon,
    .connect-shell .dashboard-summary-icon,
    .connect-shell .nodes-header-icon,
    .connect-shell .nodes-summary-icon {
        width: 38px;
        height: 38px;
    }

    .connect-shell .dashboard-summary-grid,
    .connect-shell .dashboard-detail-grid,
    .connect-shell .nodes-summary-grid {
        margin-bottom: var(--connect-section-gap);
    }

    .connect-shell .dashboard-summary-card,
    .connect-shell .nodes-summary-card {
        min-height: var(--connect-summary-card-min-height);
        padding: var(--connect-card-padding);
        gap: var(--connect-card-gap);
    }

    .connect-shell .dashboard-section-panel,
    .connect-shell .dashboard-widget-card {
        padding: var(--connect-card-padding);
    }

    .connect-shell .dashboard-section-header,
    .connect-shell .dashboard-widgets-heading,
    .connect-shell .dashboard-widget-header {
        margin-bottom: 10px;
        gap: 10px;
    }

    .connect-shell .dashboard-grid {
        gap: var(--connect-card-gap);
    }

    .connect-shell .dashboard-chart {
        min-height: 190px;
    }

    .connect-shell .dashboard-scalar-widget {
        min-height: 120px;
    }

    .connect-shell .nodes-filter-panel,
    .connect-shell .nodes-table-panel,
    .connect-shell .nodes-footer-panel {
        margin-bottom: var(--connect-section-gap);
    }

    .connect-shell .nodes-filter-panel {
        padding: 10px 12px;
    }

    .connect-shell .nodes-summary-card {
        min-height: 84px;
    }

    .connect-shell .nodes-cluster-child-cell {
        padding: 10px 12px 12px 52px !important;
    }

    .connect-shell .nodes-instance-block {
        padding: 10px;
    }

    .connect-shell .nodes-instance-block-header {
        padding: 8px 10px;
        gap: 10px;
    }

    .connect-shell .nodes-worker-list {
        gap: 10px;
        padding-top: 10px;
    }

    .connect-shell .nodes-worker-tile {
        min-height: 66px;
        padding: 10px;
        gap: 8px;
    }
}

@media (max-width: 960px) {
    :root {
        --connect-appbar-height: 64px;
        --connect-sidebar-width: min(320px, 88vw);
        --connect-page-padding-x: 16px;
        --connect-page-padding-top: 14px;
        --connect-page-padding-bottom: 20px;
        --connect-page-surface-padding-x: 16px;
        --connect-page-surface-padding-y: 14px;
        --connect-section-gap: 12px;
        --connect-card-padding: 14px;
        --connect-card-gap: 12px;
        --connect-sidebar-padding-y: 16px;
        --connect-sidebar-nav-gap: 4px;
        --connect-side-sheet-max-width: 90vw;
    }

    .connect-navigation-toggle {
        display: inline-flex !important;
    }

    .connect-appbar-logo {
        margin-left: 0;
    }

    .connect-page-container :where([class$="-header-actions"]) {
        gap: 8px !important;
    }

    .connect-page-container :where(
        [class$="-filter-actions"],
        [class$="-toolbar"],
        [class$="-toolbar-actions"]) {
        flex-wrap: wrap;
    }

    .mud-dialog {
        max-width: 90vw !important;
        max-height: calc(100dvh - 32px) !important;
    }

    :where(
        .apikeys-drawer,
        .reports-drawer,
        .audit-drawer,
        .system-drawer,
        .roles-drawer,
        .users-drawer,
        .workflow-editor-dictionary-drawer,
        .dictionary-editor-drawer,
        .help-drawer,
        .replay-drawer,
        .workflow-groups-drawer,
        .template-wizard-drawer) {
        max-width: 90vw !important;
        height: 100dvh;
    }

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

@media (max-width: 600px) {
    :root {
        --connect-appbar-height: 56px;
        --connect-page-padding-x: 12px;
        --connect-page-padding-top: 12px;
        --connect-page-padding-bottom: 16px;
        --connect-page-surface-padding-x: 12px;
        --connect-page-surface-padding-y: 12px;
        --connect-section-gap: 10px;
        --connect-card-padding: 12px;
        --connect-card-gap: 10px;
        --connect-page-header-gap: 10px;
        --connect-filter-gap: 10px;
        --connect-summary-card-min-height: 82px;
        --connect-side-sheet-max-width: 100vw;
        --auth-card-width: 100%;
        --auth-card-radius: 14px;
        --auth-content-padding-x: 24px;
        --auth-content-padding-top: 30px;
        --auth-content-padding-bottom: 20px;
        --auth-actions-padding-bottom: 28px;
        --auth-logo-size: 58px;
        --auth-brand-gap: 16px;
        --auth-section-gap: 20px;
    }

    .connect-appbar-title {
        font-size: 1.15rem !important;
    }

    .connect-appbar-subtitle {
        display: none;
    }

    .connect-appbar .mud-chip {
        display: none;
    }

    .connect-page-container :where(
        .dashboard-header,
        .workflows-header,
        .workflow-editor-header,
        .users-header,
        .audit-header,
        .system-header,
        .roles-header,
        .reports-header,
        .policy-header,
        .node-cluster-header,
        .connected-apps-header,
        .jobs-header,
        .job-scripts-header,
        .preview-header,
        .history-header,
        .dashboard-manager-header,
        .customisations-header,
        .plugin-settings-header,
        .observer-header,
        .plugin-data-header,
        .apikeys-header,
        .nodes-header,
        .job-log-header,
        .plugins-header) {
        width: 100%;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: var(--connect-page-header-gap) !important;
    }

    .connect-page-container :where([class$="-header-actions"]) {
        width: 100%;
        align-items: stretch !important;
    }

    .connect-page-container :where([class$="-header-actions"]) > .mud-button-root {
        min-height: var(--connect-touch-target);
        flex: 1 1 140px;
    }

    .connect-page-container :where(
        [class$="-filter-actions"],
        [class$="-toolbar"],
        [class$="-toolbar-actions"]) {
        width: 100%;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .connect-page-container :where(
        [class$="-filter-actions"],
        [class$="-toolbar-actions"]) > .mud-button-root {
        min-height: var(--connect-touch-target);
        flex: 1 1 140px;
    }

    .connect-page-container :where([class$="-section-header"]) {
        flex-wrap: wrap;
        gap: 8px !important;
    }

    .connect-side-sheet,
    :where(
        .apikeys-drawer,
        .reports-drawer,
        .audit-drawer,
        .system-drawer,
        .roles-drawer,
        .users-drawer,
        .workflow-editor-dictionary-drawer,
        .dictionary-editor-drawer,
        .help-drawer,
        .replay-drawer,
        .workflow-groups-drawer,
        .template-wizard-drawer) {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0 !important;
    }

    .mud-dialog {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        margin: 0;
        border-radius: 0 !important;
        display: flex;
        flex-direction: column;
    }

    .mud-dialog-content {
        flex: 1 1 auto;
        min-height: 0;
        min-width: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .mud-dialog-actions {
        flex: 0 0 auto;
        position: sticky;
        bottom: 0;
        z-index: 1;
        padding-bottom: max(8px, env(safe-area-inset-bottom));
        background: var(--mud-palette-surface);
        border-top: 1px solid var(--mud-palette-divider);
    }

    :where(
        .apikeys-drawer-shell,
        .reports-drawer-shell,
        .audit-drawer-shell,
        .system-drawer-shell,
        .roles-drawer-shell,
        .users-drawer-shell,
        .workflow-editor-dictionary-drawer-shell,
        .dictionary-editor-drawer-shell,
        .help-drawer-shell,
        .replay-drawer-shell,
        .workflow-groups-drawer-shell,
        .template-wizard-drawer-shell) {
        height: 100dvh !important;
        min-height: 0;
        overflow: hidden;
    }

    :where(
        .apikeys-drawer-content,
        .reports-drawer-content,
        .audit-drawer-content,
        .system-drawer-content,
        .roles-drawer-content,
        .users-drawer-content,
        .workflow-editor-dictionary-drawer-content,
        .dictionary-editor-drawer-content,
        .help-drawer-content,
        .replay-drawer-content,
        .workflow-groups-drawer-content,
        .template-wizard-drawer-content) {
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    :where(
        .apikeys-drawer-actions,
        .reports-drawer-actions,
        .audit-drawer-actions,
        .system-drawer-actions,
        .roles-drawer-actions,
        .users-drawer-actions,
        .workflow-editor-dictionary-drawer-actions,
        .dictionary-editor-drawer-actions,
        .help-drawer-footer,
        .replay-drawer-actions,
        .workflow-groups-drawer-actions,
        .template-wizard-drawer-actions) {
        flex: 0 0 auto;
        padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
        background: #fff;
    }

    .connect-page-container :where(
        .dashboard-table,
        .dashboard-manager-table,
        .workflows-table,
        .history-table,
        .job-scripts-table,
        .jobs-table,
        .reports-table,
        .nodes-table,
        .plugins-table,
        .customisations-table,
        .users-table,
        .roles-table,
        .audit-table,
        .system-table,
        .apikeys-table) table {
        width: 100% !important;
        min-width: 0 !important;
    }

    .connect-page-container :where([class$="-row-actions"]) {
        text-align: left !important;
        white-space: normal !important;
    }

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

.auth-shell {
    width: 100%;
    height: 100dvh;
    min-height: 100svh;
    background:
        radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.36), transparent 30%),
        linear-gradient(132deg, #0085ca 0%, #0078ba 45%, #00a1e6 100%);
    position: relative;
    overflow: hidden;
}

.auth-shell::before,
.auth-shell::after {
    content: "";
    position: absolute;
    inset: auto;
    pointer-events: none;
}

.auth-shell::before {
    width: 86vw;
    height: 46vh;
    left: -14vw;
    bottom: -14vh;
    border-top: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 50% 50% 0 0;
    transform: rotate(8deg);
}

.auth-shell::after {
    width: 13.125rem;
    height: 10.625rem;
    right: 10vw;
    top: 11vh;
    opacity: 0.36;
    background-image: radial-gradient(rgba(255, 255, 255, 0.95) 1px, transparent 1px);
    background-size: 1rem 1rem;
}

.auth-main {
    height: 100%;
    min-height: 0;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    margin-left: 0 !important;
    padding-top: 0 !important;
}

.auth-container {
    height: 100%;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: clamp(1rem, 2.5vmin, 1.5rem);
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.auth-container > form,
.auth-container > .auth-card {
    width: min(100%, var(--auth-card-width));
    flex: 0 0 auto;
    margin: auto;
}

.auth-card {
    width: 100%;
    border-radius: var(--auth-card-radius) !important;
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 1.625rem 4.375rem rgba(8, 44, 76, 0.22) !important;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(0.875rem);
}

.auth-card .mud-card-content {
    padding: var(--auth-content-padding-top) var(--auth-content-padding-x) var(--auth-content-padding-bottom);
}

.auth-card .mud-card-actions {
    padding: 0 var(--auth-content-padding-x) var(--auth-actions-padding-bottom);
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--auth-brand-gap);
}

.auth-logo {
    width: var(--auth-logo-size);
    height: var(--auth-logo-size);
    border-radius: 999px;
    box-shadow: 0 1.125rem 2.625rem rgba(0, 96, 150, 0.28);
}

.auth-title {
    margin: 0;
    color: #0f1b33;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.14;
    text-align: center;
}

.auth-title--legacy {
    text-align: left;
    font-size: 2rem;
    font-weight: 300;
    line-height: 1.14;
    width: 100%;
}

.auth-title--legacy span {
    display: block;
    color: #0085ca;
    font-weight: 600;
}

.auth-subtitle {
    color: #5d6a7f;
    font-size: 0.92rem;
    text-align: center;
    margin: 0.625rem 0 var(--auth-section-gap) 0;
}

.auth-field-stack {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

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

.auth-field-stack .mud-input-helper-text {
    color: #728096;
    font-size: 0.78rem;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.625rem;
}

.auth-options .mud-checkbox > p,
.auth-code-options .mud-checkbox > p {
    color: #39465d;
}

.auth-action {
    width: 100%;
    min-height: 44px;
    height: 3rem;
    border-radius: 0.4375rem !important;
    box-shadow: none !important;
    font-weight: 600 !important;
}

.auth-secondary-action {
    width: 100%;
    min-height: 44px;
    height: 2.75rem;
    border-radius: 0.4375rem !important;
}

.auth-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-inline-link {
    font-weight: 600;
    font-size: inherit !important;
    line-height: inherit !important;
}

.auth-options {
    font-size: 0.875rem;
}

.auth-options .auth-inline-link,
.auth-support .auth-inline-link {
    font-size: inherit !important;
}

.auth-status {
    min-height: 1.375rem;
    margin-top: 0.875rem;
    text-align: center;
    font-size: 0.88rem;
}

.auth-support {
    margin-top: 1.625rem;
    padding-top: 1.125rem;
    border-top: 1px solid #e8edf4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    color: #5d6a7f;
    font-size: 0.84rem;
}

.auth-link-row {
    margin-top: 1.375rem;
    display: flex;
    justify-content: center;
}

.auth-code-options {
    margin-top: 0.75rem;
    display: grid;
    gap: 0.125rem;
}

.auth-success-panel {
    border: 1px solid #c8efd6;
    background: #f4fbf6;
    border-radius: 0.625rem;
    padding: 1.125rem;
    text-align: center;
}

.auth-access-code {
    color: #0085ca;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-error-card .mud-card-content {
    padding-bottom: 1.25rem;
}

.auth-error-card .auth-brand {
    margin-bottom: 1.375rem;
}

.auth-error-card .auth-subtitle {
    max-width: 24.375rem;
    margin: 0.75rem auto 0.5rem auto;
    line-height: 1.55;
}

@media (max-width: 600px) {
    .auth-container {
        padding: 12px;
    }

    .auth-card .mud-card-content {
        padding: var(--auth-content-padding-top) var(--auth-content-padding-x) var(--auth-content-padding-bottom);
    }

    .auth-card .mud-card-actions {
        padding: 0 var(--auth-content-padding-x) var(--auth-actions-padding-bottom);
    }

    .auth-title {
        font-size: 1.74rem;
    }

    .auth-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}
