/* ============================================================
   PPAY GATEWAY - Auth Styles (v12 - full)
   Login + Register + OTP + Forgot Password
   ============================================================ */

/* ============================================================
   AUTH BODY
   ============================================================ */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: radial-gradient(ellipse at top, #071526 0%, var(--bg) 60%);
    position: relative;
    z-index: 1;
}

.auth-shell {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

/* ============================================================
   AUTH CARD
   ============================================================ */
.auth-card {
    padding: 28px 24px 24px;
    border-radius: var(--radius-lg);
    animation: authRise .7s var(--ease) both;
    background: linear-gradient(155deg, rgba(22,34,54,0.85), rgba(15,25,42,0.9));
    border: 1px solid var(--border);
    box-shadow: var(--shadow-deep);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(155deg, rgba(255,255,255,0.06), transparent 40%);
    pointer-events: none;
    border-radius: inherit;
}

@keyframes authRise {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   AUTH BRAND
   ============================================================ */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
}
.auth-brand img {
    filter: drop-shadow(0 0 18px var(--primary-glow));
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}
.auth-brand-text h1 {
    margin: 0;
    font-size: 17px;
    letter-spacing: 0.16em;
    font-weight: 800;
    line-height: 1;
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
}
.auth-brand-text h1 span {
    color: var(--primary-soft);
    font-size: 10px;
    letter-spacing: 0.4em;
    display: block;
    margin-top: 5px;
    font-weight: 700;
}
.auth-brand-text p {
    margin: 4px 0 0;
    font-size: 11.5px;
    color: var(--muted-2);
    letter-spacing: 0.02em;
}

/* ============================================================
   AUTH HEADING
   ============================================================ */
.auth-heading {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}
.auth-heading h2 {
    font-size: 22px;
    margin: 0 0 4px;
    color: var(--text);
}
.auth-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
}
.auth-heading strong {
    color: var(--cyan-soft);
}

/* ============================================================
   AUTH FORM
   ============================================================ */
.auth-form {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.auth-foot {
    text-align: center;
    color: var(--muted-2);
    font-size: 11.5px;
    margin: 18px 0 0;
    letter-spacing: 0.02em;
}

/* ============================================================
   OTP INPUT
   ============================================================ */
.otp-input {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin: 6px 0 12px;
}
.otp-input input {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 52px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    border-radius: 13px;
    background: rgba(10,18,32,0.7);
    border: 1px solid var(--border);
    color: var(--text);
    outline: none;
    transition: all var(--transition);
    font-family: 'Space Grotesk', monospace;
}
.otp-input input:focus {
    border-color: rgba(16,185,129,0.6);
    box-shadow: 0 0 0 4px rgba(16,185,129,0.14);
}

.otp-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 6px;
}

/* ============================================================
   FORGOT PASSWORD MODAL
   ============================================================ */
.forgot-modal {
    max-width: 400px;
}

.forgot-modal .modal-head {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.forgot-modal .modal-head h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
}

.forgot-modal .modal-body {
    padding: 22px;
}

.forgot-sub {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 18px;
    line-height: 1.6;
}
.forgot-sub strong {
    color: var(--cyan-soft);
    font-family: 'Space Grotesk', monospace;
}

/* Force modal visible inside auth-body */
.auth-body .modal-backdrop {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    background: rgba(2, 6, 14, 0.78) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    padding: 20px !important;
    animation: fadeIn .2s ease !important;
}
.auth-body .modal-backdrop[hidden] {
    display: none !important;
}
.auth-body .modal-backdrop .modal {
    width: 100%;
    max-width: 460px;
    background: linear-gradient(155deg, rgba(22,34,54,0.98), rgba(15,25,42,0.98));
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    box-shadow: var(--shadow-deep);
    overflow: hidden;
    animation: modalRise .3s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes modalRise {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Small icon button inside modal head */
.forgot-modal .icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s ease;
}
.forgot-modal .icon-btn:hover {
    color: var(--text);
    background: rgba(255,255,255,0.06);
    border-color: var(--border-2);
}
.forgot-modal .icon-btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================================
   AUTH LIGHT MODE
   ============================================================ */
[data-theme="light"] .auth-body {
    background: radial-gradient(ellipse at top, #d1fae5 0%, #f5f7fb 55%);
}

[data-theme="light"] .auth-card {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 20px 50px -20px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(15, 23, 42, 0.04) inset;
}
[data-theme="light"] .auth-card::before {
    background: linear-gradient(155deg, rgba(16, 185, 129, 0.04), transparent 45%);
}
[data-theme="light"] .auth-brand-text h1 {
    color: #0b1220;
}
[data-theme="light"] .auth-brand-text h1 span {
    color: #059669;
}
[data-theme="light"] .auth-brand-text p {
    color: #64748b;
}
[data-theme="light"] .auth-heading h2 {
    color: #0b1220;
}
[data-theme="light"] .auth-heading p {
    color: #475569;
}
[data-theme="light"] .auth-heading strong {
    color: #0891b2;
}
[data-theme="light"] .auth-foot {
    color: #64748b;
}
[data-theme="light"] .otp-input input {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
    color: #0b1220;
}
[data-theme="light"] .otp-input input:focus {
    border-color: rgba(5, 150, 105, 0.6);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}
[data-theme="light"] .otp-meta {
    color: #475569;
}
[data-theme="light"] .forgot-sub {
    color: #475569;
}
[data-theme="light"] .forgot-sub strong {
    color: #0891b2;
}
[data-theme="light"] .auth-body .modal-backdrop .modal {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 25px 60px -20px rgba(15, 23, 42, 0.25);
}
[data-theme="light"] .forgot-modal .icon-btn {
    background: #f1f5f9;
    border-color: rgba(15, 23, 42, 0.12);
    color: #64748b;
}
[data-theme="light"] .forgot-modal .icon-btn:hover {
    background: #e2e8f0;
    color: #0b1220;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767px) {
    .auth-body {
        padding: 20px 14px;
        align-items: flex-start;
        padding-top: 30px;
    }
    .auth-shell {
        max-width: 100%;
    }
    .auth-card {
        padding: 24px 20px 20px;
        border-radius: 22px;
    }
    .auth-brand img {
        width: 44px;
        height: 44px;
    }
    .auth-brand-text h1 {
        font-size: 15px;
    }
    .auth-brand-text h1 span {
        font-size: 9px;
        letter-spacing: 0.35em;
    }
    .auth-brand-text p {
        font-size: 10.5px;
    }
    .auth-heading h2 {
        font-size: 19px;
    }
    .auth-heading p {
        font-size: 12.5px;
    }
    .forgot-modal {
        max-width: 100%;
    }
}

@media (max-width: 380px) {
    .otp-input {
        gap: 6px;
    }
    .otp-input input {
        height: 46px;
        font-size: 18px;
        border-radius: 11px;
    }
}