/* STYLES FOR AUTH MODAL */

.auth-container {
    padding: 40px 30px;
    text-align: left;
    overflow-y: auto;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    min-height: 550px;
    position: relative;
    /* Для позиционирования кнопок навигации */
}

/* Scrollbar hidden */
.auth-container::-webkit-scrollbar {
    width: 0;
}

/* --- NAVIGATION (CLOSE & BACK) --- */
.modal-close,
.auth-back-btn {
    position: absolute;
    top: 24px;
    /* Единый отступ сверху */
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: #666;
    /* Цвет иконок */
    cursor: pointer;
    z-index: 10;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.modal-close {
    right: 24px;
    /* Отступ справа */
    font-size: 28px;
    line-height: 1;
}

.auth-back-btn {
    left: 24px;
    /* Отступ слева */
    display: none;
    /* Скрыта по умолчанию */
}

.modal-close:hover,
.auth-back-btn:hover {
    color: white;
}

/* --- TYPOGRAPHY --- */
.auth-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    margin-bottom: 10px;
    color: white;
    text-align: center;
    margin-top: 10px;
    /* Чуть отступа от навигации */
}

.auth-sub {
    color: #999;
    font-size: 14px;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.5;
}

.auth-disclaimer {
    font-size: 11px;
    color: #555;
    text-align: center;
    margin-top: 15px;
    line-height: 1.4;
}

.auth-disclaimer a {
    color: #777;
    text-decoration: underline;
}

.auth-label {
    font-size: 12px;
    color: var(--accent-gold);
    margin-bottom: 6px;
    /* Уменьшенный отступ */
    display: block;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 15px;
}

/* Убираем отступ у первого лейбла в блоке */
.auth-label:first-of-type {
    margin-top: 0;
}

/* --- INPUTS --- */
.auth-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    margin-bottom: 5px;
    /* Минимальный отступ снизу */
    text-align: left;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
    padding: 14px;
    border-radius: 12px;
    margin: 5px 0 10px;
}

/* Custom styling for select to add arrow and fix appearance */
select.auth-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23C6A87C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    padding-right: 45px;
    cursor: pointer;
}

select.auth-input option {
    background: #1a1a1a;
    color: white;
    padding: 10px;
}

.auth-input:focus {
    border-color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

/* Убираем стрелки у числовых полей в модалке входа */
#loginModal input[type="number"]::-webkit-outer-spin-button,
#loginModal input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#loginModal input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.auth-input.error {
    border-color: #EF4444;
    background: rgba(239, 68, 68, 0.05);
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-wrapper {
    flex: 1;
    margin-bottom: 10px;
}

.error-message {
    color: #EF4444;
    font-size: 12px;
    text-align: center;
    margin-top: 5px;
    margin-bottom: 5px;
    min-height: 16px;
}

/* --- BUTTONS --- */
.full-width {
    width: 100%;
    margin-top: 15px;
    padding: 12px 0;
    /* Уменьшенная высота (было 18) */
}

/* Текстовая кнопка (ссылка снизу) */
.btn-text-link {
    background: none;
    border: none;
    color: #777;
    width: 100%;
    padding: 10px;
    cursor: pointer;
    margin-top: 5px;
    font-size: 13px;
    text-decoration: underline;
    transition: 0.3s;
}

.btn-text-link:hover {
    color: white;
}

.btn-text-link.danger:hover {
    color: #EF4444;
}

/* --- VIEWS --- */
.auth-view {
    display: none;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
}

.auth-view.active {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* --- PHOTO UPLOAD --- */
.avatar-upload {
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #555;
    cursor: pointer;
    transition: 0.3s;
    background-size: cover;
    background-position: center;
}

.avatar-upload:hover {
    border-color: var(--accent-gold);
    background-color: rgba(255, 255, 255, 0.1);
}

.avatar-label {
    text-align: center;
    color: #777;
    font-size: 13px;
    margin-bottom: 25px;
}

/* --- ROLE CARDS --- */
.role-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.role-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: 0.3s;
}

.role-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.role-item.highlight {
    border-color: var(--accent-gold);
    background: rgba(198, 168, 124, 0.05);
}

.role-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    flex-shrink: 0;
}

.role-text h3 {
    margin: 0 0 4px;
    font-size: 15px;
    color: white;
    font-family: var(--font-sans);
    font-weight: 700;
}

.role-text p {
    margin: 0;
    font-size: 13px;
    color: #888;
}

/* --- CHECKBOXES --- */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid transparent;
}

.custom-checkbox.checked {
    border-color: var(--accent-gold);
    background: rgba(198, 168, 124, 0.05);
}

.box {
    width: 20px;
    height: 20px;
    border: 1px solid #555;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: transparent;
}

.custom-checkbox.checked .box {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: black;
}

.custom-checkbox span {
    color: #ccc;
    font-size: 14px;
}

/* --- DOTS --- */
.steps-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
}

.step-dot {
    width: 6px;
    height: 6px;
    background: #333;
    border-radius: 50%;
    transition: 0.3s;
}

.step-dot.active {
    background: var(--accent-gold);
    width: 16px;
    border-radius: 10px;
}

.step-dot.completed {
    background: var(--accent-green);
}

.font-brand {
    font-family: var(--font-logo);
    font-weight: 400;
}