/* Стили для страницы регистрации */
.register-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.auth-container {

    margin: 0 auto;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 10px;
}

.auth-header p {
    color: #666;
    font-size: 1rem;
}

/* Сообщения */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #e6ffe6;
    border-color: #009846;
    color: #009846;
}

.alert-error {
    background: #ffe6e6;
    border-color: #E31E24;
    color: #E31E24;
}

/* Форма */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
}

.form-group label .required {
    color: #E31E24;
}

.form-control {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #009846;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.btn {
    width: 100%;
    padding: 14px;
    background: #009846;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    background: #007c38;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 152, 70, 0.3);
    text-decoration: none;
}

.form-links {
    text-align: center;
    margin-top: 20px;
}

.form-link {
    color: #009846;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.form-link:hover {
    color: #007c38;
    text-decoration: underline;
}

.process-info {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #009846;
}

.process-info h3 {
    color: #333;
    margin-bottom: 10px;
}

.process-info ul {
    padding-left: 20px;
    color: #666;
}

.process-info li {
    margin-bottom: 8px;
}

.text-center {
    text-align: center;
}

/* Специфичные стили для страницы регистрации */
.register-main {
    flex: 1;
    padding: 60px 0;
    min-height: calc(100vh - 140px);
}

@media (max-width: 768px) {
    .auth-card {
        padding: 30px 20px;
    }
    
    .auth-header h1 {
        font-size: 1.6rem;
    }
    
    .register-main {
        padding: 30px 0;
    }
}

/* Дополнительные стили для регистрации */
.phone-hint {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

.phone-mask {
    font-family: 'Segoe UI', monospace;
    letter-spacing: 0.5px;
}

/* Стили для валидации в реальном времени */
.form-control.invalid {
    border-color: #E31E24;
    box-shadow: 0 0 0 2px rgba(227, 30, 36, 0.1);
}

.form-control.valid {
    border-color: #009846;
}

/* Стили для кнопки при отправке */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading:after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Адаптивные стили для телефона */
@media (max-width: 480px) {
    .phone-hint {
        font-size: 0.75rem;
    }
    
    .phone-mask {
        font-size: 15px;
    }
}

/* Стили для капчи */
.captcha-group {
    margin: 25px 0;
    text-align: center;
}

.g-recaptcha {
    display: inline-block;
    margin-bottom: 10px;
}

.captcha-hint {
    display: block;
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
}

/* Стили для валидации */
input:invalid, textarea:invalid {
    border-color: #ff6b6b;
}

input:valid, textarea:valid {
    border-color: #e0e0e0;
}

/* Стили для кнопки при отправке */
button[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

button[disabled]:hover {
    transform: none !important;
    box-shadow: none !important;
}

.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading .btn-loading-text {
    visibility: hidden;
}

.btn-loading:after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Стили для автокомплита организаций */
.organization-autocomplete {
    position: relative;
    margin-bottom: 20px;
}

.autocomplete-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.autocomplete-suggestions {
    position: absolute;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    width: 100%;
    top: 100%;
    left: 0;
    margin-top: -2px;
}

.autocomplete-suggestions.show {
    display: block;
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: #f8f9fa;
    color: #009846;
}

.autocomplete-item.selected {
    background-color: #e8f4ff;
    color: #0056b3;
}

.autocomplete-item .org-name {
    color: inherit;
    font-weight: 500;
}

.form-hint {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
    font-style: italic;
}

/* Выделение совпадающего текста в подсказках */
.highlight {
    background-color: rgba(255, 235, 59, 0.3);
    font-weight: 600;
    padding: 0 1px;
    border-radius: 2px;
}

/* Стили для скроллбара в выпадающем списке */
.autocomplete-suggestions::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 4px 4px 0;
}

.autocomplete-suggestions::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.autocomplete-suggestions::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Адаптивность для автокомплита */
@media (max-width: 768px) {
    .autocomplete-suggestions {
        max-height: 150px;
    }
    
    .autocomplete-item {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Добавьте эти стили в конец register.css */

/* Стили для состояния полей */
.form-control:not(:placeholder-shown):valid {
    border-color: #009846;
    box-shadow: 0 0 0 1px rgba(0, 152, 70, 0.1);
}

.form-control:not(:placeholder-shown):invalid {
    border-color: #E31E24;
    box-shadow: 0 0 0 1px rgba(227, 30, 36, 0.1);
}

/* Убираем красную подсветку при загрузке страницы */
.form-control:placeholder-shown {
    border-color: #e0e0e0;
}

/* Сообщения об ошибках */
.error-message {
    color: #E31E24;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Состояние ошибки для поля */
.form-control.error {
    border-color: #E31E24 !important;
    box-shadow: 0 0 0 1px rgba(227, 30, 36, 0.1) !important;
}

/* Состояние успеха для поля */
.form-control.success {
    border-color: #009846 !important;
    box-shadow: 0 0 0 1px rgba(0, 152, 70, 0.1) !important;
}