/* =========================================================
   AUTH / LOGIN — branded animated first impression
   Background source: public/assets/images/auth/login-background.*
   Newest supported file wins (jpg/jpeg/png/webp/gif/bmp/avif/svg).
   ========================================================= */
body.auth-page {
    min-height: 100vh;
    margin: 0;
    display: block;
    padding: 0;
    overflow: hidden;
    background: color-mix(in srgb, var(--brand-primary) 28%, #061a2b);
}

.auth-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(circle at 14% 14%, rgba(var(--brand-primary-rgb), .34), transparent 30rem),
        radial-gradient(circle at 88% 84%, rgba(var(--brand-secondary-rgb), .26), transparent 28rem),
        linear-gradient(135deg, color-mix(in srgb,var(--brand-primary) 48%,#061a2b), #071a2c 72%);
}

.auth-scene-image {
    position: absolute;
    inset: -7%;
    width: 114%;
    height: 114%;
    object-fit: cover;
    object-position: center;
    opacity: .26;
    filter: saturate(1.12) contrast(1.04) blur(.2px);
    transform-origin: center;
    animation: authBackgroundDrift 22s ease-in-out infinite alternate;
}

.auth-scene-gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, rgba(5,28,48,.90) 0%, rgba(7,38,66,.72) 42%, rgba(12,49,82,.45) 64%, rgba(5,28,48,.74) 100%),
        radial-gradient(circle at 78% 20%, rgba(var(--brand-secondary-rgb), .18), transparent 24rem),
        radial-gradient(circle at 12% 86%, rgba(var(--brand-primary-rgb), .28), transparent 26rem);
    backdrop-filter: blur(1px);
}

.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    opacity: .72;
    animation: authOrbFloat 9s ease-in-out infinite;
}
.auth-orb-one { width: 150px; height: 150px; left: 7%; top: 8%; background: rgba(var(--brand-primary-rgb), .20); box-shadow: 0 0 70px rgba(var(--brand-primary-rgb), .25); }
.auth-orb-two { width: 94px; height: 94px; right: 9%; top: 12%; background: rgba(var(--brand-secondary-rgb), .24); box-shadow: 0 0 60px rgba(var(--brand-secondary-rgb), .24); animation-delay: -3s; }
.auth-orb-three { width: 120px; height: 120px; right: 25%; bottom: 5%; background: rgba(var(--brand-primary-rgb), .15); box-shadow: 0 0 70px rgba(var(--brand-primary-rgb), .20); animation-delay: -5.5s; }

.login-stage {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.auth-page .login-shell {
    width: min(1120px, 100%);
    min-height: min(690px, calc(100vh - 64px));
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 30px;
    background: rgba(255,255,255,.08);
    box-shadow: 0 38px 110px rgba(0,0,0,.34);
    backdrop-filter: blur(20px);
}

.auth-page .brand-panel {
    position: relative;
    min-height: 100%;
    padding: 50px;
    color: #fff;
    isolation: isolate;
    background:
        radial-gradient(circle at 16% 8%, rgba(var(--brand-secondary-rgb), .17), transparent 22rem),
        linear-gradient(145deg, rgba(6,35,59,.82), rgba(var(--brand-primary-rgb), .54));
}

.auth-page .brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 90%);
}

.brand-glass-line {
    position: absolute;
    top: 0;
    left: 12%;
    width: 56%;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--brand-secondary), var(--brand-primary), transparent);
    box-shadow: 0 0 30px rgba(var(--brand-secondary-rgb), .38);
}

.auth-page .brand-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 38px;
}

.auth-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    width: fit-content;
    padding: 9px 14px 9px 9px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 18px;
    background: rgba(255,255,255,.10);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
    backdrop-filter: blur(12px);
}

.auth-page .logo-mark {
    width: 68px;
    height: 68px;
    min-width: 68px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.76);
    background: #fff;
    box-shadow: 0 18px 42px rgba(0,0,0,.18), 0 0 0 7px rgba(255,255,255,.06);
    font-size: 1.6rem;
    color: var(--brand-primary);
}
.auth-page .logo-mark img { width: 58px; height: 58px; object-fit: contain; }
.auth-brand-meta { min-width: 0; }
.auth-brand-meta small { display: block; margin-bottom: 2px; color: rgba(255,255,255,.56); font-size: .63rem; font-weight: 800; letter-spacing: .14em; }
.auth-brand-meta strong { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-size: .95rem; }

.auth-page .brand-title {
    max-width: 600px;
    color: #fff;
    font-size: clamp(2.35rem, 4.5vw, 4.15rem);
    line-height: .98;
    font-weight: 900;
    letter-spacing: -.065em;
    text-wrap: balance;
    text-shadow: 0 12px 34px rgba(0,0,0,.18);
}
.auth-page .brand-title::after {
    content: "";
    display: block;
    width: 86px;
    height: 5px;
    margin-top: 20px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
    box-shadow: 0 0 22px rgba(var(--brand-secondary-rgb), .35);
}

.auth-page .brand-subtitle { max-width: 520px; color: rgba(255,255,255,.72); font-size: 1rem; line-height: 1.72; }

.auth-feature-list { display: flex; flex-wrap: wrap; gap: 9px; max-width: 540px; }
.auth-feature-list span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.84);
    font-size: .74rem;
    font-weight: 650;
}
.auth-feature-list i { color: color-mix(in srgb,var(--brand-secondary) 78%,#fff); }

.auth-brand-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: rgba(255,255,255,.55); font-size: .72rem; }
.auth-brand-footer span { display: inline-flex; align-items: center; gap: 6px; }

.auth-page .form-panel {
    position: relative;
    display: flex;
    align-items: center;
    padding: 54px 48px;
    background: rgba(255,255,255,.965);
}
.auth-page .form-panel::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 1px;
    background: linear-gradient(transparent, rgba(var(--brand-primary-rgb),.20), rgba(var(--brand-secondary-rgb),.18), transparent);
}
.auth-page .form-inner { width: 100%; max-width: 410px; margin: auto; }
.form-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--brand-primary); font-size: .68rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.form-kicker span { width: 26px; height: 2px; border-radius: 999px; background: linear-gradient(90deg,var(--brand-primary),var(--brand-secondary)); }
.auth-page .form-title { color: #123e63; font-size: 2rem; font-weight: 900; letter-spacing: -.045em; }
.auth-page .small-muted { color: var(--app-text-soft); }
.auth-form { margin-top: 6px; }

.auth-input-group {
    overflow: hidden;
    border: 1px solid var(--app-border-strong);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15,23,42,.025);
    transition: border-color var(--app-transition), box-shadow var(--app-transition), transform var(--app-transition);
}
.auth-input-group:focus-within { border-color: color-mix(in srgb,var(--brand-primary) 48%,#fff); box-shadow: 0 0 0 4px rgba(var(--brand-primary-rgb),.08), 0 10px 24px rgba(15,23,42,.045); transform: translateY(-1px); }
.auth-page .auth-input-group .form-control,
.auth-page .auth-input-group .input-group-text,
.auth-page .auth-input-group .password-toggle { min-height: 54px; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.auth-page .auth-input-group .input-group-text { width: 52px; justify-content: center; background: color-mix(in srgb,var(--brand-primary) 5%,#fff); color: var(--brand-primary); font-size: 1rem; }
.auth-page .auth-input-group .form-control { background: #fff; color: #123e63; font-size: .92rem; }
.auth-page .auth-input-group .form-control:focus { box-shadow: none; }
.auth-page .password-toggle { min-width: 52px; background: #fff; color: #637068; }
.auth-page .password-toggle:hover { color: var(--brand-primary); transform: none; }
.auth-secure-note { display: inline-flex; align-items: center; gap: 5px; color: #7a867e; font-size: .66rem; font-weight: 650; }
.auth-secure-note i { color: var(--brand-primary); }

.auth-page .btn-login {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: 20px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand-secondary), color-mix(in srgb,var(--brand-secondary) 88%,#fff) 52%, color-mix(in srgb,var(--brand-secondary) 84%,#8a5900));
    color: #102a43;
    font-weight: 900;
    box-shadow: 0 15px 30px rgba(var(--brand-secondary-rgb),.24), 0 5px 16px rgba(var(--brand-primary-rgb),.08);
}
.auth-page .btn-login:hover { color: #102a43; box-shadow: 0 18px 36px rgba(var(--brand-secondary-rgb),.30), 0 8px 20px rgba(var(--brand-primary-rgb),.10); transform: translateY(-2px); }
.auth-page .btn-login i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.16); }

.auth-alert { display: flex; align-items: flex-start; gap: 9px; border: 0; font-size: .82rem; }
.auth-help-card { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--app-border); border-radius: 14px; background: #f7faff; color: #667b8f; font-size: .74rem; }
.auth-help-card strong { display: block; margin-bottom: 1px; color: #234663; font-size: .76rem; }
.auth-help-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--app-primary-soft); color: var(--brand-primary); font-size: 1rem; }
.auth-powered { color: #91a2b3; font-size: .66rem; text-align: center; letter-spacing: .045em; }

@keyframes authBackgroundDrift {
    0% { transform: scale(1.03) translate3d(-1.3%, -1%, 0); }
    50% { transform: scale(1.09) translate3d(1.2%, .6%, 0); }
    100% { transform: scale(1.05) translate3d(.2%, 1.4%, 0); }
}
@keyframes authOrbFloat {
    0%,100% { transform: translate3d(0,0,0) scale(1); }
    50% { transform: translate3d(16px,-18px,0) scale(1.08); }
}

@media (max-width: 900px) {
    body.auth-page { overflow: auto; }
    .login-stage { min-height: 100vh; padding: 18px; }
    .auth-page .login-shell { min-height: auto; grid-template-columns: 1fr; border-radius: 24px; }
    .auth-page .brand-panel { min-height: 330px; padding: 32px; }
    .auth-page .brand-content { gap: 26px; }
    .auth-page .brand-title { font-size: clamp(2rem, 8vw, 3rem); }
    .auth-feature-list { display: none; }
    .auth-page .form-panel { padding: 38px 28px; }
}

@media (max-width: 560px) {
    .login-stage { padding: 10px; align-items: start; }
    .auth-page .login-shell { border-radius: 20px; }
    .auth-page .brand-panel { min-height: 250px; padding: 24px; }
    .auth-page .logo-mark { width: 58px; height: 58px; min-width: 58px; border-radius: 15px; }
    .auth-page .logo-mark img { width: 49px; height: 49px; }
    .auth-brand-meta small { display: none; }
    .auth-page .brand-title { font-size: 2rem; }
    .auth-page .brand-subtitle { font-size: .84rem; margin-bottom: 0 !important; }
    .auth-brand-footer { display: none; }
    .auth-page .form-panel { padding: 32px 20px; }
    .auth-page .form-title { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-scene-image,
    .auth-orb { animation: none !important; }
}
