/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styling */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f0f2f5;
    padding: 20px;
}

/* Logo Wrapper */
.logo-wrapper {
    text-align: center;
    margin-bottom: 20px;
}

.company-logo {
    max-width: 250px;
    height: auto;
}

/* Main Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow-x: hidden; /* Prevent horizontal overflow */
}

/* Heading */
h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 700;
    color: #343a40;
    letter-spacing: 1px;
}

/* Form Elements */
.form-row {
    margin-bottom: 20px;
}

label {
    font-weight: 500;
    display: block;
    color: #495057;
    margin-bottom: 5px;
}

input, select {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border-radius: 8px;
    border: 1px solid #ced4da;
    background-color: #ffffff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease-in-out;
}

input:focus, select:focus {
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
    border-color: #007bff;
    outline: none;
}

/* Buttons */
button {
    padding: 12px 20px;
    border-radius: 8px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

button:hover {
    background-color: #0056b3;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: scale(0.98);
}

/* Expense Table */
#expenseTable {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    overflow-x: auto;
    display: block; /* Ensure horizontal scrolling for smaller screens */
}

/* Table Header and Cells */
#expenseTable th, #expenseTable td {
    padding: 15px;
    border: 1px solid #e9ecef;
    text-align: center;
    font-size: 14px;
    color: #495057;
    white-space: nowrap; /* Prevent text wrapping */
}

/* Table Header */
#expenseTable th {
    background-color: #f8f9fa;
    text-transform: uppercase;
    font-weight: 600;
}

/* Alternating Row Colors */
#expenseTable tbody tr:nth-child(odd) {
    background-color: #fdfdfe;
}

#expenseTable tbody tr:nth-child(even) {
    background-color: #ffffff;
}

/* Serial Number Column */
.serial-number {
    width: 50px;
}

/* Total Amount */
#totalAmount {
    font-size: 24px;
    font-weight: bold;
    color: #28a745;
    margin-top: 30px;
    padding: 10px 0;
    text-align: center;
}

/* Delete Button (Trash Icon) */
.delete-row {
    background: none;
    border: none;
    cursor: pointer;
}

.delete-row i {
    font-size: 20px;
    color: #dc3545;
    vertical-align: middle;
}

.delete-row i:hover {
    color: #a71d2a;
    transition: 0.3s;
}

/* Modal Background */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Modal Content */
.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    text-align: center;
}

/* Close Button */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Modal Input and Button */
#noteInput {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 16px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

#saveNoteButton {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#saveNoteButton:hover {
    background-color: #0056b3;
}

/* Responsive Design */
@media (max-width: 768px) {
    #expenseTable {
        display: block; /* Enable horizontal scrolling */
        overflow-x: auto;
    }

    #expenseTable th, #expenseTable td {
        font-size: 12px; /* Adjust font size for better fit */
        padding: 10px; /* Reduce padding */
    }

    #totalAmount {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 24px;
    }

    button {
        padding: 12px;
        font-size: 14px;
    }

    input, select {
        padding: 10px;
        font-size: 12px;
    }

    #expenseTable th, #expenseTable td {
        font-size: 11px; /* Further reduce font size for smaller screens */
        padding: 8px;
    }

    #totalAmount {
        font-size: 18px;
    }
}
