body {
    background-color: #f0fdf4; /* Light green background */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
    margin-bottom: 30px;
}

.logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 20px;
}

h1 {
    color: #1e8838; /* Darker green for headings */
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

h4 {
    color: #28a745;
    margin-top: 20px;
    margin-bottom: 15px;
}

.form-label {
    font-weight: 500;
    color: #333;
}

.btn-primary, .btn-success {
    background-color: #28a745; /* Green buttons */
    border-color: #28a745;
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-2px);
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
    transform: translateY(-2px);
}

.product-row .form-control {
    margin-bottom: 10px;
}

.product-row .btn-danger {
    margin-top: 32px;
}

/* Invoice Modal Styling */
#invoice-content {
    padding: 30px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.invoice-header {
    background-color: #ffffff; /* Lightest green for header */
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-bottom: 2px solid #28a745;
}

.invoice-header h2 {
    color: #1e8838;
    font-weight: 700;
}

.invoice-header .logo {
    max-width: 200px;
    margin-bottom: 15px;
}

.invoice-details p {
    margin-bottom: 5px;
    font-size: 1.05em;
}

.invoice-details strong {
    color: #333;
}

.table th {
    background-color: #28a745; /* Green for table headers */
    color: #ffffff;
    border-color: #218838;
}

.table td, .table th {
    border-color: #e0e0e0;
}

.invoice-summary p, .invoice-summary h4 {
    margin-bottom: 8px;
}

.invoice-summary h4 {
    color: #1e8838;
    font-weight: 700;
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 20px;
}

.invoice-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dashed #ccc;
    color: #555;
    font-style: italic;
}

.table-responsive-custom {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767.98px) {
    /* Adjust modal width for smaller screens */
    .modal-dialog {
        margin: 0.5rem;
        max-width: none;
        width: auto;
    }

    /* Make table more compact */
    .table {
        font-size: 0.85em;
        table-layout: fixed;
        width: 100%;
    }

    .table th, .table td {
        padding: 0.4rem;
    }

    .table th {
        white-space: nowrap; /* Keep header text on one line */
        font-size: 0.8em; /* Further reduce header font size */
    }

    .table td {
        font-size: 0.8em; /* Further reduce cell font size */
        word-wrap: break-word; /* Allow content to wrap in cells */
    }

    /* Adjust column widths more flexibly, rely on overflow-x: auto as fallback */
    /* Removed fixed widths for specific columns to allow browser to adjust */

    /* Ensure the total column is visible */
    /* No specific width needed if table-layout is not fixed for all columns or if overflow-x is handled */
}