/* =====================================================================
   SIM PEKERTI — AUTH PAGES (login / reset / confirm)
   Split-screen layout built on theme.css (the UI bundle).
   ===================================================================== */

.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: var(--color-bg);
}

/* Single-column variant — no brand panel; used by the reset-password
   utility pages (the split brand panel is reserved for login). The form
   is wrapped in a self-contained card with a slim Undiksha footer. */
.auth-single { grid-template-columns: 1fr; }
.auth-single .auth-form-head { text-align: center; }
.auth-single .auth-form {
    max-width: 440px;
    padding: clamp(1.75rem, 4vw, 2.75rem);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

/* Slim copyright footer inside the card */
.auth-card-foot {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: .78rem;
    color: var(--color-text-muted);
}
/* Status cards are short — give the footer extra breathing room. */
.auth-state .auth-card-foot { margin-top: 1.75rem; }

/* ---------------------------------------------------------------------
   Brand panel (left)
   --------------------------------------------------------------------- */
.auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: clamp(2.5rem, 4vw, 4rem);
    color: #fff;
    background:
        radial-gradient(1100px 540px at 12% -10%, rgba(249, 148, 23, .22), transparent 60%),
        radial-gradient(900px 620px at 110% 120%, rgba(77, 99, 189, .42), transparent 55%),
        linear-gradient(155deg, var(--c-navy-700) 0%, var(--c-navy-900) 100%);
}

/* Decorative blurred orbs */
.auth-brand::before,
.auth-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(8px);
    opacity: .5;
    pointer-events: none;
}
.auth-brand::before {
    width: 320px; height: 320px;
    top: -90px; right: -70px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 183, 77, .55), transparent 70%);
}
.auth-brand::after {
    width: 260px; height: 260px;
    bottom: -60px; left: 8%;
    background: radial-gradient(circle at 50% 50%, rgba(125, 144, 214, .5), transparent 70%);
}

.auth-brand-logo {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: .85rem;
    position: relative;
    z-index: 1;
}
.auth-brand-logo img {
    width: 56px; height: 56px;
    padding: 6px;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}
.auth-brand-logo span {
    font-size: .92rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .82);
}

.auth-brand-headline {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 31rem;
}
.auth-brand-headline h1 {
    color: #fff;
    font-size: clamp(1.8rem, 2.8vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.02em;
    text-wrap: balance;
}
.auth-brand-headline h1 em {
    font-style: normal;
    color: var(--c-gold-400);
}
.auth-brand-headline p {
    margin-top: 1rem;
    font-size: 1.02rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .8);
}

.auth-brand-foot {
    position: relative;
    z-index: 1;
    font-size: .82rem;
    color: rgba(255, 255, 255, .6);
}

/* ---------------------------------------------------------------------
   Form panel (right)
   --------------------------------------------------------------------- */
.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.75rem, 4vw, 3.5rem);
}

.auth-form {
    width: 100%;
    max-width: 400px;
    animation: auth-rise .5s var(--ease) both;
}

@keyframes auth-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Compact logo shown above the form on small screens */
.auth-form-logo {
    display: none;
    margin: 0 auto 1.5rem;
    width: 64px; height: 64px;
}

.auth-form-head { margin-bottom: 1.75rem; }
.auth-form-head h2 {
    font-size: 1.6rem;
    font-weight: 800;
}
.auth-form-head p {
    margin-top: .4rem;
    color: var(--color-text-muted);
    font-size: .95rem;
}

.auth-row-between {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: -.2rem 0 1.25rem;
}
.auth-link {
    font-size: .85rem;
    font-weight: 600;
    color: var(--color-primary);
}
.auth-link:hover { text-decoration: underline; }

/* Captcha block */
.auth-captcha {
    display: flex;
    align-items: stretch;
    gap: .75rem;
    margin-bottom: 1.05rem;
}
.auth-captcha-img {
    flex: none;
    display: grid;
    place-items: center;
    padding: .25rem .5rem;
    background: var(--c-slate-100);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
}
.auth-captcha-img img { border-radius: 6px; }
.auth-captcha .ui-field { flex: 1; margin-bottom: 0; }

/* SSO button branding */
.ui-btn-sso {
    background: #fff;
    color: var(--c-navy-700);
    border: 1.5px solid var(--color-border);
}
.ui-btn-sso:hover {
    border-color: var(--c-navy-300);
    background: var(--c-navy-50);
    color: var(--c-navy-800);
}

.auth-foot {
    margin-top: 1.6rem;
    text-align: center;
    font-size: .82rem;
    color: var(--color-text-muted);
}

/* Hide the floating reCAPTCHA v3 badge; show inline branding instead
   (required by Google's terms when the badge is hidden). */
.grecaptcha-badge { visibility: hidden; }

.auth-legal {
    margin-top: 1rem;
    font-size: .73rem;
    line-height: 1.5;
    text-align: center;
    color: var(--c-slate-400);
}
.auth-legal a {
    color: var(--c-slate-500);
    text-decoration: underline;
}
.auth-legal a:hover { color: var(--c-navy-600); }

/* ---------------------------------------------------------------------
   Result / status state (email sent, reset success)
   --------------------------------------------------------------------- */
.auth-state { text-align: center; }
.auth-state-icon {
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    margin: 0 auto 1.5rem;
    font-size: 1.75rem;
    color: #fff;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--c-navy-500), var(--c-navy-800));
    box-shadow: 0 12px 24px rgba(27, 42, 107, .22);
}
.auth-state-icon.is-success {
    background: linear-gradient(135deg, #2bbf6a, #18934e);
    box-shadow: 0 12px 24px rgba(24, 147, 78, .25);
}
.auth-state h2 {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.01em;
}
.auth-state p {
    margin-top: .65rem;
    color: var(--color-text-muted);
    font-size: .95rem;
    line-height: 1.65;
}
.auth-state strong { color: var(--color-heading); }
.auth-state .ui-btn { margin-top: 1.7rem; }

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 920px) {
    .auth { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-panel { min-height: 100vh; padding: 2rem 1.25rem; }
    .auth-form-logo { display: block; }
    .auth-form-head { text-align: center; }
    .auth-form { max-width: 380px; }
}

@media (max-width: 420px) {
    .auth-captcha { flex-direction: column; }
    .auth-captcha-img { align-self: flex-start; }
}
