/**
 * CodeFit Auth Forms Styles
 */

.cf-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
    background: var(--cf-bg-primary);
    position: relative;
}

.cf-auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.cf-auth-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

.cf-auth-card {
    background: var(--cf-bg-card);
    border: 1px solid var(--cf-border);
    border-radius: var(--cf-radius-lg);
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.cf-auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.cf-auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    text-decoration: none;
    color: var(--cf-text-primary);
}

.cf-auth-logo-icon {
    width: 48px;
    height: 48px;
    background: var(--cf-accent-gradient);
    border-radius: var(--cf-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.25rem;
    color: white;
}

.cf-auth-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
}

.cf-auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--cf-text-primary);
}

.cf-auth-subtitle {
    color: var(--cf-text-secondary);
    font-size: 0.95rem;
}

.cf-social-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.cf-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--cf-radius);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--cf-border);
}

.cf-social-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.cf-social-btn-github {
    background: #24292e;
    color: #fff;
    border-color: #24292e;
}

.cf-social-btn-github:hover {
    background: #2f363d;
    color: #fff;
    transform: translateY(-2px);
}

.cf-auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--cf-text-muted);
    font-size: 0.85rem;
}

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

.cf-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cf-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cf-form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--cf-text-secondary);
}

.cf-form-group input[type="text"],
.cf-form-group input[type="email"],
.cf-form-group input[type="password"],
.cf-form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--cf-bg-secondary);
    border: 1px solid var(--cf-border);
    border-radius: var(--cf-radius);
    color: var(--cf-text-primary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.cf-form-group input:focus,
.cf-form-group select:focus {
    outline: none;
    border-color: var(--cf-accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.cf-form-group input::placeholder {
    color: var(--cf-text-muted);
}

.cf-member-type-select {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.cf-member-type-option {
    position: relative;
    cursor: pointer;
}

.cf-member-type-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cf-member-type-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: var(--cf-bg-secondary);
    border: 2px solid var(--cf-border);
    border-radius: var(--cf-radius);
    transition: all 0.2s ease;
}

.cf-member-type-option input:checked + .cf-member-type-box {
    border-color: var(--cf-accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

.cf-member-type-icon {
    font-size: 2rem;
}

.cf-member-type-label {
    font-weight: 600;
    color: var(--cf-text-primary);
}

.cf-member-type-desc {
    font-size: 0.75rem;
    color: var(--cf-text-muted);
}

.cf-role-select {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.cf-role-option {
    position: relative;
    cursor: pointer;
}

.cf-role-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cf-role-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    background: var(--cf-bg-secondary);
    border: 2px solid var(--cf-border);
    border-radius: var(--cf-radius);
    transition: all 0.2s ease;
}

.cf-role-option input:checked + .cf-role-box.developer {
    border-color: var(--cf-dev-color);
    background: rgba(34, 211, 238, 0.1);
}

.cf-role-option input:checked + .cf-role-box.designer {
    border-color: var(--cf-design-color);
    background: rgba(244, 114, 182, 0.1);
}

.cf-role-option input:checked + .cf-role-box.pm {
    border-color: var(--cf-pm-color);
    background: rgba(250, 204, 21, 0.1);
}

.cf-role-icon {
    font-size: 1.5rem;
}

.cf-role-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cf-text-primary);
}

.cf-company-fields {
    display: none;
    flex-direction: column;
    gap: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--cf-border);
    margin-top: 0.5rem;
}

.cf-company-fields.active {
    display: flex;
}

.cf-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.cf-checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--cf-accent-primary);
    flex-shrink: 0;
}

.cf-checkbox-group label {
    font-size: 0.875rem;
    color: var(--cf-text-secondary);
    line-height: 1.5;
}

.cf-checkbox-group a {
    color: var(--cf-accent-primary);
}

.cf-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cf-forgot-link {
    font-size: 0.875rem;
    color: var(--cf-accent-primary);
}

.cf-auth-submit {
    width: 100%;
    padding: 1rem;
    background: var(--cf-accent-gradient);
    border: none;
    border-radius: var(--cf-radius);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.cf-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.cf-auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.cf-auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--cf-border);
    color: var(--cf-text-secondary);
    font-size: 0.9rem;
}

.cf-auth-footer a {
    color: var(--cf-accent-primary);
    font-weight: 500;
}

.cf-auth-message {
    padding: 1rem;
    border-radius: var(--cf-radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.cf-auth-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.cf-auth-message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

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

    .cf-member-type-select {
        grid-template-columns: 1fr;
    }

    .cf-role-select {
        grid-template-columns: 1fr;
    }
}
