/* iFixPro: estilos propios (además de Tailwind) */
body {
    font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
    background-color: #0f172a;
    color: #f8fafc;
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: tabular-nums;   /* montos y contadores alineados */
    overflow-wrap: break-word;            /* nombres o modelos largos no rompen la caja */
    -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { letter-spacing: -0.015em; text-wrap: balance; }

/* Las tablas con desplazamiento propio no estiran la página (etiquetas sr-only absolutas) */
.overflow-x-auto { position: relative; }

/* Superficies: borde de luz interior y sombra teñida del fondo */
.bg-slate-800\/80.rounded-2xl, .bg-slate-900.rounded-2xl {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 24px 48px -28px rgba(2, 6, 23, 0.7);
}

/* Respuesta táctil al presionar */
button:not(:disabled):active, a[role="button"]:active { scale: 0.98; }
button:disabled { cursor: not-allowed; opacity: 0.55; }

/* Foco visible solo con teclado */
:focus-visible { outline: 2px solid #38bdf8; outline-offset: 2px; border-radius: 10px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }

/* Entrada de vistas y ventanas */
/* translate/scale independientes: no pisan los transform de Tailwind (centrado del aviso, etc.) */
@keyframes riseIn { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@keyframes popIn { from { opacity: 0; translate: 0 6px; scale: 0.98; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.view-enter > *, .view-enter > div > main > * { animation: riseIn 420ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.view-enter > *:nth-child(2), .view-enter > div > main > *:nth-child(2) { animation-delay: 70ms; }
.view-enter > *:nth-child(3), .view-enter > div > main > *:nth-child(3) { animation-delay: 140ms; }
[id^="modal-"]:not(.hidden) { animation: fadeIn 180ms ease-out both; }
[id^="modal-"]:not(.hidden) > div { animation: popIn 260ms cubic-bezier(0.16, 1, 0.3, 1) both; }
#toast:not(.hidden) { animation: popIn 240ms cubic-bezier(0.16, 1, 0.3, 1) both; }

/* Móvil: la pestaña activa muestra su nombre */
@media (max-width: 639px) {
    [role="group"][aria-label="Cambiar vista"] button[aria-pressed="true"] span.hidden { display: inline; }
    #brand-subtitle { display: none; }
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #1e293b;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Pulse animation for active status */
@keyframes statusPing {
    75%, 100% {
        transform: scale(1.6);
        opacity: 0;
    }
}
.animate-status-ping {
    animation: statusPing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    button:active { scale: 1; }
}

/* Canvas for signature */
#sig-canvas {
    touch-action: none;
    cursor: crosshair;
}

/* Print styling for receipts */
@media print {
    body * {
        visibility: hidden;
    }
    #printable-receipt, #printable-receipt * {
        visibility: visible;
    }
    #printable-receipt {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        color: #000 !important;
        background: #fff !important;
        padding: 20px;
    }
    .no-print {
        display: none !important;
    }
}
