/**
 * Finance Management Application
 * Custom CSS Styles
 */

/* General styling */
:root {
    --primary-color: #cce821; 
    --secondary-color: #292d2f; 
    --light-bg: #f3f5f6;
    --text-color: #292d2f;
    --sidebar-width: 250px;
}


body {
    background-color: #f8f9fa;
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    margin-bottom: 60px; /* Account for footer */
}

/* Cards styling */
.card {
    border-radius: 8px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-weight: 600;
    margin-bottom: 20px;
}

/* Dashboard cards */
.dashboard-card {
    background-color: #fff;
    border: none;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.dashboard-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 15px;
}

.dashboard-card .card-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0;
}

/* Table styling */
.table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-top: none;
    border-bottom: 2px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: #f1f5f9;
}

/* Buttons and badges */
.btn {
    border-radius: 5px;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.btn-outline-primary:hover {
    background-color: #4e73df;
}

.btn-outline-danger:hover {
    background-color: #e74a3b;
}

.badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
    border-radius: 4px;
}

/* Form elements */
.form-control {
    border-radius: 5px;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ced4da;
}

.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
    border-color: #bac8f3;
}

.form-select {
    border-radius: 5px;
    padding: 0.6rem 2rem 0.6rem 0.8rem;
}

.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
    border-color: #bac8f3;
}

.input-group-text {
    background-color: #f8f9fa;
    border-color: #ced4da;
}

/* Navbar styling */
.navbar {
    padding: 0.8rem 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: rgba(78, 115, 223, 0.1);
}

.nav-link.active {
    color: #4e73df !important;
    font-weight: 600;
}

.nav-link i {
    margin-right: 0.5rem;
}

/* Modal styling */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e3e6f0;
}

.modal-title {
    font-weight: 600;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e3e6f0;
}

/* Chart containers */
.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 20px;
}

/* Footer styling */
footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e3e6f0;
    color: #666;
    padding: 15px 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-card .card-text {
        font-size: 1.4rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.8rem !important;
    }
    
    .table {
        font-size: 0.9rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body.dark-mode {
        background-color: #121212;
        color: #e0e0e0;
    }
    
    .dark-mode .card {
        background-color: #1e1e1e;
        color: #e0e0e0;
    }
    
    .dark-mode .table {
        color: #e0e0e0;
    }
    
    .dark-mode .table thead th {
        background-color: #2d2d2d;
        border-color: #444;
    }
    
    .dark-mode .table-hover tbody tr:hover {
        background-color: #2d2d2d;
    }
    
    .dark-mode .navbar {
        background-color: #1e1e1e !important;
    }
    
    .dark-mode .form-control,
    .dark-mode .form-select,
    .dark-mode .input-group-text {
        background-color: #2d2d2d;
        border-color: #444;
        color: #e0e0e0;
    }
}

/* Alert animations */
.alert {
    animation: fadeInDown 0.5s ease-in-out;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/**
 * Blur Currency Styles
 */

/* Additional specific selectors for currency values */
.blur-currency {
    position: relative;
}

/* Apply blur effect when hovering to reveal */
.blur-on .blur-currency:hover::after,
.blur-on .card-text:hover::after,
.blur-on .text-danger:hover::after, 
.blur-on .text-success:hover::after,
.blur-on .table-responsive tbody .text-end:hover::after {
    content: "Hover to reveal";
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    z-index: 100;
}

/* Settings page styles */
.settings-icon {
    font-size: 20px;
    margin-right: 10px;
    color: var(--primary-color);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.settings-card {
    transition: transform 0.2s;
}

.settings-card:hover {
    transform: translateY(-5px);
}

/* Customize the blur toggle in navbar */
.navbar .nav-link .fa-eye-slash {
    color: var(--primary-color) !important;
}

/* Add a notification badge for active blur mode */
.blur-active-badge {
    position: relative;
}

.blur-active-badge::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
}