/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navbar-height: 70px;
    /* Default navbar height */
}

body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    padding: 20px;
    height: auto;
    min-height: 100vh;
    display: block;
    overflow-y: auto;
}

.container {
    background: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 700px;
    margin: 0 auto;
    margin-top: calc(var(--navbar-height));
    /* Dynamically adjust for navbar */
}

h1,
h2 {
    margin-bottom: 20px;
    font-size: 1.5em;
    color: #007bff;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

#expenses-container {
    margin-bottom: 20px;
    text-align: left;
}

.expense-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.expense-row input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    flex: 1;
}

button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px 5px;
    display: inline-block;
}

button:hover {
    background-color: #0056b3;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

button:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.remove-expense {
    background-color: #dc3545;
    color: #fff;
    border: none;
    padding: 10px;
    font-size: 0.8em;
    border-radius: 5px;
    cursor: pointer;
}

.remove-expense:hover {
    background-color: #c82333;
}

.progress-container {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    height: 20px;
    margin: 20px 0;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: #28a745;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.progress-bar::after {
    content: attr(data-percentage) "%";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.9em;
}

#progress-text {
    font-weight: bold;
    margin-top: 10px;
    text-align: center;
}

/* Navbar Styles */
.navbar {
    background-color: #007bff;
    color: #fff;
    padding: 10px 20px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: var(--navbar-height);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
}

.navbar-logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

.navbar-menu {
    list-style: none;
    display: flex;
    gap: 15px;
}

.navbar-menu li {
    display: inline;
}

.navbar-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 1em;
    transition: color 0.3s ease;
}

.navbar-menu a:hover {
    color: #ffdd57;
}

/* Tables Section Styling */
.tables-section {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* General Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

thead {
    background-color: #007bff;
    color: #fff;
    font-weight: bold;
}

thead th {
    padding: 10px;
    text-align: left;
}

tbody tr {
    border-bottom: 1px solid #ddd;
}

tbody td {
    padding: 10px;
    text-align: left;
    color: #333;
}

tbody tr:last-child {
    border-bottom: none;
}

tbody tr:hover {
    background-color: #f1f1f1;
}


/* Print-friendly styles */
@media print {
    body {
        background-color: white;
        font-size: 14px;
    }

    .container {
        padding: 10px;
        width: 100%;
        box-shadow: none;
        border: none;
    }

    button,
    #progress-bar {
        display: none;
    }

    #progress-text {
        margin-bottom: 20px;
    }

}