/* ============================================================================
   LIMS HERBOLARIA - DESIGN SYSTEM (Refined Edition)
   Aesthetics: Professional, Compact, Ultra-Premium
   ============================================================================ */

:root {
    --primary: #2563eb;
    --primary-light: #eff6ff;
    --success: #059669;
    --danger: #dc2626;
    --warning: #d97706;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-800: #1e293b;
    --glass: rgba(255, 255, 255, 0.85);
    --sidebar-width: 240px;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f4f7fa;
    color: var(--slate-800);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- SIDEBAR REFINADO --- */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--slate-200);
    height: 100vh;
    position: fixed;
    z-index: 50;
    padding: 1.5rem 1rem;
}

.nav-btn {
    width: 100%;
    text-align: left;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
}

.nav-btn i {
    width: 1.25rem;
    font-size: 1rem;
    margin-right: 0.75rem;
}

.nav-btn:hover {
    background: var(--slate-50);
    color: var(--primary);
}

.nav-btn.active {
    background: var(--primary-light);
    color: var(--primary);
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.05);
}

/* --- DASHBOARD & TARJETAS --- */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    max-width: 1400px;
}

.stat-card {
    background: white;
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid var(--slate-100);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- TABLAS COMPACTAS --- */
.table-container {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--slate-200);
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: var(--slate-50);
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom: 1px solid var(--slate-200);
}

td {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--slate-50);
}

/* --- STATUS PILLS --- */
.status-pill {
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    letter-spacing: 0.025em;
    transition: all 0.2s ease;
}

.status-cuarentena { background: #fffbeb; color: #b45309; border: 1px solid #fef3c7; }
.status-analisis { background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; }
.status-aprobado, .status-liberado { background: #ecfdf5; color: #065f46; border: 1px solid #d1fae5; }
.status-rechazado, .status-oos { background: #fff1f2; color: #9f1239; border: 1px solid #ffe4e6; }

/* --- MODALES & SLIDE-OVERS --- */
.modal-overlay {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
}

.slide-over {
    width: 320px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-left: 1px solid rgba(0,0,0,0.05);
    box-shadow: -2px 0 15px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
}

.form-input {
    width: 100%;
    background: #f8fafc;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    border: 1px solid var(--slate-200);
    font-size: 0.75rem;
    font-weight: 500;
    color: #334155;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}

.form-input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 2px var(--primary-light);
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 0.4rem;
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.sticky-footer {
    position: sticky;
    bottom: 0;
    z-index: 30;
}

/* --- CUSTOM SCROLLBAR --- */
.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/* --- ANIMACIONES --- */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-slide-in { animation: slideInRight 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }
.animate-scale-up { animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.loader { animation: spin 0.8s linear infinite; }
