
.auth-container {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    pointer-events: none;
}

.auth-visual-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255,255,255,0.1);
}

.auth-visual-content {
    text-align: center;
    color: white;
    z-index: 2;
    max-width: 400px;
}

.auth-logo {
    display: inline-block;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.auth-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.auth-logo img {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
}

.auth-logo span {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.auth-visual-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.auth-visual-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.shape-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
}

.shape-bg::before,
.shape-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    animation: float 6s ease-in-out infinite;
}

.shape-bg::before {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
    animation-delay: -2s;
}

.shape-bg::after {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -100px;
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: white;
    position: relative;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 450px;
    padding: 3rem;
    background: white;
    border-radius: 24px;
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.1),
        0 10px 25px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.auth-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

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

.auth-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: #718096;
    font-size: 1rem;
    line-height: 1.5;
}

.auth-link {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.auth-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.auth-link:hover::after {
    width: 100%;
}

.auth-link:hover {
    color: #764ba2;
    transform: translateY(-1px);
}

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

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

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.input-label {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-field {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
    color: #2d3748;
}

.input-field:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 
        0 0 0 3px rgba(102, 126, 234, 0.1),
        0 4px 12px rgba(0,0,0,0.05);
    transform: translateY(-1px);
}

.input-field::placeholder {
    color: #a0aec0;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: #a0aec0;
    font-size: 1.1rem;
    z-index: 2;
    transition: color 0.3s ease;
}

.input-field:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: #667eea;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.input-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-weight: 500;
}

.input-error i {
    color: #dc2626;
    font-size: 0.875rem;
}

.domain-type-toggle {
    display: flex;
    background: #f7fafc;
    border-radius: 12px;
    padding: 0.25rem;
    border: 2px solid #e2e8f0;
}

.domain-type-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #718096;
}

.domain-type-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

.domain-input {
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    overflow: hidden;
    transition: all 0.3s ease;
}

.domain-input:focus-within {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.domain-prefix,
.domain-suffix {
    padding: 1rem;
    background: #e2e8f0;
    color: #4a5568;
    font-weight: 500;
    white-space: nowrap;
}

.domain-input-field {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #2d3748;
}

.domain-input-field:focus {
    outline: none;
}

.form-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #718096;
    font-weight: 500;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e2e8f0 50%, transparent 100%);
}

.form-divider span {
    padding: 0 1rem;
    background: white;
    font-size: 0.9rem;
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.custom-checkbox:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

.checkbox-label {
    color: #4a5568;
    font-size: 0.9rem;
    cursor: pointer;
}

.submit-wrapper {
    margin-top: 1rem;
}

.btn-auth {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

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

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

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 25px rgba(102, 126, 234, 0.4),
        0 5px 15px rgba(0,0,0,0.1);
}

.btn-auth:active {
    transform: translateY(0);
}

.icon-rtl-flip {
    transition: transform 0.3s ease;
}

.btn-auth:hover .icon-rtl-flip {
    transform: translateX(-3px);
}

.register-visual-panel {
    background: linear-gradient(135deg, rgba(118, 75, 162, 0.1) 0%, rgba(102, 126, 234, 0.05) 100%);
}

@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
    }
    
    .auth-visual-panel {
        display: none;
    }
    
    .auth-form-panel {
        padding: 1rem;
    }
    
    .auth-form-wrapper {
        padding: 2rem;
        margin: 1rem 0;
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .auth-title {
        font-size: 2rem;
    }
    
    .auth-visual-title {
        font-size: 2.5rem;
    }
    
    .auth-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .auth-form-wrapper {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .input-field {
        padding: 0.875rem 0.875rem 0.875rem 2.5rem;
    }
    
    .domain-prefix,
    .domain-suffix {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
}

[dir="rtl"] .input-field {
    padding: 1rem 3rem 1rem 1rem;
}

[dir="rtl"] .input-icon {
    left: auto;
    right: 1rem;
}

[dir="rtl"] .password-toggle {
    right: auto;
    left: 1rem;
}

[dir="rtl"] .icon-rtl-flip {
    transform: scaleX(-1);
}

[dir="rtl"] .btn-auth:hover .icon-rtl-flip {
    transform: scaleX(-1) translateX(-3px);
}

.btn-auth.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-auth.loading::after {
    content: '';
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.input-field.success {
    border-color: #38a169;
    background: #f0fff4;
}

.input-field.error {
    border-color: #e53e3e;
    background: #fff5f5;
}

.auth-form-wrapper:focus-within {
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.15),
        0 10px 25px rgba(0,0,0,0.1),
        0 0 0 1px rgba(102, 126, 234, 0.1);
}