/* General Body Styles */
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    color: #333;
}

/* Login & App Container Styles */
.login-container, .container {
    max-width: 900px;
    margin: 30px auto;
    padding: 30px;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-radius: 8px;
}
.login-container {
    max-width: 360px;
    margin-top: 100px;
    text-align: center;
}
.login-container img {
    width: 150px;
    margin-bottom: 20px;
}
.login-container h2 {
    margin-bottom: 25px;
}

/* Form Styles */
h1, h2, h3 {
    color: #2D3748;
}
.form-section {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    align-items: flex-end;
}
.form-group {
    flex: 1;
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}
.form-group textarea {
    resize: vertical;
}
.form-group .auto-gen-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.form-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    background-color: #4A5568;
    color: white;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
}
.btn:hover {
    background-color: #2D3748;
}
.btn-danger { background-color: #e53e3e; }
.btn-danger:hover { background-color: #c53030; }
.btn-success { background-color: #48bb78; }
.btn-success:hover { background-color: #38a169; }

/* Header with Logout */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Items Table */
#items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
#items-table th, #items-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
#items-table th {
    background-color: #f9f9f9;
}
#items-table textarea {
    width: 100%;
    border: none;
    padding: 5px;
}
#items-table input[type="number"] {
    width: 100%;
    border: 1px solid #ccc; /* Make it visible */
    padding: 5px;
    text-align: right;
}
.remove-item-btn {
    padding: 5px 10px;
}

/* Dashboard Table */
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.dashboard-table th, .dashboard-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}
.dashboard-table th {
    background-color: #edf2f7;
}
.dashboard-table tr:nth-child(even) {
    background-color: #f9f9f9;
}
.dashboard-table .actions a {
    margin-right: 5px;
}

/* Invoice View Styles */
.invoice-box {
    max-width: 800px;
    margin: auto;
    padding: 0; /* Remove padding to allow header image to touch edges */
    border: 1px solid #eee;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    font-size: 16px;
    line-height: 24px;
    color: #555;
    background: #fff;
}
.invoice-header {
    background-image: url('../img/header-bg.png');
    background-size: cover;
    background-repeat: no-repeat;
    padding: 30px;
    height: 150px; /* Adjust as needed */
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.invoice-header .logo {
    width: 200px;
}
.invoice-body {
    padding: 30px;
}
.invoice-title {
    font-size: 45px;
    font-weight: bold;
    color: #333;
    margin: 0;
    text-align: right;
}
.invoice-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}
.invoice-details .bill-to, .invoice-details .info {
    width: 48%;
}
.invoice-details strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}
.invoice-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.invoice-table thead tr {
    background: #4A5568;
    color: #fff;
}
.invoice-table th, .invoice-table td {
    padding: 12px 15px;
}
.invoice-table .service-header { border-radius: 8px 0 0 8px; }
.invoice-table .total-header { border-radius: 0 8px 8px 0; text-align: right; }
.invoice-table tbody tr td { border-bottom: 1px solid #eee; }
.invoice-table .description { width: 75%; }
.invoice-table .amount { text-align: right; }
.invoice-total {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 2px solid #4A5568;
}
.invoice-total table { width: 40%; text-align: right; }
.invoice-total td { padding: 5px; }
.invoice-total .grand-total { font-weight: bold; font-size: 1.2em; color: #333; }
.invoice-footer-section { margin-top: 30px; }
.invoice-footer-section h3 {
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
    margin-bottom: 10px;
    font-size: 1em;
    color: #333;
}
.invoice-footer-section p, .invoice-footer-section ul {
    font-size: 0.9em;
    line-height: 1.6;
    white-space: pre-wrap; /* To respect newlines in textarea */
}
.invoice-footer-section ul { padding-left: 20px; margin: 0; }
.invoice-footer {
    margin-top: 50px;
    padding: 20px;
    background-color: #4A5568;
    color: #fff;
    text-align: center;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-radius: 5px;
}
.invoice-footer a { color: #fff; text-decoration: none; }
.no-print { text-align: center; margin: 20px; }

/* A4 paper size for printing */
@media print {
    body { background-color: #fff; }
    .no-print { display: none; }
    .invoice-box {
        box-shadow: none;
        border: none;
        margin: 0;
        padding: 0;
        width: 21cm;
        height: 29.7cm;
    }
}
@page {
    size: A4;
    margin: 0;
}
/* ... (rest of the style.css file) ... */

/* ==== START: Modal Styles ==== */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}
.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
}
.modal-close:hover,
.modal-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.modal-options {
    margin: 20px 0;
}
.radio-group {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    cursor: pointer;
}
.radio-group:hover {
    background-color: #f9f9f9;
}
.radio-group input[type="radio"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
}
.radio-group label {
    font-weight: normal;
    cursor: pointer;
}
.radio-group label strong {
    display: block;
    font-weight: bold;
    color: #333;
}
.radio-group label small {
    color: #777;
}
.modal-actions {
    text-align: right;
    margin-top: 20px;
}
.modal-actions .btn {
    margin-left: 10px;
}
/* ... (rest of the style.css file) ... */

/* ==== START: Discount Section Styles ==== */
.radio-toggle-group {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0;
}
.radio-toggle-group input[type="radio"] {
    display: none; /* Hide the actual radio button */
}
.radio-toggle-group label {
    padding: 10px 15px;
    cursor: pointer;
    background-color: #f9f9f9;
    color: #555;
    flex-grow: 1;
    text-align: center;
    border-right: 1px solid #ddd;
    margin-bottom: 0;
}
.radio-toggle-group label:last-child {
    border-right: none;
}
.radio-toggle-group input[type="radio"]:checked + label {
    background-color: #4A5568;
    color: white;
}
.input-with-symbol {
    position: relative;
    display: flex;
    align-items: center;
}
.input-with-symbol input {
    padding-right: 40px; /* Make space for the symbol */
}
.input-with-symbol #discount_symbol {
    position: absolute;
    right: 10px;
    color: #888;
    font-weight: bold;
}
/* ==== END: Discount Section Styles ==== */
/* ==== END: Modal Styles ==== */