/* styles.css - Versión profesional ejecutiva con fondo oscuro */
:root {
    --color-primary: #2c3e50;
    --color-secondary: #34495e;
    --color-accent: #3498db;
    --color-light: #ecf0f1;
    --color-dark: #2c3e50;
    --color-border: #d1d8e0;
    --color-row-even: #f8fafc;
    --color-row-hover: #f1f7fe;
    --color-text-light: #ecf0f1;
    --color-bg-dark: #1a2639; /* Color oscuro principal */
    --color-bg-darker: #15202b; /* Color más oscuro para header */
    --color-bg-pastel: #e8edf3;
    --color-nav-text: #b3d4ff;
    --color-nav-hover: #ffffff;
    --color-nav-bg-hover: rgba(179, 212, 255, 0.1);
}

/* Estilos base mejorados con fondo pastel oscuro */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--color-bg-pastel);
    color: var(--color-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* Contenedor principal con sombra más pronunciada */
.container {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-top: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--color-border);
}


/* ===================== */
/* ESTILOS GENERALES */
/* ===================== */

h2 {
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-border);
    font-size: 1.8rem;
}

h4 {
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-left: 15px;
    font-size: 1.4rem;
}

h4::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    height: 70%;
    width: 4px;
    background-color: var(--color-accent);
    border-radius: 4px;
}

/* Secciones del formulario */
.form-section {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--color-accent);
}
/* Tabla de preguntas - Bordes más marcados y sombras */
.form-table {
        width: 100%;
        margin-bottom: 2rem;
        border-collapse: separate;
        border-spacing: 0;
        background-color: transparent;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
        border: 1px solid var(--color-border);
}

.form-table thead th {
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
        color: white;
        font-weight: 500;
        padding: 14px 16px;
        text-align: left;
        border: none;
        position: sticky;
        top: 0;
        font-size: 1rem;
}

.form-table tbody td {
        padding: 14px 16px;
        vertical-align: middle;
        border-bottom: 1px solid var(--color-border);
        background-color: #fff;
        height: 60px; /* Altura fija para uniformidad */
        box-sizing: border-box;
}

.form-table tbody tr:last-child td {
        border-bottom: none;
}

.form-table tbody tr:nth-child(even) td {
        background-color: var(--color-row-even);
}

.form-table tbody tr:hover td {
        background-color: var(--color-row-hover);
}

/* Celdas específicas */
.form-table td:nth-child(1) { /* Columna N° */
        font-weight: 600;
        color: var(--color-primary);
        text-align: center;
}

.form-table td:nth-child(2) { /* Columna Pregunta */
        font-weight: 500;
        color: var(--color-secondary);
}

/* Radio buttons - Más compactos y alineados */
.radio-options {
        display: flex;
        gap: 15px;
        justify-content: center;
        align-items: center;
        height: 100%;
}

.radio-options .form-check {
        margin: 0;
        display: flex;
        align-items: center;
}

.radio-options .form-check-input {
        width: 18px;
        height: 18px;
        margin-right: 8px;
        margin-top: 0;
}

.radio-options .form-check-label {
        font-weight: 500;
        color: var(--color-dark);
        font-size: 0.95rem;
}

/* Inputs de observaciones - Para todas las filas */
.observation-input {
        width: 100%;
}

.observation-input textarea {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid var(--color-border);
        border-radius: 6px;
        font-size: 14px;
        resize: vertical;
        min-height: 60px;
        transition: all 0.3s ease;
}

.observation-input textarea:focus {
        border-color: var(--color-accent);
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
        outline: none;
}

/* Botones mejorados */
.btn {
        font-weight: 500;
        letter-spacing: 0.5px;
        padding: 10px 20px;
        border-radius: 6px;
        transition: all 0.3s ease;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        font-size: 0.95rem;
}

.btn-primary {
        background-color: var(--color-primary);
        border-color: var(--color-primary);
}

.btn-primary:hover {
        background-color: var(--color-secondary);
        border-color: var(--color-secondary);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline-secondary {
        border-color: var(--color-border);
        color: var(--color-secondary);
}

.btn-outline-secondary:hover {
        background-color: #f8f9fa;
        border-color: var(--color-secondary);
        color: var(--color-secondary);
}

.btn-add-row {
        background-color: var(--color-accent);
        border-color: var(--color-accent);
        color: white;
        margin-top: 15px;
}

.btn-add-row:hover {
        background-color: #2980b9;
        border-color: #2980b9;
        color: white;
}

/* Sección de acciones */
.form-actions {
        background-color: #f8fafc;
        padding: 25px;
        border-radius: 8px;
        margin-top: 40px;
        text-align: right;
        border-top: 2px solid var(--color-border);
        display: flex;
        justify-content: flex-end;
        gap: 15px;
}

/* ===================== */
/* ESTILOS HEADER UNIFICADOS */
/* ===================== */

.header-container,
.header-dark {
    background-color: var(--color-bg-dark);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    width: 100%;
}

.navbar {
    padding: 0.8rem 0;
    background-color: var(--color-bg-dark) !important;
}

.navbar-brand,
.brand-style {
    color: var(--color-accent) !important;
    font-size: 1.3rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.navbar-brand:hover,
.brand-style:hover {
    color: var(--color-light) !important;
    opacity: 0.9;
}

.navbar-nav .nav-link,
.nav-item-style {
    color: var(--color-nav-text) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover,
.nav-item-style:hover {
    color: var(--color-accent) !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;

}

.user-info {
    color: #a3c8f0 !important;
}

.logout-btn {
    color: #ff6b6b !important;
}

.login-btn {
    color: #51cf66 !important;
}

.navbar-toggler {
    border-color: rgba(52, 152, 219, 0.5) !important;
    padding: 0.35rem 0.65rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28179, 215, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Responsive unificado */
@media (max-width: 991.98px) {
    .navbar-nav {
        padding-top: 1rem;
    }

    .navbar-nav .nav-item {
        margin-bottom: 0.5rem;
    }

    .navbar-nav.me-auto {
        margin-bottom: 1rem;
        border-bottom: 1px solid rgba(52, 152, 219, 0.2);
        padding-bottom: 1rem;
    }
}

/* Responsive */
@media (max-width: 991.98px) {
    .navbar-nav {
        padding-top: 1rem;
    }

    .navbar-nav .nav-item {
        margin-bottom: 0.5rem;
    }

    .navbar-nav.me-auto {
        margin-bottom: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 1rem;
    }
}

/* Transición suave para el menú colapsable */
.navbar-collapse.collapsing {
    transition: height 0.3s ease;
}

/* ===================== */
/* ESTILOS FOOTER COMO HEADER */
/* ===================== */

/* Contenedor principal del footer */
footer.header-dark {
    background-color: #15202b; /* Mismo color oscuro que el header */
    color: #b3d4ff; /* Color de texto principal */
    padding: 1.5rem 0;
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Misma fuente que el body */
}

/* Contenedor interno - ajustes para el layout */
footer.header-dark .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Estilos para los textos y enlaces */
footer.header-dark .text-accent,
footer.header-dark a {
    color: #b3d4ff !important; /* Mismo azul claro que el header */
    font-weight: 500; /* Mismo peso de fuente que el navbar */
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Efecto hover igual al header */
footer.header-dark a:hover {
    color: #ffffff !important;
    background-color: rgba(179, 212, 255, 0.1); /* Mismo efecto hover */
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
}

/* Estilo para los enlaces del menú */
footer.header-dark .d-flex a {
    padding: 0.5rem 0.75rem;
    margin: 0 0.25rem;
}

/* Texto de versión */
footer.header-dark .text-muted {
    color: rgba(179, 212, 255, 0.6) !important; /* Texto más tenue */
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 767.98px) {
    footer.header-dark .d-flex {
        flex-direction: column;
        align-items: center;
    }

    footer.header-dark .mb-md-0 {
        margin-bottom: 1rem !important;
    }

    footer.header-dark .d-flex a {
        margin: 0.25rem 0;
        padding: 0.5rem 1rem;
        display: inline-block;
    }
}

/* Validación mejorada */
.invalid-feedback {
        font-size: 14px;
        margin-top: 5px;
        color: #e74c3c;
}

.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
        border-color: #e74c3c;
        background-image: none;
        padding-right: 15px;
}

.was-validated .form-control:invalid:focus,
.was-validated .form-select:invalid:focus {
        box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Responsive mejorado */
@media (max-width: 768px) {
        .container {
                padding: 20px 15px;
        }

        .form-section {
                padding: 20px 15px;
        }

        .radio-options {
                flex-direction: column;
                gap: 10px;
                align-items: flex-start;
        }

        .form-actions {
                flex-direction: column;
                gap: 10px;
        }

        .btn {
                width: 100%;
        }

        .form-table td {
                padding: 12px 10px;
        }
}

/* Efectos especiales */
@keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
}

.form-section {
        animation: fadeIn 0.4s ease-out forwards;
}

/* Estilos para criticidad */
.criticidad-alta {
        background-color: #fff5f5 !important;
        border-left: 3px solid #e74c3c !important;
}

.criticidad-media {
        background-color: #fff9f0 !important;
        border-left: 3px solid #f39c12 !important;
}

.criticidad-baja {
        background-color: #f0fff4 !important;
        border-left: 3px solid #38a169 !important;
}


/* ... otros estilos que ya tienes ... */

.sketch-container {
    padding: 15px;
    background-color: #fff;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.compass-logo {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #d00;
    border: 1px solid #ccc;
    z-index: 10;
}

.canvas-wrapper {
    border: 1px solid #ddd;
    margin-bottom: 10px;
    background-color: white;
}

canvas {
    display: block;
    background-color: white;
    cursor: crosshair;
    width: 100%;
    height: 300px;
    touch-action: none;
}

/* Estilos para el select de pozos */
.select2-container--bootstrap-5 .select2-selection {
    min-height: 38px;
    padding: 5px 12px;
    border: 1px solid #ced4da;
}

/* Indicadores de carga y error */
#pozo-loading, #pozo-error {
    position: relative;
    margin-top: 5px;
}

#pozo-loading i, #pozo-error i {
    margin-right: 5px;
}

/* Asegurar que el select2 esté sobre otros elementos */
.select2-container {
    z-index: 1060 !important;
}

/* Ocultar el select nativo */
.select2-hidden-accessible {
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
}