/* WOW unified responsive theme
   Extends the Admin executive design system across role and authentication pages. */

:root {
    color-scheme: light;
    --wow-touch-target: 44px;
    --wow-content-max: 1800px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    scrollbar-gutter: stable;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.wow-role-shell,
body.wow-auth-shell {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-x: clip;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(circle at 10% 10%, rgba(146, 86, 160, .10), transparent 26%),
        radial-gradient(circle at 92% 9%, rgba(94, 168, 198, .08), transparent 22%),
        radial-gradient(circle at 84% 84%, rgba(212, 98, 127, .05), transparent 18%),
        linear-gradient(180deg, var(--wow-bg-3) 0%, var(--wow-bg) 52%, var(--wow-bg-2) 100%);
    color: var(--wow-text);
}

body.wow-role-shell {
    padding-top: calc(var(--topbar-height) + env(safe-area-inset-top, 0px));
}

body.wow-role-shell::before,
body.wow-auth-shell::before {
    position: fixed;
}

body.wow-role-shell > .container-fluid,
body.wow-role-shell > main,
body.wow-role-shell > footer,
body.wow-auth-shell > nav,
body.wow-auth-shell > main,
body.wow-auth-shell > footer {
    position: relative;
    z-index: 1;
}

.wow-role-shell .container-fluid > .row.g-0 {
    width: 100%;
    margin: 0;
}

.wow-role-shell .wow-role-main,
.wow-role-shell .row.g-0 > .col-12.col-lg-10 {
    min-width: 0;
    width: 100%;
    max-width: var(--wow-content-max);
    margin-inline: auto;
    padding: clamp(1rem, 1.5vw, 1.65rem) clamp(.85rem, 1.7vw, 1.85rem) !important;
}

.wow-role-shell .wow-sidebar-wrap + .wow-role-main,
.wow-role-shell .wow-sidebar-wrap + .col-12.col-lg-10 {
    margin-left: 0;
}

.wow-role-topbar .wow-admin-account {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.wow-role-topbar .wow-admin-sidebar-toggle,
.wow-role-topbar .wow-admin-icon-btn,
.wow-role-topbar .wow-admin-account {
    min-width: var(--wow-touch-target);
    min-height: var(--wow-touch-target);
}

.wow-role-topbar .wow-admin-profile-item:is(button) {
    width: 100%;
    appearance: none;
    border: 0;
    font: inherit;
    text-align: left;
}

.wow-role-shell h1,
.wow-role-shell h2,
.wow-role-shell h3,
.wow-role-shell h4,
.wow-role-shell h5,
.wow-role-shell h6 {
    color: var(--wow-ink);
    letter-spacing: -.025em;
}

.wow-role-shell h2 {
    font-size: var(--fs-hero);
    font-weight: 650;
}

.wow-role-shell .muted,
.wow-role-shell .text-muted {
    color: var(--wow-text-soft) !important;
}

.wow-role-shell .card,
.wow-auth-shell .wow-card {
    isolation: isolate;
}

.wow-role-shell .card {
    min-width: 0;
    overflow: hidden;
}

.wow-role-shell .card > .table-responsive:last-child {
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}

.wow-role-shell .row > [class*="col-"] {
    min-width: 0;
}

.wow-role-shell .btn,
.wow-role-shell button,
.wow-auth-shell .btn,
.wow-auth-shell button,
.wow-role-shell .form-control,
.wow-role-shell .form-select,
.wow-auth-shell .form-control,
.wow-auth-shell .form-select {
    touch-action: manipulation;
}

.wow-role-shell .btn:not(.btn-sm):not(.btn-close):not(.wow-admin-icon-btn),
.wow-auth-shell .btn:not(.btn-sm):not(.btn-close),
.wow-role-shell .form-control,
.wow-role-shell .form-select,
.wow-auth-shell .form-control,
.wow-auth-shell .form-select {
    min-height: var(--wow-touch-target);
}

.wow-role-shell :focus-visible,
.wow-auth-shell :focus-visible {
    outline: 3px solid rgba(146, 86, 160, .28);
    outline-offset: 2px;
}

.wow-role-shell .form-control,
.wow-role-shell .form-select,
.wow-auth-shell .form-control,
.wow-auth-shell .form-select {
    max-width: 100%;
    border-radius: 13px;
}

.wow-role-shell textarea.form-control,
.wow-auth-shell textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

.wow-role-shell .input-group {
    min-width: 0;
    flex-wrap: nowrap;
}

.wow-role-shell .input-group > .form-control,
.wow-role-shell .input-group > .form-select {
    min-width: 0;
}

.wow-role-shell .table-responsive {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.wow-role-shell .table-responsive.wow-can-scroll:not(.wow-at-end)::after {
    content: "";
    position: sticky;
    right: 0;
    display: block;
    float: right;
    width: 22px;
    height: 1px;
    margin-top: -1px;
    box-shadow: -16px 0 24px rgba(31, 41, 55, .16);
    pointer-events: none;
}

.wow-role-shell table {
    width: 100%;
    margin-bottom: 0;
    font-variant-numeric: tabular-nums lining-nums;
}

.wow-role-shell .table-responsive table {
    min-width: 690px;
}

.wow-role-shell td,
.wow-role-shell th {
    vertical-align: middle;
}

.wow-role-shell td:last-child,
.wow-role-shell th:last-child {
    padding-right: 1rem;
}

.wow-role-shell canvas {
    display: block;
    width: 100% !important;
    max-width: 100%;
}

.wow-role-shell .modal-dialog {
    max-width: min(var(--bs-modal-width, 600px), calc(100vw - 2rem));
    margin-inline: auto;
}

.wow-role-shell .modal-content {
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    overflow: hidden;
}

.wow-role-shell .modal-body {
    overflow-y: auto;
    overscroll-behavior: contain;
}

.wow-role-shell .modal-footer {
    gap: .55rem;
}

.wow-role-shell .alert,
.wow-role-shell .kyc-banner {
    border-radius: 16px;
}

.wow-role-shell .wow-footer {
    margin-top: 1rem !important;
    padding: 1rem clamp(1rem, 3vw, 2rem) calc(1rem + env(safe-area-inset-bottom, 0px)) !important;
    color: var(--wow-text-soft);
    font-size: .78rem;
}

@media (min-width: 992px) {
    .wow-role-shell > .wow-footer {
        width: 83.33333333%;
        margin-left: 16.66666667% !important;
        margin-right: 0 !important;
    }
}

/* Authentication workspace */
body.wow-auth-shell {
    display: flex;
    flex-direction: column;
    padding-top: 0;
}

.wow-auth-shell::after {
    display: none;
}

.wow-auth-shell .wow-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    min-height: 76px;
    padding-top: max(.72rem, env(safe-area-inset-top, 0px)) !important;
    padding-bottom: .72rem !important;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(252, 251, 254, .92);
    box-shadow: 0 12px 34px rgba(31, 41, 55, .06);
    -webkit-backdrop-filter: saturate(140%) blur(16px);
    backdrop-filter: saturate(140%) blur(16px);
}

.wow-auth-shell .wow-navbar .container-fluid {
    width: min(100%, 1440px);
    margin-inline: auto;
    padding-inline: clamp(1rem, 3vw, 2.5rem) !important;
}

.wow-auth-shell .brand-lockup {
    min-width: 0;
    gap: .68rem;
}

.wow-auth-shell .auth-brand-mark {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    overflow: visible;
    border: 0;
    border-radius: 15px;
    background: transparent;
    box-shadow: none;
}

.wow-auth-shell .brand-lockup img {
    width: 48px;
    height: 48px;
    max-width: 48px;
    max-height: 48px;
    object-fit: contain;
}

.wow-auth-shell .auth-brand-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.12;
}

.wow-auth-shell .auth-brand-copy strong {
    color: var(--wow-ink);
    font-size: .9rem;
    font-weight: 740;
    letter-spacing: -.02em;
}

.wow-auth-shell .auth-brand-copy small {
    margin-top: .2rem;
    color: var(--wow-text-soft);
    font-size: .66rem;
}

.wow-auth-shell .auth-context-pill {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: .42rem;
    padding: .45rem .72rem;
    border: 1px solid rgba(29, 156, 115, .16);
    border-radius: 999px;
    color: #147859;
    background: rgba(29, 156, 115, .075);
    font-size: .71rem;
    font-weight: 650;
    white-space: nowrap;
}

.wow-auth-shell .auth-context-pill svg {
    width: 15px;
    height: 15px;
}

.wow-auth-shell .landing-link-btn,
.wow-auth-shell .nav-icon,
.wow-auth-shell .mobile-main-site-pill {
    min-width: var(--wow-touch-target);
    min-height: var(--wow-touch-target);
    border: 1px solid rgba(146, 86, 160, .14);
    color: var(--wow-primary-3);
    background: rgba(255, 255, 255, .72);
    box-shadow: var(--shadow-inset), 0 8px 20px rgba(31, 41, 55, .04);
}

.wow-auth-shell .landing-link-btn:hover,
.wow-auth-shell .nav-icon:hover,
.wow-auth-shell .mobile-main-site-pill:hover {
    color: var(--wow-primary-3);
    border-color: rgba(146, 86, 160, .28);
    background: var(--wow-primary-soft);
}

.wow-auth-shell .page-wrap {
    width: 100%;
    max-width: 1440px;
    margin-inline: auto;
    padding: clamp(1.25rem, 4vw, 3.75rem) clamp(.85rem, 3vw, 2.5rem);
    align-items: center;
}

.wow-auth-shell .wow-card {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, .68);
    box-shadow: var(--shadow-soft-lg), var(--shadow-inset);
    -webkit-backdrop-filter: saturate(135%) blur(18px);
    backdrop-filter: saturate(135%) blur(18px);
}

.wow-auth-shell .wow-card.wow-card-login {
    max-width: 560px;
}

.wow-auth-shell .wow-card.wow-card-register {
    max-width: 920px;
}

.wow-auth-shell .card-header-gradient {
    position: relative;
    padding: clamp(1.35rem, 3vw, 2rem) clamp(1.1rem, 3vw, 2rem);
    border-bottom: 1px solid rgba(146, 86, 160, .12);
    background:
        radial-gradient(circle at 92% 18%, rgba(94, 168, 198, .16), transparent 28%),
        linear-gradient(135deg, rgba(146, 86, 160, .14), rgba(255, 255, 255, .42));
    color: var(--wow-ink);
}

.wow-auth-shell .card-header-gradient::after {
    content: "Verified access";
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: .34rem .62rem;
    border: 1px solid rgba(29, 156, 115, .18);
    border-radius: 999px;
    color: #147859;
    background: rgba(29, 156, 115, .09);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.wow-auth-shell .card-header-gradient h1,
.wow-auth-shell .card-header-gradient h2,
.wow-auth-shell .card-header-gradient h3 {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin: 0;
    padding-right: 7.5rem;
    color: var(--wow-ink);
    font-size: clamp(1.35rem, 3vw, 1.78rem);
    font-weight: 650;
    letter-spacing: -.035em;
}

.wow-auth-shell .card-header-gradient svg {
    color: var(--wow-primary);
}

.wow-auth-shell .card-body {
    padding: clamp(1.15rem, 3.4vw, 2rem);
}

.wow-auth-shell .form-label {
    color: var(--wow-ink-2);
    font-size: .8rem;
    font-weight: 650;
}

.wow-auth-shell a.wow-link {
    display: inline-flex;
    min-height: var(--wow-touch-target);
    align-items: center;
    padding-block: .25rem;
}

.wow-auth-shell .auth-security-note {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    margin-bottom: 1.15rem;
    padding: .78rem .86rem;
    border: 1px solid rgba(29, 156, 115, .14);
    border-radius: 14px;
    color: #35695b;
    background: rgba(29, 156, 115, .065);
    font-size: .76rem;
    line-height: 1.45;
}

.wow-auth-shell .auth-security-note svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    margin-top: .08rem;
    color: var(--wow-success);
}

.wow-auth-shell .field-shell,
.wow-auth-shell .password-field {
    position: relative;
}

.wow-auth-shell .toggle-pass {
    min-width: var(--wow-touch-target);
    min-height: var(--wow-touch-target);
}

.wow-auth-shell .form-control,
.wow-auth-shell .form-select {
    border: 1px solid rgba(31, 41, 55, .10);
    background: rgba(255, 255, 255, .82);
    color: var(--wow-ink-2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .58);
}

.wow-auth-shell .form-control:focus,
.wow-auth-shell .form-select:focus {
    border-color: rgba(146, 86, 160, .42);
    background: #fff;
    box-shadow: 0 0 0 .24rem rgba(146, 86, 160, .10);
}

.wow-auth-shell .btn-wow {
    min-height: 50px;
    border: 1px solid rgba(127, 74, 136, .20);
    border-radius: 14px;
    background: linear-gradient(135deg, var(--wow-primary-3), var(--wow-primary-2));
    color: #fff;
    font-weight: 700;
    box-shadow: 0 12px 26px rgba(127, 74, 136, .18);
}

.wow-auth-shell .btn-wow:hover,
.wow-auth-shell .btn-wow:focus {
    color: #fff;
    background: linear-gradient(135deg, #74417d, #9b5ca7);
    box-shadow: 0 16px 32px rgba(127, 74, 136, .23);
    transform: translateY(-1px);
}

.wow-auth-shell .wow-link,
.wow-auth-shell .main-site-link {
    color: var(--wow-primary-3);
    font-weight: 650;
}

.wow-auth-shell .auth-card-home-box {
    border: 1px solid rgba(146, 86, 160, .12);
    border-radius: 16px;
    background: rgba(146, 86, 160, .055);
}

.wow-auth-shell .auth-card-home-icon {
    color: var(--wow-primary);
    background: rgba(255, 255, 255, .72);
}

.wow-auth-shell > footer {
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px)) !important;
    color: var(--wow-text-soft);
    font-size: .76rem;
}

@media (min-width: 992px) {
    .wow-role-shell .wow-sidebar-wrap {
        flex: 0 0 16.66666667%;
        max-width: 16.66666667%;
    }

    .wow-role-shell .row.g-0 > .wow-role-main,
    .wow-role-shell .row.g-0 > .col-12.col-lg-10 {
        flex: 0 0 83.33333333%;
        width: 83.33333333%;
        max-width: 83.33333333%;
        margin-inline: 0;
    }
}

@media (max-width: 1199.98px) {
    .wow-role-topbar .wow-admin-quick-link:nth-child(n+4) {
        display: none;
    }
}

@media (max-width: 991.98px) {
    body.wow-role-shell {
        padding-top: calc(72px + env(safe-area-inset-top, 0px));
    }

    .wow-role-shell .wow-role-main,
    .wow-role-shell .row.g-0 > .col-12.col-lg-10 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .wow-role-topbar .wow-admin-quick-access {
        display: none;
    }

    .wow-auth-shell .wow-navbar {
        min-height: 70px;
    }
}

@media (max-width: 767.98px) {
    .wow-role-shell .wow-role-main,
    .wow-role-shell .row.g-0 > .col-12.col-lg-10 {
        padding: .9rem .75rem 1.2rem !important;
    }

    .wow-role-shell .row.g-4 {
        --bs-gutter-x: .85rem;
        --bs-gutter-y: .85rem;
    }

    .wow-role-shell .card {
        border-radius: 18px;
    }

    .wow-role-shell .card.p-4 {
        padding: 1rem !important;
    }

    .wow-role-shell .d-flex.justify-content-between:not(.wow-admin-topbar-inner):not(.wow-admin-account) {
        row-gap: .65rem;
    }

    .wow-role-shell .modal-dialog {
        width: auto;
        max-width: none;
        margin: .5rem;
    }

    .wow-role-shell .modal-content {
        max-height: calc(100dvh - 1rem);
        border-radius: 18px;
    }

    .wow-role-shell .modal-footer {
        flex-direction: column-reverse;
    }

    .wow-role-shell .modal-footer .btn {
        width: 100%;
        margin: 0;
    }

    .wow-auth-shell .wow-navbar .container-fluid {
        padding-inline: .85rem !important;
    }

    .wow-auth-shell .auth-brand-mark {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .wow-auth-shell .brand-lockup img {
        width: 42px;
        height: 42px;
        max-width: 42px;
        max-height: 42px;
    }

    .wow-auth-shell .nav-icons .nav-icon:not(:last-child) {
        display: none;
    }

    .wow-auth-shell .auth-context-pill {
        display: none;
    }

    .wow-auth-shell .page-wrap {
        align-items: flex-start;
        padding: 1rem .7rem 1.4rem;
    }

    .wow-auth-shell .wow-card {
        border-radius: 20px;
    }

    .wow-auth-shell .card-header-gradient::after {
        position: static;
        display: inline-flex;
        margin-top: .85rem;
    }

    .wow-auth-shell .card-header-gradient h1,
    .wow-auth-shell .card-header-gradient h2,
    .wow-auth-shell .card-header-gradient h3 {
        padding-right: 0;
    }
}

@media (max-width: 575.98px) {
    .wow-role-topbar .wow-admin-brand-sub,
    .wow-role-topbar .wow-admin-account-meta,
    .wow-role-topbar .wow-admin-icon-actions {
        display: none;
    }

    .wow-role-topbar .wow-admin-brand-title {
        max-width: 118px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .wow-role-shell .btn-group,
    .wow-role-shell .btn-toolbar {
        max-width: 100%;
        flex-wrap: wrap;
    }

    .wow-role-shell form.d-flex {
        flex-wrap: wrap;
    }

    .wow-role-shell form.d-flex > .form-control,
    .wow-role-shell form.d-flex > .form-select,
    .wow-role-shell form.d-flex > .btn {
        flex: 1 1 100%;
        width: 100%;
    }

    .wow-auth-shell .landing-link-btn {
        display: none;
    }

    .wow-auth-shell .auth-brand-copy small {
        display: none;
    }

    .wow-auth-shell .mobile-main-site-pill {
        display: inline-flex;
    }

    .wow-auth-shell .nav-actions-group {
        gap: .4rem;
    }

    .wow-auth-shell .card-body {
        padding: 1rem;
    }
}

@media (hover: none) and (pointer: coarse) {
    .wow-role-shell .btn:hover,
    .wow-auth-shell .btn:hover,
    .wow-role-shell .card:hover,
    .wow-auth-shell .wow-card:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* =========================================================
   SYSTEM UI CONTRACT — shared by borrower, field and auth views
========================================================= */
body.wow-role-shell,
body.wow-auth-shell {
    --wow-type-xs: .72rem;
    --wow-type-sm: .80rem;
    --wow-type-body: .875rem;
    --wow-type-lead: 1rem;
    --wow-type-h3: clamp(1.05rem, 1.4vw, 1.28rem);
    --wow-type-h2: clamp(1.35rem, 2vw, 1.78rem);
    --wow-type-h1: clamp(1.7rem, 2.8vw, 2.35rem);
    --wow-control-h: 42px;
    font-size: var(--wow-type-body);
}

.wow-role-shell h1 { font-size: var(--wow-type-h1); line-height: 1.12; font-weight: 700; }
.wow-role-shell h2 { font-size: var(--wow-type-h2); line-height: 1.16; font-weight: 650; }
.wow-role-shell h3 { font-size: var(--wow-type-h3); line-height: 1.22; font-weight: 620; }
.wow-role-shell h4,
.wow-role-shell h5,
.wow-role-shell h6 { line-height: 1.28; font-weight: 600; }
.wow-role-shell .small,
.wow-role-shell small,
.wow-role-shell .form-text { font-size: var(--wow-type-sm); line-height: 1.48; }
.wow-role-shell .form-label { margin-bottom: .32rem; color: var(--wow-ink-2); font-size: var(--wow-type-sm); font-weight: 650; }

.wow-role-shell .btn,
.wow-auth-shell .btn {
    min-height: var(--wow-control-h);
    border-radius: 13px;
    font-size: var(--wow-type-sm);
    font-weight: 680;
    letter-spacing: -.005em;
}

.wow-role-shell .btn-sm,
.wow-auth-shell .btn-sm {
    min-height: 36px;
    padding: .42rem .72rem;
    border-radius: 11px;
}

.wow-role-shell .btn-primary,
.wow-role-shell .btn-success,
.wow-role-shell .wow-brand-action,
.wow-auth-shell .btn-primary,
.wow-auth-shell .btn-success {
    border-color: rgba(127, 74, 136, .30) !important;
    background: linear-gradient(135deg, var(--wow-primary-3), var(--wow-primary-2)) !important;
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(127, 74, 136, .16), inset 0 1px 0 rgba(255,255,255,.18);
}

.wow-role-shell .btn-primary:hover,
.wow-role-shell .btn-success:hover,
.wow-role-shell .wow-brand-action:hover,
.wow-auth-shell .btn-primary:hover,
.wow-auth-shell .btn-success:hover {
    border-color: rgba(127, 74, 136, .42) !important;
    background: linear-gradient(135deg, #74417d, #9b5ca7) !important;
    box-shadow: 0 13px 26px rgba(127, 74, 136, .21);
    transform: translateY(-1px);
}

.wow-role-shell .form-control,
.wow-role-shell .form-select,
.wow-auth-shell .form-control,
.wow-auth-shell .form-select {
    min-height: var(--wow-control-h);
    padding: .56rem .75rem;
    border-color: rgba(71, 85, 105, .14);
    border-radius: 12px;
    background-color: rgba(255,255,255,.82);
    font-size: var(--wow-type-sm);
}

.wow-role-shell .form-control:focus,
.wow-role-shell .form-select:focus {
    border-color: rgba(146, 86, 160, .45);
    box-shadow: 0 0 0 .22rem rgba(146, 86, 160, .10);
}

.wow-role-shell .form-control.is-invalid,
.wow-role-shell .form-select.is-invalid,
.wow-auth-shell .form-control.is-invalid,
.wow-auth-shell .form-select.is-invalid {
    border-color: rgba(190, 71, 99, .64);
    box-shadow: 0 0 0 .2rem rgba(190, 71, 99, .08);
}

.wow-role-shell .wow-sidebar a,
.wow-role-shell .wow-sidebar button,
.wow-role-shell .wow-sidebar .sidebar-section-label {
    visibility: visible !important;
    opacity: 1 !important;
}

.wow-role-shell .wow-sidebar .sidebar-nav .nav-nested,
.wow-role-shell .wow-sidebar .sidebar-nav .collapse.show {
    display: grid;
    visibility: visible;
    opacity: 1;
}

.wow-role-shell .table-responsive {
    border-radius: 14px;
    border: 1px solid rgba(71, 85, 105, .08);
    background: rgba(255,255,255,.58);
}

.wow-role-shell .table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(146, 86, 160, .025);
    font-size: var(--wow-type-sm);
}

.wow-role-shell .table thead th {
    color: #62718a;
    background: #f7f3fa;
    font-size: var(--wow-type-xs);
    font-weight: 720;
    letter-spacing: .035em;
    text-transform: uppercase;
    white-space: nowrap;
}

.wow-role-shell .wow-data-table--sticky-first th:first-child,
.wow-role-shell .wow-data-table--sticky-first td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fbf9fc;
    box-shadow: 8px 0 14px rgba(31,41,55,.04);
}

.wow-role-shell .pagination {
    gap: .28rem;
    flex-wrap: wrap;
}

.wow-role-shell .page-link {
    min-width: 36px;
    min-height: 36px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(146, 86, 160, .12);
    border-radius: 10px !important;
    color: var(--wow-primary-3);
    background: rgba(255,255,255,.76);
}

.wow-role-shell .page-item.active .page-link {
    border-color: var(--wow-primary);
    background: var(--wow-primary);
    color: #fff;
}

.wow-role-shell .modal-backdrop.show { opacity: .34; }
.wow-role-shell .modal-content,
.wow-auth-shell .modal-content {
    border: 1px solid rgba(255,255,255,.62);
    border-radius: 20px;
    background: rgba(252,250,253,.97);
    box-shadow: 0 28px 80px rgba(31,41,55,.18), inset 0 1px 0 rgba(255,255,255,.75);
}
.wow-role-shell .modal-header,
.wow-auth-shell .modal-header { border-bottom-color: rgba(146, 86, 160, .10); }
.wow-role-shell .modal-footer,
.wow-auth-shell .modal-footer { justify-content: flex-end; border-top-color: rgba(146, 86, 160, .10); }

.wow-profile-note {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .88rem 1rem;
    border: 1px solid rgba(146, 86, 160, .14);
    border-radius: 14px;
    color: #5e4b68;
    background: linear-gradient(135deg, rgba(146,86,160,.075), rgba(94,168,198,.055));
}
.wow-profile-note svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--wow-primary); margin-top: .08rem; }

.wow-role-shell .chart-container,
.wow-role-shell .chart-canvas-wrap,
.wow-role-shell canvas { max-width: 100%; }

/* =========================================================
   AUTHENTICATED WORKSPACE PARITY
   Keep borrower and field-officer pages on the same visual
   contract as the administrator workspace, including pages
   that still use older Bootstrap utility/component classes.
========================================================= */
.wow-role-shell {
    --wow-purple: var(--wow-primary);
    --wow-pink: var(--wow-danger);
    --neutral-border: rgba(31, 41, 55, .07);
    --text-main: var(--wow-ink);
    --text-muted: var(--wow-text-soft);
}

.wow-role-shell .wow-role-main {
    min-height: calc(100dvh - var(--topbar-height));
}

.wow-role-shell .wow-role-main > h1:first-child,
.wow-role-shell .wow-role-main > h2:first-child,
.wow-role-shell .wow-role-main > .d-flex:first-child h1,
.wow-role-shell .wow-role-main > .d-flex:first-child h2 {
    color: var(--wow-ink);
    font-weight: 650;
    letter-spacing: -.035em;
}

.wow-role-shell .card,
.wow-role-shell .metric-card,
.wow-role-shell .balance-card,
.wow-role-shell .chart-card,
.wow-role-shell .info-card,
.wow-role-shell .soft-card,
.wow-role-shell .fintech-card {
    opacity: 1;
    transform: none;
    animation: none;
    border-color: var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    box-shadow: var(--shadow-soft), var(--shadow-inset);
}

.wow-role-shell .card:hover,
.wow-role-shell .metric-card:hover,
.wow-role-shell .balance-card:hover,
.wow-role-shell .chart-card:hover,
.wow-role-shell .info-card:hover,
.wow-role-shell .soft-card:hover,
.wow-role-shell .fintech-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, .56);
    background: var(--glass-bg-strong);
    box-shadow: var(--shadow-soft-lg), var(--shadow-inset);
}

.wow-role-shell .card.bg-light {
    background: var(--glass-bg) !important;
}

.wow-role-shell .card-header,
.wow-role-shell .card-footer {
    border-color: rgba(146, 86, 160, .09);
    background: rgba(255, 255, 255, .22);
}

.wow-role-shell .card-title,
.wow-role-shell .list-group-item strong,
.wow-role-shell .accordion-button {
    color: var(--wow-ink);
    font-weight: 650;
}

.wow-role-shell .list-group-item,
.wow-role-shell .accordion-item {
    border-color: rgba(71, 85, 105, .08);
    background: transparent;
}

.wow-role-shell .accordion-button:not(.collapsed) {
    color: var(--wow-primary-3);
    background: rgba(146, 86, 160, .07);
    box-shadow: inset 0 -1px 0 rgba(146, 86, 160, .08);
}

.wow-role-shell .accordion-button:focus {
    border-color: rgba(146, 86, 160, .24);
    box-shadow: 0 0 0 .22rem rgba(146, 86, 160, .09);
}

.wow-role-shell .nav-tabs,
.wow-role-shell .nav-pills {
    gap: .42rem;
    border-bottom-color: rgba(146, 86, 160, .10);
}

.wow-role-shell .nav-tabs .nav-link,
.wow-role-shell .nav-pills .nav-link {
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--wow-text);
    background: transparent;
    font-size: var(--wow-type-sm);
    font-weight: 650;
}

.wow-role-shell .nav-tabs .nav-link:hover,
.wow-role-shell .nav-pills .nav-link:hover {
    color: var(--wow-primary-3);
    background: rgba(146, 86, 160, .055);
}

.wow-role-shell .nav-tabs .nav-link.active,
.wow-role-shell .nav-pills .nav-link.active {
    border-color: rgba(146, 86, 160, .14);
    color: #fff;
    background: linear-gradient(135deg, var(--wow-primary-3), var(--wow-primary-2));
    box-shadow: 0 9px 18px rgba(127, 74, 136, .14);
}

.wow-role-shell .btn-outline-primary,
.wow-role-shell .btn-outline-secondary,
.wow-role-shell .header-icon-btn,
.wow-role-shell .savings-btn:not(.savings-btn-secondary) {
    border-color: rgba(146, 86, 160, .16);
    color: var(--wow-primary-3);
    background: rgba(255, 255, 255, .62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}

.wow-role-shell .btn-outline-primary:hover,
.wow-role-shell .btn-outline-secondary:hover,
.wow-role-shell .header-icon-btn:hover,
.wow-role-shell .savings-btn:not(.savings-btn-secondary):hover {
    border-color: rgba(146, 86, 160, .26);
    color: var(--wow-primary-3);
    background: rgba(146, 86, 160, .08);
    box-shadow: 0 9px 20px rgba(127, 74, 136, .09);
}

.wow-role-shell .savings-btn-secondary {
    border-color: rgba(127, 74, 136, .30);
    background: linear-gradient(135deg, var(--wow-primary-3), var(--wow-primary-2));
    color: #fff;
}

.wow-role-shell .badge-soft,
.wow-role-shell .pill-purple,
.wow-role-shell .badge.bg-primary,
.wow-role-shell .badge.bg-info {
    border: 1px solid rgba(146, 86, 160, .10);
    color: var(--wow-primary-3) !important;
    background: rgba(146, 86, 160, .085) !important;
}

.wow-role-shell .badge,
.wow-role-shell .pill {
    border-radius: 999px;
    font-size: var(--wow-type-xs);
    font-weight: 700;
    letter-spacing: .01em;
}

.wow-role-shell .metric-icon {
    color: var(--wow-primary-3);
    background: linear-gradient(135deg, rgba(146, 86, 160, .12), rgba(94, 168, 198, .08));
}

.wow-role-shell .stat-label,
.wow-role-shell .small-muted,
.wow-role-shell .card-text {
    color: var(--wow-text-soft);
}

.wow-role-shell .kyc-banner,
.wow-role-shell .empty-state {
    border: 1px solid rgba(146, 86, 160, .11);
    border-radius: 14px;
    color: var(--wow-text);
    background: rgba(255, 255, 255, .56);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .56);
}

.wow-role-shell .alert {
    border-width: 1px;
    border-style: solid;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .48);
}

.wow-role-shell .alert-info {
    border-color: rgba(94, 168, 198, .18);
    color: #35677c;
    background: rgba(94, 168, 198, .085);
}

.wow-role-shell .wow-account-notice {
    padding: .9rem 1rem;
    border: 1px solid rgba(146, 86, 160, .15);
    border-left: 4px solid var(--wow-primary);
    border-radius: 14px;
    color: #536078;
    background: linear-gradient(135deg, rgba(146, 86, 160, .075), rgba(255, 255, 255, .52));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .58);
}

.wow-role-shell .wow-account-notice strong {
    color: var(--wow-ink-2);
}

.wow-field-shell .kpi-card :is(.text-primary, .text-warning, .text-info),
.wow-field-shell .kpi-card a:is(.text-primary, .text-warning, .text-info) {
    color: var(--wow-primary-3) !important;
}

.wow-field-shell .kpi-card .metric-icon:is(.bg-primary, .bg-warning, .bg-info) {
    color: var(--wow-primary-3) !important;
    background: linear-gradient(135deg, rgba(146, 86, 160, .12), rgba(94, 168, 198, .07)) !important;
}

.wow-role-shell .alert-success {
    border-color: rgba(29, 156, 115, .17);
    color: #176d53;
    background: rgba(29, 156, 115, .075);
}

.wow-role-shell .alert-warning {
    border-color: rgba(202, 141, 40, .18);
    color: #7c5a1d;
    background: rgba(202, 141, 40, .075);
}

.wow-role-shell .alert-danger {
    border-color: rgba(212, 98, 127, .18);
    color: #93445b;
    background: rgba(212, 98, 127, .075);
}

.wow-role-shell .dropdown-menu {
    padding: .48rem;
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: 15px;
    background: rgba(252, 250, 253, .97);
    box-shadow: 0 18px 46px rgba(31, 41, 55, .14);
}

.wow-role-shell .dropdown-item {
    min-height: 38px;
    display: flex;
    align-items: center;
    border-radius: 10px;
    color: var(--wow-ink-2);
    font-size: var(--wow-type-sm);
}

.wow-role-shell .dropdown-item:hover,
.wow-role-shell .dropdown-item:focus,
.wow-role-shell .dropdown-item.active {
    color: var(--wow-primary-3);
    background: rgba(146, 86, 160, .075);
}

.wow-role-shell .table > :not(caption) > * > * {
    padding: .68rem .75rem;
    border-bottom-color: rgba(71, 85, 105, .075);
}

.wow-role-shell .table tbody tr:hover > * {
    background: rgba(146, 86, 160, .028);
}

.wow-role-shell .input-group-text {
    border-color: rgba(71, 85, 105, .14);
    color: var(--wow-text-soft);
    background: rgba(255, 255, 255, .58);
}

.wow-role-shell .form-check-input:checked {
    border-color: var(--wow-primary);
    background-color: var(--wow-primary);
}

.wow-role-shell .progress {
    overflow: hidden;
    border-radius: 999px;
    background: rgba(146, 86, 160, .08);
}

.wow-role-shell .progress-bar {
    background: linear-gradient(90deg, var(--wow-primary-3), var(--wow-primary-2));
}

.wow-role-shell .kbd {
    border-color: rgba(71, 85, 105, .14);
    color: var(--wow-ink-2);
    background: rgba(255, 255, 255, .68);
    box-shadow: inset 0 -2px 0 rgba(71, 85, 105, .07);
}

.wow-role-shell .tip { border-left-color: var(--wow-primary); }

@media (max-width: 575.98px) {
    .wow-role-shell .wow-role-main > h1:first-child,
    .wow-role-shell .wow-role-main > h2:first-child {
        overflow-wrap: anywhere;
    }

    .wow-role-shell .card-header,
    .wow-role-shell .card-body,
    .wow-role-shell .card-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (hover: none) and (pointer: coarse) {
    .wow-role-shell .card:hover,
    .wow-role-shell .metric-card:hover,
    .wow-role-shell .balance-card:hover,
    .wow-role-shell .chart-card:hover,
    .wow-role-shell .info-card:hover,
    .wow-role-shell .soft-card:hover,
    .wow-role-shell .fintech-card:hover {
        transform: none;
    }
}

@media (max-width: 767.98px) {
    .wow-role-shell { --wow-control-h: 44px; }
    .wow-role-shell .table-responsive { border-radius: 12px; }
    .wow-role-shell .modal-footer .btn { width: 100%; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .wow-auth-shell .wow-navbar,
    .wow-auth-shell .wow-card {
        background: #fff;
    }
}
