/* ============================================
   WASEEJ - User Auth Pages (Login & Register)
   ============================================ */
@import url('variables.css');


*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }

body {
    font-family: var(--font-body);
    background: var(--color-bg-dark);
    color: var(--color-text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---- Wrapper ---- */
.auth-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

/* ---- Background ---- */
.bg-animation {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
}

.bg-circle-1 {
    width: 500px;
    height: 500px;
    background: var(--color-primary);
    top: -150px;
    right: -100px;
    animation: float1 15s ease-in-out infinite;
}

.bg-circle-2 {
    width: 400px;
    height: 400px;
    background: #4a3728;
    bottom: -100px;
    left: -80px;
    animation: float2 18s ease-in-out infinite;
}

.bg-circle-3 {
    width: 300px;
    height: 300px;
    background: var(--color-primary-dark);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float3 12s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-60px, 40px) scale(1.1); }
}
@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, -30px) scale(1.15); }
}
@keyframes float3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(0.85); }
}

/* ---- Back Button ---- */
.back-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    font-family: var(--font-body);
    text-decoration: none;
    transition: all var(--transition-base);
    z-index: 10;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    color: var(--color-text-primary);
    border-color: var(--color-primary);
    background: rgba(200, 135, 90, 0.1);
}

/* ---- Auth Card ---- */
.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
    background: rgba(19, 19, 26, 0.8);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    animation: cardIn 0.6s ease-out both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Logo ---- */
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.75rem;
}

.auth-logo .logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 12px var(--color-primary-glow));
}

/* ---- Titles ---- */
.auth-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.auth-subtitle {
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

/* ---- Form ---- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper > i:first-child {
    position: absolute;
    right: 1rem;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    pointer-events: none;
    transition: color var(--transition-base);
}

.input-wrapper input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.5rem;
    padding-right: 2.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition-base);
}

.input-wrapper input:focus {
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.input-wrapper:focus-within > i:first-child {
    color: var(--color-primary);
}

.input-wrapper input::placeholder {
    color: var(--color-text-muted);
}

.toggle-password {
    position: absolute;
    left: 0.75rem;
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.85rem;
    transition: color var(--transition-base);
}

.toggle-password:hover {
    color: var(--color-text-primary);
}

/* ---- Error & Success ---- */
.form-error,
.form-success {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    animation: shake 0.4s ease-in-out;
}

.form-error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: var(--color-error);
}

.form-success {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    color: var(--color-success);
    animation: none;
}

.form-error.show,
.form-success.show {
    display: flex;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* ---- Forgot Password ---- */
.forgot-password-row {
    text-align: left;
    margin-top: -0.25rem;
}

.forgot-link {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition-base);
}

.forgot-link:hover {
    color: var(--color-primary-light);
    text-decoration: underline;
}

/* ---- Auth Button ---- */
.auth-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.9rem;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    margin-top: 0.25rem;
}

.auth-btn:hover {
    background: var(--color-primary-light);
    transform: translateY(-1px);
    box-shadow: 0 0 25px var(--color-primary-glow);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn.loading span,
.auth-btn.loading i {
    opacity: 0;
}

.auth-btn.loading::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- Divider ---- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.auth-divider span {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* ---- Switch Link ---- */
.auth-switch {
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.switch-link {
    color: var(--color-primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-base);
}

.switch-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* ---- Password Strength ---- */
.password-strength {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.strength-bar {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    transition: background var(--transition-base);
}

.strength-bar.weak { background: var(--color-error); }
.strength-bar.medium { background: #fbbf24; }
.strength-bar.strong { background: var(--color-success); }

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }

    .back-btn {
        top: 1rem;
        right: 1rem;
    }

    .auth-title {
        font-size: 1.25rem;
    }
}
