:root {
    --font-sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --color-bg: #f4f7fb;
    --color-surface: #ffffff;
    --color-surface-alt: #eef4fb;
    --color-text: #162033;
    --color-muted: #67758a;
    --color-border: #d8e2ef;
    --color-primary: #0a67c8;
    --color-primary-strong: #074c94;
    --color-accent: #f0a84b;
    --color-success: #2a9d67;
    --shadow-soft: 0 24px 60px rgba(16, 31, 62, 0.10);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    color: var(--color-text);
    background:
        radial-gradient(circle at top left, rgba(10, 103, 200, 0.10), transparent 22%),
        linear-gradient(180deg, #f9fbfd 0%, var(--color-bg) 100%);
}

[hidden] {
    display: none !important;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.console-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
    min-width: 0;
}

.console-shell:not(.client-shell) {
    background: linear-gradient(180deg, var(--color-primary), var(--color-primary-strong)) left top / 240px 100% no-repeat;
}

.auth-shell {
    grid-template-columns: minmax(0, 1fr);
    background: var(--color-surface, #f4f8fd);
}

.console-shell.auth-shell {
    grid-template-columns: minmax(0, 1fr);
}

.console-shell.auth-shell.auth-shell-with-sidebar {
    grid-template-columns: 240px minmax(0, 1fr);
}

.auth-shell .auth-main,
.auth-shell .public-main {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.public-access-actions {
    display: grid;
    gap: 0.7rem;
}

.public-access-actions .console-nav-link {
    color: #15304f;
    background: #f4f8fd;
}

.public-access-actions .console-nav-link:hover {
    background: #e7f0fb;
}

.client-shell-embed {
    grid-template-columns: minmax(0, 1fr);
}

.console-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 1.35rem 1rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--color-primary), var(--color-primary-strong));
    color: #fff;
}

.console-shell:not(.client-shell) .console-sidebar {
    align-self: stretch;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

.console-sidebar-brand {
    display: grid;
    gap: 0.75rem;
    padding: 0.2rem 0.35rem 1rem;
}

.console-sidebar-logo {
    display: block;
    width: min(100%, 170px);
    height: auto;
}

.client-sidebar-mobile-bar {
    display: none;
}

.client-sidebar-mobile-toggle {
    display: none;
}

.client-sidebar-drawer {
    display: contents;
}

.console-sidebar-mobile-bar {
    display: none;
}

.console-sidebar-mobile-toggle {
    display: none;
}

.console-sidebar-drawer {
    display: contents;
}

.console-nav,
.console-nav-footer {
    display: grid;
    gap: 0.4rem;
}

.console-nav-footer {
    margin-top: auto;
}

.console-nav-form {
    margin: 0;
}

.console-nav-link,
.console-nav-button {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    padding: 0.8rem 0.85rem;
    border-radius: 14px;
    color: #fff;
    background: transparent;
    border: 0;
    font: inherit;
    text-align: left;
}

.console-nav-badge {
    margin-left: auto;
    min-width: 1.55rem;
    padding: 0.18rem 0.42rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    text-align: center;
}

.console-nav-link.is-active,
.console-nav-link:hover,
.console-nav-button:hover {
    background: rgba(255, 255, 255, 0.12);
}

.client-sidebar .console-nav-link.is-active {
    justify-content: flex-start;
}

.client-shell .console-main {
    min-height: 100vh;
    min-height: 100dvh;
    min-width: 0;
    padding: 1.75rem 2rem;
}

@media (max-width: 1200px) {
    .client-shell.console-shell {
        grid-template-columns: 1fr;
    }

    .client-shell .console-sidebar {
        position: static;
        height: auto;
        overflow: visible;
        padding: 0.95rem 1rem 1rem;
        gap: 0.8rem;
    }

    .client-shell .console-sidebar .console-sidebar-brand {
        padding: 0;
    }

    .client-shell .console-sidebar .console-sidebar-logo {
        width: min(100%, 132px);
    }

    .client-shell .console-sidebar .console-nav,
    .client-shell .console-sidebar .console-nav-footer {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
        overflow: visible;
        padding-bottom: 0;
    }

    .client-shell .console-sidebar .console-nav-footer {
        margin-top: 0;
        align-items: stretch;
    }

    .client-shell .console-sidebar .console-nav-link,
    .client-shell .console-sidebar .console-nav-button {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
        min-height: 2.75rem;
        padding: 0.72rem 0.85rem;
    }

    .client-shell .console-nav-profile,
    .client-shell .console-nav-form {
        grid-column: 1 / -1;
    }

    .client-shell .console-nav-button {
        justify-content: flex-start;
    }

    .client-shell .client-sidebar-panel {
        width: 100%;
        padding: 0.35rem 0 0;
    }

    .client-shell .console-main {
        min-height: auto;
        align-content: start;
        padding: 1rem 1.1rem;
    }

    .client-shell .client-main-stage,
    .client-shell .client-main-stage-hub {
        place-items: stretch;
        justify-items: stretch;
        align-content: start;
        justify-content: stretch;
    }

    .client-shell .client-main-stage > *,
    .client-shell .client-main-stage-hub > * {
        width: 100%;
        max-width: 100%;
    }

    .client-journey-card,
    .client-hub-card,
    .card.client-journey-card,
    .card.client-hub-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
}

body.page-embed {
    background: #f9fbfd;
}

body.page-embed .flash-wrap {
    position: fixed;
    top: 0.75rem;
    left: 50%;
    right: auto;
    width: min(calc(100% - 1.5rem), 760px);
    transform: translateX(-50%);
    z-index: 80;
    pointer-events: none;
}

body.page-embed-hide-member-nav .client-shell {
    grid-template-columns: minmax(0, 1fr);
}

/* Application-only embeds do not reserve space for the hidden auth sidebar. */
body.page-embed-hide-member-nav .console-shell.auth-shell.auth-shell-with-sidebar {
    grid-template-columns: minmax(0, 1fr);
}

body.page-embed-hide-member-nav .auth-sidebar,
body.page-embed-hide-member-nav .client-shell .client-sidebar {
    display: none;
}

body.page-embed-hide-member-nav .flash-wrap .flash {
    margin-bottom: 0;
}

body.page-embed-hide-member-nav .client-shell .console-main {
    padding: 7rem 1rem 1rem;
}

body.page-embed-hide-member-nav .auth-shell .auth-main {
    grid-column: 1;
    width: 100%;
    min-width: 0;
}

body.page-embed-hide-member-nav .client-main-stage {
    place-items: stretch;
}

body.page-embed-hide-member-nav .client-shell-embed .client-main-stage,
body.page-embed-hide-member-nav .client-shell-embed .client-main-stage-hub {
    place-items: center;
    align-content: start;
    justify-items: center;
    justify-content: center;
}

body.page-embed-hide-member-nav .client-journey-card,
body.page-embed-hide-member-nav .client-hub-card {
    width: min(1100px, 100%);
    margin: 0 auto;
}

.public-main {
    min-height: 100vh;
    min-height: 100dvh;
}

.client-main-stage,
.client-main-stage-hub {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 0;
}

.client-shell .client-main-stage > *,
.client-shell .client-main-stage-hub > * {
    width: min(1100px, 100%);
    max-width: 1100px;
    min-width: 0;
    margin-inline: auto;
}

.client-journey-card,
.client-hub-card,
.card.client-journey-card,
.card.client-hub-card {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 1.4rem;
}

.client-hub-card {
    display: grid;
    align-content: start;
}

.client-inner-card {
    border: 0;
    box-shadow: none;
    width: 100%;
    padding: 0;
}

.client-journey-card .card-header,
.client-journey-card .card-footer,
.client-inner-card .card-header,
.client-inner-card .card-footer {
    border: 0;
}

.client-journey-card .card-body {
    padding-top: 1.2rem;
}

.client-progress-panel {
    padding: 0.95rem 1rem;
    border: 1px solid rgba(216, 226, 239, 0.9);
    border-radius: 18px;
    background: #f8fbff;
}

.client-progress-panel .muted {
    margin: 0.55rem 0 0;
}

.client-page-title {
    margin: 0;
}

.client-hub-card .console-page-head {
    margin-bottom: 1.35rem;
}

.client-hub-card .meta-list {
    gap: 0.9rem;
}

.client-hub-card .meta-item {
    padding: 0.95rem 1rem;
}

.field-error {
    margin: 0.45rem 0 0;
    color: #c34141;
    font-size: 0.92rem;
    font-weight: 600;
}

.field-has-error label {
    color: #c34141;
}

.field-input-error {
    border-color: #d85b5b !important;
    background: #fff6f6 !important;
    box-shadow: 0 0 0 3px rgba(216, 91, 91, 0.14) !important;
}

.client-empty-state {
    min-height: 10rem;
    display: grid;
    align-content: center;
}

.client-sidebar-panel {
    display: grid;
    gap: 0.3rem;
    padding: 0.85rem 0.85rem 0.2rem;
    color: #fff;
}

.client-sidebar-panel-label {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

.copy-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.6rem;
    align-items: center;
}

.client-step-nav {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.2rem;
}

.client-step-link {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.94);
    background: transparent;
}

.client-step-link:hover {
    background: rgba(255, 255, 255, 0.10);
}

.client-step-indicator {
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.42);
    background: transparent;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.client-step-link.is-current {
    background: rgba(255, 255, 255, 0.12);
}

.client-step-link.is-current .client-step-indicator {
    border-color: #fff;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
}

.client-step-link.is-complete .client-step-indicator {
    border-color: #9ee2bf;
    background: #9ee2bf;
    box-shadow: 0 0 0 5px rgba(158, 226, 191, 0.18), inset 0 0 0 2px rgba(15, 82, 43, 0.18);
    transform: scale(1.04);
}

.client-step-link.is-incomplete .client-step-indicator {
    border-color: rgba(255, 255, 255, 0.38);
    background: transparent;
}

.client-step-copy {
    min-width: 0;
    font-size: 0.92rem;
    line-height: 1.35;
}

.client-nav-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.7rem;
    height: 1.7rem;
    margin-left: auto;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
}

.console-nav-profile {
    cursor: pointer;
    background: transparent;
}

.console-nav-profile:hover,
.console-nav-profile.is-active {
    background: transparent;
}

.console-nav-profile-avatar {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.console-nav-profile-copy {
    min-width: 0;
}

.console-nav-profile-copy strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.console-nav-icon {
    display: inline-flex;
    width: 1.2rem;
    height: 1.2rem;
}

.console-nav-icon svg {
    width: 100%;
    height: 100%;
}

.console-nav-icon-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.auth-sidebar {
    background: linear-gradient(180deg, var(--color-primary), var(--color-primary-strong));
}

.auth-main {
    display: grid;
    justify-items: center;
    align-content: center;
    min-height: 100vh;
    padding: 1.5rem;
}

body.page-embed .auth-main {
    align-content: start;
    padding: 7rem 1.5rem 1.5rem;
}

.auth-card {
    width: min(100%, 760px);
}

.auth-card-passcode {
    width: min(100%, 760px);
}

.auth-card-logo {
    display: flex;
    justify-content: center;
    margin: 0 0 1.25rem;
}

.auth-card-logo img {
    display: block;
    width: min(100%, 320px);
    max-height: 92px;
    object-fit: contain;
}

.auth-inline-notice-wrap {
    padding-top: 0;
    display: grid;
    gap: 0.75rem;
}

.auth-inline-notice {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.auth-inline-notice.success {
    background: #edf9f1;
    color: #1e6b48;
}

.auth-inline-notice.error {
    background: #fff1f1;
    color: #a13232;
}

.auth-passcode-form {
    border-top: 1px solid var(--color-border);
}

.auth-passcode-compact-body {
    padding-top: 1rem;
}

.auth-passcode-code-field {
    max-width: 260px;
}

.auth-passcode-code-field input {
    text-align: center;
    font-size: 1.15rem;
    letter-spacing: 0.35rem;
}

.auth-passcode-compact-footer {
    justify-content: space-between;
    align-items: center;
}

.auth-passcode-email {
    margin-right: 1rem;
}

.auth-intro-copy {
    display: grid;
    gap: 0.75rem;
}

.auth-intro-copy p {
    margin: 0;
}

.client-embed-hub-card {
    width: min(960px, 100%);
    margin: 0 auto;
    justify-self: center;
    align-self: center;
}

.client-embed-empty-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 6rem;
    box-sizing: border-box;
    margin-top: 0.75rem;
    padding: 1rem 1.15rem;
}

.client-embed-empty-state p {
    margin-bottom: 0;
}

.auth-inline-actions {
    margin-top: 0.6rem;
    margin-bottom: 0.35rem;
    display: flex;
    justify-content: flex-end;
}

.console-main {
    padding: 1.25rem;
}

.console-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    margin-bottom: 1rem;
    min-height: 2.4rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.filter-row-strong {
    gap: 0.7rem;
}

.filter-row-strong .members-page-actions {
    margin-left: auto;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 1rem;
    font-size: 0.92rem;
    border: 0;
    color: #15304f;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.filter-pill strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.7rem;
    height: 1.7rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    color: inherit;
    font-size: 0.82rem;
}

.filter-pill.is-all {
    background: #dfe8f3;
    color: #31465f;
}

.filter-pill.is-submitted {
    background: #dbeeff;
    color: #074c94;
}

.filter-pill.is-review {
    background: #fff0cf;
    color: #8a5b00;
}

.filter-pill.is-interview {
    background: #efe9ff;
    color: #5f3cb1;
}

.filter-pill.is-clarification {
    background: #ffe7f1;
    color: #9a2e63;
}

.filter-pill.is-awaiting {
    background: #efe9ff;
    color: #5f3cb1;
}

.filter-pill.is-recorded {
    background: #dbf3e7;
    color: #1f7a52;
}

.filter-pill.is-selected {
    border: 2px solid currentColor;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(16, 31, 62, 0.10);
    font-weight: 700;
}

.filter-pill.is-selected strong {
    background: rgba(255, 255, 255, 0.78);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.85rem 1.25rem;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(216, 226, 239, 0.85);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.brand-has-logo {
    gap: 0.8rem;
}

.brand-mark {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--color-primary), #2fb5c8);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.brand-logo-panel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.75rem;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
    box-shadow: 0 12px 24px rgba(10, 103, 200, 0.18);
}

.brand-logo-panel-dark {
    background: #000;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.brand-logo {
    display: block;
    width: 9.2rem;
    height: auto;
}

.brand-copy strong {
    display: block;
    font-size: 1rem;
}

.brand-copy span,
.muted {
    color: var(--color-muted);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.button,
.button-ghost,
.button-pill,
.button-link {
    border: 0;
    border-radius: var(--button-radius, 14px);
    cursor: pointer;
    font: inherit;
}

.button {
    padding: 0.72rem 1.05rem;
    color: var(--button-text-color, #fff);
    background: linear-gradient(135deg, var(--button-primary-background, var(--color-primary)), var(--button-primary-background-strong, var(--color-primary-strong)));
    box-shadow: 0 12px 24px rgba(10, 103, 200, 0.22);
}

.button.is-loading,
.button-ghost.is-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}

.button:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    box-shadow: none;
}

.button-success {
    background: linear-gradient(135deg, #2a9d67, #1f7d52);
    box-shadow: 0 12px 24px rgba(42, 157, 103, 0.22);
}

.button-ghost {
    padding: 0.72rem 0.95rem;
    color: var(--button-ghost-text-color, var(--color-text));
    background: var(--button-ghost-background, var(--color-surface-alt));
}

.button-pill {
    padding: 0.55rem 0.85rem;
    color: var(--color-muted);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}

.button-compact {
    padding: 0.45rem 0.7rem;
    font-size: 0.86rem;
    box-shadow: none;
}

.button-link {
    padding: 0;
    background: transparent;
    color: var(--color-primary);
}

.button-spinner {
    width: 0.95rem;
    height: 0.95rem;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-top-color: currentColor;
    border-radius: 999px;
    animation: upload-spin 0.8s linear infinite;
    flex-shrink: 0;
}

.button-ghost .button-spinner {
    border-color: rgba(10, 25, 64, 0.14);
    border-top-color: currentColor;
}

.page {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: calc(100vh - 77px);
}

.rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0.75rem;
    border-right: 1px solid rgba(216, 226, 239, 0.8);
}

.rail-indicator {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--color-border);
}

.rail-indicator.is-active {
    width: 14px;
    height: 14px;
    background: var(--color-primary);
    box-shadow: 0 0 0 6px rgba(10, 103, 200, 0.12);
}

.content {
    padding: 1.5rem;
}

.center-stage {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.card {
    width: min(100%, 760px);
    background: var(--color-surface);
    border: 1px solid rgba(216, 226, 239, 0.7);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.card-header,
.card-body,
.card-footer {
    padding: 1.2rem 1.35rem;
}

.flash {
    margin: 0 auto 1.25rem;
    width: min(100%, 760px);
    padding: 1rem 1.25rem;
    border-radius: 0;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.flash-wrap {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    padding: 0;
    pointer-events: none;
}

.flash-wrap .flash {
    margin-left: auto;
    margin-right: auto;
    pointer-events: auto;
}

.flash.is-hiding {
    opacity: 0;
    transform: translateY(-8px);
}

.flash.success {
    background: #edf9f1;
    color: #1e6b48;
}

.flash.error {
    background: #fff1f1;
    color: #8d2b2b;
}

.card-header {
    border-bottom: 1px solid rgba(216, 226, 239, 0.75);
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid rgba(216, 226, 239, 0.75);
}

.wizard-actions-left {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.wizard-actions-right {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-left: auto;
    justify-content: flex-end;
}

.client-inner-card .card-footer {
    margin-top: 0.25rem;
    padding-top: 1rem;
}

.client-inner-card .button,
.client-inner-card .button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.25rem;
    padding: 0.42rem 0.7rem;
    font-size: 0.86rem;
    line-height: 1;
    border-radius: 12px;
}

.kicker {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.hero-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.hero-panel {
    padding: 1.25rem;
    background: linear-gradient(180deg, #f9fbfe 0%, #eef5fd 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

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

.progress {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #e8eef7;
    overflow: hidden;
}

.progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--color-primary), #45b6d8);
}

.step-card-list {
    display: grid;
    gap: 1rem;
}

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

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

.field {
    display: grid;
    gap: 0.35rem;
    align-content: start;
}

.field label {
    font-weight: 600;
}

.field-help {
    margin: 0.1rem 0 0;
    font-size: 0.78rem;
    color: var(--color-muted);
}

.field-help-strong {
    font-weight: 700;
}

.field-help-status {
    font-weight: 700;
}

.field-help-status.is-valid {
    color: #1f7a52;
}

.field-help-error {
    color: #8d2b2b;
    font-weight: 700;
}

.field-full,
.field-address,
.field-upload {
    grid-column: 1 / -1;
}

.field input[type="date"],
.field input[type="number"],
.field input[type="url"],
.field input[type="email"],
.field input[type="tel"] {
    max-width: 22rem;
}

.field input[type="text"],
.field select {
    max-width: 22rem;
}

.currency-input-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: calc(6ch + 3rem);
    min-width: calc(6ch + 3rem);
    max-width: calc(6ch + 3rem);
}

.currency-input-symbol {
    position: absolute;
    top: 50%;
    left: 0.9rem;
    transform: translateY(-50%);
    color: var(--color-muted);
    font-weight: 600;
    pointer-events: none;
}

.field .currency-input {
    width: 100%;
    min-width: 0;
    max-width: none;
    padding-left: 1.8rem;
    padding-right: 0.65rem;
    text-align: right;
    appearance: textfield;
}

.client-question-grid .field select {
    width: auto;
    min-width: 18ch;
    max-width: min(100%, 24ch);
    padding: 0.65rem 2rem 0.65rem 0.85rem;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fff;
    font: inherit;
    color: inherit;
}

.field textarea {
    min-height: 132px;
    resize: vertical;
}

.field-boolean {
    align-content: start;
}

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

.field-grid-name-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.profile-page-form {
    display: grid;
    gap: 1.5rem;
}

.profile-card {
    overflow: visible;
}

.profile-card-body {
    display: grid;
    gap: 1.35rem;
}

.profile-readonly-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-static-values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    min-height: 2.8rem;
}

.profile-role-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: #eef4fb;
    color: var(--color-text);
    font-size: 0.86rem;
    font-weight: 600;
}

.message-signature-preview {
    padding: 0.95rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fbfdff;
    color: var(--color-text);
    line-height: 1.6;
}

.message-signature-preview > :first-child {
    margin-top: 0;
}

.message-signature-preview > :last-child {
    margin-bottom: 0;
}

.address-grid .field:last-child input {
    max-width: 14rem;
    text-transform: uppercase;
}

.meta-list {
    display: grid;
    gap: 0.6rem;
}

.meta-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fbfdff;
}

.meta-item-link {
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.meta-item-link:hover {
    background: #f5f9ff;
    border-color: #c9dced;
    transform: translateY(-1px);
}

.meta-item-subtext {
    margin-top: 0.18rem;
    font-size: 0.82rem;
    color: var(--color-muted);
}

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

.error-list li {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: #fff1f1;
    border: 1px solid #f2c9c9;
    color: #8d2b2b;
}

.choice-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.choice-grid-boolean {
    grid-template-columns: repeat(2, minmax(0, 96px));
    gap: 0.55rem;
    margin-top: 0.45rem;
}

.choice-card {
    position: relative;
    display: block;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: #fbfdff;
    cursor: pointer;
}

.choice-card input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.choice-card:has(input:checked) {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(10, 103, 200, 0.10);
    background: linear-gradient(180deg, #f6fbff 0%, #eef7ff 100%);
}

.choice-card h3 {
    margin: 0 0 0.35rem;
}

.choice-card-boolean {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.35rem 0.55rem;
    text-align: center;
}

.choice-card-boolean h3 {
    margin: 0;
    font-size: 0.82rem;
}

.choice-card-programme {
    min-height: 16rem;
    padding-top: 1.15rem;
}

.choice-card-illustration {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 5rem;
    height: 5rem;
    object-fit: contain;
}

.choice-card-programme h3,
.choice-card-programme p {
    max-width: calc(100% - 6rem);
}

.client-start-copy {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.client-start-copy p {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.65;
}

.client-start-copy a {
    color: var(--color-primary);
    font-weight: 700;
}

.application-path-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
}

.application-path-form {
    width: auto;
    max-width: 100%;
    margin: 0;
}

.application-path-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
    border: 0;
    padding: 0;
    border-radius: 1rem;
    background: transparent;
    cursor: pointer;
}

.application-path-submit:hover,
.application-path-submit:focus-visible {
    border-radius: 1rem;
    box-shadow: 0 0 0 3px rgba(10, 103, 200, 0.18), 0 12px 26px rgba(16, 35, 63, 0.18);
    outline: none;
}

.field-guide-read:has(input[value="0"]:checked) .guide-read-warning {
    display: block;
}

.field-guide-read:has(input[value="1"]:checked) .guide-read-warning {
    display: none;
}

.field-boolean-break {
    margin-bottom: 0.8rem;
}

.guide-read-warning {
    display: none;
    margin-top: 0.7rem;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    border: 1px solid rgba(229, 155, 62, 0.35);
    background: rgba(255, 245, 227, 0.95);
    color: #7a4c0f;
    line-height: 1.55;
}

.guide-read-warning.is-visible {
    display: block;
}

.guide-read-warning a {
    color: var(--color-primary);
    font-weight: 700;
}

.privacy-policy-copy {
    display: grid;
    gap: 0.65rem;
    margin-bottom: 0.2rem;
}

.privacy-policy-copy p {
    margin: 0;
    color: var(--color-text);
    line-height: 1.6;
}

.privacy-policy-copy a {
    color: var(--color-primary);
    font-weight: 700;
}

.field-privacy-policy {
    gap: 0.7rem;
}

.privacy-policy-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    width: fit-content;
    max-width: 100%;
    font-weight: 600;
    line-height: 1.45;
}

.privacy-policy-checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    flex: 0 0 auto;
}

.application-path-image {
    display: block;
    width: auto;
    max-width: min(100%, 26rem);
    height: clamp(2.9rem, 6vw, 4.35rem);
    object-fit: contain;
    border-radius: 1rem;
}

.summary-grid {
    display: grid;
    gap: 0.85rem;
}

.summary-card {
    padding: 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #fbfdff;
}

.client-review-sections {
    gap: 1rem;
}

.client-review-section-card {
    padding: 1rem 1rem 0.95rem;
    border: 0;
    background: #fff;
}

.mailbox-message-body {
    white-space: pre-wrap;
    line-height: 1.6;
}

.mailbox-message-html-frame {
    width: 100%;
    min-height: 420px;
    border: 1px solid rgba(216, 226, 239, 0.9);
    border-radius: 16px;
    background: #fff;
}

.console-mailbox-head {
    align-items: flex-start;
}

.console-mailbox-head-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.console-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.25rem;
    flex-wrap: wrap;
}

.console-filter-bar .button-ghost.is-active {
    background: rgba(17, 95, 190, 0.12);
    color: var(--brand-blue);
    border-color: rgba(17, 95, 190, 0.2);
}

.console-mailbox-status-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.95rem;
    border: 1px solid rgba(216, 226, 239, 0.9);
    border-radius: 16px;
    background: #fff;
}

.mailbox-status-indicator {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 999px;
    background: #d05f5f;
    box-shadow: 0 0 0 4px rgba(208, 95, 95, 0.14);
    flex: 0 0 auto;
}

.mailbox-status-indicator.is-active {
    background: #2a9d67;
    box-shadow: 0 0 0 4px rgba(42, 157, 103, 0.16);
}

.member-communications-list {
    display: grid;
    gap: 0.9rem;
}

.member-record-status-pill {
    width: fit-content;
    justify-self: start;
}

.member-record-application-list {
    display: grid;
    gap: 0.95rem;
}

.member-record-application-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.25rem;
    align-items: center;
    width: 100%;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(216, 226, 239, 0.95);
    border-radius: var(--radius-md);
    background: #fbfdff;
    color: var(--color-text);
    text-decoration: none;
}

.member-record-application-row:hover,
.member-record-application-row:focus-visible {
    border-color: rgba(10, 103, 200, 0.26);
    box-shadow: 0 16px 32px rgba(16, 31, 62, 0.08);
    outline: none;
}

.member-record-application-copy,
.member-record-application-meta {
    display: grid;
    gap: 0.28rem;
}

.member-record-application-copy strong {
    font-size: 1rem;
}

.member-record-application-copy small {
    color: var(--color-muted);
}

.member-record-application-meta {
    justify-items: end;
    align-self: start;
}

.title-with-icon-action {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    width: fit-content;
    max-width: 100%;
    vertical-align: middle;
}

.heading-block {
    display: grid;
    justify-items: start;
    align-content: start;
    gap: 0.35rem;
}

.title-with-icon-action-heading {
    align-items: baseline;
    gap: 0.35rem;
}

.title-with-icon-action-small {
    gap: 0.55rem;
}

.title-with-icon-action h1,
.title-with-icon-action h2 {
    margin: 0;
}

.inline-heading-title {
    display: inline;
    width: auto;
    max-width: none;
    flex: 0 1 auto;
}

.mailbox-title-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: auto;
    max-width: max-content;
    vertical-align: middle;
}

.mailbox-title-inline h1 {
    margin: 0;
}

.mailbox-inline-heading {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: auto;
    max-width: max-content;
    margin: 0;
}

.mailbox-inline-heading-small {
    gap: 0.3rem;
}

.mailbox-inline-heading .icon-image-button {
    vertical-align: middle;
}

.icon-image-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 1.35rem;
    width: 1.35rem;
    min-width: 1.35rem;
    max-width: 1.35rem;
    height: 1.35rem;
    min-height: 1.35rem;
    max-height: 1.35rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
    line-height: 0;
    vertical-align: middle;
}

.icon-image-button img {
    display: block;
    width: 1.35rem;
    min-width: 1.35rem;
    max-width: 1.35rem;
    height: 1.35rem;
    min-height: 1.35rem;
    max-height: 1.35rem;
    object-fit: contain;
    flex: 0 0 1.35rem;
}

.icon-image-button-swap {
    position: relative;
}

.icon-image-button-swap .icon-image-default,
.icon-image-button-swap .icon-image-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    transition: opacity 0.18s ease;
}

.icon-image-button-swap .icon-image-hover {
    opacity: 0;
}

.icon-image-button-swap:hover .icon-image-default,
.icon-image-button-swap:focus-visible .icon-image-default {
    opacity: 0;
}

.icon-image-button-swap:hover .icon-image-hover,
.icon-image-button-swap:focus-visible .icon-image-hover {
    opacity: 1;
}

.mailbox-detail-subject-heading {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
}

.mailbox-detail-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.mailbox-detail-close-icon {
    width: 1.35rem;
    height: 1.35rem;
    min-width: 1.35rem;
    min-height: 1.35rem;
    padding: 0;
    border: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.mailbox-detail-close-icon img {
    display: block;
    width: 1.35rem;
    height: 1.35rem;
    object-fit: contain;
}

.mailbox-reply-history {
    display: grid;
    gap: 1rem;
}

.mailbox-reply-history-item {
    display: grid;
    gap: 0.35rem;
    padding: 0 0 0.95rem;
    border-bottom: 1px solid rgba(216, 226, 239, 0.85);
}

.mailbox-reply-history-item:last-child {
    border-bottom: 0;
}

.mailbox-reply-history-summary {
    display: block;
}

.mailbox-reply-history-body {
    width: 100%;
    color: #16325c;
}

.mailbox-reply-history-body,
.mailbox-reply-history-body div,
.mailbox-reply-history-body p,
.mailbox-reply-history-body span,
.mailbox-reply-history-body a,
.mailbox-reply-history-body li {
    font-family: "Century Gothic", Arial, sans-serif !important;
    font-size: 1rem;
    line-height: 1.6;
}

.mailbox-reply-history-body p:last-child {
    margin-bottom: 0;
}

.mailbox-reply-history-field {
    margin-top: 1.1rem;
}

.mailbox-detail-action-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.mailbox-detail-inline-form {
    margin: 0;
}

.detail-inline-message {
    margin-bottom: 1rem;
}

.detail-inline-message p {
    margin: 0.45rem 0 0;
}

.detail-inline-message-error {
    border-color: rgba(214, 63, 63, 0.35);
}

.detail-inline-message-error p {
    color: #9f1d1d;
}

.member-communication-item {
    display: grid;
    grid-template-columns: 1.65rem minmax(0, 1fr) auto;
    gap: 0.95rem;
    align-items: center;
    width: 100%;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(216, 226, 239, 0.95);
    border-radius: var(--radius-md);
    background: #fbfdff;
    color: var(--color-text);
    text-align: left;
    cursor: pointer;
}

.member-communication-item:hover,
.member-communication-item:focus-visible {
    border-color: rgba(10, 103, 200, 0.26);
    box-shadow: 0 16px 32px rgba(16, 31, 62, 0.08);
    outline: none;
}

.member-communication-icon-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    flex: 0 0 1.65rem;
}

.member-communication-icon-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.member-communication-copy,
.member-communication-meta {
    display: grid;
    gap: 0.2rem;
}

.member-communication-subject {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.communication-attachment-icon {
    width: 0.95rem;
    height: 0.95rem;
    object-fit: contain;
    flex: 0 0 auto;
}

.mailbox-attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.mailbox-detail-link-row {
    margin-top: 1rem;
}

.mailbox-link-field {
    min-width: min(34rem, 100%);
}

.mailbox-link-inline-controls {
    display: flex;
    align-items: end;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.mailbox-link-inline-controls select {
    flex: 1 1 auto;
}

.mailbox-link-inline-controls .button,
.mailbox-link-inline-controls .button-ghost {
    min-width: 5.5rem;
}

.mailbox-detail-action-button {
    min-width: 8.5rem;
    justify-content: center;
}

.member-communication-copy small,
.member-communication-meta small {
    color: var(--color-muted);
}

.member-communication-meta {
    justify-items: end;
    text-align: right;
}

.mailbox-status-copy {
    display: grid;
    gap: 0.1rem;
}

.mailbox-status-copy strong,
.mailbox-status-copy small {
    margin: 0;
}

.client-review-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.client-review-section-head h3 {
    margin: 0;
}

.client-review-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: #edf6ff;
    color: var(--color-primary-strong);
}

.summary-card h3 {
    margin-top: 0;
}

.summary-row {
    display: grid;
    gap: 0.3rem;
    padding: 0.6rem 0;
}

.summary-missing {
    color: #8d2b2b;
    font-size: 0.84rem;
    font-weight: 600;
}

.client-review-card .card-body {
    padding-top: 0;
}

.client-review-card .card-footer {
    border-top: 0;
}

.client-review-body {
    min-width: 0;
}

.client-review-sections {
    align-items: start;
}

.client-review-section-card {
    min-width: 0;
}

.client-profile-head {
    position: relative;
}

.client-profile-header-row {
    display: block;
}

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

.client-profile-close-icon {
    position: absolute;
    top: 0;
    right: 0;
}

.client-review-section-card .summary-row.is-missing strong {
    color: #8d2b2b;
}

.client-review-section-card .summary-row .muted:empty::before {
    content: "Not provided";
    color: #8d2b2b;
    font-style: italic;
}

.step-card {
    padding: 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #fbfdff;
}

.modal-demo {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(10, 103, 200, 0.04), rgba(10, 103, 200, 0.01));
}

.table-card {
    overflow: hidden;
}

.table-card table {
    width: 100%;
    border-collapse: collapse;
}

.table-card th,
.table-card td {
    padding: 0.8rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(216, 226, 239, 0.7);
}

.interactive-table tbody .interactive-row {
    cursor: pointer;
    transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.interactive-table tbody .interactive-row:hover td,
.interactive-table tbody .interactive-row:focus td {
    background: #f5f9ff;
}

.interactive-table tbody .interactive-row:active td {
    background: #edf5ff;
}

.interactive-table tbody .interactive-row:hover,
.interactive-table tbody .interactive-row:focus {
    box-shadow: inset 0 0 0 1px rgba(10, 103, 200, 0.14);
}

.interactive-table tbody .interactive-row.is-archived-member td {
    background: rgba(16, 35, 63, 0.03);
}

.members-page-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
    position: relative;
}

.members-search-popout {
    position: relative;
}

.members-search-popout summary {
    list-style: none;
}

.members-search-popout summary::-webkit-details-marker {
    display: none;
}

.members-search-toggle {
    width: 2.9rem;
    height: 2.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.members-search-toggle img {
    width: 1.8rem;
    height: 1.8rem;
    display: block;
}

.members-search-panel {
    position: absolute;
    top: calc(100% + 0.7rem);
    right: 0;
    width: min(22rem, calc(100vw - 4rem));
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(171, 205, 244, 0.95);
    background: #ffffff;
    box-shadow: 0 22px 48px rgba(16, 35, 63, 0.18);
    z-index: 20;
}

.members-search-form {
    display: grid;
    gap: 0.8rem;
}

.members-search-form input[type="search"] {
    width: 100%;
    min-width: 0;
    font: inherit;
    color: var(--color-text);
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(171, 205, 244, 0.95);
    padding: 0.78rem 0.95rem;
}

.mailbox-auto-responder-trigger.is-enabled {
    background: #e8f7ef;
    color: #1f7a52;
    border-color: rgba(31, 122, 82, 0.18);
}

.mailbox-auto-responder-trigger.is-enabled:hover {
    background: #dcf1e5;
    color: #196544;
    border-color: rgba(25, 101, 68, 0.22);
}

.mailbox-auto-responder-trigger.is-disabled {
    background: #fff1f1;
    color: #8d2b2b;
    border-color: rgba(141, 43, 43, 0.16);
}

.mailbox-auto-responder-trigger.is-disabled:hover {
    background: #ffe6e6;
    color: #762323;
    border-color: rgba(118, 35, 35, 0.22);
}

.members-search-panel-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.table-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: inherit;
    text-decoration: none;
}

.table-sort-link:hover,
.table-sort-link:focus-visible {
    color: var(--color-primary);
}

.table-sort-arrows {
    display: inline-grid;
    gap: 0.02rem;
    line-height: 0.8;
}

.table-sort-arrow {
    font-size: 0.46rem;
    color: #a4b0c0;
}

.table-sort-link.is-active .table-sort-arrow.is-active {
    color: var(--color-primary-strong);
}

.historic-import-preview {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(171, 205, 244, 0.95);
    border-radius: 18px;
    background: #fbfdff;
    display: grid;
    gap: 0.55rem;
}

.historic-import-preview-table-wrap {
    overflow-x: auto;
    margin-top: 0.35rem;
}

.historic-import-preview-table th,
.historic-import-preview-table td {
    white-space: nowrap;
}

.members-status-stack {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.viewer-badge-stack {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.85rem;
    background: #edf6ff;
    color: var(--color-primary-strong);
    font-weight: 600;
}

.status-pill.is-submitted {
    background: #edf6ff;
    color: var(--color-primary-strong);
}

.status-pill.is-review {
    background: #fff4df;
    color: #986300;
}

.status-pill.is-interview {
    background: #efe9ff;
    color: #5f3cb1;
}

.status-pill.is-clarification {
    background: #ffe9f2;
    color: #a02e68;
}

.status-pill.is-approval {
    background: #efe9ff;
    color: #5f3cb1;
}

.status-pill.is-replies {
    background: #e6f7f6;
    color: #0f6f6a;
}

.status-pill.is-accepted {
    background: #e8f7ef;
    color: #1f7a52;
}

.status-pill.is-signed {
    background: #8fd3ad;
    color: #0a3f25;
}

.status-pill.is-rejected {
    background: #f3a6a6;
    color: #5e0b0b;
}

.status-pill.is-withdrawn {
    background: #f3a6a6;
    color: #5e0b0b;
}

.stack-compact {
    display: grid;
    gap: 0.25rem;
}

.split {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.1rem;
}

.sidebar-card,
.detail-card {
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
}

.interviews-page {
    display: grid;
    gap: 1.25rem;
}

.interviews-page > .summary-card {
    margin: 0;
}

.sidebar-nav {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.sidebar-link {
    padding: 0.95rem 1rem;
    border-radius: 14px;
    background: #f8fbff;
    border: 1px solid transparent;
}

.sidebar-link.is-active {
    background: linear-gradient(135deg, var(--color-primary), #1789d7);
    color: #fff;
}

.section-stack {
    display: grid;
    gap: 1.2rem;
}

.application-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 1.1rem;
    align-items: start;
    margin-bottom: 1.15rem;
}

.application-hero-copy {
    display: grid;
    gap: 0.45rem;
}

.application-hero-copy h1 {
    margin: 0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

.application-hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.application-hero-meta strong {
    color: var(--color-text);
}

.application-action-rail {
    display: grid;
    gap: 0.7rem;
}

.application-action-item {
    display: grid;
    gap: 0.3rem;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    background: #f7fbff;
    border: 1px solid rgba(216, 226, 239, 0.9);
}

.application-action-item .status-pill {
    justify-self: start;
}

.application-action-item-compact {
    gap: 0.7rem;
}

.application-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
}

.application-action-row strong {
    color: var(--color-text);
}

.application-action-row-timeline {
    align-items: flex-end;
}

.application-action-timeline-copy {
    display: grid;
    gap: 0.15rem;
}

.application-timeline-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.3rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.application-timeline-trigger img {
    display: block;
    width: 1.55rem;
    height: 1.55rem;
    object-fit: contain;
}

.application-action-label {
    font-size: 0.72rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.application-action-progress {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
}

.timeline-list {
    display: grid;
    gap: 1rem;
}

.timeline-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
}

.timeline-dot {
    width: 10px;
    height: 10px;
    margin-top: 0.38rem;
    border-radius: 999px;
    background: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(17, 95, 190, 0.12);
}

.timeline-copy {
    display: grid;
    gap: 0.25rem;
}

.timeline-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.timeline-copy p {
    margin: 0;
}

.timeline-detail {
    display: grid;
    gap: 0.25rem;
}

.timeline-detail summary {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    color: var(--color-muted);
    font-size: 0.9rem;
    user-select: none;
    list-style: none;
}

.timeline-detail summary::-webkit-details-marker {
    display: none;
}

.timeline-detail-arrow {
    font-size: 0.78rem;
    line-height: 1;
}

.timeline-detail[open] .timeline-detail-arrow {
    transform: rotate(180deg);
}

.timeline-detail-list {
    display: grid;
    gap: 0.25rem;
    padding-left: 0.35rem;
}

.settings-section {
    display: grid;
    gap: 1.1rem;
}

.settings-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
    gap: 1rem;
    align-items: start;
}

.settings-branding-stack {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.settings-mail-stack {
    display: grid;
    gap: 1.1rem;
    align-content: start;
}

.settings-mid-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 2fr);
    gap: 1rem;
    align-items: start;
}

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

.settings-card {
    padding: 1.1rem;
    align-self: start;
}

.settings-tab-panel-grid--two > .settings-card-span-two {
    grid-column: 1 / -1;
}

#historic-import-settings-card {
    grid-column: 1;
}

.settings-iframe-card {
    background: linear-gradient(180deg, #fcfdff 0%, #f8fbff 100%);
}

.settings-template-card {
    align-self: start;
}

.settings-template-row {
    align-items: center;
    justify-content: space-between;
}

.settings-template-row .question-admin-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.settings-template-row .question-admin-copy strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.settings-template-row .status-pill {
    margin-left: auto;
    flex: 0 0 auto;
}

.settings-template-token-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.settings-template-token {
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: #f6f9ff;
    color: var(--color-primary);
    padding: 0.42rem 0.75rem;
    font: inherit;
    font-size: 0.84rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.settings-template-token:hover,
.settings-template-token:focus-visible {
    background: rgba(37, 99, 235, 0.11);
    border-color: rgba(37, 99, 235, 0.32);
    transform: translateY(-1px);
}

.settings-access-table-wrap {
    overflow-x: auto;
}

.settings-access-table {
    min-width: 760px;
}

.settings-access-matrix {
    border-collapse: separate;
    border-spacing: 0.35rem 0.55rem;
    min-width: 840px;
}

.settings-access-matrix thead th {
    padding-bottom: 0.2rem;
    color: var(--color-muted);
    font-size: 0.79rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.settings-access-matrix tbody tr {
    background: transparent;
}

.settings-access-matrix tbody td {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    vertical-align: middle;
    background: #fbfdff;
}

.settings-access-matrix tbody td:first-child {
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
}

.settings-access-matrix tbody td:last-child {
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
}

.settings-access-role {
    min-width: 8.5rem;
}

.settings-access-key {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.9rem;
    font-size: 0.82rem;
}

.settings-access-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.4rem;
    padding: 0.32rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.settings-access-badge.is-allowed {
    min-width: 1.1rem;
    width: 1.1rem;
    height: 1.1rem;
    padding: 0;
    background: transparent;
    color: #1f7a52;
}

.settings-access-dot {
    display: block;
    width: 0.62rem;
    height: 0.62rem;
    border-radius: 50%;
    background: #24a66a;
    box-shadow: 0 0 0 3px #e7f6ee;
}

.settings-access-badge.is-denied {
    min-width: 0;
    padding: 0;
    background: transparent;
    color: #6c7d94;
}

.settings-access-table th,
.settings-access-table td {
    white-space: nowrap;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
}

.settings-access-table th:not(:first-child),
.settings-access-table td:not(:first-child) {
    text-align: center;
}

.settings-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.bulk-record-form {
    margin-top: 0.8rem;
}

.bulk-record-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-bottom: 0.35rem;
}

.member-delete-group {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--color-border);
}

.member-delete-group:first-child {
    padding-top: 0;
}

.member-delete-group h3 {
    margin: 0 0 0.55rem;
}

.member-delete-record {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0.45rem 0;
}

.settings-field-grid-iframe {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-toggle {
    grid-auto-rows: min-content;
}

.settings-inline-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 600;
}

.settings-inline-toggle input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: var(--color-primary);
    flex: 0 0 auto;
}

.settings-pill-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.settings-pill-option {
    position: relative;
    display: inline-flex;
}

.settings-pill-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.settings-pill-option input[type="radio"]:checked + .button-pill {
    color: #fff;
    background: linear-gradient(135deg, var(--button-primary-background, var(--color-primary)), var(--button-primary-background-strong, var(--color-primary-strong)));
    border-color: transparent;
}

.interview-slot-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.interview-slot-button.is-selected {
    color: #fff;
    background: linear-gradient(135deg, var(--button-primary-background, var(--color-primary)), var(--button-primary-background-strong, var(--color-primary-strong)));
    border-color: transparent;
}

.interview-slot-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.interview-custom-time {
    margin-top: 0.75rem;
    max-width: 13rem;
}

.settings-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

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

.settings-logo-item {
    display: grid;
    gap: 0.6rem;
    align-content: start;
}

.settings-logo-label {
    font-weight: 700;
}

.settings-logo-preview {
    min-height: 140px;
    padding: 1rem;
    border: 1px solid rgba(216, 226, 239, 0.9);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-logo-preview-dark {
    background: #050505;
}

.settings-logo-preview img {
    max-width: 100%;
    max-height: 110px;
    width: auto;
    height: auto;
    display: block;
}

.settings-folder-picker {
    display: grid;
    gap: 0.8rem;
    margin-top: 1rem;
}

.settings-folder-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.branding-preview {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(216, 226, 239, 0.9);
    border-radius: 18px;
    background: #f8fbff;
    display: grid;
    gap: 0.55rem;
}

.branding-preview-head {
    display: grid;
    gap: 0.2rem;
}

.branding-preview-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.branding-preview .button,
.branding-preview .button-ghost {
    min-width: auto;
    padding: 0.48rem 0.8rem;
    box-shadow: none;
}

.field .settings-radius-input {
    width: auto;
    min-width: calc(3ch + 1.4rem);
    max-width: calc(3ch + 1.4rem);
    justify-self: start;
    padding-left: 0.7rem;
    padding-right: 0.7rem;
}

.settings-iframe-fields {
    margin-top: 0.25rem;
}

.question-bank-card {
    display: grid;
    gap: 1rem;
}

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

.programme-bank-column,
.programme-step-stack {
    display: grid;
    gap: 0.9rem;
}

.programme-bank-column {
    align-content: start;
}

.programme-bank-column form {
    margin: 0;
}

.programme-bank-head h4,
.programme-step-head h5 {
    margin: 0;
}

.programme-bank-head-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.8rem;
}

.programme-bank-head-copy,
.programme-bank-head-controls {
    min-width: 0;
}

.programme-bank-head-controls {
    display: flex;
    justify-content: flex-end;
}

.programme-step-card {
    padding: 1rem;
    border-radius: 18px;
    background: #f8fbff;
    border: 1px solid rgba(216, 226, 239, 0.9);
    display: grid;
    gap: 0.85rem;
}

.programme-step-card.is-dragging,
.question-admin-item.is-dragging {
    opacity: 0.55;
}

.programme-step-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.8rem;
}

.question-admin-list {
    display: grid;
    gap: 0.6rem;
}

.question-admin-item {
    display: flex;
    align-items: stretch;
    gap: 0.55rem;
}

.question-bank-order {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.4rem;
}

.question-bank-order-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.7rem;
    height: 1.7rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #edf6ff;
    color: var(--color-primary-strong);
    font-size: 0.8rem;
    font-weight: 700;
}

.question-admin-row {
    display: flex;
    width: 100%;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(216, 226, 239, 0.9);
    border-radius: 16px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.question-admin-row:hover {
    background: #f5f9ff;
    border-color: #c9dced;
    transform: translateY(-1px);
}

.expense-contract-picker {
    margin-bottom: 1rem;
}

.expense-contract-picker-head {
    display: grid;
    gap: 0.25rem;
}

.expense-contract-picker-head p {
    margin: 0;
}

.expense-application-table {
    margin-top: 0.85rem;
    width: 100%;
    table-layout: fixed;
}

.expense-application-table th,
.expense-application-table td {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
    vertical-align: middle;
    text-align: left;
}

.expense-application-table th {
    white-space: nowrap;
    padding-top: 0.2rem;
    padding-bottom: 0.45rem;
}

.expense-application-table td {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.expense-application-col-ref {
    width: 20%;
}

.expense-application-col-type {
    width: 28%;
}

.expense-application-col-period {
    width: 36%;
}

.expense-application-col-amount {
    width: 16%;
}

.expense-application-cell-amount {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.expense-application-cell-ref {
    white-space: nowrap;
}

.expense-application-cell-type {
    white-space: nowrap;
}

.expense-application-cell-period {
    white-space: nowrap;
}

.expense-contract-period-value {
    display: inline-block;
    white-space: nowrap;
}

.expense-contract-row.is-ended {
    cursor: default;
    opacity: 0.72;
}

.expense-contract-row.is-ended td {
    background: #fafcff;
}

.expense-contract-ended-note {
    margin-top: 0.2rem;
    font-size: 0.82rem;
}

.expense-claim-stack {
    display: grid;
    gap: 1rem;
    width: min(1100px, max(50vw, 860px));
    max-width: 100%;
}

.expense-form-card,
.expense-details-card-shell {
    width: 100%;
}

.expense-form-subheading {
    margin: 0.35rem 0 0;
}

.expense-card-title {
    margin: 0;
    font-size: 1.5rem;
}

.expense-details-card-shell .card-header {
    padding-bottom: 0.35rem;
}

.expense-details-card-shell .card-body {
    padding-top: 0.75rem;
}

.expense-details-card-shell .card-footer {
    padding-top: 1rem;
}

.expense-details-card {
    display: grid;
    gap: 0.95rem;
}

.expense-lines-head,
.expense-upload-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
}

.expense-lines-title {
    display: grid;
    gap: 0.15rem;
}

.expense-line-header {
    display: grid;
    grid-template-columns: 9.5rem minmax(15rem, 1fr) 6.25rem minmax(10rem, auto);
    gap: 0.6rem;
    align-items: center;
    color: var(--color-muted);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    padding: 0 0 0.15rem;
    text-align: left;
}

.expense-lines {
    display: grid;
    gap: 0.6rem;
}

.expense-lines-help {
    margin: 0 0 1rem;
}

.expense-inline-warning {
    margin: 0 0 0.85rem;
}

.expense-line-row {
    display: grid;
    grid-template-columns: 9.5rem minmax(15rem, 1fr) 6.25rem minmax(10rem, auto);
    gap: 0.6rem;
    align-items: center;
    padding: 0.35rem 0.6rem;
    border-radius: 14px;
    transition: background-color 140ms ease, box-shadow 140ms ease;
}

.expense-date-field {
    position: relative;
    width: 9.5rem;
    min-width: 9.5rem;
}

.expense-date-field::before {
    content: "";
    position: absolute;
    left: 0.35rem;
    top: 50%;
    width: 1rem;
    height: 1rem;
    transform: translateY(-50%);
    background: currentColor;
    opacity: 0.7;
    pointer-events: none;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2' ry='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2' ry='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18'/%3E%3C/svg%3E") center / contain no-repeat;
}

.expense-line-row.is-incomplete {
    background: rgba(197, 44, 44, 0.06);
    box-shadow: inset 0 0 0 1px rgba(197, 44, 44, 0.16);
}

.expense-line-row.is-active,
.expense-line-row:focus-within {
    background: rgba(10, 103, 200, 0.06);
    box-shadow: inset 0 0 0 1px rgba(10, 103, 200, 0.14);
}

.expense-line-row.is-incomplete .expense-date-input,
.expense-line-row.is-incomplete .expense-line-description,
.expense-line-row.is-incomplete .expense-amount-input {
    background: rgba(255, 255, 255, 0.92);
}

.expense-line-description {
    min-height: 2.9rem;
    height: 2.9rem;
    resize: none;
    overflow: hidden;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.45;
    padding: 0.72rem 0.55rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    font: inherit;
}

.expense-inline-row {
    display: flex;
    align-items: end;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.expense-inline-field {
    max-width: 100%;
    margin-bottom: 0;
}

.expense-inline-field-date,
.expense-inline-field-amount {
    max-width: 12rem;
}

.expense-inline-field-period {
    flex: 1 1 16rem;
    min-width: 14rem;
}

.expense-inline-field-name {
    flex: 1 1 20rem;
    min-width: 16rem;
}

.expense-date-input {
    width: 100%;
    min-width: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding-left: 2.1rem;
    padding-right: 0;
    font: inherit;
}

.expense-date-input::-webkit-calendar-picker-indicator {
    position: absolute;
    left: 0.35rem;
    right: auto;
    width: 1.3rem;
    height: 1.3rem;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.expense-line-receipt-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    opacity: 0.45;
    flex: 0 0 auto;
}

.expense-line-receipt-status.is-active {
    opacity: 1;
}

.expense-line-receipt-status img {
    width: 1.15rem;
    height: 1.15rem;
    display: block;
    object-fit: contain;
    filter: grayscale(1) brightness(0.72);
}

.expense-line-receipt-status.is-active img {
    filter: brightness(0) saturate(100%) invert(47%) sepia(65%) saturate(742%) hue-rotate(85deg) brightness(95%) contrast(91%);
}

.expense-date-input::-webkit-inner-spin-button,
.expense-date-input::-webkit-clear-button {
    display: none;
}

.expense-amount-input {
    width: 6.25rem;
    min-width: 6.25rem;
    text-align: left;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding-left: 0;
    padding-right: 0;
    font: inherit;
    appearance: textfield;
    -moz-appearance: textfield;
}

.expense-amount-input::-webkit-outer-spin-button,
.expense-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.expense-amount-output {
    font-variant-numeric: tabular-nums;
    width: 6.25rem;
    min-width: 6.25rem;
}

.expense-period-output {
    width: 100%;
    min-width: 14rem;
}

.expense-calculated-input {
    background: #edf1f6;
    border-color: #d8e0ea;
    color: #66758a;
}

.expense-deemphasised-label {
    color: var(--color-muted);
}

.expense-totals-list {
    display: grid;
    gap: 0.45rem;
    margin-top: 1.2rem;
    justify-content: end;
}

.expense-total-row {
    display: grid;
    grid-template-columns: auto minmax(6rem, auto);
    gap: 1rem;
    align-items: center;
    justify-content: end;
}

.expense-total-value {
    min-width: 6rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.expense-line-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    min-width: 100%;
}

.expense-line-actions-main {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex: 0 1 auto;
    min-width: 0;
}

.expense-line-receipt-list,
.expense-line-receipt-state {
    display: none;
}

.claim-line-list {
    display: grid;
    gap: 0.7rem;
}

.claim-line-item {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.9rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--color-border);
}

.claim-line-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.claim-line-copy,
.claim-line-meta,
.claim-line-receipts {
    display: grid;
    gap: 0.2rem;
}

.claim-line-meta {
    justify-items: end;
}

.claim-line-receipts {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.claim-detail-head-card {
    margin-bottom: 1rem;
}

.claim-detail-page-head {
    margin-bottom: 0;
    align-items: start;
}

.claim-detail-head-copy {
    display: grid;
    gap: 0.3rem;
}

.claim-detail-head-copy h1 {
    margin: 0;
}

.claim-detail-submitter {
    margin: 0;
}

.expense-form-contract-period {
    margin-top: -0.2rem;
}

.claim-detail-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.claim-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.claim-kpi-card {
    display: grid;
    gap: 0.35rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: #f8fbff;
}

.claim-kpi-label {
    color: var(--color-muted);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.claim-kpi-value {
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
}

.claim-kpi-value-period {
    font-size: 0.96rem;
}

.claim-review-table-wrap {
    overflow-x: auto;
}

.console-main > .claim-detail-head-card + .summary-card.application-section-card,
.console-main > .summary-card.application-section-card + .summary-card.application-section-card {
    margin-top: 1rem;
}

.claim-review-card {
    display: grid;
    gap: 1rem;
}

.claim-review-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
}

.claim-review-table th:nth-child(1),
.claim-review-table td:nth-child(1) {
    width: 8.5rem;
}

.claim-review-table th:nth-child(2),
.claim-review-table td:nth-child(2) {
    width: 26%;
}

.claim-review-table th:nth-child(3),
.claim-review-table td:nth-child(3) {
    width: 8rem;
}

.claim-review-table th:nth-child(4),
.claim-review-table td:nth-child(4) {
    width: 7.5rem;
}

.claim-review-table th:nth-child(5),
.claim-review-table td:nth-child(5) {
    width: 22%;
}

.claim-review-table th:nth-child(6),
.claim-review-table td:nth-child(6) {
    width: 6.75rem;
}

.claim-review-table th,
.claim-review-table td {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    text-align: left;
}

.claim-review-table td {
    vertical-align: top;
}

.claim-ocr-card .card-title-row {
    align-items: flex-start;
}

.claim-ocr-runtime-stack {
    min-width: 220px;
}

.claim-ocr-stack {
    display: grid;
    gap: 18px;
}

.claim-ocr-receipt-card {
    display: grid;
    gap: 18px;
}

.claim-ocr-receipt-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.claim-ocr-receipt-copy {
    display: grid;
    gap: 6px;
}

.claim-ocr-receipt-state {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.claim-ocr-error-banner {
    border: 1px solid #f2c7c7;
    background: #fff2f2;
    color: #8d2d2d;
    border-radius: 18px;
    padding: 12px 14px;
}

.claim-ocr-grid {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.claim-ocr-preview-pane {
    display: grid;
    gap: 12px;
}

.claim-ocr-preview-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.claim-ocr-preview-frame {
    border: 1px solid #d6e2f2;
    border-radius: 20px;
    background: #f8fbff;
    min-height: 360px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.claim-ocr-preview-frame img,
.claim-ocr-preview-frame iframe {
    width: 100%;
    min-height: 360px;
    border: 0;
    display: block;
}

.claim-ocr-review-form {
    display: grid;
    gap: 18px;
}

.claim-ocr-form-section {
    display: grid;
    gap: 12px;
}

.claim-ocr-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}

.claim-ocr-inline-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

.claim-ocr-table-wrap {
    overflow-x: auto;
}

.claim-ocr-table th,
.claim-ocr-table td {
    vertical-align: top;
}

.claim-ocr-table input {
    min-width: 100%;
}

.claim-ocr-warning-list {
    margin: 0;
    padding-left: 20px;
    color: #8d2d2d;
    display: grid;
    gap: 8px;
}

.claim-ocr-validation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
}

.claim-ocr-actions {
    justify-content: flex-end;
}

@media (max-width: 1080px) {
    .claim-ocr-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .claim-ocr-field-grid,
    .claim-ocr-validation-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.claim-review-row.has-receipt {
    cursor: pointer;
}

.claim-review-row.has-receipt:hover {
    background: rgba(10, 103, 200, 0.05);
}

.claim-review-description-cell {
    white-space: normal;
    line-height: 1.45;
}

.claim-review-comment-cell textarea {
    width: 100%;
    min-height: 2.75rem;
    resize: vertical;
    padding: 0.35rem 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    font: inherit;
}

.claim-line-receipt-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.claim-line-review-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.45rem;
    white-space: nowrap;
}

.claim-line-review-icon-receipt {
    margin-right: 0.2rem;
}

.claim-line-review-icon-receipt img {
    filter: grayscale(1) brightness(0.72);
}

.claim-line-review-icon-receipt.is-active img {
    filter: brightness(0) saturate(100%) invert(47%) sepia(65%) saturate(742%) hue-rotate(85deg) brightness(95%) contrast(91%);
}

.claim-line-review-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    min-width: 2.1rem;
    min-height: 2.1rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 1;
    font-size: 0;
    flex: 0 0 auto;
}

.claim-line-review-icon img {
    width: 1.6rem;
    height: 1.6rem;
    max-width: 1.6rem;
    max-height: 1.6rem;
    display: block;
    object-fit: contain;
}

.claim-line-review-icon:hover {
    transform: translateY(-1px);
}

.expense-line-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.expense-line-upload.is-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.expense-line-preview-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.expense-line-delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    align-self: center;
    margin-left: auto;
    flex: 0 0 auto;
}

.expense-line-delete-button img,
.expense-line-upload img,
.expense-line-preview-button img {
    width: 1.15rem;
    height: 1.15rem;
    display: block;
    object-fit: contain;
}

.expense-line-delete-button:hover,
.expense-line-upload:hover,
.expense-line-preview-button:hover {
    transform: translateY(-1px);
}

.expense-line-upload:focus-within,
.expense-line-delete-button:focus-visible,
.expense-line-preview-button:focus-visible {
    outline: 2px solid rgba(21, 97, 187, 0.25);
    outline-offset: 4px;
}

.expense-receipt-modal {
    width: min(860px, calc(100vw - 2rem));
}

.expense-receipt-modal-body {
    position: relative;
}

.expense-receipt-modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}

.expense-receipt-delete-button {
    width: 1.8rem;
    height: 1.8rem;
}

.expense-receipt-modal-preview {
    min-height: 65vh;
    height: min(70vh, 760px);
    border-radius: 16px;
    overflow: hidden;
    background: #f5f8fc;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expense-receipt-modal-preview.has-image {
    background: transparent;
}

.expense-receipt-modal-preview iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

.expense-receipt-modal-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

.expense-receipt-modal-open {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.expense-receipt-modal-footer {
    justify-content: flex-end;
    margin-top: 1cm;
    padding: 0;
    border: 0;
}

.expense-form-footer {
    margin-top: 0;
}

.modal-simple-confirm {
    width: min(720px, calc(100vw - 2rem));
}

.modal-simple-confirm .card-body {
    padding: 1cm;
}

.modal-simple-confirm .card-body form {
    display: grid;
    gap: 1rem;
}

.modal-simple-confirm .card-body p {
    margin: 0;
    font-size: 1.05rem;
}

.modal-simple-confirm .card-footer {
    padding: 0;
    border: 0;
    margin-top: 1cm;
}

.card-header-row,
.dashboard-row-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.dashboard-row-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.icon-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid #d5e3f4;
    border-radius: 12px;
    background: #f4f7fb;
    color: var(--color-text);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    box-sizing: border-box;
}

.icon-action-button:hover {
    background: #eaf1fb;
    border-color: #bdd1e8;
}

.icon-action-button-danger {
    color: #8d2b2b;
}

.icon-action-button-danger:hover {
    background: #fff1f1;
    border-color: #efc9c9;
}

.icon-action-button img {
    width: 1.3rem;
    height: 1.3rem;
    display: block;
    object-fit: contain;
}

.icon-action-button:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.icon-action-button-danger img {
    filter: hue-rotate(145deg) saturate(1.45);
}

.button-danger {
    background: linear-gradient(135deg, #c52c2c, #941f1f);
    color: #fff;
    box-shadow: 0 12px 24px rgba(197, 44, 44, 0.18);
}

.upload-button-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
}

.upload-inline-icon {
    width: 1.1rem;
    height: 1.1rem;
    object-fit: contain;
}

.question-admin-copy {
    display: grid;
    gap: 0.2rem;
}

.question-bank-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    color: var(--color-muted);
    cursor: grab;
    user-select: none;
}

.settings-help-copy {
    margin: 0 0 0.9rem;
}

.application-section-card {
    display: grid;
    gap: 1rem;
    padding: 1.1rem;
}

#decision-section {
    gap: 0.5rem;
}

.card-title-row {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.85rem;
}

.card-title-row h3 {
    margin: 0;
}

.card-title-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.contract-doc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.contract-doc-table-wrap {
    overflow-x: auto;
}

.contract-doc-table {
    width: 100%;
    border-collapse: collapse;
}

.contract-doc-table th,
.contract-doc-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(216, 226, 239, 0.7);
    vertical-align: top;
}

.contract-doc-table tbody tr {
    cursor: pointer;
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.contract-doc-table tbody tr:hover td,
.contract-doc-table tbody tr:focus td {
    background: #f5f9ff;
}

.contract-doc-table tbody tr:hover,
.contract-doc-table tbody tr:focus {
    box-shadow: inset 0 0 0 1px rgba(10, 103, 200, 0.14);
}

.contract-doc-link,
.contract-support-item {
    width: auto;
}

.doc-action-icon {
    display: block;
    width: 1.15rem;
    height: 1.15rem;
    object-fit: contain;
}

.application-list-icon-link,
.application-list-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.application-list-reference-row {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
}

.application-list-inline-icon {
    width: 1.55rem;
    height: 1.55rem;
}

.application-list-icon {
    display: block;
    width: 1.3rem;
    height: 1.3rem;
    object-fit: contain;
}

.card-side-note {
    margin: 0 0 0.85rem;
    font-size: 0.84rem;
    line-height: 1.45;
}

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

.decision-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.decision-panel-card {
    margin-top: 1rem;
}

#decision-section > .decision-panel-card {
    margin-top: 0.35rem;
}

.decision-option-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: min(100%, 42rem);
}

.decision-option-button {
    border: 0;
    border-radius: 12px;
    min-height: 2.75rem;
    color: #fff;
    font-weight: 700;
    box-shadow: none;
}

.decision-option-button.is-disabled,
.button-is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.decision-option-button.is-active {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85), 0 10px 20px rgba(16, 35, 63, 0.18);
}

.decision-option-accepted {
    background: #2f8f57;
}

.decision-option-interview {
    background: #6b46c1;
}

.decision-option-clarification {
    background: #e48b1f;
}

.decision-option-resubmission {
    background: #7f8794;
}

.decision-option-rejected {
    background: #c64a4a;
}

.decision-form-grid select {
    width: auto;
    min-width: 16ch;
    max-width: min(100%, 24ch);
}

.decision-form-grid input[type="text"],
.decision-form-grid input[type="number"],
.decision-form-grid input[type="date"] {
    max-width: 18rem;
}

.decision-panel-card.is-interview-mode {
    width: min(50%, 42rem);
    max-width: 42rem;
    gap: 0.6rem;
}

.decision-conditional-panel[data-decision-panel="interview"] {
    display: block;
}

.decision-interview-scheduler {
    width: 100%;
    max-width: none;
}

.decision-interview-scheduler-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.decision-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    margin-top: 0.35rem;
}

.decision-conditional-panel[data-decision-panel="interview"] .decision-actions {
    margin-top: 0.95rem;
}

.decision-outcome-actions {
    margin-top: 0.85rem;
    flex-wrap: wrap;
}

.interview-left-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1rem;
}

.interview-card-span-two {
    grid-column: 1 / -1;
}

.section-header h3,
.section-comments h4 {
    margin: 0 0 0.35rem;
}

.section-comments {
    padding-top: 1rem;
    border-top: 1px solid rgba(216, 226, 239, 0.7);
}

.comment-toolbar {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.comment-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: #fff;
    color: var(--color-text);
}

.comment-toggle.has-comments:hover {
    background: #edf6ff;
    border-color: #c9dced;
    color: var(--color-primary-strong);
}

.comment-toggle-icon {
    position: relative;
    width: 1rem;
    height: 0.8rem;
    border: 1.5px solid var(--color-primary);
    border-radius: 0.45rem;
}

.comment-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0.15rem;
    bottom: -0.28rem;
    width: 0.32rem;
    height: 0.32rem;
    background: #fff;
    border-right: 1.5px solid var(--color-primary);
    border-bottom: 1.5px solid var(--color-primary);
    transform: rotate(45deg);
}

.comment-toggle-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55rem;
    height: 1.55rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #edf6ff;
    color: var(--color-primary-strong);
    font-size: 0.82rem;
    font-weight: 700;
}

.comment-add-trigger,
.comment-reply-trigger,
.comment-edit-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: #fff;
    color: var(--color-primary-strong);
    box-shadow: 0 8px 18px rgba(16, 31, 62, 0.12);
}

.comments-panel {
    margin-top: 1rem;
    display: grid;
    gap: 0.85rem;
}

.upload-thumbnail-button {
    display: inline-flex;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.upload-thumbnail {
    width: 10rem;
    height: 10rem;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(216, 226, 239, 0.9);
    box-shadow: 0 10px 24px rgba(16, 31, 62, 0.10);
}

.upload-thumbnail-caption {
    display: block;
    margin-top: 0.6rem;
}

.upload-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
}

.upload-control input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.85rem;
    padding: 0.72rem 1rem;
    border-radius: 14px;
    background: var(--color-surface-alt);
    color: var(--color-text);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}

.upload-button:hover {
    background: #e7eff9;
    transform: translateY(-1px);
}

.upload-button.is-uploading {
    gap: 0.5rem;
}

.upload-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(10, 103, 200, 0.18);
    border-top-color: var(--color-primary);
    border-radius: 999px;
    animation: upload-spin 0.8s linear infinite;
}

.upload-button-spinner {
    flex-shrink: 0;
}

.upload-thumb-wrap {
    display: inline-block;
    margin-top: 0.4rem;
    position: relative;
    width: 8.5rem;
    height: 8.5rem;
    overflow: hidden;
}

.upload-thumb {
    display: block;
    width: 8.5rem;
    height: 8.5rem;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(216, 226, 239, 0.9);
    box-shadow: 0 10px 24px rgba(16, 31, 62, 0.10);
}

.upload-thumb-delete {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border: 0;
    border-radius: 999px;
    background: rgba(22, 32, 51, 0.72);
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.notification-email-preview {
    white-space: pre-wrap;
}

.notification-preview-trigger {
    gap: 0.35rem;
}

.notification-preview-frame {
    width: 100%;
    min-height: 32rem;
    border: 1px solid rgba(216, 226, 239, 0.9);
    border-radius: 14px;
    background: #fff;
}

.notification-preview-text {
    padding: 1rem 1.1rem;
    border: 1px solid rgba(216, 226, 239, 0.9);
    border-radius: 14px;
    background: #fff;
    white-space: pre-wrap;
    color: var(--color-text);
}

.notification-preview-dialog {
    width: min(78vw, 980px);
    max-width: 78vw;
    max-height: 82vh;
    display: grid;
    gap: 0.9rem;
    align-content: start;
}

.notification-preview-modal-head h4 {
    margin: 0;
}

.notification-preview-modal-head .muted {
    margin: 0.25rem 0 0;
}

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

.avatar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    overflow: hidden;
    border-radius: 999px;
    background: linear-gradient(135deg, #edf6ff, #d9eafb);
    color: var(--color-primary-strong);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.avatar-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-badge-sm {
    width: 2rem;
    height: 2rem;
    font-size: 0.74rem;
}

.avatar-badge-xs {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.68rem;
}

.section-comment {
    position: relative;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(216, 226, 239, 0.8);
    border-radius: 14px;
    background: #fff;
}

.section-comment-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.section-comment p {
    margin: 0.75rem 0 0 2.75rem;
}

.section-comment-meta {
    display: grid;
    gap: 0.15rem;
}

.comment-composer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(216, 226, 239, 0.8);
    border-radius: 18px;
    background: #fff;
}

.composer-avatar {
    margin-top: 0.2rem;
}

.comment-composer-body {
    display: grid;
    gap: 0.75rem;
}

.comment-edit-trigger {
    position: static;
}

.comment-inline-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    margin-top: 0.85rem;
}

.comment-replies {
    display: grid;
    gap: 0.65rem;
    margin: 0.8rem 0 0 2.75rem;
}

.section-comment-reply {
    padding: 0.8rem 0.9rem;
    background: #f9fbfe;
}

.stage-progress-copy {
    margin: 0.45rem 0 0;
}

.stage-recipient-defaults {
    margin-top: 0.2rem;
}

.stage-recipient-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.2rem;
}

.stage-recipient-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(216, 226, 239, 0.7);
}

.stage-recipient-row:last-child {
    border-bottom: 0;
}

.stage-recipient-person,
.stage-recipient-suggestion {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stage-recipient-copy {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.stage-recipient-copy strong,
.stage-recipient-copy small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stage-recipient-copy small {
    color: var(--color-muted);
}

.stage-recipient-row input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--color-primary);
}

.stage-recipient-search-field {
    margin-top: 1rem;
}

.stage-recipient-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-height: 3.25rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: #fff;
}

.stage-recipient-picker input {
    flex: 1 1 12rem;
    min-width: 12rem;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
}

.stage-recipient-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.stage-recipient-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.65rem;
    border: 0;
    border-radius: 999px;
    background: #edf6ff;
    color: var(--color-primary-strong);
    font: inherit;
    cursor: pointer;
}

.stage-recipient-suggestions {
    margin-top: 0.45rem;
    display: grid;
    gap: 0.2rem;
    border: 1px solid rgba(216, 226, 239, 0.9);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 36px rgba(16, 31, 62, 0.12);
    overflow: hidden;
}

.stage-recipient-suggestion {
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 0;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.stage-recipient-suggestion:hover {
    background: #f5f9ff;
}

.comment-edit-trigger span {
    font-size: 0.95rem;
    line-height: 1;
}

.comment-composer textarea {
    min-height: 4.7rem;
    padding: 0.95rem 1.1rem;
    border-radius: 24px;
    background: #fff;
    font: inherit;
    line-height: 1.5;
    color: inherit;
    resize: vertical;
}

.comment-composer textarea::placeholder {
    font: inherit;
    color: var(--color-muted);
}

.comment-composer-actions {
    display: flex;
    justify-content: flex-end;
}

.comment-submit {
    min-width: 7rem;
    padding: 0.85rem 1.35rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
    color: #fff;
    box-shadow: 0 12px 24px rgba(10, 103, 200, 0.22);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.image-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(14, 23, 38, 0.72);
}

.image-preview-dialog {
    position: relative;
    z-index: 1;
    width: min(75vw, 75vh);
    max-width: 75vw;
    max-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 30px 80px rgba(16, 31, 62, 0.28);
}

.image-preview-dialog img {
    max-width: 100%;
    max-height: calc(75vh - 2rem);
    border-radius: 18px;
}

.image-preview-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 999px;
    background: rgba(16, 31, 62, 0.08);
    color: var(--color-text);
    font-size: 1.5rem;
    line-height: 1;
}

.inset-card {
    background: #fff;
}

.stage-action-card {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(216, 226, 239, 0.7);
}

.inline-form {
    display: inline;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
}

.checkbox-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.6rem;
    align-items: start;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #fbfdff;
}

.checkbox-card strong,
.checkbox-card small {
    display: block;
}

.checkbox-card small {
    margin-top: 0.25rem;
    color: var(--color-muted);
}

.checkbox-stack {
    display: grid;
    gap: 0.65rem;
}

[data-modal] {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 40;
    width: min(700px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow: auto;
    transform: translate(-50%, -50%);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
}

[data-modal="edit-user-modal"] {
    width: min(560px, calc(100vw - 2rem));
}

[data-modal="edit-mail-template-modal"],
[data-modal="template-preview-modal"] {
    width: min(980px, calc(100vw - 2rem));
}

.client-shell .client-main-stage > [data-modal="start-application-modal"] {
    width: min(50vw, 560px);
}

body.page-embed .client-shell .client-main-stage > [data-modal] {
    width: min(50vw, 560px);
}

[data-modal="edit-user-modal"] .card-header,
[data-modal="edit-user-modal"] .card-body,
[data-modal="edit-user-modal"] .card-footer {
    padding: 0.85rem 0.95rem;
}

[data-modal="edit-user-modal"] .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

[data-modal="edit-user-modal"] .checkbox-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

[data-modal="edit-user-modal"] .checkbox-card {
    padding: 0.65rem 0.75rem;
}

[data-modal="edit-user-modal"] .avatar-badge {
    width: 2.2rem;
    height: 2.2rem;
}

.modal-plain-header {
    border-bottom: 0;
    padding-bottom: 0.25rem;
}

.modal-plain-footer {
    border-top: 0;
    padding-top: 0.35rem;
}

.settings-template-preview-modal .card-body {
    padding-top: 0.75rem;
}

.settings-template-preview-frame {
    width: 100%;
    min-height: 640px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #f4f7fb;
}

.avatar-picker {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    cursor: pointer;
}

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

.checkbox-card-compact {
    padding: 0.6rem 0.7rem;
}

.checkbox-card-compact small {
    display: none;
}

@media (max-width: 900px) {
    .console-shell:not(.client-shell) {
        grid-template-columns: 1fr;
        background: none;
    }

    .console-shell:not(.client-shell) .console-sidebar {
        position: sticky;
        top: 0;
        z-index: 40;
        height: auto;
        overflow: visible;
        padding: 0;
        background: transparent;
        box-shadow: none;
    }

    .console-shell:not(.client-shell) .console-sidebar-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 1rem;
        padding: calc(env(safe-area-inset-top, 0px) + 0.9rem) calc(env(safe-area-inset-right, 0px) + 1rem) 0.9rem calc(env(safe-area-inset-left, 0px) + 1rem);
        background: linear-gradient(180deg, var(--color-primary), var(--color-primary-strong));
        box-shadow: 0 10px 30px rgba(16, 31, 62, 0.16);
    }

    .console-shell:not(.client-shell) .console-sidebar-mobile-brand {
        padding: 0;
        order: 2;
        margin-left: 0.75rem;
    }

    .console-shell:not(.client-shell) .console-sidebar-mobile-brand .console-sidebar-logo {
        width: min(100%, 132px);
    }

    .console-shell:not(.client-shell) .console-sidebar-mobile-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.25rem;
        width: 2.7rem;
        height: 2.7rem;
        padding: 0;
        border: 0;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        box-shadow: none;
        order: 1;
    }

    .console-shell:not(.client-shell) .console-sidebar-mobile-toggle span {
        display: block;
        width: 1.15rem;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .console-shell:not(.client-shell) .console-sidebar.is-menu-open .console-sidebar-mobile-toggle span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .console-shell:not(.client-shell) .console-sidebar.is-menu-open .console-sidebar-mobile-toggle span:nth-child(2) {
        opacity: 0;
    }

    .console-shell:not(.client-shell) .console-sidebar.is-menu-open .console-sidebar-mobile-toggle span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .console-shell:not(.client-shell) .console-sidebar .console-sidebar-drawer {
        display: none;
        padding: 0.95rem calc(env(safe-area-inset-right, 0px) + 1rem) calc(env(safe-area-inset-bottom, 0px) + 1rem) calc(env(safe-area-inset-left, 0px) + 1rem);
        background: linear-gradient(180deg, var(--color-primary), var(--color-primary-strong));
        color: #fff;
        box-shadow: 0 20px 44px rgba(16, 31, 62, 0.18);
    }

    .console-shell:not(.client-shell) .console-sidebar.is-menu-open .console-sidebar-drawer {
        display: block;
    }

    .console-shell:not(.client-shell) .console-sidebar .console-sidebar-drawer .console-sidebar-brand {
        display: none;
    }

    .console-shell:not(.client-shell) .console-main {
        min-height: auto;
        padding: 1rem max(1rem, env(safe-area-inset-right, 0px)) max(1rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
    }

    .console-shell:not(.client-shell) .console-sidebar .console-nav,
    .console-shell:not(.client-shell) .console-sidebar .console-nav-footer {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
        overflow: visible;
        padding-bottom: 0;
    }

    .console-shell:not(.client-shell) .console-sidebar .console-nav-footer {
        margin-top: 0;
        align-items: stretch;
    }

    .console-shell:not(.client-shell) .console-sidebar .console-nav-link,
    .console-shell:not(.client-shell) .console-sidebar .console-nav-button {
        width: 100%;
        min-width: 0;
        min-height: 2.75rem;
        padding: 0.72rem 0.85rem;
    }

    .console-shell:not(.client-shell) .console-nav-profile,
    .console-shell:not(.client-shell) .console-nav-form {
        grid-column: 1 / -1;
    }

    .console-shell:not(.client-shell) .console-nav-button {
        justify-content: flex-start;
    }

    .client-shell .client-sidebar {
        position: sticky;
        top: 0;
        z-index: 40;
        height: auto;
        overflow: visible;
        padding: 0;
        background: transparent;
        box-shadow: none;
    }

    .client-shell .client-sidebar-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: calc(env(safe-area-inset-top, 0px) + 0.9rem) calc(env(safe-area-inset-right, 0px) + 1rem) 0.9rem calc(env(safe-area-inset-left, 0px) + 1rem);
        background: linear-gradient(180deg, var(--color-primary), var(--color-primary-strong));
        box-shadow: 0 10px 30px rgba(16, 31, 62, 0.16);
    }

    .client-shell .client-sidebar-mobile-brand {
        padding: 0;
    }

    .client-shell .client-sidebar-mobile-brand .console-sidebar-logo {
        width: min(100%, 132px);
    }

    .client-shell .client-sidebar-mobile-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.25rem;
        width: 2.7rem;
        height: 2.7rem;
        padding: 0;
        border: 0;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        box-shadow: none;
    }

    .client-shell .client-sidebar-mobile-toggle span {
        display: block;
        width: 1.15rem;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .client-shell .client-sidebar.is-menu-open .client-sidebar-mobile-toggle span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .client-shell .client-sidebar.is-menu-open .client-sidebar-mobile-toggle span:nth-child(2) {
        opacity: 0;
    }

    .client-shell .client-sidebar.is-menu-open .client-sidebar-mobile-toggle span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .client-shell .client-sidebar .client-sidebar-drawer {
        display: none;
        padding: 0.95rem calc(env(safe-area-inset-right, 0px) + 1rem) calc(env(safe-area-inset-bottom, 0px) + 1rem) calc(env(safe-area-inset-left, 0px) + 1rem);
        background: linear-gradient(180deg, var(--color-primary), var(--color-primary-strong));
        color: #fff;
        box-shadow: 0 20px 44px rgba(16, 31, 62, 0.18);
    }

    .client-shell .client-sidebar.is-menu-open .client-sidebar-drawer {
        display: block;
    }

    .client-shell .client-sidebar .client-sidebar-drawer .console-sidebar-brand {
        display: none;
    }
}

@media (max-width: 900px) {
    .console-shell:not(.client-shell) .console-page-head,
    .console-shell:not(.client-shell) .topbar,
    .console-shell:not(.client-shell) .console-mailbox-head,
    .console-shell:not(.client-shell) .mailbox-detail-header-row,
    .console-shell:not(.client-shell) .claim-detail-page-head {
        flex-direction: column;
        align-items: stretch;
        gap: 0.9rem;
    }

    .console-shell:not(.client-shell) .console-page-head > *,
    .console-shell:not(.client-shell) .topbar > *,
    .console-shell:not(.client-shell) .console-mailbox-head > *,
    .console-shell:not(.client-shell) .mailbox-detail-header-row > *,
    .console-shell:not(.client-shell) .claim-detail-page-head > * {
        min-width: 0;
    }

    .console-shell:not(.client-shell) .topbar-actions,
    .console-shell:not(.client-shell) .console-mailbox-head-actions,
    .console-shell:not(.client-shell) .mailbox-detail-action-row,
    .console-shell:not(.client-shell) .mailbox-detail-inline-form,
    .console-shell:not(.client-shell) .claim-detail-head-actions,
    .console-shell:not(.client-shell) .members-page-actions,
    .console-shell:not(.client-shell) .application-action-row,
    .console-shell:not(.client-shell) .decision-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .console-shell:not(.client-shell) .table-card,
    .console-shell:not(.client-shell) .historic-import-preview-table-wrap,
    .console-shell:not(.client-shell) .claim-review-table-wrap,
    .console-shell:not(.client-shell) .settings-access-table-wrap,
    .console-shell:not(.client-shell) .mailbox-message-body {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .console-shell:not(.client-shell) .table-card table,
    .console-shell:not(.client-shell) .interactive-table,
    .console-shell:not(.client-shell) .historic-import-preview-table,
    .console-shell:not(.client-shell) .claim-review-table {
        min-width: 760px;
    }

    .console-shell:not(.client-shell) .members-search-panel {
        width: min(24rem, calc(100vw - 2rem));
        right: 0;
    }

    .console-shell:not(.client-shell) .application-hero,
    .console-shell:not(.client-shell) .application-action-rail,
    .console-shell:not(.client-shell) .claim-kpi-grid,
    .console-shell:not(.client-shell) .settings-grid,
    .console-shell:not(.client-shell) .decision-form-grid,
    .console-shell:not(.client-shell) .decision-interview-scheduler-grid,
    .console-shell:not(.client-shell) .interview-left-card-grid {
        grid-template-columns: 1fr;
    }

    .console-shell:not(.client-shell) .application-action-item-compact,
    .console-shell:not(.client-shell) .application-action-progress {
        grid-template-columns: 1fr;
    }

    .console-shell:not(.client-shell) .decision-option-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 100%;
    }

    .console-shell:not(.client-shell) .decision-panel-card.is-interview-mode {
        width: min(100%, 42rem);
        max-width: 42rem;
    }

    .client-shell .console-page-head {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .client-shell .console-page-head > div:first-child {
        min-width: 0;
    }

    .client-shell .console-page-head h1 {
        font-size: clamp(2rem, 5.8vw, 2.7rem);
        line-height: 1.05;
        margin-bottom: 0;
    }

    .client-shell .client-hub-card .console-page-head .button,
    .client-shell .client-hub-card .console-page-head .button-ghost,
    .client-shell .client-hub-card .console-page-head .button-link {
        width: 100%;
        justify-content: center;
    }

    .console-shell {
        grid-template-columns: 1fr;
    }

    .console-sidebar {
        position: static;
        height: auto;
        overflow: visible;
        gap: 0.8rem;
    }

    .auth-sidebar,
    .public-sidebar,
    .client-shell .console-sidebar:not(.client-sidebar),
    .client-shell .console-sidebar.is-menu-open:not(.client-sidebar) {
        padding: 0.95rem 1rem 1rem;
        gap: 0.8rem;
    }

    .client-shell .console-sidebar:not(.client-sidebar) .console-sidebar-brand,
    .auth-sidebar .console-sidebar-brand,
    .public-sidebar .console-sidebar-brand {
        padding: 0;
    }

    .client-shell .console-sidebar:not(.client-sidebar) .console-sidebar-logo,
    .auth-sidebar .console-sidebar-logo,
    .public-sidebar .console-sidebar-logo {
        width: min(100%, 132px);
    }

    .client-shell .console-sidebar:not(.client-sidebar) .console-nav,
    .client-shell .console-sidebar:not(.client-sidebar) .console-nav-footer {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
        overflow: visible;
        padding-bottom: 0;
    }

    .auth-sidebar .console-nav,
    .public-sidebar .console-nav,
    .auth-sidebar .console-nav-footer,
    .public-sidebar .console-nav-footer {
        display: flex;
        flex-wrap: wrap;
        gap: 0.45rem;
    }

    .client-shell .console-sidebar:not(.client-sidebar) .console-nav-footer,
    .auth-sidebar .console-nav-footer,
    .public-sidebar .console-nav-footer {
        margin-top: 0;
        align-items: stretch;
    }

    .client-shell .console-sidebar:not(.client-sidebar) .console-nav-link,
    .client-shell .console-sidebar:not(.client-sidebar) .console-nav-button,
    .auth-sidebar .console-nav-link,
    .auth-sidebar .console-nav-button,
    .public-sidebar .console-nav-link,
    .public-sidebar .console-nav-button {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
        min-height: 2.75rem;
        padding: 0.72rem 0.85rem;
    }

    .client-shell .client-sidebar-panel {
        width: 100%;
        padding: 0.35rem 0 0;
    }

    .client-shell .client-step-nav {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(180px, 1fr);
        overflow-x: auto;
        padding-bottom: 0.2rem;
    }

    .client-shell .client-step-link {
        min-height: 3rem;
    }

    .console-main {
        padding: 1rem;
    }

    .flash-wrap {
        left: 0;
    }

    .client-shell .console-main {
        min-height: auto;
        align-content: start;
        padding: 1rem max(1rem, env(safe-area-inset-right, 0px)) max(1rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
    }

    .client-shell .client-main-stage,
    .client-shell .client-main-stage-hub {
        place-items: stretch;
        justify-items: stretch;
        align-content: start;
        justify-content: stretch;
    }

    .client-shell .client-journey-card,
    .client-shell .client-hub-card,
    .client-shell .card.client-journey-card,
    .client-shell .card.client-hub-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 1.1rem;
    }

    .client-shell .client-hub-card .console-page-head {
        margin-bottom: 1rem;
    }

    .client-shell .client-hub-card .meta-list {
        gap: 0.8rem;
    }

    .client-shell .client-hub-card .meta-item {
        padding: 1rem;
    }

    .client-shell .meta-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .client-shell .meta-item > .topbar-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.7rem;
    }

    .client-shell .application-list-reference-row {
        flex-wrap: wrap;
        row-gap: 0.4rem;
    }

    .client-shell .meta-item-subtext {
        line-height: 1.45;
    }

    .client-shell .client-empty-state {
        min-height: 8rem;
        align-content: start;
        padding-top: 0.2rem;
    }

    .client-shell .expense-contract-picker {
        overflow-x: auto;
    }

    .client-shell .expense-application-table {
        min-width: 40rem;
    }

    .client-shell .card-footer {
        flex-wrap: wrap;
    }

    .client-shell .card-footer .button,
    .client-shell .card-footer .button-ghost,
    .client-shell .card-footer .button-link {
        width: 100%;
        justify-content: center;
    }

    .client-shell .console-nav-profile {
        grid-column: 1 / -1;
    }

    .client-shell .console-nav-form {
        grid-column: 1 / -1;
    }

    .client-shell .console-nav-button {
        justify-content: flex-start;
    }

    .application-hero {
        grid-template-columns: 1fr;
    }

    .page {
        grid-template-columns: 1fr;
    }

    .rail {
        flex-direction: row;
        justify-content: center;
        padding: 1rem 1.25rem 0;
        border-right: 0;
    }

    .content {
        padding: 1rem;
    }

    .split {
        grid-template-columns: 1fr;
    }

    .settings-top-grid,
    .settings-mid-grid,
    .settings-grid,
    .programme-bank-grid {
        grid-template-columns: 1fr;
    }

    .decision-summary-grid {
        grid-template-columns: 1fr;
    }

    .interview-left-card-grid {
        grid-template-columns: 1fr;
    }

    .interview-card-span-two {
        grid-column: auto;
    }

    .decision-panel-card.is-interview-mode {
        width: 100%;
        max-width: none;
    }

    .decision-interview-scheduler {
        width: 100%;
        max-width: none;
    }

    .decision-option-row {
        grid-template-columns: 1fr 1fr;
        max-width: none;
    }

    .expense-line-header {
        display: none;
    }

    .expense-line-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding-right: 0;
    }

    .expense-inline-row {
        flex-direction: column;
        align-items: stretch;
    }

    .expense-inline-field-date,
    .expense-inline-field-amount,
    .expense-inline-field-period,
    .expense-inline-field-name,
    .expense-date-input,
    .expense-period-output,
    .expense-amount-input {
        max-width: 100%;
        width: 100%;
        min-width: 0;
    }

    .expense-line-actions {
        justify-content: flex-start;
    }

    .claim-kpi-grid {
        grid-template-columns: 1fr;
    }

    .client-profile-actions {
        flex-wrap: wrap;
    }

    .client-profile-actions .button,
    .client-profile-actions .button-ghost,
    .client-profile-actions .button-link {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .console-shell:not(.client-shell) .console-sidebar-mobile-bar {
        padding: calc(env(safe-area-inset-top, 0px) + 0.8rem) calc(env(safe-area-inset-right, 0px) + 0.85rem) 0.8rem calc(env(safe-area-inset-left, 0px) + 0.85rem);
    }

    .console-shell:not(.client-shell) .console-sidebar-mobile-brand .console-sidebar-logo {
        width: min(100%, 124px);
    }

    .console-shell:not(.client-shell) .console-sidebar .console-sidebar-drawer {
        padding: 0.8rem calc(env(safe-area-inset-right, 0px) + 0.85rem) calc(env(safe-area-inset-bottom, 0px) + 0.95rem) calc(env(safe-area-inset-left, 0px) + 0.85rem);
    }

    .console-shell:not(.client-shell) .console-sidebar .console-nav,
    .console-shell:not(.client-shell) .console-sidebar .console-nav-footer {
        grid-template-columns: 1fr;
    }

    .console-shell:not(.client-shell) .console-sidebar .console-nav-link,
    .console-shell:not(.client-shell) .console-sidebar .console-nav-button {
        padding: 0.78rem 0.9rem;
    }

    .console-shell:not(.client-shell) .console-main {
        padding: 0.85rem max(0.85rem, env(safe-area-inset-right, 0px)) max(0.85rem, env(safe-area-inset-bottom, 0px)) max(0.85rem, env(safe-area-inset-left, 0px));
    }

    .console-page-head {
        flex-direction: column;
        align-items: stretch;
    }

    .console-shell:not(.client-shell) .filter-row,
    .console-shell:not(.client-shell) .topbar-actions,
    .console-shell:not(.client-shell) .console-mailbox-head-actions,
    .console-shell:not(.client-shell) .mailbox-detail-action-row,
    .console-shell:not(.client-shell) .mailbox-detail-inline-form,
    .console-shell:not(.client-shell) .claim-detail-head-actions,
    .console-shell:not(.client-shell) .members-page-actions,
    .console-shell:not(.client-shell) .members-search-panel-actions,
    .console-shell:not(.client-shell) .application-action-row,
    .console-shell:not(.client-shell) .decision-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .console-shell:not(.client-shell) .filter-pill,
    .console-shell:not(.client-shell) .topbar-actions .button,
    .console-shell:not(.client-shell) .topbar-actions .button-ghost,
    .console-shell:not(.client-shell) .topbar-actions .button-link,
    .console-shell:not(.client-shell) .console-mailbox-head-actions .button,
    .console-shell:not(.client-shell) .console-mailbox-head-actions .button-ghost,
    .console-shell:not(.client-shell) .mailbox-detail-action-row .button,
    .console-shell:not(.client-shell) .mailbox-detail-action-row .button-ghost,
    .console-shell:not(.client-shell) .mailbox-detail-inline-form .button,
    .console-shell:not(.client-shell) .mailbox-detail-inline-form .button-ghost,
    .console-shell:not(.client-shell) .claim-detail-head-actions .button,
    .console-shell:not(.client-shell) .claim-detail-head-actions .button-ghost,
    .console-shell:not(.client-shell) .members-page-actions .button,
    .console-shell:not(.client-shell) .members-page-actions .button-ghost,
    .console-shell:not(.client-shell) .members-search-panel-actions .button,
    .console-shell:not(.client-shell) .members-search-panel-actions .button-ghost,
    .console-shell:not(.client-shell) .application-action-row .button,
    .console-shell:not(.client-shell) .application-action-row .button-ghost,
    .console-shell:not(.client-shell) .decision-actions .button,
    .console-shell:not(.client-shell) .decision-actions .button-ghost {
        width: 100%;
        justify-content: center;
    }

    .console-shell:not(.client-shell) .members-search-panel {
        left: 0;
        right: 0;
        width: auto;
    }

    .console-shell:not(.client-shell) .decision-option-row {
        grid-template-columns: 1fr;
    }

    .console-shell:not(.client-shell) .decision-panel-card.is-interview-mode {
        width: 100%;
        max-width: none;
    }

    .console-shell:not(.client-shell) .table-card th,
    .console-shell:not(.client-shell) .table-card td {
        padding: 0.75rem 0.85rem;
    }

    .console-shell:not(.client-shell) .application-hero-copy h1,
    .console-shell:not(.client-shell) .claim-detail-head-copy h1 {
        font-size: clamp(1.8rem, 8vw, 2.4rem);
    }

    .client-shell .client-sidebar-mobile-bar {
        justify-content: flex-start;
    }

    .client-shell .client-sidebar-mobile-brand {
        order: 2;
        margin-left: 0.75rem;
    }

    .client-shell .client-sidebar-mobile-toggle {
        order: 1;
    }

    .client-shell .client-sidebar-mobile-bar {
        padding: calc(env(safe-area-inset-top, 0px) + 0.8rem) calc(env(safe-area-inset-right, 0px) + 0.85rem) 0.8rem calc(env(safe-area-inset-left, 0px) + 0.85rem);
    }

    .client-shell .client-sidebar-mobile-brand .console-sidebar-logo {
        width: min(100%, 124px);
    }

    .client-shell .client-sidebar .client-sidebar-drawer {
        padding: 0.8rem calc(env(safe-area-inset-right, 0px) + 0.85rem) calc(env(safe-area-inset-bottom, 0px) + 0.95rem) calc(env(safe-area-inset-left, 0px) + 0.85rem);
    }

    .client-shell .console-main {
        padding: 0.85rem max(0.85rem, env(safe-area-inset-right, 0px)) max(0.85rem, env(safe-area-inset-bottom, 0px)) max(0.85rem, env(safe-area-inset-left, 0px));
    }

    .client-shell .client-hub-card,
    .client-shell .card.client-hub-card,
    .client-shell .client-journey-card,
    .client-shell .card.client-journey-card {
        padding: 0.95rem;
    }

    .client-shell .console-sidebar .console-nav,
    .client-shell .console-sidebar .console-nav-footer {
        grid-template-columns: 1fr;
    }

    .client-shell .console-sidebar .console-nav-link,
    .client-shell .console-sidebar .console-nav-button {
        padding: 0.78rem 0.9rem;
    }

    .client-shell .console-page-head h1 {
        font-size: clamp(1.8rem, 8vw, 2.45rem);
    }

    .client-shell .client-hub-card .meta-item {
        padding: 0.9rem;
    }

    .client-shell .client-hub-card .console-page-head .button,
    .client-shell .client-hub-card .console-page-head .button-ghost,
    .client-shell .client-hub-card .console-page-head .button-link {
        width: 100%;
        justify-content: center;
    }

    .client-shell .expense-application-table {
        min-width: 34rem;
    }

    .client-shell .client-sidebar-panel strong,
    .client-shell .console-nav-profile-copy strong {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .application-action-progress {
        grid-template-columns: 1fr;
    }

    [data-modal="edit-user-modal"] .field-grid,
    [data-modal="edit-user-modal"] .checkbox-grid,
    .checkbox-grid-compact {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-actions {
        flex-wrap: wrap;
    }

    .brand-logo {
        width: 7.8rem;
    }

    .settings-field-grid {
        grid-template-columns: 1fr;
    }

    .field-grid,
    .decision-form-grid,
    .address-grid,
    .choice-grid-boolean {
        grid-template-columns: 1fr;
    }

    .field-grid-name-split,
    .profile-readonly-grid {
        grid-template-columns: 1fr;
    }

    .programme-step-head {
        flex-direction: column;
        align-items: stretch;
    }

    .card-header,
    .card-body,
    .card-footer {
        padding: 1.1rem;
    }

    .card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .wizard-actions-left {
        flex-direction: column;
        align-items: stretch;
    }

    .wizard-actions-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
    }

    .wizard-actions-right .button,
    .wizard-actions-right .button-ghost,
    .wizard-actions-right .button-link {
        width: 100%;
        justify-content: center;
    }

    .client-review-section-head {
        align-items: flex-start;
    }

    .client-profile-close-icon {
        position: static;
        align-self: flex-end;
        margin-top: 0.25rem;
    }

    [data-modal] {
        top: 50%;
        width: calc(100vw - 1rem);
    }

    .client-shell .client-main-stage > [data-modal="start-application-modal"] {
        width: calc(100vw - 1rem);
    }

    body.page-embed .client-shell .client-main-stage > [data-modal] {
        width: calc(100vw - 1rem);
    }
}
