:root {
    --primary-color: #0056b3; /* Professional deep blue */
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --light-bg: #f8f9fa;
    --dark-text: #343a40;
    --border-color: #dee2e6;
    --success: #198754;
    --info: #0dcaf0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-text);
    background-color: var(--light-bg);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.wrapper {
    min-height: 100vh;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: all 0.2s ease-in-out;
    color: #fff;
}

.btn-primary:hover {
    background-color: #004085;
    border-color: #004085;
    transform: translateY(-1px);
}

.btn-success {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transition: all 0.2s ease-in-out;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-1px);
}

.btn-info {
    background-color: var(--info);
    border-color: var(--info);
    color: #fff;
    transition: all 0.2s ease-in-out;
}

.btn-info:hover {
    background-color: #0aabdb;
    border-color: #0aabdb;
    transform: translateY(-1px);
}

/* Cards */
.card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: none;
    border-radius: 0.75rem;
    overflow: hidden;
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.15);
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 86, 179, 0.25);
}

.form-floating .form-control {
    border-radius: 8px;
}

/* Alerts */
.alert {
    border-radius: 8px;
}

/* Auth Pages */
.auth-container {
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 0.75rem 2rem rgba(0,0,0,.08);
    padding: 30px;
    width: 100%;
    max-width: 400px;
    margin: 20px;
}

.auth-page {
    background-color: var(--light-bg);
}

.auth-section {
    display: none;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--light-bg);
}

.auth-section.active {
    display: flex;
}

/* Sidebar */
#sidebar {
    min-width: 280px;
    max-width: 280px;
    background-color: var(--primary-color);
    color: white;
    transition: all 0.3s ease-in-out;
    position: sticky;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

#sidebar.active {
    margin-left: -280px;
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul li a {
    padding: 12px 25px;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

#sidebar ul li a i {
    font-size: 1.2em;
    margin-right: 15px;
}

#sidebar ul li a:hover {
    color: #fff;
    background: rgba(255,255,255,0.15);
    padding-left: 30px;
}

#sidebar ul li.active > a {
    color: #fff;
    background: rgba(255,255,255,0.25);
    border-left: 5px solid #fff;
    padding-left: 25px;
}

.sidebar-header {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,.15);
}

.sidebar-header h3 {
    margin-bottom: 0;
    font-size: 1.6rem;
    font-weight: 500;
    color: #fff;
}

.sidebar-header img {
    max-width: 90px;
    margin-bottom: 15px;
    border-radius: 0.5rem;
}

/* Content */
#content {
    width: 100%;
    padding: 20px;
    min-height: 100vh;
    transition: all 0.3s ease-in-out;
    background-color: var(--light-bg);
}

/* Navbar */
.navbar-top {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    margin-bottom: 25px;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
}

/* Sidebar Toggle */
#sidebarCollapse {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    font-size: 1.2rem;
    padding: 0.5rem 0.8rem;
    display: none;
}

#sidebarCollapse:hover {
    background-color: #004085;
    border-color: #004085;
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    top: 0;
    left: 0;
    z-index: 999;
}

.overlay.active {
    display: block;
}

/* Photo Upload */
.photo-upload-wrapper {
    display: inline-block;
}

.photo-upload-wrapper .img-fluid {
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.photo-upload-wrapper .btn {
    width: auto;
}

/* Loan Application Progress */
.progress-indicator .list-group-item {
    border: none;
    background-color: transparent;
    color: var(--secondary-color);
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: all 0.2s ease-in-out;
    border-radius: 0;
}

.progress-indicator .list-group-item:hover:not(.active) {
    background-color: rgba(0, 0, 0, 0.03);
}

.progress-indicator .list-group-item.active {
    font-weight: 600;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    background-color: rgba(0, 86, 179, 0.05);
}

.progress-indicator .list-group-item.completed {
    color: var(--success);
    font-weight: 500;
    border-left-color: var(--success);
}

.progress-indicator .list-group-item.completed i {
    color: var(--success);
}

.list-group-item i {
    margin-right: 10px;
}

.form-section {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Media Queries */
@media (max-width: 991.98px) {
    #sidebar {
        margin-left: -280px;
        position: fixed;
        height: 100%;
    }

    #sidebar.active {
        margin-left: 0;
    }

    #content {
        width: 100%;
        margin-left: 0;
    }

    #sidebarCollapse {
        display: block;
    }

    .navbar-top .ms-3 {
        margin-left: 0 !important;
    }
}

@media (min-width: 992px) {
    #sidebarCollapse {
        display: none;
    }
}
