/* --- Overlay --- */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(1px);
    display: none;
    z-index: 1030;
}

.overlay.show {
    display: block;
}

/* for nav bar */
/* Custom Profile Soft Colors */
.bg-primary-soft {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

/* User Profile Toggle Hover */
.hover-light:hover {
    background-color: #f8f9fa;
    transition: 0.2s ease;
}

/* Make Dropdowns look cleaner */
.dropdown-menu {
    border-radius: 12px;
    animation: dropdownFade 0.3s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Badge Tweaks */
.navbar .badge {
    font-size: 10px;
    padding: 0.35em 0.65em;
}

/* Custom shadow for topbar */
.shadow-navbar {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.dropdown-item.active {
    background-color: var(--color-500) !important;
    color: white;
}

/* --- Sidebar START --- */
.sidebar {
    width: 240px;
    background: #fff;
    transition: width 0.3s, left 0.3s;
    border-right: 1px solid #e5e5e5;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1030;
    overflow-x: hidden;

    /* Hide scrollbar by default for Firefox */
    scrollbar-width: none;
    /* Hide scrollbar by default for Chrome/Safari */
    overflow-y: hidden;
}

/* Show scrollbar on hover */
.sidebar:hover {
    overflow-y: auto;
    scrollbar-width: thin;
    /* Firefox */
}

/* --- Custom Scrollbar Styling (Chrome, Safari, Edge) --- */
.sidebar::-webkit-scrollbar {
    width: 6px;
    display: none;
}

.sidebar:hover::-webkit-scrollbar {
    display: block;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: var(--color-300, #d1d5db);
    border-radius: 10px;
    border: 1px solid transparent;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-500, #6b7280);
}

/* Logo Section */
.sidebar-logo {
    padding: 24px 20px 16px 20px;
    border-bottom: 2px solid var(--color-100);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--color-500);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
}

.logo-text {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--color-700);
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--color-400);
    font-weight: 600;
}

/* --- Navigation List & Items --- */
.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-header {
    padding: 15px 20px 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--color-900);
    opacity: 0.8;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--color-950);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    margin: 2px 0;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-link i,
.nav-link .ti {
    min-width: 24px;
    font-size: 20px;
    margin-right: 14px;
    text-align: center;
    color: var(--color-950);
}

.nav-link:hover {
    background-color: var(--color-50);
    color: var(--color-900);
}

.nav-link.active {
    background-color: var(--color-700);
    color: white;
    border-left-color: white;
}

.nav-link.active .ti {
    color: white;
    font-weight: bold;
}

.nav-text {
    transition: opacity 0.2s;
}

/* --- Collapsed View --- */
.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .nav-header {
    padding: 10px 0;
    text-align: center;
    font-size: 0;
}

.sidebar.collapsed .nav-link {
    padding: 10px 0;
    justify-content: center;
    border-left: none;
}

.sidebar.collapsed .nav-link i,
.sidebar.collapsed .nav-link .ti {
    margin-right: 0;
    font-size: 20px;
}

.sidebar.collapsed .nav-text,
.sidebar.collapsed .logo-text {
    display: none;
}

/* --- Layout Adjustments --- */
.topbar {
    height: 60px;
    margin-left: 240px;
    transition: margin-left 0.3s;
}

.topbar.full {
    margin-left: 60px;
}

.content {
    margin-left: 240px;
    transition: margin-left 0.3s;
}

.content.full {
    margin-left: 60px;
}

/* --- Responsive (Mobile) --- */
@media (max-width: 992px) {
    .sidebar {
        left: -240px;
    }

    .sidebar.mobile-show {
        left: 0;
    }

    .topbar,
    .content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* --- Sub-navigation (Dropdown) --- */
.sub-nav-list {
    list-style: none;
    padding: 5px 0;
    margin: 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--color-100);
}

.sub-nav-link {
    display: flex;
    align-items: center;
    padding: 8px 20px 8px 45px;
    color: var(--color-800);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
}

.sub-nav-link i,
.sub-nav-link .ti {
    font-size: 18px;
    margin-right: 12px;
    color: var(--color-800);
    min-width: 20px;
    text-align: center;
}

.sub-nav-link:hover {
    background-color: var(--color-100);
    color: var(--color-900);
}

.sub-nav-link:hover i {
    color: var(--color-600);
}

/* Dropdown Arrow Animation & Sizing */
.nav-link[aria-expanded="true"] .drop-icon {
    transform: rotate(180deg);
}

.drop-icon {
    transition: transform 0.2s;
    font-size: 14px !important;
    margin-right: 0 !important;
}

/* Hide sub-menu when sidebar is collapsed */
.sidebar.collapsed .sub-nav-list {
    display: none !important;
}

/* Helper for tiny chevron */
.fs-xs {
    font-size: 10px !important;
}

/* --- Form Overhauls --- */
.card-form-custom {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
}

.card-header-custom {
    padding: 30px 40px;
    background: #fff;
    border-bottom: 1px solid var(--color-100);
}

.form-body-custom {
    padding: 40px;
}

/* --- Section Steps --- */
.form-section {
    margin-bottom: 40px;
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-900);
    margin-bottom: 20px;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--color-900);
    color: white;
    font-size: 0.75rem;
    border-radius: 8px;
    font-weight: 800;
}

/* --- Input Groups & Icons --- */
.input-icon-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-400);
    font-size: 1.2rem;
    pointer-events: none;
}

.input-icon-group .form-control-custom {
    padding-left: 45px;
}

.form-control-custom,
.form-select-custom {
    border: 1.5px solid var(--color-200);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control-custom:focus {
    border-color: var(--color-600);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), 0.1);
}

/* --- Drop Zone Styling --- */
.file-drop-zone {
    border: 2px dashed var(--color-200);
    background: var(--color-50);
    border-radius: 15px;
    padding: 30px;
    transition: 0.3s;
    text-align: center;
}

.icon-circle {
    width: 50px;
    height: 50px;
    background: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-600);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* --- Buttons --- */
.btn-submit-large {
    background: var(--color-900);
    color: white;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 700;
    border: none;
    transition: all 0.3s;
}

.btn-submit-large:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.bg-primary-soft {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

.btn-close-custom {
    background: var(--color-100);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-600);
    transition: 0.2s;
}

.btn-close-custom:hover {
    background: #ff4d4f;
    color: white;
}

.footer-fixed-bottom {
    position: fixed;
    bottom: 0px;
    /* Floating look */
    right: 5%;
    width: calc((100% - 240px) * 0.9);
    z-index: 1020;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(8px);
    border: 1px solid #e5e5e5;
    border-radius: 12px 12px 0 0;
    transition: all 0.3s ease;
}

/* When sidebar is collapsed, footer expands to 90% of the NEW remaining width */
.footer-fixed-bottom.full {
    width: calc((100% - 60px) * 0.9);
}

@media (max-width: 992px) {
    .footer-fixed-bottom {
        width: 90% !important;
        right: 5% !important;
        left: 5% !important;
    }
}

/* --- Pagination Styles --- */
.btn-pagination {
    background: #ffffff;
    border: 1px solid var(--color-200, #e2e8f0);
    color: var(--color-700, #334155);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-pagination:hover:not(:disabled) {
    background: var(--color-100, #f1f5f9);
    color: var(--color-900, #0f172a);
}

.btn-page-number {
    background: #ffffff;
    border: 1px solid var(--color-200, #e2e8f0);
    color: var(--color-700, #334155);
    font-size: 0.85rem;
    font-weight: 700;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-page-number:hover {
    background: var(--color-50, #f8fafc);
    border-color: var(--color-300, #cbd5e1);
}

.active-page {
    background: var(--color-700, #1e293b) !important;
    color: #ffffff !important;
    border-color: var(--color-700, #1e293b) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.pagination-dots {
    color: var(--color-400, #94a3b8);
    font-weight: 800;
    letter-spacing: 2px;
}

.text-custom {
    color: var(--color-700, #1e293b);
}