/* Shared login and registration presentation. Authentication behavior stays in the existing forms. */
body.auth-page {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    display: grid;
    place-items: center;
    padding: clamp(12px, 3vw, 36px);
    color: #edf7ff;
    background: radial-gradient(ellipse at 80% 18%, #1763a7 0, #0b3264 42%, #061a38 100%);
    font-family: 'Kanit', 'Segoe UI', sans-serif;
}

.auth-layout, .auth-layout * { box-sizing: border-box; }
.auth-layout {
    display: grid;
    grid-template-areas: "panel hero";
    grid-template-columns: minmax(340px, .78fr) minmax(0, 1.22fr);
    width: min(1180px, 100%);
    min-height: min(720px, calc(100svh - 48px));
    overflow: hidden;
    border: 1px solid rgba(128, 220, 255, .32);
    border-radius: 24px;
    background: #071a32;
    box-shadow: 0 24px 70px rgba(0, 8, 27, .42);
}

.auth-panel {
    grid-area: panel;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: clamp(26px, 4vw, 52px);
    background: linear-gradient(160deg, #0b2b50, #071b36 72%);
}
.auth-panel-heading { margin-bottom: 26px; text-align: left; }
.auth-mini-brand { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 32px; color: #c8f5ff; font-size: .86rem; font-weight: 900; letter-spacing: .11em; text-decoration: none; }
.auth-mini-brand span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(145deg,#66e3dc,#1ba4d2); color: #052b54; font-size: 1rem; }
.auth-panel-heading h2 { margin: 0; color: #f3faff; font-size: clamp(1.65rem, 3vw, 2rem); line-height: 1.25; }
.auth-panel-heading p { margin: 7px 0 0; color: #a9c5df; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 22px; padding: 5px; border: 1px solid rgba(143, 208, 239, .16); border-radius: 12px; background: rgba(2, 13, 29, .55); }
.auth-page .auth-tabs .auth-tab { display:flex; align-items:center; justify-content:center; width:100%; min-width:0; min-height:46px; padding:8px 5px; border:0; border-radius:8px; background:transparent; color:#a9c5df; font:inherit; font-size:clamp(.78rem,1.05vw,.92rem); font-weight:700; line-height:1.2; white-space:nowrap; cursor:pointer; }
.auth-page .auth-tabs .auth-tab.is-active { background: linear-gradient(135deg,#167fc2,#1660a4); color: #fff; box-shadow: inset 0 1px rgba(255,255,255,.2); }
.auth-form-panel[hidden] { display: none !important; }
.error-banner { display: none; align-items: center; justify-content: flex-start; gap: 8px; margin: 0 0 16px; padding: 11px 13px; border: 1px solid rgba(255,126,126,.45); border-radius: 10px; background: rgba(142,35,52,.25); color: #ffd6dc; font-size: .9rem; line-height: 1.45; text-align: left; }
.auth-form { display: grid; gap: 17px; }
.auth-field { display: grid; gap: 7px; color: #d9eafb; font-size: .9rem; font-weight: 700; text-align: left; }
.auth-field > span { padding-left: 2px; }
.auth-page .auth-field input {
    width: 100%;
    min-height: 51px;
    padding: 12px 14px;
    border: 1px solid rgba(113, 189, 229, .45) !important;
    border-radius: 9px;
    outline: none;
    background: #e4f2ff !important;
    color: #102b49 !important;
    font: inherit;
    font-size: 1rem;
    box-shadow: inset 0 1px 2px rgba(5, 34, 67, .08);
    transition: border-color .16s ease, box-shadow .16s ease;
}
.auth-page .auth-field input::placeholder { color: #6c849e !important; }
.auth-page .auth-field input:focus { border-color: #58d4ed !important; box-shadow: 0 0 0 3px rgba(57, 198, 232, .2); }
.auth-page .auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    margin-top: 4px;
    padding: 12px 18px;
    border: 1px solid rgba(185, 255, 232, .72) !important;
    border-radius: 10px;
    background: linear-gradient(100deg,#55d69d,#17bdb5) !important;
    color: #062a44 !important;
    font: inherit;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 7px 18px rgba(10, 191, 173, .18) !important;
    transition: transform .16s ease, filter .16s ease;
}
.auth-page .auth-submit:hover { transform: translateY(-1px); filter: brightness(1.06); }
.auth-page .auth-submit:active { transform: translateY(0); }
.auth-submit span { font-size: 1.2rem; }
.auth-switch-copy { margin: 21px 0 0; color: #a8bfd6; font-size: .9rem; text-align: center; }
.auth-page .auth-switch-copy button { padding: 0; border: 0; background: none; color: #5ce0d9; font: inherit; font-weight: 800; cursor: pointer; }
.auth-page .auth-switch-copy button:hover { color: #a0fff6; text-decoration: underline; }
.auth-panel-footer { margin-top: 35px; color: #748fa9; font-size: .78rem; text-align: center; }
.auth-panel-footer span { padding: 0 5px; color: #38c6d8; }

.auth-hero {
    position: relative;
    grid-area: hero;
    display: flex;
    align-items: flex-end;
    min-width: 0;
    padding: clamp(30px, 5vw, 68px);
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(2, 31, 76, .02) 20%, rgba(3, 27, 64, .74) 100%),
        linear-gradient(90deg, rgba(4, 56, 117, .18), rgba(3, 37, 86, .02)),
        var(--auth-hero-background, url('/images/ui/pack-page-background.webp')) center 48% / cover no-repeat;
}
.auth-hero::before { position: absolute; inset: 0; border-left: 1px solid rgba(184,236,255,.16); content: ''; pointer-events: none; }
.auth-hero-content { position: relative; z-index: 1; max-width: 510px; text-shadow: 0 2px 16px rgba(0, 21, 57, .45); }
.auth-brand-mark { display: grid; place-items: center; width: 55px; height: 55px; margin-bottom: 23px; border: 1px solid rgba(211,251,255,.75); border-radius: 17px; background: rgba(8,89,157,.42); color: #b6fbff; font-size: 1.8rem; box-shadow: 0 8px 20px rgba(0,28,74,.18); }
.auth-eyebrow { margin: 0 0 12px; color: #b5fff0; font-size: .78rem; font-weight: 900; letter-spacing: .16em; }
.auth-hero h1 { margin: 0; color: #fff; font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 900; line-height: 1.18; letter-spacing: -.025em; }
.auth-hero h1 span { color: #a7fff0; }
.auth-hero-copy { max-width: 430px; margin: 16px 0 23px; color: #e3f4ff; font-size: 1rem; line-height: 1.75; }
.auth-hero-badge { display: inline-flex; align-items: center; gap: 9px; padding: 9px 13px; border: 1px solid rgba(220,248,255,.3); border-radius: 999px; background: rgba(5,37,80,.32); color: #e8fbff; font-size: .83rem; }
.auth-hero-badge span { width: 8px; height: 8px; border-radius: 50%; background: #55e2be; box-shadow: 0 0 10px rgba(85,226,190,.8); }
.auth-hero-caption { position: absolute; top: 24px; right: 28px; color: rgba(229,249,255,.78); font-size: .68rem; font-weight: 800; letter-spacing: .18em; }

@media (max-width: 760px) {
    body.auth-page { display: block; padding: 12px; }
    .auth-layout { grid-template-areas: "panel" "hero"; grid-template-columns: minmax(0,1fr); min-height: 0; width: min(520px,100%); margin: 0 auto; border-radius: 18px; }
    .auth-panel { padding: 25px clamp(18px,6vw,32px) 20px; }
    .auth-mini-brand { margin-bottom: 22px; }
    .auth-panel-heading { margin-bottom: 19px; }
    .auth-tabs { margin-bottom: 18px; }
    .auth-form { gap: 13px; }
    .auth-panel-footer { margin-top: 24px; }
    .auth-hero { min-height: 240px; padding: 27px 23px; background-position: center 43%; }
    .auth-hero::before { border-top: 1px solid rgba(184,236,255,.16); border-left: 0; }
    .auth-brand-mark { width: 42px; height: 42px; margin-bottom: 12px; border-radius: 13px; font-size: 1.4rem; }
    .auth-eyebrow { margin-bottom: 7px; font-size: .68rem; }
    .auth-hero h1 { font-size: clamp(1.7rem,8vw,2.3rem); }
    .auth-hero-copy { margin: 9px 0 0; font-size: .88rem; }
    .auth-hero-badge, .auth-hero-caption { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page *, .auth-page *::before, .auth-page *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
