/* Horizontal separator between thread messages */
.thread-message-divider {
    width: 100%;
    height: 2px;
    border: none;
    border-top: 0.4px solid #979797;
    margin: 8px 0 20px 0;
}
/* Ensure sticky footer works for Documents page on mobile */
@media (max-width: 767px) {
    html, body {
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .main-content-with-footer.documents-content {
        flex: 1 0 auto !important;
        min-height: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
        display: flex !important;
        flex-direction: column !important;
        box-sizing: border-box !important;
        padding-bottom: 79px !important;
    }
}
@font-face {
    font-family: 'BancorpSans';
    src: url('../fonts/The Bancorp Sans/TTF/BancorpSans-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BancorpSans';
    src: url('../fonts/The Bancorp Sans/TTF/BancorpSans-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BancorpSans';
    src: url('../fonts/The Bancorp Sans/TTF/BancorpSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BancorpSans';
    src: url('../fonts/The Bancorp Sans/TTF/BancorpSans-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BancorpSans';
    src: url('../fonts/The Bancorp Sans/TTF/BancorpSans-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BancorpSans';
    src: url('../fonts/The Bancorp Sans/TTF/BancorpSans-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BancorpSans';
    src: url('../fonts/The Bancorp Sans/TTF/BancorpSans-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* Base Styles */

html, body {
    font-family: 'BancorpSans', sans-serif !important;
    margin: 0;
    padding: 0;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    overflow-x: hidden;
    background-color: white;
}

/* Apply BancorpSans font to all text elements globally */
*, *::before, *::after {
    font-family: 'BancorpSans', sans-serif !important;
}

/* Apply to all text elements */
p, span, div, a, h1, h2, h3, h4, h5, h6, label, input, textarea, select, button, td, th, li, ul, ol {
    font-family: 'BancorpSans', sans-serif !important;
}

/* Apply to MudBlazor components */
.mud-typography,
.mud-button,
.mud-input,
.mud-input-control,
.mud-text-field,
.mud-select,
.mud-nav-link,
.mud-appbar,
.mud-drawer,
.mud-table,
.mud-card,
.mud-dialog,
.mud-snackbar,
.mud-menu,
.mud-list-item,
.mud-chip,
.mud-tooltip,
.mud-progress-linear,
.mud-progress-circular {
    font-family: 'BancorpSans', sans-serif !important;
}

/* Apply to form inputs and controls */
input,
textarea,
select,
button {
    font-family: 'BancorpSans', sans-serif !important;
}

#app {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100vw;
}

/* Blazor Error UI */
#blazor-error-ui {
    background-color: #fef3c7;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.5rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Loading Progress */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 0 auto;
    margin-top: 20vh;
    margin-bottom: 1rem;
}

.loading-progress circle {
    fill: none;
    stroke: #d1d5db;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #2563eb;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: 700;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

.appbar-icon-settings .mud-menu-item .mud-menu-item-icon {
    color: #000000 !important;
}

.mud-expand-panel-icon {
    display: none !important;
}
.page-header {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 700;
    font-size: 36px;
    line-height: 44px;
    letter-spacing: -0.11px;
    color: #202224;
    outline: none !important;
    user-select: none;
}

/* Hide overlays on desktop view - global rule */
@media (min-width: 768px) {
    .mud-overlay.mud-overlay-drawer, .mud-overlay-scrim, .mud-overlay-scrim.mud-overlay-dark, [class*="mud-overlay"][class*="drawer"], [class*="mud-overlay-scrim"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* Mobile: Ensure overlay doesn't block drawer interactions */
@media (max-width: 767px) {
    .mud-overlay.mud-overlay-drawer,
    .mud-overlay-scrim,
    .mud-overlay-scrim.mud-overlay-dark,
    [class*="mud-overlay"][class*="drawer"],
    [class*="mud-overlay-scrim"] {
        pointer-events: none !important;
        z-index: 1200 !important;
    }
    
    /* Drawer must be above overlay */
    .mud-drawer,
    .mud-drawer-temporary {
        z-index: 1300 !important;
    }
}

/* MudMenu dropdown width - match drawer width (180px) - Global rule for popover */
.mud-popover-paper.mud-menu-paper,
.mud-popover.mud-menu-popover .mud-popover-paper,
.mud-menu-paper,
.mud-list.mud-menu-list {
    min-width: 180px !important;
    width: 180px !important;
    max-width: 180px !important;
}

/* Login Page Styles */
/* Base Styles - Mobile First Approach */
.login-container {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    gap: 0;
    box-sizing: border-box;
}

.login-left-side {
    display: none; /* Hidden on mobile by default */
    width: 0;
    height: 100vh;
    height: 100dvh;
    background-image: url('/images/Login_Left_side_img_svg.svg');
    background-color: #000000;
    flex-shrink: 0;
    position: relative;
    background-size: cover !important;
    background-position: left top !important;
    background-repeat: no-repeat !important;
}

.login-right-side {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    background-color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
    overflow-y: auto;
    box-sizing: border-box;
}

.logo-top-container {
    width: 100%;
    padding: 1.5rem 1.5rem 0 1.5rem;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    margin-bottom: 0;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.logo-image {
    height: 2rem;
    max-width: 160px;
    width: auto;
    display: block;
}

.login-form-container {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 1.5rem;
    margin: 0 auto;
    flex: 1;
    min-height: 0;
    box-sizing: border-box;
}

.login-welcome-section {
    width: 100%;
    margin-bottom: 1.5rem;
    text-align: left;
}

.login-welcome-text {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 36px;
    line-height: 30px;
    letter-spacing: -0.11px;
    color: #202224;
    margin: 0 0 0.375rem 0;
}

.login-portal-name {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 36px;
    line-height: 44px;
    letter-spacing: -0.11px;
    color: #202224;
    margin: 0 0 0.75rem 0;
}

.login-instruction-text {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0px;
    color: #666666;
    margin: 0 0 1.5rem 0;
}

.login-button {
    background-color: #81D8D0 !important;
    font-family: 'BancorpSans', sans-serif !important;
    font-weight: 700 !important;
    font-style: normal !important;
    font-size: 16px !important;
    line-height: 100% !important;
    letter-spacing: 0px !important;
    color: #000000 !important;
    text-align: center !important;
    text-transform: none !important;
    padding: 12px !important;
    margin: 0 0 1.5rem 0 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Override MudBlazor button text transform */
.login-button,
.login-button *,
.login-button .mud-button-root,
.login-button .mud-button-label,
.login-button .mud-button-text,
.login-button .mud-button-label *,
.login-button .mud-button-text *,
.login-button button,
.login-button span {
    text-transform: none !important;
}

/* Small Mobile Devices (up to 480px) */
@media (max-width: 480px) {
    .login-container {
        min-height: 100vh;
        min-height: 100dvh;
        height: auto;
    }

    .login-right-side {
        min-height: 100vh;
        min-height: 100dvh;
        height: auto;
    }

    .logo-top-container {
        padding: 1rem 1rem 0 1rem;
        justify-content: flex-start;
    }

    .logo-image {
        height: 1.75rem;
        max-width: 140px;
    }

    .login-form-container {
        padding: 1rem;
        min-height: calc(100vh - 100px);
        min-height: calc(100dvh - 100px);
        align-items: flex-start;
    }

    .login-welcome-text,
    .login-portal-name {
        font-size: 1.125rem;
    }

    .login-instruction-text {
        font-size: 0.75rem;
    }

    .login-button {
        font-size: 12px !important;
        padding: 10px !important;
        width: 100% !important;
    }
}

/* Tablets and Small Desktops (481px to 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .login-container {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .login-right-side {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .logo-top-container {
        padding: 1.5rem 1.5rem 0 1.5rem;
        justify-content: flex-start;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .logo-image {
        height: 2rem;
        max-width: 180px;
    }

    .login-form-container {
        padding: 1.5rem;
        max-width: 400px;
        align-items: flex-start;
    }

    .login-welcome-text,
    .login-portal-name {
        font-size: 1.375rem;
    }

    .login-instruction-text {
        font-size: 0.8125rem;
    }

    .login-button {
        font-size: 13px !important;
        padding: 11px !important;
        width: 100% !important;
    }
}

/* Tablets in Landscape and Small Desktops (768px to 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .login-left-side {
        display: block;
        width: 45%;
    }

    .login-right-side {
        width: 55%;
    }

    .logo-top-container {
        padding: 2rem 2rem 0 2rem;
        max-width: 500px;
        justify-content: flex-start;
        margin-left: auto;
        margin-right: auto;
    }

    .logo-image {
        height: 2.5rem;
        max-width: 220px;
    }

    .login-form-container {
        padding: 2rem;
        max-width: 500px;
        align-items: flex-start;
    }

    .login-welcome-text,
    .login-portal-name {
        font-size: 1.5rem;
    }

    .login-instruction-text {
        font-size: 0.875rem;
    }

    .login-button {
        font-size: 14px !important;
        padding: 12px !important;
    }
}

/* Medium Desktops (1024px to 1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
    .login-left-side {
        display: block;
        width: 45%;
    }

    .login-right-side {
        width: 55%;
    }

    .logo-top-container {
        padding: 2rem 2.5rem 0 2.5rem;
        max-width: 500px;
        justify-content: flex-start;
        margin-left: auto;
        margin-right: auto;
    }

    .logo-image {
        height: 2.75rem;
        max-width: 240px;
    }

    .login-form-container {
        padding: 2rem 2.5rem;
        max-width: 500px;
        align-items: flex-start;
    }

    .login-welcome-text,
    .login-portal-name {
        font-size: 1.5rem;
    }

    .login-instruction-text {
        font-size: 0.875rem;
    }

    .login-button {
        font-size: 14px !important;
        padding: 12px !important;
        width: 90px !important;
    }
}

/* Large Desktops (1280px and above) */
@media (min-width: 1280px) {
    .login-left-side {
        display: block;
        width: 45%;
    }

    .login-right-side {
        width: 55%;
    }

    .logo-top-container {
        padding: 2rem 2rem 0 2rem;
        max-width: 28rem;
        justify-content: flex-start;
        margin-left: auto;
        margin-right: auto;
    }

    .logo-image {
        height: 3rem;
        max-width: 250px;
    }

    .login-form-container {
        padding: 2rem;
        max-width: 28rem;
        align-items: flex-start;
    }

    .login-welcome-text,
    .login-portal-name {
        font-size: 1.5rem;
    }

    .login-instruction-text {
        font-size: 0.875rem;
    }

    .login-button {
        font-size: 14px !important;
        padding: 12px !important;
        width: 90px !important;
    }
}

/* Extra Large Desktops (1440px and above) */
@media (min-width: 1440px) {
    .login-left-side {
        display: block;
        width: 45%;
    }

    .login-right-side {
        width: 55%;
    }

    .logo-top-container {
        padding: 2.5rem 2.5rem 0 2.5rem;
        max-width: 32rem;
        justify-content: flex-start;
        margin-left: auto;
        margin-right: auto;
    }

    .logo-image {
        height: 3.25rem;
        max-width: 280px;
    }

    .login-form-container {
        padding: 2.5rem;
        max-width: 32rem;
        align-items: flex-start;
    }

    .login-welcome-text,
    .login-portal-name {
        font-size: 1.5rem;
    }

    .login-instruction-text {
        font-size: 0.875rem;
    }

    .login-button {
        font-size: 14px !important;
        padding: 12px !important;
        width: 90px !important;
    }
}

/* Height-based adjustments for very short screens */
@media (max-height: 600px) {
    .logo-top-container {
        padding: 1rem 1.5rem 0 1.5rem;
        justify-content: flex-start;
    }

    .logo-image {
        height: 1.75rem;
        max-width: 160px;
    }

    .login-form-container {
        padding: 1rem 1.5rem;
        align-items: flex-start;
    }

    .login-welcome-text,
    .login-portal-name {
        font-size: 1rem;
    }

    .login-instruction-text {
        font-size: 0.7rem;
    }

    .login-button {
        font-size: 12px !important;
        padding: 10px !important;
        width: 100% !important;
    }
}

/* BorrowerLayout Styles */
/* Basic AppBar styling */
.app-bar-responsive {
    background-color: white !important;
    border-bottom: none !important;
}

/* Ensure AppBar displays correctly */
.mud-appbar.app-bar-responsive {
    background-color: white !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

/* AppBar content area */
.mud-appbar .mud-appbar-content {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 1rem !important;
}

/* Settings Dialog Styles */
.settings-text-field .mud-input-label {
    font-family: 'BancorpSans', sans-serif !important;
    font-size: 14px !important;
    color: #404040 !important;
    font-weight: 400 !important;
}

.settings-text-field .mud-input-root {
    font-family: 'BancorpSans', sans-serif !important;
    font-size: 14px !important;
    color: #404040 !important;
}

.settings-text-field .mud-input-outlined {
    border-color: #e0e0e0 !important;
}

.settings-text-field .mud-input-outlined:hover {
    border-color: #bdbdbd !important;
}

.settings-text-field .mud-input-outlined.mud-input-outlined-focused {
    border-color: #50C8B8 !important;
}

/* MudLayout - Ensure proper flex layout */
.mud-layout {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    height: 100dvh !important;
    position: relative !important;
}

/* Drawer positioning */
.mud-drawer {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 1200 !important;
}

/* Drawer when Persistent (open) - 180px width */
.mud-drawer.mud-drawer-persistent {
    width: 180px !important;
    position: fixed !important;
}

/* Drawer when Mini (closed) - 84px width */
.mud-drawer.mud-drawer-mini {
    width: 56px !important;
    position: fixed !important;
}

/* AppBar - Fixed at top, positioned after drawer */
.mud-appbar {
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 1100 !important;
    margin-left: 0 !important;
}

/* When drawer is Persistent, AppBar should start after drawer */
.mud-layout:has(.mud-drawer.mud-drawer-persistent) .mud-appbar {
    margin-left: 180px !important;
}

/* When drawer is Mini, AppBar should start after drawer 84px */
.mud-layout:has(.mud-drawer.mud-drawer-mini) .mud-appbar {
    margin-left: 56px !important;  
}

/* Main Content - Enable scrolling, positioned after drawer */
.mud-main-content {
    background-color: white;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    flex: 1 !important;
    min-height: 0 !important;
    position: relative !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 transparent;
    display: flex !important;
    flex-direction: column !important;
}

/* When drawer is Persistent (open), main content should start after 180px */
/* This works even when drawer is in a nested MudLayout */
body:has(.mud-drawer.mud-drawer-persistent) .mud-main-content,
.mud-layout:has(.mud-drawer.mud-drawer-persistent) ~ .mud-main-content,
.mud-layout:has(.mud-drawer.mud-drawer-persistent) .mud-main-content {
    margin-left: 180px !important;
}

/* When drawer is Mini (closed), main content should start after 84px */
body:has(.mud-drawer.mud-drawer-mini) .mud-main-content,
.mud-layout:has(.mud-drawer.mud-drawer-mini) ~ .mud-main-content,
.mud-layout:has(.mud-drawer.mud-drawer-mini) .mud-main-content {
    margin-left: 56px !important;
}

/* Main content with footer - ensures footer stays at bottom */
.main-content-with-footer {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100% !important;
}

/* Content wrapper for sticky footer */
.content-wrapper {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100% !important;
    flex: 1 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Custom Scrollbar Styling - Webkit (Chrome, Safari, Edge) */
.mud-main-content::-webkit-scrollbar {
    width: 8px;
}

.mud-main-content::-webkit-scrollbar-track {
    background: transparent;
}

.mud-main-content::-webkit-scrollbar-thumb {
    background-color: #c1c1c1;
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.mud-main-content::-webkit-scrollbar-thumb:hover {
    background-color: #a8a8a8;
}

/* Main Content Container - Ensure it's visible and scrollable */
.main-content-container {
    padding: 0 0.5rem 1rem 1rem !important; /* Reduced right padding */
    width: 100%;
    flex: 1;
    box-sizing: border-box;
}

/* Override MudContainer default padding */
.main-content-container.mud-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Mobile: Hide drawer when closed and ensure no space is reserved */
@media (max-width: 767px) {
    /* Mobile-specific padding for main content container */
    .main-content-container {
        flex: 1 1 auto !important;
        min-height: 49vh !important;
        overflow-y: auto !important;
        padding-bottom: 120px !important;
        padding: 0 0.5rem 1.5rem 0.5rem !important;
    }
    /* Hide drawer when closed on mobile - this is the key style */
    .mud-drawer.mobile-drawer-hidden,
    .mud-drawer.mud-drawer-temporary.mobile-drawer-hidden {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translateX(-100%) !important;
    }
    
    /* Ensure Temporary drawer doesn't take up layout space on mobile */
    .mud-drawer.mud-drawer-temporary {
        position: fixed !important;
        z-index: 1300 !important;
    }
    
    /* When drawer is open on mobile, show it as overlay */
    .mud-drawer.mud-drawer-temporary:not(.mobile-drawer-hidden) {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    
    /* Mobile: Ensure nav links are clickable and properly layered */
    .mud-nav-link {
        pointer-events: auto !important;
        cursor: pointer !important;
        position: relative !important;
        z-index: 2 !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1) !important;
        user-select: none !important;
        -webkit-user-select: none !important;
    }
    
    /* Mobile: Force all nav link children to allow pointer events */
    .mud-nav-link,
    .mud-nav-link *,
    .mud-nav-link img,
    .mud-nav-link span,
    .mud-nav-link div {
        pointer-events: auto !important;
    }
    
    /* Mobile: Ensure the actual <a> tag inside MudNavLink is clickable */
    .mud-nav-link a,
    .mud-nav-link.mud-nav-item,
    a.mud-nav-link {
        pointer-events: auto !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
    }
    
    /* Mobile: Ensure nav menu is properly layered */
    .mud-nav-menu {
        position: relative !important;
        z-index: 1 !important;
        pointer-events: auto !important;
    }
    
    /* Mobile: Ensure drawer content is clickable */
    .mud-drawer.mud-drawer-temporary:not(.mobile-drawer-hidden) * {
        pointer-events: auto !important;
    }
    
    /* Mobile: Ensure close button is clickable */
    .close-drawer-button {
        pointer-events: auto !important;
        cursor: pointer !important;
        z-index: 10 !important;
        touch-action: manipulation !important;
    }
    
    /* Ensure AppBar starts from left edge - no drawer space */
    .mud-appbar {
        margin-left: 0 !important;
        padding-left: 0 !important;
        left: 0 !important;
        width: 100% !important;
        position: relative !important;
    }
    
    /* Ensure AppBar content takes full width */
    .mud-appbar .mud-appbar-content {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    /* Ensure toggle button is always visible on mobile */
    .menu-toggle-button {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Ensure Layout doesn't have left margin from drawer */
    .mud-layout {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
    
    /* On mobile, drawer is Temporary (overlay), so no margin needed */
    .mud-layout:has(.mud-drawer.mud-drawer-temporary) .mud-appbar,
    .mud-layout:has(.mud-drawer.mud-drawer-temporary) .mud-main-content {
        margin-left: 0 !important;
    }
    
    /* Ensure MainContent doesn't have left margin on mobile */
    .mud-main-content {
        margin-left: 0 !important;
        padding-left: 0 !important;
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
        width: 100% !important;
    }
    
    /* Ensure Temporary drawer is fixed overlay on mobile when open */
    .mud-drawer.mud-drawer-temporary:not(.mobile-drawer-hidden) {
        position: fixed !important;
        z-index: 1300 !important;
        top: 0 !important;
        left: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
    }
    
    /* Ensure overlay scrim is shown when drawer is open on mobile */
    .mud-drawer.mud-drawer-temporary:not(.mobile-drawer-hidden) ~ .mud-overlay-scrim,
    .mud-overlay-scrim.mud-overlay-drawer:has(+ .mud-drawer.mud-drawer-temporary:not(.mobile-drawer-hidden)) {
        display: block !important;
        visibility: visible !important;
        opacity: 0.5 !important;
        z-index: 1299 !important;
    }
}

/* Footer Styles */
.layout-footer {
    margin-top: auto !important;
    padding: 1rem !important;
    background-color: white !important;
    border-top: 1px solid #e0e0e0 !important;
    flex-shrink: 0 !important;
    width: 100% !important;
    height: 145px !important;
    min-height: 140px !important;
    box-sizing: border-box !important;
    display: block !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10 !important;
}

.footer-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 1rem !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.footer-left {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25rem !important;
    flex: 1 !important;
    min-width: 250px !important;
    box-sizing: border-box !important;
}

.footer-first-row {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-wrap: wrap !important;
    width: 100% !important;
}

.footer-housing {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
}

.footer-text {
    font-family: 'BancorpSans', sans-serif !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    color: #000000 !important;
    margin: 0 !important;
    line-height: 24.5px !important;
    letter-spacing: 0px !important;
    vertical-align: middle !important;
    display: inline-block !important;
}

.footer-right {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}
    /* Remove mobile column layout overrides for footer-content, footer-left, footer-right */

.footer-link {
    font-family: 'BancorpSans', sans-serif !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    color: #000000 !important;
    line-height: 24.5px !important;
    letter-spacing: 0px !important;
    vertical-align: middle !important;
    text-decoration: underline !important;
    transition: color 0.2s !important;
    display: inline-block !important;
    white-space: nowrap !important;
}

.footer-link:hover {
    color: #000000 !important;
    text-decoration: underline !important;
}

.footer-separator {
    font-family: 'BancorpSans', sans-serif !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    color: #000000 !important;
    line-height: 24.5px !important;
    letter-spacing: 0px !important;
    vertical-align: middle !important;
    display: inline-block !important;
    margin: 0 0.25rem !important;
}

/* MudBlazor Footer Component Styles */
.layout-footer .mud-typography,
.layout-footer .mud-text {
    font-family: 'BancorpSans', sans-serif !important;
}

.layout-footer .mud-text-typography-body1,
.layout-footer .mud-text-typography-body2 {
    font-family: 'BancorpSans', sans-serif !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    color: #000000 !important;
    line-height: 24.5px !important;
    letter-spacing: 0px !important;
}

.layout-footer .mud-button {
    font-family: 'BancorpSans', sans-serif !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    color: #000000 !important;
    text-transform: none !important;
}

.layout-footer .mud-button-root {
    text-transform: none !important;
}

.layout-footer .mud-link {
    font-family: 'BancorpSans', sans-serif !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    color: #000000 !important;
    line-height: 24.5px !important;
    letter-spacing: 0px !important;
    text-decoration: underline !important;
    transition: color 0.2s !important;
}

.layout-footer .mud-link:hover {
    color: #000000 !important;
    text-decoration: underline !important;
}

/* Legacy Footer Styles (for MainLayout) */
#TbbkFooter {
    position: absolute !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 1.5rem !important;
}

#TbbkFooterContentWrapper {
    text-align: center !important;
    width: 100% !important;
}

/* Mobile Footer Styles */
@media (max-width: 767px) {
    /* Override inline styles for mobile */
    .main-content-with-footer {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding-bottom: 0 !important;
    }
    
    .content-wrapper {
        display: block !important;
        min-height: auto !important;
    }
    
    .layout-footer {
        position: sticky !important;
        width: 100% !important;
        padding: 0.50rem !important;
        height: auto !important;
        min-height: auto !important;
        background: white !important;
        z-index: 1 !important;
        border-top: 1px solid #e0e0e0 !important;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08) !important;
        margin-top: 0 !important;
        margin-bottom: env(safe-area-inset-bottom, 0px) !important;
        height: 160px !important;
        min-height: 140px !important;
    }
    
    .footer-content {
        flex-direction: column !important;
        gap: 0.05rem !important;
    }
    .footer-left {
        min-width: 100% !important;
        width: 100% !important;
    }
    
    .footer-right {
        width: 100% !important;
        justify-content: flex-start !important;
    }
    
    .footer-text {
        font-size: 0.75rem !important;
        line-height: 1.3 !important;
        margin: 0 !important;
    }
    
    .footer-first-row {
        display: flex !important;
        flex-direction: row !important;
        flex-grow: 0 !important;
        gap: 0.5rem !important;
    }

    .footer-link {
        font-family: 'BancorpSans', sans-serif !important;
        font-weight: 600 !important;
        font-size: 11px !important;
    }

    .footer-separator {
        font-family: 'BancorpSans', sans-serif !important;
        font-weight: 600 !important;
        font-size: 11px !important;
    }

    /* MudBlazor Footer Component Styles */
    .layout-footer .mud-typography,
    .layout-footer .mud-text {
        font-family: 'BancorpSans', sans-serif !important;
    }

    .layout-footer .mud-text-typography-body1,
    .layout-footer .mud-text-typography-body2 {
        font-family: 'BancorpSans', sans-serif !important;
        font-weight: 600 !important;
        font-size: 11px !important;
    }

    .layout-footer .mud-button {
        font-family: 'BancorpSans', sans-serif !important;
        font-weight: 600 !important;
        font-size: 11px !important;
        text-transform: none !important;
    }

    .layout-footer .mud-link {
        font-family: 'BancorpSans', sans-serif !important;
        font-weight: 600 !important;
        font-size: 11px !important;
    }
}

/* Desktop Footer Styles - Ensure footer is visible */
@media (min-width: 768px) {
    .content-wrapper {
        display: flex !important;
        flex-direction: column !important;
    }

    .layout-footer {
        visibility: visible !important;
        opacity: 1 !important;
        height: 145px !important;
        min-height: 140px !important;
    }

    .main-content-container {
        flex: 1 1 0% !important;
        min-height: 0 !important;
        overflow-y: auto !important;
    }
}


/* Desktop: Ensure overlay is hidden when using Persistent/Mini variant */
@media (min-width: 768px) {
    /* Hide only drawer overlays on desktop - drawer should be Persistent or Mini, not Temporary */
    /* Do NOT hide dialog overlays - they are needed for dialogs to work */
    .mud-overlay.mud-overlay-drawer,
    .mud-overlay-scrim.mud-overlay-drawer,
    [class*="mud-overlay"][class*="drawer"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        z-index: -1 !important;
    }
    
    /* Ensure drawer and main content are positioned correctly on desktop */
    .mud-drawer.mud-drawer-persistent {
        position: fixed !important;
        width: 180px !important;
    }
    
    .mud-drawer.mud-drawer-mini {
        position: fixed !important;
        width: 56px !important;
    }
    
    /* Ensure main content is positioned after drawer on desktop */
    /* Use body selector to work with nested MudLayouts */
    body:has(.mud-drawer.mud-drawer-persistent) .mud-main-content,
    .mud-layout:has(.mud-drawer.mud-drawer-persistent) .mud-main-content {
        margin-left: 180px !important;
    }
    
    body:has(.mud-drawer.mud-drawer-mini) .mud-main-content,
    .mud-layout:has(.mud-drawer.mud-drawer-mini) .mud-main-content {
        margin-left: 56px !important;
    }
    
    /* Ensure AppBar is positioned after drawer on desktop */
    body:has(.mud-drawer.mud-drawer-persistent) .mud-appbar,
    .mud-layout:has(.mud-drawer.mud-drawer-persistent) .mud-appbar {
        margin-left: 180px !important;
    }
    
    body:has(.mud-drawer.mud-drawer-mini) .mud-appbar,
    .mud-layout:has(.mud-drawer.mud-drawer-mini) .mud-appbar {
        margin-left: 56px !important;
    }
}

/* Dashboard Page Styles */
.dashboard-container {
    width: 100%;
    height: 100%;
    padding: 2rem;
    box-sizing: border-box;
}

.no-loans-card-display{
    background-color: #FFFFFF; 
    padding: 3rem 2rem; 
    text-align: center; 
    border-radius: 4px;
    border: 1px solid #E6E6E6;
}
.no-loans-header-display{
    font-family: 'BancorpSans', sans-serif !important;
    font-weight: 700;
    font-style: Bold;
    font-size: 26px;
    line-height: 100%;
    letter-spacing: -0.11px;
    text-align: center;
    color:#202224;
}
.no-loans-details-display{
    font-family: 'BancorpSans', sans-serif !important;
    font-weight: 400;
    font-style: Regular;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0px;
    text-align: center;
    color:#000000;
    margin-bottom: 2rem; 
    max-width: 600px; 
    margin-left: auto; 
    margin-right: auto;
}

.no-loans-contact-button {
    text-transform: none !important;
    font-size: 0.875rem;
    padding: 0.75rem 1.5rem !important;
    letter-spacing: 0px;
    font-weight: 500;
    border:1px solid #81D8D0 !important;
    border-radius: 4px !important;
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
}

/* Override MudButton's default uppercase transform for no-loans button */
.no-loans-contact-button .mud-button-root,
.no-loans-contact-button .mud-button-label {
    text-transform: none !important;
}
/* Body/Content Section Styles for BorrowerLayout pages */
.main-content-container .mud-typography,
.main-content-container .mud-text {
    font-family: 'BancorpSans', sans-serif !important;
}

/* Ensure proper spacing and styling for page content */
.main-content-container > * {
    margin-bottom: 1rem;
}

.main-content-container .mud-text-typography-h3 {
    font-family: 'BancorpSans', sans-serif !important;
    font-weight: 700 !important;
    color: #202224 !important;
}

.main-content-container .mud-text-typography-body1,
.main-content-container .mud-text-typography-body2 {
    font-family: 'BancorpSans', sans-serif !important;
    color: #666666 !important;
}

/* NavMenu Styles */
.mud-nav-menu {
    background-color: #000000;
}

.mud-nav-link {
    color: #ffffff !important;
    font-family: 'BancorpSans', sans-serif !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    padding-right: 1px !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 1 !important;
}

.mud-nav-link img {
    flex-shrink: 0 !important;
    display: block !important;
    margin-right: 16px !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.mud-nav-link .mud-nav-link-icon,
.mud-nav-link .mud-nav-link-icon-start {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    margin-right: 16px !important;
}

.mud-nav-link > *:first-child {
    margin-right: 16px !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.mud-nav-link .mud-nav-link-text {
    color: #ffffff !important;
    font-family: 'BancorpSans', sans-serif !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    display: flex !important;
    align-items: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mud-nav-link.active,
.mud-nav-link.mud-nav-link-active {
    background-color: #00635F !important;
}

.mud-nav-link.active .mud-nav-link-text,
.mud-nav-link.mud-nav-link-active .mud-nav-link-text {
    color: #FFFFFF !important;
    font-family: 'BancorpSans', sans-serif !important;
    font-weight: 800 !important;
    font-size: 14px !important;
}

.mud-nav-link.active .mud-nav-link-icon,
.mud-nav-link.mud-nav-link-active .mud-nav-link-icon {
    color: #14a085 !important;
}

.mud-nav-link.active .mud-nav-link-icon svg,
.mud-nav-link.mud-nav-link-active .mud-nav-link-icon svg {
    fill: #14a085 !important;
}

.mud-nav-link:hover:not(.active):not(.mud-nav-link-active) {
    background-color: #333333;
}

/* TbbkAppBar Component Styles */
.menu-toggle-button {
    color: #000000 !important;
    background-color: transparent !important;
}

/* Remove background on hover and focus */
.menu-toggle-button:hover,
.menu-toggle-button:focus {
    background-color: transparent !important;
    background: transparent !important;
}

/* Ensure Material icons are black */
.menu-toggle-button svg,
.menu-toggle-button path {
    color: #000000 !important;
}

/* Remove any MudBlazor default button background */
.menu-toggle-button.mud-icon-button,
.menu-toggle-button.mud-button-root {
    background-color: transparent !important;
    background: transparent !important;
}

.appbar-right-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto !important;
    flex-shrink: 0 !important;
}

.profile-menu .mud-menu-item svg,
.profile-menu .mud-menu-item path {
    fill: #000000 !important;
    color: #000000 !important;
}

/* Settings menu item icon size - make it smaller */
.profile-menu .mud-menu-item svg {
    width: 18px !important;
    height: 18px !important;
}

/* Settings menu item text styling */
.profile-menu .mud-menu-item {
    font-family: 'BancorpSans', sans-serif !important;
    font-weight: 700 !important;
    font-size: 14px !important;
}

.profile-menu-activator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    min-width: auto;
    text-transform: none;
}

.profile-menu-activator:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* MudMenu dropdown width - match drawer width (180px) */
.profile-menu .mud-popover-paper,
.profile-menu .mud-popover,
.profile-menu .mud-popover-paper,
.profile-menu .mud-popover,
.mud-menu .mud-popover-paper,
.mud-menu .mud-popover,
.mud-popover-paper.mud-menu-paper,
.mud-popover.mud-menu-popover,
.mud-menu-paper,
.mud-list.mud-menu-list {
    min-width: 180px !important;
    width: 180px !important;
    max-width: 180px !important;
}

.user-info-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.user-name {
    font-family: 'BancorpSans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #404040;
}

.user-organization {
    font-family: 'BancorpSans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #404040;
}

/* Loan Header */
.loan-header-text {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 700;
    font-size: 24px;
    leading-trim: none;
    line-height: 28px;
    letter-spacing: 0px;
    color: #202224;
    margin-bottom: 0.125rem;
}

@media (max-width: 767px) {
    .user-info-text {
        font-size: 0.75rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 120px;
    }
}

.menu-item-with-image span {
    font-family: 'BancorpSans', sans-serif !important;
    font-size: 14px !important;
    color: #000000 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.appbar-icon-button {
    color: #000000;
}

/* Mobile: Hide drawer when closed and ensure no space is reserved */
@media (max-width: 767px) {
    .mud-drawer.mobile-drawer-hidden {
        display: none !important;
    }
}

/* Support Page Styles */
.support-page-title {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 36px;
    line-height: 44px;
    letter-spacing: -0.11px;
    color: #202224;
    margin-bottom: 0.75rem;
}

/* FAQ Section */
.support-faq-panels {
    margin-bottom: 0;
    margin-top: 0;
}

.support-faq-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  /*min-height: 80px; */
}

.support-faq-content {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0px;
    color: #373D42;
    padding: 0.5rem 0;
}

.support-faq-answer {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0px;
    color: #373D42;
}

.support-faq-bullet-list {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin: 0 0 1rem 0;
}

.support-faq-bullet-list li {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #373D42;
    margin-bottom: 0.5rem;
}

.support-contact-button {
    text-transform: none !important;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem !important;
    letter-spacing: 0px;
    font-weight: 500;
    border:1px solid #81D8D0 !important;
    border-radius: 4px !important;
    display: flex;
    align-items: center;
}


.support-contact-button svg,
.support-contact-button img {
  vertical-align: middle;
  margin-right: 8px; /* adjust as needed for spacing */
  /* Remove any margin-bottom or margin-top if present */
}

/* ::deep .support-contact-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.625rem !important;
    background-color: transparent !important;
    border-color: #17a2a2 !important;
    color: #17a2a2 !important;
    flex-wrap: nowrap !important;
} */

.button-icon {
    width: 16px;
    height: 16px;
    display: inline-block !important;
    flex-shrink: 0 !important;
    margin-right: 0.625rem !important;
}

.button-text {
    display: inline !important;
    white-space: nowrap !important;
    text-transform: none !important;
    font-family: 'BancorpSans', sans-serif;
    font-weight: 600;
    font-style: Bold;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0px;
    text-align: center;
    vertical-align: middle;
    color:#008582 !important;
}

/* Responsive: Mobile - Allow button text to wrap and fit */
@media (max-width: 600px) {
    .button-text {
        white-space: normal !important;
        font-size: 0.75rem;
        line-height: 1.3;
    }
}

@media (min-width: 601px) and (max-width: 768px) {
    .button-text {
        white-space: normal !important;
        font-size: 0.8125rem;
        line-height: 1.3;
    }
}


::deep .support-contact-button .button-text {
    text-transform: none !important;
}

::deep .support-contact-button span {
    text-transform: none !important;
}

::deep .support-contact-button:hover {
    background-color: rgba(23, 162, 162, 0.04) !important;
}

::deep .mud-icon-root .mud-svg-icon .mud-expand-panel-icon {
    display: none !important;
}

/* Sidebar Styles */
.support-sidebar {
    display: flex;
    flex-direction: column;
}

.support-sidebar-card {
    border-radius: 8px;
}

.support-user-info {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.support-user-name {
    font-weight: 600;
    color: #000000;
    margin-bottom: 0.25rem;
}

.support-user-org {
    color: #666666;
    font-size: 0.875rem;
}

.support-section-title {
    font-weight: 600;
    color: #000000;
}

.support-section-description {
    color: #666666;
    line-height: 1.5;
}

.support-loan-officer-name {
    font-weight: 600;
    color: #000000;
}

.support-contact-details {
    margin-top: 0.5rem;
}

.support-contact-item {
    display: flex;
    align-items: center;
    color: #333333;
}

.contact-icon {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    display: inline-block;
    flex-shrink: 0;
}

.support-inquiry-item {
    margin-bottom: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.support-inquiry-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.support-inquiry-description {
    color: #666666;
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.support-inquiry-email {
    color: #333333;
    font-size: 0.875rem;
    font-weight: 400;
}

.support-plus-icon-class {
    image: url('images/support_plus.svg');
}

.support-minus-icon-class {
    image: url('images/support_minus.svg');
}

/* Panel Header Styling */
.support-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 0;
    color: #373D42;
    font-weight:700;
    font-family:  'BancorpSans', sans-serif;
    font-style: Bold;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0px;
    margin: 0;
}


.support-custom-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    position: relative;
}

/* Hide default MudBlazor expand/collapse icons using color/filter approach */
::deep .support-faq-panel .mud-expand-panel-header .mud-icon-button {
    filter: brightness(0) saturate(0%) opacity(0) !important;
    visibility: hidden !important;
    position: absolute;
    width: 0;
    height: 0;
    padding: 0;
    margin: 0;
    pointer-events: none;
}

::deep .support-faq-panel .mud-expand-panel-header button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

::deep .support-faq-panels .mud-expand-panel-header .mud-icon-button {
    filter: brightness(0) saturate(0%) opacity(0) !important;
    visibility: hidden !important;
}

/* Remove elevation from support-faq-panel (mud-expand-panel) */
.support-faq-panel.mud-elevation-1 {
  box-shadow: none !important;
}

.support-specific-inquiries-card.mud-elevation-1 {
  box-shadow: none !important;
  margin-bottom: 1rem;
  border : 1px solid #E6E6E6; 
  border-radius:4px;
}

/* Responsive Styles */
@media (max-width: 960px) {
    .support-page-title {
        font-family: 'BancorpSans', sans-serif;
        font-weight: 700;
        font-style: normal;
        font-size: 1.5rem;
        line-height: 44px;
        letter-spacing: -0.11px;
        color: #202224;
        margin-bottom: 1rem;
    }

    .support-sidebar {
        margin-top: 1.5rem;
    }

    .support-sidebar-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 600px) {
    .support-page-title {
        font-family: 'BancorpSans', sans-serif;
        font-weight: 700;
        font-style: normal;
        font-size: 1.25rem;
        line-height: 44px;
        letter-spacing: -0.11px;
        color: #202224;
        margin-bottom: 0.75rem;
    }

    .support-faq-panel {
        margin-bottom: 0.5rem;
    }

    .support-contact-button {
        font-size: 0.7rem;
        padding: 0.3rem 0.75rem;
    }

    .support-user-name,
    .support-loan-officer-name,
    .support-section-title {
        font-size: 1rem;
    }

    .support-user-org,
    .support-section-description,
    .support-inquiry-description,
    .support-inquiry-email {
        font-size: 0.8rem;
    }
}

/* Messages Page Styles */
.messages-grid {
    height: 100%;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.messages-list-column {
    height: 100%;
    border-right: 1px solid #e0e0e0;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: 100%;
}

.messages-list-container {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    background-color: #ffffff;
    overflow-y: auto;
    /* Remove max-height so it fills available space */
}

.messages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.messages-title {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 26px;
    line-height: 100%;
    letter-spacing: -0.11px;
    color: #202224;
    margin: 0;
}

.new-message-button {
    text-transform: none !important;
    font-family: 'BancorpSans', sans-serif !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    padding: 8px 16px !important;
}

.message-list-cards {
    padding: 0.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    max-width: 100%;
}

.message-list-grid {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    margin: 0;
}

.message-item-wrapper {
    padding: 0 !important;
    margin: 0 !important;
    /* Remove gap between cards for tight stacking */
}

.message-item {
    padding: 0.3rem 0.8rem;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(60,60,60,0.04);
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s;
    border: none;
    margin-bottom: 0px;
}

.message-item:hover {
    background-color: #f5f5f5;
}

.message-item.selected {
    background-color: #e3f2fd;
    border-left: 3px solid #81D8D0;
    box-shadow: 0 2px 8px rgba(60,180,200,0.10);
}

.message-card.selected {
    background-color: #e3f2fd;
    border-left: 3px solid #81D8D0;
    box-shadow: 0 2px 8px rgba(60,180,200,0.10);
}

.message-sender {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    margin-bottom: 0.25rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

/* Direct class on message-sender element */
.message-sender.unread {
    color: #202224 !important;
    font-weight: 700;
}

.message-sender.read {
    color: #424242 !important;
    font-weight: 400;
}

/* Ensure MudText doesn't override our colors */
::deep .message-sender.unread,
::deep .message-sender.unread .mud-typography {
    color: #202224 !important;
    font-weight: 700;
}

::deep .message-sender.read,
::deep .message-sender.read .mud-typography {
    color: #424242 !important;
    font-weight: 400;
}

.message-subject {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #666666;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-time {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: #999999;
    flex-shrink: 0;
}

.messages-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}

.pagination-page {
    width: 26px;
    height: 26px;
    min-width:26px;
    border: 1px solid #bdbdbd;
    background: #FFFFFF;
    color: #424242;
    font-size: 0.95rem;
    font-family: inherit;
    margin: 0 0.10rem;
    border-radius: 4px;
    cursor: pointer;
    /* transition: background 0.2s, color 0.2s; */
    outline: none;
    padding: 0;

    
padding-right: 4px;
padding-left: 4px;
font-family: 'BancorpSans', sans-serif;
font-weight: 500;
font-style: Medium;
font-size: 13px;
line-height: 15.47px;
letter-spacing: 0.37px;
text-align: center;
vertical-align: middle;



}
.pagination-page.pagination-active {
    background: #fff;
    /* #81D8D0; */
    color: #000;
    border: 0px !important; 
    /* 1.5px solid #bdbdbd; */
    /* #81D8D0; */
    font-weight: bold;
}
.pagination-arrow {
    width: 1.5rem;
    height: 1.5rem;
    border: 1px solid #bdbdbd;
    background: #fff;
    color: #222;
    font-size: 0.95rem;
    font-family: inherit;
    margin: 0 0.10rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    outline: none;
    padding: 0;
}
.pagination-arrow:disabled, .pagination-page:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    font-size: 0.95rem;
    font-family: 'BancorpSans', sans-serif;
    color: #424242;
    letter-spacing: 1px;
    user-select: none;
    margin: 0 0.10rem;
}


/* .pagination-active {
    background-color: #81D8D0 !important;
    color: #000000 !important;
} */

.message-view-column {
    height: 100%;
    padding: 0 !important;
    overflow: hidden;
    max-width: 100%;
}

.message-view-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #ffffff;
    padding: 0;
    overflow: hidden;
    max-width: 100%;
}

/* Compose Message View */
.compose-message-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem 2rem;
    overflow-y: auto;
    width: 100%;
}

.compose-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.compose-title {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 24px;
    line-height: 24px;
    letter-spacing: 0px;
    vertical-align: middle;
    color: #000000;
    margin: 0;
}

.messages-loan-info {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    color: #00635F;
    margin-top: 4px;
    display: block;
}

.messages-detail-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.close-compose-button {
    color: #666666 !important;
}

.compose-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
}

.compose-field {
    width: 100%;
}

::deep .reply-recipient-field textarea {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: pre-wrap;
}

/* Reduce gap between text field and HelperText */
::deep .compose-field .mud-input-helper-text {
    margin-top: 4px !important;
}

.compose-actions {
    display: flex;
    justify-content: end;
    margin-top: 1rem;
    flex-shrink: 0;
    
}

.send-message-button {
    font-family: 'BancorpSans', sans-serif !important;
    font-weight: 700 !important;
    font-style: normal !important;
    font-size: 16px !important;
    line-height: 100% !important;
    letter-spacing: 0px !important;
    text-align: center !important;
    vertical-align: middle !important;
    color: #000000 !important;
    padding: 12px 24px !important;
    text-transform: none !important;
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed #5CB9BB;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background-color: #fafafa;
    cursor: pointer;
    transition: all 0.2s ease;
}

/*.file-upload-area:hover {
    border-color: #81D8D0;
    background-color: #f0f9f8;
}*/

.file-upload-area.drag-over {
    border-color: #81D8D0;
    background-color: #e0f5f3;
    border-style: solid;
}

.upload-icon {
    color: #81D8D0;
    margin-bottom: 1rem;
}

.upload-text {
    font-family: 'BancorpSans', sans-serif;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 18px;
    line-height: 26px;
    letter-spacing: 0.2%;
    text-align: center;
    color: #161819;
}
.upload-text-or {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #495057;
    margin-bottom: 0.5rem;
}

.browse-files-button {
    text-transform: none !important;
    font-family: 'BancorpSans', sans-serif !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    margin: 0.5rem 0;
    color: #008582 !important;
    letter-spacing: 0px;
    vertical-align: middle;
    /*border-color: #81D8D0 !important;*/
    border: 1px solid #81D8D0 !important;
}

.upload-info {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 400;
    font-size: 12px;
    /*color: #999999;*/
    margin-top: 1rem;
}

.selected-files {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: #f5f5f5;
    border-radius: 4px;
    font-family: 'BancorpSans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #202224;
}

.file-item span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Message Detail View */
.message-detail-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem 2rem 0 2rem;
    overflow-y: auto;
    width: 100%;
}

.message-detail-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.message-detail-sender {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #202224;
}

.message-detail-subject {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #202224;
}

.message-detail-time {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #999999;
}

.message-detail-content {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #373D42;
    white-space: pre-wrap;
    flex: 1;
}

/* Empty State */
.message-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
    text-align: center;
}

.empty-state-icon {
    color: #c0c0c0;
    margin-bottom: 1rem;
    font-size: 64px !important;
    width: 64px !important;
    height: 64px !important;
}

.empty-state-text {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #999999;
    margin: 0;
}

/* Responsive Styles for Messages Page */
@media (max-width: 960px) {
    .messages-list-column {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        height: auto;
        max-height: 50vh;
    }

    .message-view-column {
        border-top: 1px solid #e0e0e0;
        height: auto;
    }

    .messages-header {
        padding: 1rem;
    }

    .messages-title {
        font-size: 20px;
        line-height: 28px;
    }

    .compose-message-view,
    .message-detail-view {
        padding: 1rem;
    }

    .compose-title {
        font-size: 20px;
        line-height: 28px;
    }

    .message-detail-subject {
        font-size: 18px;
    }

    .messages-pagination {
        padding: 0.75rem 1rem;
    }

    .pagination-page,
    .pagination-arrow {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .messages-grid {
        flex-direction: column;
        height: calc(100vh - 60px); /* Account for header */
        height: calc(100dvh - 60px); /* Account for header */
        overflow: hidden;
        max-width: 100vw;
    }

    .messages-list-column {
        height: auto;
        max-height: 45vh;
        min-height: 280px;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        overflow: hidden;
        max-width: 100%;
    }

    .messages-list-container {
        max-height: calc(89vh - 80px); /* Account for header and pagination */
        overflow-y: auto;
        overflow-x: hidden;
    }

    .message-list-cards {
        overflow-y: auto;
        overflow-x: hidden;
        max-width: 100%;
    }

    .message-view-column {
        height: auto;
        flex: 1;
        min-height: 0;
        overflow: hidden;
        max-width: 100vw;
        border-top: 1px solid #e0e0e0;
    }

    .message-view-container {
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        max-width: 100%;
    }

    .messages-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 0.75rem 1rem;
        flex-shrink: 0;
    }

    .messages-title {
        font-size: 18px;
        word-break: break-word;
    }

    .new-message-button {
        width: 100%;
        font-size: 14px !important;
        padding: 10px 16px !important;
    }

    .message-item {
        padding: 0.75rem 1rem;
        word-break: break-word;
    }

    .message-card {
        margin-bottom: 4px !important;
        max-width: 100%;
        overflow: hidden;
    }

    .messages-header-container {
        max-width: 100%;
        overflow: hidden;
    }

    .message-sender {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 70%;
    }

    .message-subject {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .compose-message-view,
    .message-detail-view {
        padding: 0.75rem;
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        max-width: 100%;
    }

    .compose-header {
        margin-bottom: 1rem;
        flex-shrink: 0;
    }

    .compose-title {
        font-size: 18px;
        line-height: 22px;
        word-break: break-word;
    }

    .compose-form {
        gap: 1rem;
        max-width: 100%;
    }

    .compose-field {
        max-width: 100%;
    }

    ::deep .compose-field .mud-input-root {
        max-width: 100%;
    }

    ::deep .compose-field textarea {
        max-width: 100%;
        word-break: break-word;
    }

    .file-upload-area {
        padding: 1.5rem 1rem;
        max-width: 100%;
        overflow: hidden;
    }

    .upload-text {
        font-size: 16px;
        word-break: break-word;
    }

    .browse-files-button {
        width: 100%;
        font-size: 14px !important;
        max-width: 100%;
    }

    .messages-pagination {
        padding: 0.5rem;
        gap: 0.25rem;
        flex-wrap: wrap;
    }

    .pagination-page {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 12px;
        margin: 0 0.05rem;
    }

    .pagination-arrow {
        width: 28px;
        height: 28px;
        font-size: 12px;
        margin: 0 0.05rem;
    }

    .send-message-button,
    .reply-button {
        width: 100%;
        font-size: 14px !important;
        padding: 10px 20px !important;
    }

    .compose-actions {
        justify-content: stretch;
    }

    .messages-reply-btn-container {
        margin-bottom: 1rem;
    }

    .messages-close-icon {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

    .message-sender {
        font-size: 13px;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .message-subject {
        font-size: 13px;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .message-time {
        font-size: 11px;
        flex-shrink: 0;
    }

    .messages-header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        max-width: 100%;
        overflow: hidden;
    }

    .conversation-message {
        padding: 1rem 0.75rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .messages-body {
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    .messages-text-bold-24 {
        font-size: 18px !important;
        word-break: break-word;
    }

    .messages-text-bold-18 {
        font-size: 16px !important;
        word-break: break-word;
    }

    .messages-text-regular-14 {
        font-size: 13px !important;
        word-break: break-word;
    }

    .file-item {
        font-size: 12px;
        padding: 0.5rem;
        max-width: 100%;
        overflow: hidden;
    }

    .file-item span {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .upload-info {
        font-size: 11px;
        word-break: break-word;
    }

    .selected-files {
        max-width: 100%;
    }

    .message-empty-state {
        padding: 1rem;
        max-width: 100%;
    }

    .empty-state-text {
        word-break: break-word;
    }

    /* Fix card content overflow */
    ::deep .message-card .mud-card-content {
        overflow: hidden;
        max-width: 100%;
    }

    /* Fix MudGrid overflow */
    ::deep .messages-grid.mud-grid {
        max-width: 100vw;
        overflow: hidden;
    }

    ::deep .messages-list-column.mud-grid-item,
    ::deep .message-view-column.mud-grid-item {
        max-width: 100%;
        overflow: hidden;
    }

    /* Message thread container */
    .message-thread-container {
        max-width: 100%;
        overflow-x: hidden;
    }

    .messages-reply-view-scrollable {
        max-width: 100%;
        overflow-x: hidden;
    }
}

/* Mobile Landscape - phones in landscape orientation (height < 500px, e.g. iPhone, Android phones) */
@media (orientation: landscape) and (max-height: 500px) {

    /* Force the MudGrid to lay columns side-by-side instead of stacking (xs=12 default) */
    .messages-grid {
        flex-wrap: nowrap !important;
        flex-direction: row !important;
        align-items: stretch !important;
        height: calc(100vh - 64px); /* 64px = MudAppBar default height */
        height: calc(100dvh - 64px); /* 64px = MudAppBar default height */
        overflow: hidden;
    }

    /* Left column: 38% width, flex column so list + pagination stack correctly */
    .messages-list-column {
        flex: 0 0 38% !important;
        max-width: 38% !important;
        width: 38% !important;
        height: 100% !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        border-right: 1px solid #e0e0e0 !important;
        border-bottom: none !important;
        overflow: hidden !important;
    }

    /* List container fills remaining height, leaves room for pagination */
    .messages-list-container {
        flex: 1 !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .message-list-cards {
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Pagination always visible at bottom of left column */
    .messages-pagination {
        flex-shrink: 0 !important;
        padding: 0.3rem 0.5rem;
        gap: 0.2rem;
    }

    .pagination-page {
        width: 24px;
        height: 24px;
        min-width: 24px;
        font-size: 11px;
        margin: 0 0.05rem;
    }

    .pagination-arrow {
        width: 24px;
        height: 24px;
        font-size: 11px;
        margin: 0 0.05rem;
    }

    /* Compact messages header */
    .messages-header {
        padding: 0.4rem 0.75rem;
        flex-shrink: 0;
    }

    .messages-title {
        font-size: 15px;
        line-height: 20px;
    }

    .new-message-button {
        font-size: 12px !important;
        padding: 5px 10px !important;
        width: auto !important;
    }

    /* Right column: fills remaining 62%, fully scrollable */
    .message-view-column {
        flex: 1 1 62% !important;
        max-width: 62% !important;
        width: 62% !important;
        height: 100% !important;
        min-height: 0 !important;
        border-top: none !important;
        overflow: hidden !important;
    }

    .message-view-container {
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Compact compose / detail views */
    .compose-message-view,
    .message-detail-view {
        padding: 0.5rem 0.75rem;
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .compose-header {
        margin-bottom: 0.5rem;
        flex-shrink: 0;
    }

    .compose-title {
        font-size: 15px;
        line-height: 20px;
    }

    .compose-form {
        gap: 0.5rem;
    }

    .file-upload-area {
        padding: 0.75rem;
    }

    .upload-text {
        font-size: 14px;
    }

    .message-detail-header {
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .message-detail-subject {
        font-size: 16px;
    }

    .send-message-button,
    .reply-button {
        width: auto !important;
        font-size: 13px !important;
        padding: 8px 16px !important;
    }

    .compose-actions {
        justify-content: flex-end;
    }
}

/* Tablet specific adjustments */
@media (min-width: 601px) and (max-width: 960px) {
    .messages-list-column {
        min-height: 400px;
    }

    .message-view-column {
        min-height: 500px;
    }

    .compose-message-view,
    .message-detail-view {
        padding: 1.25rem;
    }

    .messages-header {
        padding: 1.25rem;
    }

    .new-message-button {
        font-size: 14px !important;
        padding: 10px 20px !important;
    }
}

/* Desktop/Large screens */
@media (min-width: 1280px) {
    .messages-list-column {
        max-width: 400px;
    }

    .compose-message-view,
    .message-detail-view {
        padding: 2rem 3rem;
        max-width: 100%;
        width: 100%;
    }

    .compose-form {
        gap: 1.75rem;
    }

    .file-upload-area {
        padding: 2.5rem;
    }
}

/* Mobile: Single-panel view for messages (list OR detail, not both) */
/* 56px appbar + 145px footer + 24px padding = ~225px subtracted from viewport */
@media (max-width: 767px) {
    .messages-list-column {
        max-height: none !important;
        height: calc(100vh - 225px) !important;
        height: calc(100dvh - 225px) !important;
        min-height: 0 !important;
        border-bottom: none !important;
    }
    .message-view-column {
        height: calc(100vh - 225px) !important;
        height: calc(100dvh - 225px) !important;
        min-height: 0 !important;
    }
    /* Hide close icon — Back button handles navigation on mobile */
    .messages-close-icon {
        display: none !important;
    }
    .mobile-back-btn-row {
        padding: 0.5rem 1rem;
        border-bottom: 1px solid #e0e0e0;
        flex-shrink: 0;
        background: #fff;
    }
    .mobile-back-button {
        text-transform: none !important;
        color: #008582 !important;
        font-family: 'BancorpSans', sans-serif !important;
        font-weight: 700 !important;
        font-size: 14px !important;
        padding: 4px 8px !important;
        min-width: 0 !important;
    }
}

/* Loan Number Text Styles */
.loan-number-text {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0px;
    color: #000000;
}

/* Responsive: Mobile - Loan Number Text */
@media (max-width: 600px) {
    .loan-number-text {
        font-family: 'BancorpSans', sans-serif;
        font-weight: 400;
        font-size: 0.65rem;
        line-height: 100%;
        letter-spacing: 0px;
        color: #000000;
    }
}

.document-list-container {
    margin-top: 2rem;
    opacity: 1;
    gap: 10px;
    margin-bottom: 1.5rem;
    border-radius: 4px; /* SmallCardRadius - using 8px as standard small card radius */
    border-width: 1px;
    padding: 16px;
    background-color: #FFFFFF;
    border: 1px solid var(--Light-Gray, #E6E6E6);
    transform: rotate(0deg); /* angle: 0 deg */
}
    /* Loan Item Container Styles */
    .loan-item-container {
    opacity: 1;
    gap: 10px;
    margin-bottom: 1.5rem;
    border-radius: 4px; /* SmallCardRadius - using 8px as standard small card radius */
    border-width: 1px;
    background-color: #FFFFFF;
    border: 1px solid var(--Light-Gray, #E6E6E6);
    transform: rotate(0deg); /* angle: 0 deg */
}

/* Data Card Label Styles */
.data-card-label {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    leading-trim: none;
    line-height: 24px;
    letter-spacing: 0px;
    color: #DBF3F0;
    margin-bottom: 0.125rem;
}

/* Responsive: Mobile - Data Card Label */
@media (max-width: 600px) {
    .data-card-label {
        font-family: 'BancorpSans', sans-serif;
        font-weight: 700;
        font-size: 0.75rem;
        line-height: 24px;
        letter-spacing: 0px;
        color: #DBF3F0;
        margin-bottom: 0.25rem;
    }
}

/* Responsive: Small Tablet - Data Card Label */
@media (min-width: 601px) and (max-width: 768px) {
    .data-card-label {
        font-family: 'BancorpSans', sans-serif;
        font-weight: 700;
        font-size: 0.8125rem;
        line-height: 24px;
        letter-spacing: 0px;
        color: #DBF3F0;
    }
}

/* Data Card Value Styles */
.data-card-value {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 700;
    font-size: 24px;
    leading-trim: none;
    line-height: 36px;
    letter-spacing: 0px;
    color: #FFFFFF;
}

/* Responsive: Mobile - Data Card Value */
@media (max-width: 600px) {
    .data-card-value {
        font-family: 'BancorpSans', sans-serif;
        font-weight: 700;
        font-size: 0.875rem;
        line-height: 1.3;
        letter-spacing: 0px;
        color: #FFFFFF;
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* Responsive: Small Tablet - Data Card Value */
@media (min-width: 601px) and (max-width: 768px) {
    .data-card-value {
        font-family: 'BancorpSans', sans-serif;
        font-weight: 700;
        font-size: 0.9375rem;
        line-height: 36px;
        letter-spacing: 0px;
        color: #FFFFFF;
    }
}

/* Responsive: Tablet - Data Card Value */
@media (min-width: 769px) and (max-width: 960px) {
    .data-card-value {
        font-family: 'BancorpSans', sans-serif;
        font-weight: 700;
        font-size: 0.975rem;
        line-height: 36px;
        letter-spacing: 0px;
        color: #FFFFFF;
    }
}

/* Data Card Date Styles */
.data-card-date {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    leading-trim: none;
    line-height: 20.02px;
    letter-spacing: 0.15px;
    text-align: right;
    color: #FFFFFF;
}

/* Responsive: Mobile - Data Card Date */
@media (max-width: 600px) {
    .data-card-date {
        font-family: 'BancorpSans', sans-serif;
        font-weight: 400;
        font-size: 0.625rem;
        line-height: 1.3;
        letter-spacing: 0.15px;
        color: #FFFFFF;
        text-align: right;
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* Responsive: Small Tablet - Data Card Date */
@media (min-width: 601px) and (max-width: 768px) {
    .data-card-date {
        font-family: 'BancorpSans', sans-serif;
        font-weight: 400;
        font-size: 0.65rem;
        line-height: 20.02px;
        letter-spacing: 0.15px;
        color: #FFFFFF;
        text-align: right;
    }
}

/* Detail Label Styles */
.detail-label {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 400;
    font-size: 18px;
    leading-trim: none;
    line-height: 24px;
    letter-spacing: 0px;
    color: #424242;
    margin-bottom: 0.75rem;
}

/* Responsive: Mobile - Detail Label */
@media (max-width: 600px) {
    .detail-label {
        font-family: 'BancorpSans', sans-serif;
        font-weight: 400;
        font-size: 0.65rem;
        line-height: 24px;
        letter-spacing: 0px;
        color: #424242;
        margin-bottom: 0.75rem;
    }
}

/* Responsive: Small Tablet - Detail Label */
@media (min-width: 601px) and (max-width: 768px) {
    .detail-label {
        font-family: 'BancorpSans', sans-serif;
        font-weight: 400;
        font-size: 0.7rem;
        line-height: 24px;
        letter-spacing: 0px;
        color: #424242;
        margin-bottom: 0.75rem;
    }
}

/* Detail Value Styles */
.detail-value {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 700;
    font-size: 18px;
    leading-trim: none;
    line-height: 100%;
    letter-spacing: 0px;
    color: #000000;
    margin-bottom: 1rem;
}

/* Responsive: Mobile - Detail Value */
@media (max-width: 600px) {
    .detail-value {
        font-family: 'BancorpSans', sans-serif;
        font-weight: 700;
        font-size: 0.75rem;
        line-height: 100%;
        letter-spacing: 0px;
        color: #000000;
        margin-bottom: 1rem;
    }
}

/* Responsive: Small Tablet - Detail Value */
@media (min-width: 601px) and (max-width: 768px) {
    .detail-value {
        font-family: 'BancorpSans', sans-serif;
        font-weight: 700;
        font-size: 0.8125rem;
        line-height: 100%;
        letter-spacing: 0px;
        color: #000000;
        margin-bottom: 1rem;
    }
}

/* Loan Progress Label Styles */
.loan-progress-label {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    leading-trim: none;
    line-height: 24px;
    letter-spacing: 0px;
    color: #424242;
    margin-bottom: 1rem;
}

/* Custom Progress Bar Colors for Dashboard */
.custom-progress-bar {
    background-color: #D9D9D9 !important;
}

.custom-progress-bar .mud-progress-linear {
    background-color: #D9D9D9 !important;
}

.custom-progress-bar .mud-progress-linear-bar {
    background-color: #0076AA !important;
}

.custom-progress-bar .mud-progress-linear-bar1 {
    background-color: #0076AA !important;
}

.custom-progress-bar .mud-progress-linear-bar2 {
    background-color: #0076AA !important;
}

.custom-progress-bar .mud-progress-linear-container {
    background-color: #D9D9D9 !important;
}

::deep .custom-progress-bar {
    background-color: #D9D9D9 !important;
}

::deep .custom-progress-bar .mud-progress-linear {
    background-color: #D9D9D9 !important;
}

::deep .custom-progress-bar .mud-progress-linear-bar {
    background-color: #0076AA !important;
}

::deep .custom-progress-bar .mud-progress-linear-bar1 {
    background-color: #0076AA !important;
}

::deep .custom-progress-bar .mud-progress-linear-bar2 {
    background-color: #0076AA !important;
}

::deep .custom-progress-bar .mud-progress-linear-container {
    background-color: #D9D9D9 !important;
}

/* Documents List Styles */
.documents-list {
    width: 100%;
}

.documents-header {
    display: grid;
    grid-template-columns: 1.4fr 1fr 0.4fr 8rem 3rem;
    gap: 1rem;
    padding: 0.5rem 0;
    font-weight: 600;
    color: #202224;
    border-bottom: 1px solid #E0E0E0;
}

.document-header {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 700;
    font-style: Bold;
    font-size: 15px;
    line-height: 20px;
    letter-spacing: 0px;
    vertical-align: middle;
    color: #424242;
    text-align: left;
}

.document-action-header {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 13px;
    line-height: 20px;
    letter-spacing: 0px;
    vertical-align: middle;
    color: #424242;
    text-align: right;
}

.document-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr 0.4fr 8rem 3rem;
    gap: 1rem;
    padding: 1rem 0;
    align-items: start;
    border-bottom: 1px solid #E0E0E0;
}

.document-row:last-child {
    border-bottom: none;
}

.document-detail {
    font-family: 'BancorpSans', sans-serif;
    font-size: 13px;
    color: #424242;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.document-detail .mud-typography {
    font-size: 13px !important;
    text-align: left !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    white-space: normal !important;
}

.document-action {
    display: flex;
    justify-content: center;
    align-items: center;
}

.document-action-btn {
    margin-right: 0;
}

/* Tablet: compress columns before mobile card collapse */
@media (max-width: 1024px) and (min-width: 769px) {
    .documents-header,
    .document-row {
        grid-template-columns: 1.4fr 1fr 0.4fr 7rem 2.5rem;
        gap: 0.5rem;
        font-size: 12px;
    }

    .document-header {
        font-size: 12px !important;
        font-weight: 600 !important;
        line-height: 18px !important;
    }

    .document-detail,
    .document-detail .mud-typography {
        font-size: 12px !important;
    }
}

@media (max-width: 768px) {
    .documents-card {
        margin: 0 !important;
        padding: 0 !important;
    }

    .documents-card .mud-card-content {
        padding: 1rem !important;
    }

    .documents-list {
        padding-right: 0;
    }

    /* Hide the header on mobile */
    .documents-header {
        display: none !important;
    }

    /* Make each document row a card */
    .document-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        padding: 1rem !important;
        border: 1px solid #E0E0E0 !important;
        border-radius: 8px !important;
        margin-bottom: 1rem !important;
        background: #fff !important;
        align-items: flex-start !important;
    }

    .document-row:last-child {
        border-bottom: 1px solid #E0E0E0 !important;
    }

    /* Add labels before each field on mobile */
    .document-detail {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.25rem !important;
        align-items: flex-start !important;
        text-align: left !important;
    }

    .document-detail::before {
        content: attr(data-label);
        font-weight: 700 !important;
        font-size: 12px !important;
        color: #757575 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        text-align: left !important;
    }

    .document-detail .mud-typography {
        font-size: 13px !important;
        color: #424242 !important;
        word-break: break-word !important;
        text-align: left !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
    }

    .document-action {
        justify-content: flex-start !important;
        margin-right: 0 !important;
        padding-top: 0.5rem !important;
        border-top: 1px solid #F5F5F5 !important;
    }
}




/* Messages Component Styles */

/* Buttons */
.messages-new-message-btn {
    background-color: #81D8D0 !important;
    color: #000000 !important;
}

.messages-reply-btn {
    background-color: #81D8D0 !important;
}

/* Icons */
.messages-close-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
    color: #000000 !important;
    filter: brightness(0);
    flex-shrink: 0;
    cursor: pointer;
}

.messages-upload-icon-small {
    width: 36px;
    height: 36px;
}

.messages-upload-icon-large {
    width: 48px;
    height: 48px;
}

/* Form Elements */
.messages-file-input-hidden {
    display: none;
}

/* Layout - Flex Containers */
.messages-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    max-width: 100%;
    overflow: hidden;
}

.messages-header-subject {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
}

.messages-header-to {
    display: flex;
    justify-content: left;
    margin-bottom: 1rem;
}

.messages-reply-btn-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

/* Message Thread */
.messages-thread-container {
    /* Mobile/portrait: viewport minus appbar(3.5rem) + footer(10rem) + back-btn(2.75rem)
       + header/subject/reply(9rem) + main-message-area(8.75rem) ≈ 34rem.
       clamp: min 7rem (always usable) → calc adapts to device → max 24rem (won't dominate view) */
    max-height: clamp(7rem, calc(100dvh - 34rem), 20rem);
    overflow-y: auto;
}

/* Landscape / wider screens: list + detail side-by-side, more vertical space available */
@media (min-width: 840px) {
    .messages-thread-container {
        /* viewport minus appbar(3.5rem) + footer(9rem) + header(5rem) + padding(2.5rem) ≈ 20rem.
           No upper cap — thread fills available space on tall viewports (e.g. iPad Pro 1366px) */
        max-height: calc(100dvh - 20rem);
    }
}

.messages-conversation-message {
    margin-bottom: 1.5rem;
}

.messages-conversation-message-main {
    margin-bottom: 2rem;
}

.messages-content {
    margin-bottom: 1.5rem;
}

.messages-content-compact {
    margin-bottom: 0.5rem;
}

.messages-body {
    color: #333;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Typography - Bancorp Sans Font Styles */
.messages-text-regular-14 {
    font-family: 'The Bancorp Sans';
    font-weight: 400;
    font-size: 14px;
    line-height: 20.02px;
    letter-spacing: 0.15px;
    color: #000000;
}

.messages-text-regular-14-padded {
    font-family: 'The Bancorp Sans';
    font-weight: 400;
    font-size: 14px;
    line-height: 20.02px;
    letter-spacing: 0.15px;
    color: #000000;
    padding-right: 15px;
}

.messages-text-bold-18 {
    font-family: 'The Bancorp Sans';
    font-weight: 700;
    font-size: 18px;
    line-height: 25.74px;
    letter-spacing: 0.15px;
    color: #000000;
}

.messages-text-bold-24 {
    font-family: 'The Bancorp Sans';
    font-weight: 700;
    font-size: 24px;
}

/* Empty State */
.messages-no-messages-state {
    padding: 2rem;
    text-align: center;
    color: #666;
}

/* Margins */
.messages-margin-bottom-sm {
    margin-bottom: 0.5rem;
}

.messages-margin-bottom-md {
    margin-bottom: 0.75rem;
}

.messages-margin-bottom-lg {
    margin-bottom: 1rem;
}

.messages-margin-bottom-xl {
    margin-bottom: 1.5rem;
}

/* Reply View */
.messages-reply-view-scrollable {
    max-height: calc(100vh - 150px);
    max-height: calc(100dvh - 150px);
    overflow-y: auto;
}

/* Message Detail View */
.messages-detail-view-section {
    margin-top: 2rem;
    border-top: 1px solid #e0e0e0;
    padding-top: 1.5rem;
}

.message-badge {
        margin-left: 8px;
        color: #ffffff !important;
        font-weight: 600;
        font-size: 14px;
    }
    
/* Notification Banner Styles */
.notification-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    
    background-color: #DCF5F1;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    display: flex;
    align-items: center;
    width: 30px;
    height: 30px;
    color:#000000;
}

.notification-text {
    font-family: 'The Bancorp Sans';
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0px;
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-thickness: 0%;
    text-decoration-skip-ink: auto;
    color : #000000;
}

.notification-close {
    cursor: pointer;
    width: 14px;
    height: 14px;
    color:#000000;
}

.notification-close:hover {
    opacity: 0.7;
}


/* Modal Overlay */
.payment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1300;
    padding: 1rem;
}

.payment-modal-container {
    background: white;
    border-radius: 4px;
    max-width: 1000px;
    width: 100%;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 11px 15px -7px rgba(0,0,0,0.2), 0 24px 38px 3px rgba(0,0,0,0.14), 0 9px 46px 8px rgba(0,0,0,0.12);
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    background: white;
    position: relative;
}

.modal-title {
    font-weight: 600;
    margin: 0;
    font-size: 1.125rem;
}

.modal-header .mud-icon-button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Modal Content */
.modal-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding:10px;
}

/* Modal Footer */
.modal-footer {
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 0;
    flex-shrink: 0;
}

/* PDF Viewer Container */
.pdf-viewer-container {
    display: flex;
    flex-direction: column;
    background: white;/*#525252;*/
    height: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* PDF Toolbar - Dark Theme */
.pdf-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #323232;
    color: white;
    padding: 0.5rem 1rem;
    height: 48px;
    gap: 1rem;
    flex-shrink: 0;
}

.pdf-toolbar-left,
.pdf-toolbar-center,
.pdf-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pdf-toolbar-center {
    flex: 1;
    justify-content: center;
}

.pdf-toolbar .toolbar-icon,
.pdf-toolbar .mud-icon-button {
    color: white !important;
}

.pdf-toolbar .mud-icon-button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.document-name {
    font-family: 'BancorpSans', sans-serif;
    font-size: 14px;
    color: #424242;
    text-align: left;
    margin-left: 0.5rem;
}

.page-indicator,
.zoom-level {
    color: white;
    min-width: 45px;
    text-align: center;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 0.25rem;
}

/* PDF Document Page Container */
.pdf-document-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 0.25rem;
    display: flex;
    justify-content: center;
}

/* PDF Document Page */
.pdf-document-page {
    background: white;
    padding: 1.5rem 0.5rem;
    max-width: 850px;
    width: 100%;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #000000; */
    margin-bottom: 1.5rem;
}

/* Document Header */
.document-header {
    padding-bottom: 1rem;
}

.ach-payment-header-content {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1rem;
}

.ach-payment-logo {
    max-width: 300px;
    height: auto;
    display: block;
}

.ach-payment-header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 2px solid #6B8AB5;
    padding-left: 1rem;
    line-height: 1.2;
    height: 67px;
}

.small-business-text {
    color: #6B8AB5;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1px;
    font-family: 'BancorpSans', sans-serif;
}

.lending-text {
    color: #6B8AB5;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1px;
    font-family: 'BancorpSans', sans-serif;
}

.document-logo {
    max-width: 300px;
    height: auto;
    display: block;
    margin-bottom: 0.5rem;
}

.document-logo-with-text {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-subtitle {
    color: #6B8AB5 !important;
    font-size: 0.85rem !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.document-title {
    font-weight: 700;
    text-transform: uppercase;
    margin: 1.5rem 0;
    letter-spacing: 0.5px;
    color: #4A5568;
    font-size: 1.1rem;
}

.document-text {
    text-align: justify;
    line-height: 1.6;
    margin-bottom: 0.875rem;
    color: #424242;
    font-size: 0.85rem;
}

.document-note {
    color: #424242;
    font-size: 0.75rem;
    margin: 0.5rem 0 0.75rem 0;
    font-weight: 700;
    /* font-style: italic; */
}

.document-body {
    padding: 0.5rem 0;
}

/* Form Section Headers */
.form-section-header {
    background: #5A8A7E;
    color: white;
    padding: 0.5rem 1rem;
    margin: 1.5rem 0 1rem 0;
    font-weight: 600;
    text-transform: none;
    font-size: 16px;
    letter-spacing: 0.3px;
}

/* ============================================================
   Loan Details Overlay Panel (Messages Page)
   ============================================================ */

/* Hyperlink style for the loan info in the message thread header */
.messages-loan-info-link {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    color: #00635F;
    margin-top: 4px;
    display: block;
    cursor: pointer;
    text-decoration: underline;
    background: none;
    border: none;
    padding: 0;
    text-align: left;
}

.messages-loan-info-link:hover {
    color: #004d4a;
    text-decoration: underline;
}

.messages-loan-info-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    text-align: left;
    display: block;
}

.messages-compose-loan-preview {
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    padding: 12px 16px;
    background: #F9FDFD;
    width: 100%;
    transition: background 0.2s, border-color 0.2s;
}

.messages-compose-loan-preview:hover {
    background: #EFF8F8;
    border-color: #5CB9BB;
}

/* Backdrop behind the overlay */
.loan-details-overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1200;
}

/* Slide-in panel */
.loan-details-overlay-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 360px;
    max-width: 100vw;
    height: 100%;
    background: #ffffff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
    z-index: 1201;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Panel header */
.loan-details-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.25rem 0.75rem 1.25rem;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.loan-details-panel-title {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 24px;
    color: #202224;
    margin: 0 0 4px 0;
}

.loan-details-panel-subtitle {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #555;
    margin: 0;
}

.loan-details-panel-close {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    object-fit: contain;
    filter: brightness(0);
    opacity: 0.6;
}

.loan-details-panel-close:hover {
    opacity: 1;
}

/* Scrollable body */
.loan-details-panel-body {
    overflow-y: auto;
    flex: 1;
    padding: 0;
}

/* Each row */
.loan-details-panel-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
}

.loan-details-panel-label {
    font-family: 'BancorpSans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #6b7280;
    flex: 1;
}

.loan-details-panel-value {
    font-family: 'BancorpSans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #202224;
    text-align: right;
    flex: 1;
}

@media (max-width: 600px) {
    .loan-details-overlay-panel {
        width: 100vw;
    }
}

/* PART section headers with payments-subtitle class */
::deep .payments-subtitle.mud-typography-subtitle1 {
    background: #485A73;
    color: white !important;
    padding: 0.5rem 1rem;
    margin: 1.5rem 0 1rem 0;
    font-weight: 600 !important;
    text-transform: none;
    font-size: 0.875rem !important;
    letter-spacing: 0.3px;
}

/* Account Type Header */
.account-type-header {
    color: #4A5568;
    font-weight: 600;
    margin: 1rem 0 0.5rem 0;
    font-size: 0.9rem;
}

/* Radio Group Styling */
.account-type-radio-group {
    margin-bottom: 1rem;
}

.radio-group-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.radio-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.radio-label {
    font-weight: 500;
    color: #424242;
    min-width: 80px;
    font-size: 0.875rem;
}

.radio-row .mud-radio {
    margin-right: 1.5rem;
}

.radio-row .mud-button-root {
    font-size: 0.875rem;
}

/* Payment Options Styling */
.payment-options-radio-group {
    margin: 1rem 0;
}

.payment-option-item {
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
}

.payment-option-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

/* Ensure MudRadio is top-aligned */
.payment-option-row .mud-radio {
    align-self: flex-start;
    margin-top: 0;
}

.payment-option-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.payment-option-text {
    color: #424242;
    font-size: 0.875rem;
    line-height: 1.5;
}

.inline-field-group {
    display: inline;
    color: #424242;
    font-size: 0.875rem;
    line-height: 1.5;
}

.inline-field-group > span {
    display: inline;
}

.inline-field-group .inline-amount-field {
    display: inline-flex;
    vertical-align: middle;
}

.inline-amount-field {
    width: 140px;
    max-width: 140px;
    min-width: 140px;
    display: inline-flex;
    margin: 0 0.25rem;
    flex-shrink: 0;
}

.inline-amount-field .mud-input-root {
    font-size: 0.875rem;
    width: 100%;
}

.inline-amount-field .mud-input {
    width: 100%;
}

.inline-amount-field .mud-input-outlined {
    width: 100%;
}

.field-helper {
    font-size: 0.7rem;
    color: #6B8AB5;
    font-style: italic;
    display: block;
    margin-top: 0.25rem;
    margin-left: 0;
    text-align: center;
}

.checkbox-group {
    display: inline-flex;
    gap: 1rem;
    margin-left: 0.5rem;
}

.checkbox-group .mud-checkbox {
    margin-right: 0;
}

.payment-note {
    font-style: italic;
    color: #5a6c7d;
    margin-left: 0.5rem;
    margin-top: 0.25rem;
}

/* Form Grid Section */
.form-grid-section {
    margin-top: 0.5rem !important;
}

/* Field Labels */
.field-label {
    color: #5a6c7d;
    font-size: 0.7rem !important;
    margin-bottom: 0.25rem;
    display: block;
}

/* Underline Text Fields */
.underline-field .mud-input-root {
    border-bottom: 1px solid #d0d0d0 !important;
    padding-bottom: 0.25rem;
}

.underline-field .mud-input-root:before {
    display: none !important;
}

.underline-field .mud-input-root:after {
    display: none !important;
}

.underline-field .mud-input {
    font-size: 0.875rem !important;
    padding: 0.25rem 0 !important;
}

.underline-field .mud-input-label {
    display: none !important;
}

/* Dialog Submit Button */
.dialog-submit-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 1.25rem 1rem;
    background: white;
}

.submit-button {
    background: #5BC5C1 !important;
    color: white !important;
    padding: 0.625rem 3rem !important;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.submit-button:hover {
    background: #4ab4b0 !important;
}

.submit-button:disabled {
    background: #b0b0b0 !important;
}

/* Utility Classes */
.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.my-4 {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

/* Form Field Styling */
.pdf-document-page .mud-input-control-margin-dense {
    margin-top: 6px !important;
    margin-bottom: 6px !important;
}

.pdf-document-page .mud-input-outlined {
    background: white !important;
}

.pdf-document-page .mud-input-outlined .mud-input-root {
    font-size: 0.875rem !important;
}

.pdf-document-page .mud-input-label {
    font-size: 0.8125rem !important;
}

/* Scrollbar Styling for PDF Document Container */
.pdf-document-container::-webkit-scrollbar {
    width: 10px;
}

.pdf-document-container::-webkit-scrollbar-track {
    background: #424242;
}

.pdf-document-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

.pdf-document-container::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Responsive Design */
@media (max-width: 960px) {
    .payment-modal-overlay {
        padding: 0;
    }

    .payment-modal-container {
        max-width: 100%;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .pdf-document-container {
        padding: 0.5rem 0.1rem;
    }

    .pdf-document-page {
        padding: 1rem 0.5rem;
        margin-bottom: 1rem;
    }

    .form-section-header {
        margin: 1rem -0.5rem 0.75rem -0.5rem;
        font-size: 0.7rem;
    }

    .pdf-toolbar {
        flex-wrap: wrap;
        height: auto;
        padding: 0.5rem;
    }

    .toolbar-divider {
        display: none;
    }
}

.payments-header {
    margin-bottom: 1rem;
}

.payments-subtitle {
    color: #373D42;
    margin-bottom: 0.75rem;
    font-family: 'BancorpSans', sans-serif !important;
font-weight: 400;
font-style: Regular;
font-size: 14px;
leading-trim: NONE;
line-height: 24px;
letter-spacing: 0px;

}

.payments-submit-button {
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #81D8D0 !important;
    font-family: 'BancorpSans', sans-serif !important;
    font-weight: 700 !important;
    font-style: Bold;
    font-size: 16px !important;
    leading-trim: none;
    line-height: 100% !important;
    letter-spacing: 0px !important;
    text-align: center !important;
    vertical-align: middle;
    color: #000000 !important;
    text-transform: none !important;
}

::deep .payments-submit-button span {
    color: #000000 !important;
    font-family: 'BancorpSans', sans-serif !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    line-height: 100% !important;
    letter-spacing: 0px !important;
}

.payments-history-section {
    margin-top: 2rem;
}

.payments-section-title {
    margin-bottom: 1.25rem;
    font-family: 'BancorpSans', sans-serif !important;
    font-weight: 700;
    font-style: Bold;
    font-size: 24px;
    line-height: 28px;
    letter-spacing: 0px;
    vertical-align: middle;
    color:#202224 !important;
}

.payments-table {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 1rem 1.5rem;
}

.payments-header-row,
.payments-row {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 0.3fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e6e6e6;
}

.payments-header-row {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 600;
}

.payments-row:last-child {
    border-bottom: none;
}

.payments-empty-state {
    padding: 1rem 0;
    color: #6b7280;
}

.payments-questions-section {
    max-width: 720px;
    margin-top: 3rem;
}

.payments-faq-panels {
    margin-bottom: 0;
    margin-top: 1.25rem;
}

.payments-faq-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.payments-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 0;
    color: #373D42;
    font-weight: 700;
    font-family: 'BancorpSans', sans-serif;
    font-style: Bold;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0px;
    margin: 0;
}

.payments-custom-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    position: relative;
}

.payments-faq-answer {
    font-family: 'BancorpSans', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0px;
    color: #373D42;
    padding: 0.5rem 0;
}

/* Hide default MudBlazor expand/collapse icons */
::deep .payments-faq-panel .mud-expand-panel-header .mud-icon-button {
    filter: brightness(0) saturate(0%) opacity(0) !important;
    visibility: hidden !important;
    position: absolute;
    width: 0;
    height: 0;
    padding: 0;
    margin: 0;
    pointer-events: none;
}

::deep .payments-faq-panel .mud-expand-panel-header button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

::deep .payments-faq-panels .mud-expand-panel-header .mud-icon-button {
    filter: brightness(0) saturate(0%) opacity(0) !important;
    visibility: hidden !important;
}

/* Remove elevation from payments-faq-panel (mud-expand-panel) */
.payments-faq-panel.mud-elevation-1 {
    box-shadow: none !important;
}

/* Responsive Styles for Payments Page */
@media (max-width: 960px) {
    .payments-header {
        max-width: 100%;
        margin-bottom: 1rem;
    }

    .payments-table {
        padding: 0.75rem 1rem;
    }

    .payments-header-row,
    .payments-row {
        grid-template-columns: 1fr 1fr 0.4fr;
        gap: 0.5rem;
        padding: 0.75rem 0;
    }

    .payments-header-row {
        font-size: 0.8rem;
    }

    .payments-date,
    .payments-submitted {
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .payments-header {
        margin-bottom: 1.5rem;
    }

    .payments-submit-button {
        width: 100%;
        margin-top: 1rem;
        background-color:#81D8D0 !important;
    }

    .payments-section-title {
        font-size: 1.1rem;
    }

    .payments-table {
        padding: 0.5rem;
        box-shadow: none;
        border: 1px solid #e6e6e6;
    }

    .payments-header-row {
        display: none;
    }

    .payments-row {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1rem 0.5rem;
        position: relative;
    }

    .payments-date::before {
        content: "Date Submitted: ";
        font-weight: 600;
        color: #6b7280;
        margin-right: 0.25rem;
    }

    .payments-submitted::before {
        content: "Submitted By: ";
        font-weight: 600;
        color: #6b7280;
        margin-right: 0.25rem;
    }

    .payments-action {
        position: absolute;
        top: 1rem;
        right: 0.5rem;
    }

    .payments-questions-section {
        margin-top: 2rem;
    }

    .payments-faq-panels {
        margin-top: 0.75rem;
    }
}
::deep .mud-alert-text-warning{
    color: #000 !important;
}

::deep .mud-button-outlined.mud-button-outlined-primary {
    color: #008582;
    --mud-ripple-color: #008582;
    border: 1px solid #81D8D0;
}
