/* BitBudget Custom Styling & Animations */

/* Smooth scrolling and base typography */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Custom modern scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Top Progress Bar for AJAX navigation */
#pageProgressBar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
    z-index: 99999;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.7);
}

/* Glassmorphism styling */
.glass-card {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(51, 65, 85, 0.6);
}

.glass-card-light {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Keyframes & Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.animate-fade-in {
    animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-down {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-shake {
    animation: shake 0.4s ease-in-out;
}

/* Sidebar Active state */
.nav-link {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.25) 0%, rgba(79, 70, 229, 0.05) 100%);
    color: #ffffff;
    font-weight: 600;
    border-left: 3px solid #6366f1;
}

.nav-link:hover:not(.active) {
    background: rgba(255, 255, 255, 0.04);
    color: #f1f5f9;
}

/* Custom Type Toggle Button/Checkbox */
.type-checkbox-label {
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.type-checkbox-label input[type="radio"]:checked + .type-box-expense {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

.type-checkbox-label input[type="radio"]:checked + .type-box-income {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border-color: #10b981;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

/* Modern Toast Notification Container */
#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

.toast-item {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.25s ease;
}

.toast-success {
    background: #064e3b;
    border: 1px solid #059669;
    color: #ecfdf5;
}

.toast-error {
    background: #881337;
    border: 1px solid #e11d48;
    color: #fff1f2;
}

.toast-info {
    background: #1e1b4b;
    border: 1px solid #6366f1;
    color: #e0e7ff;
}

/* Modal styling */
.modal-backdrop {
    background: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
