:root {
    --auth-navy: #092c4c;
    --auth-navy-deep: #061d34;
    --auth-blue: #174f7c;
    --auth-gold: #c99a3d;
    --auth-gold-soft: #f4e5be;
    --auth-ink: #182634;
    --auth-muted: #667586;
    --auth-line: #dce4ea;
    --auth-danger: #a82d35;
}

* { box-sizing: border-box; }

body.auth-page {
    margin: 0;
    min-width: 320px;
    background: #f3f6f8;
    color: var(--auth-ink);
    font-family: "Manrope", sans-serif;
}

.auth-shell { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(460px, .82fr); min-height: 100vh; }
.auth-visual { position: relative; display: flex; min-height: 100vh; overflow: hidden; padding: clamp(2rem, 4vw, 4.75rem); color: #fff; background: var(--auth-navy-deep) url("../images/auth/catholic-school-campus.png") center/cover no-repeat; }
.auth-visual-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,24,42,.08), rgba(4,24,42,.56) 70%, rgba(4,24,42,.77)), linear-gradient(90deg, rgba(4,24,42,.08), transparent 55%); }
.auth-brand, .auth-message, .auth-verse { position: relative; z-index: 1; }
.auth-brand { position: absolute; top: clamp(2rem, 4vw, 4rem); left: clamp(2rem, 4vw, 4.75rem); display: flex; align-items: center; gap: .9rem; }
.auth-brand img, .auth-mobile-brand img { width: 62px; height: 62px; border-radius: 15px; object-fit: cover; object-position: center; box-shadow: 0 10px 28px rgba(0,0,0,.22); }
.auth-brand div, .auth-mobile-brand div { display: grid; line-height: 1.05; }
.auth-brand span, .auth-mobile-brand span { font-size: .7rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.auth-brand strong, .auth-mobile-brand strong { margin-top: .3rem; font-family: "Playfair Display", serif; font-size: 1.4rem; }
.auth-message { align-self: flex-end; max-width: 680px; margin-bottom: 7.25rem; }
.auth-eyebrow { display: inline-flex; align-items: center; gap: .5rem; color: #f7dda0; font-size: .74rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.auth-eyebrow::before { content: ""; width: 30px; height: 2px; background: var(--auth-gold); }
.auth-message h1 { max-width: 650px; margin: 1.1rem 0 .9rem; font-family: "Playfair Display", serif; font-size: clamp(2.5rem, 4.4vw, 4.8rem); line-height: 1.04; letter-spacing: -.035em; text-shadow: 0 4px 28px rgba(0,0,0,.22); }
.auth-message p { max-width: 580px; margin: 0; color: rgba(255,255,255,.82); font-size: clamp(.95rem, 1.15vw, 1.12rem); line-height: 1.75; }
.auth-verse { position: absolute; right: clamp(2rem, 4vw, 4.75rem); bottom: clamp(2rem, 3vw, 3.25rem); left: clamp(2rem, 4vw, 4.75rem); display: flex; align-items: center; gap: .65rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.22); color: rgba(255,255,255,.78); font-family: "Playfair Display", serif; font-size: .93rem; }
.auth-verse > span { color: var(--auth-gold); }
.auth-verse small { margin-left: auto; color: #f7dda0; font-family: "Manrope", sans-serif; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.auth-panel { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: clamp(2rem, 5vw, 5rem); background: radial-gradient(circle at 100% 0, rgba(201,154,61,.10), transparent 30%), #f7f9fa; }
.auth-card { width: min(100%, 480px); }
.auth-mobile-brand { display: none; }
.auth-card-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 2rem; }
.auth-card-icon { display: grid; flex: 0 0 48px; place-items: center; width: 48px; height: 48px; border: 1px solid #ead9ae; border-radius: 15px; background: #fffaf0; color: #9b701f; font-size: 1.3rem; box-shadow: 0 7px 18px rgba(80,61,27,.08); }
.auth-card-header h2 { margin: 0; color: var(--auth-navy-deep); font-family: "Playfair Display", serif; font-size: clamp(1.8rem, 3vw, 2.35rem); line-height: 1.15; letter-spacing: -.02em; }
.auth-card-header p { margin: .45rem 0 0; color: var(--auth-muted); font-size: .9rem; line-height: 1.55; }
.auth-card-content { padding: 2rem; border: 1px solid rgba(208,219,227,.9); border-radius: 24px; background: rgba(255,255,255,.96); box-shadow: 0 24px 70px rgba(24,50,73,.10); }
.auth-card-content form > div + div { margin-top: 1.15rem; }
.auth-label { display: block; margin-bottom: .45rem; color: #314558; font-size: .77rem; font-weight: 800; letter-spacing: .025em; }
.auth-input { display: block; width: 100%; min-height: 50px; padding: .78rem .95rem; border: 1px solid #cad5de; border-radius: 12px; background: #fbfcfd; color: var(--auth-ink); font: 500 .93rem/1.2 "Manrope", sans-serif; box-shadow: inset 0 1px 2px rgba(7,31,52,.025); transition: border-color .2s, box-shadow .2s, background .2s; }
.auth-input:hover { border-color: #aebdca; }
.auth-input:focus { outline: none; border-color: var(--auth-blue); background: #fff; box-shadow: 0 0 0 4px rgba(23,79,124,.12); }
.auth-input:disabled { cursor: not-allowed; opacity: .65; }
.auth-primary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .78rem 1.25rem; border: 0; border-radius: 12px; background: linear-gradient(135deg, var(--auth-navy), var(--auth-blue)); color: #fff; font: 800 .76rem/1 "Manrope", sans-serif; letter-spacing: .07em; text-transform: uppercase; box-shadow: 0 10px 24px rgba(9,44,76,.2); cursor: pointer; transition: transform .2s, box-shadow .2s, filter .2s; }
.auth-primary-button:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 14px 28px rgba(9,44,76,.25); }
.auth-primary-button:focus-visible, .auth-link:focus-visible { outline: 3px solid rgba(201,154,61,.38); outline-offset: 3px; }
.auth-primary-button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.auth-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem !important; }
.auth-actions-end { justify-content: flex-end; }
.auth-primary-button.auth-button-wide { flex: 1; }
.auth-link { color: var(--auth-blue); font-size: .78rem; font-weight: 800; text-decoration: none; }
.auth-link:hover { color: var(--auth-navy-deep); text-decoration: underline; }
.auth-check { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; }
.auth-check input { width: 17px; height: 17px; border-radius: 5px; color: var(--auth-blue); }
.auth-check span { color: var(--auth-muted); font-size: .78rem; font-weight: 600; }
.auth-intro { margin: 0 0 1.4rem; color: var(--auth-muted); font-size: .86rem; line-height: 1.7; }
.auth-note { margin-top: 1.25rem; padding: .9rem 1rem; border: 1px solid #e7ddc4; border-radius: 12px; background: #fffbf2; color: #6f5a2d; font-size: .78rem; line-height: 1.55; }
.auth-card-content .text-red-600 { color: var(--auth-danger) !important; }
.auth-card-content .text-green-600 { color: #25704b !important; }
.auth-card-content ul { padding-left: 1.1rem; }
.auth-card-content > .mb-4 { padding: .85rem 1rem; border-radius: 12px; background: #fff3f3; font-size: .8rem; }
.auth-card-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.15rem .25rem 0; color: #8794a0; font-size: .68rem; }
.auth-secure { display: inline-flex; align-items: center; gap: .4rem; }
.auth-secure span { color: #3d9a69; font-size: .55rem; }

@media (max-width: 1050px) {
    .auth-shell { grid-template-columns: minmax(0, .9fr) minmax(430px, 1.1fr); }
    .auth-message h1 { font-size: clamp(2.35rem, 4.8vw, 3.5rem); }
    .auth-verse { align-items: flex-start; flex-wrap: wrap; }
    .auth-verse small { width: 100%; margin-left: 1.35rem; }
}

@media (max-width: 780px) {
    .auth-shell { display: block; min-height: 100svh; background: linear-gradient(rgba(4,29,52,.56), rgba(4,29,52,.74)), url("../images/auth/catholic-school-campus.png") center/cover fixed; }
    .auth-visual { display: none; }
    .auth-panel { min-height: 100svh; padding: 1.25rem; background: transparent; }
    .auth-card { max-width: 520px; }
    .auth-mobile-brand { display: flex; align-items: center; justify-content: center; gap: .75rem; margin: 0 auto 1.25rem; color: #fff; }
    .auth-mobile-brand img { width: 54px; height: 54px; border-radius: 14px; }
    .auth-mobile-brand strong { font-size: 1.2rem; }
    .auth-card-header { margin-bottom: 1rem; padding: 1.2rem 1.3rem; border-radius: 20px 20px 0 0; background: rgba(255,255,255,.96); }
    .auth-card-header + .auth-card-content { margin-top: -1rem; border-top: 1px solid #edf1f4; border-radius: 0 0 20px 20px; box-shadow: 0 22px 60px rgba(0,0,0,.2); }
    .auth-card-header h2 { font-size: 1.75rem; }
    .auth-card-icon { width: 42px; height: 42px; flex-basis: 42px; border-radius: 13px; }
    .auth-card-content { padding: 1.3rem; }
    .auth-card-footer { color: rgba(255,255,255,.72); padding-right: .5rem; padding-left: .5rem; }
}

@media (max-width: 430px) {
    .auth-panel { align-items: flex-start; padding: .9rem; }
    .auth-mobile-brand { margin-top: .25rem; margin-bottom: .9rem; }
    .auth-card-header { padding: 1rem; }
    .auth-card-header p { font-size: .8rem; }
    .auth-card-content { padding: 1.05rem; }
    .auth-actions { align-items: stretch; flex-direction: column-reverse; }
    .auth-actions .auth-primary-button { width: 100%; }
    .auth-actions-end { flex-direction: column; }
    .auth-link { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Tela de bloqueio */
.lock-screen-shell { position: relative; display: grid; min-height: 100svh; place-items: center; overflow: hidden; padding: 1.25rem; background: var(--auth-navy-deep) url("../images/auth/catholic-school-campus.png") center/cover no-repeat; }
.lock-screen-overlay { position: absolute; inset: 0; background: linear-gradient(155deg, rgba(4,24,42,.66), rgba(4,24,42,.78)), radial-gradient(circle at 50% 20%, rgba(201,154,61,.16), transparent 38%); backdrop-filter: blur(2px); }
.lock-screen-card { position: relative; z-index: 1; width: min(100%, 430px); padding: 2rem; border: 1px solid rgba(255,255,255,.7); border-radius: 26px; background: rgba(255,255,255,.96); text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.lock-screen-brand { display: flex; align-items: center; justify-content: center; gap: .55rem; margin-bottom: 1.5rem; color: var(--auth-navy); font: 800 .68rem/1 "Manrope", sans-serif; letter-spacing: .09em; text-transform: uppercase; }
.lock-screen-brand img { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; }
.lock-screen-avatar-wrap { position: relative; width: 104px; margin: 0 auto 1rem; }
.lock-screen-avatar { display: block; width: 104px; height: 104px; border: 4px solid #fff; border-radius: 50%; object-fit: cover; box-shadow: 0 12px 30px rgba(9,44,76,.2); }
.lock-screen-status { position: absolute; right: 4px; bottom: 7px; display: grid; width: 24px; height: 24px; place-items: center; border: 3px solid #fff; border-radius: 50%; background: #fff; color: var(--auth-gold); font-size: .85rem; }
.lock-screen-kicker { display: inline-flex; align-items: center; gap: .4rem; color: #8c681f; font-size: .66rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.lock-screen-kicker span { font-size: .48rem; }
.lock-screen-card h1 { margin: .45rem 0 .35rem; color: var(--auth-navy-deep); font-family: "Playfair Display", serif; font-size: clamp(1.75rem, 5vw, 2.25rem); line-height: 1.15; }
.lock-screen-card > p { max-width: 340px; margin: 0 auto 1.5rem; color: var(--auth-muted); font-size: .8rem; line-height: 1.6; }
.lock-screen-form { text-align: left; }
.lock-password-field { position: relative; }
.lock-password-field .auth-input { padding-right: 3rem; }
.lock-password-toggle { position: absolute; top: 50%; right: .55rem; display: grid; width: 36px; height: 36px; place-items: center; padding: 0; border: 0; border-radius: 9px; background: transparent; color: #71808e; cursor: pointer; transform: translateY(-50%); }
.lock-password-toggle:hover { background: #edf3f6; color: var(--auth-blue); }
.lock-screen-error { display: block; margin-top: .45rem; color: var(--auth-danger); font-size: .74rem; font-weight: 700; }
.lock-screen-submit { width: 100%; margin-top: 1rem; gap: .5rem; }
.lock-screen-logout { margin-top: 1rem; text-align: center; }
.lock-screen-logout button { padding: .35rem; border: 0; background: transparent; color: var(--auth-blue); font: 700 .72rem/1.2 "Manrope", sans-serif; cursor: pointer; }
.lock-screen-logout button:hover { color: var(--auth-navy-deep); text-decoration: underline; }

@media (max-width: 480px) {
    .lock-screen-shell { align-items: center; padding: .8rem; }
    .lock-screen-card { padding: 1.5rem 1.15rem; border-radius: 22px; }
    .lock-screen-brand { margin-bottom: 1.15rem; }
    .lock-screen-avatar-wrap, .lock-screen-avatar { width: 88px; height: 88px; }
}
