.skynet-visitas-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.skynet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0073aa;
}

.skynet-header h1 {
    color: #0073aa;
    margin: 0;
}

.skynet-header h2 {
    color: #0073aa;
    margin: 0;
}

.fecha-actual, .fecha-info {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 16px;
}

.visitas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.visita-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.visita-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.visita-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.visita-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.estado-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.estado-pend {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.estado-proc {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

.estado-fin {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.visita-info {
    margin-bottom: 15px;
}

.info-item {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.info-item strong {
    color: #555;
}

.tiempo-restante {
    color: #856404;
    font-weight: bold;
}

.tiempo-listo {
    color: #155724;
    font-weight: bold;
}

.supervisor-detalles {
    margin-top: 5px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #0073aa;
}

.supervisor-telefono,
.supervisor-empresa {
    display: inline-block;
    margin-right: 10px;
    font-size: 0.85em;
    color: #666;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
}

.visita-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background: #0073aa;
    color: white;
}

.btn-primary:hover {
    background: #005a87;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-maps {
    background: #17a2b8;
    color: white;
}

.btn-maps:hover {
    background: #138496;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn.completed {
    background: #28a745;
    color: white;
    cursor: default;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85em;
}

/* Planificaciones futuras */
.planificaciones-futuras-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.planificaciones-grid {
    margin-top: 20px;
}

.fecha-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 15px 20px;
    margin: 25px 0 15px 0;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
}

.fecha-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2em;
}

.visitas-count {
    background: #0073aa;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
}

.planificacion-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.planificacion-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.planificacion-info {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 20px;
    padding: 20px;
    align-items: start;
}

.planificacion-hora {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.planificacion-hora .hora {
    font-size: 1.1em;
    font-weight: bold;
    color: #0073aa;
}

.planificacion-detalles {
    flex: 1;
}

.planificacion-detalles .cliente-nombre {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.planificacion-detalles .cliente-nombre strong {
    font-size: 1.1em;
    color: #333;
}

.planificacion-detalles .cliente-direccion {
    margin-bottom: 8px;
    line-height: 1.4;
}

.direccion-icon, .telefono-icon, .email-icon, .supervisor-icon {
    margin-right: 5px;
    opacity: 0.7;
}

.municipio {
    color: #666;
    font-size: 0.9em;
}

.planificacion-detalles .cliente-contacto {
    margin-bottom: 8px;
    color: #555;
    font-size: 0.95em;
}

.planificacion-detalles .supervisor-info {
    color: #666;
    font-size: 0.9em;
}

.planificacion-acciones {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Modales */
.skynet-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 15px;
}

.close:hover {
    color: #000;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group textarea,
.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Alertas */
.skynet-alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.skynet-alert.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.skynet-alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.skynet-alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ubicacion-info, .distancia-info, .advertencias {
    margin-bottom: 20px;
}

.ubicacion-info h4, .distancia-info h4 {
    margin-bottom: 10px;
    color: #333;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .visitas-grid {
        grid-template-columns: 1fr;
    }
    
    .visita-actions {
        flex-direction: column;
    }
    
    .skynet-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .planificacion-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .planificacion-hora {
        text-align: left;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .fecha-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .planificacion-detalles .cliente-nombre {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
    }
    
    .form-actions, .modal-actions {
        flex-direction: column;
    }
}

/* Notificaciones */
.skynet-notificacion {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: 400px;
    display: none;
}

.skynet-notificacion.exito {
    background: #28a745;
    border-left: 4px solid #1e7e34;
}

.skynet-notificacion.error {
    background: #dc3545;
    border-left: 4px solid #c82333;
}

.skynet-notificacion.info {
    background: #17a2b8;
    border-left: 4px solid #138496;
}

/* Mejoras para estados de botones */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-procesando {
    background: #6c757d !important;
    color: white !important;
    cursor: wait !important;
}

/* Mejoras para modales cuando hay procesos activos */
.skynet-modal.procesando .modal-content {
    opacity: 0.7;
    pointer-events: none;
}

.skynet-modal.procesando::after {
    content: 'Procesando...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #0073aa;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1001;
}