/* =========================
      LIBRERÍA FORMULARIOS
   ========================= */

/* Variables de colores */
:root {
    --color_p0: #7b8cf7;
    --color_p1: #7889f5;
    --color_p2: #4b569c;

    --color_p3: #009ddf;

    --color_s1: #ffc91f;
    --color_s2: #fcbe00;
    --color_s3: #cf0202;
    --color_s4: #ff2b2b;

    --color_t0: #ff7a59;

    --gris: #e5e7eb;
    --texto: #1f2937;

    --font-principal: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* LOGO INSTITUCIONAL */
.panel_img {
    margin: 1rem;
    border-radius: 8px;
}

.logo-container {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.logo-container::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -75%;
    width: 50%;
    height: 200%;
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(25deg);
    transition: 0.6s;
}

.logo-container:hover::after {
    left: 130%;
}

.bg_1 {
    background-color: var(--color_p1);
    color: white;
}

.bg_2 {
    background-color: var(--color_p2);
    color: white;
}

.bg_3 {
    background-color: var(--color_p3);
    color: white;
}

.bg_s1 {
    background-color: var(--color_s1);
    color: white;
}

.bg_s1 {
    background-color: var(--color_s1);
    color: white;
}

.bg_s2 {
    background-color: var(--color_s2);
    color: white;
}

.bg_s3 {
    background-color: var(--color_s3);
    color: white;
}

.bg_s4 {
    background-color: var(--color_s4);
    color: white;
}

.title_1 {
    color: var(--color_p1);
    font-size: larger;
}

.tc_1 {
    color: var(--color_p1);
}

.tc_2 {
    color: var(--color_p2);
}

.tc_3 {
    color: var(--color_p3);
}

.tc_s1 {
    color: var(--color_s1);
}

.tc_s2 {
    color: var(--color_s2);
}

.tc_s3 {
    color: var(--color_s3);
}

.tc_s4 {
    color: var(--color_s4);
}

.tc_t0 {
    color: var(--color_t0);
}

.tc_w {
    color: white !important;
}

.btg_1 {
    background-color: rgb(0, 157, 223, 0.1);
    box-shadow:
        0 10px 15px rgba(0, 0, 0, 0.1),
        0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 1rem;
    border-radius: 12px;
}

.btg_2 {
    background-color: rgb(75, 86, 156, 0.15);
    box-shadow:
        0 10px 15px rgba(0, 0, 0, 0.1),
        0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 1rem;
    border-radius: 12px;
}

.btg_3 {
    background-color: rgb(0, 235, 126, 0.1);
    box-shadow:
        0 10px 15px rgba(0, 0, 0, 0.1),
        0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 1rem;
    border-radius: 12px;
}

.btg_4 {
    background-color: rgba(165, 165, 165, 0.15);
    box-shadow:
        0 10px 15px rgba(0, 0, 0, 0.1),
        0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 1rem;
    border-radius: 12px;
}

.bg_user {
    font-family: var(--font-principal);
    background-color: rgba(165, 165, 165, 0.15);
    box-shadow:
        0 10px 15px rgba(0, 0, 0, 0.1),
        0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    border: none;
}

.bg_label {
    font-family: var(--font-principal);
    background-color: rgba(229, 232, 252, 0.8);
    box-shadow:
        0 10px 15px rgba(120, 135, 235, 0.1),
        0 4px 6px rgba(120, 135, 235, 0.05);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    border: none;
}

.bg_card {
    font-family: var(--font-principal);
    background-color: rgba(215, 220, 255, 0.85);
    box-shadow:
        0 10px 15px rgba(120, 135, 235, 0.1),
        0 4px 6px rgba(120, 135, 235, 0.05);
    padding: 10px 20px;
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    font-weight: 700;
    border: none;
    transition: 0.3s;
}

.bg_card:hover {
    background-color: rgba(215, 220, 255, 1);
    box-shadow:
        0 10px 15px rgba(120, 135, 235, 0.2),
        0 4px 6px rgba(120, 135, 235, 0.1);
    transform: scale(1.01);
}

.custom-file {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
}

/* Hover */
.custom-file:hover {
    background-color: #e9ecef;
}

/* Oculta el input real */
.custom-file input[type="file"] {
    display: none;
}

/* Texto */
.custom-file .file-text {
    color: #6c757d;
    font-size: 14px;
}

/* Cuando ya hay archivo */
.custom-file.active {
    background-color: #e0e4ff;
    border-color: var(--color_p0);
}

.custom-file.active .file-text {
    color: var(--color_p0);
    font-weight: 500;
}

/* Deshabilitado */
.custom-file.lockable:has(input:disabled) {
    cursor: not-allowed;
    background-color: #f5f5f5;
    opacity: 0.7;
}

/* Inputs generales */
.form-control,
.form-select {
    border: 1px solid var(--color_p1);
    border-radius: 10px;
    padding: 10px;
    transition: all 0.3s ease;
    color: var(--texto);
    font-family: var(--font-principal);
    transition: all 0.2s ease;
}

/* Hover */
.form-control:hover,
.form-select:hover {
    border-color: var(--color_p1);
}

/* Focus  */
.form-control:focus,
.form-select:focus {
    border-color: var(--color_p1);
    box-shadow: 0 0 8px rgba(75, 86, 156, 0.5);
    outline: none;
    transform: scale(1.01);
}

/* Labels */
.form-label {
    font-weight: 600;
    color: var(--color_p1);
    font-family: var(--font-principal);
}

/* Botones */
.btn_1 {
    font-family: var(--font-principal);
    background-color: var(--color_p1);
    color: white;
    font-weight: 500;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    max-width: 200px;
}

.btn_1:hover {
    background-color: var(--color_p0);
    color: white;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.btn_1:active {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(1px);
}

.btn_2 {
    font-family: var(--font-principal);
    background-color: var(--color_s1);
    color: var(--color_p2);
    font-weight: 500;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    max-width: 200px;
}

.btn_2:hover {
    background-color: var(--color_s2);
    color: var(--color_p2);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.btn_2:active {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(1px);
}

.btn_3 {
    font-family: var(--font-principal);
    background-color: var(--color_s3);
    color: white;
    font-weight: 500;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    max-width: 200px;
}

.btn_center {
    display: block;
    margin: 3rem auto;
}

.btn_3:hover {
    background-color: var(--color_s4);
    color: white;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.btn_3:active {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(1px);
}

.btn_icon {
    border: none;
    border-radius: 6px;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn_icon:hover {
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    background-color: var(--color_p0);
    color: white;
}

.btn_icon:active {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(1px);
}

/* Card formulario */
.form-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Títulos */
.form-title {
    font-family: var(--font-principal);
    font-weight: 500;
}

.form-text {
    font-family: var(--font-principal);
    font-size: large;
}

.p_icon {
    padding: 3px 10px;
}

.cont_1 {
    display: flex;
    margin-bottom: 1rem;
}

.text_center {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 3rem;
}

input::placeholder {
    font-style: italic;
    color: #aaa;
}

textarea::placeholder {
    font-style: italic;
    color: #aaa;
}

.form-input {
    transition: 0.3s;
}

.form-input:disabled {
    opacity: 0.6;
}

.oculto {
    display: none;
    transition: 0.3s ease;
}

.msj_exito {
    background: #e6f4ea;
    color: green;
    font-weight: 500;
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid green;
    font-size: 14px;
}

.msj_error {
    background: #f8d7da;
    font-weight: 500;
    color: red;
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid red;
    font-size: 14px;
}

.select-container {
    position: relative;
}

.select-container select {
    appearance: none;
    cursor: pointer;
    width: 100%;
    padding-right: 40px;
}

.select-container::after {
    content: "\f078"; /* icono flecha */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;

    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);

    pointer-events: none;
    color: #666;
}

.select-container:hover::after {
    color: var(--color_p0);
}

.select-container:focus-within::after {
    color: var(--color_p2);
}

.required::after {
    content: " *";
    color: var(--color_s3);
}

.form-group:focus-within .required::after {
    color: var(--color_t0);
    font-weight: bold;
}

.nav_custom {
    display: flex;
    justify-content: flex-end;
    font-family: var(--font-principal);
    box-shadow:
        0 10px 15px rgba(0, 0, 0, 0.1),
        0 4px 6px rgba(0, 0, 0, 0.05);
    font-weight: 500;
    border: none;
    padding-right: 2rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.navbar {
    backdrop-filter: blur(10px);
}

input:disabled,
select:disabled {
    cursor: not-allowed;
}

.loader-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* === Spinner === */
.custom-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #e9ecef;
    border-top: 6px solid var(--color_p0);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animación */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Animación del texto */
#loaderText {
    animation: fadeText 1.5s infinite;
}

@keyframes fadeText {
    0% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.5;
    }
}

/* Título */
.titulo {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Círculo base */
.circle-data {
    background: #fff;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow:
        0 10px 15px rgba(255, 255, 255, 0.1),
        0 4px 6px rgba(255, 255, 255, 0.05);
}

/* Texto círculo */
.circle-data h4 {
    font-size: 1.4rem;
    font-weight: bold;
}

.circle-data small {
    font-size: 0.7rem;
    color: var(--color_p2);
}

/* === FONDOS === */

.fondo_welcome {
    position: relative;
    height: 100%;
    width: 100%;
    background:
        linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05)),
        url("/img/inicio.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.fondo_welcome::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
}

.fondo_welcome > * {
    position: relative;
    z-index: 1;
}

.fondo_login {
    position: relative;
    height: 100%;
    width: 100%;
    background:
        linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05)),
        url("/img/Login.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.fondo_login::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
}

.fondo_login > * {
    position: relative;
    z-index: 1;
}

.fondo_login .bg-gray-100 {
    background: transparent !important;
}

.fondo_login .shadow-md {
    box-shadow: none !important;
}

.fondo_panel {
    background: linear-gradient(135deg, #303bac, #2b3394, #212c62);
}

.fondo_panel_2 {
    background: linear-gradient(135deg, #212c62, #2b3394, #3d49d3) !important;
}

.fondo {
    width: 100%;
    height: 100%;

    background:
        linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05)),
        url("/img/Fondo.jpg");

    background-size: cover;
    background-position: bottom right;
    background-repeat: no-repeat;
}

.sin_fondo {
    background-color: transparent !important;
}

.banner_1 {
    border: none;
    color: white;
    padding: 1rem;
    transition: 0.3s;
    background-color: transparent;
    background-image: url("/img/banner.png");
    background-size: cover;
    background-position: top left;
    background-repeat: no-repeat;
    height: 200px;
    border-radius: 16px;
}

.banner_1:hover {
    background-color: transparent;
    color: white;
    box-shadow:
        0 10px 15px rgba(103, 123, 252, 0.5),
        0 4px 6px rgba(103, 123, 252, 0.1);
    padding: 1rem;
    scale: 1.02;
}

.f_center {
    display: flex !important;
    justify-content: center !important;
}

.clear {
    text-decoration: none;
    border: none;
    outline: none;
    background: none;
}

.content {
    margin-left: 250px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.es_extranjero {
    display: none;
    transition: 0.3s ease;
}

.up {
    color: var(--color_p0);
    transition: 0.3s;
}

.down {
    color: var(--color_t0);
    transition: 0.3s;
}

.star {
    color: var(--gris);
    transition: 0.3s;
}

.borde_interno {
    box-shadow: inset 0 1px 0 #ccc;
}

@media (max-width: 768px) {
    .banner_1 {
        text-align: center;
    }

    .titulo {
        font-size: 0.9rem;
    }

    .circle-data {
        width: 65px;
        height: 65px;
    }

    .circle-data h4 {
        font-size: 1.2rem;
    }

    .banner_1 {
        height: 150px;
    }
}
