/* ============================================================
   Auth pages (login, signup) — extends admin.css design system
   ============================================================ */

.auth-body {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

/* Subtle radial glow from top */
.auth-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(224, 113, 27, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

/* ============================================================
   CARD
   ============================================================ */

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 40px 36px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    position: relative;
    animation: authFadeUp 0.4s ease both;
}

/* Accent line along the top edge */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 16px 16px 0 0;
}

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

.auth-heading {
    font-family: 'Young Serif', serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--text);
    text-align: center;
    margin-bottom: 32px;
}

/* ============================================================
   FORM FIELDS
   ============================================================ */

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 7px;
}

.field input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9375rem;
    padding: 11px 13px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
}

.input-reveal {
    position: relative;
}

.input-reveal input {
    padding-right: 40px;
}

.reveal-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    padding: 4px;
    line-height: 1;
    transition: color 0.15s;
}

.reveal-btn:hover { color: var(--text); }

.field input::placeholder {
    color: var(--muted);
    opacity: 0.5;
}

.field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.field input.error {
    border-color: var(--danger);
}

.error-msg {
    font-size: 0.78rem;
    color: var(--danger);
    margin-top: 5px;
    display: none;
}

.error-msg.visible {
    display: block;
}

/* ============================================================
   SUBMIT BUTTON
   ============================================================ */

.btn-login {
    width: 100%;
    margin-top: 24px;
    padding: 13px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
}

.btn-login:hover  { opacity: 0.88; }
.btn-login:active { transform: scale(0.99); }
.btn-login.loading { pointer-events: none; opacity: 0.55; }

/* ============================================================
   DIVIDER & FOOTER LINK
   ============================================================ */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.g_id_signin {
    display: flex;
    justify-content: center;
    min-height: 44px;
}

.auth-switch {
    text-align: center;
    margin-top: 22px;
    font-size: 0.85rem;
    color: var(--muted);
}

.auth-switch a,
.auth-nav-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.15s;
}

.auth-switch a:hover,
.auth-nav-link:hover { opacity: 0.75; }

/* btn-login used on <a> tags */
a.btn-login {
    display: block;
    text-align: center;
    text-decoration: none;
}

/* ============================================================
   PAGE TRANSITION LOADING OVERLAY
   ============================================================ */

.auth-loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.auth-loading-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.auth-loading-overlay i {
    font-size: 2rem;
    color: var(--accent);
}

/* ============================================================
   GLOBAL ERROR BANNER
   ============================================================ */

.global-error {
    background: rgba(192, 57, 43, 0.08);
    border: 1px solid rgba(192, 57, 43, 0.25);
    border-radius: 8px;
    color: var(--danger);
    font-size: 0.85rem;
    padding: 10px 14px;
    margin-bottom: 18px;
    display: none;
}

.global-error.visible {
    display: block;
}
