/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    background-color: #f7f7f7;
    line-height: 1.6;
}

header {
    background: #00bfa6;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header .logo {
    font-size: 1.5rem;
    font-weight: bold;
}

header nav {
    display: flex;
    gap: 1rem;
}

header nav a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
}

header nav a:hover {
    text-decoration: underline;
}

main {
    margin-left: 15%;
    width: 70%;
    padding: 2rem;
}

.section {
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cards {
    display: flex;
    gap: 1.5rem;
}

.card {
    flex: 1;
    background: #e8f1f2;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input, select, button {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

button {
    background: #4caf50;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background: #45a049;
}

#expense-list {
    list-style: none;
    padding: 0;
}

#expense-list li {
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: #f5f5f5;
    border-left: 5px solid #00bfa6;
    border-radius: 5px;
}

/* Style for the new Products field */
#products {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

#products:focus {
    border-color: #00bfa6;
    box-shadow: 0 0 5px rgba(0, 191, 166, 0.4);
}

/* Responsive adjustments for the new form */
@media (max-width: 768px) {
    form {
        gap: 1rem;
    }

    form input,
    form select {
        font-size: 0.9rem;
    }
}

footer {
    text-align: center;
    padding: 1rem;
    background: #333;
    color: white;
    margin-top: 2rem;
}

/* Responsive Design */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .cards {
        flex-direction: column;
    }

    header nav {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    form {
        gap: 0.8rem;
    }
}

/* Mobile (300px and below) */
@media (max-width: 300px) {
    body {
        font-size: 0.9rem;
    }

    header {
        padding: 1rem;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    header .logo {
        font-size: 1.2rem;
    }

    header nav a {
        font-size: 0.8rem;
    }

    main {
        padding: 1rem;
    }

    .cards {
        flex-direction: column;
    }

    form {
        gap: 0.6rem;
    }

    button {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
}


/* Existing styles omitted for brevity */

#expense-chart-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

#expense-chart {
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    #expense-chart-container {
        max-width: 100%;
    }
}

/* Remaining existing styles omitted for brevity */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    background-color: #f7f7f7;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.night-mode {
    color: #f7f7f7;
    background-color: #121212;
}

header {
    background: #00bfa6;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header .logo {
    font-size: 1.5rem;
    font-weight: bold;
}

header nav {
    display: flex;
    gap: 1rem;
}

header nav a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
}

header nav a:hover {
    text-decoration: underline;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

main {
    margin: 2rem auto;
    max-width: 1200px;
    padding: 2rem;
}

.section {
    margin-bottom: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.night-mode .section {
    background: #1f1f1f;
}

.cards {
    display: flex;
    gap: 1.5rem;
}

.card {
    flex: 1;
    background: #e8f1f2;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

body.night-mode .card {
    background: #333;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input, select, button {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 25px; /* Adjusted for capsule shape */
    font-size: 1rem;
}

body.night-mode input, body.night-mode select, body.night-mode button {
    background-color: #333;
    color: #f7f7f7;
    border-color: #666;
}

input:focus, select:focus {
    outline: none;
    border-color: #00bfa6;
    box-shadow: 0 0 5px rgba(0, 191, 166, 0.4);
}

button {
    background: #00bfa6;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
    border-radius: 25px; /* Adjusted for capsule shape */
}

button:hover {
    background: #009688;
}

body.night-mode button {
    background: #6200ea;
}

#expense-list {
    list-style: none;
    padding: 0;
}

#expense-list li {
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: #f5f5f5;
    border-left: 5px solid #00bfa6;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

body.night-mode #expense-list li {
    background: #333;
    border-color: #6200ea;
}

footer {
    text-align: center;
    padding: 1rem;
    background: #333;
    color: white;
    margin-top: 2rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.night-mode footer {
    background: #121212;
}

@media (max-width: 768px) {
    .cards {
        flex-direction: column;
    }

    header nav {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    form {
        gap: 0.8rem;
    }
}

#expense-chart-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

#expense-chart {
    width: 100%;
    height: 100%;
}
