.layout-auth { display: block; background: #070910; }
.layout-auth .app-window { display: grid; place-items: center; background: #070910; box-shadow: none; border: 0; height: auto; min-height: 100vh; border-radius: 0; overflow: hidden; }
.auth-bg {
    position: fixed; inset: 0; z-index: 0; overflow: hidden;
    background: #070910 url("../images/auth/login-bg.jpg") center center / cover no-repeat;
}
.auth-bg img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: center center;
}
.auth-veil { display: none; }
.auth-frame {
    position: relative; z-index: 2;
    width: min(1240px, calc(100% - 28px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) min(420px, 100%) minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 28px 0;
}
.auth-side { position: relative; min-height: 520px; display: grid; place-items: center; }
.auth-marks { position: absolute; inset: 0; }
.auth-mark {
    position: absolute; width: 58px; height: 58px; border-radius: 50%;
    object-fit: cover; background: #10131f;
    box-shadow: 0 12px 26px rgba(0,0,0,.45), 0 0 0 3px rgba(255,255,255,.16);
    animation: authFloat 7s ease-in-out infinite alternate;
}
.auth-side .auth-mark:nth-child(1) { top: 0; left: 16%; width: 68px; height: 68px; }
.auth-side .auth-mark:nth-child(2) { top: 10%; right: 10%; animation-duration: 8.2s; }
.auth-side .auth-mark:nth-child(3) { top: 34%; left: 6%; width: 48px; height: 48px; animation-duration: 6s; }
.auth-side .auth-mark:nth-child(4) { top: 28%; right: 8%; width: 54px; height: 54px; animation-duration: 7.4s; }
.auth-side .auth-mark:nth-child(5) { bottom: 26%; left: 10%; animation-duration: 8.6s; }
.auth-side .auth-mark:nth-child(6) { bottom: 18%; right: 14%; width: 50px; height: 50px; animation-duration: 6.4s; }
.auth-side .auth-mark:nth-child(7) { bottom: 0; left: 24%; animation-duration: 9s; }
.auth-side .auth-mark:nth-child(8) { bottom: 4%; right: 22%; width: 44px; height: 44px; animation-duration: 5.6s; }
.auth-side .auth-mark:nth-child(odd) { animation-delay: -1.6s; }
.auth-side .auth-mark:nth-child(3n) { animation-delay: -3s; }
.auth-pitch {
    position: relative; z-index: 2; display: flex; flex-direction: column;
    font-size: clamp(28px, 3vw, 46px); line-height: .94; font-weight: 800;
    letter-spacing: -.045em; text-align: center; margin: 0; max-width: 280px;
    filter: drop-shadow(0 8px 18px rgba(0,0,0,.45));
}
.auth-pitch span {
    background-image: linear-gradient(105deg, #ffffff 0%, #ffffff 38%, #fff6c8 49%, #ffffff 60%, #ffffff 100%);
    background-size: 240% 100%;
    background-position: 120% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: heroShine 3.8s ease-in-out infinite;
}
.auth-pitch span.gold {
    background-image: linear-gradient(105deg, #c98412 0%, #f6c453 34%, #fff8dc 48%, #ffffff 50%, #fff8dc 52%, #f6c453 66%, #e39b16 100%);
    background-size: 240% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
@keyframes authFloat {
    from { transform: translate3d(0, -14px, 0); }
    to { transform: translate3d(0, 16px, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .auth-bg img { display: none; }
    .auth-mark, .auth-pitch span { animation: none; }
}
@media (max-width: 860px) {
    .auth-side { display: none; }
    .auth-frame { grid-template-columns: min(440px, 100%); width: min(440px, calc(100% - 24px)); }
}
.auth-shell { width: 100%; position: relative; z-index: 3; }
.auth-brand { margin-bottom: 14px; justify-content: center; color: #fff; }
body.layout-auth .auth-card {
    padding: 22px;
    background: rgba(8, 10, 20, .08);
    border: 1px solid rgba(255,255,255,.22);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    box-shadow: none;
}
body.layout-auth .auth-card h1,
body.layout-auth .auth-card p,
body.layout-auth .auth-card label { text-shadow: 0 1px 8px rgba(0,0,0,.75); }
body.layout-auth .ha-input,
body.layout-auth .field input { background: rgba(6, 8, 18, .4); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 16px; background: rgba(255,255,255,.04); border-radius: 12px; padding: 4px; }
.auth-tabs button { border: 0; background: transparent; color: #b7bdd4; border-radius: 9px; padding: 9px 8px; font-weight: 800; font-size: 14px; }
.auth-tabs button.on { background: linear-gradient(180deg, #ffb047, #ef6d00); color: #1a0d00; }
.auth-pane[hidden] { display: none !important; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin: 14px 0 4px; background: #fff; color: #1f1f1f; border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: 14px; }
.btn-google svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn-google:hover { color: #1f1f1f; background: #f4f5f7; }
.auth-or { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 14px 0; color: #8b93ad; font-size: 12px; font-weight: 700; }
.auth-or:before, .auth-or:after { content: ""; height: 1px; background: rgba(255,255,255,.12); }
.auth-card h1 { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.auth-card .alt { color: var(--muted); margin-top: 12px; }
.auth-card .alt a { color: #c4b5fd; font-weight: 700; }
.checks { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
