/* Основные стили */
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
    background-color: var(--background-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
}

.container {
    text-align: center;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Навигация */
.navbar {
    background-color: var(--primary-color);
}

.navbar-brand, .navbar-nav .nav-link {
    color: var(--text-light) !important;
}

.navbar-nav .nav-link.active, .navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
}

/* Типографика */
h1 {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.section-heading {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Контейнер с кнопками */
.buttons-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 400px;
    margin: 0 auto;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .buttons-container {
        flex-direction: row;
        justify-content: center;
    }
}

/* Общие стили кнопок */
.btn {
    display: inline-block;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 180px;
}

/* Основная кнопка */
.btn-primary {
    background-color: var(--button-primary-bg);
    color: var(--button-primary-text);
    border: 2px solid var(--button-primary-bg);
}

.btn-primary:hover {
    background-color: var(--primary-color-90);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px var(--primary-color-shadow);
}

/* Акцентная кнопка */
.btn-accent {
    background-color: var(--button-accent-bg);
    color: var(--button-accent-text);
    border: 2px solid var(--button-accent-bg);
}

.btn-accent:hover {
    background-color: var(--accent-color-90);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px var(--accent-color-shadow);
}

/* Карточки */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--primary-color-shadow);
}

.card-header {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-radius: 10px 10px 0 0 !important;
}

.card-footer {
    background-color: var(--additional-color);
    border-radius: 0 0 10px 10px !important;
}

/* Логотип */
.logo {
    margin-bottom: 2rem;
}

.logo img {
    max-height: 80px;
}

/* Подвал */
.footer {
    color: var(--text-light);
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
    background-color: var(--primary-color);
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: white;
    text-decoration: underline;
}

.footer h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Стили для карточек вакансий */
.vacancy-description {
    min-height: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Максимальная ширина контейнера для лучшего отображения на больших экранах */
@media (min-width: 1400px) {
    .container-fluid {
        max-width: 1920px;
    }
}

/* Стили для таймлайна */
.timeline {
    list-style-type: none;
    position: relative;
    padding-left: 1.5rem;
    margin: 0;
}

.timeline:before {
    content: ' ';
    background: #ddd;
    display: inline-block;
    position: absolute;
    left: 0;
    width: 2px;
    height: 100%;
    z-index: 1;
}

.timeline-item {
    margin: 0 0 2rem 0;
    position: relative;
    opacity: 0.5;
}

.timeline-item.active {
    opacity: 1;
}

.timeline-item.active .timeline-point {
    background-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(186, 255, 41, 0.3);
}

.timeline-point {
    position: absolute;
    left: -1.8rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ddd;
    top: 0.25rem;
    z-index: 99;
}

.timeline-content {
    padding-left: 1rem;
}

/* Стили для форм */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.form-section-title {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.question-block {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Стили для валидации форм */
.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-valid {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #198754;
}

/* Стили для чекбоксов и радиокнопок при валидации */
.form-check-input.is-invalid ~ .form-check-label,
.was-validated .form-check-input:invalid ~ .form-check-label {
    color: #dc3545;
}

.form-check-input.is-valid ~ .form-check-label,
.was-validated .form-check-input:valid ~ .form-check-label {
    color: #198754;
}

/* Стили для страниц входа и регистрации */
.auth-page {
    min-height: calc(100vh - 56px - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-page .card {
    width: 100%;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
}

.auth-page .card-footer {
    background-color: rgba(0, 0, 0, 0.03);
    padding: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.auth-page .card-header {
    background-color: #f8f9fa !important;
    border-bottom: none;
    padding: 1.5rem 1.5rem 1rem;
    color: var(--primary-color) !important;
}

.auth-page .card-header h3,
.auth-page .card-header h4 {
    color: var(--primary-color);
    font-weight: 600;
}

.page-footer {
    margin-top: auto;
    background-color: #f8f9fa;
    padding: 1rem 0;
    text-align: center;
}

/* Компактные кнопки для таблиц */
.btn-table-action {
    min-width: auto !important;
    width: 40px !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 0.875rem !important;
    height: 36px !important;
}

.actions-cell {
    width: 120px !important;
    text-align: center !important;
}

.accent-border {
    border-color: var(--accent-color);
}

/* Убираем лишние отступы между карточками */
.card + .card {
    margin-top: 1.2rem;
}

/* Базовая информация: пол */
.gender-label {
    font-weight: 500;
    color: var(--primary-color);
}
.gender-value {
    font-weight: 500;
    color: #059669;
}

/* Анимации для AI-анализа */
@keyframes pulse-verification {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes pulse-score {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Стили для AI-анализа */
.ai-analysis {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* AI-анализ: карточки категорий */
.ai-categories {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ai-category {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--background-light);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 1rem 1.25rem;
    min-height: 80px;
    margin-bottom: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ai-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.ai-category-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f9fa;
    color: var(--primary-color);
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.1em;
    opacity: 0.85;
}

.ai-category-icon.green {
    background: #d1fae5;
    color: #059669;
}

.ai-category-icon.yellow {
    background: #fef9c3;
    color: #b45309;
}

.ai-category-icon.red {
    background: #fee2e2;
    color: #b91c1c;
}

.ai-category-content {
    flex: 1;
}

.ai-category-header-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.ai-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.ai-category-name {
    font-weight: 600;
    font-size: 1.08rem;
    color: var(--primary-color);
}

.ai-category-score {
    font-weight: bold;
    color: var(--primary-color);
}

.ai-category-score-badge {
    font-weight: 700;
    border-radius: 6px;
    padding: 0.2em 0.7em;
    font-size: 1rem;
    margin-left: auto;
    background: #e9ecef;
    color: #333;
    min-width: 60px;
    text-align: center;
}

.ai-category-score-badge.green { 
    background: #d1fae5; 
    color: #059669; 
}

.ai-category-score-badge.yellow { 
    background: #fef9c3; 
    color: #b45309; 
}

.ai-category-score-badge.red { 
    background: #fee2e2; 
    color: #b91c1c; 
}

.ai-category-comment {
    color: var(--text-secondary);
    font-size: 0.97rem;
    margin-bottom: 0;
}

/* AI-анализ: сильные/слабые стороны */
.ai-pros-cons {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.ai-pros-cons-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.ai-pros-cons-header {
    padding: 0.75rem 1rem;
    color: white;
}

.ai-pros-cons-header.pros {
    background-color: #059669;
    color: #fff;
}

.ai-pros-cons-header.cons {
    background-color: #b91c1c;
    color: #fff;
}

.ai-pros-cons-body {
    padding: 0.7rem 1rem 0.7rem 1.2rem;
}

.ai-pros-cons-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-pros-cons-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    font-size: 1.01rem;
}

.ai-pros-cons-item i {
    font-size: 1.1rem;
}

.ai-pros-cons-item.pros i {
    color: #059669;
}

.ai-pros-cons-item.cons i {
    color: #b91c1c;
}

.ai-no-data {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 0.7rem 0;
}

/* AI-анализ: общая оценка - верификация Instagram */
.ai-verification-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: white;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    width: 100%;
    max-width: 500px;
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
}

.ai-verification-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.1), rgba(56, 239, 125, 0.1));
    z-index: 0;
}

.ai-verification-badge.high::before {
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.1), rgba(56, 239, 125, 0.1));
}

.ai-verification-badge.medium::before {
    background: linear-gradient(135deg, rgba(242, 153, 74, 0.1), rgba(242, 201, 76, 0.1));
}

.ai-verification-badge.low::before {
    background: linear-gradient(135deg, rgba(235, 51, 73, 0.1), rgba(244, 92, 67, 0.1));
}

.ai-verification-icon {
    font-size: 2.5rem;
    z-index: 1;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    animation: pulse-verification 2s infinite ease-in-out;
}

.ai-verification-icon.high {
    color: #11998e;
}

.ai-verification-icon.medium {
    color: #f2994a;
}

.ai-verification-icon.low {
    color: #eb3349;
}

.ai-verification-content {
    z-index: 1;
    flex: 1;
}

.ai-verification-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.ai-verification-score {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.ai-verification-score.high {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ai-verification-score.medium {
    background: linear-gradient(135deg, #f2994a, #f2c94c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ai-verification-score.low {
    background: linear-gradient(135deg, #eb3349, #f45c43);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ai-verification-label {
    font-size: 1rem;
    color: #6c757d;
}

/* Прогресс-бар для оценки соответствия */
.ai-match-score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1.5rem 0 2rem;
}

.ai-match-progress {
    width: 100%;
    max-width: 500px;
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
    margin: 1rem auto 0;
    overflow: hidden;
}

.ai-match-progress-bar {
    height: 100%;
    border-radius: 4px;
}

.ai-match-progress-bar.high {
    background: linear-gradient(90deg, #11998e, #38ef7d);
}

/* Высокий прогресс-бар */
.progress-lg {
    height: 20px !important;
}

/* Устаревшие стили для оценки (сохранены для обратной совместимости) */
.ai-score-container {
    position: relative;
    margin-bottom: 1.2rem;
}

.ai-score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 800;
    z-index: 2;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
    text-shadow: 0px 1px 2px rgba(0,0,0,0.2);
    background: rgba(255,255,255,0.25);
    border-radius: 20px;
    padding: 0 12px;
    box-shadow: 0 0 8px rgba(255,255,255,0.5);
    animation: pulse-score 2s infinite ease-in-out;
}

.ai-score-value.over-bar {
    color: #fff;
}

/* Стили для форматированного текста в вакансиях */
.formatted-text {
    white-space: pre-wrap;
    line-height: 1.5;
}

.formatted-text ul, 
.formatted-text ol {
    padding-left: 20px;
    margin-bottom: 1rem;
}

.formatted-text p {
    margin-bottom: 1rem;
}

.formatted-text h1, 
.formatted-text h2, 
.formatted-text h3, 
.formatted-text h4, 
.formatted-text h5, 
.formatted-text h6 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.formatted-text hr {
    margin: 1rem 0;
}

.formatted-text blockquote {
    border-left: 3px solid #dee2e6;
    padding-left: 1rem;
    margin-left: 0;
    color: #6c757d;
}

/* Стили для модального окна генерации вакансии */
#aiGeneratorModal .modal-dialog {
    max-width: 700px;
}

#generationProgress {
    min-height: 150px;
} 