body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-sizing: border-box; /* Ensure padding is included in width */
}

header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    color: #333;
    font-size: 2rem;
    margin: 0;
}

.form-container {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h2 {
    margin: 0 0 20px;
    font-size: 1.5rem;
}

form label {
    display: block;
    margin: 10px 0 5px;
}

form input, form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

form button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-right: 10px;
}

form button:hover {
    background-color: #0056b3;
}

form button#export-pdf {
    background-color: #28a745;
}

form button#export-pdf:hover {
    background-color: #218838;
}

/* Enhanced Styling for Logout Button */
button#logout {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    display: inline-block; /* Default behavior for larger screens */
}

button#logout:hover {
    background: linear-gradient(135deg, #c82333, #dc3545);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

button#logout:active {
    background: #c82333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(2px);
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-item {
    background: #007bff;
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-sizing: border-box;
}

.dashboard-item h2 {
    margin: 0;
    font-size: 1.5rem;
}

.dashboard-item p {
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-container {
    margin-bottom: 20px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    display: table; /* Default display for larger screens */
}

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

th {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Styles for the delete button */
.delete-button {
    background-color: #dc3545;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-block;
}

.delete-button:hover {
    background-color: #c82333;
    transform: scale(1.05);
}

.delete-button:focus {
    outline: none;
}

.delete-button:active {
    background-color: #bd2130;
    transform: scale(1);
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    .dashboard-item {
        margin-bottom: 20px;
        flex: 1 1 100%;
    }
    /* Full width logout button on mobile view */
    button#logout {
        width: 100%; /* Expand to full width */
        padding: 12px; /* Adjust padding to fit the full width */
    }
    .dashboard-item-detail {
        display: grid;
        grid-template-columns: 1fr; /* Single column layout */
        gap: 10px;
    }

    table {
        display: none; /* Hide the table on smaller screens */
    }

    .expense-card {
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        padding: 15px;
        margin-bottom: 10px;
    }

    .expense-card h3 {
        margin: 0 0 10px;
        font-size: 1.2rem;
    }

    .expense-card p {
        margin: 5px 0;
        font-size: 1rem;
        line-height: 1.5;
    }

    .expense-card .expense-card-date {
        font-weight: bold;
    }

    .expense-card .expense-card-amount {
        color: #007bff;
        font-weight: bold;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .dashboard-item h2 {
        font-size: 1.25rem;
    }

    .dashboard-item p {
        font-size: 1.5rem;
    }

    form button {
        font-size: 0.9rem;
    }
}
@media (min-width: 769px) {
    .dashboard-item-detail {
        display: block; /* Default block display for larger screens */
    }
}
/* Hide the card container on larger screens */
#expense-cards {
    display: none;
}

/* Show the card container only on mobile screens */
@media (max-width: 768px) {
    #expense-table {
        display: none; /* Hide the table on mobile screens */
    }
    
    #expense-cards {
        display: flex; /* Show the cards on mobile screens */
        flex-direction: column;
        gap: 10px;
    }
}

/* Show the table on larger screens */
@media (min-width: 769px) {
    #expense-table {
        display: table; /* Show the table on larger screens */
    }

    #expense-cards {
        display: none; /* Hide the cards on larger screens */
    }
}
/* Footer Styles */
.footer {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    background-color: #f6f2f2;
    color: #000000;
    position: fixed;
    bottom: 0;
    left: 0;
}

.footer p {
    margin: 0;
    font-size: 14px;
}

/* Ensure the content doesn't overlap the footer */
body {
    padding-bottom: 40px; /* Adjust this if your footer height changes */
}

/* Responsive Footer Text */
@media (max-width: 400px) {
    .footer p {
        font-size: 12px;
    }
}
