/* --- СТИЛИ (СОХРАНЕНЫ) --- */
:root {
    --bg-color: #05070a;
    --text-white: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.6);
    --accent: #a5b4fc;
    --accent-glow: #6366f1;
    --error: #ff6b6b;

    --glass-bg: rgba(20, 25, 40, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(255, 255, 255, 0.03);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-white);
    font-family: 'Manrope', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

/* Фон */
.ambient-light {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, #111625 0%, #05070a 80%);
}

.spot {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s infinite alternate ease-in-out;
}

.s1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: #312e81;
}

.s2 {
    bottom: -10%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: #1e1b4b;
}

@keyframes float {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(20px, 20px);
    }
}

/* Лого */
.logo-link {
    position: absolute;
    top: 40px;
    left: 60px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.logo-link span {
    color: var(--accent);
}

/* Карточка */
.auth-container {
    width: 100%;
    max-width: 450px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    margin: 20px;
    transition: height 0.3s;
}

.tabs {
    display: flex;
    margin-bottom: 25px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 12px;
}

.tab-btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dim);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.form-header {
    text-align: center;
    margin-bottom: 20px;
}

.form-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 5px;
}

.form-header p {
    font-size: 14px;
    color: var(--text-dim);
}

/* --- СТИЛИ ВЫБОРА РОЛИ (НОВОЕ) --- */
.role-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

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

.role-option input {
    display: none;
}

/* Скрываем стандартные радио */

.role-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: var(--input-bg);
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 600;
    transition: 0.3s;
}

.role-icon {
    font-size: 18px;
    margin-bottom: 2px;
}

/* Состояние выбранной роли */
.role-option input:checked+.role-box {
    background: rgba(165, 180, 252, 0.15);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 15px rgba(165, 180, 252, 0.2);
}

/* --- ПОЛЯ ВВОДА --- */
.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 6px;
    font-weight: 600;
}

.input-field {
    width: 100%;
    padding: 12px 15px;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    transition: 0.3s;
    outline: none;
}

.input-field:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

.code-input {
    text-align: center;
    letter-spacing: 10px;
    font-size: 24px;
    font-weight: 700;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: #fff;
    color: var(--bg-color);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 5px;
}

.btn-submit:hover {
    background: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-dim);
}

.checkbox-label input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    background: var(--input-bg);
    position: relative;
    transition: 0.3s;
}

.checkbox-label input:checked~.checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-label input:checked~.checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #05070a;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-pass {
    font-size: 12px;
    color: var(--accent);
    opacity: 0.8;
}

.error-message {
    color: var(--error);
    font-size: 12px;
    margin-top: 10px;
    text-align: center;
    display: none;
}

.form-box {
    display: none;
    animation: fadeIn 0.5s ease;
}

.form-box.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .logo-link {
        top: 20px;
        left: 20px;
    }

    .auth-container {
        margin-top: 60px;
        padding: 30px 20px;
    }
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper .input-field {
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password svg {
    width: 22px;
    height: 22px;
    stroke: #a9adc1;
    pointer-events: none;
}

.toggle-password:hover svg {
    stroke: #fff;
}

.eye-open,
.eye-closed {
    display: none;
}
