/* ───────────── VoltPOS — base & critical styles ─────────────
   Tailwind play CDN provides utility classes. These rules:
   1. Set the global gradient background and Inter font.
   2. Provide a bulletproof modal show/hide system using
      [data-modal] attribute selector (specificity beats Tailwind utilities).
*/

html, body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background:
        radial-gradient(circle at 0% 0%, #e2e8f0 0%, transparent 35%),
        radial-gradient(circle at 100% 100%, #cbd5e1 0%, transparent 35%),
        linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
}

/* ── Bulletproof modal system ──
   [data-modal] elements are hidden by default and shown when .is-open is added.
   Higher specificity than Tailwind utilities — no conflicts possible. */
[data-modal] {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 60;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 16px;
}
[data-modal].is-open { display: flex !important; }
body.modal-open { overflow: hidden; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Hide number input spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none; appearance: none; margin: 0;
}
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* Print receipts */
@media print {
    body * { visibility: hidden; }
    #receiptModal, #receiptModal * { visibility: visible; }
    #receiptModal { background: white; padding: 0; }
    #receiptModal .no-print { display: none !important; }
}

/* Subtle entry animation */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .25s ease-out both; }

/* Sidebar transition for mobile drawer */
#sidebar { transition: transform .25s ease; }
