/* Carnet digital público (CarnetDigital/CarnetDigital.aspx). Mismo lenguaje visual de SoporteSistema y
   SolicitudAcceso: panel azul con ilustración a la izquierda y tarjeta con el flujo a la derecha.
   Los estilos del carnet en sí (.CarnetDigital .front/.back) conservan su diseño original. */

@font-face {
    font-family: 'Metropolis';
    src: local('Metropolis'), url('../metropolis.regular.otf') format('opentype');
    font-weight: 400;
}

@font-face {
    font-family: 'Metropolis';
    src: local('Metropolis Bold'), url('../metropolis.bold.otf') format('opentype');
    font-weight: 700;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    font-size: 14px;
    color: #1f2d3d;
    background: #f4f6fa;
}

[hidden] {
    display: none !important;
}

.cd-layout {
    display: flex;
    min-height: 100vh;
}

/* ---------- PANEL IZQUIERDO ---------- */
.cd-info {
    position: sticky;
    top: 0;
    height: 100vh;
    flex: 0 0 50%;
    width: 50%;
    padding: 26px 40px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    background-color: #295884;
    background-image: url('../../../Account/Content/Imagenes/fondo.svg');
    background-size: auto;
    background-position: bottom;
    overflow: hidden;
}

    .cd-info::after {
        content: "";
        position: absolute;
        width: 450px;
        height: 450px;
        bottom: -140px;
        left: -140px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .05);
        pointer-events: none;
    }

.cd-info-logo {
    width: 210px;
    max-width: 60%;
    align-self: center;
    margin-bottom: 4px;
}

.cd-info-ilustracion {
    text-align: center;
    min-height: 0;
}

    .cd-info-ilustracion img {
        width: 100%;
        max-width: 380px;
        max-height: 36vh;
        object-fit: contain;
    }

.cd-info-texto h2 {
    margin: 2px 0 6px;
    font-size: 26px;
    color: #F5A800;
    text-align: center;
}

.cd-info-texto p {
    margin: 0 0 14px;
    font-size: 15px;
    text-align: center;
    opacity: .88;
}

/* Misión / Visión: se alternan cada 8 segundos */
.cd-mv {
    position: relative;
    min-height: 120px;
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
    padding: 14px 18px;
    background: rgba(255, 255, 255, .08);
    border-radius: 12px;
}

.cd-mv-item {
    position: absolute;
    top: 14px;
    left: 18px;
    right: 18px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .6s ease;
}

    .cd-mv-item.activo {
        opacity: 1;
        visibility: visible;
    }

    .cd-mv-item h3 {
        margin: 0 0 4px;
        font-size: 14px;
        color: #F5A800;
        letter-spacing: .5px;
    }

    .cd-mv-item p {
        margin: 0;
        font-size: 13px;
        line-height: 1.5;
        opacity: .92;
    }

.cd-info-pie {
    margin: 14px 0 0;
    font-size: 11px;
    text-align: center;
    opacity: .65;
    position: relative;
    z-index: 1;
}

    .cd-info-pie a {
        color: #fff;
        text-decoration: underline;
    }

/* ---------- PANEL PRINCIPAL ---------- */
.cd-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px;
    position: relative;
}

    .cd-main::after {
        content: "";
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 58%;
        background: url('../../../Content/Imagenes/Logo_UNAC/Logo.png') no-repeat right center;
        background-size: contain;
        opacity: .05;
        pointer-events: none;
    }

.cd-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    padding: 24px 30px 30px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .07);
}

    .cd-card.ancha {
        max-width: 880px;
    }

.cd-barra {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 6px;
}

.cd-encabezado h1 {
    margin: 0 0 6px;
    font-size: 24px;
    color: #1d3b67;
}

.cd-encabezado p {
    margin: 0 0 22px;
    color: #6c757d;
    line-height: 1.5;
}

.cd-btn-link {
    border: 0;
    padding: 6px 8px;
    background: transparent;
    color: #295884;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

    .cd-btn-link i {
        margin-right: 6px;
    }

    .cd-btn-link:hover {
        text-decoration: underline;
    }

.cd-enlaces {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
}

/* ---------- Campos ---------- */
.cd-fila {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.cd-campo {
    flex: 1 1 0;
    min-width: 0;
    margin-bottom: 16px;
}

    .cd-campo.ancho2 {
        flex: 2 1 0;
    }

    .cd-campo label {
        display: block;
        margin-bottom: 6px;
        font-size: 13px;
        font-weight: 600;
    }

        .cd-campo label span {
            color: #d93025;
        }

    .cd-campo input,
    .cd-campo select {
        width: 100%;
        padding: 12px 14px;
        border: 1px solid #e1e6ef;
        border-radius: 10px;
        background: #fff;
        font-family: inherit;
        font-size: 14px;
        color: #1f2d3d;
        transition: all .2s ease;
    }

        .cd-campo input:disabled {
            background: #f4f6fa;
            color: #6c757d;
        }

        .cd-campo input:focus,
        .cd-campo select:focus {
            border-color: #295884;
            box-shadow: 0 0 0 3px rgba(41, 88, 132, .12);
            outline: none;
        }

        .cd-campo input.invalido,
        .cd-campo select.invalido {
            border-color: #d93025;
            box-shadow: 0 0 0 3px rgba(217, 48, 37, .1);
        }

    .cd-campo input.cd-codigo {
        font-size: 28px;
        letter-spacing: 12px;
        text-align: center;
        font-weight: 700;
    }

    /* select2 (países, departamentos y ciudades) con el mismo aspecto de los demás campos */
    .cd-campo .select2-container {
        width: 100% !important;
    }

    .cd-campo .select2-selection--single {
        height: 46px !important;
        padding: 7px 10px;
        border: 1px solid #e1e6ef !important;
        border-radius: 10px !important;
    }

        .cd-campo .select2-selection--single .select2-selection__rendered {
            line-height: 30px !important;
            padding-left: 0 !important;
        }

        .cd-campo .select2-selection--single .select2-selection__arrow {
            height: 44px !important;
        }

/* ---------- Botones ---------- */
.cd-boton,
.cd-boton-sec {
    border: 0;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s ease;
}

    .cd-boton i,
    .cd-boton-sec i {
        margin-right: 8px;
    }

        .cd-boton-sec i.der {
            margin: 0 0 0 8px;
        }

.cd-boton {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    color: #fff;
    background: linear-gradient(135deg, #295884, #1d3b67);
}

    .cd-boton:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, .16);
    }

    .cd-boton:disabled {
        opacity: .7;
        cursor: wait;
    }

.cd-boton-sec {
    padding: 11px 18px;
    font-size: 14px;
    color: #fff;
    background: #295884;
}

    .cd-boton-sec:hover {
        background: #1d3b67;
    }

    .cd-boton-sec.verde {
        background: #2e7d32;
    }

        .cd-boton-sec.verde:hover {
            background: #1b5e20;
        }

    .cd-boton-sec.gris {
        color: #295884;
        background: #e8f0fa;
    }

        .cd-boton-sec.gris:hover {
            background: #d4e3f5;
        }

/* ---------- Carnet ---------- */
.cd-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.cd-pista {
    margin: 12px 0 0;
    text-align: center;
    font-size: 12px;
    color: #6c757d;
}

    .cd-pista i {
        margin-right: 6px;
    }

.cd-tabs {
    display: flex;
    gap: 6px;
    max-width: 420px;
    margin: 14px auto 0;
    padding: 5px;
    background: #eef2f8;
    border-radius: 12px;
}

.cd-tab {
    flex: 1;
    padding: 10px 8px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #4a5b73;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

    .cd-tab.activo {
        background: #fff;
        color: #295884;
        box-shadow: 0 2px 8px rgba(41, 88, 132, .16);
    }

.cd-programa {
    max-width: 420px;
    margin: 14px auto 0;
}

    .cd-programa label {
        display: block;
        margin-bottom: 6px;
        color: #2a5784;
        font-size: 13px;
        font-weight: 700;
    }

    .cd-programa select {
        width: 100%;
        padding: 11px 12px;
        border: 1px solid #e1e6ef;
        border-radius: 10px;
        font-family: inherit;
        font-size: 13px;
        color: #1f2d3d;
        background: #fff;
    }

        .cd-programa select:focus {
            border-color: #295884;
            box-shadow: 0 0 0 3px rgba(41, 88, 132, .12);
            outline: none;
        }

/* Diseño del carnet: el mismo de Mi Carnet Digital (empleado/visitante y estudiante/egresado/exalumno) */
.CarnetDigital {
    display: flex;
    justify-content: center;
    margin-top: 6px;
    cursor: pointer;
    font-family: Metropolis, 'Segoe UI', sans-serif;
}

    .CarnetDigital .front {
        width: 340px;
        height: 700px;
        margin: 10px 20px 20px;
        border-radius: 25px;
        overflow: hidden;
        position: relative;
        background-color: #ffffff;
        box-shadow: 0 8px 30px rgba(0, 0, 0, .15);
    }

    .CarnetDigital .img_encabezado {
        width: 340px;
    }

        .CarnetDigital .img_encabezado img {
            width: 100%;
        }

    .CarnetDigital .img_footer img {
        width: 340px;
        position: absolute;
        bottom: 0;
    }

    .CarnetDigital .avatar {
        width: 100%;
        text-align: center;
        padding: 10px;
    }

    .CarnetDigital .img {
        width: 100%;
        padding: 10px 20%;
        border-radius: 100%;
    }

        .CarnetDigital .img img {
            width: 150px;
            height: 150px;
            border-radius: 100%;
            object-fit: cover;
        }

    .CarnetDigital .avatar p {
        font-size: 15px;
        font-weight: 800;
        margin: 2px;
        color: #2a5784;
    }

    .CarnetDigital .avatar .txtNombre {
        margin: 2px;
        font-size: 18px;
        font-weight: 900;
        color: #2a5784;
    }

    .CarnetDigital .avatar .txtTipoCarnet {
        margin: 4px 2px 6px 2px;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 2px;
        color: #f0a92a;
        text-transform: uppercase;
    }

    .CarnetDigital .front .QR {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        margin-top: 10px;
    }

        .CarnetDigital .front .QR img {
            width: 150px;
            height: 150px;
        }

    .CarnetDigital .back .QR {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: -5px;
    }

        .CarnetDigital .back .QR img {
            width: 120px;
            height: 120px;
        }

    .CarnetDigital .Verificacion {
        text-align: center;
        font-weight: 700;
        color: #000;
    }

    .CarnetDigital .Codigo__Barra {
        width: 100%;
        height: 80px;
        text-align: center;
        margin-top: 5%;
    }

        .CarnetDigital .Codigo__Barra svg {
            width: 100%;
            height: 80px;
            padding: 10px 0;
        }

    .CarnetDigital .back {
        display: none;
        width: 340px;
        height: 650px;
        margin: 10px 20px 20px;
        border-radius: 25px;
        overflow: hidden;
        position: relative;
        background-color: #ffffff;
        box-shadow: 0 8px 30px rgba(0, 0, 0, .15);
    }

    .CarnetDigital .texto {
        position: relative;
    }

        .CarnetDigital .texto img {
            width: 100%;
            margin-top: 5%;
        }

        .CarnetDigital .texto .textValido {
            position: absolute;
            top: 61px;
            left: 127px;
            font-weight: 900;
        }

    .CarnetDigital .back .Img_back {
        position: absolute;
        bottom: -5px;
    }

        .CarnetDigital .back .Img_back img {
            width: 320px;
        }

    /* Al tocar el carnet se voltea */
    .CarnetDigital .front.ocultar {
        display: none;
    }

    .CarnetDigital .back.ocultar {
        display: block;
    }

/* ---------- Asistente de actualización de datos ---------- */
.cd-pasos {
    display: flex;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

    .cd-pasos li {
        flex: 1;
        text-align: center;
        font-size: 12px;
        font-weight: 600;
        color: #9aa7b8;
    }

        .cd-pasos li span {
            display: block;
            width: 40px;
            height: 40px;
            margin: 0 auto 4px;
            border-radius: 50%;
            background: #eef2f8;
            font-size: 18px;
            line-height: 40px;
        }

        .cd-pasos li.activo {
            color: #295884;
        }

            .cd-pasos li.activo span {
                background: #295884;
                color: #fff;
            }

        .cd-pasos li.completado {
            color: #2e7d32;
        }

            .cd-pasos li.completado span {
                background: #e3f4e4;
                color: #2e7d32;
            }

.cd-progreso {
    height: 8px;
    margin-bottom: 20px;
    background: #eef2f8;
    border-radius: 8px;
    overflow: hidden;
}

    .cd-progreso div {
        width: 25%;
        height: 100%;
        background: linear-gradient(90deg, #2e7d32, #43a047);
        border-radius: 8px;
        transition: width .4s ease;
    }

.cd-aviso {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    margin-bottom: 20px;
    border-radius: 10px;
    background: #fff6dc;
    border-left: 4px solid #F5A800;
    color: #5c4300;
}

    .cd-aviso i {
        margin-top: 2px;
        color: #c98a00;
    }

.cd-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

    .cd-nav .cd-boton {
        width: auto;
        padding: 12px 20px;
    }

    .cd-nav .cd-boton-sec i.izq {
        margin: 0 8px 0 0;
    }

.cd-terminos {
    margin-bottom: 18px;
    padding: 16px 18px;
    background: #f8fafc;
    border-radius: 12px;
}

    .cd-terminos p {
        margin: 0 0 10px;
        font-size: 13px;
        line-height: 1.55;
    }

    .cd-terminos a {
        color: #295884;
        font-weight: 600;
        word-break: break-all;
    }

/* ---------- Cargando ---------- */
.cd-cargando {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .88);
}

.cd-cargando-caja {
    text-align: center;
    color: #1d3b67;
    font-weight: 600;
}

.cd-puntos div {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin: 0 3px;
    border-radius: 100%;
    background: #295884;
    animation: cd-rebote 1.4s infinite ease-in-out both;
}

    .cd-puntos div:nth-child(1) {
        animation-delay: -.32s;
    }

    .cd-puntos div:nth-child(2) {
        animation-delay: -.16s;
    }

@keyframes cd-rebote {
    0%, 80%, 100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* ---------- RESPONSIVE ---------- */
@media screen and (max-width: 1000px) {
    .cd-layout {
        flex-direction: column;
    }

    .cd-info {
        position: relative;
        width: 100%;
        height: auto;
        flex: none;
        padding: 20px 20px 16px;
    }

    .cd-info-ilustracion img {
        max-width: 220px;
        max-height: 170px;
    }

    .cd-info-texto h2 {
        font-size: 21px;
    }

    .cd-mv,
    .cd-info-pie {
        display: none;
    }

    .cd-main {
        padding: 14px;
    }

        .cd-main::after {
            width: 100%;
        }

    .cd-card {
        padding: 18px 16px 24px;
    }
}

@media screen and (max-width: 640px) {
    .cd-fila {
        flex-direction: column;
        gap: 0;
    }

    .cd-pasos li {
        font-size: 0;
    }

        .cd-pasos li span {
            font-size: 18px;
        }

    .cd-nav {
        flex-direction: column-reverse;
    }

        .cd-nav .cd-boton,
        .cd-nav .cd-boton-sec {
            width: 100%;
        }

    .cd-main {
        padding: 8px;
    }

    .cd-card {
        padding: 14px 10px 20px;
    }

    /* El carnet se encoge con el ancho de la pantalla (340 px como máximo) */
    .CarnetDigital .front,
    .CarnetDigital .back {
        width: 100%;
        max-width: 340px;
        margin-left: 0;
        margin-right: 0;
    }

    .CarnetDigital .img_encabezado {
        width: 100%;
    }

    .CarnetDigital .img_footer img {
        width: 100%;
    }

    .CarnetDigital .back .Img_back {
        width: 100%;
    }

        .CarnetDigital .back .Img_back img {
            width: 94%;
        }
}
