/* ═══════════════════════════════════════════════════
   CreditorWeb Design System
   Style: Swiss Modernism 2.0 + Minimal Swiss (Inter)
   Palette: B2B Service (Professional Navy)
   ═══════════════════════════════════════════════════ */

/* ─── Design Tokens ─── */
:root {
    /* Modern Fintech Palette */
    --primary:        #025392; /* Brand Navy */
    --primary-hover:  #024173; /* Darker Navy */
    --primary-light:  #e6f4ff; /* Light Cyan */
    --secondary:      #00AEFF; /* Brand Cyan */
    --accent:         #00AEFF; /* Brand Cyan */
    
    /* Override Bootstrap Variables to Ensure App-Wide Branding */
    --bs-primary: #025392;
    --bs-primary-rgb: 2, 83, 146;
    --bs-secondary: #00AEFF;
    --bs-secondary-rgb: 0, 174, 255;
    --bs-info: #00AEFF;
    --bs-info-rgb: 0, 174, 255;

    --navy-dark:      #0f172a; /* Slate 900 */
    --navy-light:     #334155; /* Slate 700 */
    --gold:           #f59e0b; /* Amber 500 */
    --gold-light:     #fef3c7; /* Amber 100 */

    /* Semantic Colors */
    --success:        #10b981; /* Emerald 500 */
    --success-light:  #d1fae5; /* Emerald 100 */
    --warning:        #f59e0b; /* Amber 500 */
    --warning-light:  #fef3c7; /* Amber 100 */
    --danger:         #ef4444; /* Red 500 */
    --danger-light:   #fee2e2; /* Red 100 */
    --info:           #0ea5e9; /* Sky 500 */
    --info-light:     #e0f2fe; /* Sky 100 */

    /* Surface & Background */
    --bg-body:        #f8fafc; /* Clean off-white */
    --bg-surface:     #ffffff; /* White */
    --bg-muted:       #ffffff; /* White Sidebar */
    --bg-hover:       #f1f5f9; /* Slate 100 hover */

    /* Text */
    --text-primary:   #0f172a; /* Slate 900 */
    --text-secondary: #475569; /* Slate 600 */
    --text-muted:     #94a3b8; /* Slate 400 */
    --text-inverse:   #ffffff;

    /* Borders */
    --border:         #e2e8f0; /* Slate 200 */
    --border-hover:   #cbd5e1; /* Slate 300 */

    /* Spacing (8px base unit – Swiss grid) */
    --space-1: 0.25rem;   /* 4px  */
    --space-2: 0.5rem;    /* 8px  */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */

    /* Radii */
    --radius-sm:   0.25rem;
    --radius-md:   0.375rem;
    --radius-lg:   0.5rem;
    --radius-xl:   0.75rem;
    --radius-2xl:  1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs:  0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm:  0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.04);
    --shadow-md:  0 8px 12px -1px rgba(0,0,0,0.06), 0 4px 6px -2px rgba(0,0,0,0.03);
    --shadow-lg:  0 12px 24px -3px rgba(0,0,0,0.08), 0 8px 12px -4px rgba(0,0,0,0.03);

    /* Layout */
    --sidebar-width: 200px; /* Standard wide sidebar */
    --header-height: 60px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}



/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: var(--space-3);
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }


/* ═══════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════ */
.app-container { display: flex; width: 100%; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-muted);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0; top: 0;
    z-index: 1040;
    overflow-x: hidden;
    white-space: nowrap;
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 10px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    flex-shrink: 0;
    background: var(--bg-muted);
}

.sidebar-brand-text {
    font-size: 1.50rem;
    font-weight: 700;
    margin-left: 12px;
    display: inline-flex;
    align-items: baseline;
    line-height: 1;
    letter-spacing: -0.35px;
    white-space: nowrap;
}

.sidebar-brand-client {
    color: #0f172a;
}

.sidebar-brand-portal {
    color: #0ea5ff;
    margin-left: 4px;
}

/* Nav */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-2) 0;
    list-style: none;
    margin: 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.sidebar-nav::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.sidebar-nav-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: var(--space-2);
    margin-bottom: var(--space-1);
    padding-left: var(--space-5);
}

.sidebar-nav .nav-item { margin-bottom: var(--space-1); }

.sidebar-nav .nav-link {
    display: flex;
    flex-direction: row; /* Icon next to text */
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    padding: 0.375rem var(--space-3);
    margin: 0 var(--space-2);
    color: #000000;
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    transition: all var(--transition-fast);
    cursor: pointer;
    gap: 10px;
    -webkit-text-size-adjust: 100%;
}

.sidebar-nav .nav-link:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-nav .nav-link.active {
    background-color: var(--primary-light);
    color: var(--text-primary);
    font-weight: 700;
}

.nav-link-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.9;
}

.nav-link-icon i.fi {
    font-size: 18px;
}

.nav-link-text {
    display: block;
}

.sidebar-footer {
    padding: var(--space-3);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--bg-muted);
}

/* Animated Sidebar Icons on Hover */
.sidebar-nav .nav-link:hover .nav-link-icon i.fi {
    animation: icon-bounce var(--transition-base) forwards;
}

/* Specific item hover animations */
#nav-dashboard:hover .nav-link-icon i.fi {
    animation: icon-wobble 0.4s ease-in-out;
}

#nav-reports:hover .nav-link-icon i.fi {
    animation: bar-rise-1 0.5s ease-in-out;
}

#nav-newbusiness:hover .nav-link-icon i.fi {
    animation: doc-bounce 0.5s ease-in-out;
}

#nav-download:hover .nav-link-icon i.fi {
    animation: arrow-slide-down 0.6s ease-in-out;
}

#nav-upload:hover .nav-link-icon i.fi {
    animation: arrow-slide-up 0.6s ease-in-out;
}

#nav-help:hover .nav-link-icon i.fi {
    animation: icon-rotate 0.5s ease-in-out;
}

#nav-admin:hover .nav-link-icon i.fi {
    animation: icon-spin 1.5s linear infinite;
}

/* Keyframe Animations */
@keyframes icon-wobble {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg) scale(1.1); }
    75% { transform: rotate(10deg) scale(1.1); }
    100% { transform: rotate(0deg) scale(1); }
}

@keyframes bar-rise-1 {
    0% { transform: scaleY(1); transform-origin: bottom; }
    50% { transform: scaleY(1.3); transform-origin: bottom; }
    100% { transform: scaleY(1); transform-origin: bottom; }
}

@keyframes doc-bounce {
    0% { transform: translateY(0); }
    50% { transform: translateY(-4px) scale(1.05); }
    100% { transform: translateY(0); }
}

@keyframes arrow-slide-down {
    0% { transform: translateY(0); }
    40% { transform: translateY(3px); opacity: 0.8; }
    41% { transform: translateY(-3px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes arrow-slide-up {
    0% { transform: translateY(0); }
    40% { transform: translateY(-3px); opacity: 0.8; }
    41% { transform: translateY(3px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes icon-rotate {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(20deg); }
    100% { transform: rotate(0deg); }
}

@keyframes icon-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* ═══════════════════════════════════════
   MAIN CONTENT AREA
   ═══════════════════════════════════════ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

.top-header {
    height: var(--header-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-6);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.header-user {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-shrink: 0;
}

.top-header-left {
    min-width: 0;
}

.top-header-left .page-header {
    width: 100%;
    margin-right: 2rem;
}

.content-wrapper {
    padding: var(--space-6) clamp(1.5rem, 4vw, 5rem);
    flex: 1;
    width: 100%;
    min-width: 0;
}

@media (max-width: 1200px) {
    .top-header {
        height: auto;
        min-height: var(--header-height);
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }

    .header-user {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .content-wrapper {
        padding: 1rem;
    }
}


/* ═══════════════════════════════════════
   CARDS
   ═══════════════════════════════════════ */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--transition-base);
}

.card:hover { box-shadow: var(--shadow-sm); }

.card-header {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
    background: transparent;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.card-body { padding: var(--space-5); }


/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.btn, .btn-sm, .btn-lg {
    border-radius: var(--radius-md);
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    font-size: 0.875rem;
    height: 38px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--text-inverse);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--text-inverse);
}

.btn-success { background-color: var(--success); border-color: var(--success); color: var(--text-inverse); }
.btn-success:hover { background-color: #059669; border-color: #059669; color: var(--text-inverse); }

.btn-danger { background-color: var(--danger); border-color: var(--danger); color: var(--text-inverse); }
.btn-danger:hover { background-color: #dc2626; border-color: #dc2626; color: var(--text-inverse); }

.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}
.btn-outline-primary:hover {
    background: var(--primary);
    color: var(--text-inverse);
}

.btn-light {
    background: var(--bg-muted);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-light:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}


/* ═══════════════════════════════════════
   TABLES
   ═══════════════════════════════════════ */
.table {
    font-size: 0.875rem;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table thead th {
    font-weight: 600;
    color: #000000;
    background: #F8F9FA; /* Light gray */
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: #000000;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover,
.table tbody tr.selected {
    background-color: #F4FBF7; /* Mint green tint */
}


/* ═══════════════════════════════════════
   FORMS
   ═══════════════════════════════════════ */
.form-control, .form-select {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    color: var(--text-primary);
    background-color: var(--bg-surface);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    outline: none;
}

.form-label {
    font-weight: 500;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-1);
}


/* ═══════════════════════════════════════
   BADGES & STATUS
   ═══════════════════════════════════════ */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
}

.badge-success { background: var(--success-light); color: #065f46; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-danger  { background: var(--danger-light);  color: #991b1b; }
.badge-info    { background: var(--info-light);    color: #1e40af; }


/* ═══════════════════════════════════════
   SESSION TIMER (countdown)
   ═══════════════════════════════════════ */
#countdown {
    font-size: 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    padding: 0.25rem 0.75rem !important;
    border-radius: var(--radius-full) !important;
    margin: 0 !important;
    white-space: nowrap;
}


/* ═══════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #B9DCF7 0%, #D8EBF9 45%, #EFF6FC 100%);
    padding: var(--space-6);
}

.login-card {
    background: var(--bg-surface);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    padding: var(--space-10);
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border);
}

.login-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    letter-spacing: -0.02em;
}

.login-card h2 {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

.login-card .form-floating {
    margin-bottom: var(--space-4);
}

.login-card .btn-primary {
    height: 44px;
    font-size: 0.9375rem;
    margin-top: var(--space-2);
}

.auth-corner-logo {
    position: fixed;
    top: 34px;
    left: 34px;
    z-index: 20;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    pointer-events: none;
}

.auth-corner-logo img {
    display: block;
    width: min(188px, 22vw);
    height: auto;
    max-width: none;
    filter: drop-shadow(0 4px 10px rgba(15, 76, 129, 0.16));
    opacity: 0.98;
}

@media (max-width: 768px) {
    .auth-corner-logo {
        top: 16px;
        left: 16px;
    }

    .auth-corner-logo img {
        width: min(142px, 40vw);
        height: auto;
    }
}

.login-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
}

.login-brand-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
}

.login-brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}


/* ═══════════════════════════════════════
   PAGE HEADER
   ═══════════════════════════════════════ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
}

.page-header h1 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0;
}


/* ═══════════════════════════════════════
   LEGACY SUPPORT
   ═══════════════════════════════════════ */
.componentWrapper {
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    background: var(--bg-surface);
    box-shadow: var(--shadow-xs);
    margin-bottom: var(--space-6);
}

.componentWrapper .header {
    position: absolute;
    margin-top: -32px;
    margin-left: 10px;
    color: var(--text-inverse);
    background: var(--primary);
    border-radius: var(--radius-md);
    padding: 2px 12px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.required:after {
    content: " *";
    color: var(--danger);
}

/* Alert overrides for countdown */
.alert-info  { background: var(--info-light); color: #1e40af; border: none; }
.alert-danger { background: var(--danger-light); color: #991b1b; border: none; }


/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 991.98px) {
    /* The sidebar becomes a native bottom navigation bar */
    .sidebar {
        width: 100% !important;
        height: 65px !important;
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        flex-direction: row !important;
        border-right: none !important;
        border-top: 1px solid var(--border) !important;
        background: var(--bg-muted) !important;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.05) !important;
        transform: none !important;
        z-index: 1040 !important;
    }

    .sidebar-brand {
        display: none !important; /* Hide brand bar on mobile */
    }

    .sidebar-nav {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 0 6px !important;
        gap: 4px;
        width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        margin: 0 !important;
        scrollbar-width: none;
    }

    .sidebar-nav::-webkit-scrollbar {
        display: none;
    }

    .sidebar-nav-label {
        display: none !important;
    }

    .sidebar-nav .nav-item {
        margin-bottom: 0 !important;
        flex: 0 0 auto !important;
        max-width: none !important;
        min-width: 72px;
    }

    .sidebar-nav .nav-link {
        padding: 0.2rem 0.35rem !important;
        border-radius: var(--radius-md) !important;
        font-size: 0.6875rem !important;
        gap: 2px !important;
        min-height: 54px;
    }

    .nav-link-icon {
        width: 20px !important;
        height: 20px !important;
    }

    .nav-link-icon i.fi {
        font-size: 18px !important;
    }

    /* Shift main content so bottom bar doesn't cover anything */
    .main-content {
        margin-left: 0 !important;
        margin-bottom: 65px !important;
    }

    .top-header {
        padding: 0.5rem 0.75rem;
    }

    .top-header-left .page-header {
        margin-right: 0;
    }

    .sidebar-backdrop {
        display: none !important;
    }

    .sidebar-footer {
        display: none !important;
    }
}


/* ═══════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════ */
.text-secondary { color: var(--text-secondary) !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info    { color: var(--info) !important; }

.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

/* ─── Compact Form Styles ─── */
.card-compact {
    margin-bottom: var(--space-3) !important;
    border-radius: var(--radius-lg) !important;
}
.card-compact .card-body {
    padding: var(--space-4) !important;
}
.card-compact .card-header {
    padding: var(--space-3) var(--space-4) !important;
}
.form-compact .form-control, 
.form-compact .form-select {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.825rem !important;
}
.form-compact .form-label {
    margin-bottom: 2px !important;
    font-size: 0.75rem !important;
}


/* ═══════════════════════════════════════
   GLOBAL CUSTOM LOADER (ENTERPRISE)
   ═══════════════════════════════════════ */
.global-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Offset loader for layout with sidebar (desktop) */
.app-container > .global-loader-overlay {
    left: var(--sidebar-width, 85px);
    width: calc(100vw - var(--sidebar-width, 85px));
}

@media (max-width: 991.98px) {
    .app-container > .global-loader-overlay {
        left: 0 !important;
        width: 100vw !important;
        height: calc(100vh - 65px) !important;
    }
}

.global-loader-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.global-loader-overlay .loader-container {
    min-width: 220px;
    min-height: 120px;
    padding: 1.25rem 1.5rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.global-loader-overlay .leapfrog-container {
    --uib-size: 44px;
    --uib-color: var(--primary);
    --uib-speed: 2.3s;
    --uib-dot-size: calc(var(--uib-size) * 0.18);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: var(--uib-size);
    height: var(--uib-size);
}

    .global-loader-overlay .leapfrog-container .dot {
        position: absolute;
        top: 0;
        left: 0;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        height: 100%;
    }

        .global-loader-overlay .leapfrog-container .dot::before {
            content: '';
            display: block;
            width: calc(var(--uib-size) * 0.22);
            height: calc(var(--uib-size) * 0.22);
            border-radius: 50%;
            background-color: var(--uib-color);
            transition: background-color 0.3s ease;
        }

        .global-loader-overlay .leapfrog-container .dot:nth-child(1) {
            animation: leapFrog var(--uib-speed) ease infinite;
        }

        .global-loader-overlay .leapfrog-container .dot:nth-child(2) {
            transform: translateX(calc(var(--uib-size) * 0.4));
            animation: leapFrog var(--uib-speed) ease calc(var(--uib-speed) / -1.5) infinite;
        }

        .global-loader-overlay .leapfrog-container .dot:nth-child(3) {
            transform: translateX(calc(var(--uib-size) * 0.8)) rotate(0deg);
            animation: leapFrog var(--uib-speed) ease calc(var(--uib-speed) / -3) infinite;
        }

@keyframes leapFrog {
    0% {
        transform: translateX(0) rotate(0deg);
    }

    33.333% {
        transform: translateX(0) rotate(180deg);
    }

    66.666% {
        transform: translateX(calc(var(--uib-size) * -0.38)) rotate(180deg);
    }

    99.999% {
        transform: translateX(calc(var(--uib-size) * -0.78)) rotate(180deg);
    }

    100% {
        transform: translateX(0) rotate(0deg);
    }
}

.global-loader-overlay .loader-text {
    margin-top: 0.9rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    text-align: center;
    animation: pulse-text 1.4s infinite ease-in-out;
}

@keyframes pulse-text {
    0%, 100% {
        opacity: 0.65;
    }

    50% {
        opacity: 1;
    }
}

/* Custom Confirm Modal Backdrop blur */
.modal-backdrop.show {
    backdrop-filter: blur(5px) !important;
    background-color: rgba(10, 18, 30, 0.4) !important;
    opacity: 1 !important;
    transition: all 0.3s ease;
}

/* Premium Toast Styling */
.toast-container .toast {
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
    border-radius: var(--radius-lg, 8px);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15) !important;
    overflow: hidden;
}

/* ═══════════════════════════════════════
   FLOATING ACTION BUTTON (WALKTHROUGH)
   ═══════════════════════════════════════ */
#fab-walkthrough {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1070;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(var(--bs-primary-rgb), 0.4);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, bottom 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 0;
}

#fab-walkthrough:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 28px rgba(var(--bs-primary-rgb), 0.5);
}

#fab-walkthrough.hidden {
    bottom: -80px;
    opacity: 0;
    pointer-events: none;
}

.pulse-animation {
    animation: fab-pulse 2s infinite;
}

@keyframes fab-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(var(--bs-primary-rgb), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0);
    }
}
