:root {
    --fx-primary: #1177d2;
    --fx-primary-dark: #0b5aa6;
    --fx-success: #1d9b63;
    --fx-warning: #e7a51f;
    --fx-danger: #d44759;
    --fx-surface: #ffffff;
    --fx-surface-soft: #f6f9fd;
    --fx-border: #d9e3f0;
    --fx-ink: #12253d;
    --fx-muted: #5f738f;
    --fx-sidebar-top: #0f2c50;
    --fx-sidebar-bottom: #123c68;
    --fx-shadow-sm: 0 8px 18px rgba(14, 41, 74, 0.09);
    --fx-shadow-lg: 0 18px 38px rgba(13, 34, 58, 0.18);

    --bs-primary: var(--fx-primary);
    --bs-secondary: #5d748f;
    --bs-success: var(--fx-success);
    --bs-warning: var(--fx-warning);
    --bs-danger: var(--fx-danger);
    --bs-info: #2a99d8;
    --bs-light: #f5f8fc;
    --bs-dark: #1b324f;
    --bs-border-color: var(--fx-border);
    --bs-body-color: var(--fx-ink);
    --bs-body-bg: #eef3fa;
}

body {
    color: var(--fx-ink);
    background:
        radial-gradient(1200px 500px at 4% -5%, rgba(41, 122, 197, 0.15), transparent 60%),
        radial-gradient(900px 500px at 95% 0, rgba(36, 163, 111, 0.1), transparent 58%),
        var(--bs-body-bg);
}

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

.frontend-sidebar.app-sidebar {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    background: linear-gradient(180deg, var(--fx-sidebar-top) 0%, var(--fx-sidebar-bottom) 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

.frontend-sidebar .sidebar-brand {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.02);
}

.frontend-sidebar .brand-link {
    color: #f1f6ff;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.frontend-sidebar .brand-link .brand-image {
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.frontend-sidebar .nav.sidebar-menu {
    padding: 8px;
}

.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link {
    margin: 2px 0;
    border-radius: 10px;
    color: #dbe8fb;
    font-weight: 520;
    line-height: 1.2;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(1px);
}

.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link.active,
.frontend-sidebar .nav.sidebar-menu .nav-item.menu-open > .nav-link {
    color: #fff;
    background: linear-gradient(90deg, rgba(42, 132, 221, 0.95), rgba(20, 108, 194, 0.95));
    box-shadow: 0 8px 18px rgba(11, 31, 58, 0.28);
}

.frontend-sidebar .nav.sidebar-menu .nav-link p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.92rem;
    font-weight: 520;
}

.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link > i:first-child,
.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link > .nav-icon,
.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link > img:first-child {
    width: 1.2rem;
    min-width: 1.2rem;
    text-align: center;
    margin-right: 0.42rem;
    font-size: 0.96rem;
    opacity: 0.88;
}

.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link.active > i:first-child,
.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link.active > .nav-icon,
.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link.active > img:first-child,
.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link:hover > i:first-child,
.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link:hover > .nav-icon,
.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link:hover > img:first-child {
    opacity: 1;
}

.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link .nav-arrow,
.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link .right {
    font-size: 0.76rem;
    opacity: 0.82;
}

.frontend-sidebar .nav.sidebar-menu .nav-treeview {
    margin-top: 4px;
}

.frontend-sidebar .nav.sidebar-menu .nav-treeview .nav-link {
    margin: 1px 0;
    border-radius: 8px;
    color: #cddcf2;
    padding-left: 2.35rem;
    font-size: 0.93rem;
    font-weight: 470;
}

.frontend-sidebar .nav.sidebar-menu .nav-treeview .nav-link:hover,
.frontend-sidebar .nav.sidebar-menu .nav-treeview .nav-link.active {
    background: rgba(255, 255, 255, 0.11);
    color: #ffffff;
}

.frontend-topbar.app-header {
    border-bottom: 1px solid #d7e2f1;
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(4px);
    box-shadow: 0 8px 24px rgba(10, 31, 55, 0.08);
}

.frontend-topbar .navbar-nav .nav-link {
    border-radius: 8px;
    color: #234364;
}

.frontend-topbar .navbar-nav .nav-link:hover {
    background: #eaf2ff;
    color: #0f63b5;
}

.frontend-main.app-main {
    padding: 1rem 1.1rem 1.8rem;
}

.app-content-shell {
    max-width: 1640px;
    margin: 0 auto;
}

.app-footer {
    border-top: 1px solid var(--fx-border);
    background: rgba(255, 255, 255, 0.8);
    color: #4b6280;
    font-size: 0.92rem;
}

.card,
.info-box,
.small-box {
    border: 1px solid var(--fx-border);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: var(--fx-shadow-sm);
}

.card-header {
    border-bottom: 1px solid #e2eaf5;
    background: linear-gradient(180deg, #f9fbff, #f2f7ff);
}

.card-title {
    color: #18365a;
    font-weight: 700;
}

.card-footer {
    border-top: 1px solid #e2eaf5;
    background: #fafcff;
}

.table {
    --bs-table-striped-bg: #f6f9fe;
    --bs-table-hover-bg: #eaf2ff;
    --bs-table-border-color: #dce6f3;
}

.table thead th {
    border-bottom: 1px solid #d6e3f3;
    color: #274768;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-size: 0.78rem;
}

.table > :not(caption) > * > * {
    padding: 0.72rem 0.75rem;
}

.btn {
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 16px rgba(15, 46, 84, 0.13);
}

.btn-outline-secondary,
.btn-outline-info,
.btn-outline-primary {
    border-color: #c2d4ea;
    color: #234666;
}

.btn-outline-secondary:hover,
.btn-outline-info:hover,
.btn-outline-primary:hover {
    border-color: #a8c2df;
    background: #edf5ff;
    color: #124f8f;
}

.form-control,
.form-select {
    border-color: #cdd9ea;
    border-radius: 10px;
    min-height: calc(2.15rem + 2px);
    background: #fbfdff;
}

.form-control:focus,
.form-select:focus {
    border-color: #83b8ea;
    box-shadow: 0 0 0 0.2rem rgba(24, 120, 205, 0.18);
    background: #fff;
}

.input-group-text {
    border-color: #cdd9ea;
    background: #f4f8ff;
    color: #375573;
}

.dropdown-menu {
    border: 1px solid #d4e0ef;
    border-radius: 12px;
    box-shadow: 0 18px 34px rgba(9, 31, 55, 0.16);
    padding: 0.45rem;
}

.dropdown-item {
    border-radius: 8px;
    font-weight: 500;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: #eaf2ff;
    color: #0e61b1;
}

.badge {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.alert {
    border-radius: 12px;
    border-width: 1px;
}

.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border-color: #cedcee;
    background: #fff;
    color: #1363af;
    font-weight: 500;
}

.pagination .page-link:hover,
.pagination .page-link:focus {
    background: #eef4fb;
    border-color: #9fbfe2;
    color: #0f4f8f;
}

/* the page shown: white on blue, readable */
.pagination .page-item.active .page-link {
    border-color: #1363af;
    background: #1878d3;
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    background: #f6f8fb;
    border-color: #e3e9f1;
    color: #9aa8b8;
}

/* phones: "Showing …" on its own line, the pages centred under it and wrapping */
@media (max-width: 575.98px) {
    .backend-table-foot {
        flex-direction: column;
        align-items: center !important;
        gap: .5rem;
    }

    .backend-table-foot .pagination {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: .35rem;
        margin-bottom: 0;
    }
}

.info-box {
    overflow: hidden;
}

.info-box .info-box-icon {
    border-radius: 12px 0 0 12px;
}

.info-box .info-box-number {
    color: #13355a;
}

.modal-content {
    border: 1px solid #d0d9e8;
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(10, 26, 50, 0.18), 0 8px 18px rgba(10, 26, 50, 0.08);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(180deg, #f6f8fb 0%, #eef2f7 100%);
    border-bottom: 1px solid #d8e0ec;
    padding: 0.9rem 1.15rem;
}

.modal-title {
    color: #17324d;
    font-size: 0.96rem;
    font-weight: 700;
}

.modal-footer {
    background: #f6f8fb;
    border-top: 1px solid #d8e0ec;
}

.text-primary {
    color: #136cc0 !important;
}

a {
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover {
    text-decoration: none;
}

.frontend-main .card,
.frontend-main .info-box,
.frontend-main .small-box {
    animation: fx-rise 0.28s ease both;
}

.frontend-main .card:nth-of-type(2n),
.frontend-main .info-box:nth-of-type(2n) {
    animation-delay: 0.03s;
}

@keyframes fx-rise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 991.98px) {
    .frontend-main.app-main {
        padding: 0.9rem 0.7rem 1.2rem;
    }

    .app-content-shell {
        max-width: none;
    }

    .card,
    .info-box,
    .small-box {
        border-radius: 12px;
    }
}

@media (max-width: 767.98px) {
    .anon-home-header-note {
        display: none;
    }
    .frontend-topbar.app-header {
        padding: 0.2rem 0.35rem;
    }

    .frontend-topbar .container-fluid {
        gap: 0.35rem;
    }

    .table > :not(caption) > * > * {
        padding: 0.58rem 0.5rem;
        font-size: 0.9rem;
    }

    .btn {
        border-radius: 9px;
    }
}

/* Bootstrap button compatibility overrides */
body.bg-body-tertiary {
    background:
        radial-gradient(1200px 500px at 4% -5%, rgba(41, 122, 197, 0.15), transparent 60%),
        radial-gradient(900px 500px at 95% 0, rgba(36, 163, 111, 0.1), transparent 58%),
        var(--bs-body-bg) !important;
}

.btn-primary {
    color: #fff;
    border-color: #1260ad;
    background-color: #1c7ed6;
    background-image: linear-gradient(180deg, #278fe8, #126dc4);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    color: #fff;
    border-color: #135ea8;
    background-color: #1774ca;
    background-image: linear-gradient(180deg, #3498ec, #1774ca);
}

.btn-success {
    color: #fff;
    border-color: #167341;
    background-color: #1f9758;
    background-image: linear-gradient(180deg, #22a85f, #19814a);
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success.active {
    color: #fff;
    border-color: #167341;
    background-color: #1b8c4f;
    background-image: linear-gradient(180deg, #2ab466, #1b8c4f);
}

/* Brand/logo visibility fix */
.frontend-sidebar .app-brand-link {
    display: flex;
    align-items: center;
    gap: 0.62rem;
    min-height: 64px;
    padding: 0.72rem 0.9rem;
    text-decoration: none;
}

.frontend-sidebar .app-brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    padding: 3px;
    border-radius: 10px;
}

.frontend-sidebar .app-brand-name,
.frontend-sidebar .brand-text.app-brand-name,
.frontend-sidebar .brand-link .brand-text {
    color: #f4f8ff !important;
    font-size: 1rem;
    font-weight: 700 !important;
    letter-spacing: 0.015em;
    line-height: 1.15;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.28);
}

.frontend-sidebar .app-brand-link:hover .app-brand-name,
.frontend-sidebar .app-brand-link:focus .app-brand-name {
    color: #ffffff !important;
}

/* fallback for old layout header brand */
.app-header .app-brand-logo {
    margin-right: 0.5rem;
}

.app-header .app-brand-name {
    margin: 0 0.4rem 0 0;
    font-size: 1.06rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #173e67;
}

/* Sidebar enhancements: search, pins, active trail */
.frontend-sidebar .sidebar-enhance-tools {
    padding: 0.5rem 0.55rem 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 0.35rem;
}

.frontend-sidebar .sidebar-search-wrap {
    position: relative;
}

.frontend-sidebar .sidebar-search-input {
    min-height: 34px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.14);
    color: #f4f8ff;
    font-size: 0.88rem;
}

.frontend-sidebar .sidebar-search-input::placeholder {
    color: rgba(229, 237, 249, 0.78);
}

.frontend-sidebar .sidebar-search-input:focus {
    border-color: rgba(171, 211, 255, 0.9);
    box-shadow: 0 0 0 0.18rem rgba(79, 157, 232, 0.25);
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.frontend-sidebar .sidebar-pinned-block {
    margin-top: 0.5rem;
}

.frontend-sidebar .sidebar-pinned-title {
    color: rgba(222, 234, 250, 0.92);
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0.1rem 0.25rem;
}

.frontend-sidebar .sidebar-pinned-list {
    gap: 2px;
}

.frontend-sidebar .sidebar-pinned-link {
    border-radius: 9px;
    color: #dbe8fb;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.frontend-sidebar .sidebar-pinned-link p {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.frontend-sidebar .sidebar-pinned-link:hover,
.frontend-sidebar .sidebar-pinned-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.frontend-sidebar .sidebar-pinned-icon {
    color: #ffd56a;
    margin-right: 0.32rem;
}

.frontend-sidebar .nav.sidebar-menu .nav-item.active-trail > .nav-link {
    box-shadow: inset 3px 0 0 #95cdff;
}

.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link p {
    display: flex;
    align-items: center;
    gap: 0.36rem;
    width: 100%;
}

.frontend-sidebar .nav.sidebar-menu .sidebar-pin-btn {
    margin-left: auto;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.73rem;
    color: rgba(210, 226, 246, 0.88);
    background: rgba(255, 255, 255, 0.06);
    opacity: 0;
    transition: opacity 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.frontend-sidebar .nav.sidebar-menu .nav-link:hover .sidebar-pin-btn,
.frontend-sidebar .nav.sidebar-menu .nav-link:focus .sidebar-pin-btn,
.frontend-sidebar .nav.sidebar-menu .sidebar-pin-btn.is-pinned {
    opacity: 1;
}

.frontend-sidebar .nav.sidebar-menu .sidebar-pin-btn:hover,
.frontend-sidebar .nav.sidebar-menu .sidebar-pin-btn.is-pinned {
    color: #ffe08a;
    background: rgba(255, 255, 255, 0.16);
}

body.sidebar-collapse .frontend-sidebar .sidebar-enhance-tools,
body.sidebar-mini.sidebar-collapse .frontend-sidebar .sidebar-enhance-tools {
    display: none;
}

/* Sidebar polish v2 */
body {
    font-family: "Manrope", "Nunito Sans", "Trebuchet MS", "Segoe UI", sans-serif;
}

.frontend-sidebar.app-sidebar {
    position: relative;
    overflow: hidden;
}

.frontend-sidebar.app-sidebar::before,
.frontend-sidebar.app-sidebar::after {
    content: "";
    position: absolute;
    inset: auto;
    pointer-events: none;
    z-index: 0;
}

.frontend-sidebar.app-sidebar::before {
    width: 210px;
    height: 210px;
    top: -82px;
    right: -70px;
    background: radial-gradient(circle, rgba(130, 186, 255, 0.24) 0%, rgba(130, 186, 255, 0) 72%);
}

.frontend-sidebar.app-sidebar::after {
    width: 170px;
    height: 170px;
    bottom: 8%;
    left: -55px;
    background: radial-gradient(circle, rgba(80, 167, 214, 0.15) 0%, rgba(80, 167, 214, 0) 72%);
}

.frontend-sidebar .sidebar-wrapper,
.frontend-sidebar .sidebar-brand {
    position: relative;
    z-index: 1;
}

.frontend-sidebar .sidebar-brand {
    flex: 0 0 auto;
}

.frontend-sidebar .sidebar-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link {
    position: relative;
    overflow: hidden;
    transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10%;
    width: 3px;
    height: 80%;
    border-radius: 0 5px 5px 0;
    background: linear-gradient(180deg, #95cdff, #5ab2f1);
    opacity: 0;
    transform: scaleY(0.35);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link:hover::before,
.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link.active::before,
.frontend-sidebar .nav.sidebar-menu .nav-item.menu-open > .nav-link::before {
    opacity: 1;
    transform: scaleY(1);
}

.frontend-sidebar .nav.sidebar-menu .nav-item.active-trail > .nav-link {
    box-shadow: inset 3px 0 0 #95cdff, 0 7px 16px rgba(14, 38, 66, 0.21);
}

.frontend-sidebar .sidebar-search-wrap {
    display: grid;
    gap: 0.32rem;
}

.frontend-sidebar .sidebar-search-row {
    display: flex;
    align-items: center;
    min-height: 35px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.14);
    padding: 0.08rem 0.2rem 0.08rem 0.18rem;
}

.frontend-sidebar .sidebar-search-row:focus-within {
    border-color: rgba(171, 211, 255, 0.9);
    box-shadow: 0 0 0 0.18rem rgba(79, 157, 232, 0.25);
    background: rgba(255, 255, 255, 0.2);
}

.frontend-sidebar .sidebar-search-icon {
    width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(233, 242, 252, 0.9);
    font-size: 0.82rem;
}

.frontend-sidebar .sidebar-search-input {
    flex: 1;
    border: 0 !important;
    background: transparent !important;
    color: #f4f8ff;
    min-height: 30px;
    padding: 0 0.2rem;
    box-shadow: none !important;
}

.frontend-sidebar .sidebar-search-input::placeholder {
    color: rgba(229, 237, 249, 0.78);
}

.frontend-sidebar .sidebar-search-input:focus {
    color: #fff;
}

.frontend-sidebar .sidebar-search-clear {
    width: 25px;
    height: 25px;
    border: 0;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(235, 243, 252, 0.95);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.frontend-sidebar .sidebar-search-clear:hover,
.frontend-sidebar .sidebar-search-clear:focus {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.frontend-sidebar .sidebar-search-meta {
    color: rgba(214, 229, 247, 0.92);
    font-size: 0.67rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0 0.12rem;
}

.frontend-sidebar .sidebar-find-application {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.35rem;
    padding: 0.42rem 0.55rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0.78rem;
    line-height: 1.3;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.frontend-sidebar .sidebar-find-application[hidden] {
    display: none;
}

.frontend-sidebar .sidebar-find-application:hover,
.frontend-sidebar .sidebar-find-application:focus-visible {
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
}

.frontend-sidebar .sidebar-search-empty {
    color: rgba(236, 244, 253, 0.95);
    background: rgba(255, 255, 255, 0.08);
    border: 1px dashed rgba(255, 255, 255, 0.26);
    border-radius: 8px;
    font-size: 0.75rem;
    line-height: 1.3;
    padding: 0.42rem 0.45rem;
}

body.sidebar-collapse .frontend-sidebar .sidebar-search-meta,
body.sidebar-mini.sidebar-collapse .frontend-sidebar .sidebar-search-meta,
body.sidebar-collapse .frontend-sidebar .sidebar-search-empty,
body.sidebar-mini.sidebar-collapse .frontend-sidebar .sidebar-search-empty {
    display: none !important;
}

/* Auth pages: login/signup/reset */
.auth-page-shell {
    min-height: 100vh;
    padding: clamp(0.9rem, 2vw, 1.45rem);
    background: #f0f4f8;
}

.auth-page-container {
    max-width: 1480px;
}

.auth-form-panel,
.auth-support-panel {
    border-radius: 12px;
    border: 1px solid #d7e4f3;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    height: 100%;
}

.auth-form-panel {
    padding: clamp(1rem, 2vw, 2.1rem);
}

.auth-support-panel {
    position: relative;
    overflow: hidden;
    padding: clamp(1rem, 2.2vw, 1.6rem);
    background: #1d70b8;
    border-color: #1d70b8;
    color: #ebf4ff;
}

.auth-support-panel::before {
    display: none;
}

.auth-support-panel::after {
    display: none;
}

.auth-support-panel > * {
    position: relative;
    z-index: 1;
}

.auth-support-eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(230, 242, 255, 0.86);
    margin-bottom: 0.6rem;
}

.auth-support-title {
    font-size: clamp(1.22rem, 2vw, 1.6rem);
    font-weight: 700;
    margin-bottom: 0.55rem;
    color: #fff;
}

.auth-support-text {
    font-size: 0.94rem;
    color: rgba(228, 242, 255, 0.92);
    margin-bottom: 1rem;
}

.auth-help-list {
    display: grid;
    gap: 0.62rem;
    margin-bottom: 1.2rem;
}

.auth-help-list li {
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.6rem 0.72rem;
}

.auth-help-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(226, 241, 255, 0.86);
    margin-bottom: 0.2rem;
}

.auth-help-list a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
}

.auth-help-list a:hover {
    color: #d7ecff;
}

.auth-guide-btn {
    width: 100%;
    border-color: rgba(255, 255, 255, 0.42);
    background: #28a745;
    box-shadow: none;
}

.auth-login-view {
    max-width: 640px;
    margin: 0 auto;
}

.auth-login-header {
    margin-bottom: 1.1rem;
}

.auth-login-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid #cbe0f5;
    background: #eff6ff;
    color: #24598b;
    border-radius: 999px;
    padding: 0.24rem 0.72rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.72rem;
}

.auth-login-title {
    font-size: clamp(1.55rem, 2.2vw, 2rem);
    margin: 0;
    color: #113962;
    font-weight: 800;
}

.auth-login-subtitle {
    margin: 0.32rem 0 0;
    color: #5f738f;
    font-size: 0.96rem;
}

.auth-login-alert {
    border-radius: 12px;
    border: 1px solid #b8e8c9;
    background: #eafaf0;
    color: #1f7248;
}

.auth-login-view .form-group,
.auth-login-view .mb-3 {
    margin-bottom: 0;
}

.auth-login-view .control-label,
.auth-login-view label {
    color: #244a70;
    font-weight: 700;
    font-size: 0.84rem;
    margin-bottom: 0.3rem;
}

.auth-input-group {
    border-radius: 12px;
    overflow: hidden;
}

.auth-input-group .input-group-text {
    border: 1px solid #cfe0f3;
    border-right: 0;
    background: #f0f6ff;
    color: #24609a;
    min-width: 44px;
    justify-content: center;
}

.auth-input-group .form-control {
    border: 1px solid #cfe0f3;
    border-left: 0;
    min-height: 48px;
    font-size: 1rem;
    box-shadow: none;
    background: #fff;
}

.auth-input-group .form-control:focus {
    border-color: #82b8ea;
    box-shadow: inset 0 0 0 1px #82b8ea;
}

.auth-login-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.auth-login-link {
    color: #1667b8;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.auth-login-link:hover {
    color: #0e518f;
    text-decoration: underline;
}

.auth-login-btn {
    min-height: 50px;
    border-color: #1f8f57;
    background-image: linear-gradient(180deg, #29a867, #1f8f57);
    box-shadow: 0 14px 24px rgba(16, 72, 43, 0.2);
}

.auth-login-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.auth-login-links a {
    color: #1a67b4;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

.auth-login-links a:hover {
    color: #114f8a;
    text-decoration: underline;
}

@media (max-width: 991.98px) {
    .auth-page-shell {
        padding: 0.8rem;
    }

    .auth-form-panel,
    .auth-support-panel {
        border-radius: 16px;
    }

    .auth-support-panel {
        min-height: auto;
    }
}

@media (max-width: 575.98px) {
    .auth-form-panel {
        padding: 0.95rem;
    }

    .auth-login-meta,
    .auth-login-links {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-login-btn,
    .auth-guide-btn {
        width: 100%;
    }
}

/* Auth modernization: aligned with live LPC login structure */
.auth-page-app.auth-page-shell {
    min-height: 100vh;
    padding: clamp(0.75rem, 1.5vw, 1.35rem);
    background: #f0f4f8;
}

.auth-page-app .auth-page-container {
    max-width: 1520px;
}

.auth-page-app .auth-gov-header {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    border: 1px solid #d7e6f8;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 255, 0.94));
    box-shadow: 0 14px 30px rgba(13, 41, 69, 0.12);
    padding: clamp(0.75rem, 1.5vw, 1rem) clamp(0.9rem, 1.8vw, 1.25rem);
    margin-bottom: 0.92rem;
}

.auth-page-app .auth-gov-emblem {
    width: clamp(58px, 7vw, 78px);
    height: clamp(58px, 7vw, 78px);
    border-radius: 50%;
    border: 1px solid #d2e3f5;
    background: #fff;
    box-shadow: inset 0 0 0 4px #f2f8ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-page-app .auth-gov-emblem img {
    width: 78%;
    height: auto;
}

.auth-page-app .auth-gov-copy h1,
.auth-page-app .auth-gov-copy h2,
.auth-page-app .auth-gov-copy p {
    margin: 0;
    line-height: 1.15;
}

.auth-page-app .auth-gov-copy h1 {
    font-size: clamp(1.02rem, 1.85vw, 1.5rem);
    color: #0f3a67;
    font-weight: 800;
}

.auth-page-app .auth-gov-copy h2 {
    font-size: clamp(0.9rem, 1.45vw, 1.22rem);
    color: #1d5a93;
    font-weight: 650;
    margin-top: 0.12rem;
}

.auth-page-app .auth-gov-copy p {
    font-size: clamp(0.76rem, 1.1vw, 0.92rem);
    letter-spacing: 0.045em;
    text-transform: uppercase;
    color: #4a6a8d;
    margin-top: 0.22rem;
}

.auth-page-app .auth-hero-panel,
.auth-page-app .auth-form-panel,
.auth-page-app .auth-support-panel {
    border: 1px solid #d9e8f7;
    border-radius: 18px;
    box-shadow: 0 18px 38px rgba(14, 39, 64, 0.14);
}

.auth-page-app .auth-hero-panel {
    overflow: hidden;
    min-height: 100%;
    background: linear-gradient(150deg, #0f3e70, #145b97);
}

.auth-page-app .auth-hero-carousel,
.auth-page-app .auth-hero-carousel .carousel-inner,
.auth-page-app .auth-hero-carousel .carousel-item,
.auth-page-app .auth-hero-slide {
    height: 100%;
}

.auth-page-app .auth-hero-slide {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 520px;
    padding: clamp(1rem, 2.2vw, 1.8rem);
    color: #eef6ff;
    background: radial-gradient(820px 360px at 95% 8%, rgba(141, 207, 255, 0.22), transparent 68%);
}

.auth-page-app .auth-hero-slide-a {
    background-color: #0f3f71;
}

.auth-page-app .auth-hero-slide-b {
    background-color: #0f4576;
}

.auth-page-app .auth-hero-slide-c {
    background-color: #124d7f;
}

.auth-page-app .auth-hero-banner {
    width: 100%;
    max-width: 580px;
    height: auto;
    opacity: 0.94;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.auth-page-app .auth-hero-slide h3 {
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    font-weight: 800;
    margin: 0;
}

.auth-page-app .auth-hero-slide p {
    margin: 0.72rem 0 0;
    color: rgba(231, 242, 255, 0.95);
    font-size: clamp(0.95rem, 1.3vw, 1.08rem);
    max-width: 54ch;
}

.auth-page-app .auth-slide-tags {
    margin-top: 0.9rem;
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.auth-page-app .auth-slide-tags span {
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 0.22rem 0.62rem;
    font-size: 0.74rem;
    letter-spacing: 0.03em;
}

.auth-page-app .auth-hero-carousel .carousel-indicators {
    margin-bottom: 0.8rem;
}

.auth-page-app .auth-hero-carousel .carousel-indicators [data-bs-target] {
    width: 28px;
    height: 4px;
    border-radius: 999px;
}

.auth-page-app .auth-hero-carousel .carousel-control-prev,
.auth-page-app .auth-hero-carousel .carousel-control-next {
    width: 46px;
}

.auth-page-app .auth-hero-carousel .carousel-control-prev-icon,
.auth-page-app .auth-hero-carousel .carousel-control-next-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(2px);
}

.auth-page-app .auth-right-stack {
    display: grid;
    gap: 0.95rem;
    height: 100%;
}

.auth-page-app .auth-form-panel {
    
    padding: clamp(0.9rem, 1.8vw, 1.35rem);
}

.auth-page-app .auth-support-panel {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.97), rgba(246, 251, 255, 0.95));
    padding: clamp(0.85rem, 1.7vw, 1.15rem);
    color: #153f68;
}

.auth-page-app .auth-support-eyebrow {
    color: #2b5f90;
    font-size: 0.72rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.auth-page-app .auth-help-list {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 0.7rem;
}

.auth-page-app .auth-help-list li {
    border: 1px solid #d6e7f8;
    border-radius: 11px;
    background: #ffffff;
    padding: 0.5rem 0.58rem;
    display: grid;
    gap: 0.12rem;
}

.auth-page-app .auth-help-label {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    color: #5a7693;
    text-transform: uppercase;
}

.auth-page-app .auth-help-list a {
    color: #145a99;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.86rem;
}

.auth-page-app .auth-help-list a:hover {
    color: #0d4b81;
    text-decoration: underline;
}

.auth-page-app .auth-help-mail {
    margin: 0.2rem 0 0.7rem;
    font-size: 0.88rem;
    color: #1e4f7b;
}

.auth-page-app .auth-help-mail a {
    color: #0f5ca1;
    text-decoration: none;
    font-weight: 700;
}

.auth-page-app .auth-help-mail a:hover {
    text-decoration: underline;
}

.auth-page-app .auth-guide-btn {
    width: 100%;
}

.auth-page-app .auth-login-view {
    max-width: 100%;
}

.auth-page-app .auth-login-header {
    margin-bottom: 0.85rem;
}

.auth-page-app .auth-login-kicker {
    margin-bottom: 0.56rem;
}

.auth-page-app .auth-login-title {
    font-size: clamp(1.28rem, 2vw, 1.64rem);
}

.auth-page-app .auth-login-subtitle {
    font-size: 0.89rem;
}

.auth-page-app .auth-input-group .form-control {
    min-height: 45px;
}

.auth-page-app .auth-login-btn {
    min-height: 47px;
}

@media (max-width: 1399.98px) {
    .auth-page-app .auth-hero-slide {
        min-height: 460px;
    }
}

@media (max-width: 1199.98px) {
    .auth-page-app .auth-right-stack {
        grid-template-columns: 1fr;
    }

    .auth-page-app .auth-hero-slide {
        min-height: 400px;
    }
}

@media (max-width: 767.98px) {
    .auth-page-app .auth-gov-header {
        align-items: flex-start;
    }

    .auth-page-app .auth-gov-copy h1 {
        font-size: 1rem;
    }

    .auth-page-app .auth-gov-copy h2 {
        font-size: 0.88rem;
    }

    .auth-page-app .auth-gov-copy p {
        font-size: 0.7rem;
        letter-spacing: 0.03em;
    }

    .auth-page-app .auth-hero-slide {
        min-height: 340px;
    }

    .auth-page-app .auth-hero-slide p {
        font-size: 0.89rem;
    }

    .auth-page-app .auth-hero-carousel .carousel-control-prev,
    .auth-page-app .auth-hero-carousel .carousel-control-next {
        display: none;
    }
}

/* Anonymous Home Page */
.anon-home-page {
    min-height: 100vh;
    padding: clamp(0.9rem, 1.8vw, 1.6rem);
    background:
        radial-gradient(960px 460px at 0 0, rgba(28, 115, 192, 0.14), transparent 67%),
        radial-gradient(920px 420px at 100% 100%, rgba(27, 157, 94, 0.12), transparent 68%),
        linear-gradient(180deg, #edf4fc 0%, #e7eef9 100%);
}

.anon-home-container {
    max-width: 1560px;
}

.anon-home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    border: 1px solid #d6e5f7;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.93);
    box-shadow: 0 14px 30px rgba(11, 36, 60, 0.11);
    padding: 0.6rem 0.95rem;
    margin-bottom: 0.85rem;
}

.anon-home-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.68rem;
    text-decoration: none;
}

.anon-home-brand-logo-wrap {
    width: 56px;
    height: 56px;
    border: 1px solid #d5e5f7;
    border-radius: 50%;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.anon-home-brand-logo {
    width: 74%;
    height: auto;
}

.anon-home-brand-text {
    display: grid;
    line-height: 1.12;
}

.anon-home-brand-text strong {
    color: #103a67;
    font-size: clamp(0.95rem, 1.8vw, 1.3rem);
}

.anon-home-brand-text small {
    color: #44698f;
    font-size: clamp(0.72rem, 1.2vw, 0.9rem);
}

.anon-home-nav {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.anon-home-nav .btn {
    min-width: 130px;
}

.anon-home-hero {
    margin-bottom: 0.8rem;
}

.anon-hero-card,
.anon-hero-side,
.anon-feature-card,
.anon-home-journey,
.anon-home-help {
    border: 1px solid #d8e7f8;
    border-radius: 16px;
    box-shadow: 0 18px 36px rgba(12, 38, 62, 0.12);
    background: rgba(255, 255, 255, 0.95);
}

.anon-hero-card {
    padding: clamp(1rem, 2.2vw, 1.8rem);
    height: 100%;
    background:
        radial-gradient(680px 240px at 88% -12%, rgba(125, 183, 242, 0.18), transparent 68%),
        rgba(255, 255, 255, 0.95);
}

.anon-hero-kicker {
    display: inline-flex;
    border: 1px solid #cadff6;
    border-radius: 999px;
    background: #f1f7ff;
    color: #1d5a91;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    padding: 0.26rem 0.72rem;
}

.anon-hero-title {
    margin: 0.82rem 0 0;
    color: #123b66;
    font-size: clamp(1.45rem, 2.7vw, 2.4rem);
    line-height: 1.18;
    font-weight: 800;
}

.anon-hero-copy {
    margin: 0.78rem 0 0;
    color: #4e6787;
    font-size: clamp(0.94rem, 1.25vw, 1.08rem);
    max-width: 60ch;
}

.anon-hero-actions {
    display: flex;
    gap: 0.56rem;
    flex-wrap: wrap;
    margin-top: 0.95rem;
}

.anon-hero-stats {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.58rem;
}

.anon-hero-stat {
    border: 1px solid #d4e5f8;
    border-radius: 12px;
    background: #f8fbff;
    padding: 0.54rem 0.62rem;
}

.anon-hero-stat strong {
    display: block;
    color: #1a558b;
    font-size: 0.96rem;
}

.anon-hero-stat span {
    display: block;
    color: #607a98;
    font-size: 0.78rem;
}

.anon-hero-side {
    overflow: hidden;
    height: 100%;
    display: grid;
    grid-template-rows: auto 1fr;
}

.anon-hero-banner {
    width: 100%;
    height: auto;
    background: linear-gradient(140deg, #0e4174, #155e99);
}

.anon-hero-side-body {
    padding: 0.92rem;
}

.anon-hero-side-body h2 {
    margin: 0;
    color: #194b78;
    font-size: 1.12rem;
}

.anon-hero-list {
    margin: 0.62rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.45rem;
}

.anon-hero-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.44rem;
    color: #4d6988;
    font-size: 0.91rem;
}

.anon-hero-list i {
    color: #1a8a56;
    margin-top: 0.1rem;
}

.anon-coat-wrap {
    margin-top: 0.8rem;
    display: flex;
    justify-content: flex-end;
}

.anon-coat-logo {
    width: 44px;
    height: auto;
    opacity: 0.9;
}

.anon-home-features {
    margin-bottom: 0.8rem;
}

.anon-feature-card {
    height: 100%;
    padding: 0.95rem;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.anon-feature-card i {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf5ff;
    color: #1e6fbc;
    font-size: 1rem;
}

.anon-feature-card h3 {
    margin: 0.62rem 0 0;
    font-size: 1rem;
    color: #1b4d79;
}

.anon-feature-card p {
    margin: 0.42rem 0 0;
    color: #617a97;
    font-size: 0.88rem;
}

.anon-home-journey {
    margin-bottom: 0.8rem;
}

.anon-home-journey h2 {
    margin: 0;
    color: #1b4e7c;
    font-size: 1.2rem;
}

.anon-journey-grid {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.62rem;
}

.anon-journey-step {
    border: 1px solid #d9e8f8;
    border-radius: 12px;
    background: #f9fcff;
    padding: 0.75rem;
}

.anon-journey-step span {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1d71bf;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
}

.anon-journey-step h3 {
    margin: 0.55rem 0 0;
    color: #1b4d79;
    font-size: 0.95rem;
}

.anon-journey-step p {
    margin: 0.36rem 0 0;
    color: #627c98;
    font-size: 0.86rem;
}

.anon-home-help {
    padding: 0.95rem;
}

.anon-home-help-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.62rem;
}

.anon-home-help-head h2 {
    margin: 0;
    color: #1b4d7a;
    font-size: 1.1rem;
}

.anon-help-mail {
    color: #1460a7;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
}

.anon-help-mail:hover {
    text-decoration: underline;
}

.anon-help-card {
    border: 1px solid #d8e8f8;
    border-radius: 12px;
    background: #ffffff;
    padding: 0.68rem;
    height: 100%;
}

.anon-help-card h3 {
    margin: 0;
    color: #365f85;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.anon-help-card p {
    margin: 0.42rem 0 0;
    color: #5d7896;
    font-size: 0.87rem;
}

.anon-help-card a {
    color: #145f9f;
    text-decoration: none;
    font-weight: 700;
}

.anon-help-card a:hover {
    text-decoration: underline;
}

@media (max-width: 1199.98px) {
    .anon-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 767.98px) {
    .anon-home-page {
        padding: 0.7rem;
    }

    .anon-home-header {
        flex-direction: column;
        align-items: stretch;
    }

    .anon-home-nav {
        width: 100%;
    }

    .anon-home-nav .btn {
        flex: 1;
    }

    .anon-hero-actions .btn {
        width: 100%;
    }

    .anon-hero-stats {
        grid-template-columns: 1fr;
    }

    .anon-journey-grid {
        grid-template-columns: 1fr;
    }
}

/* GOV.UK-inspired top header merge for anonymous homepage */
.anon-home-page {
    padding: 0 0 clamp(0.9rem, 1.8vw, 1.6rem);
}

.homepage-header.anon-home-header {
    width: 100%;
    margin: 0 0 0.92rem;
    border: 0;
    border-radius: 0;
    background: #1d70b8;
    box-shadow: none;
    padding: 0;
}

.homepage-header .homepage-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    min-height: 74px;
    padding-top: 0.62rem;
    padding-bottom: 0.62rem;
}

.homepage-header .anon-home-brand {
    color: #ffffff;
    gap: 0.58rem;
}

.homepage-header .anon-home-brand-logo-wrap {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
}

.homepage-header .anon-home-brand-logo {
    width: 72%;
}

.homepage-header .homepage-header__wordmark {
    display: inline-flex;
    align-items: center;
    padding-right: 0.55rem;
    margin-right: 0.18rem;
    border-right: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    font-size: 1.24rem;
    font-weight: 800;
    letter-spacing: 0.015em;
    line-height: 1;
}

.homepage-header .anon-home-brand-text strong {
    color: #ffffff;
    font-size: clamp(0.88rem, 1.55vw, 1.08rem);
    font-weight: 700;
}

.homepage-header .anon-home-brand-text small {
    color: rgba(235, 242, 249, 0.95);
    font-size: clamp(0.68rem, 1.05vw, 0.82rem);
}

.homepage-header .anon-home-nav {
    gap: 0.45rem;
}

.homepage-header .anon-home-nav .btn {
    min-width: 122px;
    border-radius: 8px;
    border-width: 1px;
    font-weight: 700;
    box-shadow: none;
}

.homepage-header .anon-home-nav .btn-primary {
    background: #1d70b8;
    border-color: #1d70b8;
}

.homepage-header .anon-home-nav .btn-outline-primary,
.homepage-header .anon-home-nav .btn-outline-success {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.46);
    background: transparent;
}

.homepage-header .anon-home-nav .btn-outline-primary:hover,
.homepage-header .anon-home-nav .btn-outline-success:hover {
    color: #0b0c0c;
    background: #ffffff;
    border-color: #ffffff;
}

.homepage-header .anon-home-nav .btn-primary:hover {
    background: #175f9e;
    border-color: #175f9e;
}

.anon-home-main {
    margin-top: 0.2rem;
}

@media (max-width: 991.98px) {
    .homepage-header .homepage-header__inner {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 0.58rem;
        padding-bottom: 0.58rem;
    }

    .homepage-header .anon-home-nav {
        width: 100%;
        flex-wrap: wrap;
    }

    .homepage-header .anon-home-nav .btn {
        min-width: unset;
        flex: 1 1 150px;
    }
}

@media (max-width: 575.98px) {
    .homepage-header .anon-home-brand {
        align-items: center;
        flex-wrap: nowrap;
    }

    .homepage-header .homepage-header__wordmark {
        font-size: 1.05rem;
        margin-left: 0.06rem;
    }

    .homepage-header .anon-home-nav {
        gap: 0.38rem;
    }

    .homepage-header .anon-home-nav .btn {
        flex: 1 1 100%;
    }
}

/* Homepage header visibility tune */
.homepage-header.anon-home-header {
    border-bottom-width: 10px;
}

.homepage-header .homepage-header__inner {
    min-height: 98px;
    padding-top: 0.92rem;
    padding-bottom: 0.92rem;
}

.homepage-header .anon-home-brand {
    gap: 0.72rem;
}

.homepage-header .anon-home-brand-logo-wrap {
    width: 52px;
    height: 52px;
}

.homepage-header .homepage-header__wordmark {
    font-size: 1.46rem;
    padding-right: 0.7rem;
    margin-right: 0.24rem;
}

.homepage-header .anon-home-brand-text strong {
    font-size: clamp(0.94rem, 1.75vw, 1.18rem);
}

.homepage-header .anon-home-brand-text small {
    font-size: clamp(0.72rem, 1.08vw, 0.86rem);
}

.homepage-header .anon-home-nav .btn {
    min-height: 42px;
}

@media (max-width: 991.98px) {
    .homepage-header .homepage-header__inner {
        min-height: 86px;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
}

/* Homepage banner under GOV.UK style top header */
.homepage-header__banner {
    width: 100%;
    margin: 0 0 1rem;
    padding: clamp(0.85rem, 1.9vw, 1.5rem) 0;
    background:
        radial-gradient(840px 320px at 0 0, rgba(255, 255, 255, 0.16), transparent 72%),
        radial-gradient(760px 340px at 100% 100%, rgba(255, 255, 255, 0.12), transparent 72%),
        linear-gradient(150deg, #1d70b8, #155a94);
    border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.homepage-header__banner .anon-home-hero {
    margin-bottom: 0;
}

.homepage-header__banner .anon-hero-card,
.homepage-header__banner .anon-hero-side {
    border: 0 ;
    background: inherit;
    box-shadow: none;
    backdrop-filter: blur(1.5px);
}

.homepage-header__banner .anon-hero-kicker {
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.14);
    color: #eff7ff;
}

.homepage-header__banner .anon-hero-title {
    color: #ffffff;
}

.homepage-header__banner .anon-hero-copy,
.homepage-header__banner .anon-hero-list li {
    color: rgba(236, 244, 255, 0.95);
}

.homepage-header__banner .anon-hero-side-body h2 {
    color: #ffffff;
}

.homepage-header__banner .anon-hero-list i {
    color: #89ffbe;
}

.homepage-header__banner .anon-hero-actions .btn {
    box-shadow: none;
}

.homepage-header__banner .anon-hero-actions .btn-outline-primary,
.homepage-header__banner .anon-hero-actions .btn-outline-success {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.7);
    background: transparent;
}

.homepage-header__banner .anon-hero-actions .btn-outline-primary:hover,
.homepage-header__banner .anon-hero-actions .btn-outline-success:hover {
    color: #0b0c0c;
    border-color: #ffffff;
    background: #ffffff;
}

.homepage-header__banner .anon-hero-stats .anon-hero-stat {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.14);
}

.homepage-header__banner .anon-hero-stats .anon-hero-stat strong {
    color: #ffffff;
}

.homepage-header__banner .anon-hero-stats .anon-hero-stat span {
    color: rgba(232, 242, 255, 0.95);
}

.homepage-header__banner .anon-hero-banner {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

@media (max-width: 767.98px) {
    .homepage-header__banner {
        padding-top: 0.7rem;
        padding-bottom: 0.7rem;
    }
}

/* Homepage banner spacing + centered content */
.homepage-header.anon-home-header {
    margin: 0;
}

.homepage-header__banner {
    margin-top: 0;
}

.homepage-header__banner .anon-hero-card-centered {
    text-align: center;
}

.homepage-header__banner .anon-hero-card-centered .anon-hero-copy {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.homepage-header__banner .anon-hero-card-centered .anon-hero-actions {
    justify-content: center;
}

.homepage-header__banner .anon-hero-card-centered .anon-hero-stats {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* Login page top header alignment with homepage style */
.auth-page-app.auth-page-shell {
    padding: 0 0 clamp(0.75rem, 1.5vw, 1.35rem);
    padding-bottom:0;
}
.auth-top-header {
    width: 100%;
    background: #0b0c0c;
    border-bottom: 8px solid #1d70b8;
}

.auth-top-header-inner {
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.auth-top-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.62rem;
    text-decoration: none;
    color: #ffffff;
}

.auth-top-brand-logo-wrap {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-top-brand-logo {
    width: 72%;
    height: auto;
}

.auth-top-wordmark {
    display: inline-flex;
    align-items: center;
    padding-right: 0.62rem;
    margin-right: 0.15rem;
    border-right: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.36rem;
    line-height: 1;
}

.auth-top-brand-text {
    display: grid;
    line-height: 1.12;
}

.auth-top-brand-text strong {
    color: #ffffff;
    font-size: clamp(0.9rem, 1.5vw, 1.08rem);
    font-weight: 700;
}

.auth-top-brand-text small {
    color: rgba(235, 242, 249, 0.95);
    font-size: clamp(0.68rem, 1.03vw, 0.82rem);
}

.auth-top-nav {
    display: flex;
    align-items: center;
    gap: 0.48rem;
}

.auth-top-nav .btn {
    min-height: 42px;
    min-width: 122px;
    border-radius: 8px;
    border-width: 1px;
    font-weight: 700;
    box-shadow: none;
}

.auth-top-nav .btn-primary {
    background: #1d70b8;
    border-color: #1d70b8;
}

.auth-top-nav .btn-primary:hover {
    background: #175f9e;
    border-color: #175f9e;
}

.auth-top-nav .btn-outline-primary,
.auth-top-nav .btn-outline-success {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
    background: transparent;
}

.auth-top-nav .btn-outline-primary:hover,
.auth-top-nav .btn-outline-success:hover {
    color: #0b0c0c;
    border-color: #ffffff;
    background: #ffffff;
}

.auth-login-stage {
    padding-top: 0.92rem;
}

@media (max-width: 991.98px) {
    .auth-top-header-inner {
        min-height: 86px;
        flex-direction: column;
        align-items: flex-start;
        padding-top: 0.7rem;
        padding-bottom: 0.7rem;
    }

    .auth-top-nav {
        width: 100%;
        flex-wrap: wrap;
    }

    .auth-top-nav .btn {
        flex: 1 1 150px;
        min-width: unset;
    }

    .auth-login-stage {
        padding-top: 0.75rem;
    }
}

@media (max-width: 575.98px) {
    .auth-top-brand {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .auth-top-wordmark {
        font-size: 1.06rem;
    }

    .auth-top-nav .btn {
        flex: 1 1 100%;
    }
}

/* Focused auth layout: login + customer support, no hero images */
.auth-page-focus .auth-focus-grid {
    align-items: stretch;
}

.auth-page-focus .auth-form-panel-focus,
.auth-page-focus .auth-support-panel-focus {
    border-radius: 18px;
    border: none;
    box-shadow: none;
    height: 100%;
}

.auth-page-focus .auth-form-panel-focus {
    padding: 0;
}

.auth-page-focus .auth-support-panel-focus {
    color: #17446f;
    padding: 0;
}

.auth-page-focus .auth-support-panel-focus::before,
.auth-page-focus .auth-support-panel-focus::after {
    display: none;
}

.auth-page-focus .auth-support-panel-focus .auth-support-title {
    font-size: clamp(1.08rem, 1.8vw, 1.32rem);
    color: #12406c;
    margin: 0;
}

.auth-page-focus .auth-support-panel-focus .auth-support-text {
    margin: 0.38rem 0 0.8rem;
    color: #5b7592;
    font-size: 0.9rem;
}

.auth-page-focus .auth-support-panel-focus .auth-help-list {
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.auth-page-focus .auth-support-panel-focus .auth-help-list li {
    border: 1px solid #d9e7f8;
    border-radius: 11px;
    background: #ffffff;
    padding: 0.55rem 0.62rem;
    display: grid;
    gap: 0.12rem;
}

.auth-page-focus .auth-support-panel-focus .auth-help-label {
    color: #5a7693;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.auth-page-focus .auth-support-panel-focus a {
    color: #145a99;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.86rem;
}

.auth-page-focus .auth-support-panel-focus a:hover {
    color: #0f4c83;
    text-decoration: underline;
}

.auth-page-focus .auth-support-panel-focus .auth-help-mail {
    margin: 0.2rem 0 0.7rem;
    color: #274f75;
    font-size: 0.86rem;
}

.auth-page-focus .auth-top-brand-text-wide strong {
    font-size: clamp(1.05rem, 1.9vw, 1.38rem);
    letter-spacing: 0.02em;
}

.auth-page-focus .auth-top-brand-text-wide small {
    font-size: clamp(0.7rem, 1.05vw, 0.84rem);
}

@media (max-width: 991.98px) {
    .auth-page-focus .auth-form-panel-focus,
    .auth-page-focus .auth-support-panel-focus {
        border-radius: 16px;
    }
}

/* Center login/signup pages in focused auth layout */
.auth-page-focus .auth-login-stage {
    min-height: calc(100vh - 170px);
    display: flex;
    align-items: center;
}

.auth-page-focus .auth-focus-grid {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    justify-content: center;
}

.auth-page-focus .auth-focus-grid > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
    margin-left: auto;
    margin-right: auto;
}

.auth-page-focus .auth-form-panel-focus,
.auth-page-focus .auth-support-panel-focus {
    display: flex;
    align-items: center;
}

.auth-page-focus .auth-form-panel-focus {
    justify-content: center;
}

.auth-page-focus .auth-login-view,
.auth-page-focus .auth-signup-view {
    width: 100%;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.auth-page-focus .auth-login-header {
    text-align: center;
}

.auth-page-focus .auth-login-links {
    justify-content: center;
    gap: 1rem;
}

.auth-page-focus .auth-login-form {
    text-align: left;
}

.auth-page-focus .auth-support-panel-focus {
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 991.98px) {
    .auth-page-focus .auth-login-stage {
        min-height: auto;
        display: block;
    }

    .auth-page-focus .auth-form-panel-focus,
    .auth-page-focus .auth-support-panel-focus {
        display: block;
    }
}

/* Merged centered auth box: support becomes part of login box */
.auth-page-focus .auth-form-panel-merged {
    display: block;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.auth-page-focus .auth-focus-content {
    margin-left: auto;
    margin-right: auto;
}

.auth-page-focus .auth-support-panel-inline {
    display: block;
    max-width: 560px;
    margin: 1rem auto 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 1rem 0 0;
    border-top: 1px solid #d8e6f6;
}

.auth-page-focus .auth-support-panel-inline .auth-support-title,
.auth-page-focus .auth-support-panel-inline .auth-support-text {
    text-align: center;
}

.auth-page-focus .auth-support-panel-inline .auth-help-list {
    margin-top: 0.65rem;
}

.auth-page-focus .auth-support-panel-inline .auth-help-mail {
    text-align: center;
}

@media (max-width: 991.98px) {
    .auth-page-focus .auth-form-panel-merged {
        max-width: 100%;
    }

    .auth-page-focus .auth-focus-content,
    .auth-page-focus .auth-support-panel-inline {
        max-width: 100%;
    }
}

.auth-login-view-refined {
    max-width: 620px;
}

.auth-login-view-refined .auth-login-header {
    margin-bottom: 1.25rem;
}

.auth-login-view-refined .auth-login-kicker {
    background: #eef5ff;
    border-color: #cddcf0;
    color: #204f7e;
}

.auth-login-view-refined .auth-login-title {
    color: #12395d;
}

.auth-login-view-refined .auth-login-subtitle {
    max-width: 34rem;
    color: #60738c;
}

.auth-login-panel {
    border-color: #d9e4f1 !important;
    background: #ffffff;
}

.auth-login-view-refined .auth-input-group {
    border: 1px solid #cfe0f3;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.auth-login-view-refined .auth-input-group:focus-within {
    border-color: #82b8ea;
    box-shadow: 0 0 0 3px rgba(130, 184, 234, 0.18);
}

.auth-login-view-refined .auth-input-group .input-group-text,
.auth-login-view-refined .auth-input-group .form-control {
    border: 0;
    box-shadow: none;
}

.auth-login-view-refined .auth-input-group .input-group-text {
    background: #f4f8fd;
    color: #24609a;
    min-width: 48px;
}

.auth-login-view-refined .auth-input-group .form-control {
    min-height: 50px;
    background: transparent;
    padding-right: 1rem;
}

.auth-login-view-refined .auth-input-group .form-control:focus {
    border: 0;
    box-shadow: none;
}

.auth-login-view-refined .auth-login-link {
    font-weight: 700;
}

.auth-login-view-refined .auth-login-btn {
    min-height: 52px;
    border: 0;
    border-radius: 14px;
}

.auth-login-view-refined .auth-login-links {
    gap: 1rem;
}

.auth-login-view-refined .auth-login-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Plain layout wrapper now, not a card: the visible card is the
   .auth-login-panel inside it. It used to draw a second white,
   bordered surface with a blue accent bar around that inner card —
   a border around a border. */
.auth-page-focus .auth-form-panel-elevated {
    position: relative;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.auth-page-focus .auth-focus-content-elevated {
    position: relative;
    padding: 1.5rem 2.35rem 2rem;
}

.auth-page-focus .auth-focus-content-elevated::after {
    display: none;
}

@media (max-width: 991.98px) {
    .auth-page-focus .auth-focus-content-elevated {
        padding: 1.1rem 1.1rem 1.25rem;
    }
}

.anon-home-header-refined {
    position: relative;
    background: #1d70b8;
    border-bottom: none;
}

.anon-home-header-refined .homepage-header__inner {
    gap: 1.2rem;
}

.anon-home-header-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.anon-home-header-note {
    display: grid;
    gap: 0.12rem;
    text-align: right;
    color: #eef5ff;
}

.anon-home-header-note-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(236, 245, 255, 0.82);
}

.anon-home-header-note-text {
    font-size: 0.88rem;
    font-weight: 500;
}

.anon-auth-footer {
    margin-top: 1.25rem;
    padding: 0 0 1.1rem;
}

.anon-auth-footer__inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 1.25rem;
    border-top: 1px solid #d7e3ef;
    padding-top: 1rem;
    color: #4f667f;
}

.anon-auth-footer__title {
    color: #143b60;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.anon-auth-footer__text {
    max-width: 34rem;
    font-size: 0.92rem;
}

.anon-auth-footer__label {
    color: #627991;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.45rem;
}

.anon-auth-footer__links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.anon-auth-footer__links-stack {
    display: grid;
    gap: 0.25rem;
}

.anon-auth-footer__links a,
.anon-auth-footer__links span {
    color: #1b5b93;
    font-size: 0.92rem;
    text-decoration: none;
}

.anon-auth-footer__links a:hover {
    text-decoration: underline;
}

@media (max-width: 991.98px) {
    .anon-home-header-tools {
        width: 100%;
        justify-content: flex-start;
    }

    .anon-home-header-note {
        text-align: left;
    }

    .anon-auth-footer__inner {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 991.98px) {
    .frontend-topbar {
        min-height: auto;
    }

    .frontend-topbar .container-fluid {
        flex-wrap: wrap;
        align-items: flex-start;
        row-gap: .65rem;
        padding-top: .55rem;
        padding-bottom: .55rem;
    }

    .frontend-topbar-left,
    .frontend-topbar-right {
        width: 100%;
    }

    .frontend-topbar-right {
        justify-content: space-between;
        flex-wrap: wrap;
        gap: .55rem;
    }

    .frontend-topbar-brand {
        flex: 1 1 auto;
        min-width: 0;
    }

    .frontend-topbar-user {
        max-width: 100%;
    }

    .frontend-topbar-user-name {
        max-width: 9.5rem;
    }

    .auth-login-view-refined .auth-login-links {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-login-view-refined .auth-login-links a {
        justify-content: center;
    }

    .anon-home-hero-card-centered .anon-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .anon-home-hero-card-centered .anon-hero-actions .btn {
        width: 100%;
    }

    .anon-home-hero-card-centered .anon-hero-stats {
        gap: .75rem;
    }

    .anon-home-hero-card-centered .anon-hero-stat {
        min-width: 140px;
        flex: 1 1 calc(50% - .75rem);
    }
}

@media (max-width: 767.98px) {
    .frontend-topbar-brand-subtitle {
        display: none;
    }

    .frontend-topbar-user {
        width: 100%;
        justify-content: space-between;
    }

    .anon-home-header-refined .homepage-header__inner {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        gap: .75rem;
    }

    .homepage-header .anon-home-brand {
        width: auto;
        flex: 1 1 auto;
        min-width: 0;
        justify-content: flex-start;
        align-items: center;
        flex-wrap: nowrap;
        text-align: left;
    }

    .homepage-header .anon-home-brand-text {
        text-align: left;
    }

    .anon-home-header-tools {
        width: auto;
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: .5rem;
    }

    .anon-home-nav {
        width: auto;
    }

    .anon-home-nav .btn {
        flex: 0 0 auto;
    }

    .anon-home-header-note {
        display: none;
    }

    .anon-home-hero-card-centered .anon-hero-title {
        font-size: clamp(1.7rem, 7vw, 2.2rem);
    }

    .anon-home-hero-card-centered .anon-hero-copy {
        font-size: .96rem;
    }

    .anon-home-hero-card-centered .anon-hero-stat {
        flex: 1 1 100%;
    }

    .anon-quick-actions .btn {
        flex: 1 1 100%;
    }
}

@media (max-width: 575.98px) {
    .auth-page-focus .auth-focus-content-elevated {
        padding: 1rem 0.75rem 0.9rem;
    }

    .auth-login-panel {
        border-radius: 18px !important;
    }

    .auth-login-view-refined .auth-login-title {
        font-size: clamp(1.4rem, 8vw, 1.8rem);
    }

    .anon-auth-footer {
        padding-bottom: .85rem;
    }

    .anon-auth-footer__links {
        flex-direction: column;
        align-items: flex-start;
        gap: .45rem;
    }
}

.anon-home-nav-mobile {
    display: none;
}

.anon-home-menu-button {
    min-height: 42px;
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
    font-weight: 700;
}

.anon-home-menu-button:hover,
.anon-home-menu-button:focus,
.anon-home-menu-button:active,
.show > .anon-home-menu-button.dropdown-toggle {
    color: #0b0c0c !important;
    background: #ffffff !important;
    border-color: #ffffff !important;
}

.anon-home-menu-dropdown {
    min-width: 220px;
    border: 1px solid #dbe5ef;
    border-radius: 14px;
    padding: .4rem;
    box-shadow: 0 16px 36px rgba(15, 42, 66, 0.16);
}

.anon-home-menu-dropdown .dropdown-item {
    border-radius: 10px;
    padding: .65rem .8rem;
    font-weight: 600;
    color: #194d7a;
}

.anon-home-menu-dropdown .dropdown-item:hover,
.anon-home-menu-dropdown .dropdown-item:focus {
    background: #eef5ff;
    color: #143d61;
}

@media (max-width: 767.98px) {
    .anon-home-nav-desktop {
        display: none;
    }

    .anon-home-nav-mobile {
        display: block;
        width: 100%;
    }

    .anon-home-nav-mobile .dropdown,
    .anon-home-nav-mobile .dropdown-toggle,
    .anon-home-menu-button {
        width: 100%;
    }
}

.anon-home-menu-button {
    width: 2.7rem;
    height: 2.7rem;
    min-height: 2.7rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .85rem;
}

.anon-home-menu-button::after {
    display: none;
}

.anon-home-menu-button i {
    font-size: 1.15rem;
}

.anon-home-menu-button-label {
    display: none;
}

@media (max-width: 767.98px) {
    .anon-home-nav-mobile {
        display: inline-flex;
        width: auto;
        margin-left: auto;
    }

    .anon-home-nav-mobile .dropdown,
    .anon-home-menu-button {
        width: auto;
    }

    .anon-home-menu-dropdown {
        min-width: 200px;
    }
}

.anon-home-menu-button {
    width: 2.7rem;
    height: 2.7rem;
    min-height: 2.7rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .85rem;
}

.anon-home-menu-button::after {
    display: none;
}

.anon-home-menu-button i {
    font-size: 1.15rem;
}

.anon-home-menu-button-label {
    display: none;
}

@media (max-width: 767.98px) {
    .anon-home-nav-mobile {
        display: inline-flex;
        width: auto;
        margin-left: auto;
    }

    .anon-home-nav-mobile .dropdown,
    .anon-home-menu-button {
        width: auto;
    }

    .anon-home-menu-dropdown {
        min-width: 200px;
    }
}

@media (max-width: 767.98px) {
    .anon-home-header-refined .homepage-header__inner {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .anon-home-header-refined .anon-home-brand {
        flex: 1 1 auto;
        min-width: 0;
    }

    .anon-home-header-refined .anon-home-header-tools {
        flex: 0 0 auto;
        width: auto !important;
        margin-left: auto;
        flex-wrap: nowrap;
    }

    .anon-home-header-refined .anon-home-nav-mobile,
    .anon-home-header-refined .anon-home-nav-mobile .dropdown,
    .anon-home-header-refined .anon-home-menu-button {
        width: auto !important;
    }
}

@media (max-width: 767.98px) {
    .frontend-main.app-main {
        padding: 0.7rem 0.45rem 1rem;
    }

    .auth-page-shell,
    .auth-page-app.auth-page-shell {
        padding-left: 0;
        padding-right: 0;
    }

    .auth-page-container.container-fluid {
        padding-left: 0.45rem;
        padding-right: 0.45rem;
    }

    .auth-form-panel,
    .auth-support-panel,
    .auth-page-app .auth-form-panel,
    .auth-page-app .auth-support-panel {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .auth-page-focus .auth-focus-content-elevated,
    .auth-page-focus .auth-support-panel-inline,
    .auth-page-focus .auth-support-panel-focus {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .homepage-header__inner.anon-home-container,
    .anon-auth-footer .anon-home-container,
    .anon-home-container.container-fluid {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }
}

@media (max-width: 575.98px) {
    .frontend-main.app-main {
        padding: 0.6rem 0.35rem 0.9rem;
    }

    .auth-page-shell,
    .auth-page-app.auth-page-shell {
        padding-left: 0;
        padding-right: 0;
    }

    .auth-page-container.container-fluid {
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    .auth-form-panel,
    .auth-support-panel,
    .auth-page-app .auth-form-panel,
    .auth-page-app .auth-support-panel,
    .auth-page-focus .auth-focus-content-elevated,
    .auth-page-focus .auth-support-panel-inline,
    .auth-page-focus .auth-support-panel-focus {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .homepage-header__inner.anon-home-container,
    .anon-auth-footer .anon-home-container,
    .anon-home-container.container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

@media (max-width: 767.98px) {
    .frontend-sidebar.app-sidebar {
        position: fixed !important;
        top: 0;
        bottom: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        height: 100vh;
        max-height: 100vh;
        overflow: hidden;
    }

    .frontend-sidebar .sidebar-brand {
        position: sticky;
        top: 0;
        z-index: 2;
        flex: 0 0 auto;
    }

    .frontend-sidebar .sidebar-wrapper {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding-bottom: 1rem;
    }
}

/* Shared shell spacing */
:root {
    --fx-space-1: 0.5rem;
    --fx-space-2: 0.75rem;
    --fx-space-3: 1rem;
    --fx-space-4: 1.25rem;
    --fx-space-5: 1.5rem;
    --fx-radius-md: 14px;
    --fx-radius-lg: 18px;
}

body {
    font-family: "IBM Plex Sans", "Segoe UI", "Noto Sans", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.frontend-main.app-main {
    padding: 0.9rem 1rem 1.4rem;
}

.frontend-content-shell {
    display: flex;
    flex-direction: column;
    gap: var(--fx-space-3);
}

.card,
.info-box,
.small-box {
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(14, 41, 74, 0.07);
}

.card-header {
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

.card-body {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.table > :not(caption) > * > * {
    padding: 0.68rem 0.75rem;
}

.form-label,
label {
    color: #35506d;
    font-weight: 600;
}

.form-text {
    color: #73879d;
}

.btn {
    min-height: 2.55rem;
    padding: 0.52rem 0.95rem;
}

.btn-sm {
    min-height: 2.1rem;
    padding: 0.38rem 0.78rem;
}

.frontend-topbar.app-header {
    border-bottom-color: #d8e4f0;
    box-shadow: 0 10px 26px rgba(10, 31, 55, 0.07);
}

.frontend-sidebar.app-sidebar {
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08), 14px 0 36px rgba(5, 22, 41, 0.08);
}

.frontend-sidebar-summary {
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.frontend-sidebar .sidebar-wrapper {
    padding-bottom: 0.85rem;
}

.frontend-sidebar .nav.sidebar-menu {
    padding: 0.5rem 0.6rem 0.85rem;
}

.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link {
    margin: 3px 0;
    min-height: 2.8rem;
    padding: 0.72rem 0.85rem;
    border-radius: 12px;
    font-weight: 600;
}

.frontend-sidebar .nav.sidebar-menu .nav-treeview .nav-link {
    min-height: 2.55rem;
    border-radius: 10px;
    padding-top: 0.58rem;
    padding-bottom: 0.58rem;
}

.frontend-topbar-brand-logo {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.95rem;
    background: linear-gradient(180deg, #f7fbff, #edf4fb);
    box-shadow: inset 0 0 0 1px #d8e5f0;
}

.frontend-topbar-user {
    gap: 0.65rem;
    padding-right: 0.6rem;
}

.frontend-topbar-user-avatar {
    box-shadow: inset 0 0 0 1px #d5e3f1;
}

.guest-shell-refined {
    min-height: 100vh;
}

.anon-home-header-app {
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.anon-home-header-note-app {
    max-width: 18rem;
}

.anon-auth-footer-app {
    border-top: 1px solid #dbe5ef;
    background: #ffffff;
}

.auth-login-stage-refined {
    padding-top: 1.2rem;
    padding-bottom: 1.2rem;
}

.auth-focus-grid-refined {
    margin-left: 0;
    margin-right: 0;
}

.auth-form-panel-shell {
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.auth-focus-content-shell {
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
}

@media (max-width: 991.98px) {
    .frontend-topbar-user {
        padding-left: 0.65rem;
    }
}

@media (max-width: 767.98px) {
    .frontend-main.app-main {
        padding: 0.72rem 0.6rem 1rem;
    }

    .frontend-content-shell {
        gap: 0.75rem;
    }

    .frontend-topbar-brand-logo {
        width: 2.45rem;
        height: 2.45rem;
    }

    .frontend-sidebar .nav.sidebar-menu {
        padding-left: 0.45rem;
        padding-right: 0.45rem;
    }

    .anon-home-header-note-app {
        display: none;
    }

    .auth-login-stage-refined {
        padding-top: 0.85rem;
        padding-bottom: 0.85rem;
    }
}

/* Flatten nested surfaces */
.card,
.info-box,
.small-box {
    box-shadow: 0 6px 16px rgba(14, 41, 74, 0.05);
}

.app-content-shell > .card,
.app-content-shell > .row > [class*="col-"] > .card,
.site-index > .card,
.document-index > .card,
.document-view > .card,
.business-view > .card,
.process-instance-view > .card,
.payment-invoice-view > .card,
.payment-notice-view > .card,
.approval-view > .card,
.activities-view > .card {
    box-shadow: 0 10px 22px rgba(14, 41, 74, 0.06);
}

.card .card,
.card .info-box,
.card .small-box,
.card .border.rounded-3,
.card .border.rounded-4,
.card .rounded-4.border,
.card .rounded-3.border {
    box-shadow: none !important;
    background: #ffffff;
}

.card .card {
    border-color: #e4ecf5;
}

.bg-light.border-bottom,
.card-header {
    background: linear-gradient(180deg, #fbfdff, #f5f8fc) !important;
}

.card-body {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

.frontend-content-shell > * + * {
    margin-top: 0;
}

.auth-form-panel-shell {
    box-shadow: 0 12px 28px rgba(12, 35, 61, 0.08);
}

.frontend-sidebar.app-sidebar {
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08), 10px 0 24px rgba(5, 22, 41, 0.05);
}

/* Dashboard workspace */
.dashboard-workspace {
    display: block;
}

.dashboard-hero {
    border: 1px solid rgba(17, 119, 210, 0.14);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 255, 0.94));
    box-shadow: 0 12px 24px rgba(14, 41, 74, 0.06);
    overflow: hidden;
}

.dashboard-hero-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.35rem 1.45rem 1rem;
}

.dashboard-hero-title {
    margin: 0.2rem 0 0.45rem;
    font-size: clamp(1.45rem, 2vw, 2rem);
    line-height: 1.15;
    color: #16314d;
}

.dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

/* Transparent layout wrapper: the metric tiles and section cards inside are
   the single bordered level, so the dashboard no longer nests a border around
   another border (box-in-a-box). */
.dashboard-surface {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.dashboard-surface-body {
    padding: 0;
}

.dashboard-metric {
    padding: 1rem 1rem 0.95rem;
    border: 1px solid #dde7f2;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.dashboard-metric:hover {
    transform: translateY(-1px);
    border-color: #c9d9eb;
}

.dashboard-metric-label {
    font-size: 0.74rem;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: #6d8199;
    margin-bottom: 0.35rem;
}

.dashboard-metric-value {
    font-size: 1.8rem;
    line-height: 1;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.dashboard-metric-note {
    color: #6a7d94;
    font-size: 0.87rem;
    line-height: 1.45;
}

.dashboard-section {
    border: 1px solid #dde7f2;
    border-radius: 16px;
    background: #ffffff;
    overflow: hidden;
}

.dashboard-section-head {
    padding: 1rem 1.15rem;
    border-bottom: 1px solid #e6edf6;
}

.dashboard-section-body {
    padding: 1.1rem 1.15rem;
}

.dashboard-metric-warn {
    display: block;
    color: #8a5a00;
    font-weight: 600;
}

.dashboard-metric-warn:hover {
    color: #6b4500;
    text-decoration: underline !important;
}

/* "Require Attention": the attention rows, grouped under a small label per section */
.dashboard-todo-label {
    padding: 0.6rem 1.15rem 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #4f6478;
    background: #f8fbff;
    border-top: 1px solid #eef3f8;
}

.dashboard-todo-group:first-of-type .dashboard-todo-label {
    border-top: 0;
}

/* the label names the section: a column header on every short table is noise */
.dashboard-todo .action-item-table thead {
    display: none;
}

@media (min-width: 768px) {
    /* stacked groups line their columns up */
    .dashboard-todo .action-item-table {
        table-layout: fixed;
    }

    .dashboard-todo .action-item-table td:first-child {
        width: 12rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .dashboard-todo .action-item-table td:nth-last-child(2) {
        width: 11rem;
    }

    .dashboard-todo .action-item-table td.action-item-open {
        width: 7rem;
    }
}

.dashboard-todo-empty {
    padding: 1.5rem 1.15rem;
    color: #4f6478;
}

.dashboard-todo-empty .bi {
    color: #2e8b57;
    margin-right: 0.35rem;
}

.dashboard-todo-pointers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    padding: 0.75rem 1.15rem;
    border-top: 1px solid #e6edf6;
    font-size: 0.88rem;
}

.dashboard-status {
    white-space: normal;
    text-align: left;
}

.dashboard-table thead th {
    background: #f7fafe;
}

.dashboard-table-link {
    color: #184f88;
}

.dashboard-table-link:hover {
    color: #0f63b5;
}

@media (max-width: 991.98px) {
    .dashboard-hero-main {
        flex-direction: column;
        align-items: stretch;
    }

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

@media (max-width: 575.98px) {
    .dashboard-hero-main,
    .dashboard-surface-body,
    .dashboard-section-head,
    .dashboard-section-body {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .dashboard-hero-main {
        padding-top: 1.1rem;
        padding-bottom: 0.9rem;
    }

    .dashboard-hero-actions {
        display: grid;
        gap: 0.65rem;
    }

    .dashboard-hero-actions .btn,
    .dashboard-start .btn {
        width: 100%;
    }
}

/* Workspace shell */
.workspace-header {
    border: 1px solid #dbe6f2;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 254, 0.96));
    overflow: hidden;
}

.workspace-header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.2rem 1.35rem;
}

.workspace-kicker {
    font-size: 0.73rem;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
    color: #5a6a7d;
}

.workspace-title {
    color: #17324d;
}

.workspace-subtitle {
    color: #60748e;
}

.workspace-surface {
    border: 1px solid #dbe6f2;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    overflow: hidden;
}

.workspace-table-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border-top: 1px solid #e4ecf5;
    background: #fbfdff;
}

.document-table-number {
    color: #173f69;
}

.document-header-main {
    align-items: center;
}

.document-status-block {
    text-align: right;
}

.document-view-shell {
    padding: 0;
}

.document-nav-row {
    padding: 1rem 1.2rem 0;
    border-bottom: 1px solid #e4ecf5;
    background: #fbfdff;
}

.document-tabs-row {
    padding: 1.15rem 1.2rem 1.25rem;
}

.document-overview-pane {
    display: block;
}

.document-overview-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.document-overview-actions-main {
    display: grid;
    gap: 0.75rem;
    flex: 1 1 auto;
}

.document-inline-alert {
    border-radius: 14px;
}

.document-inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.document-summary-panel,
.document-preview-panel {
    border: 1px solid #dde7f2;
    border-radius: 16px;
    background: #ffffff;
    overflow: hidden;
}

.document-panel-head {
    padding: 0.95rem 1.1rem;
    border-bottom: 1px solid #e6edf6;
    background: #f9fbfe;
}

.document-panel-body {
    padding: 1rem 1.1rem;
}

.document-preview-body {
    padding: 0.85rem;
}

.document-preview-body iframe,
.document-preview-body object,
.document-preview-body embed {
    border-radius: 12px;
}

@media (max-width: 991.98px) {
    .workspace-header-main,
    .document-overview-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .document-status-block {
        text-align: left;
    }
}

@media (max-width: 575.98px) {
    .workspace-header-main,
    .workspace-table-foot,
    .document-nav-row,
    .document-tabs-row,
    .document-panel-head,
    .document-panel-body {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .workspace-table-foot {
        flex-direction: column;
        align-items: flex-start;
    }

    .document-overview-actions-side .btn,
    .document-inline-links .btn {
        width: 100%;
    }
}

/* Payment workspace */
.payment-table-reference {
    color: #173f69;
}

.payment-header-main {
    align-items: flex-start;
}

.payment-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

.payment-contact-line {
    margin-top: 0.45rem;
    color: #667b94;
    font-size: 0.88rem;
    line-height: 1.45;
}

.payment-detail-shell {
    padding: 1.15rem 1.2rem 1.25rem;
}

.payment-snapshot-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.payment-snapshot-card,
.payment-panel {
    border: 1px solid #dde7f2;
    border-radius: 16px;
    background: #ffffff;
    overflow: hidden;
}

.payment-snapshot-card {
    padding: 1rem 1.05rem;
}

.payment-panel-head {
    padding: 0.95rem 1.1rem;
    border-bottom: 1px solid #e6edf6;
    background: #f9fbfe;
}

.payment-panel-body {
    padding: 1rem 1.1rem;
}

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

.payment-meta-label {
    margin-bottom: 0.3rem;
    font-size: 0.74rem;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: #71849b;
}

.payment-meta-value {
    color: #18324c;
    font-weight: 600;
}

.payment-notice-detail-shell .detail-view {
    margin-bottom: 0;
}

@media (max-width: 991.98px) {
    .payment-snapshot-grid {
        grid-template-columns: 1fr;
    }

    .payment-header-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .payment-detail-shell,
    .payment-panel-head,
    .payment-panel-body {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .payment-meta-grid {
        grid-template-columns: 1fr;
    }

    .payment-header-actions .btn {
        width: 100%;
    }
}

/* Account workspace */
.account-settings-shell {
    padding: 1.2rem 1.25rem 1.3rem;
}

.account-panel {
    border: 1px solid #dde7f2;
    border-radius: 16px;
    background: #ffffff;
    overflow: hidden;
}

.account-panel-head {
    padding: 0.95rem 1.1rem;
    border-bottom: 1px solid #e6edf6;
    background: #f9fbfe;
}

.account-panel-body {
    padding: 1rem 1.1rem;
}

.account-helper-block {
    border: 1px solid #dfe8f3;
    border-radius: 14px;
    background: #fbfdff;
    padding: 0.95rem 1rem;
}

.account-avatar-field .file-kit-upload {
    max-width: 18rem;
}

.account-workspace .form-group,
.account-workspace .mb-3 {
    margin-bottom: 0.95rem;
}

@media (max-width: 575.98px) {
    .account-settings-shell,
    .account-panel-head,
    .account-panel-body {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Support workspace */
.support-surface {
    padding: 1.2rem 1.25rem 1.3rem;
}

.support-form-shell {
    max-width: 100%;
}

@media (max-width: 575.98px) {
    .support-surface {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Application workspace */
.application-table-reference {
    color: #173f69;
}

.application-header-main {
    align-items: center;
}

.application-status-block {
    text-align: right;
}

.application-detail-shell {
    padding: 1.15rem 1.2rem 1.25rem;
}

.application-detail-body .detail-view {
    margin-bottom: 0;
}

.application-search-shell {
    padding: 1.2rem 1.25rem 1.3rem;
}

.application-filter-panel {
    height: 100%;
    overflow: hidden;
}

.application-filter-body {
    display: grid;
    gap: 1rem;
}

.application-filter-group {
    padding-bottom: 1rem;
    border-bottom: 1px solid #e6edf6;
}

.application-filter-group:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.application-filter-title {
    margin-bottom: 0.75rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #18324c;
}

.application-filter-group .checkbox,
.application-filter-group .form-check {
    margin-bottom: 0.55rem;
}

.application-filter-group .checkbox:last-child,
.application-filter-group .form-check:last-child {
    margin-bottom: 0;
}

.application-filter-group .checkbox label,
.application-filter-group .form-check label {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    color: #35506d;
    font-weight: 500;
}

.application-filter-group input[type="checkbox"] {
    margin-top: 0.2rem;
}

.application-filter-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1.05rem 1rem;
    border-top: 1px solid rgba(12, 32, 67, 0.08);
    background: #fbfdff;
}

.application-filter-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.application-filter-summary {
    color: #60748e;
    font-size: 0.85rem;
    font-weight: 600;
}

.application-filter-expand {
    white-space: nowrap;
}

.application-filter-option-shell {
    display: grid;
    gap: 0.75rem;
}

.application-filter-search-wrap {
    position: sticky;
    top: 0;
    z-index: 1;
    padding-bottom: 0.1rem;
    background: #ffffff;
}

.application-filter-checklist {
    max-height: 18rem;
    overflow: auto;
    padding: 0.1rem 0.1rem 0.1rem 0;
}

.application-filter-empty {
    padding: 0.8rem 0.9rem;
    border: 1px dashed #d7e3ef;
    border-radius: 0.85rem;
    background: #f8fbfe;
    color: #60748e;
    font-size: 0.86rem;
}

.application-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.application-search-bar {
    border: 1px solid #dde7f2;
    border-radius: 16px;
    background: #fbfdff;
    padding: 1rem;
    margin-bottom: 1rem;
}

.application-search-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.application-search-label {
    margin-bottom: 0.45rem;
    color: #5d728a;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.application-search-bar .form-group,
.application-search-bar .mb-3 {
    /* Bootstrap's .mb-3 is !important; without this the input column ends 1rem below the input */
    margin-bottom: 0 !important;
}

.application-search-bar .btn {
    min-height: calc(2.15rem + 2px);
}

.application-search-submit {
    align-self: stretch;
}

/* Same height as the input beside it */
.application-search-bar .application-search-submit {
    min-height: 0;
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
    line-height: 1.5;
}

.application-results-shell .nav-tabs {
    border-bottom: 0;
    gap: 0.6rem;
    padding: 0 0 0.95rem;
}

.application-results-shell .nav-tabs .nav-link {
    border: 1px solid #dce7f3;
    border-radius: 999px;
    background: #fbfdff;
    color: #35506d;
    font-weight: 700;
    padding: 0.55rem 0.9rem;
}

.application-results-shell .nav-tabs .nav-link.active,
.application-results-shell .nav-tabs .nav-link:hover {
    border-color: #bcd1e7;
    background: #eef6ff;
    color: #184f88;
}

.application-view-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

/* The cards sit straight in the panel: no extra frame or padding around the list. */
.application-results-shell .tab-content {
    padding: 0;
    border: 0;
    background: transparent;
}

.application-results-shell .tab-pane {
    padding: 0 !important;
    box-shadow: none;
}

.application-result-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border: 1px solid #e6edf6;
    border-radius: 14px;
    background: #fbfdff;
    padding: 0.75rem 0.95rem;
}

.application-result-meta .summary {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.application-result-meta .pagination {
    display: inline-flex;
    margin: 0;
    padding-left: 0;
}

.application-empty-state {
    padding: 1.1rem 1.15rem;
}

@media (max-width: 991.98px) {
    .application-status-block {
        text-align: left;
    }

    .application-search-toolbar,
    .application-filter-foot,
    .application-filter-summary-row {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 575.98px) {
    .application-detail-shell,
    .application-search-shell {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .application-result-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .application-filter-foot,
    .application-search-bar {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* On a phone the outer panel drops its frame too, so the cards use the full width. */
    .application-search-shell.workspace-surface {
        padding: 0;
        border: 0;
        background: transparent;
        overflow: visible;
    }

    .application-search-submit,
    .application-start-btn {
        width: 100%;
    }
}

/* Cancellation workspace */
.cancellation-table-reference {
    color: #2d435b;
}

.cancellation-header-main {
    align-items: center;
}

.cancellation-request-shell,
.cancellation-detail-shell {
    padding: 1.15rem 1.2rem 1.25rem;
}

.cancellation-related-shell,
.cancellation-panel,
.cancellation-identity-panel,
.cancellation-metric-card {
    border: 1px solid #dfe4ea;
    border-radius: 16px;
    background: #ffffff;
}

.cancellation-related-head,
.cancellation-panel-head {
    padding: 0.95rem 1.1rem;
    border-bottom: 1px solid #e7ebf0;
    background: #f7f9fb;
}

.cancellation-related-body,
.cancellation-panel-body {
    padding: 1rem 1.1rem;
}

.cancellation-identity-panel {
    padding: 1rem 1.1rem;
}

.cancellation-metric-card {
    padding: 1rem 1.05rem;
}

.cancellation-search-submit {
    min-height: calc(2.15rem + 2px);
}

@media (max-width: 575.98px) {
    .cancellation-request-shell,
    .cancellation-detail-shell,
    .cancellation-related-head,
    .cancellation-related-body,
    .cancellation-panel-head,
    .cancellation-panel-body,
    .cancellation-identity-panel {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.document-check-shell,
.document-validation-shell {
    padding: 1.15rem 1.2rem 1.25rem;
}

.document-check-alert {
    border-radius: 14px;
}

.document-validation-search,
.document-validation-card,
.document-validation-empty {
    border: 1px solid #dde7f2;
    border-radius: 16px;
    background: #fbfdff;
}

.document-validation-search,
.document-validation-card,
.document-validation-empty {
    padding: 1rem 1.05rem;
}

.document-validation-header-main {
    align-items: center;
}

@media (max-width: 575.98px) {
    .document-check-shell,
    .document-validation-shell {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Public document verification result */
.doc-verify-page {
    max-width: 560px;
    margin: 0 auto;
}

.doc-verify-page__head {
    text-align: center;
    margin-bottom: 1rem;
}

.doc-verify {
    --doc-verify-tone: var(--fx-success);
    --doc-verify-soft: #e9f7f0;
    border: 1px solid var(--fx-border);
    border-top: 4px solid var(--doc-verify-tone);
    border-radius: 16px;
    background: var(--fx-surface);
    overflow: hidden;
    text-align: left;
}

.doc-verify--pending {
    --doc-verify-tone: var(--fx-warning);
    --doc-verify-soft: #fdf5e2;
}

.doc-verify--invalid {
    --doc-verify-tone: var(--fx-danger);
    --doc-verify-soft: #fcecee;
}

/* a genuine document whose status is rejected */
.doc-verify--rejected {
    --doc-verify-tone: var(--fx-danger);
    --doc-verify-soft: #fcecee;
}

.doc-verify__verdict {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1.1rem 1.2rem;
    background: var(--doc-verify-soft);
}

.doc-verify__verdict-icon {
    font-size: 2.4rem;
    line-height: 1;
    color: var(--doc-verify-tone);
}

.doc-verify__verdict-title {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--fx-ink);
}

.doc-verify__verdict-text {
    margin-top: 0.2rem;
    color: #3d5169;
}

.doc-verify__identity {
    padding: 1rem 1.2rem 0.9rem;
    border-bottom: 1px solid var(--fx-border);
}

.doc-verify__number {
    margin-top: 0.2rem;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--fx-ink);
    overflow-wrap: anywhere;
}

.doc-verify__subtitle {
    margin-top: 0.2rem;
    color: var(--fx-muted);
}

.doc-verify__details {
    margin: 0;
    padding: 0.2rem 1.2rem;
}

.doc-verify__section {
    padding: 0.9rem 1.2rem 0.1rem;
    border-top: 1px solid var(--fx-border);
}

.doc-verify__row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #eef3f9;
}

.doc-verify__row:last-child {
    border-bottom: 0;
}

.doc-verify__row dt {
    flex: 0 0 38%;
    font-weight: 500;
    color: var(--fx-muted);
}

.doc-verify__row dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
    color: var(--fx-ink);
    overflow-wrap: anywhere;
}

.doc-verify__note {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #a66f00;
}

.doc-verify__hint {
    display: flex;
    gap: 0.6rem;
    margin: 0.4rem 1.2rem 1rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    background: var(--fx-surface-soft);
    color: #3d5169;
    font-size: 0.92rem;
}

.doc-verify--invalid .doc-verify__hint {
    margin-top: 1rem;
}

.doc-verify__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.8rem 1.2rem;
    border-top: 1px solid var(--fx-border);
    background: var(--fx-surface-soft);
    font-size: 0.85rem;
    color: var(--fx-muted);
}

/* Business workspace */
.business-header-main {
    align-items: flex-start;
}

.business-header-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
}

.business-header-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: #eef4ff;
    color: #1d4e89;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.business-shell {
    padding: 1.15rem;
}

.business-tabs-shell .nav-tabs {
    margin-bottom: 1rem;
    border-bottom-color: rgba(12, 32, 67, 0.08);
    gap: 0.35rem;
}

.business-tabs-shell .nav-tabs .nav-link {
    border: 0;
    border-radius: 0.85rem;
    color: #556274;
    font-weight: 600;
    padding: 0.7rem 1rem;
}

.business-tabs-shell .nav-tabs .nav-link.active,
.business-tabs-shell .nav-tabs .nav-link:hover {
    background: #f3f7fb;
    color: #163a63;
}

.business-tab-panel,
.business-overview-shell {
    display: block;
}

/* The entity tabs sit straight in the panel: no extra padding or shadow around them. */
.business-tabs-shell .tab-content {
    padding: 0;
}

.business-tabs-shell .tab-pane {
    padding: 0 !important;
    box-shadow: none;
}

.business-overview-head,
.business-tab-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.business-overview-intro,
.business-helper-text {
    max-width: 48rem;
}

.business-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

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

.business-metric-card {
    padding: 1rem 1.05rem;
    border: 1px solid rgba(12, 32, 67, 0.08);
    border-radius: 1rem;
    background: #f8fbfe;
}

.business-metric-value {
    color: #132d4b;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
}

.business-panel {
    border: 1px solid rgba(12, 32, 67, 0.08);
    border-radius: 1rem;
    background: #fff;
    overflow: hidden;
}

.business-panel-head {
    padding: 1rem 1.1rem 0.9rem;
    border-bottom: 1px solid rgba(12, 32, 67, 0.08);
    background: #f8fbfe;
}

.business-panel-body {
    padding: 1rem 1.1rem;
}

.business-panel-body .table {
    margin-bottom: 0;
}

.business-table-shell {
    border: 1px solid rgba(12, 32, 67, 0.08);
    border-radius: 1rem;
    background: #fff;
    overflow: hidden;
}

.business-table thead th {
    background: #f8fbfe;
    color: #526173;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom-color: rgba(12, 32, 67, 0.08);
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

.business-table tbody td {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
    border-color: rgba(12, 32, 67, 0.06);
    vertical-align: middle;
}

.business-empty-state {
    padding: 2rem 1.25rem;
    color: #6b7786;
    text-align: center;
}

.business-grid-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 1.1rem;
    border-top: 1px solid rgba(12, 32, 67, 0.08);
    background: #fff;
}

.business-grid-footer .summary {
    margin-bottom: 0;
    color: #6b7786;
}

.business-grid-footer .pagination {
    margin-bottom: 0;
}

@media (max-width: 991.98px) {
    .business-metric-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .business-shell {
        padding: 0.9rem;
    }

    .business-header-main {
        gap: 0.9rem;
    }

    .business-header-meta {
        justify-content: flex-start;
    }

    .business-panel-head,
    .business-panel-body,
    .business-grid-footer {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .business-overview-head .business-actions {
        width: 100%;
    }

    /* A long email or address wraps instead of running past the edge of the card. */
    .business-overview-shell .detail-view td {
        overflow-wrap: anywhere;
    }
}

/* Process workspace */
.process-layout-shell {
    display: block;
}

.process-nav-shell,
.process-main-shell,
.process-step-panel,
.process-side-panel,
.process-choice-panel,
.process-dependency-card,
.process-detail-panel,
.application-type-card {
    border: 1px solid rgba(12, 32, 67, 0.08);
    border-radius: 1rem;
    background: #fff;
}

.process-nav-shell {
    padding: 0.3rem 0.4rem;
}

.process-main-shell {
    overflow: hidden;
}

.process-main-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.2rem 0.95rem;
    border-bottom: 1px solid rgba(12, 32, 67, 0.08);
    background: #f8fbfe;
}

.process-main-head-actions {
    margin-left: auto;
}

.process-main-head-identity {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.process-main-head-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    flex-shrink: 0;
}

.process-page-ref-chip {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    border-radius: 6px;
}

.process-page-ref-icon {
    font-size: 0.6rem;
    opacity: 0.55;
}

.process-action-bar {
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid rgba(12, 32, 67, 0.08);
    background: #fff;
}

.process-main-body {
    padding: 1.2rem;
}

.process-form-shell {
    display: grid;
    gap: 1rem;
}

.process-form-panel {
    overflow: hidden;
}

.process-form-head {
    align-items: center;
}

.process-form-progress {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.6rem;
}

.application-meta-chip-success {
    background: #e9f8f0;
    color: #167a4d;
    border-color: #bee7cf;
}

.process-form-products {
    border: 1px solid rgba(17, 119, 210, 0.08);
    background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
}

.process-form-tab-shell .tab-content {
    padding: 1.25rem 0 0;
}

.process-form-tabs .nav-tabs {
    gap: 0.75rem;
    border-bottom: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.2rem;
}

.process-form-tabs .nav-item {
    float: none;
    margin-right: 5px;
}

.process-form-tabs .nav-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 15rem;
    padding: 0.85rem 1rem;
    border: 1px solid #dbe6f3;
    border-radius: 1rem;
    background: #f8fbfe;
    color: #173453;
    box-shadow: 0 8px 18px rgba(14, 41, 74, 0.04);
}

.process-form-tabs .nav-link:hover,
.process-form-tabs .nav-link:focus,
.process-form-tabs .nav-link.active {
    border-color: rgba(17, 119, 210, 0.24);
    background: #ffffff;
    color: #0f5fa8;
}

.process-form-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: #e6eef8;
    color: #34506e;
    font-weight: 700;
    flex: 0 0 auto;
}

.process-form-tab-badge.is-active {
    background: #d9ebff;
    color: #0f63b5;
}

.process-form-tab-badge.is-done {
    background: #e7f7ee;
    color: #188252;
}

.process-form-tab-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.process-form-tab-title {
    font-weight: 700;
    line-height: 1.35;
}

.process-form-tab-status {
    font-size: 0.8rem;
    color: #61758f;
}

.process-form-body {
    display: grid;
    gap: 1rem;
}

.process-form-intro {
    border: 1px solid #dce7f4;
    background: linear-gradient(180deg, #f8fbfe 0%, #f1f7ff 100%);
}

.process-form-intro-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #4d6580;
    margin-bottom: 0.35rem;
}

.process-form-intro-copy > *:last-child {
    margin-bottom: 0;
}

.process-form-fields {
    padding: 1rem 1.05rem;
    border: 1px solid #dce6f3;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(14, 41, 74, 0.04);
}

.process-form-alert {
    border-radius: 1rem;
}

.process-form-foot {
    gap: 1rem;
}

.process-form-shell {
    gap: 0.5rem;
}

.process-form-panel.process-step-panel {
    padding: 0rem;
    border: 0;
}
.process-form-panel.process-step-panel  .tabs-x .nav-tabs {
    padding-bottom: 10px;
}
.process-form-head-compact {
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem !important;
}

.process-form-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 0.75rem;
}

.process-form-title-row .workspace-title {
    font-size: 1.15rem;
}

.process-form-progress {
    gap: 0.45rem;
}

.process-form-products-compact {
    padding: 0.75rem 0.9rem;
}

.process-form-products-head-compact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
}

.process-form-products-body.mt-2 {
    margin-top: 0.5rem !important;
}

.process-form-tab-shell .tab-content {
    padding: 0.8rem 0 0;
}

.process-form-tabs-compact .nav-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.6rem;
    margin: 0;
    padding: 0.1rem 0 0.2rem;
    list-style: none;
}

.process-form-tabs-compact .nav-tabs > li,
.process-form-tabs-compact .nav-tabs > .nav-item {
    display: flex;
    align-items: center;
    margin: 0;
    float: none;
}

.process-form-tabs-compact .nav-tabs > li > a,
.process-form-tabs-compact .nav-tabs > .nav-item > .nav-link {
    margin: 0;
}

.process-form-tabs-compact .nav-link,
.process-form-tabs-compact .nav-link.active,
.process-form-tabs-compact .nav-item.active .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 11rem;
    padding: 0.55rem 0.7rem;
    border-radius: 0.8rem;
    box-shadow: none;
    white-space: nowrap;
}

.process-form-tabs-compact .nav-link.active,
.process-form-tabs-compact .nav-item.active .nav-link {
    border-color: #1177d2;
    background: #eaf4ff;
    color: #0f5fa8;
    box-shadow: inset 0 0 0 1px rgba(17, 119, 210, 0.08);
}

.process-form-tabs-compact .process-form-tab-badge {
    width: 1.6rem;
    height: 1.6rem;
    font-size: 0.82rem;
}

.process-form-tabs-compact .nav-link .process-form-tab-copy,
.process-form-tabs-compact .nav-link.active .process-form-tab-copy,
.process-form-tabs-compact .nav-item.active .nav-link .process-form-tab-copy {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.process-form-tabs-compact .process-form-tab-title {
    font-size: 0.88rem;
    line-height: 1.2;
    margin-left: 5px;
}

.process-form-tabs-compact .nav-link.active .process-form-tab-badge,
.process-form-tabs-compact .nav-item.active .nav-link .process-form-tab-badge {
    background: #1177d2;
    color: #fff;
}

.process-form-tab-status {
    display: none;
}

.process-form-body-compact {
    gap: 0.75rem;
}

.process-form-intro-compact {
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.75rem !important;
    font-size: 0.93rem;
    line-height: 1.5;
}

.process-form-fields-compact {
    padding: 0.8rem 0.9rem;
}

.process-form-foot-compact {
    margin-top: 0.75rem !important;
    min-height: 0;
}

.process-form-foot-compact .process-inline-actions {
    width: 100%;
    justify-content: flex-end;
    gap: 0.5rem;
}

.process-form-foot-compact .btn {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.process-submit-focus-notice {
    max-width: 680px;
    margin: 0 0 0.85rem;
    padding: 0.6rem 0.85rem;
    border: 1px solid #f3dcb6;
    border-radius: 10px;
    background: #fff8ec;
    color: #8a5a14;
    font-size: 0.9rem;
    line-height: 1.5;
}

.process-submit-focus-notice a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    white-space: nowrap;
}

.process-submit-focus-btn {
    padding: 0.65rem 1.2rem;
    font-size: 0.96rem;
    font-weight: 600;
    border-radius: 10px;
    letter-spacing: 0.01em;
    box-shadow: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.process-submit-focus-btn:hover {
    transform: translateY(-1px);
    box-shadow: none;
}

.btn-primary.process-submit-focus-btn {
    box-shadow: none;
}

.btn-primary.process-submit-focus-btn:hover {
    box-shadow: none;
}

@media (max-width: 767.98px) {

    .process-submit-focus-btn {
        width: 100%;
    }
}

.process-declaration-panel {
    overflow: hidden;
}

.process-declaration-head {
    align-items: center;
}

.process-declaration-alert {
    border-radius: 1rem;
}

.process-declaration-note {
    border: 1px solid #b8d3f0;
    border-left: 4px solid #1177d2;
    background: linear-gradient(180deg, #f4f9ff 0%, #eaf4ff 100%);
    color: #123f6b;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(17, 119, 210, 0.08);
}

.process-declaration-copy {
    padding: 1rem 1.05rem;
    border: 1px solid #dce6f3;
    border-radius: 1rem;
    background: #fff;
    color: #22384f;
    line-height: 1.75;
    box-shadow: 0 10px 22px rgba(14, 41, 74, 0.04);
}

.process-declaration-copy > *:last-child {
    margin-bottom: 0;
}

.process-declaration-check {
    scroll-margin-top: 6rem;
    padding: 0.85rem 1rem;
    border: 1px solid #dce6f3;
    border-radius: 1rem;
    background: #fbfdff;
}

.process-declaration-check .form-group,
.process-declaration-check .checkbox,
.process-declaration-check .form-check {
    margin-bottom: 0;
}

.process-declaration-check label {
    margin-bottom: 0;
    font-weight: 600;
    color: #173453;
}

.process-declaration-foot {
    min-height: 0;
}

.process-declaration-foot .process-inline-actions {
    width: 100%;
    justify-content: flex-end;
}

.process-declaration-success {
    border: 1px solid #cde9d9;
    background: linear-gradient(180deg, #f0fbf5 0%, #e7f7ee 100%);
    color: #176b45;
    font-weight: 600;
}

.application-products-panel,
.application-dependency-panel,
.application-link-document-panel {
   /* padding: 1rem 1.05rem;*/
}

.application-shared-table {
    margin-bottom: 0;
}

.application-shared-table thead th {
    background: #f7fbff;
    vertical-align: middle;
}

.application-identity-shell {
    display: grid;
    gap: 0.75rem;
}

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

.application-identity-card {
    padding: 0.95rem 1rem;
    border: 1px solid #dce6f3;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 10px 22px rgba(14, 41, 74, 0.04);
}

.application-identity-label {
    margin-bottom: 0.35rem;
    color: #526a86;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.application-identity-value {
    color: #163451;
    font-weight: 600;
}

.payment-stage-shell,
.payment-action-stack {
    display: grid;
    gap: 0.75rem;
}

.payment-stage-panel,
.payment-action-panel {
    overflow: hidden;
}

.payment-stage-head {
    align-items: center;
}

.payment-stage-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.6rem;
}

.payment-detail-panel {
    padding: 1rem 1.05rem;
    height: 100%;
}

.payment-table-wrap {
    border: 1px solid #dce6f3;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 10px 22px rgba(14, 41, 74, 0.04);
}

.payment-stage-table {
    margin-bottom: 0;
}

.payment-stage-table thead th {
    background: #f7fbff;
    vertical-align: middle;
}

.payment-stage-table tfoot td {
    background: #fbfdff;
}

.payment-action-alert {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid #dce7f4;
    background: linear-gradient(180deg, #f8fbfe 0%, #f1f7ff 100%);
}

.payment-action-alert-danger {
    border-color: #efc2c9;
    background: linear-gradient(180deg, #fff7f8 0%, #fff0f2 100%);
    color: #8f2335;
}

.payment-action-panel {
    padding: 0.9rem 1rem;
}

.payment-action-row {
    gap: 0.65rem;
}

.payment-modal-alert {
    border-radius: 1rem;
}

@media (max-width: 767.98px) {
    .payment-stage-head,
    .payment-action-alert {
        align-items: stretch;
    }

    .payment-stage-chips {
        justify-content: flex-start;
    }

    .payment-action-row .btn {
        flex: 1 1 auto;
    }
}

@media (max-width: 767.98px) {
    .process-declaration-head {
        align-items: stretch;
    }

    .process-declaration-foot .process-inline-actions {
        justify-content: stretch;
    }

    .process-declaration-foot .btn {
        flex: 1 1 auto;
    }
}

.process-view-shell {
    display: grid;
    gap: 0.75rem;
}

/* Submit banner */
.process-view-submit-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(31, 122, 85, 0.25);
    background: linear-gradient(135deg, rgba(31, 122, 85, 0.06) 0%, rgba(31, 122, 85, 0.02) 100%);
    box-shadow: 0 1px 4px rgba(31, 122, 85, 0.08);
}

.process-view-submit-banner-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(31, 122, 85, 0.12);
    color: #1f7a55;
}

.process-view-submit-banner-body {
    flex: 1;
    min-width: 0;
}

.process-view-submit-banner-kicker {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1f7a55;
    margin-bottom: 0.15rem;
}

.process-view-submit-banner-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--backend-process-heading, #1e293b);
    margin: 0 0 0.2rem;
}

.process-view-submit-banner-text {
    font-size: 0.88rem;
    color: var(--backend-process-muted, #64748b);
    line-height: 1.45;
}

.process-view-submit-banner-action {
    flex-shrink: 0;
}

.process-view-submit-btn {
    white-space: nowrap;
    padding: 0.55rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

@media (max-width: 767.98px) {
    .process-view-submit-banner {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .process-view-submit-banner-action {
        width: 100%;
    }
    .process-view-submit-btn {
        width: 100%;
    }
}

/* Form section header */
.process-view-form-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid var(--backend-process-border, #c7d3df);
    background: linear-gradient(135deg, rgba(44, 109, 158, 0.06) 0%, rgba(44, 109, 158, 0.02) 100%);
}

.process-view-form-header-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(44, 109, 158, 0.12);
    color: var(--backend-process-accent, #2c6d9e);
    margin-top: 0.1rem;
}

.process-view-form-header-body {
    flex: 1;
    min-width: 0;
}

.process-view-form-header-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--backend-process-heading, #1f3448);
    margin: 0 0 0.2rem;
}

.process-view-form-header-text {
    font-size: 0.88rem;
    color: var(--backend-process-muted, #667a90);
    line-height: 1.45;
}

.process-view-form-header-action {
    flex-shrink: 0;
}

@media (max-width: 767.98px) {
    .process-view-form-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .process-view-form-header-action {
        width: 100%;
    }
    .process-view-form-header-action .btn {
        width: 100%;
    }
}

.process-view-products-panel,
.process-view-panel {
    overflow: hidden;
}

.process-view-head,
.process-view-section-head {
    align-items: center;
}

.process-view-progress {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
    align-items: center;
}

.process-view-accordion {
    display: grid;
    gap: 0.7rem;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
}

.process-view-accordion-item {
    overflow: hidden;
    border: 1px solid #dce6f3;
    border-radius: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 10px 24px rgba(14, 41, 74, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.process-view-accordion-item:first-child {
    border-top: 1px solid #dce6f3;
}

.process-view-accordion-item:hover {
    transform: translateY(-1px);
    border-color: #c7d9ef;
    box-shadow: 0 16px 28px rgba(14, 41, 74, 0.08);
}

.process-view-accordion .accordion-button {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.05rem;
    background: transparent;
    color: #18365a;
    box-shadow: none;
}

.process-view-accordion .accordion-button:hover {
    background: #f4f7fa;
}

.process-view-accordion .accordion-button:not(.collapsed),
.process-view-accordion .accordion-item .accordion-button:not(.collapsed),
.process-view-accordion .accordion-header .accordion-button:not(.collapsed) {
    background: linear-gradient(180deg, #ecf1f6 0%, #f3f6f9 100%) !important;
    color: #2d4862 !important;
    border-bottom: 1px solid #d9e1e9 !important;
    box-shadow: inset 0 -1px 0 rgba(76, 95, 115, 0.08) !important;
}

.process-view-accordion .accordion-button:not(.collapsed) .process-view-accordion-title,
.process-view-accordion .accordion-item .accordion-button:not(.collapsed) .process-view-accordion-title,
.process-view-accordion .accordion-header .accordion-button:not(.collapsed) .process-view-accordion-title {
    color: #2d4862 !important;
}

.process-view-accordion .accordion-button::after {
    width: 1.8rem;
    height: 1.8rem;
    margin-left: 0.9rem;
    border-radius: 999px;
    background-color: #eef2f6;
    background-position: center;
    background-size: 0.78rem;
}

.process-view-accordion .accordion-button:not(.collapsed)::after {
    background-color: #dfe7ef;
    filter: none;
}

.process-view-accordion-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: #e5eaef;
    color: #42556a;
    font-weight: 700;
    flex: 0 0 auto;
    box-shadow: inset 0 0 0 1px rgba(52, 80, 110, 0.06);
}

.process-view-accordion .accordion-button:not(.collapsed) .process-view-accordion-badge {
    background: linear-gradient(180deg, #6b7f93 0%, #5c6f82 100%);
    color: #fff;
    box-shadow: none;
}

.process-view-accordion-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.process-view-accordion-title {
    font-weight: 700;
    line-height: 1.35;
}

.process-view-accordion-status {
    display: inline-flex;
    align-items: center;
    padding: 0.26rem 0.62rem;
    border-radius: 999px;
    background: #e9f8f0;
    color: #167a4d;
    font-size: 0.77rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.process-view-accordion-body {
    padding: 1rem 1.05rem 1.05rem;
    background: #fff;
}

@media (max-width: 767.98px) {
    .process-view-head,
    .process-view-section-head {
        align-items: stretch;
    }

    .process-view-progress {
        justify-content: flex-start;
    }

    .process-view-accordion .accordion-button {
        padding: 0.85rem 0.9rem;
        gap: 0.6rem;
    }

    .process-view-accordion-status {
        display: none;
    }

    .process-view-accordion-body {
        padding: 0.9rem;
    }
}

@media (max-width: 767.98px) {
    .process-form-head-compact {
        align-items: stretch;
    }

    .process-form-title-row {
        align-items: flex-start;
    }

    .process-form-tabs-compact .nav-link {
        min-width: 9.5rem;
    }

    .process-form-foot-compact .process-inline-actions {
        justify-content: stretch;
    }

    .process-form-foot-compact .btn {
        flex: 1 1 auto;
    }
}

.process-form-foot-note {
    margin-bottom: 0;
}

@media (max-width: 767.98px) {
    .process-form-head,
    .process-form-foot {
        flex-direction: column;
        align-items: stretch;
    }

    .process-form-progress {
        justify-content: flex-start;
    }

    .process-form-tabs .nav-link {
        min-width: 13rem;
    }
}

.process-side-stack {
    display: grid;
    gap: 1rem;
}

.process-side-head,
.process-choice-head,
.process-dependency-head {
    padding: 1rem 1.05rem 0.9rem;
    border-bottom: 1px solid rgba(12, 32, 67, 0.08);
    background: #f8fbfe;
}

.process-side-body,
.process-choice-body,
.process-dependency-body {
    padding: 1rem 1.05rem;
}

.process-summary-row {
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(12, 32, 67, 0.06);
}

.process-summary-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.process-summary-label {
    color: #5d6a79;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.process-summary-value {
    color: #172f4d;
    line-height: 1.5;
}

.process-step-panel {
    padding: 1.2rem;
}

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

.process-step-note,
.process-inline-hint,
.process-empty-state {
    padding: 0.95rem 1rem;
    border-radius: 0.9rem;
    background: #f8fbfe;
    color: #516072;
}

.process-copy-body {
    color: #22384f;
    line-height: 1.75;
}

.process-copy-body > *:last-child {
    margin-bottom: 0;
}

.process-action-row,
.process-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.process-dependency-stack {
    display: grid;
    gap: 1rem;
}

.process-choice-panel,
.process-dependency-card,
.process-detail-panel,
.process-old-document-panel {
    overflow: hidden;
}

.process-detail-panel {
    /*padding: 1rem 1.05rem;*/
}

.application-type-card {
    height: 100%;
    overflow: hidden;
    box-shadow: 0 10px 22px rgba(14, 41, 74, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.application-type-card:hover {
    transform: translateY(-2px);
    border-color: rgba(24, 79, 136, 0.16);
    box-shadow: 0 16px 28px rgba(14, 41, 74, 0.08);
}

.application-type-body {
    padding: 1.1rem 1.05rem 1rem;
}

.application-type-head {
    min-height: 4rem;
}

.application-type-title {
    color: #173453;
    font-weight: 700;
    line-height: 1.4;
}

.application-type-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.application-meta-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.85rem;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
}

.application-meta-chip-neutral {
    border: 1px solid #dfe5ec;
    background: #f6f8fa;
    color: #4c5f73;
}

.application-meta-chip-accent {
    border: 1px solid #cde5db;
    background: #effaf4;
    color: #24644c;
}

.application-meta-chip-danger {
    border: 1px solid #f3c6c1;
    background: #fdecea;
    color: #a3271f;
}

.application-meta-chip-warning {
    border: 1px solid #f5ddab;
    background: #fff6e6;
    color: #8a5a00;
}

.application-type-description {
    color: #58677a;
    line-height: 1.6;
}

.application-description-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #185590;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.application-description-link:hover {
    color: #0f4b81;
    text-decoration: none;
}

.application-description-link[aria-expanded="false"] .application-description-less,
.application-description-link[aria-expanded="true"] .application-description-more {
    display: none;
}

.application-type-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid #e8eef6;
}

.application-start-btn {
    min-width: 9.5rem;
}

.process-main-shell .card,
.process-main-shell .alert,
.process-main-shell .list-group-item,
.process-step-panel .card,
.process-step-panel .alert,
.process-step-panel .list-group-item {
    border-radius: 0.9rem;
}

@media (max-width: 991.98px) {
    .process-main-body,
    .process-step-panel {
        padding: 1rem;
    }
}

@media (max-width: 767.98px) {
    .process-main-head,
    .process-action-bar,
    .process-side-head,
    .process-side-body,
    .process-choice-head,
    .process-choice-body,
    .process-dependency-head,
    .process-dependency-body,
    .process-detail-panel,
    .application-type-body {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .process-main-body,
    .process-step-panel {
        padding: 0.95rem;
    }
}

.business-agent-search-page {
    display: block;
}

.business-agent-search-head {
    margin-bottom: 1.25rem;
}

.business-agent-filter-panel,
.business-agent-results-panel,
.business-agent-confirm-panel {
    box-shadow: 0 10px 24px rgba(14, 41, 74, 0.04);
}

.business-agent-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.business-agent-filter-actions .btn {
    min-width: 9rem;
}

.business-agent-results-head {
    align-items: center;
}

.business-agent-results-list,
.business-agent-results-items {
    display: block;
}

.business-agent-result-card {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid rgba(12, 32, 67, 0.08);
}

.business-agent-result-card:last-child {
    border-bottom: 0;
}

.business-agent-result-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.business-agent-result-copy {
    min-width: 0;
    flex: 1 1 20rem;
}

.business-agent-result-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.business-agent-result-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: #eef5ff;
    color: #18456e;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.business-agent-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    color: #617184;
    font-size: 0.92rem;
}

.business-agent-result-action {
    flex: 0 0 auto;
}

.business-agent-result-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.55rem;
    padding: 0.5rem 0.9rem;
    border-radius: 0.8rem;
    background: #f3f7fb;
    color: #45617d;
    font-weight: 700;
}

.business-agent-empty-intro {
    padding: 2.5rem 1.25rem;
}

.business-agent-confirm-dialog {
    padding: 0.25rem;
}

.business-agent-confirm-actions {
    display: flex;
    justify-content: flex-end;
}

.business-agent-confirm-actions .btn {
    min-width: 12rem;
}

@media (max-width: 767.98px) {
    .business-agent-filter-actions .btn,
    .business-agent-confirm-actions .btn,
    .business-agent-result-action,
    .business-agent-result-action .btn {
        width: 100%;
    }

    .business-agent-result-main {
        align-items: stretch;
    }
}

.business-form-shell {
    overflow: visible;
}

.business-form-page {
    display: block;
    max-width: 1024px;
}

.business-form-intro-panel,
.business-form-panel {
    border: 1px solid rgba(12, 32, 67, 0.08);
    box-shadow: 0 10px 24px rgba(14, 41, 74, 0.04);
}

.business-form-summary-card {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(12, 32, 67, 0.08);
    border-radius: 1rem;
    background: #f8fbfe;
}

.business-form-section-block {
    margin-bottom: 1.25rem;
}

.business-form-section-block:last-child {
    margin-bottom: 0;
}

.business-form-section-title {
    margin-bottom: 0.65rem;
    color: #22405d;
    font-size: 0.95rem;
    font-weight: 700;
}

.business-form-required-note {
    margin-bottom: 0.75rem;
    color: #4f627a;
    font-size: 0.86rem;
}

.business-form-required-note span {
    color: #bd2f1f;
    font-weight: 700;
}

.business-form-panel .required > label.control-label::after,
.business-form-panel .required > label::after {
    content: " *";
    color: #bd2f1f;
    font-weight: 700;
}

.business-form-error-summary {
    position: sticky;
    top: 0.75rem;
    z-index: 5;
    margin-bottom: 1rem;
    border-width: 1px;
    box-shadow: 0 8px 16px rgba(158, 34, 26, 0.08);
}

.business-form-alert {
    border-radius: 0.95rem;
    border: 1px solid rgba(163, 108, 20, 0.18);
}

.business-form-submit-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.business-form-submit-row .btn {
    min-width: 11rem;
}

.business-radio-list {
    display: grid;
    gap: 0.75rem;
}

.business-radio-list .radio,
.business-radio-list .form-check {
    margin: 0;
    padding: 0;
}

.business-radio-list .radio,
.business-radio-list .form-check {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin: 0;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(12, 32, 67, 0.14);
    border-radius: 1rem;
    background: #fdfefe;
    color: #28435f;
    line-height: 1.35;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.business-radio-list .radio > label,
.business-radio-list .form-check-label {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-weight: 600;
    flex: 1 1 auto;
    cursor: pointer;
}

.business-radio-list .radio:hover,
.business-radio-list .form-check:hover {
    border-color: rgba(0, 92, 185, 0.3);
    background: #f7fbff;
}

.business-radio-list .form-check-input {
    cursor: pointer;
}

.business-radio-list .radio:has(input[type="radio"]:checked),
.business-radio-list .form-check:has(input[type="radio"]:checked) {
    border-color: #0b5cad;
    box-shadow: 0 0 0 2px rgba(11, 92, 173, 0.12);
    background: #f3f8ff;
}

.business-radio-list .form-check-input {
    position: static;
    margin: 0.2rem 0 0;
    margin-left: 0;
    flex-shrink: 0;
}

.business-radio-list .radio > label {
    padding-left: 1.9rem;
}

.business-radio-list .radio > label > input[type="radio"] {
    position: absolute;
    left: 1rem;
    top: 1.15rem;
    margin: 0;
}

.business-user-link-page .password-input-widget {
    width: 100%;
}

.business-profile-page .wizard-step-content {
    padding-top: 0.5rem;
}

.business-agent-remove-dialog .business-agent-confirm-actions .btn {
    min-width: 11rem;
}

@media (max-width: 767.98px) {
    .business-form-page {
        max-width: 100%;
        padding: 0 0.35rem;
    }

    .business-form-submit-row {
        justify-content: stretch;
    }

    .business-form-submit-row .btn,
    .business-actions .btn {
        min-width: 0;
        width: 100%;
    }

    .business-form-summary-card {
        padding: 0.95rem;
    }

    .business-radio-list .radio,
    .business-radio-list .form-check {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .business-radio-list .radio > label {
        padding-left: 1.8rem;
    }

    .business-radio-list .radio > label > input[type="radio"] {
        left: 0.85rem;
    }
}

.business-shell--flush {
    padding: 0;
}

@media (max-width: 767.98px) {
    .business-shell--flush {
        padding: 0;
    }
}

.extension-shell {
    display: grid;
    gap: 0.75rem;
}

.extension-panel {
    overflow: hidden;
}

.extension-head {
    align-items: center;
}

.extension-alert {
    border-radius: 1rem;
}

.extension-summary-panel,
.extension-detail-panel {
    padding: 1rem 1.05rem;
}

.extension-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.extension-summary-label {
    color: #5b718c;
    font-weight: 700;
}

.extension-summary-value {
    color: #173453;
    font-weight: 700;
}

.extension-foot {
    min-height: 0;
}

.extension-foot .process-inline-actions {
    width: 100%;
    justify-content: flex-end;
}

@media (max-width: 767.98px) {
    .extension-head,
    .extension-summary-row {
        align-items: stretch;
        flex-direction: column;
    }

    .extension-foot .process-inline-actions {
        justify-content: flex-start;
    }

    .extension-foot .btn {
        flex: 1 1 auto;
    }
}

.signature-shell {
    display: grid;
    gap: 0.75rem;
}

.signature-panel {
    overflow: hidden;
}

.signature-head {
    align-items: center;
}

.signature-note {
    border: 1px solid #dce7f4;
    background: linear-gradient(180deg, #f8fbfe 0%, #f1f7ff 100%);
}

.signature-note-danger {
    border-color: #efc2c9;
    background: linear-gradient(180deg, #fff7f8 0%, #fff0f2 100%);
    color: #8f2335;
}

.signature-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.05rem;
    border: 1px solid #dce6f3;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 10px 22px rgba(14, 41, 74, 0.04);
}

.signature-profile-art {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5.5rem;
    min-width: 5.5rem;
    height: 5.5rem;
    border-radius: 1rem;
    background: #f8fbfe;
    border: 1px solid #dce6f3;
}

.signature-profile-art img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.signature-profile-label {
    color: #5b718c;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
}

.signature-profile-name {
    color: #173453;
    font-weight: 700;
}

.signature-profile-role {
    color: #5b718c;
}

.signature-action-row {
    justify-content: flex-end;
}

.signature-detail-panel {
    padding: 1rem 1.05rem;
}

.signature-pdf-shell {
    border: 1px solid #dce6f3;
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 22px rgba(14, 41, 74, 0.04);
}

@media (max-width: 767.98px) {
    .signature-head,
    .signature-profile {
        align-items: stretch;
        flex-direction: column;
    }

    .signature-action-row {
        justify-content: flex-start;
    }

    .signature-action-row .btn {
        flex: 1 1 auto;
    }
}

.basic-process-shell,
.subdocument-shell,
.review-shell {
    display: grid;
    gap: 0.75rem;
}

.basic-process-panel,
.subdocument-panel,
.review-panel,
.review-status-panel {
    overflow: hidden;
}

.basic-process-head,
.subdocument-head,
.review-head {
    align-items: center;
}

.subdocument-detail {
    border: 1px solid #dce6f3;
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 22px rgba(14, 41, 74, 0.04);
}

.basic-process-detail,
.subdocument-detail {
    padding: 1rem 1.05rem;
}

.review-status-note {
    border: 1px solid #dce7f4;
}

.review-status-success {
    background: linear-gradient(180deg, #f0fbf5 0%, #e7f7ee 100%);
    color: #176b45;
}

.review-status-danger {
    background: linear-gradient(180deg, #fff7f8 0%, #fff0f2 100%);
    color: #8f2335;
}

.review-status-info {
    background: linear-gradient(180deg, #f8fbfe 0%, #f1f7ff 100%);
    color: #234666;
}

.review-tab-pane {
    padding-top: 0.5rem;
}

.review-checklist {
    margin-bottom: 0;
    color: #173453;
}

.review-checklist ul {
    margin-top: 0.35rem;
}

@media (max-width: 767.98px) {
    .basic-process-head,
    .subdocument-head,
    .review-head {
        align-items: stretch;
    }

}

.inspection-summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.inspection-summary-card,
.review-support-item,
.review-support-row {
  border: 1px solid #d7e4f4;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 14px 16px;
}

.inspection-summary-label,
.review-support-label {
  display: block;
  color: #6b7a90;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.inspection-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.inspection-form-grid-tight {
  align-items: start;
}

.inspection-field-note {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

.inspection-section-head,
.review-support-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.inspection-testing-card,
.review-support-panel {
  border-radius: 18px;
}

.review-support-shell,
.review-stage-shell {
  display: grid;
  gap: 16px;
}

.review-support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.review-support-stack {
  display: grid;
  gap: 12px;
}

.review-support-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}

.review-support-table-wrap,
.inspection-table-wrap {
  border: 1px solid #d7e4f4;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.review-support-table thead th,
.inspection-table thead th {
  background: #eef5fc;
  border-bottom: 1px solid #d7e4f4;
  color: #33506f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.review-support-table tbody td,
.inspection-table tbody td {
  vertical-align: middle;
}

.review-support-note {
  margin: 0;
}

.review-support-foot,
.inspection-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.review-terms-stack {
  display: grid;
  gap: 12px;
}

.review-term-card {
  border: 1px solid #d7e4f4;
  border-radius: 16px;
  background: #f8fbff;
  padding: 16px 18px;
}

.review-term-title {
  margin: 0 0 8px;
  color: #1f3b57;
  font-size: 16px;
  font-weight: 700;
}

.review-term-content {
  color: #44556b;
  line-height: 1.6;
}

.review-stage-accordion .accordion-item {
  margin-bottom: 14px;
}

.review-stage-content {
  display: grid;
  gap: 16px;
}

@media (max-width: 767px) {
  .review-support-foot,
  .inspection-foot,
  .inspection-section-head,
  .review-support-head {
    flex-direction: column;
    align-items: stretch;
  }
}

.app-tabs-widget:not(.process-form-tabs) .nav-tabs,
.app-tabs-widget:not(.process-form-tabs) .tabs-x .nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 18px;
  padding: 0;
  border-bottom: 0;
  align-items: center;
}

.app-tabs-widget:not(.process-form-tabs) .nav-tabs > li,
.app-tabs-widget:not(.process-form-tabs) .tabs-x .nav-tabs > li,
.app-tabs-widget:not(.process-form-tabs) .nav-tabs > .nav-item {
  float: none;
  margin: 0;
}

.app-tabs-widget:not(.process-form-tabs) .nav-tabs > li > a,
.app-tabs-widget:not(.process-form-tabs) .tabs-x .nav-tabs > li > a,
.app-tabs-widget:not(.process-form-tabs) .nav-tabs > .nav-item > .nav-link {
  margin: 0;
  border: 1px solid #d8e4ef;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9fd 100%);
  color: #567089;
  font-weight: 700;
  line-height: 1.2;
  padding: 12px 18px;
  box-shadow: 0 10px 20px rgba(36, 77, 118, 0.06);
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.app-tabs-widget:not(.process-form-tabs) .nav-tabs > li > a:hover,
.app-tabs-widget:not(.process-form-tabs) .tabs-x .nav-tabs > li > a:hover,
.app-tabs-widget:not(.process-form-tabs) .nav-tabs > .nav-item > .nav-link:hover,
.app-tabs-widget:not(.process-form-tabs) .nav-tabs > li > a:focus,
.app-tabs-widget:not(.process-form-tabs) .tabs-x .nav-tabs > li > a:focus,
.app-tabs-widget:not(.process-form-tabs) .nav-tabs > .nav-item > .nav-link:focus {
  border-color: #b9cee2;
  background: linear-gradient(180deg, #ffffff 0%, #edf6fc 100%);
  color: #1f3b57;
  box-shadow: 0 12px 24px rgba(36, 77, 118, 0.09);
  transform: translateY(-1px);
}

.app-tabs-widget:not(.process-form-tabs) .nav-tabs > li.active > a,
.app-tabs-widget:not(.process-form-tabs) .nav-tabs > li.active > a:hover,
.app-tabs-widget:not(.process-form-tabs) .nav-tabs > li.active > a:focus,
.app-tabs-widget:not(.process-form-tabs) .tabs-x .nav-tabs > li.active > a,
.app-tabs-widget:not(.process-form-tabs) .tabs-x .nav-tabs > li.active > a:hover,
.app-tabs-widget:not(.process-form-tabs) .tabs-x .nav-tabs > li.active > a:focus,
.app-tabs-widget:not(.process-form-tabs) .nav-tabs > .nav-item.show > .nav-link,
.app-tabs-widget:not(.process-form-tabs) .nav-tabs > .nav-item > .nav-link.active {
  border-color: rgba(28, 114, 184, 0.28);
  background: linear-gradient(180deg, rgba(28, 114, 184, 0.18) 0%, rgba(28, 114, 184, 0.1) 100%);
  color: #16344d;
  box-shadow: inset 0 0 0 1px rgba(28, 114, 184, 0.08), 0 12px 24px rgba(28, 114, 184, 0.1);
}

.app-tabs-widget:not(.process-form-tabs) .tab-content {
  position: relative;
  border: 1px solid rgba(216, 228, 239, 0.95);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
  box-shadow: 0 18px 36px rgba(36, 77, 118, 0.08);
  padding: 20px;
}

.app-tabs-widget:not(.process-form-tabs) .tab-content::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(28, 114, 184, 0.18) 0%, rgba(28, 114, 184, 0.03) 100%);
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.app-tabs-widget:not(.process-form-tabs) .tab-pane {
  min-width: 0;
}

@media (max-width: 767px) {
  .app-tabs-widget:not(.process-form-tabs) .nav-tabs,
  .app-tabs-widget:not(.process-form-tabs) .tabs-x .nav-tabs {
    gap: 10px;
    margin-bottom: 14px;
  }

  .app-tabs-widget:not(.process-form-tabs) .nav-tabs > li > a,
  .app-tabs-widget:not(.process-form-tabs) .tabs-x .nav-tabs > li > a,
  .app-tabs-widget:not(.process-form-tabs) .nav-tabs > .nav-item > .nav-link {
    width: 100%;
    justify-content: center;
    padding: 11px 16px;
  }

  .app-tabs-widget:not(.process-form-tabs) .tab-content {
    padding: 16px;
    border-radius: 16px;
  }
}

.business-tabs-shell .app-tabs-widget .nav-tabs {
  gap: 14px;
  margin-bottom: 20px;
  padding: 8px;
  border: 1px solid #d9e6f2;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #f2f8fd 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.business-tabs-shell .app-tabs-widget .nav-tabs > li > a,
.business-tabs-shell .app-tabs-widget .tabs-x .nav-tabs > li > a,
.business-tabs-shell .app-tabs-widget .nav-tabs > .nav-item > .nav-link {
  border-color: transparent;
  background: transparent;
  color: #60758c;
  padding: 13px 18px;
  box-shadow: none;
}

.business-tabs-shell .app-tabs-widget .nav-tabs > li > a:hover,
.business-tabs-shell .app-tabs-widget .tabs-x .nav-tabs > li > a:hover,
.business-tabs-shell .app-tabs-widget .nav-tabs > .nav-item > .nav-link:hover {
  border-color: rgba(28, 114, 184, 0.08);
  background: rgba(255, 255, 255, 0.82);
  color: #163a63;
  box-shadow: 0 10px 20px rgba(36, 77, 118, 0.08);
}

.business-tabs-shell .app-tabs-widget .nav-tabs > li.active > a,
.business-tabs-shell .app-tabs-widget .nav-tabs > li.active > a:hover,
.business-tabs-shell .app-tabs-widget .nav-tabs > li.active > a:focus,
.business-tabs-shell .app-tabs-widget .tabs-x .nav-tabs > li.active > a,
.business-tabs-shell .app-tabs-widget .tabs-x .nav-tabs > li.active > a:hover,
.business-tabs-shell .app-tabs-widget .tabs-x .nav-tabs > li.active > a:focus,
.business-tabs-shell .app-tabs-widget .nav-tabs > .nav-item.show > .nav-link,
.business-tabs-shell .app-tabs-widget .nav-tabs > .nav-item > .nav-link.active {
  border-color: rgba(28, 114, 184, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #edf6fd 100%);
  color: #143552;
  box-shadow: 0 14px 28px rgba(28, 114, 184, 0.14);
}

.business-tabs-shell .app-tabs-widget .tab-content {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 1rem;
}
.process .process-widget.info-box {
    background: #fff;
    border-radius: 0.75rem;
    padding: 0.5rem 0.25rem;
}

.process-widget .steps {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    -webkit-overflow-scrolling: touch;
}

.process-widget .steps::-webkit-scrollbar {
    height: 4px;
}

.process-widget .steps::-webkit-scrollbar-track {
    background: transparent;
}

.process-widget .steps::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* Override Bootstrap carousel: show ALL items side-by-side */
.process-widget .md-stepper-horizontal {
    display: flex;
    width: 100%;
    background: transparent;
    gap: 0;
}

.process-widget .carousel {
    flex: 1 1 100%;
    width: 100%;
}

.process-widget .carousel-inner {
    display: flex !important;
    flex-wrap: nowrap;
    overflow: visible;
    width: 100%;
    padding: 0; /* common.css keeps 2.2em per side for arrows that are hidden here */
}

.process-widget .carousel-item {
    display: block !important;
    flex: 1 1 0%;
    min-width: 100px;
    margin-right: 0;
    opacity: 1 !important;
}

/* Hide carousel controls – not needed when all items are visible */
.process-widget .carousel-control-prev,
.process-widget .carousel-control-next {
    display: none !important;
}

/* ── Step styling ── */

.process-widget .md-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.process-widget a.md-step[href] {
    cursor: pointer;
}

.process-widget .md-step:hover {
    background-color: #f1f5f9;
}

/* Circle */
.process-widget .md-step .md-step-circle {
    width: 30px;
    height: 30px;
    line-height: 30px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.process-widget .md-step:hover .md-step-circle {
    transform: scale(1.12);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Title */
.process-widget .md-step .md-step-title {
    margin-top: 0.2rem;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.01em;
    color: #64748b;
    transition: color 0.2s ease;
}

.process-widget .md-step.active .md-step-title,
.process-widget .md-step.inprogress .md-step-title {
    color: #1e293b;
}

.process-widget .md-step.active-nav .md-step-title {
    color: var(--bs-primary);
}

/* Active-nav highlight */
.process-widget .md-step.active-nav {
    background-color: rgba(13, 110, 253, 0.06);
    border-bottom: 1px solid var(--bs-card-border-color);
    border-radius: 0.5rem 0.5rem 0 0;
}

/* Connecting bars */
.process-widget .md-step .md-step-bar-left,
.process-widget .md-step .md-step-bar-right {
    top: 19px; /* circle centre: 0.3rem padding + 15px */
    height: 2px;
    border-top-width: 2px;
    border-top-style: solid;
    border-top-color: #e2e8f0;
}

.process-widget .md-step.active .md-step-bar-left,
.process-widget .md-step.done .md-step-bar-left,
.process-widget .md-step.inprogress .md-step-bar-left {
    border-top-color: RGBA(var(--bs-success-rgb), 0.55);
}
/* Iframe popup states */
.fancybox-slide .fancybox-content {
    position: relative;
}

/* Loading overlay backdrop */
.fancybox-slide.iframe-is-loading .iframe-loading-state {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(5, 56, 97, 0.07) 0%, rgba(66, 134, 189, 0.1) 100%);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* Loading card */
.iframe-loading-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    border-radius: 16px;
    padding: 36px 40px 30px;
    box-shadow: 0 8px 40px rgba(5, 56, 97, 0.18), 0 2px 8px rgba(0,0,0,0.06);
    max-width: 340px;
    width: 90%;
    animation: iframe-card-in 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes iframe-card-in {
    from { opacity: 0; transform: scale(0.88) translateY(12px); }
    to   { opacity: 1; transform: scale(1)   translateY(0);    }
}

/* Concentric animated rings */
.iframe-loading-rings {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
}

.iframe-ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid transparent;
    animation: iframe-spin linear infinite;
}

.iframe-ring-1 {
    width: 80px;
    height: 80px;
    border-top-color: #053861;
    border-right-color: rgba(5, 56, 97, 0.2);
    animation-duration: 1.1s;
}

.iframe-ring-2 {
    width: 60px;
    height: 60px;
    border-top-color: #4286bd;
    border-right-color: rgba(66, 134, 189, 0.2);
    animation-duration: 0.85s;
    animation-direction: reverse;
}

.iframe-ring-3 {
    width: 40px;
    height: 40px;
    border-top-color: #ffc107;
    border-right-color: rgba(255, 193, 7, 0.2);
    animation-duration: 1.4s;
}

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

.iframe-loading-icon {
    position: relative;
    z-index: 1;
    font-size: 18px;
    color: #053861;
    animation: iframe-icon-pulse 2s ease-in-out infinite;
}

@keyframes iframe-icon-pulse {
    0%, 100% { opacity: 1;   transform: scale(1);    }
    50%       { opacity: 0.6; transform: scale(0.92); }
}

/* Card text */
.iframe-loading-title {
    font-size: 16px;
    font-weight: 700;
    color: #053861;
    letter-spacing: 0.01em;
    margin-bottom: 6px;
}

.iframe-loading-text {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Progress bar */
.iframe-loading-bar {
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 99px;
    overflow: hidden;
}

.iframe-loading-bar-fill {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #053861 0%, #4286bd 50%, #ffc107 100%);
    background-size: 200% 100%;
    animation: iframe-bar-slide 1.6s ease-in-out infinite;
}

@keyframes iframe-bar-slide {
    0%   { background-position: 200% 0; width: 30%;  }
    50%  { background-position: 0%   0; width: 70%;  }
    100% { background-position: 200% 0; width: 30%;  }
}

.fancybox-slide .iframe-error-state {
    max-width: 680px;
    margin: 20px auto;
    padding: 18px;
    border: 1px solid #e0b4b4;
    background: #fff4f4;
    border-radius: 8px;
    color: #6d1f1f;
}

.fancybox-slide .iframe-error-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.fancybox-slide .iframe-error-text {
    font-size: 14px;
    line-height: 1.4;
}

.fancybox-slide .iframe-error-actions {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.fancybox-slide .iframe-open-tab {
    padding-left: 0;
}

@media (max-width: 576px) {
    .fancybox-slide .iframe-error-state {
        margin: 14px;
        padding: 14px;
    }
}

/* Lightweight indicator for navigations (link clicks, form submits)
   happening inside an already-open iframe modal */
.iframe-nav-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 4;
    overflow: hidden;
    background: rgba(5, 56, 97, 0.08);
}

.iframe-nav-progress-bar {
    display: block;
    height: 100%;
    width: 40%;
    border-radius: 0 2px 2px 0;
    background: linear-gradient(90deg, #053861 0%, #4286bd 50%, #ffc107 100%);
    animation: iframe-nav-progress-slide 1.1s ease-in-out infinite;
}

@keyframes iframe-nav-progress-slide {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(250%); }
}

/* ── Inline Iframe Loading States ──────────────────────────────── */
.iframe-wrapper {
    position: relative;
    display: block;
}

.iframe-wrapper--loading .iframe-inline-loading {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(5, 56, 97, 0.07) 0%, rgba(66, 134, 189, 0.1) 100%);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.iframe-wrapper--loaded .iframe-inline-loading {
    display: none;
}

.iframe-inline-loading-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    border-radius: 16px;
    padding: 36px 40px 30px;
    box-shadow: 0 8px 40px rgba(5, 56, 97, 0.18), 0 2px 8px rgba(0,0,0,0.06);
    max-width: 340px;
    width: 90%;
    animation: iframe-card-in 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.iframe-inline-loading-rings {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
}

.iframe-inline-loading-title {
    font-size: 16px;
    font-weight: 700;
    color: #053861;
    letter-spacing: 0.01em;
    margin-bottom: 6px;
}

.iframe-inline-loading-text {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 0;
}

/* ==========================================================================
   Responsive hardening: mobile drawer + tablet/phone layout
   ========================================================================== */

/* The drawer's dimming overlay never takes part in the page grid. AdminLTE only
   positions it while the drawer is open; closed, it was a grid item of its own and took
   a column on the right of short pages (blank band between 500 and 992px). Open, the
   more specific .sidebar-expand-*.sidebar-open rule still places and shows it. */
.app-wrapper > .sidebar-overlay {
    position: fixed;
    inset: 0;
    visibility: hidden;
}

/* The content always sits in the grid's second column. Where the sidebar is a drawer
   (fixed, out of the grid) the content otherwise fell into the first, content-sized
   column and left the wide second one empty. */
.app-wrapper > .app-main-wrapper {
    grid-column: 2;
}

/* Sidebar drawer polish below lg (AdminLTE makes the sidebar position:fixed
   here and supplies the dimming overlay + outside-click close). */
@media (max-width: 991.98px) {
    body.sidebar-open {
        overflow: hidden;
    }

    .frontend-sidebar.app-sidebar {
        /* Above the demo banner (1050); otherwise it covers the drawer top.
           Width is left to AdminLTE so it stays equal to the hide offset
           (margin-left: -var(--lte-sidebar-width)); overriding it would leave a
           strip of the closed drawer on screen. */
        z-index: 1052 !important;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        box-shadow: 0 0 28px rgba(0, 0, 0, 0.3);
    }

    .sidebar-overlay {
        z-index: 1051 !important;
    }

    body:not(.sidebar-open) .frontend-sidebar.app-sidebar {
        box-shadow: none;
    }

    /* Data tables keep their width and scroll inside their own container
       instead of stretching the whole content column (grid/flex blowout). */
    .frontend-shell .app-content
        *:not(table):not(thead):not(tbody):not(tr):not(th):not(td):not(.kv-grid-table):not(.dropdown-menu):not(.modal) {
        min-width: 0;
    }

    .frontend-shell .table-responsive,
    .frontend-shell .kv-grid-container,
    .frontend-shell .grid-view {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    /* Header dropdowns (notifications, account/Logout) drop as a full-width
       sheet under the header instead of running off the icon's edge. */
    .frontend-topbar .nav-item.dropdown {
        position: static;
    }

    .frontend-topbar .dropdown-menu.show {
        position: absolute !important;
        inset: auto !important;
        top: 100% !important;
        left: 0.5rem !important;
        right: 0.5rem !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        transform: none !important;
    }

    .frontend-topbar .dropdown-menu.show .dropdown-item {
        white-space: normal;
    }
}

/* Close button inside the drawer (hidden on lg and up) */
.frontend-sidebar-close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 5;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 0.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.frontend-sidebar-close:hover,
.frontend-sidebar-close:focus {
    background: rgba(255, 255, 255, 0.22);
}

/* Prevent any element from forcing horizontal page scroll on phones */
@media (max-width: 767.98px) {
    .frontend-main.app-main {
        overflow-wrap: break-word;
    }

    .frontend-shell img,
    .frontend-shell video,
    .frontend-shell canvas {
        max-width: 100%;
        height: auto;
    }
}

/* ============================================================
   Process stage view — flatter surfaces, small-screen layout
   ------------------------------------------------------------
   The stage view used to stack four bordered boxes inside one
   another: the main shell card, a step panel per block, a card
   per accordion section and a bordered grid inside a field
   value. Below the main shell everything is now separated by an
   inset hairline and whitespace instead of its own frame, so the
   page reads as one surface.
   ============================================================ */

.process-view-shell {
    gap: 0;
}

/* Every step panel already sits inside the main shell card, so its
   own frame is the second one around the same content. */
.process-main-body .process-step-panel {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 1.15rem 0;
}

.process-main-body .process-step-panel:first-child {
    padding-top: 0;
}

.process-main-body .process-step-panel:last-child {
    padding-bottom: 0;
}

.process-main-body .process-step-panel + .process-step-panel {
    border-top: 1px solid rgba(12, 32, 67, 0.08);
}

/* The status banner already carries its state in the pill badge{
    background: transparent;
}

/* Accordion: one flush list instead of a card per section. */
.process-view-shell .process-view-accordion {
    gap: 0;
    border-top: 1px solid rgba(12, 32, 67, 0.08);
}

.process-view-shell .process-view-accordion-item,
.process-view-shell .process-view-accordion-item:first-child {
    border: 0;
    border-bottom: 1px solid rgba(12, 32, 67, 0.08);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.process-view-shell .process-view-accordion-item:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(12, 32, 67, 0.08);
}

.process-view-shell .process-view-accordion .accordion-button {
    padding-left: 0;
    padding-right: 0;
    background: transparent;
}

.process-view-shell .process-view-accordion .accordion-button:hover {
    background: transparent;
}

.process-view-shell .process-view-accordion .accordion-button:not(.collapsed),
.process-view-shell .process-view-accordion .accordion-item .accordion-button:not(.collapsed),
.process-view-shell .process-view-accordion .accordion-header .accordion-button:not(.collapsed) {
    background: transparent !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

.process-view-shell .process-view-accordion-body {
    padding: 0 0 1rem;
    background: transparent;
}

/* Field list: stripes and whitespace carry the rows, not borders. */
.process-view-accordion-body > .table {
    margin-bottom: 0;
}

.process-view-accordion-body > .table > tbody > tr > td,
.process-view-accordion-body > .table > tr > td {
    border-bottom-width: 0;
    vertical-align: top;
}

/* Without this the value column collapses to its shrink-to-fit
   width and a grid nested in a field is squeezed into a sliver. */
.process-view-accordion-body .value {
    flex: 1 1 auto;
    min-width: 0;
}

/* A grid nested inside a field value (or a summary row) is a list,
   not a table of its own — drop its frame and keep row separators. */
.process-view-accordion-body .value .grid-view,
.process-view-accordion-body .value .kv-grid-container,
.process-summary-value .grid-view,
.process-summary-value .kv-grid-container {
    border: 0;
}

.process-view-accordion-body .value .kv-grid-table,
.process-view-accordion-body .value .kv-grid-table.table-bordered > :not(caption) > * > *,
.process-summary-value .kv-grid-table,
.process-summary-value .kv-grid-table.table-bordered > :not(caption) > * > * {
    border-width: 0 0 1px;
}

.process-view-accordion-body .value .kv-grid-table > tbody > tr:last-child > td,
.process-summary-value .kv-grid-table > tbody > tr:last-child > td {
    border-bottom-width: 0;
}

.process-view-accordion-body .value .kv-grid-table > tbody > tr > td,
.process-summary-value .kv-grid-table > tbody > tr > td {
    padding: 0.35rem 0;
}

@media (max-width: 767.98px) {
    /* A 4/12 label column is ~100px on a phone, which breaks words
       mid-syllable ("Manufact urer"). Stack instead. */
    .process-view-accordion-body > .table tr.row {
        display: block;
        padding: 0.45rem 0;
    }

    .process-view-accordion-body > .table tr.row > td,
    .process-view-accordion-body > .table tr.row > td.field-label {
        display: block;
        width: 100%;
        max-width: 100%;
        flex: none;
        text-align: left !important;
        padding-left: 0.55rem;
        padding-right: 0.55rem;
    }

    .process-view-accordion-body > .table tr.row > td.field-label {
        padding-bottom: 0.1rem;
    }

    .process-view-accordion-body > .table tr.row > td.field-label strong {
        font-size: 0.74rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #6b8098;
    }
}

/* Stepper: wrap onto extra rows rather than hiding stages behind a
   4px scrollbar with the carousel's own controls suppressed. */
@media (max-width: 991.98px) {
    .process-widget .carousel-inner {
        flex-wrap: wrap;
        justify-content: flex-start;
        width: auto;
        row-gap: 0.25rem;
    }

    .process-widget .carousel-item {
        flex: 0 0 auto;
        width: auto; /* Bootstrap's width:100% would claim a whole row */
        min-width: max-content;
    }

    .process-widget .md-step {
        padding: 0.3rem 0.6rem;
    }
}

/* The stepper card already has a frame; its inner info-box added a
   second one a few pixels inside it. */
.process-nav-shell > .process-widget.info-box {
    border: 0;
    border-radius: 0;
    padding: 0 !important; /* the widget's p-2 is !important */
    min-height: 0;         /* AdminLTE info-box: 80px */
    margin-bottom: 0;      /* AdminLTE info-box: 1rem */
    box-shadow: none;
}

/* Below xl the two columns are already full width, so g-4's -12px
   side margins only push the row past the 9.6px main padding. */
@media (max-width: 1199.98px) {
    .process-content {
        --bs-gutter-x: 0;
    }
}

/* Bootstrap's .row sits on the field <tr>, so its -12px side margins
   used to be soaked up by the accordion body padding. The body is
   flush now, so cancel them instead of letting rows hang outside. */
.process-view-accordion-body > .table tr.row {
    --bs-gutter-x: 0;
    margin-left: 0;
    margin-right: 0;
}

/* Hide the stage action bar when the widget renders nothing, rather
   than leaving an empty 30px band under the header. A notice is
   something: why the stage was returned, what it waits for, its
   instructions all come as a note (or an alert) with no button in it, and so is
   the step's page heading. */
.process-action-bar:not(:has(a, button, input, select, textarea, .btn, .alert, .stage-task-notes, .process-page-heading)) {
    display: none;
}

/* A grid nested in a field value is a one-column list. Kartik's
   under-480px mode restyles it as stacked 2em centred blocks, which
   turns two short strings into two full-width slabs. */
@media (max-width: 480px) {
    .process-view-accordion-body .value .kv-table-wrap th,
    .process-view-accordion-body .value .kv-table-wrap td,
    .process-view-accordion-body .value .kv-table-wrap tr > td:first-child,
    .process-summary-value .kv-table-wrap th,
    .process-summary-value .kv-table-wrap td,
    .process-summary-value .kv-table-wrap tr > td:first-child {
        display: table-cell;
        text-align: left;
        font-size: 1em;
        margin-top: 0;
        border-top: 0;
    }
}

/* A two-column head squeezes the description into a 3-word column on
   a phone; stack the meta under the title instead. */
@media (max-width: 767.98px) {
    .process-main-body .process-step-head {
        flex-direction: column;
        align-items: stretch;
        gap: 0.55rem;
    }

    .process-main-body .process-step-head .process-view-progress,
    .process-main-body .process-step-head .process-form-progress {
        justify-content: flex-start;
    }
}

/* ============================================================
   Payment invoice view — flatter surfaces, small-screen table
   ------------------------------------------------------------
   The detail shell is already a card, so the three snapshot cards
   and three panels inside it drew six more frames a few pixels in
   from its edge. They are now sections of the one card, split by
   hairlines: vertical between side-by-side blocks, horizontal
   once those blocks stack.
   ============================================================ */

.payment-detail-shell .payment-snapshot-card,
.payment-detail-shell .payment-panel {
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

.payment-detail-shell .payment-snapshot-card {
    padding: 0;
}

.payment-detail-shell .payment-panel-head {
    padding: 0 0 0.75rem;
    border-bottom: 0;
    background: transparent;
}

.payment-detail-shell .payment-panel-body {
    padding: 0;
}

.payment-detail-shell .payment-snapshot-grid {
    gap: 0;
    padding-bottom: 1.15rem;
    margin-bottom: 1.15rem;
    border-bottom: 1px solid #e6edf6;
}

.payment-detail-shell .payment-detail-row {
    padding-bottom: 1.15rem;
    margin-bottom: 1.15rem;
    border-bottom: 1px solid #e6edf6;
}

/* Side by side: a rule between the columns. The .g-4 gutter puts it
   midway between the two blocks. */
@media (min-width: 992px) {
    .payment-snapshot-grid > .payment-snapshot-card + .payment-snapshot-card {
        padding-left: 1.5rem;
        border-left: 1px solid #e6edf6;
    }

    .payment-snapshot-grid > .payment-snapshot-card:not(:last-child) {
        padding-right: 1.5rem;
    }

    .payment-detail-row > .col-lg-6 + .col-lg-6 {
        border-left: 1px solid #e6edf6;
    }
}

/* Stacked: the same split, turned horizontal. */
@media (max-width: 991.98px) {
    .payment-snapshot-grid > .payment-snapshot-card + .payment-snapshot-card,
    .payment-detail-row > .col-lg-6 + .col-lg-6 {
        padding-top: 0.9rem;
        margin-top: 0.9rem;
        border-top: 1px solid #eef3f9;
    }
}

/* The breakdown was 373px wide in a 335px scroller, so the amount
   column sat permanently clipped ("35,000.0"). Tighten the cells
   enough that it fits without a scrollbar. */
@media (max-width: 575.98px) {
    .payment-table {
        font-size: 0.85rem;
    }

    .payment-table > :not(caption) > * > * {
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    .payment-table > :not(caption) > * > *.ps-4 {
        padding-left: 0.5rem !important;
    }

    .payment-table > :not(caption) > * > *.pe-4 {
        padding-right: 0.5rem !important;
    }
}

/* The invoice header's action row renders even with nothing in it,
   leaving dead space under the contact line. */
.payment-header .row.margin-bottom:not(:has(a, button)) {
    display: none;
}

/* .pull-left / .pull-right are Bootstrap 3 classes and do nothing
   here, so the actions stacked instead of splitting left/right.
   The row is also a flex item of .workspace-header-main, where
   space-between squeezed it to 126px and wrapped the button label. */
.payment-header .row.margin-bottom {
    flex: 0 0 auto;
    margin-left: 0;
    margin-right: 0;
}

.payment-header .row.margin-bottom > [class*='col-'] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    width: auto;
    padding-left: 0;
    padding-right: 0;
}

.payment-header .row.margin-bottom .btn {
    white-space: nowrap;
}

.payment-header .row.margin-bottom .pull-left,
.payment-header .row.margin-bottom .pull-right {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.payment-header .row.margin-bottom .pull-right {
    margin-left: auto;
}

/* ============================================================
   Document view — one card, sections split by hairlines
   ------------------------------------------------------------
   The shell card held a bordered stepper box, a bordered tab
   pane, and inside that two more bordered panels with tinted
   heads: four frames around one document. Everything below the
   shell card is now separated by hairlines and whitespace.
   ============================================================ */

.document-nav-row {
    background: transparent;
    padding-bottom: 0.35rem;
}

.document-nav-row .process-widget.info-box {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.document-tabs-row .app-tabs-widget:not(.process-form-tabs) .tab-content {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.document-tabs-row .app-tabs-widget:not(.process-form-tabs) .tab-content::before {
    display: none;
}

/* Tabs as an underlined row rather than a bordered box. The
   app-tabs-widget class sits on the <ul> itself, so these selectors
   name it there and are specific enough to beat the widget's own. */
.document-tabs-row .tabs-x ul.app-tabs-widget.nav-tabs {
    gap: 0.25rem;
    margin: 0 0 1rem;
    padding: 0;
    border-bottom: 1px solid #e6edf6;
}

.document-tabs-row .tabs-x ul.app-tabs-widget.nav-tabs > .nav-item > .nav-link {
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
    margin-bottom: -1px;
    padding: 0.6rem 0.9rem;
}

.document-tabs-row .tabs-x ul.app-tabs-widget.nav-tabs > .nav-item > .nav-link.active {
    border-bottom-color: #1d70b8;
    color: #143552;
}

.document-tabs-row .tab-content > .tab-pane {
    padding: 0;
}

/* Empty action row leaves a dead band above the panels. */
.document-overview-actions-main:not(:has(*)),
.document-overview-actions-main:not(:has(a, .alert)) {
    display: none;
}

.document-overview-actions:not(:has(a, .alert)) {
    display: none;
}

.document-overview-actions-side {
    margin-left: auto;
}

/* Panels lose their frames and tinted heads. */
.document-summary-panel,
.document-preview-panel {
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

.document-panel-head {
    padding: 0 0 0.75rem;
    border-bottom: 0;
    background: transparent;
}

.document-panel-body,
.document-preview-body {
    padding: 0;
}

/* Details | preview: a vertical rule between the columns. */
@media (min-width: 992px) {
    .document-overview-details {
        padding-right: 1.5rem;
    }

    .document-overview-preview {
        padding-left: 1.5rem;
        border-left: 1px solid #e6edf6;
    }
}

@media (max-width: 991.98px) {
    .document-overview-preview {
        margin-top: 1.25rem;
        padding-top: 1.25rem;
        border-top: 1px solid #e6edf6;
    }
}

/* Details: label over value. A right-aligned 20% label column left
   the value ~150px wide, clipping the document number. */
.document-summary-panel .detail-view,
.document-summary-panel .detail-view tbody,
.document-summary-panel .detail-view tr,
.document-summary-panel .detail-view th,
.document-summary-panel .detail-view td {
    display: block;
    width: auto !important;
}

.document-summary-panel .detail-view {
    margin: 0;
    --bs-table-striped-bg: transparent;
}

.document-summary-panel .detail-view tr {
    padding: 0.55rem 0;
    border-bottom: 1px solid #eef3f9;
}

.document-summary-panel .detail-view tr:last-child {
    border-bottom: 0;
}

.document-summary-panel .detail-view th,
.document-summary-panel .detail-view td {
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left !important;
}

.document-summary-panel .detail-view th {
    margin-bottom: 0.1rem;
    color: #71849b;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.document-summary-panel .detail-view td {
    color: #18324c;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* ==========================================================
   Frontend shell (topbar, footer, content shell)
   ----------------------------------------------------------
   Moved verbatim from an inline registerCss() in
   frontend/views/layouts/base.php so the browser can cache it
   instead of receiving ~13 KB again with every page. It stays at
   the END of this file on purpose: it used to be emitted after
   the linked stylesheets, and same-specificity rules here rely
   on winning by source order.
   ========================================================== */
.frontend-topbar {
    border-bottom: 1px solid #dbe5ef;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    min-height: 4.4rem;
}
.frontend-topbar .container-fluid {
    gap: 1rem;
}
.frontend-topbar-left,
.frontend-topbar-right {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.frontend-topbar-left {
    min-width: 0;
}
.frontend-topbar-toggle {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .8rem;
    color: #234d72;
    transition: background-color .2s ease, color .2s ease;
}
.frontend-topbar-toggle:hover,
.frontend-topbar-toggle:focus {
    background: #edf4fb;
    color: #15344f;
}
.frontend-topbar-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .8rem;
    text-decoration: none;
    color: inherit;
}
.frontend-topbar-brand:hover {
    color: inherit;
}
.frontend-topbar-brand-logo {
    width: 2.6rem;
    height: 2.6rem;
    object-fit: contain;
    border-radius: .75rem;
    background: #f4f8fc;
    padding: .3rem;
    box-shadow: inset 0 0 0 1px #d8e5f0;
}
.frontend-topbar-brand-text {
    min-width: 0;
}
.frontend-topbar-brand-title {
    display: block;
    color: #173f65;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.frontend-topbar-brand-subtitle {
    display: block;
    color: #6b8098;
    font-size: .77rem;
    font-weight: 600;
    letter-spacing: .02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.frontend-topbar-icon {
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .8rem;
    color: #234d72;
    transition: background-color .2s ease, color .2s ease;
}
.frontend-topbar-icon:hover,
.frontend-topbar-icon:focus {
    background: #edf4fb;
    color: #15344f;
}
.frontend-topbar-user {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    padding: .4rem .5rem .4rem .85rem;
    border: 1px solid #dce7f1;
    border-radius: 999px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 .35rem .9rem rgba(21, 52, 79, .06);
}
.frontend-topbar-user:hover,
.frontend-topbar-user:focus {
    color: inherit;
    background: #f9fbfd;
}
.frontend-topbar-user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.1;
}
.frontend-topbar-user-label {
    color: #7a8ea6;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: .18rem;
}
.frontend-topbar-user-name {
    max-width: 12rem;
    color: #173f65;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.frontend-topbar-user-avatar {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eaf2fb;
    color: #1d5f96;
    font-weight: 700;
    font-size: .9rem;
}
.frontend-topbar-menu {
    min-width: 15rem;
    border: 1px solid #dbe5ef;
    box-shadow: 0 .8rem 2rem rgba(15, 42, 66, .12);
    border-radius: .9rem;
    padding: .45rem;
}
.frontend-topbar-menu .dropdown-item {
    border-radius: .6rem;
    padding: .6rem .75rem;
}
.frontend-sidebar .sidebar-brand {
    height: auto;
    min-height: 0;
    border-bottom: 0;
    overflow: visible;
    background: transparent;
}
.frontend-sidebar .sidebar-wrapper {
    margin-top: .35rem;
    padding-top: 0;
}
.frontend-sidebar-summary {
    position: relative;
    padding: .95rem 1rem;
    margin: .85rem .85rem .45rem;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: .95rem;
    background: rgba(255, 255, 255, .04);
}
.frontend-sidebar-summary::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, 0));
    pointer-events: none;
}
.frontend-sidebar-summary > * {
    position: relative;
    z-index: 1;
}
/* The theme's brand area keeps text on one line; a long entity name wraps here instead
   of stretching the box past the side of the menu. */
.frontend-sidebar .sidebar-brand > .frontend-sidebar-summary {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
}
.frontend-sidebar-summary-label {
    color: rgba(226, 236, 247, .72);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: .7rem;
}
.frontend-sidebar-summary-main {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: .75rem;
    min-width: 0;
}
.frontend-sidebar-summary-content {
    min-width: 0;
    flex: 1 1 auto;
}
.frontend-sidebar-summary-avatar {
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .8rem;
    background: rgba(255, 255, 255, .12);
    color: #ffffff;
    font-size: .95rem;
    font-weight: 700;
}
.frontend-sidebar-summary-user {
    color: #f7fbff;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: .2rem;
    word-break: break-word;
}
.frontend-sidebar-summary-entity {
    color: rgba(228, 237, 246, .8);
    font-size: .8rem;
    line-height: 1.4;
    word-break: break-word;
}
.frontend-sidebar-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.frontend-sidebar-summary-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .28rem .58rem;
    background: rgba(255, 255, 255, .1);
    color: #dce9f5;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.frontend-sidebar {
    --lte-sidebar-width: 17.5rem;
    background: linear-gradient(180deg, #15344f 0%, #10293f 100%);
    border-right: 1px solid rgba(255, 255, 255, .06);
}
.frontend-sidebar .sidebar-wrapper {
    padding-bottom: 1.1rem;
}
.frontend-sidebar .sidebar-menu {
    gap: .18rem;
    padding: .15rem .55rem 1rem;
}
.frontend-sidebar .sidebar-menu > .nav-item {
    margin: 0;
}
.frontend-sidebar .sidebar-menu > .frontend-sidebar-section {
    margin-top: 1.1rem;
}
.frontend-sidebar .sidebar-menu > .frontend-sidebar-section:first-child {
    margin-top: .15rem;
}
.frontend-sidebar .sidebar-menu > .frontend-sidebar-section:not(:first-child) .frontend-sidebar-section-label {
    border-top: 1px solid rgba(255, 255, 255, .07);
    padding-top: .7rem;
    margin-top: -.15rem;
}
.frontend-sidebar-section-label {
    display: block;
    padding: .28rem .9rem;
    color: rgba(220, 232, 244, .72);
    font-size: .63rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.frontend-sidebar .nav-link {
    min-height: 2.95rem;
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 0;
    padding: .7rem .85rem;
    border-radius: .95rem;
    color: rgba(231, 239, 248, .86);
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.frontend-sidebar .nav-link:hover,
.frontend-sidebar .nav-link:focus {
    background: rgba(255, 255, 255, .07);
    color: #ffffff;
}
.frontend-sidebar .nav-link .nav-icon {
    width: 1.2rem;
    min-width: 1.2rem;
    margin: 0;
    font-size: 1rem;
    text-align: center;
    color: rgba(201, 219, 236, .86);
    transition: color .18s ease;
}
.frontend-sidebar .nav-link p {
    display: flex;
    align-items: center;
    gap: .55rem;
    width: 100%;
    margin: 0;
    min-width: 0;
    padding-right: .25rem;
    color: inherit;
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}
.frontend-sidebar .nav-link p > span:not(.pull-right-container),
.frontend-sidebar .nav-link p {
    word-break: break-word;
    overflow-wrap: anywhere;
}
.frontend-sidebar .nav-link .nav-arrow {
    margin-left: auto;
    flex: 0 0 1rem;
    width: 1rem;
    text-align: center;
    font-size: .78rem;
    opacity: .75;
    transition: transform .18s ease, opacity .18s ease;
}
.frontend-sidebar .menu-open > .nav-link {
    background: rgba(255, 255, 255, .07);
    color: #ffffff;
}
.frontend-sidebar .menu-open > .nav-link .nav-arrow {
    transform: rotate(90deg);
    opacity: 1;
}
.frontend-sidebar .nav-item > .nav-link.active {
    background: linear-gradient(135deg, rgba(255, 255, 255, .14), rgba(129, 184, 235, .18));
    color: #ffffff;
    box-shadow: inset 3px 0 0 rgba(138, 202, 252, .85), inset 0 0 0 1px rgba(164, 207, 244, .22), 0 .45rem 1rem rgba(6, 18, 30, .2);
}
.frontend-sidebar .nav-item > .nav-link.active .nav-icon {
    color: #8acafb;
}
.frontend-sidebar .menu-open > .nav-link .nav-icon,
.frontend-sidebar .nav-link:hover .nav-icon,
.frontend-sidebar .nav-link:focus .nav-icon {
    color: #ffffff;
}
.frontend-sidebar .nav-treeview {
    margin: .18rem 0 .35rem;
    padding: .2rem 0 0 2.25rem;
}
.frontend-sidebar .nav-treeview > .nav-item {
    margin: .08rem 0;
}
.frontend-sidebar .nav-treeview > .nav-item > .nav-link {
    min-height: 2.4rem;
    padding: .52rem .75rem;
    border-radius: .8rem;
    background: rgba(255, 255, 255, .025);
    color: rgba(219, 231, 243, .76);
}
.frontend-sidebar .nav-treeview > .nav-item > .nav-link .nav-icon {
    width: .55rem;
    min-width: .55rem;
    font-size: .42rem;
    color: rgba(177, 199, 221, .85);
}
.frontend-sidebar .nav-treeview > .nav-item > .nav-link.active {
    background: rgba(142, 197, 247, .18);
    box-shadow: inset 0 0 0 1px rgba(164, 207, 244, .18);
}
.frontend-sidebar .nav-badge.badge {
    margin-left: auto;
    background: rgba(255, 255, 255, .14) !important;
    color: #ffffff;
    box-shadow: none;
}

.frontend-sidebar .nav-link .pull-right-container {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 1rem;
}
.frontend-sidebar .sidebar-wrapper::-webkit-scrollbar {
    width: .55rem;
}
.frontend-sidebar .sidebar-wrapper::-webkit-scrollbar-thumb {
    background: rgba(191, 213, 235, .28);
    border-radius: 999px;
}
.frontend-sidebar .sidebar-wrapper::-webkit-scrollbar-track {
    background: transparent;
}
body.sidebar-mini.sidebar-collapse .frontend-sidebar {
    --lte-sidebar-width: 4.6rem;
}
body.sidebar-mini.sidebar-collapse .frontend-sidebar-summary {
    margin: .75rem .55rem .35rem;
    padding: .6rem;
}
body.sidebar-mini.sidebar-collapse .frontend-sidebar-summary-label,
body.sidebar-mini.sidebar-collapse .frontend-sidebar-summary-content,
body.sidebar-mini.sidebar-collapse .frontend-sidebar-summary-meta,
body.sidebar-mini.sidebar-collapse .frontend-sidebar-section-label {
    display: none;
}
body.sidebar-mini.sidebar-collapse .frontend-sidebar-summary-main {
    justify-content: center;
    margin-bottom: 0;
}
body.sidebar-mini.sidebar-collapse .frontend-sidebar-summary-avatar {
    margin: 0;
}
body.sidebar-mini.sidebar-collapse .frontend-sidebar .sidebar-menu {
    padding-left: .45rem;
    padding-right: .45rem;
}
body.sidebar-mini.sidebar-collapse .frontend-sidebar .nav-link {
    justify-content: center;
    padding-left: .7rem;
    padding-right: .7rem;
}
body.sidebar-mini.sidebar-collapse .frontend-sidebar .nav-link .nav-icon {
    margin-right: 0;
}
@media (max-width: 991.98px) {
    .frontend-sidebar {
        --lte-sidebar-width: 16.4rem;
    }
    .frontend-sidebar-summary {
        margin-left: .7rem;
        margin-right: .7rem;
    }
}
.frontend-footer {
    border-top: 1px solid #dbe5ef;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 1rem 1.25rem;
}
.frontend-footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .75rem 1rem;
}
.frontend-footer-label {
    color: #7b8ea5;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: .18rem;
}
.frontend-footer-brand {
    color: #173f65;
    font-weight: 800;
}
.frontend-footer-copy {
    color: #5f7690;
    font-size: .82rem;
    margin-top: .18rem;
}
.frontend-footer-meta-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .28rem;
}
.frontend-footer-meta-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .28rem .68rem;
    background: #eef5ff;
    border: 1px solid #d7e5f4;
    color: #355374;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.frontend-footer-meta {
    color: #6f859d;
    font-size: .78rem;
}
.app-content-shell {
    padding-top: .35rem;
}
@media (max-width: 767.98px) {
    .frontend-topbar-brand-subtitle,
    .frontend-topbar-user-label {
        display: none;
    }
    .frontend-topbar-user-name {
        max-width: 6.5rem;
    }
    .frontend-footer-meta-wrap {
        align-items: flex-start;
    }
    .frontend-topbar .container-fluid {
        padding-left: .55rem;
        padding-right: .55rem;
    }
    .frontend-sidebar-summary {
        margin: .55rem .55rem .2rem;
        padding: .75rem;
    }
}

/* Process hierarchy (ProcessHierarchyWidget): the instances an instance came from, each step set in under the one it came from */
.process-hierarchy {
    margin: 1rem 0;
}

.process-hierarchy-trail {
    margin: 0;
    padding: 0;
    list-style: none;
}

.process-hierarchy-step {
    position: relative;
    margin-left: calc(var(--hierarchy-level, 0) * 1.5rem);
}

.process-hierarchy-step + .process-hierarchy-step::before {
    content: "";
    position: absolute;
    top: -0.7rem;
    left: -0.9rem;
    width: 0.9rem;
    height: 2.3rem;
    border-left: 2px solid #ced4da;
    border-bottom: 2px solid #ced4da;
    border-bottom-left-radius: 0.5rem;
}

.process-hierarchy-step .process-view-accordion-copy {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
    text-align: left;
}

.process-hierarchy-reference {
    margin-left: 0.25rem;
    color: #6c757d;
    font-weight: 400;
    white-space: nowrap;
}

.process-hierarchy-origin {
    color: #6c757d;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.35;
}

.process-hierarchy-current {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.875rem 1.25rem;
    color: #18365a;
}

.process-hierarchy-step .process-view-accordion-item {
    border-top: 1px solid #e9ecef;
}

.process-hierarchy-step.is-current .process-view-accordion-item {
    border-color: #18365a;
    background: #f4f7fb;
}

.process-hierarchy-step.is-current .process-view-accordion-badge {
    background: #18365a;
    color: #fff;
}

.process-hierarchy-here {
    margin-left: auto;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: #18365a;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

/* A select box never grows past its field: a long chosen value is cut short with "…"
   instead of pushing the form off the screen. */
.select2-container {
    max-width: 100%;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Grid and flex children grow to fit their widest content unless told otherwise; these
   hold the application form, so let them shrink to the screen and keep long values inside. */
.process-form-fields,
.process-content > .col-12,
.process-layout-shell {
    min-width: 0;
}

/* Inspection stage: what the work is about in one line, then the work itself */
.inspection-panel.inspection-work {
    padding: 0;
}

.inspection-context {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 24px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

.inspection-context-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.inspection-context-item.is-main {
    flex: 1 1 320px;
}

.inspection-context-label {
    flex: none;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.inspection-context-value {
    color: #1e293b;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.inspection-context-chip {
    padding: 1px 10px;
    border-radius: 999px;
    background: #eef2f6;
    color: #33506f;
    font-size: 12px;
    font-weight: 700;
}

.inspection-context-chip.is-pass {
    background: #ecfdf3;
    color: #067647;
}

.inspection-context-chip.is-fail {
    background: #fef3f2;
    color: #b42318;
}

.inspection-report-block {
    margin-bottom: 14px;
}

.inspection-report-block > .inspection-context-label {
    margin-bottom: 4px;
}

.inspection-report-files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* the results as a report shows them, on a page: headings the size of the page's own section titles */
.inspection-shell .standard-instance-heading {
    font-size: 15px;
    letter-spacing: .01em;
}

/* Signature stage: the line above the document */
.signature-context-muted {
    color: #64748b;
    font-weight: 400;
}

.signature-context-comment {
    flex: 1 1 100%;
}
