﻿/* 🔹 Configuración global */
*, *::before, *::after {
    box-sizing: border-box;
}

/* === BASE === */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', sans-serif;
    background-color: #f5f6f7;
    color: #3a4148;
}

/* === LAYOUT GENERAL === */
.layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* === SIDEBAR === */
.sidebar {
    width: 250px;
    background-color: #e2e4e6;
    border-right: 1px solid #cfd2d4;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: left 0.3s ease, transform 0.3s ease;
}

    .sidebar h2 {
        text-align: center;
        background-color: #e2e7ec;
        border-bottom: 1px solid #ccc;
        color: #5c7d91;
        font-size: 1.4rem;
        font-weight: 700;
        padding: 20px;
        margin: 0;
    }

    .sidebar nav {
        display: flex;
        flex-direction: column;
        padding: 8px 0;
    }

        .sidebar nav a {
            display: flex;
            align-items: center;
            padding: 12px 20px;
            margin: 6px 12px;
            border-left: 4px solid transparent;
            border-radius: 6px;
            color: #3a4148;
            font-weight: 600;
            text-decoration: none;
            gap: 12px;
            transition: all 0.25s ease;
        }

            .sidebar nav a .icon {
                font-size: 1.2rem;
                color: #64748b;
                transition: color 0.25s ease;
            }

            .sidebar nav a:hover,
            .sidebar nav a.active {
                background-color: #d1d3d6;
                border-left-color: #5c7d91;
                color: #5c7d91;
            }

                .sidebar nav a:hover .icon,
                .sidebar nav a.active .icon {
                    color: #5c7d91;
                }

/* === MAIN CONTENT === */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header-welcome {
    background-color: #e2e7ec;
    padding: 18px;
    border-bottom: 1px solid #ccc;
    display: flex;
    justify-content: flex-end;
}

.welcome-content h3 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 600;
    color: #3a4148;
}

/* === CONTENT === */
.content {
    flex: 1;
    overflow-y: auto;
    background-color: #fff;
    margin: 8px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 16px;
}

/* === FOOTER === */
footer {
    text-align: center;
    padding: 12px;
    /*background: #ecf0f1;*/
    color: #5c7d91;
    font-weight: 600;
}

/* === BOTÓN HAMBURGUESA === */
.menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    font-size: 1.8rem;
    background: none;
    border: none;
    color: #5c7d91;
    cursor: pointer;
    z-index: 3000;
}

/* === RESPONSIVO === */
@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -260px;
        height: 100%;
        width: 240px;
        z-index: 2000;
    }

        .sidebar.show {
            left: 0;
        }

    .menu-toggle {
        display: block;
    }

    .main {
        margin-left: 0;
        width: 100%;
    }

    body.menu-open {
        overflow: hidden;
    }
}

/*========== HEADER BIENVENIDA ==========*/
.header-welcome {
    width: 100%;
    background-color: #e2e7ec;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #e0e4e7;
    color: #3a4148;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.welcome-content {
    text-align: right;
}

    .welcome-content h3 {
        margin: 0;
        font-size: 1.6rem;
        font-weight: 600;
        color: #3a4148;
        word-break: break-word;
    }

.welcome-text {
    color: #3b5360;
    font-weight: 600;
}

.username {
    color: #5c7d91;
    font-size: 1.6rem;
    font-weight: 700;
    margin-left: 8px;
}

@media (max-width: 768px) {
    .welcome-content {
        justify-content: center;
        text-align: center;
    }

        .welcome-content h3 {
            font-size: 1.3rem;
        }

    .username {
        display: block;
        margin-left: 0;
    }
}

/* 🔹 Responsividad: ajustes en pantallas pequeñas */
@media (max-width: 768px) {
    .welcome-content {
        justify-content: center; /* centra en pantallas pequeñas */
        text-align: center;
    }

        .welcome-content h3 {
            font-size: 1.3rem;
        }

    .username {
        display: block; /* salta de línea si es necesario */
        margin-left: 0;
    }
}

/*========== FOOTER ==========*/
footer {
    text-align: center;
    padding: 15px 0;
    color: #555;
    font-size: 0.9rem;
    background-color: transparent;
    border: none;
}

/*========== MODAL PRIVACIDAD (VISOR PDF) ==========*/
/*========== MODAL PRIVACIDAD (VISOR PDF) ==========*/

/* Modal general */
.privacy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 10px;
}

/* Contenido del modal */
.privacy-modal-content {
    background: #fff;
    width: 90%;
    max-width: 900px;
    height: 90%;
    position: relative;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    overflow: hidden;
}

/* Botón de cerrar */
.privacy-modal .close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 10000;
}

    .privacy-modal .close:hover {
        color: #d33;
    }

/* Visor PDF ocupa todo el modal */
#pdfViewer {
    flex: 1;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden; /* evita barra horizontal */
    background: #fff; /* blanco, no gris */
    padding: 0;
    margin: 0;
    position: relative;
}

    #pdfViewer canvas {
        display: block;
        width: 100% !important; /* el canvas ocupa todo el ancho */
        height: auto !important;
        margin: 0;
        padding: 0;
    }

/* Overlay transparente para bloquear clic derecho */
.pdf-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: transparent;
}

/* Responsivo */
@media (max-width: 600px) {
    .privacy-modal-content {
        width: 100%;
        height: 95%;
    }
}


/*========== CODIGO DE SEGURIDAD ==========*/
.otp-container input#otpInput {
    width: 100%; /* ancho para 6 dígitos */
    font-size: 0.9rem;
    letter-spacing: 20px; /* separación visual de cada dígito */
    text-align: center;
    padding: 10px 0;
    background-color: #fefefe;
    color: #3b5360;
    transition: all 0.2s;
}

    /* Cuando el input está enfocado */
    .otp-container input#otpInput:focus {
        border-color: #1565c0;
        box-shadow: 0 0 8px rgba(21,101,192,0.3);
        outline: none;
        background-color: #ffffff;
        font-size: 0.9rem; /* forzar tamaño al escribir */
        line-height: 1.2rem;
    }

/* Estilo general del input OTP */
.otp-container input#otpInput {
    width: 100%; /* ancho para 6 dígitos */
    font-size: 1rem !important; /* tamaño constante al escribir */
    line-height: 1.2rem;
    letter-spacing: 12px; /* separación visual de cada dígito */
    text-align: center;
    padding: 10px 0;
    background-color: #fefefe;
    color: #3b5360;
    transition: all 0.2s;
}

    /* Cuando el input está enfocado */
    .otp-container input#otpInput:focus {
        border-color: #1565c0;
        box-shadow: 0 0 8px rgba(21,101,192,0.3);
        outline: none;
        background-color: #ffffff;
        font-size: 1rem !important; /* asegura que no cambie */
        line-height: 1.2rem;
    }

/*================ TABS ================*/
.formal-tabs {
    display: flex;
    flex-wrap: wrap; /* permite que los tabs se acomoden en varias líneas */
    gap: 12px;
    margin: 12px 6px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

    .formal-tabs button {
        background-color: #fff;
        border: 1px solid transparent;
        border-radius: 8px;
        padding: 0.6rem 1.3rem;
        font-size: 1rem;
        cursor: pointer;
        color: #3a4148;
        font-weight: 600;
        box-shadow: 0 1px 2px rgba(0,0,0,0.1);
        transition: box-shadow 0.3s ease, border-color 0.3s ease;
        position: relative; /* necesario para pseudo-elemento activo */
    }

        .formal-tabs button:hover {
            /*box-shadow: 0 4px 6px rgba(92, 125, 145, 0.25);*/
            border-color: #5c7d91;
            color: #5c7d91;
            /*background-color: #d1d3d6;*/
        }

        .formal-tabs button.active {
            background-color: transparent;
            color: none;
            border-bottom: 4px double #5c7d91;
            color: #5c7d91;
            font-weight: 700;
            padding-bottom: 0.5rem;
        }

/* Contenido de los tabs */
.formal-tab-content > div {
    display: none;
    padding: 1rem 12px;
    color: #3a4148;
    background: #ffffff;
    margin: 0 6px 12px 6px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03);
}

    .formal-tab-content > div.active {
        display: block;
    }

/* Hacer los tabs responsivos */
@media (max-width: 600px) {
    .formal-tabs {
        flex-direction: column;
        gap: 8px;
    }

        .formal-tabs button {
            width: 100%;
            text-align: center;
        }
}

/*================ CARDS ================*/
.formal-section-header-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background-color: #e9eef2; /* gris azulado más marcado que los tabs */
    border-left: 5px solid #3b5360; /* azul oscuro-grisáceo que resalta */
    padding: 16px 22px;
    border-radius: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 2px 6px rgba(59, 83, 96, 0.08); /* sombra muy sutil */
    color: #3b5360; /* tono fuerte pero sobrio */
    font-size: 1.1rem;
    font-weight: 700;
}

    .formal-section-header-card i {
        background-color: #3b5360;
        color: white;
        font-size: 1.2rem;
        padding: 8px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
    }

/*================ MODAL ================*/

.modal {
    z-index: 1055 !important; /* Asegúrate de que el modal no tape el botón sticky */
}

/* Fondo modal-backdrop semitransparente azul */
.modal-backdrop.show {
    background-color: rgb(60, 90, 110) !important;
    z-index: 1040 !important;
}

/* Header azul */
.blue-modal-header {
    background-color: #3b5360;
    color: white;
    border-bottom: 2px solid #3a4148;
    padding: 1rem 1.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 2px 6px rgba(92,125,145,0.3);
}

/* Footer (puedes ajustar o quitar si quieres diferente) */
.blue-modal-footer {
    background-color: #e2e7ec; /* tono claro */
    border-top: 1px solid #ccc;
    color: #3a4148;
    padding: 1rem 1.5rem;
}

/* Sección dentro del modal */
.blue-modal-section {
    width: 100%;
    max-width: 100%;
   /* margin-bottom: 30px;*/
    padding: 15px;
   /* background-color: transparent;
    border: none;*/
   box-sizing: border-box;
}

/* Título sección */
.blue-section-title {
    color: #5c7d91;
    font-weight: 700;
    border-bottom: 2px solid #5c7d91;
    padding-bottom: 6px;
    margin-bottom: 18px;
}

/* Inputs y selects */
.blue-modal-input {
    border: 1px solid #cfd2d4;
    border-radius: 4px;
    padding: 6px 8px;
    width: 100%;
    box-sizing: border-box;
    color: #3a4148;
    font-size: 0.9rem;
    background-color: #fff;
}

    .blue-modal-input:focus {
        outline: none;
        border-color: #5c7d91;
        box-shadow: 0 0 6px rgba(92,125,145,0.5);
    }

/* Contenedor del botón sticky dentro del modal */
.sticky-btn-container {
    position: -webkit-sticky; /* Para compatibilidad con Safari */
    position: sticky;
    bottom: 20px; /* Ajusta la distancia al borde inferior de la sección */
    z-index: 1060; /* Asegúrate de que esté por encima del contenido */
    right: 0;
    margin: 0 20px; /* Márgenes laterales */
    padding-top: 10px; /* Añadir espacio superior */
    padding-bottom: 10px; /* Añadir espacio inferior */
}

/* Asegura que la sección Datos Generales sea suficientemente alta para que el sticky sea efectivo */
.blue-modal-section {
    width: 100%;
    flex: 1;
    display: block;
}


/* Fondo modal-backdrop semitransparente azul */
.modal-backdrop.show {
    background-color: rgb(60, 90, 110) !important;
    z-index: 1040 !important;
}

/* Asegura que el modal tenga un z-index mayor que el de los botones flotantes */
.modal-content {
    position: relative;
    z-index: 1055;
}

.modal-body {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding: 20px;
}

.modal-header {
    z-index: 1055;
}

.ui-autocomplete {
    z-index: 9999 !important;
    position: absolute;
    background-color: #ffffff;
    border: 2px solid rgba(0, 0, 0, 0.2); /* ⬅️ Borde más oscuro y grueso */
    border-radius: 10px;
    padding: 8px 0;
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.1); /* ⬅️ Sombra interna sutil */
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 0.95rem;
    color: #2c3e50;
    backdrop-filter: blur(6px);
/*    animation: fadeInUp 0.2s ease-out;*/
}

/* Animación suave */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ítems individuales */
.ui-menu-item-wrapper {
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 8px;
    margin: 2px 6px;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    background-color: transparent;
}

    /* Quitar hover */
    .ui-menu-item-wrapper:hover {
        background-color: transparent !important;
        color: inherit !important;
        font-weight: inherit !important;
        box-shadow: none !important;
        transform: none !important;
    }

    /* Estilo SOLO para el ítem seleccionado */
    .ui-menu-item-wrapper.ui-state-active {
        background-color: #3b82f6 !important; /* azul visible */
        color: #fff !important;
        font-weight: 600 !important;
        border-radius: 8px;
        box-shadow: 0 3px 6px rgba(59, 130, 246, 0.4);
    }

/*================ TABLA AZUL / DATATABLE ================*/
    /* Tabla estilo dashboard */
    .blue-table {
        width: 100% !important;
        table-layout: auto !important; /* importante para que columnas se ajusten */
        border-collapse: collapse;
    }

    section.blue-modal-section table.blue-table {
        width: 100%;
        table-layout: auto;
        border-collapse: collapse;
    }

    /* Cabecera */
    .blue-table thead {
        position: sticky;
        top: 0;
        z-index: 2;
        background-color: #2c3e50;
        color: white;
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.5px;
        text-align: center !important;
    }

    /* Celdas */
    .blue-table th,
    .blue-table td {
        margin: 0;
        padding: 8px 12px; /* dale algo más de espacio para que respire el texto */
        font-size: 0.85rem;
        text-align: center !important;
        border: none;
        vertical-align: middle !important;
        white-space: normal; /* ✅ Permite que el texto se divida en varias líneas */
        word-wrap: break-word; /* ✅ Permite romper palabras largas */
        overflow-wrap: break-word; /* ✅ Compatibilidad más moderna */
    }


    /* Inputs y botones que llenan la celda */
    .blue-table th,
    .blue-table td {
        text-align: center;
        vertical-align: middle;
        padding: 8px;
        white-space: normal;
        word-wrap: break-word;
    }

        /* Inputs adaptables */
        .blue-table td input[type="text"],
        .blue-table td input[type="number"] {
            width: 100%;
            box-sizing: border-box;
            padding: 6px 8px;
            font-size: 0.85rem;
            border: 1px solid #ccc;
            border-radius: 4px;
            text-align: center !important;
        }

    /* Estilo alternado para filas */
    .blue-table tbody tr:nth-child(even) {
        background-color: #f1f3f5;
    }

    /* Hover moderno */
    .blue-table tbody tr:hover {
        background-color: rgba(92, 125, 145, 0.35); /* azul más fuerte */
        cursor: pointer;
        font-weight: 700;
    }

    /* Línea divisoria entre filas */
    .blue-table tbody tr:not(:last-child) {
        border-bottom: 1px solid #e0e0e0;
    }

/* Íconos o botones dentro de la tabla */
.table-btn-danger,
.table-btn-warning,
.table-btn-primary,
.table-btn-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    min-width: 32px;
    min-height: 32px;
    cursor: pointer;
}

/* Botón eliminar */
.table-btn-danger {
    border: 2px solid #c62828;
    color: #c62828;
    background-color: transparent;
}

    .table-btn-danger:hover {
        background-color: #c62828;
        color: #fff;
        box-shadow: 0 2px 6px rgba(198, 40, 40, 0.3);
    }

/* Botón editar */
.table-btn-warning {
    border: 2px solid #ffb300;
    color: #ffb300;
    background-color: transparent;
}

    .table-btn-warning:hover {
        background-color: #ffb300;
        color: #fff;
        box-shadow: 0 2px 6px rgba(255, 179, 0, 0.3);
    }

/* Botón acción azul */
.table-btn-primary {
    border: 2px solid #1976d2;
    color: #1976d2;
    background-color: transparent;
}

    .table-btn-primary:hover {
        background-color: #1976d2;
        color: #fff;
        box-shadow: 0 2px 6px rgba(25, 118, 210, 0.3);
    }

/* Botón guardar */
.table-btn-success {
    border: 2px solid #2e7d32;
    color: #2e7d32;
    background-color: transparent;
}

    .table-btn-success:hover {
        background-color: #2e7d32;
        color: #fff;
        box-shadow: 0 2px 6px rgba(46, 125, 50, 0.3);
    }
/*================ BOTONES ================*/
.blue-btn {
    border-radius: 0.5rem;
    padding: 0.375rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

/* Verde para guardar */
.green-btn-outline {
    color: #2e7d32; /* verde oscuro */
    border: 2px solid #2e7d32;
    background-color: transparent;
}

    .green-btn-outline:hover,
    .green-btn-outline:focus {
        color: white;
        background-color: #2e7d32;
        box-shadow: 0 4px 12px rgba(46, 125, 50, 0.5);
        border-color: #27642a;
    }

/* Azul para acción primaria */
.blue-btn-outline {
    color: #1565c0; /* azul fuerte */
    border: 2px solid #1565c0;
    background-color: transparent;
}

    .blue-btn-outline:hover,
    .blue-btn-outline:focus {
        color: white;
        background-color: #1565c0;
        box-shadow: 0 4px 12px rgba(21, 101, 192, 0.5);
        border-color: #0d47a1;
    }

/* Azul elegante para botón de agregar */
.blue-alt-btn {
    color: white;
    background-color: #1b6ec2; /* azul sobrio parecido a primary */
    border: 2px solid #1b6ec2;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(27, 110, 194, 0.4);
}

    .blue-alt-btn:hover,
    .blue-alt-btn:focus {
        background-color: #165aa0; /* un azul un poco más oscuro al pasar el mouse */
        border-color: #165aa0;
        box-shadow: 0 4px 12px rgba(22, 90, 160, 0.6);
    }

/* Rojo para cancelar/eliminar */
.red-btn-outline {
    color: #c62828; /* rojo oscuro */
    border: 2px solid #c62828;
    background-color: transparent;
}

    .red-btn-outline:hover,
    .red-btn-outline:focus {
        color: white;
        background-color: #c62828;
        box-shadow: 0 4px 12px rgba(198, 40, 40, 0.5);
        border-color: #a52020;
    }

.blue-btn i {
    font-size: 1.1rem;
}

/* Botón eliminar moderno en tabla */
.table-btn-danger {
    border: 2px solid #c62828;
    background-color: transparent;
    color: #c62828;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

    .table-btn-danger:hover {
        background-color: #c62828;
        color: #fff;
        box-shadow: 0 2px 6px rgba(198, 40, 40, 0.4);
    }

/* Botón editar moderno en tabla */
.table-btn-warning {
    border: 2px solid #ffb300; /* amarillo ámbar */
    background-color: transparent;
    color: #ffb300;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

    .table-btn-warning:hover {
        background-color: #ffb300;
        color: #fff;
        box-shadow: 0 2px 6px rgba(255, 179, 0, 0.4);
    }

/* Botón azul moderno en tabla */
.table-btn-primary {
    border: 2px solid #1976d2; /* azul medio */
    background-color: transparent;
    color: #1976d2;
    font-size: 0.85rem;
    padding: 4px 4px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

    .table-btn-primary:hover {
        background-color: #1976d2;
        color: #fff;
        box-shadow: 0 2px 6px rgba(25, 118, 210, 0.4);
    }

/* Botón subir PDF */
.pdf-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

    .pdf-upload-wrapper .table-btn-primary,
    .pdf-upload-wrapper .table-btn-success,
    .pdf-upload-wrapper .table-btn-danger {
        width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        transition: all 0.3s ease;
    }

    .pdf-upload-wrapper .pdf-file-name {
        font-size: 0.75rem;
        color: #555;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

#tDetallesServiciosMPPT tbody td:hover {
    background-color: #ffe0b2; /* Amarillo */
    cursor: pointer;
}

#tDetallesServiciosRWR tbody td:hover {
    background-color: #ffe0b2; /* Amarillo */
    cursor: pointer;
}

/*================ CELDAS EDITABLES ================*/
.editable-input {
    width: 100%;
    padding: 6px 10px;
    font-size: 0.9rem;
    border: 2px solid #ff9800; /* Naranja para indicar edición */
    border-radius: 6px;
    background-color: #fffde7; /* Amarillo claro, indica cambio */
    box-shadow: 0 1px 6px rgba(255, 152, 0, 0.3); /* Suave sombra */
    outline: none;
    transition: all 0.25s ease-in-out;
    cursor: text;
    font-weight: 500;
    color: #333;
}

    /* Cuando se hace foco */
    .editable-input:focus {
        border-color: #f57c00; /* Naranja más fuerte */
        background-color: #fff8e1; /* Un tono más suave */
        box-shadow: 0 0 8px rgba(255, 152, 0, 0.4);
    }

/*.nueva-fila {
    background-color: #e8f5e9 !important;*/ /* Verde muy claro */
    /*border-left: 4px solid #43a047;*/ /* Verde más fuerte */
    /*transition: background-color 0.3s ease;
}*/

.nueva-fila {
    background-color: #fff8e1 !important; /* Amarillo suave */
    border-left: 4px solid #f9a825;
}

.input-nueva-fila {
    width: 100%;
    padding: 6px 8px;
    box-sizing: border-box;
    font-size: 0.85rem;
    border: 1px solid #ccc;
    border-radius: 6px;
}

    .input-nueva-fila:focus {
        border-color: #1976d2;
        background-color: #fff;
        box-shadow: 0 0 6px rgba(25, 118, 210, 0.2);
    }

.tooltip-custom {
    position: absolute;
    background-color: #4CAF50; /* Verde de éxito */
    color: white;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 9999;
}

/*================ RADIO BUTTON ================*/
.toggle-radio-group {
    display: inline-flex;
    border: 2px solid #5c7d91;
    border-radius: 30px;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    user-select: none;
    font-weight: 600;
    font-size: 0.7rem;
    width: 70px;
    height: 28px;
}

    .toggle-radio-group input[type="radio"] {
        display: none;
    }

    .toggle-radio-group label {
        cursor: pointer;
        background-color: transparent;
        color: #5c7d91;
        transition: all 0.3s ease;
        text-align: center;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        position: relative;
        border-radius: 0;
    }

    .toggle-radio-group input[type="radio"]:checked + label {
        background-color: #5c7d91;
        color: white;
    }

    .toggle-radio-group label:hover {
        background-color: #7d99b0;
        color: white;
    }

/*Segundo radio*/
.radio-options {
    display: flex;
    gap: 12px;
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #3a4148;
}

    .radio-options input[type="radio"] {
        accent-color: #5c7d91; /* Usa el azul sobrio */
        width: 16px;
        height: 16px;
        margin-right: 6px;
        cursor: pointer;
    }

    .radio-options label {
        display: flex;
        align-items: center;
        cursor: pointer;
    }

/*================ ALERTAS / MENSAJES ================*/

.warning-message {
    background-color: #f8d7da; /* fondo rojo claro */
    color: #c62828; /* rojo fuerte */
    border: 1px solid #f5c6cb;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    margin-top: 10px;
    display: none; /* Oculto por defecto */
    box-shadow: 0 2px 6px rgba(198, 40, 40, 0.15);
    transition: all 0.3s ease-in-out;
}

/*================ SPINNER EN BOTÓN ================*/

/* Spinner acorde a paleta del header */
.spinner {
    border: 3px solid #d0d7dc; /* borde base gris-azulado claro */
    border-top: 3px solid #5c7d91; /* tono principal (igual que .username) */
    border-radius: 50%;
    width: 18px;
    height: 18px;
    margin-left: 10px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
