:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #0ea5e9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --bg-dark: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.1);
    --input-bg: #f1f5f9;
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --font-family: 'Outfit', sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
}

/* Background Shapes */
.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-color), transparent);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--secondary-color), transparent);
    bottom: -150px;
    right: -150px;
    animation-delay: -5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #6366f1, transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(30px, 30px);
    }

    50% {
        transform: translate(0, 60px);
    }

    75% {
        transform: translate(-30px, 30px);
    }
}

/* Login Card Overrides */
.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    color: white;
    margin: 0 auto;
    box-shadow: 0 12px 24px -6px rgba(15, 23, 42, 0.2);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-icon:hover {
    transform: rotate(10deg) scale(1.1);
}

/* Bootstrap Form Overrides */
.form-control,
.input-group-text,
.form-select {
    border-color: var(--input-bg);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    border-color: var(--primary-color);
    background-color: #fff;
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary-color);
    color: var(--primary-color) !important;
    background-color: #fff !important;
}

.input-group-text {
    background-color: var(--input-bg);
}

/* Dark Theme Inputs (For Dashboard) */
.form-control.bg-dark,
.form-select.bg-dark {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.form-control.bg-dark:focus,
.form-select.bg-dark:focus {
    background-color: rgba(15, 23, 42, 0.8) !important;
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
}

.form-control.bg-dark:disabled,
.form-control.bg-dark[readonly] {
    background-color: rgba(15, 23, 42, 0.3) !important;
    opacity: 0.8;
    cursor: default;
    border-color: rgba(255, 255, 255, 0.05);
}

.form-control.bg-dark::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Hide Number Input Spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border: none;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    transition: all 0.3s;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, #10b981);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

/* Sidebar Styles */
.bg-glass {
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.nav-pills .nav-link.active,
.nav-pills .show>.nav-link {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), transparent);
    border-left: 4px solid var(--secondary-color);
    color: var(--secondary-color);
    font-weight: 600;
    border-radius: 0 8px 8px 0;
}

.nav-link {
    color: var(--text-muted);
    transition: all 0.3s;
    border-left: 4px solid transparent;
    margin-bottom: 4px;
}

.nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.logo-icon-small {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    color: white;
}

.w-25px {
    width: 25px;
    text-align: center;
}

.hover-danger:hover {
    background-color: rgba(220, 53, 69, 0.2) !important;
    color: #ff6b6b !important;
}

.transition-all {
    transition: all 0.3s ease;
}

/* Financial List Items */
.financial-list .border-bottom {
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.hover-bg-light:hover {
    background-color: rgba(255, 255, 255, 0.03);
    transform: translateX(5px);
}

/* Modal Icon */
.modal-icon {
    width: 56px;
    height: 56px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 26px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.fade-in-down {
    animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hover-scale {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-scale:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

/* Mobile Specific Adjustments */
@media (max-width: 767.98px) {
    .sidebar {
        background-color: #0f172a !important;
        /* Solid background for mobile menu */
    }

    .input-group-text {
        background-color: var(--input-bg);
    }

    /* Dark Theme Inputs (For Dashboard) */
    .form-control.bg-dark,
    .form-select.bg-dark {
        background-color: rgba(15, 23, 42, 0.6) !important;
        border-color: rgba(255, 255, 255, 0.1);
        color: white;
    }

    .form-control.bg-dark:focus,
    .form-select.bg-dark:focus {
        background-color: rgba(15, 23, 42, 0.8) !important;
        border-color: var(--primary-color);
        color: white;
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
    }

    .form-control.bg-dark:disabled,
    .form-control.bg-dark[readonly] {
        background-color: rgba(15, 23, 42, 0.3) !important;
        opacity: 0.8;
        cursor: default;
        border-color: rgba(255, 255, 255, 0.05);
    }

    .form-control.bg-dark::placeholder {
        color: rgba(255, 255, 255, 0.3);
    }

    /* Hide Number Input Spinners */
    input[type=number]::-webkit-inner-spin-button,
    input[type=number]::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    input[type=number] {
        -moz-appearance: textfield;
        appearance: textfield;
    }

    /* Buttons */
    .btn-primary {
        background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
        border: none;
        transition: all 0.3s;
    }

    .btn-primary:hover {
        background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    }

    .btn-success {
        background: linear-gradient(135deg, #10b981, #059669);
        border: none;
        transition: all 0.3s;
    }

    .btn-success:hover {
        background: linear-gradient(135deg, #059669, #10b981);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
    }

    /* Sidebar Styles */
    .bg-glass {
        background: rgba(15, 23, 42, 0.95);
        border-right: 1px solid var(--glass-border);
        backdrop-filter: blur(10px);
    }

    .nav-pills .nav-link.active,
    .nav-pills .show>.nav-link {
        background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), transparent);
        border-left: 4px solid var(--secondary-color);
        color: var(--secondary-color);
        font-weight: 600;
        border-radius: 0 8px 8px 0;
    }

    .nav-link {
        color: var(--text-muted);
        transition: all 0.3s;
        border-left: 4px solid transparent;
        margin-bottom: 4px;
    }

    .nav-link:hover {
        color: white;
        background-color: rgba(255, 255, 255, 0.05);
        transform: translateX(5px);
    }

    .logo-icon-small {
        width: 32px;
        height: 32px;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        border-radius: 8px;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 16px;
        color: white;
    }

    .w-25px {
        width: 25px;
        text-align: center;
    }

    .hover-danger:hover {
        background-color: rgba(220, 53, 69, 0.2) !important;
        color: #ff6b6b !important;
    }

    .transition-all {
        transition: all 0.3s ease;
    }

    /* Financial List Items */
    .financial-list .border-bottom {
        border-color: rgba(255, 255, 255, 0.05) !important;
    }

    .hover-bg-light:hover {
        background-color: rgba(255, 255, 255, 0.03);
        transform: translateX(5px);
    }

    /* Modal Icon */
    .modal-icon {
        width: 56px;
        height: 56px;
        background: rgba(59, 130, 246, 0.1);
        color: var(--secondary-color);
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 26px;
    }

    /* Animations */
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translate3d(0, 40px, 0);
        }

        to {
            opacity: 1;
            transform: translate3d(0, 0, 0);
        }
    }

    @keyframes fadeInDown {
        from {
            opacity: 0;
            transform: translate3d(0, -40px, 0);
        }

        to {
            opacity: 1;
            transform: translate3d(0, 0, 0);
        }
    }

    .fade-in-up {
        animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    .fade-in-down {
        animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    .hover-scale {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .hover-scale:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    }

    /* Mobile Specific Adjustments */
    @media (max-width: 767.98px) {
        .sidebar {
            background-color: #0f172a !important;
            /* Solid background for mobile menu */
        }

        .content-wrapper {
            padding-top: 20px;
        }

        .login-card {
            margin: 0 15px;
        }
    }
}

/* Desktop Sidebar Sticky */
@media (min-width: 768px) {
    .sidebar {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
        z-index: 1020;
    }

    /* Custom Scrollbar for Sidebar */
    .sidebar::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar::-webkit-scrollbar-track {
        background: rgba(15, 23, 42, 0.5);
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: rgba(59, 130, 246, 0.3);
        border-radius: 3px;
    }

    .sidebar::-webkit-scrollbar-thumb:hover {
        background: rgba(59, 130, 246, 0.5);
    }
}

/* Mobile Sidebar Fix - Make logout button accessible */
@media (max-width: 767.98px) {
    .offcanvas-body {
        overflow-y: auto !important;
        overflow-x: hidden;
        max-height: calc(100vh - 120px);
        padding-bottom: 1rem;
    }

    .offcanvas-body::-webkit-scrollbar {
        width: 4px;
    }

    .offcanvas-body::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
    }

    .offcanvas-body::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 2px;
    }
}
/* Mobile Sidebar Fix - Make logout button accessible */
@media (max-width: 767.98px) {
    .offcanvas-body {
        overflow-y: auto !important;
        overflow-x: hidden;
        max-height: calc(100vh - 80px);
        padding-bottom: 0.5rem;
    }
    
    .offcanvas-body::-webkit-scrollbar {
        width: 4px;
    }
    
    .offcanvas-body::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .offcanvas-body::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 2px;
    }
}
