/* Variables globales */
:root {
    --primary-dark: #2C3E50;
    --secondary-dark: #34495E;
    --text-white: #FFFFFF;
    --border-color: #E9ECEF;
    --bg-light: #F8F9FA;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
}
/* Estilos del header y contenedor principal */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-bg {
    background-color: var(--primary-dark);
}

.header-logo {
    height: 35px;
    width: auto;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Estilos para paneles y títulos */
.panel-title {
    font-size: 1rem;
    font-weight: 600;
    background-color: var(--primary-dark) !important;
    color: var(--text-white);
    padding: 10px 15px;
    border-radius: 4px;
    margin: 0;
}

.info-panel {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    height: 100%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Contenedor principal de buzos */
.buzos-container {
    padding: 0;
    margin: 1.5rem 0 0 0;
}

/* Cabecera de datos colaboradores */
.registro-header {
    background: var(--primary-dark);
    color: var(--text-white);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.15);
}

.registro-header h4 {
    font-size: 1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-agregar {
    background: var(--text-white);
    color: var(--primary-dark);
    border: none;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

/* Contenedor de cada buzo */
.buzo-container {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin: 0 0 1rem 0;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Cabecera de buzo */
.buzo-header {
    background: var(--secondary-dark);
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.buzo-title {
    color: var(--text-white);
    font-size: 0.95rem;
    margin: 0;
    font-weight: 500;
}

/* Información del buzo */
.buzo-info {
    padding: 1rem;
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.buzo-datos {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

/* Campos de registro */
.registro-campos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.25rem;
    padding: 0.35rem;
    background: white;
}

/* Estilos para inputs y labels */
.campo-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-dark);
    margin-bottom: 0.15rem;
}

.campo-input {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    width: 100%;
}

input[readonly] {
    background-color: var(--bg-light);
    color: var(--secondary-dark);
}

/* Botón eliminar */
.btn-eliminar {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

/* Media queries */
@media screen and (max-width: 992px) {
    .buzo-datos {
        grid-template-columns: 1fr;
    }
    
    .registro-campos {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .registro-header {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .btn-agregar {
        width: 100%;
        justify-content: center;
    }
    
    .buzo-header {
        flex-wrap: wrap;
    }
}

@media screen and (max-width: 576px) {
    .registro-campos {
        grid-template-columns: 1fr;
    }
    
    .campo-grupo {
        margin-bottom: 0.5rem;
    }
}

.buzo-status {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-label {
    font-weight: bold;
}

.status-value {
    padding: 5px 10px;
    border-radius: 4px;
}

.status-success {
    background-color: #d4edda;
    color: #155724;
}

.status-error {
    background-color: #f8d7da;
    color: #721c24;
}

.btn-guardar-buzo {
    background-color: #2c3e50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-guardar-buzo:hover {
    background-color: #34495e;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-guardar-buzo i {
    font-size: 14px;
}

.btn-guardar-buzo:active {
    transform: translateY(1px);
}

.campo-error {
    border-color: #dc3545;
}

/* Estilo para el botón guardar todo */
#guardarTodo {
    background-color: #2c3e50;
    border-color: #2c3e50;
    transition: all 0.3s ease;
}

#guardarTodo:hover {
    background-color: #34495e;
    border-color: #34495e;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#guardarTodo:active {
    transform: translateY(1px);
}

/* Contenedor principal de tiempos */
.tiempos-container {
    display: flex;
    gap: 2rem;
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius-md);
}

/* Lado izquierdo */
.tiempos-izquierda {
    flex: 0 0 auto;
    width: 400px;
}

.profundidad {
    margin-bottom: 1.5rem;
}

.tiempos-lista {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tiempo-item {
    background: white;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

/* Control de tiempo */
.tiempo-control {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.15rem;
}

.tiempo-control input[type="time"] {
    flex: 1;
    min-width: 120px;
    height: 28px;
    padding: 0.15rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    width: 85px;
}

.tiempo-acciones {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Lado derecho */
.tiempos-derecha {
    flex: 1;
}

.campos-calculados {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.25rem;
}

.campo-calculado {
    background: white;
    padding: 0.35rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 992px) {
    .tiempos-container {
        flex-direction: column;
    }
    
    .tiempos-izquierda {
        width: 100%;
    }
    
    .campos-calculados {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .campos-calculados {
        grid-template-columns: 1fr;
    }
    
    .tiempo-control {
        flex-wrap: wrap;
    }
    
    .tiempo-control input[type="time"] {
        width: 100%;
    }
    
    .tiempo-acciones {
        width: 100%;
        justify-content: flex-end;
        margin-top: 0.5rem;
    }
}

/* Contenedor de tiempos */
.tiempos-wrapper {
    display: grid;
    grid-template-columns: minmax(300px, 2fr) 3fr;
    gap: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

/* Columna izquierda */
.tiempos-izquierda {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profundidad-container {
    background: white;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    position: relative;
}

.profundidad-container small {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #6c757d;
}

.profundidad-duo {
    display: flex;
    gap: 15px;
    width: 100%;
}

.profundidad-campo {
    flex: 1;
}

.profundidad-campo input[type="number"] {
    padding-right: 25px;
    width: 100%;
}

.profundidad-campo::after {
    content: "m";
    position: absolute;
    right: 25px;
    transform: translateY(-28px);
    font-size: 0.9rem;
    color: #6c757d;
    pointer-events: none;
}

input[type="number"].campo-input {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    width: 100%;
    height: 36px;
}

input[type="number"].campo-input:focus {
    border-color: #2c3e50;
    outline: none;
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.1);
}

/* Estilos específicos para campos */
input[name="prof_planificada[]"] {
    background-color: #f8f9fa;
    color: #495057;
    border-color: #dee2e6;
}

input[name="prof_maxima[]"] {
    background-color: white;
    color: #212529;
    border-color: #adb5bd;
}

/* Media query para dispositivos pequeños */
@media (max-width: 768px) {
    .profundidad-duo {
        flex-direction: column;
        gap: 10px;
    }
}

.tiempos-lista {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tiempo-grupo {
    background: white;
    padding: 0.35rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 0.25rem;
}

/* Control de tiempo */
.tiempo-control {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.15rem;
}

.tiempo-input {
    flex: 1;
    min-width: 120px;
    height: 30px;
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.tiempo-acciones {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-tiempo,
.btn-foto {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary-dark);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.check-icon {
    color: #28a745;
    font-size: 1.1rem;
}

/* Columna derecha */
.tiempos-derecha {
    display: flex;
    flex-direction: column;
}

.campos-calculados {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.25rem;
    height: 100%;
}

.campo-calculado {
    background: white;
    padding: 0.35rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 1200px) {
    .tiempos-wrapper {
        grid-template-columns: 1fr;
    }
    
    .campos-calculados {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    .tiempo-control {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tiempo-acciones {
        justify-content: flex-end;
        margin-top: 0.5rem;
    }
}

@media (max-width: 576px) {
    .campos-calculados {
        grid-template-columns: 1fr;
    }
    
    .tiempos-wrapper {
        padding: 1rem;
    }
}

/* Estilos para la sección de foto de reloj */
.foto-reloj-container {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-foto-reloj {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    background-color: #f1f1f1;
    border: 2px dashed #ccc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #6c757d;
    transition: all 0.3s;
    margin: 10px 0;
}

.btn-foto-reloj:hover {
    background-color: #e9ecef;
    border-color: #007bff;
    color: #007bff;
}

.foto-reloj {
    display: flex;
    align-items: center;
}

.foto-info {
    margin-top: 5px;
    color: #6c757d;
}

/* Estilos para estados de la foto */
.btn-foto-reloj.selected {
    border: 2px solid #28a745;
}

.status-icon.selected {
    color: #28a745;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .foto-reloj-container {
        padding: 10px;
    }
    
    .btn-foto-reloj {
        width: 80px;
        height: 80px;
        font-size: 1.5rem;
    }
}

/* Estilos para el panel de buzo de emergencia */
.emergency-info-panel {
    border-radius: 15px !important;
    border: 2px solid #ffc107 !important;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 193, 7, 0.05)) !important;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2) !important;
    transition: all 0.3s ease;
}

.emergency-info-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 193, 7, 0.3) !important;
}

.emergency-info-panel .fas.fa-exclamation-triangle {
    font-size: 1.5em;
    margin-right: 12px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.emergency-info-panel h6 {
    font-size: 1.1em;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.emergency-info-panel p {
    color: #856404 !important;
    font-weight: 500;
}

.emergency-info-panel small {
    color: #6c5a00 !important;
    font-style: italic;
}

.sugerencia-tiempo {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
    padding: 5px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.btn-ver-foto {
    background-color: #0069d9;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95em;
    margin-top: 10px;
    width: 100%;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-ver-foto:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Estilos para la visualización de imágenes en el modal */
.swal-wide {
    max-width: 90% !important;
    width: 90% !important;
}

.swal-image-large {
    max-width: 90% !important;
    max-height: 75vh !important;
    height: auto !important;
    width: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
}

/* Estilos para el modal de SweetAlert2 */
.swal2-popup.swal2-modal {
    padding: 2em !important;
    max-width: 95vw !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
}

.swal2-image {
    margin: 0 auto 1em auto !important;
    border-radius: 4px !important;
    box-shadow: 0 0 10px rgba(0,0,0,0.1) !important;
    background-color: #f8f9fa !important;
    padding: 10px !important;
}

.swal2-content {
    margin-top: 0 !important;
    padding: 0 !important;
}

.swal2-styled.swal2-confirm {
    padding: 12px 24px !important;
    font-size: 1.1em !important;
    background-color: #0069d9 !important;
}