/* =====================================================================
   HRIS - LGU MABINAY  |  Authentication screens
   Modern split layout, animated aurora background, glass auth card.
   ===================================================================== */

:root {
    --brand:      #EF9017;
    --brand-600:  #D97C0B;
    --brand-700:  #B26205;
    --accent:     #1E7A45;
    --accent-600: #17663A;
    --accent-700: #10502C;
    --ink:        #0F172A;
    --muted:      #64748B;
    --line:       #E5E7EB;
    --radius:     16px;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
}

body.auth-body {
    font-family: "Inter", "Source Sans Pro", -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background: #0B1A12;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ================================================================
   Animated background
   ================================================================ */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(1200px 600px at 15% 15%, #1B6B41 0%, transparent 60%),
        radial-gradient(900px 700px at 85% 25%, #14532D 0%, transparent 55%),
        linear-gradient(140deg, #0C2418 0%, #123021 45%, #0B1A12 100%);
}

/* Floating colour blobs */
.auth-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .55;
    will-change: transform;
}
.auth-blob--1 {
    width: 520px; height: 520px;
    top: -140px; left: -120px;
    background: radial-gradient(circle at 30% 30%, #EF9017, transparent 70%);
    animation: floatA 18s ease-in-out infinite;
}
.auth-blob--2 {
    width: 460px; height: 460px;
    bottom: -160px; left: 22%;
    background: radial-gradient(circle at 50% 50%, #2FA35F, transparent 70%);
    animation: floatB 22s ease-in-out infinite;
}
.auth-blob--3 {
    width: 400px; height: 400px;
    top: 18%; right: -100px;
    background: radial-gradient(circle at 50% 50%, #FBBF24, transparent 70%);
    opacity: .35;
    animation: floatC 26s ease-in-out infinite;
}

@keyframes floatA {
    0%,100% { transform: translate(0,0) scale(1); }
    33%     { transform: translate(60px, 70px) scale(1.12); }
    66%     { transform: translate(-30px, 40px) scale(.94); }
}
@keyframes floatB {
    0%,100% { transform: translate(0,0) scale(1); }
    40%     { transform: translate(-70px,-50px) scale(1.08); }
    75%     { transform: translate(45px,-25px) scale(.96); }
}
@keyframes floatC {
    0%,100% { transform: translate(0,0) scale(1); }
    50%     { transform: translate(-55px, 80px) scale(1.15); }
}

/* Slow-drifting grid */
.auth-grid {
    position: absolute;
    inset: -50%;
    background-image:
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at 40% 50%, #000 0%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse at 40% 50%, #000 0%, transparent 72%);
    animation: gridDrift 40s linear infinite;
}
@keyframes gridDrift {
    from { transform: translate3d(0,0,0); }
    to   { transform: translate3d(56px, 56px, 0); }
}

/* Rising particles */
.auth-spark {
    position: absolute;
    bottom: -12px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255, 203, 105, .75);
    box-shadow: 0 0 12px rgba(239, 144, 23, .9);
    animation: rise linear infinite;
}
@keyframes rise {
    0%   { transform: translateY(0) scale(.6); opacity: 0; }
    12%  { opacity: .9; }
    85%  { opacity: .5; }
    100% { transform: translateY(-102vh) scale(1.15); opacity: 0; }
}

/* Soft vignette so the card always reads */
.auth-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 35%, rgba(3, 12, 8, .55) 100%);
}

@media (prefers-reduced-motion: reduce) {
    .auth-blob, .auth-grid, .auth-spark { animation: none !important; }
    .auth-spark { display: none; }
}

/* ================================================================
   Layout
   ================================================================ */
.auth-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    width: 100%;
    max-width: 1140px;          /* keeps the panes together on wide screens */
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 440px;
    align-items: center;
    gap: clamp(2rem, 5vw, 4.5rem);
    padding: 2rem clamp(1.5rem, 4vw, 3rem);
    overflow-y: auto;
}

/* ---------------------------------------------------------- brand pane */
.auth-hero { color: #fff; max-width: 540px; animation: fadeUp .8s cubic-bezier(.16,1,.3,1) both; }

.auth-hero__seal {
    display: block;
    width: 108px;
    height: 108px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255,255,255,.94);
    padding: 6px;
    box-shadow: 0 18px 45px -12px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.25);
    animation: sealFloat 6s ease-in-out infinite;
}
@keyframes sealFloat {
    0%,100% { transform: translateY(0); }
    50%     { transform: translateY(-9px); }
}

.auth-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-top: 1.6rem;
    padding: .3rem .75rem;
    border-radius: 999px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(6px);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #FCD9A0;
}

.auth-hero__title {
    margin: 1.1rem 0 0;
    font-size: clamp(2.1rem, 4.2vw, 3.25rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -.03em;
}
.auth-hero__title span {
    background: linear-gradient(100deg, #FBBF24, #EF9017 55%, #FDE68A);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-hero__sub {
    margin-top: 1rem;
    max-width: 44ch;
    font-size: 1rem;
    line-height: 1.65;
    color: rgba(255,255,255,.72);
}

.auth-hero__points {
    list-style: none;
    margin: 1.9rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.auth-hero__points li {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .8rem;
    border-radius: 10px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    font-size: .8rem;
    color: rgba(255,255,255,.85);
}
.auth-hero__points i { color: #6EE7A8; font-size: .78rem; }

/* Inline SVG icons — no webfont, so they can never fail to load */
.ico {
    width: 1em;
    height: 1em;
    fill: currentColor;
    flex: none;
    vertical-align: -.125em;
}
.auth-hero__eyebrow .ico { color: #FCD9A0; }
.auth-hero__points .ico { color: #6EE7A8; width: .85em; height: .85em; }

/* ----------------------------------------------------------- auth card */
.auth-card {
    justify-self: stretch;
    width: 100%;
    max-width: 440px;
    background: rgba(255,255,255,.97);
    border: 1px solid rgba(255,255,255,.6);
    border-radius: 22px;
    padding: 2.4rem 2.1rem;
    box-shadow: 0 40px 80px -24px rgba(0,0,0,.55), 0 0 0 1px rgba(15,23,42,.04);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    animation: fadeUp .9s cubic-bezier(.16,1,.3,1) .12s both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-card__logo {
    display: none;
    width: 64px;
    height: 64px;
    margin: 0 auto .9rem;
    object-fit: contain;
}

.auth-card__title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 750;
    letter-spacing: -.02em;
    text-align: center;
    color: var(--ink);
}
.auth-card__desc {
    margin: .5rem 0 1.7rem;
    text-align: center;
    font-size: .875rem;
    line-height: 1.55;
    color: var(--muted);
}

/* Google button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    width: 100%;
    padding: .8rem 1rem;
    border: 1px solid #DADCE0;
    border-radius: 12px;
    background: #fff;
    color: #1F2937;
    font-size: .93rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15,23,42,.06);
    transition: box-shadow .18s ease, transform .12s ease, border-color .18s ease, background-color .18s ease;
}
.btn-google:hover {
    background: #FCFCFD;
    border-color: #C6C9CE;
    box-shadow: 0 10px 24px -8px rgba(15,23,42,.22);
    transform: translateY(-1px);
    color: #111827;
    text-decoration: none;
}
.btn-google:active { transform: translateY(0); }
.btn-google svg { width: 20px; height: 20px; flex: none; }
.btn-google .spinner {
    width: 18px; height: 18px;
    border: 2px solid #E5E7EB;
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.5rem 0;
    color: #94A3B8;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* Fields */
.auth-field { margin-bottom: 1rem; }
.auth-field label {
    display: block;
    margin-bottom: .35rem;
    font-size: .8rem;
    font-weight: 600;
    color: #334155;
}
.auth-input-wrap { position: relative; }
.auth-input-wrap > i,
.auth-input-wrap > .ico {
    position: absolute;
    top: 50%;
    left: .85rem;
    transform: translateY(-50%);
    color: #9AA5B4;
    font-size: .85rem;
    width: .95rem;
    height: .95rem;
    pointer-events: none;
}
.auth-input {
    width: 100%;
    height: 44px;
    padding: 0 2.6rem 0 2.4rem;
    border: 1px solid #D5D9E0;
    border-radius: 11px;
    background: #fff;
    font-size: .9rem;
    color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-input::placeholder { color: #9AA5B4; }
.auth-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(239,144,23,.2);
}
.auth-toggle {
    position: absolute;
    top: 50%;
    right: .8rem;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    color: #9AA5B4;
    cursor: pointer;
    font-size: .85rem;
    background: none;
    border: 0;
    padding: 0;
    line-height: 0;
}
.auth-toggle .ico { width: 1.05rem; height: 1.05rem; }
.auth-toggle:hover { color: var(--ink); }

.auth-error {
    display: block;
    margin-top: .3rem;
    font-size: .74rem;
    color: var(--danger, #DC2626);
}

.btn-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-700) 100%);
    color: #fff;
    font-size: .93rem;
    font-weight: 650;
    letter-spacing: .01em;
    cursor: pointer;
    box-shadow: 0 10px 24px -10px rgba(30,122,69,.75);
    transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
}
.btn-auth:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 16px 30px -12px rgba(30,122,69,.85);
}
.btn-auth:active { transform: translateY(0); }

/* Alerts */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    margin-bottom: 1.1rem;
    padding: .7rem .85rem;
    border-radius: 11px;
    font-size: .82rem;
    line-height: 1.45;
    animation: fadeUp .35s ease both;
}
.auth-alert--error   { background: #FEF2F2; border: 1px solid #FECACA; color: #B91C1C; }
.auth-alert--success { background: #ECFDF5; border: 1px solid #A7F3D0; color: #047857; }
.auth-alert i { margin-top: .12rem; }

.auth-card__foot {
    margin-top: 1.6rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: .76rem;
    line-height: 1.6;
    color: #94A3B8;
}
.auth-card__foot a { color: var(--accent-600); font-weight: 600; text-decoration: none; }
.auth-card__foot a:hover { text-decoration: underline; }

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 991.98px) {
    body.auth-body { overflow: auto; }
    .auth-shell {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
        padding: 2.5rem 1.25rem;
        justify-items: center;
    }
    .auth-hero { display: none; }
    .auth-card { max-width: 420px; padding: 2rem 1.5rem; }
    .auth-card__logo { display: block; }
}
