/* Estilos de Alta Fidelidad - Streamlit Light Theme Mirror */

/* Tipografía Institucional */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #1e293b; /* slate-800 */
}

h1, h2, h3, h4, h5, h6, .font-outfit {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 600;
    color: #0f172a; /* slate-900 */
}

/* Scrollbars Sutiles e Institucionales de Streamlit */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f8fafc; /* slate-50 */
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1; /* slate-300 */
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8; /* slate-400 */
}

/* Animaciones Sutiles de Carga */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.2s ease-out forwards;
}

/* Tarjeta Plana de Streamlit (Clean Flat Design) */
.premium-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0; /* Gris sutil slate-200 */
    border-radius: 0.5rem;     /* rounded-lg */
    box-shadow: none;          /* Sin sombras pesadas */
    transition: border-color 0.15s ease-in-out;
}

.premium-card:hover {
    border-color: #cbd5e1; /* slate-300 */
}

/* Estilos del Sidebar Oscuro (#0e1117) */
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #94a3b8; /* slate-400 */
    border-radius: 0.375rem; /* rounded-md */
    transition: all 0.15s ease-in-out;
}

.sidebar-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

/* Indicador dinámico de Streamlit en Sidebar (Línea roja/azul vertical a la izquierda) */
.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    width: 4px;
    height: 1.5rem;
    background-color: #3b82f6; /* Azul Streamlit */
    border-radius: 0 4px 4px 0;
}

/* Terminal de Auditoría tipo st.code() - Limpio, gris, institucional */
.developer-console {
    background-color: #f8fafc; /* slate-50 */
    border: 1px solid #e2e8f0; /* slate-200 */
    border-radius: 0.375rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Tablas Planas Estilo Streamlit */
.streamlit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.streamlit-table th {
    background-color: #f8fafc;
    color: #475569; /* slate-600 */
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.streamlit-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.streamlit-table tr:hover {
    background-color: #f8fafc;
}

/* Switch de Palanca Plano (Toggle) */
.switch-label {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

.switch-label input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e2e8f0;
    transition: .2s;
    border-radius: 20px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .2s;
    border-radius: 50%;
}

input:checked + .switch-slider {
    background-color: #2563eb;
}

input:checked + .switch-slider:before {
    transform: translateX(18px);
}
