* {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.logo-container {
    width: 200px;
    height: 100px;
    border: 1px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-container img {
    max-width: 100%;
    max-height: 100%;
}

.logo-upload {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.invoice-info {
    text-align: right;
}

.invoice-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.addresses {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.address-box {
    width: 48%;
}

.address-box h3 {
    margin-top: 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    color: #555;
}

.address-content {
    min-height: 100px;
    border: 1px solid #ddd;
    padding: 10px;
}

textarea {
    width: 100%;
    min-height: 100px;
    border: none;
    resize: vertical;
    outline: none;
    font-size: 14px;
}

.invoice-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.detail-group {
    display: flex;
    margin-bottom: 10px;
}

.detail-label {
    width: 120px;
    font-weight: bold;
    color: #555;
}

.detail-value input {
    border: 1px solid #ddd;
    padding: 5px;
    width: 200px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

th {
    background-color: #f2f2f2;
    text-align: left;
    padding: 10px;
    border-bottom: 2px solid #ddd;
}

td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.item-input {
    width: 100%;
    border: none;
    outline: none;
    background-color: transparent;
}

.amount-column {
    text-align: right;
}

.add-row-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 3px;
    margin-bottom: 20px;
}

.remove-row-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 5px 8px;
    cursor: pointer;
    border-radius: 3px;
}

.totals {
    width: 350px;
    margin-left: auto;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.grand-total {
    font-weight: bold;
    font-size: 18px;
    border-top: 2px solid #333;
    padding-top: 10px;
    margin-top: 10px;
}

.buttons {
    margin-top: 30px;
    text-align: center;
}

.download-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 3px;
}

.download-btn:hover {
    background-color: #0b7dda;
}

.number-input {
    text-align: right;
}

.editable {
    cursor: text;
    padding: 2px 5px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.editable:hover {
    background-color: #f8f9fa;
}

.editable:focus {
    background-color: #e9ecef;
    outline: none;
}

/* Make sure editable elements in table headers maintain style */
th.editable {
    background-color: #f2f2f2;
}

th.editable:hover {
    background-color: #e9ecef;
}

th.editable:focus {
    background-color: #dee2e6;
}

.note-row textarea {
    min-height: 100px;
    height: auto;
    resize: vertical;
    width: 100%;
    font-size: 13px;
    line-height: 1.5;
    overflow: auto;
    box-sizing: border-box;
    padding: 12px;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 600px) {
    body {
        padding: 5px;
    }
    .container {
        max-width: 100%;
        padding: 8px;
        box-shadow: none;
    }
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .invoice-info {
        text-align: left;
        width: 100%;
    }
    .logo-container {
        width: 100%;
        height: 70px;
        margin-bottom: 10px;
    }
    .addresses {
        flex-direction: column;
        gap: 10px;
    }
    .address-box {
        width: 100%;
    }
    .invoice-details {
        flex-direction: column;
        gap: 10px;
    }
    .detail-value input, .totals {
        width: 100% !important;
        min-width: 0;
    }
    table, th, td {
        font-size: 13px;
    }
    th, td {
        padding: 6px;
    }
    .totals {
        width: 100%;
        margin-left: 0;
    }
    .buttons {
        margin-top: 20px;
    }
    .download-btn {
        width: 100%;
        font-size: 15px;
        padding: 12px 0;
    }
    textarea {
        min-height: 60px;
        font-size: 13px;
    }
    .invoice-footer {
        font-size: 12px;
        padding: 12px 0;
    }
}

.invoice-footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    color: #666;
    font-size: 14px;
    border-top: 1px solid #eee;
}

.invoice-footer a {
    color: #2196F3;
    text-decoration: none;
    transition: color 0.2s;
}

.invoice-footer a:hover {
    color: #0b7dda;
    text-decoration: underline;
} 