:root {
    --utn-blue: #2457a6;
    --utn-blue-dark: #173b76;
    --utn-blue-light: #2d7dd2;
    --text: #263238;
    --muted: #68727d;
    --border: #d9dee5;
    --surface: #ffffff;
    --surface-soft: #f5f7fa;
    --disabled: #9aa3ad;
    --danger: #a32121;
    --shadow: 0 8px 24px rgba(23, 59, 118, .08);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: #f4f6f9;
}

a { color: var(--utn-blue); }

a:hover { color: var(--utn-blue-dark); }

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 1px auto;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.brand-header {
    display: grid;
    grid-template-columns: 220px 1fr 190px;
    align-items: center;
    gap: 24px;
    padding: 18px 28px;
    background: #fff;
}

.brand-logo-utn { width: 220px; height: auto; max-width: 100%; }
.brand-logo-sysadmin { width: 190px; height: auto; max-width: 100%; justify-self: end; }

.brand-title { text-align: center; }
.brand-title h1 { margin: 0; font-size: clamp(20px, 2.3vw, 30px); font-weight: 600; }
.brand-title .faculty { margin-top: 6px; color: #555; font-size: clamp(16px, 1.8vw, 23px); }
.brand-title .system { margin-top: 8px; font-size: 15px; color: var(--muted); }

.top-rule { height: 5px; background: var(--utn-blue-light); margin: 0 28px; border: 0; }

.page-header {
    padding: 22px 28px;
    color: #fff;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--utn-blue-dark), var(--utn-blue));
}

.page-header h1 { margin: 0; font-size: clamp(22px, 3vw, 30px); }
.page-header p { margin: 7px 0 0; opacity: .92; }
.page-header h2 { margin: 7px 0 0; opacity: .92; } /* legajo en menu */
                                                
.page-header .legajo-header {
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    opacity: 1;
    text-align: right;
    white-space: nowrap;
}                                                   /* legajo en menu*/
.content { padding: 28px; }

.form-card {
    max-width: 560px;
    margin: 38px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-card h2 { margin-top: 0; text-align: center; }
.form-card #btnIngresar { display: flex; margin-left: auto; margin-right: auto; }
.form-field { margin: 18px 0; }
.form-field label { display: block; margin-bottom: 7px; font-weight: 600; }

.form-control {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #c7ced8;
    border-radius: 7px;
    font: inherit;
    background: #fff;
}

.form-control:focus {
    outline: 2px solid rgba(45, 125, 210, .2);
    border-color: var(--utn-blue-light);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: 7px;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary { color: #fff; background: var(--utn-blue); border-color: var(--utn-blue); }
.btn-primary:hover { color: #fff; background: var(--utn-blue-dark); }
.btn-secondary { color: #45515d; background: #eef1f5; border-color: #d7dde5; }
.btn-secondary:hover { color: #263238; background: #e3e8ee; }

.validation-error, .error {
    color: var(--danger);
    font-weight: 600;
}

/* =========================================
   LOGIN - ESCRITORIO
   ========================================= */

@media screen and (min-width: 821px) {

    body {
        padding-bottom: 10px;
        min-height: 100vh;
    }

    .page-shell {
        margin-top: 5px;
        margin-bottom: 10px;
    }

    .brand-header {
        padding-top: 9px;
        padding-bottom: 9px;
    }

    .form-card {
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .login-footer {
        margin-top: 9px;
        padding: 0 12px 10px;
        text-align: center;
        font-size: clamp(10px, 0.8vw, 12px);
    }
}


/* ==========================================
   LOGIN RESPONSIVE
   Escritorio, tablet y celular
   ========================================== */

/* ---------- ESCRITORIO ---------- */

@media screen and (min-width: 821px) {

    body {
        padding-bottom: 10px;
        min-height: 100vh;
    }

    .page-shell {
        width: min(1500px, calc(100% - 32px));
        margin-top: 5px;
        margin-bottom: 10px;
    }

    .brand-header {
        padding-top: 9px;
        padding-bottom: 9px;
    }

    .form-card {
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .login-footer {
        margin-top: 9px;
        padding: 0 12px 10px;
        text-align: center;
        font-size: clamp(10px, 0.8vw, 12px);
        line-height: 1.45;
    }
}


/* ---------- CELULARES Y TABLETS PEQUEÑAS ---------- */

@media screen and (max-width: 600px) {

    /* Contenedor principal */

    .page-shell {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 6px;
        box-sizing: border-box;
    }

    .card {
        width: 100%;
        min-width: 0;
        margin: 0 auto;
        box-sizing: border-box;
    }


    /* Encabezado */

  .brand-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-rows: auto auto;

        width: calc(100% - 20px);
        max-width: 420px;

        margin: 0 auto;
        padding: 12px 8px;

        box-sizing: border-box;
        justify-items: stretch;
        align-items: center;

        column-gap: 12px;
        row-gap: 10px;
    }



    /* Logo UTN: arriba a la izquierda */

    .brand-header > div:first-child {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        margin: 0;
        min-width: 0;
    }

    .brand-logo-utn {
        display: block;

        width: auto;
        height: 32px;
        max-width: 100%;

        object-fit: contain;
        object-position: left center;

        margin: 0;
    }


    /* Logo SysAdmin: arriba a la derecha */

    .brand-header > div:last-child {
        grid-column: 2;
        grid-row: 1;

        justify-self: end;
        align-self: center;

        min-width: 0;
        max-width: 100%;
        margin: 0;
    }

    .brand-logo-sysadmin {
        display: block;

        width: auto;
        height: 40px;
        max-width: 100%;

        object-fit: contain;
        object-position: right center;

        margin: 0;
    }


    /* Título: fila completa, centrado real */

  .brand-header > .brand-title {
        grid-column: 1 / -1;
        grid-row: 2;

        display: flex;
        flex-direction: column;
        align-items: center;

        width: 100%;
        max-width: 100%;
        min-width: 0;

        margin: 0;
        padding: 0;

        text-align: center;
        justify-self: stretch;
        box-sizing: border-box;
    }


    .brand-title .faculty {
        display: block;

        width: 100%;
        margin: 5px 0 0;

        font-size: clamp(20px, 6.5vw, 28px);
        line-height: 1.2;

        text-align: center;
        overflow-wrap: anywhere;
        box-sizing: border-box;
    }

    .brand-title .system {
        display: block;

        width: 100%;
        margin: 5px 0 0;

        font-size: 11px;
        line-height: 1.4;

        text-align: center;
        overflow-wrap: anywhere;
        box-sizing: border-box;
    }


    /* Separador */

    .top-rule {
        height: 3px;
        margin: 0 8px;
    }


    /* Formulario */

    .form-card {
        width: 100%;
        max-width: 420px;
        min-width: 0;

        margin: 12px auto;
        padding: 14px;

        box-sizing: border-box;
    }

    .form-card h2 {
        margin-top: 0;
        text-align: center;
        font-size: 20px;
        line-height: 1.3;
    }

    .form-field {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .form-control {
        display: block;

        width: 100%;
        max-width: 100%;
        min-width: 0;

        box-sizing: border-box;
    }

    .password-recovery {
        margin: 10px 0 14px;
        text-align: center;
        line-height: 1.4;
    }

    .form-field .btn {
        display: block;

        width: 100%;
        max-width: 100%;

        box-sizing: border-box;
    }

    .validation-error {
        overflow-wrap: anywhere;
    }


    /* Términos y condiciones */

    .terminos-login {
        margin: 12px auto;
        padding: 0 10px;

        text-align: center;
        font-size: 12px;
        line-height: 1.4;

        overflow-wrap: anywhere;
    }


    /* Pie de página */

    .login-footer {
        width: 100%;
        max-width: 100%;

        margin: 12px auto 0;
        padding: 0 12px 12px;

        text-align: center;
        font-size: 11px;
        line-height: 1.5;

        overflow-wrap: anywhere;
        box-sizing: border-box;
    }
}


/* ---------- CELULARES ESTRECHOS ---------- */

@media screen and (max-width: 360px) {

    .page-shell {
        padding: 4px;
    }

    .brand-header {
        padding: 9px 6px;
        column-gap: 6px;
        row-gap: 8px;
    }

    .brand-logo-utn {
        height: 27px;
    }

    .brand-logo-sysadmin {
        height: 34px;
    }

    .brand-title h1 {
        font-size: 11px;
    }

    .brand-title .faculty {
        font-size: 21px;
    }

    .brand-title .system {
        font-size: 10px;
    }

    .form-card {
        margin-top: 8px;
        margin-bottom: 8px;
        padding: 10px;
    }

    .login-footer {
        padding-right: 8px;
        padding-left: 8px;
        font-size: 10px;
    }
}
/*solo menu */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
/* Tres columnas en monitores grandes */
@media screen and (min-width: 1200px) {
    .menu-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
.menu-item {
    display: flex;
    align-items: center;
    min-height: 48px;
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--utn-blue);
    font-size: 18px;
    text-align: left;
    text-decoration: none;
}

.menu-item:hover { border-color: #aebed4; background: #f7faff; }
.menu-item-disabled { color: var(--disabled); background: #f1f3f5; cursor: not-allowed; }
.menu-item-disabled:hover { background: #f1f3f5; border-color: var(--border); }

.menu-footer {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.receipts-table-wrap { overflow-x: auto; }

.receipts-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.receipts-table th,
.receipts-table td {
    padding: 11px 12px;
    border: 1px solid var(--border);
}

.receipts-table th {
    color: #fff;
    background: var(--utn-blue);
    text-align: left;
    font-size: 14px;
}

.receipts-table td { font-size: 14px; }
.receipts-table tr:nth-child(even) td { background: #f8fafc; }
.receipts-table a { font-weight: 600; text-decoration: none; }
.receipts-table a:hover { text-decoration: underline; }

.message { padding: 28px 16px; text-align: center; color: var(--muted); }

.receipts-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
}


/* Contenedor común para páginas de consulta/listado */
.result-card {
    margin: 6px 0 0;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(23, 59, 118, .05);
}

.result-card-title {
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--utn-blue-dark);
    font-size: 18px;
    font-weight: 600;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    background: #fff;
}

.data-table th,
.data-table td {
    padding: 10px 11px;
    border: 1px solid var(--border);
    vertical-align: middle;
}

.data-table th {
    color: #fff;
    background: var(--utn-blue);
    text-align: left;
    font-size: 14px;
}

.data-table td {
    font-size: 14px;
}

.data-table tbody tr:nth-child(even) td {
    background: #f8fafc;
}

.data-table tbody tr:hover td {
    background: #f1f6fc;
}

.page-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 24px 0 2px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.page-actions .btn {
    min-width: 190px;
}

@media print {
    .result-card {
        margin: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .page-actions {
        display: none;
    }
}

@media (max-width: 820px) {
    .page-shell { width: min(100% - 20px, 700px); margin: 10px auto; }
    .brand-header { grid-template-columns: 1fr; text-align: center; gap: 12px; padding: 16px; }
    .brand-logo-utn, .brand-logo-sysadmin { justify-self: center; width: auto; max-width: min(80%, 220px); max-height: 85px; }
    .top-rule { margin: 0 16px; }
    .content { padding: 18px; }
    .menu-grid { grid-template-columns: 1fr; }
    .form-card { margin: 20px auto; padding: 22px; }
}

@media (max-width: 480px) {
    .page-shell { width: 100%; margin: 0; }
    .card { border-radius: 0; border-left: 0; border-right: 0; }
    .content { padding: 14px; }
    .page-header { padding: 18px 16px; }
    .brand-title h1 { font-size: 20px; }
    .brand-title .faculty { font-size: 16px; }
    .menu-item { min-height: 44px; }
    .receipts-table th, .receipts-table td { padding: 9px 8px; }
}

@media print {
    body { background: #fff; }
    .page-shell, .card { width: 100%; margin: 0; border: 0; box-shadow: none; }
    .receipts-actions { display: none; }
}

/* Encabezado compacto común de las páginas posteriores al login. */
.personal-header {
    width: min(1500px, calc(100% - 32px));
    min-height: 80px;
    margin: 10px auto 0;
    padding: 8px 16px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    box-sizing: border-box;
}

.personal-header-logo {
    display: flex;
    align-items: center;
    min-width: 0;
}

.personal-header-logo-utn { justify-content: flex-start; }
.personal-header-logo-sysadmin { justify-content: flex-end; }

.personal-header-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.personal-header-logo-utn img {
    width: 105px;
    max-height: 38px;
}

.personal-header-logo-sysadmin img {
    width: 220px;
    max-height: 144px;
}

.personal-header-title {
    min-width: 0;
    text-align: center;
    line-height: 1.1;
    grid-column: 2;
}

.personal-header-institution {
    font-size: clamp(13px, 1.7vw, 17px);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.personal-header-faculty {
    font-size: clamp(13px, 1.7vw, 17px);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 600px) {
    .personal-header {
        width: calc(100% - 16px);
        min-height: 58px;
        grid-template-columns: 82px 1fr 82px;
        gap: 6px;
        padding: 5px 8px;
        margin-top: 8px;
    }

    .personal-header-logo-utn img {
        width: 72px;
        max-height: 30px;
    }

    .personal-header-logo-sysadmin img {
        width: 112px;
         max-width: 100%;
        max-height: none;
    }

    .personal-header-institution {
        font-size: 11px;
    }

    .personal-header-faculty {
        font-size: 11px;
    }
}

@media print {
    .personal-header { box-shadow: none; }
}


/* Recuperación de contraseña: estilos aislados del resto del sitio. */
.password-recovery {
    margin: 12px 0 0;
    text-align: center;
    font-size: 14px;
}

.password-recovery a {
    font-weight: 600;
    text-decoration: none;
}

.password-recovery a:hover {
    text-decoration: underline;
}

.recovery-card {
    max-width: 820px;
    margin: 28px auto;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.recovery-card h2 {
    margin: 0 0 12px;
    text-align: center;
    color: var(--utn-blue-dark);
}

.recovery-intro {
    margin: 0 auto 20px;
    max-width: 720px;
    line-height: 1.55;
    text-align: center;
    color: var(--text);
}

.recovery-form {
    max-width: 610px;
    margin: 0 auto;
}

.recovery-field {
    margin: 13px 0;
}

.recovery-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.recovery-field input {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #c7ced8;
    border-radius: 7px;
    font: inherit;
}

.recovery-field input:focus {
    outline: 2px solid rgba(45, 125, 210, .2);
    border-color: var(--utn-blue-light);
}

.recovery-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.recovery-actions button,
.recovery-actions .btn {
    min-width: 230px;
}

.recovery-message {
    margin: 18px auto;
    max-width: 720px;
    padding: 14px 16px;
    border-radius: 8px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    text-align: center;
    line-height: 1.5;
}

.recovery-error {
    color: var(--danger);
    font-weight: 600;
}

.recovery-success {
    color: #245a2a;
    font-weight: 600;
}

.recovery-data {
    margin: 16px auto;
    max-width: 610px;
    padding: 14px 18px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.recovery-data p {
    margin: 6px 0;
}

@media (max-width: 600px) {
    .recovery-card {
        margin: 16px auto;
        padding: 18px;
    }

    .recovery-actions button,
    .recovery-actions .btn {
        width: 100%;
        min-width: 0;
    }
}

/* Filtros de fechas: Tarjeta Reloj */

.filtro-fechas {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-width: 380px;
    justify-items: center;
}

.filtro-fechas label {
    display: block;
    margin-top: 8px;
}

.filtro-fechas input[type="date"] {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: 38px;
}

.filtro-fechas button {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 14px;
}

@media (max-width: 600px) {
    .filtro-fechas {
        grid-template-columns: minmax(0, 1fr);
    }

    .filtro-fechas button {
        grid-column: 1;
    }
}

/* Enlace a términos y condiciones en el ingreso */
.terminos-login {
    text-align: center;
    margin: 16px 0;
    font-size: 0.9rem;
}

.terminos-login a {
    color: #2457a6;
    text-decoration: underline;
}

.terminos-login a:hover {
    color: #173b76;
}
.terminos-contenido { 
    max-width: 1000px; 
    margin: 0 auto; 
    line-height: 1.65; 
    overflow-wrap: anywhere; 
}
        .terminos-contenido h2 { 
            margin-top: 28px; 
            margin-bottom: 10px; 
            font-size: 1.15rem; 
        }
        .terminos-contenido p { 
            margin: 0 0 16px; 
            text-align: justify; 
        }
        .terminos-aviso { 
            margin-top: 28px; 
            padding-top: 18px; 
            border-top: 1px solid #ccc; 
        }
        .terminos-acciones { 
            margin-top: 24px; 
        }
    /* estilos de certificados    */    
        @media (max-width: 600px) { 
            .terminos-contenido p { 
                text-align: left; } 
        }
        .certificados-wrap { 
            width: min(1100px, calc(100% - 24px)); 
            margin: 12px auto; 
        }
        .certificados-table-wrap { 
               width: 100%;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch; 
        }
        .certificados-table { 
            width: 100%; 
            border-collapse: collapse; 
            background: #fff; 
        }
        .certificados-table th, .certificados-table td { 
            border: 1px solid #cbcbd1; 
            padding: 8px; 
            text-align: left; 
        }
        .certificados-table th { 
            background: #2457a6; 
            color: #fff; 
        }
        .certificados-table td.centro { 
            text-align: center; 
            white-space: nowrap; 
        }
        .certificados-actions { 
            display: flex; 
            justify-content: center; 
            flex-wrap: wrap; 
            gap: 10px; 
            margin: 18px 0; 
        }
        @media print { 
            .certificados-actions, .no-print { display: none !important; } 
            .certificados-wrap { width: 100%; }
        }
    /* Alineación de filtros de Consulta de Expedientes */
    .expedientes-filtros {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 18px;
        max-width: 560px;
        margin: 28px auto;
    }
    .expedientes-filtros .expediente-fecha label,
    .expedientes-filtros .expediente-palabras label {
        display: block;
        margin: 0 0 7px;
        font-weight: 600;
    }
    .expedientes-filtros input[type="date"],
    .expedientes-filtros input[type="text"] {
        display: block;
        width: 100%;
        min-width: 0;
        min-height: 42px;
        box-sizing: border-box;
    }
    .expedientes-filtros .expediente-palabras,
    .expedientes-filtros .expediente-consultar {
        grid-column: 1 / -1;
    }
    .expedientes-filtros .expediente-consultar {
        display: flex;
        justify-content: center;
        margin-top: 2px;
    }
    @media (max-width: 600px) {
        .expedientes-filtros { grid-template-columns: minmax(0, 1fr); }
        .expedientes-filtros .expediente-palabras,
        .expedientes-filtros .expediente-consultar { grid-column: 1; }
    }
    /* estilos de estudios cursados */
            .estudios-table {
            width: 100%;
            border-collapse: collapse;
        }

        .estudios-table th,
        .estudios-table td {
            border: 1px solid #cbcbd1;
            padding: 6px;
        }

        .estudios-table th {
            text-align: center;
        }

        .estudios-table td:nth-child(4),
        .estudios-table td:nth-child(5),
        .estudios-table td:nth-child(6),
        .estudios-table td:nth-child(7) {
            text-align: center;
        }
/* direcciones de mail */
        .email-link {
            color: #2457a6;
            text-decoration: none;
        }

        .email-link:hover {
            text-decoration: underline;
        }

/* =====================================================
   LOGIN PROFESIONAL Y RESPONSIVE
   Reglas aisladas para loginPersonal.aspx
   ===================================================== */
.login-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 18px auto;
}

.login-card {
    width: 100%;
    overflow: hidden;
}

.login-card .brand-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    padding: 16px 26px;
}

.login-brand-left,
.login-brand-right {
    display: flex;
    align-items: center;
    min-width: 0;
}

.login-brand-left { justify-content: flex-start; }
.login-brand-right { justify-content: flex-end; }

.login-card .brand-logo-utn {
    display: block;
    width: 220px;
    max-width: 100%;
    max-height: 76px;
    object-fit: contain;
    object-position: left center;
}

.login-card .brand-logo-sysadmin {
    display: block;
    width: 190px;
    max-width: 100%;
    max-height: 86px;
    object-fit: contain;
    object-position: right center;
}

.login-card .brand-title {
    min-width: 0;
    text-align: center;
    overflow-wrap: anywhere;
}

.login-card .brand-title h1 {
    font-size: clamp(18px, 2vw, 27px);
    line-height: 1.25;
    text-align: center;
}

.login-card .brand-title .faculty {
    font-size: clamp(16px, 1.7vw, 22px);
    line-height: 1.25;
    text-align: center;
}

.login-card .brand-title .system {
    font-size: clamp(12px, 1vw, 14px);
    line-height: 1.4;
    text-align: center;
}

.login-card .top-rule {
    margin: 0 26px;
}

.login-card .form-card {
    width: min(100% - 32px, 480px);
    margin: 22px auto 18px;
    padding: clamp(20px, 3vw, 30px);
}

.login-card .form-card h2 {
    text-align: center;
    margin-bottom: 22px;
}

.login-card .form-field { margin: 16px 0; }
.login-card .form-control { display: block; width: 100%; min-width: 0; }
.login-card #btnIngresar { min-width: 150px; }
.login-card #lblError { display: block; margin-top: 12px; text-align: center; overflow-wrap: anywhere; }
.login-card .validation-error { overflow-wrap: anywhere; }
.login-card .terminos-login { margin: 12px 16px 18px; text-align: center; }
.login-card .login-footer { margin: 0 auto; max-width: 920px; padding: 0 24px 22px; text-align: center; line-height: 1.55; overflow-wrap: anywhere; }

@media screen and (max-width: 820px) {
    .login-shell { width: min(100% - 24px, 680px); margin: 12px auto; }

    .login-card .brand-header {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-rows: auto auto;
        gap: 12px 16px;
        padding: 16px 18px;
    }

    .login-card .login-brand-left { grid-column: 1; grid-row: 1; justify-content: flex-start; }
    .login-card .login-brand-right { grid-column: 2; grid-row: 1; justify-content: flex-end; }
    .login-card .brand-logo-utn { width: 190px; max-height: 58px; }
    .login-card .brand-logo-sysadmin { width: 165px; max-height: 64px; }

    .login-card .brand-title {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        text-align: center;
    }

    .login-card .brand-title h1 { font-size: clamp(17px, 3.4vw, 24px); }
    .login-card .brand-title .faculty { font-size: clamp(16px, 3vw, 21px); }
    .login-card .top-rule { margin: 0 18px; }
}

@media screen and (max-width: 480px) {
    .login-shell { width: 100%; margin: 0 auto; padding: 6px; }
    .login-card { border-radius: 10px; }
    .login-card .brand-header { padding: 12px 10px; gap: 10px 8px; }
    .login-card .brand-logo-utn { width: 100%; max-width: 145px; height: 34px; }
    .login-card .brand-logo-sysadmin { width: 100%; max-width: 135px; height: 38px; }
    .login-card .brand-title h1 { font-size: clamp(14px, 4vw, 19px); }
    .login-card .brand-title .faculty { font-size: clamp(16px, 5vw, 22px); }
    .login-card .brand-title .system { font-size: 11px; }
    .login-card .top-rule { margin: 0 10px; height: 3px; }
    .login-card .form-card { width: calc(100% - 20px); margin: 14px auto; padding: 18px 16px; }
    .login-card .form-card h2 { font-size: 20px; }
    .login-card #btnIngresar { width: 100%; }
    .login-card .login-footer { padding: 0 14px 18px; font-size: 11px; }
}

@media screen and (max-width: 340px) {
    .login-card .brand-header { padding-left: 7px; padding-right: 7px; }
    .login-card .brand-logo-utn { max-width: 120px; height: 30px; }
    .login-card .brand-logo-sysadmin { max-width: 112px; height: 32px; }
    .login-card .brand-title h1 { font-size: 13px; }
    .login-card .brand-title .faculty { font-size: 18px; }
    .login-card .brand-title .system { font-size: 10px; }
}
/*nombre usuario*/
.nombre-usuario {
    margin-left: 6px;
    font-weight: 500;
}

/*modelo todas las tablas */
.data-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    background: #ffffff;
    color: #343a40;
    font-size: 0.95rem;
}


/* Tabla de datos personales: mismo formato que las tablas de resultados */

.personal-data-table th {
    background: #2859a5;
    color: #ffffff;
    font-weight: 700;
    text-align: left;
    padding: 11px 12px;
    border: 1px solid #d5dbe3;
}

.personal-data-table td {
    padding: 9px 12px;
    border: 1px solid #d5dbe3;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.personal-data-table tr:nth-child(even) td {
    background: #f5f7fa;
}

.personal-data-table tr:nth-child(odd) td {
    background: #ffffff;
}

.personal-data-table td:first-child {
    width: 35%;
    font-weight: 600;
}

@media (max-width: 600px) {
    .personal-data-table {
        font-size: 0.875rem;
    }

    .personal-data-table th,
    .personal-data-table td {
        padding: 7px;
    }
}


/* Selector de fechas en formato argentino: dd/MM/aaaa, con calendario integrado. */
.fecha-control {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
}
.fecha-control input.fecha-argentina {
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    min-height: 42px;
    box-sizing: border-box;
    padding: 9px 11px;
    border: 1px solid #b8c4d3;
    border-radius: 7px 0 0 7px;
    background: #fff;
    color: #172b4d;
    font: inherit;
    letter-spacing: .02em;
}
.fecha-control input.fecha-argentina:focus {
    outline: none;
    border-color: #2d7dd2;
    box-shadow: 0 0 0 3px rgba(45,125,210,.16);
    z-index: 1;
}
.fecha-calendario-boton {
    flex: 0 0 30px;
    min-width: 20px;
    border: 1px solid #b8c4d3;
    border-left: 0;
    border-radius: 0 7px 7px 0;
    background: #f3f7fc;
    color: #2457a6;
    font-size: 21px;
    cursor: pointer;
}
.fecha-calendario-boton:hover { background: #e6effb; }
.fecha-calendario-boton:focus-visible,
.calendario-nav:focus-visible,
.calendario-dia:focus-visible,
.calendario-pie button:focus-visible { outline: 2px solid #2d7dd2; outline-offset: 2px; }

.fecha-calendario-popup {
    position: fixed;
    z-index: 10000;

    /* Tamaño adecuado para mostrar el calendario */
    width: 320px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    overflow: auto;

    padding: 16px;
    border: 1px solid #dbe4f0;
    border-radius: 16px;
    background: #fff;
    box-shadow:
        0 20px 55px rgba(17, 39, 71, .24),
        0 4px 12px rgba(17, 39, 71, .08);
    color: #20334e;

    box-sizing: border-box;
    animation: calendario-aparecer .14s ease-out;

    /* Evita que el contenido fuerce el ancho */
    min-width: 0;
}

.fecha-calendario-popup[hidden] {
    display: none !important;
    }

    /* Adaptación a celulares y pantallas angostas */
    @media (max-width: 480px) {
        .fecha-calendario-popup {
            width: calc(100vw - 24px);
            max-width: 360px;
            max-height: calc(100dvh - 24px);
            padding: 12px;
            border-radius: 12px;
        }
    }

.calendario-encabezado { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #edf1f7; }
.calendario-titulo { font-size: 15px; font-weight: 700; text-transform: capitalize; color: #173b76; }
.calendario-nav { width: 34px; height: 34px; border: 1px solid #e2eaf4; border-radius: 10px; background: #f5f8fc; color: #2457a6; font-size: 24px; line-height: 1; cursor: pointer; transition: background .15s, transform .15s; }
.calendario-nav:hover { background: #e8f1fc; transform: translateY(-1px); }
/* Aislar el calendario de las reglas generales de botones de los formularios. */
.fecha-calendario-popup .calendario-grilla {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    grid-auto-rows: 36px;
    gap: 3px;
    width: 100%;
}
.fecha-calendario-popup .calendario-grilla > .calendario-dia-semana {
    display: block;
    min-width: 0;
    padding: 5px 0;
    text-align: center;
}
.fecha-calendario-popup .calendario-grilla > .calendario-dia {
    display: block;
    grid-column: auto !important;
    justify-self: stretch;
    align-self: stretch;
    width: 100% !important;
    min-width: 0;
    height: 36px;
    margin: 0 !important;
    padding: 0;
}
.calendario-dia-semana { padding: 5px 0; text-align: center; color: #65758b; font-size: 11px; font-weight: 700; }
.calendario-dia { min-width: 0; height: 36px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #20334e; font-size: 13px; cursor: pointer; transition: background .12s, color .12s, transform .12s; }
.calendario-dia:hover:not(:disabled) { background: #eaf2fd; color: #173b76; transform: scale(1.04); }
.calendario-dia.calendario-otro-mes { color: #9aa7b7; }
.calendario-dia.calendario-seleccionado { background: #2457a6; color: #fff; font-weight: 700; }
.calendario-dia.calendario-hoy:not(.calendario-seleccionado) { box-shadow: inset 0 0 0 1px #2d7dd2; }
.calendario-dia:disabled, .calendario-dia.calendario-deshabilitado { color: #c1c8d2; cursor: not-allowed; text-decoration: line-through; }
.calendario-pie { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 9px; border-top: 1px solid #edf0f5; }
.calendario-pie button { border: 0; border-radius: 6px; padding: 6px 9px; background: transparent; color: #2457a6; font: inherit; font-size: 12px; cursor: pointer; }
.calendario-pie button:hover { background: #f1f5fa; }
.fecha-error { display: block; min-height: 0; margin-top: 4px; color: #b42318; font-size: 12px; }
.fecha-error:empty { display: none; }
.fecha-invalida input.fecha-argentina { border-color: #b42318; }
@keyframes calendario-aparecer {
    from { opacity: 0; transform: translateY(-5px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .fecha-calendario-popup { animation: none; } }


/* Formulario de período: disposición consistente y adaptable. */
.filtro-fechas-card {
    width: min(100%, 680px);
    max-width: 680px;
    margin: 24px auto 10px;
    padding: 24px;
}
.filtro-fechas {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 20px 24px;
    max-width: none;
    width: 100%;
}
.filtro-fechas .fecha-campo {
    min-width: 0;
}
.filtro-fechas .fecha-campo label {
    display: block;
    margin: 0 0 8px;
    color: #263b55;
    font-weight: 600;
}
.filtro-fechas .fecha-control {
    width: 100%;
}
.filtro-fechas .fecha-acciones {
    grid-column: 1 / -1;
    padding-top: 2px;
}
.filtro-fechas .fecha-acciones .btn {
    min-width: 132px;
}
@media (max-width: 600px) {
    .filtro-fechas-card { padding: 18px; }
    .filtro-fechas { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .filtro-fechas .fecha-acciones { grid-column: 1; }
    .filtro-fechas .fecha-acciones .btn { width: 100%; }
}
/* botones menu salir y cambio password */
.btn-salir {
    background-color: #dc3545;
    color: white !important;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
}

.btn-salir:hover {
    background-color: #b02a37;
    color: white !important;
}
.btn-cambioPass {
    background-color:  #2457a6;
    color: white !important;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn-cambioPass:hover {
    background-color: #0056b3;
    color: white !important;
}
/* Solo organiza el encabezado del menú del personal */
.page-header:has(.legajo-header) {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.menu-header-info {
    min-width: 0;
    border-radius: 10px;
}

.page-header .legajo-header {
    margin: 7px 0 0;
    opacity: .92;
    color: inherit;
    font: inherit;
    white-space: nowrap;
    text-align: right;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .page-header:has(.legajo-header) {
        flex-wrap: wrap;
    }

    .page-header .legajo-header {
        margin-left: auto;
    }
}
/* En celulares, ocultar el legajo para reducir la altura del encabezado */
@media (max-width: 600px) {
    .page-header:has(.legajo-header) .legajo-header {
        display: none;
    }
}

/* Mensaje visible cuando la contraseña se cambió correctamente. */
.password-success {
    color: #c62828;
    font-weight: 600;
    text-align: center;
    margin: 20px 0;
}
        .password-form {
            width: 100%;
            max-width: 480px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }
        .password-field {
            display: flex;
            flex-direction: column;
            gap: 7px;
            width: 100%;
            min-width: 0;
        }
        .password-field label {
            display: block;
            margin: 0;
            font-weight: 600;
        }
        .password-field input[type="password"] {
            display: block;
            box-sizing: border-box;
            width: 100%;
            max-width: 100%;
            min-width: 0;
            min-height: 42px;
            padding: 10px 12px;
        }
        .password-buttons, .password-back {
            width: 100%;
            max-width: 480px;
            margin-left: auto;
            margin-right: auto;
        }
        .password-buttons { margin-top: 4px; }
        .password-buttons .btn, .password-back .btn {
            box-sizing: border-box;
            width: 100%;
            text-align: center;
        }
        .password-back { margin-top: 18px; }
        @media (max-width: 520px) {
            .password-form, .password-back { max-width: 100%; }
            .password-form { gap: 14px; }
        }