/* ==========================================================================
   TAOS — estilos propios
   Las utilidades de Tailwind se generan en el navegador; acá vive lo que no
   depende del JIT (componentes base, scrollbars, tablas, animaciones, etc.).
   ========================================================================== */

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9999px; }
.dark ::-webkit-scrollbar-thumb { background: #475569; }

[x-cloak] { display: none !important; }

/* ---------- Componentes base (equivalente a los @apply originales) ---------- */
.input-base {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background-color: #ffffff;
    border: 1px solid #94a3b8;
    color: #0f172a;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.input-base:focus {
    outline: none;
    border-color: #3b6e8c;
    background-color: #f8fafc;
    box-shadow: 0 0 0 3px rgba(59, 110, 140, .1);
}
.dark .input-base {
    background-color: #020617;
    border-color: #475569;
    color: #f1f5f9;
}
.dark .input-base:focus {
    background-color: #0f172a;
}

.label-base {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #334155;
}
.dark .label-base { color: #cbd5e1; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    background-color: #2b536b;
    color: #ffffff;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn-primary:hover { background-color: #1d3a4d; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    background-color: #e2e8f0;
    color: #1e293b;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    transition: background-color .15s ease, color .15s ease;
}
.btn-secondary:hover { background-color: #cbd5e1; }
.dark .btn-secondary { background-color: #334155; color: #f1f5f9; }
.dark .btn-secondary:hover { background-color: #475569; }

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    background-color: #e11d48;
    color: #ffffff;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    transition: background-color .15s ease;
}
.btn-danger:hover { background-color: #be123c; }

.icon-btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    transition: color .15s ease, background-color .15s ease;
}
.icon-btn:hover { color: #2b536b; background-color: #f1f5f9; }
.dark .icon-btn { color: #cbd5e1; }
.dark .icon-btn:hover { background-color: #1e293b; }

.modal-backdrop {
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(6px);
}
.modal-card { animation: modalIn .2s ease; }

/* ---------- Tarjetas de producto ---------- */
.product-card {
    background-color: #fff !important;
    border-color: #94a3b8 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .12);
    transition: all .2s cubic-bezier(.4, 0, .2, 1);
}
.product-card:hover {
    transform: translateY(-2px);
    border-color: #2b536b !important;
    box-shadow: 0 12px 24px -8px rgba(15, 23, 42, .12);
}
.dark .product-card {
    background-color: #1e293b !important;
    border-color: #475569 !important;
}

/* ---------- Navegación ---------- */
.nav-tab { transition: all .15s ease; }
.nav-tab.active {
    background-color: #2b536b;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .25);
}
.nav-tab:not(.active):hover { background-color: rgba(15, 23, 42, .10); }
.dark .nav-tab.active { background-color: #3b6e8c; }
.dark .nav-tab:not(.active):hover { background-color: rgba(255, 255, 255, .05); }

/* ---------- Tarjetas y tablas ---------- */
main .bg-white.rounded-2xl,
main .dark\:bg-slate-900.rounded-2xl {
    box-shadow: 0 1px 3px rgba(15, 23, 42, .14), 0 1px 2px rgba(15, 23, 42, .08);
}
.dark main .rounded-2xl { box-shadow: none; }

thead { background-color: #e2e8f0 !important; color: #334155 !important; }
.dark thead { background-color: #1e293b !important; color: #cbd5e1 !important; }

tbody tr:hover { background-color: #f1f5f9; }
.dark tbody tr:hover { background-color: rgba(51, 65, 85, .5); }

/* ---------- Animaciones ---------- */
@keyframes modalIn {
    from { opacity: 0; transform: scale(.97) translateY(6px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Impresión ---------- */
@media print {
    header, footer, .modal-backdrop, nav { display: none !important; }
}
