/*
    AUTH CORE STYLES
    Stripe-inspired authentication pages with modern, minimal design
    Shared styles across all auth pages
*/

@import url('animations.css');

:root {
    --color-primary: #017ACA;
    --color-primary-hover: #0096E5;
    --color-primary-dark: #0a2540;
    --color-text: #0f172a;
    --color-text-secondary: #475569;
    --color-text-muted: #64748b;
    --color-border: #e2e8f0;
    --color-border-hover: #cbd5e1;
    --color-bg: #ffffff;
    --color-bg-light: #f8fafc;
    --color-bg-subtle: #fafbfc;
    --color-focus: #017ACA;
    --color-focus-ring: rgba(1, 122, 202, 0.1);
    --color-success: #10b981;
    --color-success-bg: #f0fdf4;
    --color-success-border: #bbf7d0;
    --color-error: #dc2626;
    --color-error-bg: #fef2f2;
    --color-error-border: #fecaca;
    
    --gradient-primary: linear-gradient(135deg, #017ACA 0%, #0096E5 100%);
    --gradient-orb-1: radial-gradient(circle at center, rgba(1, 122, 202, 0.10) 0%, transparent 70%);
    --gradient-orb-2: radial-gradient(circle at center, rgba(0, 150, 229, 0.08) 0%, transparent 70%);
    
    --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
    
    --transition-base: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-system);
    background: linear-gradient(180deg, #fafbfc 0%, #f0f3f7 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    padding: 1.5rem;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    top: -10%;
    right: -10%;
    background: var(--gradient-orb-1);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: float-orb 25s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    width: 500px;
    height: 500px;
    bottom: -15%;
    left: -15%;
    background: var(--gradient-orb-2);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: float-orb 30s ease-in-out infinite 7s;
}

@keyframes float-orb {
    0%, 100% { 
        transform: translate(0, 0) scale(1); 
    }
    25% { 
        transform: translate(30px, -50px) scale(1.05); 
    }
    50% { 
        transform: translate(-20px, 30px) scale(0.95); 
    }
    75% { 
        transform: translate(40px, 20px) scale(1.02); 
    }
}

.auth-container {
    width: 100%;
    max-width: 540px;
    background: var(--color-bg);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.02),
        0 4px 6px -1px rgba(0, 0, 0, 0.08),
        0 10px 15px -3px rgba(0, 0, 0, 0.06),
        0 20px 25px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slide-up 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-container:hover {
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.03),
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 12px 20px -3px rgba(0, 0, 0, 0.08),
        0 25px 35px -5px rgba(0, 0, 0, 0.06);
}

.auth-container.wide {
    max-width: 600px;
}

.logo {
    width: 48px;
    height: 48px;
    margin: 0 auto 1.5rem;
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.logo:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--color-primary-dark);
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-bg);
    color: var(--color-text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.01),
        0 1px 2px rgba(0, 0, 0, 0.04);
}

.form-control::-ms-reveal,
.form-control::-ms-clear {
    display: none;
}

.form-control::-webkit-credentials-auto-fill-button,
.form-control::-webkit-contacts-auto-fill-button {
    visibility: hidden;
    position: absolute;
    right: 0;
}

.form-control:hover {
    border-color: var(--color-border-hover);
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.02),
        0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-focus);
    box-shadow: 
        0 0 0 3px var(--color-focus-ring),
        0 2px 4px rgba(0, 0, 0, 0.04);
    background: var(--color-bg);
}

.form-control::placeholder {
    color: var(--color-text-muted);
}

.form-control.error {
    border-color: var(--color-error);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.error-message {
    font-size: 0.8125rem;
    color: var(--color-error);
    margin-top: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.875rem;
    background: var(--color-bg-light);
    border: 1.5px solid var(--color-border);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-check:hover {
    border-color: var(--color-border-hover);
    background: rgba(248, 250, 252, 0.8);
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin: 0;
    border: 2px solid var(--color-text-secondary);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    appearance: none;
    background: var(--color-bg);
    position: relative;
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.03),
        0 2px 4px rgba(0, 0, 0, 0.06);
}

.form-check-input:hover {
    border-color: var(--color-text);
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 2px 6px rgba(0, 0, 0, 0.08);
}

.form-check-input:checked {
    background: var(--gradient-primary);
    border-color: var(--color-focus);
    box-shadow: 
        0 0 0 1px var(--color-focus),
        0 2px 8px rgba(1, 122, 202, 0.3);
}

.form-check-input:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
}

.form-check-input:focus {
    outline: none;
    box-shadow: 
        0 0 0 3px var(--color-focus-ring),
        0 2px 4px rgba(0, 0, 0, 0.06);
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--color-text);
    cursor: pointer;
    user-select: none;
    line-height: 1.5;
    font-weight: 500;
}

.form-check-label a {
    color: var(--color-focus);
    text-decoration: none;
    transition: var(--transition-base);
}

.form-check-label a:hover {
    text-decoration: underline;
}

.btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 
        0 0 0 1px rgba(1, 122, 202, 0.1),
        0 2px 4px rgba(1, 122, 202, 0.15),
        0 8px 16px rgba(1, 122, 202, 0.2);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 0 0 1px rgba(1, 122, 202, 0.15),
        0 4px 8px rgba(1, 122, 202, 0.2),
        0 12px 24px rgba(1, 122, 202, 0.25);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(0);
    transition: all 0.1s ease;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 2px solid rgba(10, 37, 64, 0.1);
}

.btn-secondary:hover {
    border-color: rgba(10, 37, 64, 0.2);
    background: rgba(10, 37, 64, 0.02);
}

.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
}

.auth-footer-text {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.auth-footer a {
    color: var(--color-focus);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-base);
}

.auth-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.5;
}

.alert-icon {
    flex-shrink: 0;
    font-size: 1rem;
    margin-top: 0.125rem;
}

.alert-success {
    background: var(--color-success-bg);
    border: 1px solid var(--color-success-border);
    color: #15803d;
}

.alert-danger {
    background: var(--color-error-bg);
    border: 1px solid var(--color-error-border);
    color: #991b1b;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem;
    }
    
    .auth-container {
        padding: 1.75rem;
        max-width: 100%;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-subtitle {
        font-size: 0.875rem;
    }
}

