/* =====================================================================
 * SMART LOGIN — auth pages stylesheet
 * Author  : Smart Login upgrade for DES
 * Depends : Trezo theme (style.css), Inter font, Remix icons
 * Brand colors are injected by PHP as CSS variables:
 *   --primary-color, --secondary-color  (from abc_whitelabel)
 * ===================================================================== */

* { box-sizing: border-box; }

body.auth-body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background: linear-gradient(-45deg, #0f1024, #1b1f4b, #14295e, #0e1a3a);
    background-size: 400% 400%;
    animation: bgShift 18s ease infinite;
    overflow-x: hidden;
}
@keyframes bgShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ---------- page preloader ---------- */
.auth-preloader {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: center; justify-content: center;
    background: #0f1024;
    transition: opacity .4s ease, visibility .4s;
}
.auth-preloader.hide { opacity: 0; visibility: hidden; }
.auth-preloader .ring {
    width: 58px; height: 58px; border-radius: 50%;
    border: 4px solid rgba(255,255,255,.15);
    border-top-color: var(--primary-color);
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- form busy overlay (shown while an action posts) ---------- */
.busy-overlay {
    position: absolute; inset: 0; z-index: 20; display: none;
    align-items: center; justify-content: center; flex-direction: column; gap: 12px;
    background: rgba(255,255,255,.82); backdrop-filter: blur(3px);
    border-radius: 22px; color: #40506e; font-weight: 500;
}
.busy-overlay.show { display: flex; }
.busy-overlay .ring {
    width: 44px; height: 44px; border-radius: 50%;
    border: 4px solid #e2e6f0; border-top-color: var(--primary-color);
    animation: spin .9s linear infinite;
}

/* ---------- background decoration ---------- */
.orb { position: fixed; border-radius: 50%; filter: blur(90px); opacity: .45;
       pointer-events: none; z-index: 0; animation: float 14s ease-in-out infinite; }
.orb-1 { width: 480px; height: 480px; top: -140px; left: -120px; background: var(--primary-color); }
.orb-2 { width: 420px; height: 420px; bottom: -160px; right: -100px;
         background: var(--secondary-color); animation-delay: -5s; }
.orb-3 { width: 260px; height: 260px; top: 55%; left: 8%;
         background: #8a5cff; animation-delay: -9s; opacity: .3; }
@keyframes float { 0%,100% { transform: translateY(0) scale(1); }
                   50%     { transform: translateY(-45px) scale(1.06); } }

.bg-grid { position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%); }

/* ---------- layout ---------- */
.auth-wrapper { position: relative; z-index: 1; min-height: 100vh;
    display: flex; align-items: center; justify-content: center; padding: 32px 14px; }

.auth-card { position: relative; width: 100%; max-width: 1000px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,.35); border-radius: 22px;
    box-shadow: 0 30px 80px rgba(5,10,40,.55); overflow: hidden;
    animation: cardIn .55s cubic-bezier(.2,.9,.3,1.1) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(26px) scale(.98); }
                    to   { opacity: 1; transform: none; } }

.auth-side { position: relative; height: 100%; color: #fff; overflow: hidden;
    background: linear-gradient(150deg, var(--primary-color), var(--secondary-color)); }
.auth-side::after  { content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%;
    border: 60px solid rgba(255,255,255,.08); bottom: -140px; right: -120px; }
.auth-side::before { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%;
    background: rgba(255,255,255,.07); top: -70px; left: -60px; }
.feature-pill { display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.18);
    border-radius: 12px; padding: 11px 14px; font-size: 14px; }
.feature-pill i { font-size: 18px; }

/* ---------- controls ---------- */
.h-55 { height: 55px; }
.brand-logo { max-height: 52px; }
.form-control.h-55 { border-radius: 12px; border: 1px solid #e4e7ef;
    transition: border-color .2s, box-shadow .2s; }
.form-control.h-55:focus { border-color: var(--primary-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-color) 14%, transparent); }
.btn-primary { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none; border-radius: 12px; transition: transform .15s, box-shadow .15s; }
.btn-primary:hover { transform: translateY(-1px);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--primary-color) 40%, transparent); }
.btn-primary:disabled { opacity: .75; transform: none; }
.nav-pills .nav-link { border-radius: 10px; color: #5c6470; font-weight: 500; }
.nav-pills .nav-link.active { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); }

.qr-box { width: 216px; height: 216px; margin: 0 auto; background: #fff; padding: 8px;
    border: 1px solid #e7e9f0; border-radius: 14px; box-shadow: 0 6px 22px rgba(20,30,80,.08); }
.qr-box img { width: 100%; height: 100%; }
.divider-text { display: flex; align-items: center; gap: 12px; color: #8695aa; font-size: 13px; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: #e7e9f0; }
.device-row { border: 1px solid #e7e9f0; border-radius: 14px; background: #fff;
    transition: border-color .15s, box-shadow .15s; }
.device-row:hover { border-color: var(--primary-color); box-shadow: 0 4px 16px rgba(20,30,80,.07); }
.device-row .form-check-input { width: 1.3em; height: 1.3em; }
.otp-input { width: 52px; height: 55px; text-align: center; font-size: 22px;
    font-weight: 600; border-radius: 12px; }
.toggle-pass { cursor: pointer; position: absolute; right: 16px; top: 50%;
    transform: translateY(-50%); color: #8695aa; }

/* ---------- responsive (mobile / tablet) ---------- */
@media (max-width: 991.98px) {
    .auth-side-col { display: none !important; }
    .auth-card { max-width: 560px; }
}
@media (max-width: 575.98px) {
    .auth-wrapper { padding: 16px 10px; align-items: flex-start; padding-top: 28px; }
    .auth-card { border-radius: 16px; }
    .auth-card .card-body { padding: 22px 18px !important; }
    .brand-logo { max-height: 44px; }
    .otp-input { width: 44px; height: 50px; font-size: 19px; }
    .h-55 { height: 50px; }
    .orb { filter: blur(70px); }
    .qr-box { width: 190px; height: 190px; }
}
@media (prefers-reduced-motion: reduce) {
    body.auth-body, .orb, .auth-card, .auth-preloader .ring, .busy-overlay .ring { animation: none; }
}
