/* Dashboard Styles */
:root {
    /* New Modern Color Palette */
    --primary-color: #6366f1;    /* Indigo */
    --secondary-color: #8b5cf6;  /* Purple */
    --accent-color: #06b6d4;     /* Cyan */
    --success-color: #10b981;    /* Emerald */
    --warning-color: #f59e0b;    /* Amber */
    --danger-color: #ef4444;     /* Red */
    --text-color: #1e293b;       /* Slate */
    --light-text: #94a3b8;       /* Light Slate */
    --white: #ffffff;
    --light-bg: #f8fafc;
    
    /* Gradient Colors */
    --gradient-start: #6366f1;
    --gradient-middle: #8b5cf6;
    --gradient-end: #06b6d4;
    
    /* Shadow Colors */
    --shadow-color: rgba(99, 102, 241, 0.15);
    --hover-shadow: rgba(99, 102, 241, 0.25);
    --sidebar-width: 250px;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.9);
    color: var(--white);
    padding: 2rem 0;
    position: fixed;
    height: 100vh;
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(99, 102, 241, 0.1);
    box-shadow: 5px 0 20px var(--shadow-color);
}

.sidebar .logo {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
}

.sidebar .logo a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    list-style: none;
    padding: 0;
}

.nav-links li a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-links li a i {
    margin-right: 1rem;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--primary-color);
    background: linear-gradient(
        to right,
        rgba(99, 102, 241, 0.1),
        transparent
    );
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Main Content Styles */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    width: calc(100% - var(--sidebar-width));
}

/* Section Styles */
.feature-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: all 0.3s ease;
}

.feature-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--hover-shadow);
}

h2 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

/* Grid Layouts */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Cards */
.overview-card {
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.overview-card:hover {
    transform: translateY(-5px);
}

/* Forms and Inputs */
input, select, button {
    padding: 0.8rem;
    margin: 0.5rem 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background: var(--secondary-color);
}

/* Progress Bars */
.progress-bar {
    background: rgba(99, 102, 241, 0.1);
    height: 10px;
    border-radius: 10px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(
        to right,
        var(--primary-color),
        var(--secondary-color)
    );
    transition: width 0.5s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }

    .sidebar .logo,
    .nav-links li a span {
        display: none;
    }

    .main-content {
        margin-left: 60px;
        width: calc(100% - 60px);
    }

    .quotes-container {
        padding: 2rem;
    }

    .quote-text {
        font-size: 1.2rem;
    }

    .feature-section {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-item {
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-item h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.modal-button {
    display: block;
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.modal-button:hover {
    background: var(--secondary-color);
}

/* Budget Calculator Styles */
.calculator-container {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.calc-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 10px;
}

.calc-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.input-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 500;
    color: var(--text-color);
}

.input-group input {
    padding: 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.expense-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.expense-category {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.expense-category h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-bg);
}

.budget-summary {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--light-bg);
}

.summary-item.remaining {
    font-weight: bold;
    color: var(--primary-color);
    border-bottom: none;
}

.chart-container {
    height: 300px;
    margin: 2rem 0;
}

.calculator-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.calculator-actions button {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.primary-button {
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--secondary-color)
    );
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: all 0.3s ease;
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--hover-shadow);
}

.secondary-button {
    background: var(--secondary-color);
    color: var(--white);
}

.tertiary-button {
    background: var(--light-bg);
    color: var(--text-color);
}

.budget-recommendations {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.advice-container {
    margin-top: 1rem;
}

.advice-item {
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--primary-color);
    background: var(--light-bg);
    border-radius: 0 8px 8px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .expense-categories {
        grid-template-columns: 1fr;
    }

    .calculator-actions {
        flex-direction: column;
    }

    .calculator-actions button {
        width: 100%;
    }
}

/* Add these styles for the edit functionality */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.edit-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.edit-btn:hover {
    background-color: rgba(99, 102, 241, 0.1);
}

.amount-container {
    position: relative;
    margin-bottom: 1rem;
}

.amount {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.edit-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.edit-form.hidden {
    display: none;
}

.amount-input {
    padding: 0.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    font-size: 1rem;
    width: 150px;
}

.edit-actions {
    display: flex;
    gap: 0.5rem;
}

.save-btn, .cancel-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.save-btn {
    color: #10B981;
}

.save-btn:hover {
    background-color: rgba(16, 185, 129, 0.1);
}

.cancel-btn {
    color: #EF4444;
}

.cancel-btn:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

/* Animation for edit form */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.edit-form:not(.hidden) {
    animation: fadeIn 0.3s ease-out;
}

/* Quotes Container Styles */
.quotes-container {
    background: linear-gradient(135deg, 
        var(--gradient-start) 0%, 
        var(--gradient-middle) 50%, 
        var(--gradient-end) 100%);
    border-radius: 30px;
    padding: 3.5rem;
    margin: 2rem 0;
    box-shadow: 
        0 20px 40px var(--shadow-color),
        inset 0 -10px 20px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.quotes-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(255,255,255,0.15) 0%,
        transparent 60%
    );
    animation: rotate 20s linear infinite;
}

.quote-slider {
    position: relative;
    height: 200px;
}

.quote-card {
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    text-align: center;
    color: var(--white);
    padding: 2rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
}

.quote-card.active {
    opacity: 1;
    transform: translateY(0);
}

.quote-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.quote-text {
    font-size: 1.75rem;
    line-height: 1.6;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background: linear-gradient(to right, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.quote-author {
    font-style: italic;
    opacity: 0.9;
    font-size: 1.1rem;
}

.quote-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.quote-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.quote-dot.active {
    background: var(--white);
    transform: scale(1.3);
}

/* Enhanced Animation Keyframes */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Loading Animation */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.loading {
    background: linear-gradient(
        to right,
        var(--light-bg) 0%,
        var(--white) 50%,
        var(--light-bg) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

/* Glassmorphism Effects */
.glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Enhanced Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(
        var(--primary-color),
        var(--secondary-color)
    );
    border-radius: 5px;
}

/* Enhanced Card Animations */
@keyframes cardHover {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.feature-section:hover {
    animation: cardHover 1s ease infinite;
}

/* Add this to your CSS file */
.savings-goal-container {
    margin-top: 20px;
}

.savings-goal {
    display: flex;
    align-items: center;
}

.savings-goal input {
    margin-left: 10px;
    margin-right: 10px;
}

.savings-progress {
    margin-top: 10px;
}