:root {
--bg-color: #fafafa;
--text-main: #111827;
--text-muted: #4b5563;
--border-color: rgba(0, 0, 0, 0.08);
}
body {
background-color: var(--bg-color);
color: var(--text-main);
font-family: 'Inter', sans-serif;
-webkit-font-smoothing: antialiased;
}
.navbar-brand { font-weight: 800; letter-spacing: 2px; }
.invoice-card {
background: #ffffff;
border: 1px solid var(--border-color);
border-radius: 16px;
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
position: relative;
}
.form-control, .form-select {
border: 1px solid var(--border-color);
padding: 10px 14px;
border-radius: 8px;
font-size: 0.95rem;
}
.form-control:focus {
border-color: #000;
box-shadow: none;
}
.table th {
font-weight: 600;
text-transform: uppercase;
font-size: 0.75rem;
letter-spacing: 0.5px;
color: var(--text-muted);
border-bottom: 2px solid var(--border-color);
white-space: nowrap;
}
.btn-dark {
background: #000;
border: none;
border-radius: 8px;
padding: 12px 24px;
font-weight: 500;
}
.btn-dark:hover { background: #222; }
.badge-secure {
font-size: 0.75rem;
background: #eef2f6;
color: #334155;
padding: 4px 10px;
border-radius: 4px;
display: inline-block;
}

/* Logo Upload Box */
.logo-box-container {
max-width: 240px;
margin-bottom: 1.5rem;
}
.logo-uploader-area {
border: 1px dashed var(--border-color);
border-radius: 8px;
padding: 15px;
text-align: center;
background: #fdfdfd;
cursor: pointer;
position: relative;
transition: all 0.2s ease;
}
.logo-uploader-area:hover {
border-color: #000;
background: #f8fafc;
}
.logo-render-preview {
max-height: 70px;
max-width: 100%;
object-fit: contain;
display: none;
}
.logo-actions-overlay {
display: none;
margin-top: 8px;
}

/* Mobile Layout Adjustments */
@media (max-width: 767.98px) {
.invoice-card {
    padding: 16px !important;
    border-radius: 12px;
}
.table-responsive {
    border: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table td {
    padding: 8px 4px !important;
}
.form-control {
    padding: 8px 10px;
    font-size: 0.875rem;
}
.item-desc {
    min-width: 160px;
}
.item-rate, .item-qty, .item-total {
    min-width: 80px;
}
}

/* ==========================================================================
Premium PDF & Print Stylesheet Engine
========================================================================== */
@media print {
* {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    page-break-inside: avoid;
}

body {
    background-color: #fafafa !important; 
    color: #111827 !important;
    font-size: 14px !important;
}

/* Hide web interface buttons and controls */
nav, .action-header, .action-cell, #add-row-btn, .text-center.mt-4, .col-lg-3, .logo-actions-overlay, .logo-uploader-area i, .logo-uploader-area p {
    display: none !important;
}

@page {
    margin: 1.2cm;
}

main {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

.col-lg-9 {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Keep the premium card design on the PDF */
.invoice-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02) !important;
    padding: 40px !important;
}

/* Clean look for form elements on print */
.form-control, .form-select {
    border: none !important;
    background: transparent !important;
    color: #111827 !important;
    padding: 4px 0 !important;
    box-shadow: none !important;
}

textarea.form-control {
    height: auto !important;
}

.input-group-text {
    background: transparent !important;
    border: none !important;
    color: #4b5563 !important;
    padding-left: 0 !important;
}

.table th {
    color: #4b5563 !important;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08) !important;
}

.table td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.logo-uploader-area {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    text-align: left !important;
}

.logo-render-preview {
    display: block !important;
}

h1, .fw-bold {
    color: #111827 !important;
}
}