/* Smart Sphinx — small static stylesheet. Tailwind handles the bulk via CDN. */

html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
html[lang="ar"] body { font-family: "Segoe UI", "Tahoma", system-ui, sans-serif; }

/* Keep numeric/SKU/identifier strings LTR even in RTL layout. */
.ltr      { direction: ltr; unicode-bidi: plaintext; text-align: left; }
[dir="rtl"] .ltr-num { direction: ltr; unicode-bidi: plaintext; }

/* Print: hide nav/header/footer; expand main full width. */
@media print {
  .no-print, header, footer, #modal-root, #toast-root { display: none !important; }
  body { background: white !important; color: black !important; }
  main { max-width: none !important; padding: 0 !important; }
  .card { border: 1px solid #cbd5e1 !important; box-shadow: none !important; break-inside: avoid; }
  .table th, .table td { border-color: #cbd5e1 !important; }
  a[href]:after { content: ""; }
  .page-break { page-break-before: always; }
}

/* Alarm row pulse for overdue items. */
@keyframes scAlarmPulse {
  0%, 100% { box-shadow: inset 4px 0 0 0 rgba(239,68,68,0.9); }
  50%      { box-shadow: inset 4px 0 0 0 rgba(239,68,68,0.4); }
}
.alarm-row { animation: scAlarmPulse 2s ease-in-out infinite; }

/* Sortable header hover affordance. */
.sort-h { cursor: pointer; user-select: none; }

/* Print-friendly invoice / quotation / cost-sheet card layout. */
.print-doc { background: white; color: #0f172a; padding: 24px; }
.print-doc h1 { font-size: 22px; font-weight: 700; }
.print-doc .meta { font-size: 12px; color: #475569; }
.print-doc table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.print-doc th, .print-doc td { border: 1px solid #cbd5e1; padding: 6px 8px; font-size: 12px; }
.print-doc th { background: #f1f5f9; }
.print-doc .totals td { font-weight: 600; }

/* Tiny spinner used during async actions. */
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: scSpin 0.7s linear infinite;
  vertical-align: -2px;
}
@keyframes scSpin { to { transform: rotate(360deg); } }
