/* =====================================================
   ADRCB — Premium Auth Pages (Login / OTP / Reset)
   ===================================================== */

:root {
    --auth-primary: #14395b;
    --auth-primary-2: #1d5c8f;
    --auth-accent: #e8a33d;
    --auth-ink: #0d1f33;
    --auth-muted: #64748b;
    --auth-line: #e2e8f0;
    --auth-field-bg: #f8fafc;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body.auth-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    background: #f4f6fa;
}

/* ---------- Layout ---------- */
.auth-page {
    display: flex;
    min-height: 100vh;
}

/* ---------- Brand Panel (Left) ---------- */
.auth-brand {
    flex: 0 0 46%;
    max-width: 46%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3.5rem 3.75rem;
    color: #fff;
    background:
        radial-gradient(1200px 600px at 110% -10%, rgba(232,163,61,0.22), transparent 55%),
        radial-gradient(900px 500px at -20% 110%, rgba(41,128,185,0.35), transparent 55%),
        linear-gradient(155deg, #0e2438 0%, #14395b 45%, #1d5c8f 100%);
}
.auth-brand::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at 30% 20%, #000 30%, transparent 75%);
}
.auth-brand .deco-ring {
    position: absolute;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
}
.auth-brand .deco-ring.r1 { width: 340px; height: 340px; top: -110px; right: -110px; }
.auth-brand .deco-ring.r2 { width: 220px; height: 220px; bottom: -80px; left: -70px; }
.auth-brand .deco-dot {
    position: absolute; width: 8px; height: 8px; border-radius: 50%;
    background: var(--auth-accent); opacity: 0.8;
}
.auth-brand .deco-dot.d1 { top: 18%; right: 12%; }
.auth-brand .deco-dot.d2 { bottom: 24%; right: 22%; width: 5px; height: 5px; opacity: 0.5; }

.auth-brand > * { position: relative; z-index: 2; }

.auth-logo {
    display: flex; align-items: center; gap: 0.85rem;
}
.auth-logo .mark {
    width: 46px; height: 46px; border-radius: 13px;
    background: linear-gradient(135deg, var(--auth-accent), #d18a24);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: #0e2438;
    box-shadow: 0 8px 20px rgba(232,163,61,0.35);
}
.auth-logo .name { font-weight: 800; font-size: 1.05rem; letter-spacing: 0.4px; line-height: 1.2; }
.auth-logo .tag { font-size: 0.68rem; opacity: 0.6; letter-spacing: 1.6px; text-transform: uppercase; }

.auth-hero { margin: 3rem 0 2.5rem; }
.auth-hero .eyebrow {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.7rem; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase;
    color: #ffd591; background: rgba(232,163,61,0.14);
    border: 1px solid rgba(232,163,61,0.3);
    padding: 0.35rem 0.85rem; border-radius: 100px; margin-bottom: 1.25rem;
}
.auth-hero h1 {
    font-size: clamp(1.7rem, 2.4vw, 2.35rem);
    font-weight: 800; line-height: 1.22; letter-spacing: -0.4px; margin-bottom: 1rem;
}
.auth-hero p { font-size: 0.95rem; line-height: 1.75; opacity: 0.75; max-width: 420px; }

.auth-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    max-width: 460px;
}
.auth-feature {
    display: flex; align-items: center; gap: 0.7rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    padding: 0.7rem 0.9rem;
    font-size: 0.8rem; font-weight: 500;
    transition: transform 0.25s, background 0.25s;
}
.auth-feature:hover { transform: translateY(-2px); background: rgba(255,255,255,0.1); }
.auth-feature i {
    width: 30px; height: 30px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; font-size: 0.8rem;
    background: rgba(232,163,61,0.18); color: #ffd591;
}

.auth-brand-footer {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.72rem; opacity: 0.55; margin-top: 2.5rem;
}
.auth-brand-footer .secure { display: flex; align-items: center; gap: 0.4rem; }

/* ---------- Form Panel (Right) ---------- */
.auth-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    background: #f7f9fc;
    position: relative;
}
.auth-panel::before {
    content: '';
    position: absolute; top: 0; right: 0; left: 0; height: 220px;
    background: linear-gradient(180deg, rgba(20,57,91,0.05), transparent);
    pointer-events: none;
}
.auth-box {
    width: 100%;
    max-width: 430px;
    position: relative;
    z-index: 1;
}

/* Mobile logo (brand panel hidden) */
.auth-mobile-logo { display: none; text-align: center; margin-bottom: 1.75rem; }
.auth-mobile-logo .mark {
    width: 54px; height: 54px; border-radius: 15px;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-2));
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.35rem; color: #fff; margin-bottom: 0.75rem;
    box-shadow: 0 10px 24px rgba(20,57,91,0.3);
}
.auth-mobile-logo .name { font-weight: 800; color: var(--auth-ink); font-size: 1.05rem; }
.auth-mobile-logo .tag { font-size: 0.7rem; color: var(--auth-muted); letter-spacing: 1.4px; text-transform: uppercase; }

/* Form header */
.auth-head { margin-bottom: 1.75rem; }
.auth-head h2 { font-size: 1.55rem; font-weight: 800; color: var(--auth-ink); letter-spacing: -0.3px; margin-bottom: 0.35rem; }
.auth-head p { color: var(--auth-muted); font-size: 0.88rem; line-height: 1.6; }

/* Steps */
.auth-steps {
    display: flex; align-items: center; gap: 0;
    margin: 0 0 1.75rem;
}
.auth-step { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.auth-step .dot {
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700;
    background: #e8edf3; color: var(--auth-muted);
    transition: all 0.3s;
}
.auth-step .lbl { font-size: 0.75rem; font-weight: 600; color: var(--auth-muted); }
.auth-step.done .dot { background: #16a34a; color: #fff; }
.auth-step.done .lbl { color: #16a34a; }
.auth-step.active .dot { background: var(--auth-primary); color: #fff; box-shadow: 0 0 0 5px rgba(20,57,91,0.12); }
.auth-step.active .lbl { color: var(--auth-ink); }
.auth-step-line { flex: 1; height: 2px; background: #e8edf3; margin: 0 0.6rem; min-width: 18px; }
.auth-step-line.done { background: #16a34a; }

/* Alerts */
.auth-alert {
    display: flex; align-items: flex-start; gap: 0.65rem;
    border-radius: 12px; padding: 0.8rem 1rem; margin-bottom: 1.25rem;
    font-size: 0.83rem; line-height: 1.5; font-weight: 500;
}
.auth-alert i { margin-top: 0.15rem; }
.auth-alert.error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.auth-alert.success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.auth-alert.info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.auth-alert.warning { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }

/* Fields */
.auth-field { margin-bottom: 1.1rem; }
.auth-field label {
    display: block; font-size: 0.78rem; font-weight: 600;
    color: var(--auth-ink); margin-bottom: 0.45rem;
}
.auth-input { position: relative; }
.auth-input > i.lead {
    position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
    color: #94a3b8; font-size: 0.85rem; z-index: 2;
}
.auth-input .form-control {
    width: 100%;
    border: 1.5px solid var(--auth-line);
    background: var(--auth-field-bg);
    border-radius: 12px;
    padding: 0.8rem 2.9rem 0.8rem 2.75rem;
    font-size: 0.9rem; font-weight: 500; color: var(--auth-ink);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.auth-input .form-control::placeholder { color: #a6b3c2; font-weight: 400; }
.auth-input .form-control:focus {
    outline: none;
    border-color: var(--auth-primary-2);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(29,92,143,0.12);
}
.auth-input .trail {
    position: absolute; right: 0.6rem; top: 50%; transform: translateY(-50%);
    border: none; background: transparent; color: #94a3b8;
    padding: 0.4rem; border-radius: 8px; cursor: pointer; z-index: 2;
}
.auth-input .trail:hover { color: var(--auth-primary-2); background: rgba(29,92,143,0.08); }

/* OTP input */
.otp-boxes { display: flex; gap: 0.6rem; justify-content: center; margin: 0.5rem 0 1.25rem; }
.otp-boxes input {
    width: 52px; height: 60px;
    border: 1.5px solid var(--auth-line);
    background: var(--auth-field-bg);
    border-radius: 12px;
    font-size: 1.5rem; font-weight: 700; text-align: center;
    color: var(--auth-ink);
    transition: all 0.2s;
}
.otp-boxes input:focus {
    outline: none;
    border-color: var(--auth-primary-2);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(29,92,143,0.12);
}
.otp-boxes input.filled { border-color: var(--auth-primary-2); background: #fff; }

/* Buttons */
.btn-auth {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
    width: 100%;
    padding: 0.85rem 1.25rem;
    border: none; border-radius: 12px;
    font-family: inherit; font-size: 0.92rem; font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-2) 100%);
    box-shadow: 0 8px 20px rgba(20,57,91,0.28), inset 0 1px 0 rgba(255,255,255,0.15);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}
.btn-auth:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(20,57,91,0.36); filter: brightness(1.06); color: #fff; }
.btn-auth:active { transform: translateY(0); }
.btn-auth.accent { background: linear-gradient(135deg, #d18a24, var(--auth-accent)); box-shadow: 0 8px 20px rgba(232,163,61,0.35); }
.btn-auth.outline {
    background: transparent; color: var(--auth-primary);
    border: 1.5px solid var(--auth-line); box-shadow: none;
}
.btn-auth.outline:hover { border-color: var(--auth-primary-2); color: var(--auth-primary-2); box-shadow: none; transform: none; }

/* Links & footer */
.auth-links {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 1.35rem; font-size: 0.82rem;
}
.auth-links a { color: var(--auth-primary-2); font-weight: 600; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-divider {
    display: flex; align-items: center; gap: 0.9rem;
    color: #a6b3c2; font-size: 0.72rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
    margin: 1.5rem 0;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--auth-line); }
.auth-copy { text-align: center; margin-top: 2rem; font-size: 0.74rem; color: #9aa7b6; }
.auth-copy .secure { display: inline-flex; align-items: center; gap: 0.35rem; color: #16a34a; font-weight: 600; }

/* Checkbox */
.auth-check { display: flex; align-items: center; gap: 0.55rem; font-size: 0.82rem; color: var(--auth-muted); }
.auth-check input { width: 16px; height: 16px; accent-color: var(--auth-primary-2); cursor: pointer; }

/* Password strength */
.pw-meter { display: flex; gap: 5px; margin-top: 0.55rem; }
.pw-meter span { flex: 1; height: 4px; border-radius: 2px; background: #e8edf3; transition: background 0.25s; }
.pw-meter.s1 span:nth-child(-n+1) { background: #ef4444; }
.pw-meter.s2 span:nth-child(-n+2) { background: #f59e0b; }
.pw-meter.s3 span:nth-child(-n+3) { background: #eab308; }
.pw-meter.s4 span { background: #16a34a; }
.pw-hint { font-size: 0.72rem; color: var(--auth-muted); margin-top: 0.35rem; }

/* Info card inside form panel */
.auth-note {
    border: 1px dashed #cbd5e1; border-radius: 12px;
    background: rgba(255,255,255,0.7);
    padding: 0.85rem 1rem; font-size: 0.78rem; color: var(--auth-muted);
    display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 1.25rem; line-height: 1.55;
}
.auth-note i { color: var(--auth-primary-2); margin-top: 0.1rem; }

/* Subtle entrance animation */
.auth-box { animation: authRise 0.5s cubic-bezier(0.22,1,0.36,1) both; }
@keyframes authRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.auth-hero { animation: authRise 0.6s 0.1s cubic-bezier(0.22,1,0.36,1) both; }
.auth-features { animation: authRise 0.6s 0.2s cubic-bezier(0.22,1,0.36,1) both; }

/* =====================================================
   Ambient motion — brand panel
   ===================================================== */

/* Drifting glow orbs */
.deco-orbs { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.deco-orbs .orb {
    position: absolute; border-radius: 50%;
    filter: blur(60px); opacity: 0.5;
    will-change: transform;
}
.deco-orbs .o1 {
    width: 380px; height: 380px; top: -8%; left: -10%;
    background: radial-gradient(circle, rgba(232,163,61,0.5), transparent 70%);
    animation: orbDrift1 18s ease-in-out infinite alternate;
}
.deco-orbs .o2 {
    width: 420px; height: 420px; bottom: -15%; right: -12%;
    background: radial-gradient(circle, rgba(41,128,185,0.55), transparent 70%);
    animation: orbDrift2 22s ease-in-out infinite alternate;
}
.deco-orbs .o3 {
    width: 240px; height: 240px; top: 42%; left: 30%;
    background: radial-gradient(circle, rgba(255,213,145,0.28), transparent 70%);
    animation: orbDrift3 15s ease-in-out infinite alternate;
}
@keyframes orbDrift1 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(70px, 55px) scale(1.18); }
}
@keyframes orbDrift2 {
    from { transform: translate(0, 0) scale(1.1); }
    to   { transform: translate(-80px, -60px) scale(0.95); }
}
@keyframes orbDrift3 {
    from { transform: translate(0, 0); }
    50%  { transform: translate(-45px, 35px); }
    to   { transform: translate(35px, -40px); }
}

/* Rising particles */
.deco-particles { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.deco-particles span {
    position: absolute; bottom: -12px;
    width: 5px; height: 5px; border-radius: 50%;
    background: rgba(255,213,145,0.75);
    animation: rise linear infinite;
    will-change: transform, opacity;
}
.deco-particles span:nth-child(1) { left: 8%;  animation-duration: 11s; animation-delay: 0s;   }
.deco-particles span:nth-child(2) { left: 18%; animation-duration: 14s; animation-delay: 2s;  width: 4px; height: 4px; }
.deco-particles span:nth-child(3) { left: 30%; animation-duration: 10s; animation-delay: 4.5s;}
.deco-particles span:nth-child(4) { left: 44%; animation-duration: 16s; animation-delay: 1s;  width: 6px; height: 6px; opacity: .6; }
.deco-particles span:nth-child(5) { left: 57%; animation-duration: 12s; animation-delay: 6s;  }
.deco-particles span:nth-child(6) { left: 68%; animation-duration: 15s; animation-delay: 3s;  width: 4px; height: 4px; }
.deco-particles span:nth-child(7) { left: 80%; animation-duration: 11s; animation-delay: 7.5s;}
.deco-particles span:nth-child(8) { left: 90%; animation-duration: 13s; animation-delay: 5s;  width: 6px; height: 6px; }
@keyframes rise {
    0%   { transform: translateY(0) translateX(0); opacity: 0; }
    8%   { opacity: 0.9; }
    55%  { transform: translateY(-55vh) translateX(18px); opacity: 0.7; }
    100% { transform: translateY(-108vh) translateX(-14px); opacity: 0; }
}

/* Rings slowly spin with a glowing orbiting dot */
.auth-brand .deco-ring::after {
    content: '';
    position: absolute; top: -4px; left: 50%;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--auth-accent);
    box-shadow: 0 0 10px rgba(232,163,61,0.9);
}
.auth-brand .deco-ring.r1 { animation: ringSpin 40s linear infinite; }
.auth-brand .deco-ring.r2 { animation: ringSpin 28s linear infinite reverse; }
@keyframes ringSpin { to { transform: rotate(360deg); } }

/* Deco dots twinkle */
.auth-brand .deco-dot { animation: dotTwinkle 3.4s ease-in-out infinite; }
.auth-brand .deco-dot.d2 { animation-delay: 1.7s; }
@keyframes dotTwinkle {
    0%, 100% { opacity: 0.85; transform: scale(1); }
    50%      { opacity: 0.3;  transform: scale(0.7); }
}

/* Periodic light sweep across the panel */
.auth-brand::after {
    content: '';
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.05) 46%, rgba(232,163,61,0.09) 50%, rgba(255,255,255,0.05) 54%, transparent 70%);
    background-size: 280% 100%;
    background-position: 120% 0;
    animation: sweep 9s ease-in-out infinite;
}
@keyframes sweep {
    0%   { background-position: 120% 0; }
    45%  { background-position: -80% 0; }
    100% { background-position: -80% 0; }
}

/* Logo mark subtle float */
.auth-logo .mark { animation: markFloat 5s ease-in-out infinite; }
@keyframes markFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .deco-orbs .orb, .deco-particles span, .deco-ring, .deco-dot,
    .auth-brand::after, .auth-logo .mark, .auth-box, .auth-hero, .auth-features {
        animation: none !important;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .auth-brand { display: none; }
    .auth-panel { padding: 2rem 1.25rem; }
    .auth-mobile-logo { display: block; }
}
@media (max-width: 480px) {
    .otp-boxes { gap: 0.45rem; }
    .otp-boxes input { width: 44px; height: 54px; font-size: 1.3rem; }
    .auth-step .lbl { display: none; }
    .auth-step.active .lbl { display: inline; }
}

/* ---------- Powered-by credit (form panel, mobile-visible) ---------- */
.auth-powered { text-align: center; margin-top: 1.4rem; font-size: 0.7rem; color: #9aa7b6; }
.auth-powered strong { color: var(--auth-primary-2, #2f80bd); font-weight: 700; }
.auth-copy .auth-powered { margin-top: 0.3rem; }
