/*
 * HisabGuru - Premium Design System & Stylesheet
 * Fully Responsive, Glassmorphic, Modern Dark/Light theme values
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #6366f1; /* Indigo */
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.2);
    
    --accent: #d946ef; /* Magenta */
    --accent-glow: rgba(217, 70, 239, 0.15);
    
    --success: #10b981; /* Emerald */
    --success-bg: rgba(16, 185, 129, 0.1);
    
    --danger: #ef4444; /* Rose Red */
    --danger-bg: rgba(239, 68, 68, 0.1);
    
    --warning: #f59e0b; /* Amber */
    --warning-bg: rgba(245, 158, 11, 0.1);
    
    /* UI Decorators */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset & Base Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-md);
}

/* Main Layout Structure */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Navigation Sidebar */
.sidebar {
    width: 260px;
    background: #090d16;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.brand-logo {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: white;
    font-family: 'Outfit', sans-serif;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
    color: white;
    background: var(--primary);
    box-shadow: 0 4px 20px var(--primary-glow);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--primary);
}

/* Main Content Area */
.main-content {
    margin-left: 260px;
    flex-grow: 1;
    padding: 2rem;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.03) 0%, rgba(0, 0, 0, 0) 90%);
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-title span {
    font-weight: 300;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-secondary);
}

/* Stat Cards (Dashboard) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    opacity: 0.5;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: white;
}

.stat-delta {
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-delta.up { color: var(--success); }
.stat-delta.down { color: var(--danger); }

/* Dashboard Charts & Recent tables */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.dashboard-panel {
    padding: 1.5rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.panel-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Custom Table Layouts */
.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    padding: 0.85rem 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Veg / Non-Veg Badges */
.diet-indicator {
    width: 16px;
    height: 16px;
    border: 2px solid;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}
.diet-indicator.veg {
    border-color: var(--success);
}
.diet-indicator.veg::after {
    content: '';
    width: 6px;
    height: 6px;
    background-color: var(--success);
    border-radius: 50%;
}
.diet-indicator.nonveg {
    border-color: var(--danger);
}
.diet-indicator.nonveg::after {
    content: '';
    width: 6px;
    height: 6px;
    background-color: var(--danger);
    border-radius: 50%;
}

/* POS Screen (Three-Column Layout) */
.pos-container {
    display: grid;
    grid-template-columns: 200px 1fr 380px;
    gap: 1.25rem;
    height: calc(100vh - 100px);
    overflow: hidden;
}

body.pos-page {
    overflow: hidden;
}

body.pos-page .main-content {
    padding: 0.75rem 1.25rem;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.pos-page .main-content .header-bar {
    margin-bottom: 0.75rem;
}

body.pos-page .pos-container {
    height: auto;
    flex-grow: 1;
    min-height: 0;
}


/* POS Column 1: Categories Bar */
.pos-categories {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
}

.category-tab {
    padding: 0.9rem 1.2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-fast);
    text-align: left;
}

.category-tab:hover {
    border-color: var(--border-hover);
    color: white;
}

.category-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}

/* POS Column 2: Items Grid */
.pos-items-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.pos-search-bar {
    display: flex;
    gap: 0.75rem;
}

.search-input {
    flex-grow: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.95rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1rem;
    overflow-y: auto;
    flex-grow: 1;
    padding-bottom: 2rem;
}

.item-card {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.item-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.table-card-pos:hover {
    transform: translateY(-3px);
    border-color: var(--primary) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}


.item-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.item-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.item-price {
    font-weight: 700;
    color: white;
    font-size: 1rem;
}

/* POS Column 3: Cart Console */
.pos-cart-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.cart-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.order-type-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.type-btn {
    padding: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition-fast);
    text-align: center;
}

.type-btn.active {
    background: var(--primary);
    color: white;
    border-color: transparent;
}

.cart-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.cart-input {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.8rem;
}

.cart-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Cart Items List */
.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 0.75rem;
    border-bottom: 1px dotted var(--border-color);
}

.cart-item-info {
    max-width: 60%;
}

.cart-item-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.cart-item-addons {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--primary);
    border-color: transparent;
}

.cart-item-qty {
    font-size: 0.85rem;
    font-weight: 600;
    width: 18px;
    text-align: center;
}

.cart-item-price {
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 50px;
    text-align: right;
}

/* Cart Totals Console */
.cart-totals {
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.total-row.grand {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
}

.cart-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding: 1.25rem;
}

/* Kitchen Display System (KDS) Grid */
.kds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.kds-card {
    display: flex;
    flex-direction: column;
    min-height: 250px;
}

.kds-card-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.kds-card-header.pending { background: rgba(245, 158, 11, 0.15); border-bottom: 2px solid var(--warning); }
.kds-card-header.preparing { background: rgba(99, 102, 241, 0.15); border-bottom: 2px solid var(--primary); }
.kds-card-header.ready { background: rgba(16, 185, 129, 0.15); border-bottom: 2px solid var(--success); }

.kds-table-no {
    font-size: 1.1rem;
    font-weight: 700;
}

.kds-timer {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
}

.kds-content {
    padding: 1rem;
    flex-grow: 1;
}

.kds-items-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.kds-item {
    font-size: 0.9rem;
    font-weight: 500;
}

.kds-item-addons {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding-left: 1rem;
}

.kds-instructions {
    font-size: 0.75rem;
    color: var(--warning);
    font-style: italic;
    padding-left: 1rem;
}

.kds-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    width: 500px;
    max-width: 90%;
    padding: 2rem;
    animation: modalSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.modal-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.modal-option input {
    cursor: pointer;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1.5rem;
}

/* Central Tenant Picker styles on Landing page */
.tenant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tenant-card {
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: var(--transition-smooth);
}

.tenant-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.2);
}

.tenant-avatar {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: bold;
    color: white;
}

.tenant-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.tenant-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Forms styling */
.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-control {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.95rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Print Invoice Styling */
@media print {
    body {
        background: white !important;
        color: black !important;
        font-family: 'Inter', Arial, sans-serif;
    }
    
    .app-container {
        display: none !important;
    }
    
    .print-invoice-wrapper {
        display: block !important;
    }


    /* ====================================================
       THERMAL RECEIPT (80mm) LAYOUT
       ==================================================== */
    body.print-format-thermal .print-invoice-wrapper {
        width: 80mm;
        margin: 0 auto;
        padding: 5mm;
        text-align: center;
        font-family: monospace;
    }
    
    body.print-format-thermal .receipt-header {
        border-bottom: 1px dashed black;
        padding-bottom: 5mm;
        margin-bottom: 5mm;
        text-align: center;
    }
    
    body.print-format-thermal .receipt-title {
        font-size: 18px;
        font-weight: bold;
    }
    
    body.print-format-thermal .receipt-table {
        width: 100%;
        border-collapse: collapse;
        margin: 5mm 0;
        text-align: left;
    }
    
    body.print-format-thermal .receipt-table th, 
    body.print-format-thermal .receipt-table td {
        font-size: 12px;
        padding: 2px 0;
    }
    
    body.print-format-thermal .receipt-table th {
        border-bottom: 1px dashed black;
    }
    
    body.print-format-thermal .receipt-totals {
        border-top: 1px dashed black;
        padding-top: 3mm;
        font-size: 12px;
        text-align: right;
    }
    
    body.print-format-thermal .receipt-footer {
        border-top: 1px dashed black;
        margin-top: 5mm;
        padding-top: 5mm;
        font-size: 10px;
        text-align: center;
    }

    /* ====================================================
       A4 TAX INVOICE LAYOUT
       ==================================================== */
    body.print-format-a4 .print-invoice-wrapper {
        width: 210mm;
        min-height: 297mm;
        margin: 0 auto;
        padding: 15mm;
        box-sizing: border-box;
        text-align: left;
        color: #1e293b;
        font-family: 'Inter', Arial, sans-serif;
    }
    
    body.print-format-a4 .a4-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        border-bottom: 2px solid #e2e8f0;
        padding-bottom: 15px;
        margin-bottom: 25px;
    }
    
    body.print-format-a4 .a4-restaurant-details {
        max-width: 60%;
    }
    
    body.print-format-a4 .a4-restaurant-name {
        font-size: 26px;
        font-weight: 800;
        color: #4f46e5;
        margin-bottom: 5px;
        letter-spacing: -0.5px;
    }
    
    body.print-format-a4 .a4-restaurant-meta {
        font-size: 12px;
        line-height: 1.5;
        color: #475569;
    }
    
    body.print-format-a4 .a4-invoice-meta-box {
        text-align: right;
        font-size: 13px;
        line-height: 1.6;
    }
    
    body.print-format-a4 .a4-title {
        font-size: 24px;
        font-weight: 800;
        color: #0f172a;
        margin-bottom: 8px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    body.print-format-a4 .a4-billing-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 25px;
        gap: 20px;
    }
    
    body.print-format-a4 .a4-bill-card {
        flex: 1;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        padding: 15px;
    }
    
    body.print-format-a4 .a4-card-title {
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        color: #64748b;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 5px;
        margin-bottom: 8px;
        letter-spacing: 0.5px;
    }
    
    body.print-format-a4 .a4-card-detail {
        font-size: 12px;
        line-height: 1.5;
        color: #334155;
    }
    
    body.print-format-a4 .a4-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 25px;
    }
    
    body.print-format-a4 .a4-table th {
        background: #f1f5f9;
        color: #475569;
        font-weight: 700;
        font-size: 11px;
        text-transform: uppercase;
        padding: 12px 10px;
        border-bottom: 2px solid #cbd5e1;
        text-align: left;
    }
    
    body.print-format-a4 .a4-table td {
        padding: 12px 10px;
        border-bottom: 1px solid #e2e8f0;
        font-size: 13px;
        color: #334155;
        vertical-align: top;
    }
    
    body.print-format-a4 .a4-item-name {
        font-weight: 600;
        color: #1e293b;
    }
    
    body.print-format-a4 .a4-item-addons {
        font-size: 11px;
        color: #64748b;
        margin-top: 4px;
        font-style: italic;
    }
    
    body.print-format-a4 .a4-totals-section {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 30px;
    }
    
    body.print-format-a4 .a4-notes {
        max-width: 50%;
        font-size: 11px;
        color: #64748b;
        line-height: 1.5;
    }
    
    body.print-format-a4 .a4-totals-table {
        width: 40%;
        border-collapse: collapse;
    }
    
    body.print-format-a4 .a4-totals-table td {
        padding: 6px 10px;
        font-size: 13px;
        color: #475569;
    }
    
    body.print-format-a4 .a4-totals-table tr.a4-grand-total-row td {
        font-size: 16px;
        font-weight: 800;
        color: #1e293b;
        border-top: 2px solid #e2e8f0;
        border-bottom: 2px double #cbd5e1;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    body.print-format-a4 .a4-footer {
        border-top: 1px solid #e2e8f0;
        padding-top: 15px;
        text-align: center;
        font-size: 11px;
        color: #94a3b8;
        margin-top: 30px;
    }
}

.print-invoice-wrapper {
    display: none; /* Hide during normal screen viewing */
}
