/* ═══════════════════════════════════════════════════ */
/* Auth Pages — Shared Styles                         */
/* Login, Register, Forgot, Reset, 2FA Verify         */
/* ═══════════════════════════════════════════════════ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    background: var(--dark-bg);
}

/* Animated gradient orbs */
.auth-page::before {
    content: '';
    position: absolute;
    top: -250px; left: 30%;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
    animation: aurora-drift-1 20s ease-in-out infinite alternate;
}
.auth-page::after {
    content: '';
    position: absolute;
    bottom: -200px; right: 20%;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
    animation: aurora-drift-2 25s ease-in-out infinite alternate;
}

/* Grid pattern background */
.auth-grid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, black 20%, transparent 70%);
}

/* ── Card ── */
.auth-card {
    width: 100%; max-width: 420px;
    background: rgba(13, 13, 13, 0.65);
    border: 1px solid rgba(34, 34, 34, 0.6);
    border-radius: 24px;
    backdrop-filter: blur(32px) saturate(1.2);
    -webkit-backdrop-filter: blur(32px) saturate(1.2);
    padding: 44px 40px;
    position: relative;
    z-index: 1;
    box-shadow:
        0 32px 100px rgba(0,0,0,0.4),
        0 0 60px rgba(255, 255, 255, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    animation: auth-card-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 20%; right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    border-radius: 1px;
}

/* ── Logo ── */
.auth-logo {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; margin-bottom: 32px;
    animation: hero-badge-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}
.auth-logo-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    overflow: visible;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth-logo-icon img {
    width: 100%; height: 100%;
    object-fit: contain;
    border-radius: 10px;
}
.auth-logo-icon:hover {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.35);
}
.auth-logo-text {
    font-size: 20px; font-weight: 700; color: white;
}

/* ── Title ── */
.auth-title {
    font-size: 26px; font-weight: 700; color: white;
    text-align: center; margin-bottom: 4px;
    animation: hero-title-enter 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}
.auth-subtitle {
    font-size: 14px; color: #666666;
    text-align: center; margin-bottom: 28px;
    animation: hero-subtitle-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

/* ── Form ── */
.form-group {
    margin-bottom: 18px;
    animation: hero-subtitle-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.form-group:nth-child(1) { animation-delay: 0.5s; }
.form-group:nth-child(2) { animation-delay: 0.6s; }
.form-group:nth-child(3) { animation-delay: 0.65s; }
.form-group label {
    display: block; font-size: 12px; font-weight: 500;
    color: #666666; text-transform: uppercase;
    letter-spacing: 0.05em; margin-bottom: 8px;
    transition: color 0.3s ease;
}
.form-group:focus-within label { color: var(--primary); }
.form-input {
    width: 100%; padding: 13px 16px;
    background: rgba(15, 15, 15, 0.7);
    border: 1px solid rgba(34, 34, 34, 0.7);
    border-radius: 12px; color: #e0e0e0;
    font-size: 14px; font-family: 'DM Sans', sans-serif;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.form-input::placeholder { color: #2a2a2a; transition: color 0.3s ease; }
.form-input:hover { border-color: rgba(34, 34, 34, 1); }
.form-input:hover::placeholder { color: #3a3a3a; }
.form-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06), 0 4px 20px rgba(0, 0, 0, 0.15);
    background: rgba(15, 15, 15, 0.9);
}

/* ── Error / Message ── */
.auth-error {
    background: rgba(180, 180, 180, 0.08);
    border: 1px solid rgba(180, 180, 180, 0.15);
    border-radius: 12px; padding: 12px 16px;
    color: #777777; font-size: 13px;
    margin-bottom: 18px;
    display: flex; align-items: center; gap: 8px;
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both,
               hero-subtitle-enter 0.4s ease both;
}
.auth-message {
    border-radius: 12px; padding: 12px 16px;
    font-size: 13px; margin-bottom: 18px;
    display: flex; align-items: center; gap: 8px;
}
.auth-message.success {
    background: rgba(200, 200, 200, 0.08);
    border: 1px solid rgba(200, 200, 200, 0.15);
    color: #cccccc;
}
.auth-message.error {
    background: rgba(180, 180, 180, 0.08);
    border: 1px solid rgba(180, 180, 180, 0.15);
    color: #777777;
}
.auth-disabled {
    background: rgba(200, 200, 200, 0.06);
    border: 1px solid rgba(200, 200, 200, 0.12);
    border-radius: 12px; padding: 16px;
    color: #aaaaaa; font-size: 13px; text-align: center;
}

/* ── Button ── */
.auth-btn {
    width: 100%; padding: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff; border: 1px solid rgba(255,255,255,0.2); border-radius: 12px;
    font-size: 15px; font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'DM Sans', sans-serif;
    position: relative; overflow: hidden;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
    animation: hero-subtitle-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both;
}
.auth-btn::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(255, 255, 255, 0.12);
    opacity: 0; transition: opacity 0.35s ease;
}
.auth-btn::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}
.auth-btn:hover::before { opacity: 1; }
.auth-btn:hover::after { transform: translateX(100%); }
.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(255, 255, 255, 0.25);
}
.auth-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.15);
}
.auth-btn span { position: relative; z-index: 1; }
.auth-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.auth-btn:disabled::before, .auth-btn:disabled::after { display: none; }

/* ── Footer ── */
.auth-footer {
    text-align: center; margin-top: 24px;
    font-size: 14px; color: #666666;
    animation: hero-subtitle-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.8s both;
}
.auth-footer a {
    color: #ffffff; text-decoration: none; font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}
.auth-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 1px;
    background: var(--primary);
    transition: width 0.3s ease;
}
.auth-footer a:hover::after { width: 100%; }
.auth-footer a:hover { color: #ffffff; }

/* ── Divider ── */
.auth-divider {
    display: flex; align-items: center; gap: 16px;
    margin: 24px 0; color: #2a2a2a; font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: #222222;
}

/* ── Floating particles ── */
.auth-particle {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.auth-particle-1 {
    width: 4px; height: 4px;
    background: rgba(255, 255, 255, 0.2);
    top: 20%; left: 15%;
    animation: particle-float-1 8s ease-in-out infinite;
}
.auth-particle-2 {
    width: 3px; height: 3px;
    background: rgba(255, 255, 255, 0.15);
    top: 70%; right: 20%;
    animation: particle-float-2 10s ease-in-out infinite;
}
.auth-particle-3 {
    width: 5px; height: 5px;
    background: rgba(255, 255, 255, 0.1);
    bottom: 30%; left: 25%;
    animation: particle-float-3 12s ease-in-out infinite;
}
.auth-particle-4 {
    width: 3px; height: 3px;
    background: rgba(255, 255, 255, 0.18);
    top: 40%; right: 10%;
    animation: particle-float-1 9s ease-in-out 2s infinite;
}

/* ── Password row (register) ── */
.password-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    animation: hero-subtitle-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.65s both;
}
@media (max-width: 480px) { .password-row { grid-template-columns: 1fr; } }

/* ── Password Strength Meter (register) ── */
.password-strength { padding: 0 2px; }
.strength-bar-bg {
    height: 4px; border-radius: 4px;
    background: rgba(34, 34, 34, 0.6);
    overflow: hidden;
}
.strength-bar-fill {
    height: 100%; border-radius: 4px;
    width: 0%; transition: width 0.4s ease, background 0.4s ease;
}
.strength-info {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 8px;
}
.strength-label {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; transition: color 0.3s ease;
}
.strength-checks {
    font-size: 11px; color: #666666;
    display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end;
}
.strength-check {
    display: inline-flex; align-items: center; gap: 3px;
    transition: color 0.3s ease;
}
.strength-check.pass { color: #cccccc; }
.strength-check.fail { color: #444444; }

/* ── Password visibility toggle ── */
.password-wrapper {
    position: relative;
}
.password-wrapper .form-input {
    padding-right: 44px;
}
.password-toggle {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: rgba(255,255,255,0.25);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color 0.3s ease;
    z-index: 2;
}
.password-toggle:hover { color: rgba(255,255,255,0.6); }

/* ── Auth card animated border ── */
.auth-card-border {
    position: absolute;
    inset: -1px;
    border-radius: 25px;
    overflow: hidden;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.auth-card:hover .auth-card-border,
.auth-card:focus-within .auth-card-border { opacity: 1; }
.auth-card-border::before {
    content: '';
    position: absolute;
    inset: -50%;
    width: 200%; height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(255,255,255,0.12) 60deg,
        transparent 120deg
    );
    animation: auth-border-spin 8s linear infinite;
}
@keyframes auth-border-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ── Input focus glow line ── */
.form-input:focus {
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05), 0 4px 20px rgba(0, 0, 0, 0.15);
    background: rgba(15, 15, 15, 0.9);
}

/* ── Remember me checkbox ── */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    font-size: 13px;
}
.remember-label {
    display: flex; align-items: center; gap: 8px;
    color: var(--text-muted); cursor: pointer;
    transition: color 0.3s ease;
}
.remember-label:hover { color: rgba(255,255,255,0.7); }
.remember-label input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    width: 16px; height: 16px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    background: rgba(15,15,15,0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}
.remember-label input[type="checkbox"]:checked {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.35);
}
.remember-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px; top: 1px;
    width: 5px; height: 9px;
    border: solid white; border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.forgot-link {
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
}
.forgot-link:hover { color: white; }

/* ── Responsive ── */
@media (max-width: 480px) {
    .auth-card { padding: 32px 24px; border-radius: 20px; }
    .auth-title { font-size: 22px; }
    .auth-options { flex-direction: column; gap: 8px; align-items: flex-start; }
}

/* ── Keyframes ── */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

@keyframes aurora-drift-1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 40px) scale(1.1); }
}
@keyframes aurora-drift-2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-50px, -30px) scale(1.15); }
}
@keyframes particle-float-1 {
    0%, 100% { transform: translate(0, 0); opacity: 0.2; }
    50% { transform: translate(20px, -30px); opacity: 0.5; }
}
@keyframes particle-float-2 {
    0%, 100% { transform: translate(0, 0); opacity: 0.15; }
    50% { transform: translate(-25px, 20px); opacity: 0.4; }
}
@keyframes particle-float-3 {
    0%, 100% { transform: translate(0, 0); opacity: 0.1; }
    50% { transform: translate(15px, -20px); opacity: 0.35; }
}

/* Standard auth pass v4 */
.auth-page {
    padding: 24px;
    min-height: 100dvh;
}

.auth-card {
    width: min(100%, 440px);
    border-radius: 8px !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(10, 12, 16, 0.9) !important;
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

.auth-title,
.auth-subtitle,
.auth-logo-text,
.form-group label {
    letter-spacing: 0 !important;
}

.auth-subtitle,
.auth-link-text,
.forgot-link,
.remember-label {
    color: rgba(232, 237, 242, 0.72) !important;
}

.form-input {
    min-height: 46px;
    border-radius: 8px !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(3, 6, 10, 0.82) !important;
    color: #e8edf2 !important;
}

.form-input:focus {
    border-color: rgba(0, 229, 195, 0.48) !important;
    box-shadow: 0 0 0 4px rgba(0, 229, 195, 0.12) !important;
}

.auth-btn {
    min-height: 46px;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #00e5c3, #0ea5e9) !important;
    color: #001310 !important;
    font-weight: 800;
}

.auth-alert,
.alert {
    border-radius: 8px !important;
}

@media (max-width: 480px) {
    .auth-page {
        padding: 16px;
        align-items: flex-start;
    }

    .auth-card {
        padding: 28px 20px !important;
        margin-top: 24px;
    }
}
