/* Estilos para el Panel de Administración de PoliMap */

/* Estilos del sidebar */
.sidebar-item {
    transition: all 0.2s ease-in-out;
    border-left: 3px solid transparent;
}

.sidebar-item.active {
    border-left-color: #FFF;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-item i {
    transition: transform 0.2s ease;
}

.sidebar-item:hover i {
    transform: translateX(3px);
}

/* Estilos para secciones de contenido */
.content-section {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: none;
}

.content-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Mejoras de inputs y formularios */
input[type="text"],
input[type="number"],
input[type="url"],
input[type="tel"],
input[type="password"],
select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
select:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    outline: none;
}

/* Checkbox personalizado */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #CBD5E1;
    border-radius: 4px;
    margin-right: 0.5rem;
    position: relative;
    cursor: pointer;
    vertical-align: middle;
}

input[type="checkbox"]:checked {
    background-color: #1E40AF;
    border-color: #1E40AF;
}

input[type="checkbox"]:checked::after {
    content: "✓";
    font-size: 14px;
    color: white;
    position: absolute;
    top: -1px;
    left: 3px;
}

/* Radio botones personalizados */
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #CBD5E1;
    border-radius: 50%;
    margin-right: 0.5rem;
    position: relative;
    cursor: pointer;
    vertical-align: middle;
}

input[type="radio"]:checked {
    border-color: #1E40AF;
}

input[type="radio"]:checked::after {
    content: "";
    width: 10px;
    height: 10px;
    background-color: #1E40AF;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
}

/* Botones */
button[type="submit"],
button[type="button"] {
    transition: all 0.2s ease;
}

button[type="submit"]:hover,
button[type="button"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

button[type="submit"]:active,
button[type="button"]:active {
    transform: translateY(0);
}

/* Estilos para sliders */
input[type="range"] {
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #E2E8F0;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1E40AF;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1E40AF;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Tablas con hover */
table tbody tr {
    transition: background-color 0.2s ease;
}

table tbody tr:hover {
    background-color: #F1F5F9;
}

/* Efectos de notificación */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background-color: #1E40AF;
    color: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Estilos para dispositivos móviles */
@media (max-width: 768px) {
    .sidebar-item {
        padding: 0.75rem 1rem;
    }
    
    .content-section {
        padding: 1rem;
    }
    
    input[type="text"],
    input[type="number"],
    input[type="url"],
    input[type="tel"],
    input[type="password"],
    select {
        font-size: 16px; /* Prevenir zoom en iOS */
    }
}

/* Animación de carga */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Estilos para el panel de configuración de AI */
.experimental-badge {
    display: inline-block;
    background-color: #FEF3C7;
    color: #92400E;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
}