/* ===== AUTH PAGES STYLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --auth-primary: #6366f1;
    --auth-primary-hover: #4f46e5;
    --auth-primary-light: rgba(99, 102, 241, 0.1);
    --auth-primary-glow: rgba(99, 102, 241, 0.4);
    --auth-bg-start: #0f0f23;
    --auth-bg-mid: #1a1a3e;
    --auth-bg-end: #0d0d2b;
    --auth-card-bg: rgba(255, 255, 255, 0.03);
    --auth-card-border: rgba(255, 255, 255, 0.08);
    --auth-text-primary: #f1f5f9;
    --auth-text-secondary: #94a3b8;
    --auth-text-muted: #64748b;
    --auth-input-bg: rgba(255, 255, 255, 0.04);
    --auth-input-border: rgba(255, 255, 255, 0.1);
    --auth-input-focus-border: var(--auth-primary);
    --auth-danger: #ef4444;
    --auth-success: #22c55e;
    --auth-warning: #f59e0b;
}

/* ===== FULL PAGE LAYOUT ===== */
.auth-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--auth-bg-start) 0%, var(--auth-bg-mid) 50%, var(--auth-bg-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

/* ===== ANIMATED BACKGROUND ===== */
.auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.04) 0%, transparent 50%);
    animation: auth-bg-rotate 30s linear infinite;
    pointer-events: none;
}

@keyframes auth-bg-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Floating orbs */
.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    animation: auth-float 8s ease-in-out infinite;
}

.auth-orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(99, 102, 241, 0.12);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.auth-orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(139, 92, 246, 0.1);
    bottom: -80px;
    left: -80px;
    animation-delay: -4s;
}

.auth-orb-3 {
    width: 200px;
    height: 200px;
    background: rgba(59, 130, 246, 0.08);
    top: 50%;
    left: 50%;
    animation-delay: -2s;
}

@keyframes auth-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ===== AUTH CONTAINER ===== */
.auth-container {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
}

/* ===== BRAND AREA ===== */
.auth-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--auth-primary), #8b5cf6);
    margin-bottom: 1rem;
    box-shadow: 0 8px 32px var(--auth-primary-glow);
    animation: auth-logo-pulse 3s ease-in-out infinite;
}

.auth-brand-logo svg {
    width: 32px;
    height: 32px;
    color: white;
}

@keyframes auth-logo-pulse {
    0%, 100% { box-shadow: 0 8px 32px var(--auth-primary-glow); }
    50% { box-shadow: 0 8px 48px rgba(99, 102, 241, 0.6); }
}

.auth-brand h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--auth-text-primary);
    letter-spacing: -0.03em;
    margin: 0;
}

.auth-brand p {
    color: var(--auth-text-secondary);
    font-size: 0.938rem;
    margin-top: 0.5rem;
    font-weight: 400;
}

/* ===== CARD ===== */
.auth-card {
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-card-border);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.02),
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    position: relative;
    overflow: hidden;
    animation: auth-card-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes auth-card-enter {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(99, 102, 241, 0.3),
        rgba(139, 92, 246, 0.3),
        transparent
    );
}

/* ===== FORM ELEMENTS ===== */
.auth-form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.auth-form-label {
    display: block;
    font-size: 0.813rem;
    font-weight: 600;
    color: var(--auth-text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    color: var(--auth-text-muted);
    transition: color 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.auth-input-icon svg {
    width: 18px;
    height: 18px;
}

.auth-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    background: var(--auth-input-bg);
    border: 1.5px solid var(--auth-input-border);
    border-radius: 12px;
    color: var(--auth-text-primary);
    font-size: 0.938rem;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.auth-input::placeholder {
    color: var(--auth-text-muted);
}

.auth-input:focus {
    border-color: var(--auth-input-focus-border);
    background: rgba(99, 102, 241, 0.04);
    box-shadow: 0 0 0 3px var(--auth-primary-light), 0 4px 16px rgba(99, 102, 241, 0.1);
}

.auth-input:focus ~ .auth-input-icon,
.auth-input:focus + .auth-input-icon {
    color: var(--auth-primary);
}

.auth-input-wrapper:focus-within .auth-input-icon {
    color: var(--auth-primary);
}

/* Password Toggle */
.auth-password-toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--auth-text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    z-index: 1;
}

.auth-password-toggle:hover {
    color: var(--auth-text-secondary);
}

.auth-password-toggle svg {
    width: 18px;
    height: 18px;
}

/* ===== SUBMIT BUTTON ===== */
.auth-btn {
    width: 100%;
    padding: 0.938rem 1.5rem;
    background: linear-gradient(135deg, var(--auth-primary), #8b5cf6);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.938rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--auth-primary-glow);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Spinner inside button */
.auth-btn .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: auth-spin 0.8s linear infinite;
}

.auth-btn.loading .spinner {
    display: inline-block;
}

.auth-btn.loading .btn-text {
    display: none;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

/* ===== DIVIDER ===== */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.75rem 0;
    color: var(--auth-text-muted);
    font-size: 0.813rem;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--auth-card-border), transparent);
}

/* ===== FOOTER LINK ===== */
.auth-footer {
    text-align: center;
    margin-top: 1.75rem;
    color: var(--auth-text-secondary);
    font-size: 0.875rem;
}

.auth-footer a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.auth-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--auth-primary);
    transition: width 0.3s ease;
}

.auth-footer a:hover::after {
    width: 100%;
}

.auth-footer a:hover {
    color: #818cf8;
}

/* ===== ALERT / TOAST MESSAGES ===== */
.auth-alert {
    padding: 0.875rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    display: none;
    align-items: center;
    gap: 0.625rem;
    animation: auth-alert-slide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-alert.show {
    display: flex;
}

@keyframes auth-alert-slide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.auth-alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.auth-alert svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ===== PASSWORD STRENGTH ===== */
.password-strength {
    margin-top: 0.5rem;
    display: none;
}

.password-strength.show {
    display: block;
}

.strength-bars {
    display: flex;
    gap: 4px;
    margin-bottom: 0.375rem;
}

.strength-bar {
    flex: 1;
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.3s ease;
}

.strength-bar.active.weak { background: var(--auth-danger); }
.strength-bar.active.medium { background: var(--auth-warning); }
.strength-bar.active.strong { background: var(--auth-success); }

.strength-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--auth-text-muted);
}

.strength-text.weak { color: var(--auth-danger); }
.strength-text.medium { color: var(--auth-warning); }
.strength-text.strong { color: var(--auth-success); }

/* ===== CHECKBOX / REMEMBER ME ===== */
.auth-checkbox-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--auth-text-secondary);
}

.auth-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--auth-input-border);
    border-radius: 5px;
    background: var(--auth-input-bg);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.auth-checkbox input[type="checkbox"]:checked {
    background: var(--auth-primary);
    border-color: var(--auth-primary);
}

.auth-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.auth-forgot-link {
    font-size: 0.813rem;
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-forgot-link:hover {
    color: #818cf8;
}

/* ===== PARTICLES / STARS ===== */
.auth-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.auth-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: auth-twinkle 3s ease-in-out infinite;
}

@keyframes auth-twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.8; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 576px) {
    .auth-page {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.75rem 1.5rem;
        border-radius: 16px;
    }

    .auth-brand-logo {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }

    .auth-brand h1 {
        font-size: 1.5rem;
    }
}
