body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 1000px;
}

h1, h2, h3 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

.section {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
}

.info-group {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.info-group .section {
    flex: 1;
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
textarea,
select,
input[type="file"] {
    width: calc(100% - 22px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    margin-left: 0;
}

input:disabled, select:disabled, textarea:disabled {
    background-color: #e9e9e9;
    color: #777;
    cursor: not-allowed;
}

.file-inputs-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.file-input-wrapper {
    flex: 1;
    min-width: 200px;
}

.item-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    align-items: flex-end;
}

.item-row > div {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 120px;
}
.item-row > div:nth-child(1) {
    flex: 2;
}

.item-row input, .item-row select {
    width: 100%;
    margin-bottom: 0;
}

.item-price-container {
    position: relative;
}
.item-price-container input {
    padding-right: 24px;
}
.item-price-symbol {
    position: absolute;
    right: 10px;
    top: calc(50% + 15px);
    transform: translateY(-50%);
    pointer-events: none;
    color: #555;
}

.item-discount-percentage {
    text-align: center;
}

.item-total-display {
    flex-basis: 100px;
    display: flex;
    flex-direction: column;
    text-align: right;
}
.item-total {
    font-weight: bold;
    color: #007bff;
    margin-top: 5px;
}

button {
    background-color: #007bff;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

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

.totals {
    text-align: right;
    font-size: 1.1em;
}

.totals h3 {
    font-size: 1.5em;
    color: #007bff;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}
.actions button, .actions .file-input-wrapper {
    flex-shrink: 0;
}

.pdf-preview {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dashed #ccc;
    display: none;
}

#pdfFrame {
    width: 100%;
    height: 600px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.invoice-detail-group {
    margin-bottom: 15px;
}
.invoice-detail-group:last-of-type {
    margin-bottom: 0;
}
.invoice-detail-group label,
.invoice-detail-group input {
    margin-bottom: 0;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.checkbox-group label {
    margin-bottom: 0;
    margin-left: 8px;
    font-weight: normal;
    display: inline;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    .info-group {
        flex-direction: column;
        gap: 15px;
    }
    .info-group .section {
        margin-bottom: 0;
    }
    .item-row {
        flex-direction: column;
        align-items: stretch;
    }
    .item-row > div {
        width: 100%;
        min-width: unset;
    }
    .item-row input, .item-row select, .item-total {
        width: 100%;
        margin-bottom: 10px;
    }
    .item-price-symbol {
        top: calc(50% + 5px);
    }
    .file-inputs-container {
        flex-direction: column;
        gap: 15px;
    }
    .actions {
        flex-direction: column;
        align-items: center;
    }
    .actions button, .actions .file-input-wrapper {
        width: 100%;
        max-width: 300px;
    }
}
