/* Print Button Styles */
.orders-page .btn-print {
    background: #e6f7f0;
    color: #10b981;
}

.orders-page .btn-print:hover {
    background: #10b981;
    color: white;
    transform: scale(1.1);
}

/* Print Modal Tabs */
.orders-page .print-tabs {
    display: flex;
    gap: 8px;
    padding: 0 24px;
    border-bottom: 2px solid #e2e8f0;
}

.orders-page .print-tab {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: #718096;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.orders-page .print-tab:hover {
    color: #667eea;
}

.orders-page .print-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Print Content */
.orders-page .print-content {
    max-height: 70vh;
    overflow-y: auto;
    background: #f5f5f5;
    padding: 20px;
}

.orders-page .print-modal .modal-content {
    max-width: 230mm;
    width: 230mm;
}


/* Receipt Styles */
.orders-page .receipt {
    background: white;
    padding: 20px 30px;
    width: 210mm;
    min-height: 297mm;
    max-width: 210mm;
    margin: 0 auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-sizing: border-box;
}

.orders-page .receipt-header {
    text-align: center;
    margin-bottom: 12px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

.orders-page .company-title {
    font-size: 11px;
    color: #667eea;
    margin: 0;
    font-weight: 600;
}

.orders-page .company-name {
    font-size: 18px;
    color: #1a202c;
    margin: 2px 0;
    font-weight: 800;
}

.orders-page .company-details {
    font-size: 10px;
    color: #4a5568;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.orders-page .company-details p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.orders-page .company-details i {
    color: #667eea;
    font-size: 9px;
}

.orders-page .receipt-divider {
    display: none;
}

.orders-page .receipt-info {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
    background: #f7fafc;
    padding: 8px 12px;
    border-radius: 6px;
    flex-wrap: wrap;
}

.orders-page .info-row {
    display: flex;
    gap: 6px;
    font-size: 11px;
    align-items: center;
}

.orders-page .info-row.highlighted {
    background: #667eea;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    flex: 1 1 100%;
}

.orders-page .info-row .label {
    color: #718096;
    font-weight: 600;
}

.orders-page .info-row.highlighted .label,
.orders-page .info-row.highlighted .value {
    color: white;
}

.orders-page .info-row .value {
    color: #1a202c;
    font-weight: 700;
}

/* Receipt Table */
.orders-page .receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 11px;
}

.orders-page .receipt-table thead {
    background: #667eea;
    color: white;
}

.orders-page .receipt-table th {
    padding: 6px 4px;
    text-align: center;
    font-weight: 700;
    border: 1px solid #5568d3;
    font-size: 10px;
}

.orders-page .receipt-table td {
    padding: 5px 4px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.orders-page .receipt-table tbody tr:nth-child(even) {
    background: #f7fafc;
}

.orders-page .receipt-table tfoot {
    background: #f7fafc;
    font-weight: 700;
}

.orders-page .receipt-table tfoot td {
    padding: 8px 4px;
    border: 2px solid #667eea;
}

.orders-page .receipt-table .total-row {
    background: #eef2ff;
}

.orders-page .receipt-table .grand-total-row {
    background: #667eea;
    color: white;
    font-size: 12px;
}

.orders-page .receipt-table .grand-total-row td {
    border-color: #5568d3;
}

/* Receipt Footer */
.orders-page .receipt-note {
    background: #fef3c7;
    padding: 8px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 10px;
    border-left: 3px solid #f59e0b;
}

.orders-page .receipt-summary {
    background: #f7fafc;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
}

.orders-page .summary-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 11px;
    border-bottom: 1px solid #e2e8f0;
}

.orders-page .summary-item:last-child {
    border-bottom: none;
    font-size: 13px;
    font-weight: 700;
}

.orders-page .summary-item strong {
    color: #667eea;
}

.orders-page .receipt-footer {
    text-align: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
    color: #718096;
    font-size: 10px;
}

.orders-page .customer-receipt {
    margin-bottom: 20px;
}

.orders-page .page-break {
    page-break-after: always;
}

.orders-page .empty-print {
    text-align: center;
    padding: 80px 20px;
    color: #a0aec0;
}

.orders-page .empty-print i {
    font-size: 64px;
    display: block;
    margin-bottom: 16px;
}

/* Print Media Query */
@media print {
    @page {
        size: A4;
        margin: 10mm;
    }
    
    .orders-page .no-print {
        display: none !important;
    }

    .orders-page .print-content {
        max-height: none !important;
        overflow: visible !important;
    }

    .orders-page .receipt {
        padding: 10px 15px !important;
        page-break-inside: avoid;
        width: 100%;
        max-width: 100%;
    }

    .orders-page .page-break {
        page-break-after: always;
    }

    .orders-page .modal-overlay {
        position: static;
        background: white;
    }

    .orders-page .modal-content {
        box-shadow: none;
        max-height: none;
        overflow: visible;
        width: 100% !important;
        max-width: 100% !important;
    }

    body {
        margin: 0;
        padding: 0;
    }
    
    /* Compact header for print */
    .receipt-header {
        margin-bottom: 6px !important;
        padding-bottom: 5px !important;
    }
    
    .company-title {
        font-size: 10px !important;
    }
    
    .company-name {
        font-size: 14px !important;
        margin: 1px 0 !important;
    }
    
    .company-details {
        font-size: 8px !important;
        gap: 15px !important;
    }
    
    .company-details i {
        font-size: 8px !important;
    }
    
    /* Compact info section */
    .receipt-info {
        margin-bottom: 6px !important;
        padding: 5px 8px !important;
    }
    
    .info-row {
        font-size: 9px !important;
    }
    
    .info-row.highlighted {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }
    
    /* Compact table */
    .receipt-table {
        margin: 6px 0 !important;
        font-size: 9px !important;
        width: 100%;
    }
    
    .receipt-table th {
        padding: 4px 2px !important;
        font-size: 8px !important;
    }
    
    .receipt-table td {
        padding: 3px 2px !important;
    }
    
    .receipt-table tfoot td {
        padding: 5px 2px !important;
    }
    
    .receipt-table .grand-total-row {
        font-size: 10px !important;
    }
    
    /* Compact footer and notes */
    .receipt-note {
        padding: 5px !important;
        margin: 6px 0 !important;
        font-size: 8px !important;
    }
    
    .receipt-summary {
        padding: 6px !important;
        margin: 6px 0 !important;
    }
    
    .summary-item {
        padding: 4px 0 !important;
        font-size: 9px !important;
    }
    
    .summary-item:last-child {
        font-size: 11px !important;
    }
    
    .receipt-footer {
        margin-top: 8px !important;
        padding-top: 6px !important;
        font-size: 8px !important;
    }
    
    /* Customer receipt spacing */
    .customer-receipt {
        margin-bottom: 15px !important;
    }
}



/* Customer Index Styles */
.customer-index {
    padding: 20px 30px;
    max-width: 800px;
    margin: 0 auto;
}

.index-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.index-header h2 {
    font-size: 18px;
    color: #1a202c;
    margin: 0 0 5px 0;
    font-weight: 800;
}

.index-header p {
    font-size: 11px;
    color: #4a5568;
    margin: 0;
}

.index-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.index-item {
    display: grid;
    grid-template-columns: 40px 1fr auto auto 120px;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.index-item:hover {
    background: #edf2f7;
    transform: translateX(-5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.index-number {
    font-weight: 700;
    font-size: 18px;
    color: #667eea;
}

.customer-name {
    font-weight: 600;
    font-size: 16px;
    color: #1a202c;
}

.item-count {
    font-size: 13px;
    color: #718096;
    white-space: nowrap;
}

.index-dots {
    flex: 1;
    border-bottom: 2px dotted #cbd5e0;
    margin: 0 8px;
}

.net-amount {
    font-weight: 700;
    font-size: 16px;
    color: #667eea;
    text-align: left;
    white-space: nowrap;
}

.btn-print-single {
    padding: 6px 12px;
    border-radius: 6px;
    background: #48bb78;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.btn-print-single:hover {
    background: #38a169;
    transform: scale(1.05);
}

.btn-print-single i {
    font-size: 14px;
}

/* Customer Receipt Specific - Make info-row full width */
.customer-receipt .receipt-info .info-row {
    grid-column: 1 / -1;
}

/* Print adjustments for index */
@media print {
    .btn-print-single {
        display: none !important;
    }
    
    .index-item {
        page-break-inside: avoid;
        cursor: default !important;
    }
    
    .index-item:hover {
        transform: none;
        box-shadow: none;
    }
    
    .customer-index {
        padding: 15px;
    }
}



