/* Pantalla de acceso: composicion institucional independiente del resto de la app. */
body.access-body {
    min-width: 0;
    min-height: 100svh;
    overflow-x: hidden;
    font-family: "Avenir Next", "Segoe UI", Arial, sans-serif;
    background: #f8f9fb;
}

.access-page {
    display: grid;
    grid-template-columns: minmax(0, 52%) minmax(0, 48%);
    min-height: 100svh;
}

.access-brand {
    position: relative;
    isolation: isolate;
    display: grid;
    min-width: 0;
    overflow: hidden;
    padding: 70px clamp(38px, 6vw, 104px) 42px;
    background: #780707;
    color: #fff;
}

.access-brand::before,
.access-brand::after {
    position: absolute;
    z-index: -1;
    content: "";
    inset: 0;
}

.access-brand::before {
    background: url("/assets/img/login-campus-tecnologico.png") center bottom / cover no-repeat;
    opacity: .62;
}

.access-brand::after {
    background: linear-gradient(180deg, rgba(48, 0, 0, .18), rgba(92, 0, 0, .24) 45%, rgba(55, 0, 0, .7));
}

.access-brand-inner {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(100%, 790px);
    min-height: 0;
    margin: 0 auto;
}

.access-brand-copy {
    position: relative;
    z-index: 2;
    align-self: start;
    max-width: 570px;
}

.access-brand-copy h1 {
    margin: 0;
    color: #fff;
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: 0;
}

.access-brand-copy h1 span {
    color: #ffd23f;
}

.access-brand-copy h1::after {
    display: block;
    width: 42px;
    height: 3px;
    margin-top: 15px;
    border-radius: 99px;
    background: #ffd23f;
    content: "";
}

.access-brand-copy p {
    margin: 12px 0 0;
    color: #fff4f4;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.45;
}

.access-brand-copy .access-brand-note {
    max-width: 270px;
    margin-top: 78px;
    font-size: 1.16rem;
    font-weight: 500;
}

.access-visual {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: end;
    justify-content: center;
    min-height: 0;
    margin-top: 12px;
}

.access-mascot {
    display: block;
    width: min(82%, 600px);
    height: auto;
    max-height: min(68svh, 790px);
    object-fit: contain;
    object-position: center bottom;
    mix-blend-mode: screen;
    filter: drop-shadow(0 16px 18px rgba(45, 0, 0, .24));
}

.access-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-width: 0;
    padding: 34px clamp(28px, 6vw, 116px) 28px;
    background: #fbfcfe;
}

.access-theme-toggle {
    display: grid;
    place-items: center;
    justify-self: end;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid #d9dfea;
    border-radius: 50%;
    background: #fff;
    color: #29313d;
    box-shadow: none;
    font-size: 1rem;
}

.access-theme-toggle:hover {
    border-color: #9c1212;
    background: #fff7f7;
    color: #8d0b0b;
}

.access-form-wrap {
    align-self: center;
    width: min(100%, 470px);
    margin: 26px auto;
}

.access-form-heading {
    display: block;
    margin: 0 0 34px;
    text-align: center;
}

.access-form-eyebrow {
    display: inline-block;
    margin: 0 0 22px;
    padding-bottom: 11px;
    border-bottom: 3px solid #a70d0d;
    color: #970d0d;
    font-size: 1.04rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
}

.access-form-heading h2 {
    margin: 0;
    color: #17202d;
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: 0;
}

.access-form-heading p {
    margin: 12px auto 0;
    color: #70809a;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.45;
}

.access-alert {
    margin: -10px 0 22px;
    border-radius: 8px;
}

.access-form {
    gap: 22px;
}

.access-field {
    gap: 9px;
}

.access-field label {
    color: #2a3545;
    font-size: .94rem;
    font-weight: 700;
}

.access-input-wrap {
    --access-input-bg: #fff;
    --access-input-text: #17202d;
    grid-template-columns: 50px minmax(0, 1fr) auto;
    min-height: 58px;
    border-color: #d5ddea;
    border-radius: 9px;
    background: var(--access-input-bg);
    color: #526178;
}

.access-input-wrap:focus-within {
    border-color: #a30d0d;
    box-shadow: 0 0 0 3px rgba(163, 13, 13, .1);
}

.access-input-wrap input {
    height: 56px;
    font-size: 1rem;
}

.access-username-mascot {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    justify-self: center;
}

.access-username-mascot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: .72;
}

.access-password-toggle {
    width: 46px;
    height: 46px;
    margin-right: 5px;
    color: #526178;
}

.access-password-toggle:hover {
    background: #fff4f4;
    color: #970d0d;
}

.access-submit {
    grid-template-columns: 56px minmax(0, 1fr) 54px;
    min-height: 58px;
    margin-top: 2px;
    border: 1px solid #9b0b0b;
    border-radius: 9px;
    background: #a90e0e;
    box-shadow: 0 10px 20px rgba(130, 8, 8, .13);
    font-size: 1rem;
}

.access-submit-symbol {
    background: #8d0a0a;
}

.access-submit:hover {
    border-color: #790707;
    background: #920b0b;
}

.access-submit:hover .access-submit-symbol {
    background: #780707;
}

.access-footer {
    color: #8190a6;
}

html[data-theme="dark"] body.access-body,
html[data-theme="dark"] .access-panel {
    background: #111824;
    color: #eef3f8;
}

html[data-theme="dark"] .access-theme-toggle {
    border-color: #38485e;
    background: #182231;
    color: #f6ce4b;
}

html[data-theme="dark"] .access-form-heading h2,
html[data-theme="dark"] .access-field label {
    color: #f2f5f8;
}

html[data-theme="dark"] .access-form-heading p,
html[data-theme="dark"] .access-footer {
    color: #aebdce;
}

html[data-theme="dark"] .access-input-wrap {
    --access-input-bg: #172230;
    --access-input-text: #eef3f8;
    border-color: #39495e;
    color: #aebdce;
}

html[data-theme="dark"] .access-password-toggle:hover {
    background: #2a2023;
}

html[data-theme="dark"] .access-username-mascot img {
    filter: invert(1);
}

@media (max-width: 1180px) {
    .access-brand { padding: 52px 52px 30px; }
    .access-brand-copy h1 { font-size: 2.5rem; }
    .access-brand-copy .access-brand-note { margin-top: 48px; }
    .access-form-heading h2 { font-size: 2.35rem; }
    .access-panel { padding-inline: 48px; }
}

@media (max-width: 1360px) and (min-width: 861px) {
    .access-brand { padding-inline: 52px; }
    .access-brand-copy h1 { font-size: 2.35rem; }
}

@media (min-width: 1101px) {
    .access-brand-copy h1 { white-space: nowrap; }
}

/* En monitores anchos el contenido se ancla al margen del hero, no al centro. */
@media (min-width: 1600px) {
    .access-brand-inner {
        max-width: none;
        margin: 0;
    }
}

@media (max-width: 1100px) and (min-width: 861px) {
    .access-brand-copy h1 { font-size: 2rem; }
}

@media (max-width: 860px), (orientation: portrait) and (max-width: 1024px) {
    .access-page { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
    .access-brand { min-height: 286px; padding: 28px 36px 0; }
    .access-brand-inner { position: relative; display: block; max-width: 680px; }
    .access-brand-copy { width: 58%; }
    .access-brand-copy h1 { font-size: 2rem; }
    .access-brand-copy p { margin-top: 9px; font-size: .94rem; }
    .access-brand-copy .access-brand-note { max-width: 230px; margin-top: 28px; font-size: .96rem; }
    .access-visual { position: absolute; right: 6%; bottom: -6px; width: min(40%, 300px); height: 260px; margin: 0; }
    .access-mascot { width: 100%; max-height: 290px; }
    .access-panel { min-height: 520px; padding: 24px 36px 24px; }
    .access-form-wrap { margin: 24px auto; }
}

@media (max-width: 480px) {
    .access-brand { min-height: 258px; padding: 24px 20px 0; }
    .access-brand-copy { width: 59%; }
    .access-brand-copy h1 { font-size: 1.62rem; }
    .access-brand-copy h1::after { width: 32px; height: 2px; margin-top: 11px; }
    .access-brand-copy p { font-size: .78rem; }
    .access-brand-copy .access-brand-note { max-width: 165px; margin-top: 23px; font-size: .8rem; }
    .access-visual { right: 2%; width: 43%; height: 220px; }
    .access-mascot { max-height: 244px; }
    .access-panel { min-height: 0; padding: 18px 20px 24px; }
    .access-theme-toggle { width: 44px; height: 44px; }
    .access-form-wrap { margin: 22px auto 30px; }
    .access-form-heading { margin-bottom: 28px; }
    .access-form-eyebrow { margin-bottom: 17px; padding-bottom: 9px; font-size: .94rem; }
    .access-form-heading h2 { font-size: 2rem; }
    .access-form-heading p { margin-top: 10px; font-size: .9rem; }
    .access-input-wrap { min-height: 52px; grid-template-columns: 46px minmax(0, 1fr) auto; }
    .access-input-wrap input { height: 50px; }
    .access-username-mascot { width: 20px; height: 20px; }
    .access-submit { min-height: 54px; grid-template-columns: 52px minmax(0, 1fr) 48px; }
}

@media (max-width: 340px) {
    .access-brand { min-height: 238px; padding-inline: 16px; }
    .access-brand-copy h1 { font-size: 1.42rem; }
    .access-brand-copy .access-brand-note { display: none; }
    .access-visual { width: 44%; height: 204px; }
    .access-mascot { max-height: 222px; }
    .access-panel { padding-inline: 16px; }
    .access-form-heading h2 { font-size: 1.78rem; }
}

@media (prefers-reduced-motion: reduce) {
    .access-theme-toggle,
    .access-input-wrap,
    .access-submit,
    .access-submit-arrow { transition: none; }
}
