/* ============================================================
   MEDISTORE PRO — PRINT STYLES
   ============================================================ */

@media print {
  /* Hide everything except print area */
  body > * { display: none !important; }
  #print-area { display: block !important; }

  body { background: #fff; font-family: 'Inter', sans-serif; font-size: 11pt; }

  .print-area { display: block; }

  /* ---- Invoice A4 ---- */
  .invoice-wrap {
    max-width: 740px; margin: 0 auto; padding: 20px;
    font-family: 'Inter', Arial, sans-serif; font-size: 10pt;
    color: #000;
  }

  .invoice-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    border-bottom: 2px solid #6C63FF; padding-bottom: 12px; margin-bottom: 12px;
  }

  .inv-store h2 { font-size: 18pt; font-weight: 800; color: #6C63FF; margin-bottom: 4px; }
  .inv-store p { font-size: 9pt; color: #555; margin: 2px 0; }

  .inv-meta { text-align: right; font-size: 9pt; }
  .inv-meta p { margin: 3px 0; }
  .inv-meta strong { color: #333; }

  .inv-customer {
    background: #f8f9ff; border: 1px solid #e5e7eb;
    padding: 8px 12px; border-radius: 6px;
    font-size: 10pt; margin-bottom: 12px;
  }

  .inv-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: 9pt; }
  .inv-table th {
    background: #6C63FF; color: #fff; padding: 6px 8px;
    text-align: left; font-weight: 700;
  }
  .inv-table td { padding: 6px 8px; border-bottom: 1px solid #e5e7eb; }
  .inv-table tbody tr:nth-child(even) { background: #f8f9ff; }

  .inv-totals {
    float: right; width: 260px;
    border: 1px solid #e5e7eb; border-radius: 6px; overflow: hidden;
    font-size: 10pt;
  }
  .inv-total-row {
    display: flex; justify-content: space-between;
    padding: 5px 12px; border-bottom: 1px solid #e5e7eb;
  }
  .inv-total-row.grand {
    background: #6C63FF; color: #fff; font-weight: 800;
    font-size: 12pt; border-bottom: none;
  }

  .inv-footer {
    clear: both; border-top: 1px solid #e5e7eb;
    margin-top: 20px; padding-top: 10px;
    text-align: center; font-size: 8.5pt; color: #888;
  }

  /* ---- 80mm Thermal ---- */
  .thermal-invoice {
    width: 72mm; margin: 0; padding: 3mm;
    font-family: 'Courier New', monospace; font-size: 8pt;
    color: #000;
  }

  .thermal-invoice .th-center { text-align: center; }
  .thermal-invoice .th-store-name { font-size: 12pt; font-weight: bold; }
  .thermal-invoice .th-divider { border-top: 1px dashed #000; margin: 3mm 0; }
  .thermal-invoice table { width: 100%; font-size: 7.5pt; }
  .thermal-invoice td { padding: 1mm 0; vertical-align: top; }
  .thermal-invoice .th-total-row { display: flex; justify-content: space-between; }
  .thermal-invoice .th-grand { font-weight: bold; font-size: 9pt; border-top: 1px solid #000; padding-top: 2mm; }

  @page {
    margin: 10mm 8mm;
    size: A4;
  }

  @page thermal {
    size: 80mm auto;
    margin: 2mm;
  }
}
