:root {
    --primary: #1a3a4a;
    --primary-dark: #0d1f28;
    --primary-light: #2d5a6e;
    --accent: #2ecc71;
    --accent-dark: #27ae60;
    --white: #ffffff;
    --bg-light: #f4f7f6;
    --text-dark: #333333;
    --text-muted: #6c757d;
    --border-color: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.invoice-wrapper {
    max-width: 900px;
    margin: 40px auto;
    background: var(--white);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

.invoice-header-accent {
    height: 8px;
    background: var(--primary);
    width: 100%;
}

.invoice-content {
    padding: 50px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.brand-logo {
    max-width: 200px;
    margin-bottom: 15px;
}

.company-details p, .client-details p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.company-details h2 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.doc-title {
    text-align: right;
}

.doc-title h1 {
    color: var(--primary);
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.doc-number {
    display: inline-block;
    background: rgba(46, 204, 113, 0.1);
    color: var(--accent-dark);
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 5px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

.info-section h3 {
    color: var(--primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 5px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.meta-table {
    width: 100%;
}

.meta-table td {
    padding: 4px 0;
    font-size: 0.95rem;
}

.meta-table td:first-child {
    color: var(--text-muted);
    font-weight: 500;
}

.meta-table td:last-child {
    text-align: right;
    font-weight: 600;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
}

.items-table th {
    background: var(--primary);
    color: var(--white);
    padding: 12px 15px;
    text-align: left;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.items-table th:last-child, .items-table td:last-child {
    text-align: right;
}

.items-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.totals-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 40px;
}

.totals-box {
    width: 350px;
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.totals-row.grand-total {
    border-top: 2px solid var(--border-color);
    margin-top: 10px;
    padding-top: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.bank-details, .terms-notes {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.bank-details h4, .terms-notes h4 {
    color: var(--primary);
    margin-bottom: 10px;
}

.bank-details p, .terms-notes p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.action-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    margin-bottom: 50px;
}

.btn {
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #1da851;
    transform: translateY(-2px);
}

.btn-email {
    background: var(--primary);
    color: white;
}

.btn-email:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.btn-print {
    background: var(--text-muted);
    color: white;
}

.btn-print:hover {
    background: var(--text-dark);
    transform: translateY(-2px);
}

@media print {
    body {
        background: white;
    }
    .invoice-wrapper {
        box-shadow: none;
        margin: 0;
        max-width: 100%;
    }
    .action-bar {
        display: none;
    }
}