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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    min-height: 100vh;
}

.auth-container {
    display: flex;
    min-height: 100vh;
}

.auth-card {
    flex: 1;
    max-width: 500px;
    margin: 0 auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.auth-background {
    flex: 1;
    min-width: 50%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    position: relative;
    overflow: hidden;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo {
    height: 60px;
    width: auto;
    margin-bottom: 24px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #000;
}

.auth-header p {
    color: #666;
    font-size: 16px;
}

/* Plan Selector */
.plan-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.plan-option {
    flex: 1;
    padding: 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    position: relative;
}

.plan-option input[type="radio"] {
    display: none;
}

.plan-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plan-option:hover {
    border-color: #333;
}

.plan-option input[type="radio"]:checked ~ .plan-content {
    background: transparent;
}

.plan-option:has(input[type="radio"]:checked) {
    border-color: #000;
    background: #fafafa;
}

.plan-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #000;
}

.plan-info p {
    font-size: 12px;
    color: #666;
}

.plan-price {
    font-size: 16px;
    font-weight: 700;
    color: #000;
}

/* Form Styles */
.auth-form {
    margin-bottom: 32px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-group {
    margin-bottom: 24px;
    flex: 1;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
    background: #fff;
}

.form-group input:focus {
    outline: none;
    border-color: #000;
}

.form-group input:invalid {
    border-color: #dc3545;
}

.password-strength {
    margin-top: 8px;
    font-size: 12px;
    height: 16px;
}

.password-strength.weak {
    color: #dc3545;
}

.password-strength.medium {
    color: #ffc107;
}

.password-strength.strong {
    color: #28a745;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-group {
    margin-bottom: 16px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 0 !important;
}

/* Hide native checkboxes with multiple selectors for higher specificity */
input[type="checkbox"]#terms,
input[type="checkbox"]#newsletter,
.checkbox-label input[type="checkbox"],
.form-group .checkbox-label input[type="checkbox"] {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    clip: rect(0, 0, 0, 0) !important;
    overflow: hidden !important;
    visibility: hidden !important;
    display: none !important;
}

.checkbox-custom {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    border: 2px solid #e1e5e9 !important;
    border-radius: 4px !important;
    position: relative !important;
    transition: all 0.2s !important;
    flex-shrink: 0 !important;
    margin-top: 2px !important;
    background: #fff !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    display: inline-block !important;
}

.checkbox-label:hover .checkbox-custom {
    border-color: #333;
}

/* Checked state styling with multiple selectors */
input[type="checkbox"]#terms:checked + .checkbox-custom,
input[type="checkbox"]#newsletter:checked + .checkbox-custom,
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom,
.form-group .checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: #000 !important;
    border-color: #000 !important;
}

/* Checkmark styling */
input[type="checkbox"]#terms:checked + .checkbox-custom::after,
input[type="checkbox"]#newsletter:checked + .checkbox-custom::after,
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after,
.form-group .checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: white !important;
    font-size: 12px !important;
    font-weight: bold !important;
    display: block !important;
}


.forgot-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #000;
}

/* Buttons */
.auth-btn, .auth-btn-secondary {
    width: 100%;
    padding: 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.auth-btn {
    background: #000;
    color: white;
    border-color: #000;
    margin-bottom: 16px;
}

.auth-btn:hover:not(:disabled) {
    background: #333;
    border-color: #333;
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-btn-secondary {
    background: #fff;
    color: #333;
    border-color: #e1e5e9;
}

.auth-btn-secondary:hover {
    background: #f5f5f5;
    border-color: #333;
}

.btn-loading {
    display: none;
}

.auth-btn.loading .btn-text {
    display: none;
}

.auth-btn.loading .btn-loading {
    display: block;
}

.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: #e1e5e9;
}

.auth-divider span {
    background: #fff;
    padding: 0 16px;
    color: #666;
    font-size: 14px;
}

.auth-footer {
    text-align: center;
    margin-top: 32px;
}

.auth-footer p {
    color: #666;
    font-size: 14px;
}

.auth-footer a {
    color: #000;
    text-decoration: none;
    font-weight: 600;
}

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

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    font-size: 18px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-background {
        min-height: 200px;
        order: -1;
    }
    
    .auth-card {
        padding: 24px;
        max-width: none;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .plan-selector {
        flex-direction: column;
    }
}