/* Vetmivo Phase 8: Sales, POS, Payments & Cari Account Styles */

.sales-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.sales-metric-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.sales-metric-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sales-metric-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #111827;
}

.sales-metric-sub {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Sale Detail Layout */
.sale-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

@media (max-width: 992px) {
    .sale-detail-grid {
        grid-template-columns: 1fr;
    }
}

.sale-status-hero {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

/* General Tables */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.table th {
    background: #f9fafb;
    color: #4b5563;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #f9fafb;
}

.table-sm th, .table-sm td {
    padding: 8px 12px;
}

/* Modal Backdrops & Overlays */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1050;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop.active {
    display: flex !important;
}

.modal-content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: #111827;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: #f9fafb;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Printable Thermal Receipt Styles */
.receipt-paper {
    background: #ffffff;
    max-width: 420px;
    margin: 0 auto;
    padding: 24px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: #111827;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.receipt-header {
    text-align: center;
    border-bottom: 1px dashed #d1d5db;
    padding-bottom: 14px;
    margin-bottom: 14px;
}

.receipt-title {
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 4px;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 12px;
}

.receipt-table th, .receipt-table td {
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
}

.receipt-totals {
    border-top: 1px dashed #d1d5db;
    padding-top: 10px;
    margin-top: 10px;
    font-size: 13px;
}

.receipt-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.receipt-total-row.grand {
    font-size: 16px;
    font-weight: 800;
    border-top: 1px solid #111827;
    padding-top: 8px;
    margin-top: 8px;
}

.receipt-footer {
    text-align: center;
    border-top: 1px dashed #d1d5db;
    padding-top: 12px;
    margin-top: 16px;
    font-size: 11px;
    color: #6b7280;
}

@media print {
    body {
        background: #ffffff !important;
        padding: 0 !important;
    }
    .no-print {
        display: none !important;
    }
    .receipt-paper {
        border: none !important;
        box-shadow: none !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
}
