/* ════════════════════════════════════════════════════════════════════════
   ▓▓▓ SPX$ AUTH PAGES — CYAN AEROSPACE EDITION ▓▓▓
   For login, register, forgot password, reset, OTP, verification
   ════════════════════════════════════════════════════════════════════════ */

.spx-auth-body {
    min-height: 100vh;
    display: block;
    padding: 28px 20px;
}

.spx-auth-wrap {
    width: min(480px, 100%);
    margin: 0 auto;
    min-height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
}

.spx-auth-home {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin: 0 auto;
    transition: opacity .2s ease;
}
.spx-auth-home:hover { opacity: .75; }

.spx-auth-card {
    position: relative;
    width: 100%;
    padding: 36px 32px;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(11,16,32,.86), rgba(3,5,10,.82));
    border: 1px solid rgba(0, 217, 255, .28);
    box-shadow: 0 24px 80px rgba(0, 157, 255, .16), inset 0 1px 0 rgba(255,255,255,.08);
    overflow: hidden;
}
.spx-auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0 35%, rgba(0,217,255,.08), transparent 62%);
    pointer-events: none;
}
.spx-auth-card > * { position: relative; z-index: 1; }

.spx-auth-logo {
    text-align: center;
    margin-bottom: 22px;
}
.spx-auth-logo img {
    max-height: 48px;
    width: auto;
    margin: 0 auto;
    filter: drop-shadow(0 0 14px rgba(0,217,255,.35));
}

.spx-auth-head {
    margin-bottom: 24px;
}
.spx-auth-head h1,
.spx-auth-head h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.035em;
    color: var(--text);
    margin: 0 0 8px;
}
.spx-auth-head p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
}

.spx-auth-form { display: grid; gap: 14px; }

.spx-auth-form .form-group,
.spx-auth-form .mb-3,
.spx-auth-form .mb-4 {
    margin: 0;
}

.spx-auth-form label,
.spx-auth-form .col-form-label {
    display: block;
    font-family: Inter, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 8px;
    padding: 0;
    letter-spacing: 0;
    text-transform: none;
}

.spx-auth-form input[type="text"],
.spx-auth-form input[type="email"],
.spx-auth-form input[type="password"],
.spx-auth-form input[type="tel"],
.spx-auth-form input[type="number"],
.spx-auth-form select,
.spx-auth-form textarea,
.spx-auth-form .custom-form-control,
.spx-auth-form .form-control {
    width: 100% !important;
    min-height: 52px;
    color: var(--text) !important;
    border-radius: 16px !important;
    border: 1px solid rgba(234,248,255,.12) !important;
    background: rgba(3,5,10,.64) !important;
    padding: 0 16px !important;
    outline: none;
    font-family: Inter, sans-serif !important;
    font-size: 14px !important;
    box-shadow: none !important;
    transition: border-color .2s, box-shadow .2s;
}
.spx-auth-form input:focus,
.spx-auth-form select:focus,
.spx-auth-form textarea:focus,
.spx-auth-form .custom-form-control:focus,
.spx-auth-form .form-control:focus {
    border-color: rgba(0,217,255,.5) !important;
    box-shadow: 0 0 0 4px rgba(0,217,255,.08) !important;
    background: rgba(3,5,10,.78) !important;
}
.spx-auth-form input::placeholder,
.spx-auth-form textarea::placeholder { color: var(--muted-2) !important; opacity: 1; }

.spx-auth-form .password-toggle-icon,
.spx-auth-form .password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted) !important;
    cursor: pointer;
}
.spx-auth-form .position-relative { position: relative; }

.spx-auth-form .btn,
.spx-auth-form .btn-save,
.spx-auth-form button[type="submit"] {
    width: 100%;
    min-height: 52px;
    border-radius: 999px !important;
    border: 1px solid rgba(0, 217, 255, .8) !important;
    color: #031018 !important;
    background: linear-gradient(135deg, #00D9FF 0%, #2F80FF 48%, #EAF8FF 120%) !important;
    box-shadow: 0 14px 42px rgba(0, 157, 255, .35), inset 0 1px 0 rgba(255,255,255,.45) !important;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
    font-family: Inter, sans-serif !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    letter-spacing: -.01em !important;
    text-transform: none !important;
    margin-top: 4px;
}
.spx-auth-form .btn:hover,
.spx-auth-form .btn-save:hover,
.spx-auth-form button[type="submit"]:hover { transform: translateY(-2px); }

.spx-auth-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
    font-size: 13px;
    color: var(--muted);
}
.spx-auth-meta a { color: var(--cyan); font-weight: 600; }
.spx-auth-meta a:hover { color: var(--text); }

.spx-auth-divider {
    margin: 20px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}
.spx-auth-divider a { color: var(--cyan); font-weight: 700; margin-left: 4px; }
.spx-auth-divider a:hover { color: var(--text); }

.spx-auth-foot {
    margin: 0 auto;
    color: #93A0AF;
    font-size: 12px;
    line-height: 1.55;
    text-align: center;
    max-width: 420px;
}

/* Alerts */
.spx-auth-card .alert {
    border-radius: 14px !important;
    padding: 12px 16px !important;
    font-size: 13.5px !important;
    margin: 0 0 16px !important;
    border: 1px solid transparent;
}
.spx-auth-card .alert-success {
    background: rgba(0, 217, 255, .08) !important;
    border-color: rgba(0, 217, 255, .24) !important;
    color: #DFFBFF !important;
}
.spx-auth-card .alert-danger,
.spx-auth-card .alert-warning {
    background: rgba(255, 176, 32, .08) !important;
    border-color: rgba(255, 176, 32, .28) !important;
    color: #F9DCA7 !important;
}

/* Invalid feedback */
.spx-auth-form .invalid-feedback {
    display: block !important;
    margin-top: 6px !important;
    color: #FF7AA7 !important;
    font-size: 12.5px !important;
    text-align: left !important;
}
.spx-auth-form .is-invalid {
    border-color: rgba(255, 122, 167, .55) !important;
}

/* Sign-up checkbox row */
.spx-auth-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 6px 0 4px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}
.spx-auth-checkbox input[type="checkbox"] {
    width: 18px !important;
    min-height: 18px !important;
    margin-top: 2px !important;
    accent-color: var(--cyan);
    padding: 0 !important;
}
.spx-auth-checkbox a { color: var(--cyan); }

/* OTP row */
.spx-otp-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin: 18px 0;
}
.spx-otp-row input {
    text-align: center !important;
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    min-height: 58px !important;
}

@media (max-width: 540px) {
    .spx-auth-card { padding: 28px 22px; border-radius: 22px; }
    .spx-auth-head h1, .spx-auth-head h3 { font-size: 24px; }
    .spx-otp-row { grid-template-columns: repeat(6, 1fr); gap: 6px; }
    .spx-otp-row input { min-height: 48px !important; font-size: 18px !important; }
}

/* ━━━ REGISTER FORM EXTRAS ━━━ */
.spx-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 480px) {
    .spx-row-2 { grid-template-columns: 1fr; }
}

.spx-check-row {
    display: flex;
    align-items: center;
    gap: 11px;
    color: rgba(177,201,224,.9);
    font-size: 13.5px;
    line-height: 1.5;
    cursor: pointer;
    margin-top: 6px;
    padding: 8px 4px;            /* bigger hit area */
    border-radius: 10px;
    user-select: none;
    transition: background .15s;
}
.spx-check-row:hover { background: rgba(0,217,255,.04); }
.spx-check-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 6px;
    border: 2px solid rgba(0,217,255,.55);
    background: rgba(7,11,20,.7);
    cursor: pointer;
    position: relative;
    transition: all .18s;
}
.spx-check-row input[type="checkbox"]:hover { border-color: #00D9FF; box-shadow: 0 0 10px rgba(0,217,255,.3); }
.spx-check-row input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #00D9FF, #00B8E8);
    border-color: #00D9FF;
    box-shadow: 0 0 12px rgba(0,217,255,.45);
}
.spx-check-row input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 16px;
    color: #03050A;
    font-weight: 900;
}

/* Clear, visible T&C validation message + shake */
.spx-terms-error { color: #FF6B6B; font-size: 12.5px; font-weight: 600; margin: 2px 0 0 4px; }
.spx-shake { animation: spx-shake-anim .42s ease; }
@keyframes spx-shake-anim {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}
.spx-check-row a {
    color: #00D9FF;
    text-decoration: underline;
}

.position-relative { position: relative; }
.password-toggle-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: rgba(177,201,224,.6);
    font-size: 14px;
    user-select: none;
    z-index: 2;
}
.password-toggle-icon:hover { color: #00D9FF; }
.invalid-feedback {
    display: block;
    color: #ff6b8a;
    font-size: 12px;
    margin-top: 6px;
}
.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.5;
    position: relative;
    border: 1px solid;
}
.alert-success { background: rgba(0,217,255,.08); border-color: rgba(0,217,255,.35); color: #B9F0FF; }
.alert-danger  { background: rgba(255,107,138,.08); border-color: rgba(255,107,138,.4); color: #ffb3c1; }
.btn-close {
    position: absolute;
    right: 10px;
    top: 10px;
    background: transparent;
    border: 0;
    color: inherit;
    opacity: .55;
    font-size: 14px;
    cursor: pointer;
}
.btn-close::before { content: "×"; font-size: 18px; line-height: 1; }
.btn-close:hover { opacity: 1; }
