@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #5145cd; /* Точный фиолетово-синий */
    --primary-hover: #4236a8;
    --bg-main: #f8f9fc;
    --bg-card: #ffffff;
    --text-dark: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --input-bg: #ffffff;
    --shadow-soft: 0 12px 40px -12px rgba(81, 69, 205, 0.12);
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
    /* Мягкий градиент на фоне как в макете */
    background: radial-gradient(100% 100% at 0% 0%, #ffffff 0%, #f4f5fb 50%, #eaeefa 100%);
}

.layout {
    display: flex;
    max-width: 1300px;
    width: 100%;
    min-height: 100vh;
}

/* Левая часть */
.info-section {
    flex: 1.2;
    padding: 60px 40px 60px 60px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.info-content {
    max-width: 500px;
    animation: fadeRight 0.8s ease-out;
}

.logo-area { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; }
.logo-text { font-size: 24px; font-weight: 700; color: var(--primary); letter-spacing: -0.5px; }

.main-title { font-size: 42px; font-weight: 700; line-height: 1.15; margin-bottom: 20px; color: var(--text-dark); letter-spacing: -1px; }
.highlight { color: var(--primary); }

.subtitle { font-size: 15px; color: var(--text-muted); line-height: 1.6; margin-bottom: 40px; font-weight: 400; }

.features { display: flex; flex-direction: column; gap: 28px; }
.feature-item { display: flex; gap: 16px; align-items: flex-start; transition: transform 0.3s ease; }
.feature-item:hover { transform: translateX(5px); }
.feature-icon {
    width: 44px; height: 44px;
    background: #f0f1fa; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.feature-text h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; color: var(--text-dark); }
.feature-text p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* Анимированные декорации левой части (эффект левитации) */
.decorations { position: absolute; bottom: 50px; right: -50px; width: 400px; height: 300px; pointer-events: none; z-index: -1; }
.decor-dashboard {
    position: absolute; bottom: 20px; left: 0;
    width: 280px; height: 180px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    transform: rotate(-5deg) perspective(1000px) rotateY(10deg);
}
.dash-header { height: 30px; border-bottom: 1px solid #f0f0f0; padding: 10px; }
.dash-header::before { content:''; display:block; width:8px; height:8px; border-radius:50%; background:#e5e7eb; box-shadow: 12px 0 0 #e5e7eb, 24px 0 0 #e5e7eb;}
.dash-body { padding: 10px; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; height: 130px; }
.dash-body::before { content:''; background: #f3f4f6; border-radius: 8px; }
.dash-body::after { content:''; background: #f0f1fa; border-radius: 8px; }

.decor-icon {
    position: absolute;
    background: #fff; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 25px rgba(81, 69, 205, 0.1);
}
.icon-t { width: 50px; height: 50px; top: 20px; right: 80px; font-weight: bold; font-size: 24px; color: var(--primary); }
.icon-wave { width: 60px; height: 60px; bottom: 40px; left: -30px; border-radius: 20px; }
.icon-dots { width: 50px; height: 50px; bottom: 10px; right: 40px; }

/* Правая часть (Карточка) */
.auth-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    animation: fadeLeft 0.8s ease-out;
}

.auth-card {
    background: var(--bg-card);
    width: 100%; max-width: 440px;
    padding: 40px; border-radius: 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Табы с анимацией */
.tabs-container { border-bottom: 1px solid var(--border-color); margin-bottom: 32px; position: relative; }
.tabs { display: flex; position: relative; }
.tab-btn {
    flex: 1; padding: 12px 0; background: none; border: none;
    font-size: 14px; font-weight: 600; color: var(--text-muted);
    cursor: pointer; transition: color 0.3s;
}
.tab-btn.active { color: var(--text-dark); }
.tab-indicator {
    position: absolute; bottom: -1px; left: 0;
    width: 50%; height: 2px; background: var(--primary);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-header { margin-bottom: 28px; }
.auth-header h2 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.auth-header p { color: var(--text-muted); font-size: 13px; }

/* Формы (Fade in) */
.auth-form { display: none; opacity: 0; }
.auth-form.active { display: block; animation: formFadeIn 0.4s forwards; }

.input-group { margin-bottom: 16px; }
.input-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text-dark); }
.input-wrapper { position: relative; }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #9ca3af; transition: color 0.3s; }
.input-wrapper input {
    width: 100%; padding: 12px 14px 12px 40px;
    border: 1px solid var(--border-color); border-radius: 12px;
    background: var(--input-bg); font-size: 14px; color: var(--text-dark);
    transition: all 0.2s; outline: none; font-family: inherit;
}
.input-wrapper input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(81, 69, 205, 0.1); }
.input-wrapper input:focus + .input-icon { color: var(--primary); }
.eye-icon {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; color: #9ca3af; cursor: pointer; transition: color 0.2s;
}
.eye-icon:hover { color: var(--text-dark); }

.forgot-password { text-align: right; margin-top: -6px; margin-bottom: 24px; }
.forgot-password a, .switch-form a { color: var(--primary); text-decoration: none; font-size: 13px; font-weight: 500; }
.forgot-password a:hover, .switch-form a:hover { text-decoration: underline; }

.submit-btn {
    width: 100%; padding: 14px; background: var(--primary); color: white;
    border: none; border-radius: 12px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(81, 69, 205, 0.3);
}
.submit-btn:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(81, 69, 205, 0.4); }
.submit-btn:active { transform: translateY(1px); }

.switch-form { text-align: center; margin-top: 24px; font-size: 13px; color: var(--text-muted); }

.security-note {
    display: flex; gap: 10px; align-items: flex-start; justify-content: center;
    margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border-color);
    color: var(--text-muted); font-size: 11px; line-height: 1.5; text-align: left;
}
.security-note svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--primary); }

/* Анимации Keyframes */
@keyframes formFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeRight { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeLeft { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes floating1 { 0%, 100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-10px) rotate(-3deg); } }
@keyframes floating2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
@keyframes floating3 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.decor-float-1 { animation: floating1 6s ease-in-out infinite; }
.decor-float-2 { animation: floating2 5s ease-in-out infinite; }
.decor-float-3 { animation: floating3 7s ease-in-out infinite; }

/* Респонсив */
@media (max-width: 1024px) {
    .layout { flex-direction: column; align-items: center; justify-content: flex-start; padding: 20px; }
    .info-section { padding: 40px 20px 0; align-items: center; text-align: center; flex: none; }
    .features { text-align: left; }
    .decorations { display: none; /* Убираем 3D декор на мобилках */ }
    .auth-section { padding: 20px; width: 100%; }
}
