/* ==========================================================================
   FINCAP FINANCE - CUSTOMER PORTAL THEME & BRANDING OVERRIDES
   ========================================================================== */

:root {
    --bs-primary: #003B86 !important;
    --bs-primary-rgb: 0, 59, 134 !important;
    --bs-primary-hover: #002D6B !important;
    --bs-primary-active: #002252 !important;
    --bs-link-color: #003B86 !important;
    --bs-link-hover-color: #002D6B !important;
    --fn-blue-gradient: linear-gradient(135deg, #003B86 0%, #0348A4 50%, #1D6ED0 100%);
}

/* Primary Button Styling */
.btn-primary,
button.btn-primary,
input[type="submit"].btn-primary,
a.btn-primary {
    color: #ffffff !important;
    background: var(--fn-blue-gradient) !important;
    background-color: #003B86 !important;
    border-color: #003B86 !important;
    box-shadow: 0 4px 12px rgba(0, 59, 134, 0.22) !important;
    transition: all 0.25s ease-in-out !important;
    font-weight: 600 !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle,
button.btn-primary:hover,
button.btn-primary:focus {
    color: #ffffff !important;
    background: #002D6B !important;
    background-color: #002D6B !important;
    border-color: #002D6B !important;
    box-shadow: 0 6px 18px rgba(0, 59, 134, 0.32) !important;
    transform: translateY(-1px);
}

.btn-primary:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(0, 59, 134, 0.3) !important;
    outline: none !important;
}

.btn-outline-primary {
    color: #003B86 !important;
    border-color: #003B86 !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    color: #ffffff !important;
    background: var(--fn-blue-gradient) !important;
    border-color: #003B86 !important;
}

/* Links & Text */
.text-primary {
    color: #003B86 !important;
}

a.text-primary:hover,
a.text-primary:focus {
    color: #002D6B !important;
}

/* Backgrounds & Badges */
.bg-primary {
    background-color: #003B86 !important;
}

.bg-primary-subtle {
    background-color: #EDF5FF !important;
    color: #003B86 !important;
}

.border-primary {
    border-color: #003B86 !important;
}

.bg-twitter {
    background-color: #003B86 !important;
}

/* Sidebar Navigation in Customer Portal */
.nav-account .nav-link {
    color: #475569;
    border-radius: 8px;
    padding: 10px 14px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-account .nav-link i {
    color: #64748B;
    transition: color 0.2s ease;
}

.nav-account .nav-link:hover {
    color: #003B86 !important;
    background-color: #EDF5FF !important;
}

.nav-account .nav-link:hover i {
    color: #003B86 !important;
}

.nav-account .nav-link.active {
    color: #003B86 !important;
    background-color: #EDF5FF !important;
    font-weight: 600;
}

.nav-account .nav-link.active i {
    color: #003B86 !important;
}

/* Form Check & Inputs */
.form-check-input:checked {
    background-color: #003B86 !important;
    border-color: #003B86 !important;
}

.form-control:focus,
.form-select:focus {
    border-color: #003B86 !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 59, 134, 0.2) !important;
}

/* Customer Panel Clean Header (Logo Centered) */
.customer-header {
    background: #ffffff !important;
    border-bottom: 1px solid #E2E8F0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.customer-header .navbar-brand {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.customer-header .navbar-brand img {
    max-height: 50px !important;
    width: auto !important;
}

/* Modern Branded Loader */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 14px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#loader.loaded,
#loader.d-none,
#loader[style*="display: none"],
#loader[style*="display:none"] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: -9999 !important;
}

.fincap-loader-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.fincap-loader-spinner {
    width: 48px;
    height: 48px;
    border: 3.5px solid #E6F1FF;
    border-top: 3.5px solid #003B86;
    border-right: 3.5px solid #1D6ED0;
    border-radius: 50%;
    animation: fincapLoaderSpin 0.85s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
    box-shadow: 0 4px 14px rgba(0, 59, 134, 0.18);
}

.fincap-loader-text {
    font-size: 13px;
    font-weight: 600;
    color: #003B86;
    letter-spacing: 0.4px;
}

@keyframes fincapLoaderSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
