:root {
    --primary-color: #4a6baf;
    --secondary-color: #6c757d;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f5f7fa;
    color: #333;
    padding: 20px;
}

.invoice-app {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.app-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.logo-container i {
    color: var(--primary-color);
    margin-right: 10px;
}

.tagline {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-top: 5px;
}

h1,
h2 {
    color: var(--dark-color);
    margin-bottom: 15px;
}

h1 {
    font-size: 1.8rem;
}

h2 {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

h2 i {
    margin-right: 10px;
    color: var(--primary-color);
}

.form-section,
.business-branding,
.items-section,
.totals-section,
.notes-section {
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
}

.business-branding {
    background-color: #f8fafc;
    border-color: #dbe4f0;
}

.branding-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.brand-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.logo-upload-container {
    display: flex;
    align-items: center;
    gap: 10px;
    grid-column: 1 / -1;
}

#logoFileName {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

input,
textarea,
select {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 107, 175, 0.2);
}

.inline-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.inline-fields div {
    margin-bottom: 0;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

th,
td {
    border: 1px solid #e0e0e0;
    padding: 12px;
    text-align: left;
}

th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
}

td input {
    margin-bottom: 0;
    padding: 8px;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button i {
    margin-right: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #3a5a9f;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.totals-section {
    background-color: #f8fafc;
}

.totals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.totals-grid div {
    margin-bottom: 0;
}

.grand-total {
    grid-column: 1 / -1;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    font-size: 1.2rem;
    font-weight: bold;
}

.grand-total span {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
}

.notes-section textarea {
    min-height: 100px;
    resize: vertical;
}

.pdf-options {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.pdf-options label {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
    cursor: pointer;
}

.pdf-options input[type="radio"] {
    width: auto;
    margin-right: 5px;
    margin-bottom: 0;
}

.app-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: var(--secondary-color);
}

.app-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.app-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {

    .inline-fields,
    .totals-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    button {
        width: 100%;
    }

    .pdf-options {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .pdf-options label {
        margin-right: 0;
        margin-bottom: 5px;
    }
}