:root {
    --psb-blue: #0033A0;
    --psb-orange: #FF6B35;
    --psb-white: #FFFFFF;
    --psb-light-blue: #F0F5FF;
    --psb-gray: #64748b;
    --psb-light-gray: #f8fafc;
    --psb-border: #e2e8f0;
    --psb-dark: #1e293b;
    --success: #18b983;
    --error: #ef4444;
    --warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #334155;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from { 
        opacity: 0;
        transform: translateX(-50px);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from { 
        opacity: 0;
        transform: translateX(50px);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 51, 160, 0.3); }
    50% { box-shadow: 0 0 20px rgba(0, 51, 160, 0.6); }
}

.loading-content {
    text-align: center;
    color: white;
    animation: slideInUp 0.8s ease;
}

.logo-pulse {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    animation: pulse 2s infinite, glow 3s infinite;
    backdrop-filter: blur(10px);
}

.logo-pulse span {
    font-size: 24px;
    font-weight: 800;
    color: white;
}

.loading-progress {
    width: 200px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 10px;
}


.loading-progress p {
    font-size: 14px;
    opacity: 0.9;
}

/* Main Container */
.auth-container {
    display: flex;
    min-height: 100vh;
    opacity: 0;
    animation: fadeIn 0.8s ease 0.5s forwards;
}

/* Left Info Panel */
.auth-info {
    flex: 1;
    background: linear-gradient(135deg, var(--psb-blue), #0048C8);
    color: white;
    padding: 60px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.auth-info::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" preserveAspectRatio="none"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.auth-info-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
    animation: slideInLeft 1s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.logo-image {
    width: 250px;
    object-fit: contain;
    border-radius: 8px;
}

.logo-icon img {
    object-fit: contain;
    border-radius: 8px;
}

.icon-text {
    font-size: 18px;
    font-weight: 800;
    color: white;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.logo-subtitle {
    opacity: 0.8;
    font-size: 14px;
}

.info-features {
    margin-bottom: 50px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
    opacity: 0;
    animation: slideInLeft 0.8s ease forwards;
}

.feature-item:nth-child(1) { animation-delay: 0.8s; }
.feature-item:nth-child(2) { animation-delay: 1s; }
.feature-item:nth-child(3) { animation-delay: 1.2s; }
.feature-item:nth-child(4) { animation-delay: 1.4s; }

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.feature-item:hover .feature-icon {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.feature-text h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-text p {
    opacity: 0.8;
    font-size: 14px;
    line-height: 1.5;
}

.testimonial {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    animation: slideInUp 1s ease 1.6s forwards;
}

.quote-icon {
    font-size: 40px;
    opacity: 0.5;
    line-height: 1;
}

.testimonial-content p {
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.6;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.testimonial-author div {
    display: flex;
    flex-direction: column;
}

.testimonial-author strong {
    font-weight: 600;
}

.testimonial-author span {
    opacity: 0.7;
    font-size: 14px;
}

/* Right Form Panel */
.auth-form-container {
    flex: 1;
    background: var(--psb-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    position: relative;
    animation: slideInRight 1s ease;
}

.registration-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--psb-white);
    padding: 30px 40px;
    border-bottom: 1px solid var(--psb-border);
    display: none;
}

.registration-progress.active {
    display: block;
    animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--psb-border);
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: var(--psb-blue);
    color: white;
    transform: scale(1.1);
}

.step.completed .step-number {
    background: var(--success);
    color: white;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--psb-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step span {
    font-size: 12px;
    font-weight: 500;
    color: var(--psb-gray);
}

.step.active span {
    color: var(--psb-blue);
    font-weight: 600;
}

.progress-bar {
    height: 4px;
    background: var(--psb-border);
    border-radius: 2px;
    overflow: hidden;
}

.auth-form-content {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: slideInUp 0.5s ease;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: slideInUp 0.5s ease;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--psb-dark);
    margin-bottom: 10px;
}

.form-header p {
    color: var(--psb-gray);
    font-size: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--psb-dark);
    font-size: 14px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i:first-child {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--psb-gray);
    z-index: 2;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px 15px 15px 10px;
    border: 2px solid var(--psb-border);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: var(--psb-white);
    position: relative;
    z-index: 1;
}

.input-with-icon input {
    padding-left: 45px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--psb-blue);
    box-shadow: 0 0 0 3px rgba(0, 51, 160, 0.1);
    transform: translateY(-2px);
}

.form-group input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: var(--error);
    animation: shake 0.5s ease;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--psb-gray);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: color 0.2s ease;
    z-index: 2;
    margin-right: 15px; /* Добавляем отступ справа */
}

.toggle-password:hover {
    color: var(--psb-blue);
}

.password-strength {
    margin-top: 10px;
}

.strength-bar {
    height: 6px;
    background: var(--psb-border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 12px;
    color: var(--psb-gray);
}

/* Уровни надежности пароля */
.password-weak .strength-fill {
    width: 25%;
    background: var(--error);
}

.password-medium .strength-fill {
    width: 50%;
    background: var(--warning);
}

.password-strong .strength-fill {
    width: 75%;
    background: var(--psb-blue);
}

.password-very-strong .strength-fill {
    width: 100%;
    background: var(--success);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--psb-gray);
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--psb-border);
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input:checked + .checkmark {
    background: var(--psb-blue);
    border-color: var(--psb-blue);
    animation: bounceIn 0.3s ease;
}

.checkbox-container input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-container a {
    color: var(--psb-blue);
    text-decoration: none;
    font-weight: 500;
}

.checkbox-container a:hover {
    text-decoration: underline;
}

.forgot-password {
    color: var(--psb-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.form-actions .btn-auth {
    flex: 1;
}

.btn-auth {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-auth::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-auth:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--psb-blue);
    color: white;
}

.btn-primary:hover {
    background: #002680;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 51, 160, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--psb-blue);
    border: 2px solid var(--psb-blue);
}

.btn-outline:hover {
    background: var(--psb-light-blue);
    transform: translateY(-2px);
}

.btn-next, .btn-prev {
    transition: all 0.3s ease;
}

.btn-next:hover {
    transform: translateX(5px) translateY(-2px);
}

.btn-prev:hover {
    transform: translateX(-5px) translateY(-2px);
}

.btn-loader {
    display: none;
}

.loader-dots {
    display: flex;
    gap: 4px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: dotPulse 1.4s ease-in-out infinite both;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.btn-auth.loading .btn-text {
    opacity: 0;
}

.btn-auth.loading .btn-loader {
    display: flex;
}

.btn-auth.loading i {
    opacity: 0;
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 25px 0;
    color: var(--psb-gray);
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--psb-border);
}

.auth-divider span {
    background: var(--psb-white);
    padding: 0 15px;
    position: relative;
    font-size: 14px;
}

.social-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 25px;
}

.btn-social {
    padding: 12px;
    border: 2px solid var(--psb-border);
    border-radius: 10px;
    background: var(--psb-white);
    color: var(--psb-dark);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-social:hover {
    border-color: var(--psb-blue);
    background: var(--psb-light-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-google:hover {
    border-color: #DB4437;
    background: #fef2f2;
}

.btn-microsoft:hover {
    border-color: #737373;
    background: #f8f9fa;
}

.auth-switch {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid var(--psb-border);
}

.auth-switch p {
    color: var(--psb-gray);
    margin: 0;
}

.auth-switch a {
    color: var(--psb-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-switch a:hover {
    text-decoration: underline;
    transform: translateX(2px);
}

/* Notification System */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.notification {
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 350px;
    border-left: 4px solid var(--success);
    animation: slideInRight 0.3s ease, slideOutRight 0.3s ease 2.7s forwards;
}

.notification.error {
    border-left-color: var(--error);
}

.notification.warning {
    border-left-color: var(--warning);
}

.notification i {
    font-size: 20px;
}

.notification.success i {
    color: var(--success);
}

.notification.error i {
    color: var(--error);
}

.notification.warning i {
    color: var(--warning);
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Адаптивность */
@media (max-width: 1024px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-info {
        padding: 40px;
    }
    
    .auth-info-content {
        max-width: none;
    }
    
    .auth-form-container {
        padding: 40px 20px;
    }
}

@media (max-width: 768px) {
    .auth-info {
        padding: 30px 20px;
    }
    
    .logo {
        margin-bottom: 40px;
    }
    
    .feature-item {
        gap: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .social-auth {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .auth-info {
        padding: 20px 15px;
    }
    
    .auth-form-container {
        padding: 20px 15px;
    }
    
    .form-header h2 {
        font-size: 24px;
    }
    
    .progress-steps {
        gap: 15px;
        align-items: flex-start;
    }
    
    .progress-steps::before {
        display: none;
    }
    
    .step {
        flex-direction: row;
        gap: 10px;
    }
    
    .step-number {
        margin-bottom: 0;
    }
}

/* Floating animation for decorative elements */
.floating {
    animation: float 6s ease-in-out infinite;
}

.floating-1 { animation-delay: 0s; }
.floating-2 { animation-delay: 2s; }
.floating-3 { animation-delay: 4s; }