/* auth.css - Authentication page styles for j0 marketplace */

/* ============================================================================
   Auth Container
   ============================================================================ */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-box {
    background: white;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* ============================================================================
   Logo
   ============================================================================ */

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo h1 {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #6366f1;
}

.auth-logo p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* ============================================================================
   Tab Switcher
   ============================================================================ */

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.auth-tabs button {
    flex: 1;
    padding: 12px;
    border: none;
    background: #f1f5f9;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #475569;
    transition: all 0.2s ease;
}

.auth-tabs button:hover {
    background: #e2e8f0;
}

.auth-tabs button.active {
    background: #6366f1;
    color: white;
}

/* ============================================================================
   Forms
   ============================================================================ */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #334155;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #6366f1;
}

.form-group small {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

/* ============================================================================
   Buttons
   ============================================================================ */

.btn-primary {
    width: 100%;
    padding: 12px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-primary:hover {
    background: #4f46e5;
}

.btn-primary:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.btn-secondary {
    width: 100%;
    padding: 12px;
    background: white;
    color: #6366f1;
    border: 1px solid #6366f1;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-secondary:hover {
    background: #f1f5f9;
}

.btn-ghost {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-ghost:hover {
    background: #f8fafc;
    color: #334155;
}

/* ============================================================================
   Links
   ============================================================================ */

.auth-links {
    text-align: center;
    margin-top: 16px;
}

.auth-links a {
    color: #6366f1;
    text-decoration: none;
    font-size: 14px;
}

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

/* ============================================================================
   Divider
   ============================================================================ */

.auth-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
    z-index: 0;
}

.auth-divider span {
    background: white;
    padding: 0 15px;
    position: relative;
    z-index: 1;
    color: #64748b;
    font-size: 14px;
}

/* ============================================================================
   OAuth Buttons
   ============================================================================ */

.oauth-buttons {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    transition: all 0.2s ease;
}

.btn-oauth:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-oauth img {
    width: 20px;
    height: 20px;
}

/* ============================================================================
   Demo Account
   ============================================================================ */

.auth-demo {
    margin-top: 20px;
}

/* ============================================================================
   Modal (Forgot Password)
   ============================================================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 20px;
    margin: 0;
    color: #1e293b;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #1e293b;
}

/* ============================================================================
   Alerts (Success/Error messages)
   ============================================================================ */

.alert {
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.alert p {
    margin: 0 0 15px 0;
    font-size: 14px;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.alert-success h3 {
    color: #15803d;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-error h3 {
    color: #dc2626;
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 480px) {
    .auth-box {
        padding: 30px 20px;
    }
    
    .auth-logo h1 {
        font-size: 36px;
    }
    
    .oauth-buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 360px) {
    .auth-container {
        padding: 10px;
    }
    
    .auth-box {
        padding: 20px 15px;
    }
}
