/* Main Styles for Loan Management System */

body {
    background-color: #f8f9fa;
    font-family: 'Poppins', Arial, sans-serif;
}

/* Navbar customization */
.navbar-dark.bg-primary {
    background-color: #2e3192 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Sidebar for logged in dashboard */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 56px);
}

.sidebar {
    width: 250px;
    background-color: #fff;
    border-right: 1px solid #e3e6f0;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    z-index: 1;
}

.sidebar .nav-link {
    color: #3a3b45;
    padding: 0.75rem 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 1.25rem;
    text-align: center;
}

.sidebar .nav-link:hover {
    background-color: #f8f9fc;
    color: #4e73df;
}

.sidebar .nav-link.active {
    background-color: #4e73df;
    color: #fff;
}

.sidebar .sidebar-divider {
    margin: 0 1rem;
    border-top: 1px solid #e3e6f0;
}

.sidebar .sidebar-heading {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #b7b9cc;
}

.content {
    flex: 1;
    padding: 1.5rem;
}

/* Card styling */
.card {
    border: none;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h5, .card-header h6 {
    margin-bottom: 0;
    font-weight: 600;
}

/* Status badges */
.badge-new {
    background-color: #4e73df;
}

.badge-in-progress {
    background-color: #f6c23e;
}

.badge-soft-approved {
    background-color: #36b9cc;
}

.badge-approved {
    background-color: #1cc88a;
}

.badge-disbursed {
    background-color: #6f42c1;
}

.badge-rejected {
    background-color: #e74a3b;
}

.badge-completed {
    background-color: #5a5c69;
}

/* Dashboard stats cards */
.stat-card {
    border-left: 4px solid;
}

.stat-card-primary {
    border-left-color: #4e73df;
}

.stat-card-success {
    border-left-color: #1cc88a;
}

.stat-card-info {
    border-left-color: #36b9cc;
}

.stat-card-warning {
    border-left-color: #f6c23e;
}

.stat-card-danger {
    border-left-color: #e74a3b;
}

.stat-card-secondary {
    border-left-color: #858796;
}

.stat-card-light {
    border-left-color: #f8f9fa;
}

.stat-card-dark {
    border-left-color: #5a5c69;
}

/* Form styling */
.form-label {
    font-weight: 500;
}

.required-field::after {
    content: '*';
    color: #e74a3b;
    margin-left: 4px;
}

/* Document card */
.document-card {
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
    transition: all 0.3s ease;
}

.document-card:hover {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.document-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f8f9fc;
}

/* Timeline for lead activity */
.timeline {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0.75rem;
    height: 100%;
    width: 2px;
    background-color: #e3e6f0;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item:before {
    content: '';
    position: absolute;
    top: 0.25rem;
    left: -1.5rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: #4e73df;
    border: 2px solid #fff;
    z-index: 1;
}

.timeline-date {
    font-size: 0.85rem;
    color: #858796;
}

/* Profile image */
.profile-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #fff;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

/* Home page specific styles */
.hero-section {
    background-color: #2e3192;
    padding: 4rem 0;
    color: #fff;
}

.feature-icon {
    font-size: 2.5rem;
    color: #4e73df;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fc;
    margin: 0 auto 1.5rem;
}

/* Table styling */
.table-dashboard {
    font-size: 0.9rem;
    color: #5a5c69;
}

.table-dashboard thead th {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    font-weight: 600;
}

.table-dashboard tbody tr:hover {
    background-color: #f8f9fc;
}

/* Progress bar styling */
.lead-progress {
    height: 0.5rem;
}

.lead-stage {
    position: relative;
    text-align: center;
}

.lead-stage:before {
    content: '';
    position: absolute;
    top: 1.5rem;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #e3e6f0;
    z-index: 0;
}

.lead-stage-dot {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background-color: #e3e6f0;
    border: 3px solid #fff;
    display: inline-block;
    position: relative;
    z-index: 1;
}

.lead-stage-dot.active {
    background-color: #1cc88a;
}

.lead-stage-dot.completed {
    background-color: #1cc88a;
}

.lead-stage-dot.current {
    background-color: #4e73df;
}

.lead-stage-text {
    font-size: 0.75rem;
    margin-top: 0.75rem;
}

/* Login & Register Pages */
.auth-wrapper {
    height: 100vh;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    max-width: 400px;
    width: 100%;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    background-color: #fff;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    max-width: 150px;
}

/* Document upload area */
.upload-area {
    border: 2px dashed #d1d3e2;
    border-radius: 0.35rem;
    padding: 3rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #4e73df;
    background-color: #f8f9fc;
}

.upload-icon {
    font-size: 3rem;
    color: #4e73df;
    margin-bottom: 1rem;
}

/* Notes section */
.note-item {
    border-left: 3px solid #4e73df;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.note-author {
    font-weight: 600;
}

.note-date {
    font-size: 0.8rem;
    color: #858796;
}

/* Bank card */
.bank-card {
    border-radius: 0.35rem;
    transition: all 0.3s ease;
    border: 1px solid #e3e6f0;
}

.bank-card:hover {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.bank-card-header {
    padding: 1rem;
    border-bottom: 1px solid #e3e6f0;
    background-color: #f8f9fc;
    font-weight: 600;
}

.bank-card-body {
    padding: 1rem;
}

.bank-type-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.35rem;
    background-color: #4e73df;
    color: #fff;
    margin-left: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .sidebar {
        width: 100%;
        position: fixed;
        top: 56px;
        left: -100%;
        height: calc(100vh - 56px);
        transition: all 0.3s ease;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .content {
        margin-left: 0;
    }
}

/* NumberLoan Branding and Animation Styles */

/* NumberLoan Logo Styles */
.numberloan-logo {
    font-weight: 800;
    letter-spacing: 1px;
    color: #2e3192;
    position: relative;
}

.numberloan-logo .number-part {
    color: #4e73df;
    font-weight: 900;
}

/* Admin Dashboard Custom Branding */
.navbar-brand.admin-brand {
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    padding-left: 15px;
}

.navbar-brand.admin-brand::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background-color: #4e73df;
    border-radius: 2px;
}

/* Animation Classes */
.animated-entrance {
    animation: slideInUp 0.5s ease forwards;
}

.animated-pulse {
    animation: pulse 2s infinite;
}

.animated-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Keyframes for various animations */
@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Admin dashboard cards animation */
.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
}

/* Enhanced NumberLoan branding throughout dashboard */
.numberloan-theme .card-header {
    border-left: 4px solid #2e3192;
    padding-left: 1.25rem;
}

.numberloan-theme .btn-primary {
    background-color: #2e3192;
    border-color: #2e3192;
}

.numberloan-theme .btn-primary:hover {
    background-color: #232578;
    border-color: #232578;
}

/* Global Search Styles */
.avatar {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
}

.avatar-sm {
    width: 24px;
    height: 24px;
    font-size: 10px;
}

.bg-primary-light {
    background-color: rgba(0, 123, 255, 0.2);
    color: #0d6efd;
}

.border-left-primary {
    border-left: 4px solid #0d6efd;
}

.border-left-success {
    border-left: 4px solid #28a745;
}

.border-left-info {
    border-left: 4px solid #17a2b8;
}

.border-left-warning {
    border-left: 4px solid #ffc107;
}

.advanced-filters-toggle {
    cursor: pointer;
}

.advanced-filters-toggle:hover {
    text-decoration: underline;
}

.search-distribution .progress-bar {
    transition: width 0.6s ease;
}

/* Highlight search terms */
.text-highlight {
    background-color: rgba(255, 193, 7, 0.3);
    padding: 0 2px;
    border-radius: 2px;
}

/* Search Result Highlight Animation */
@keyframes highlight-pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(46, 49, 146, 0.7);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 20px rgba(46, 49, 146, 0.5);
        transform: scale(1.02); 
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(46, 49, 146, 0);
        transform: scale(1);
    }
}

.setting-highlight {
    animation: highlight-pulse 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) both;
    border-color: #2e3192 !important;
    background-color: rgba(46, 49, 146, 0.05) !important;
    position: relative;
    z-index: 2;
}

.setting-highlight::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid rgba(46, 49, 146, 0.3);
    border-radius: 5px;
    animation: fade-out 1.5s forwards;
    z-index: -1;
    pointer-events: none;
}

@keyframes fade-out {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

/* Section highlight animation */
@keyframes section-pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(46, 49, 146, 0.4);
    }
    50% { 
        box-shadow: 0 0 20px rgba(46, 49, 146, 0.6);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(46, 49, 146, 0.4);
    }
}

.section-highlight {
    animation: section-pulse 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) both;
    position: relative;
    border-radius: 5px;
}

.section-highlight::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid rgba(46, 49, 146, 0.3);
    border-radius: 5px;
    pointer-events: none;
    animation: fade-out 2s forwards;
}