/* Основные стили для всего сайта */
@charset "UTF-8";

/* ===== ОСНОВНЫЕ СТИЛИ ===== */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    /* padding-top управляется в base.html */
    color: #212529;
}

/* ===== НАВИГАЦИЯ (УЛУЧШЕННАЯ) ===== */
/* Navbar стили управляются в base.html */
.navbar-old-disabled {
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 0.25rem 1rem;
    margin: 0;
    animation: fadeInDown 0.4s ease-in-out;
}

.navbar-nav {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

/* Ссылки в меню */
/* nav-link стили управляются в base.html */
.nav-link-old-disabled {
    color: #444;
    font-weight: 500;
    position: relative;
    padding: 0.75rem 1rem;
    transition: all 0.25s ease;
    cursor: pointer;
}

/* Подсветка при наведении */

/* Кнопка профиля / флага */
.user-badge {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 6px 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.user-badge:hover {
    background: #e9ecef;
}

/* Лёгкая анимация появления при загрузке */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

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

/* ===== КОНТЕЙНЕРЫ ===== */
.container {
    margin: 2rem auto;
    padding: 20px;
    max-width: 90%;
    box-sizing: border-box;
}

.form-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
}

/* ===== ФОРМЫ ===== */
.form-control {
    margin-bottom: 1rem;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: rgba(128, 128, 208, 0.85);
    box-shadow: 0 0 5px rgba(128, 128, 208, 0.25);
    outline: none;
}

/* ===== КНОПКИ ===== */
.btn {
    background-color: #6b5b95;
    color: white;
    border: 1px solid #6b5b95;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    margin: 0.5rem 0;
    border-radius: 0.25rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: rgba(102, 102, 178, 0.9);
    border-color: rgba(85, 85, 148, 0.9);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

.btn-purple {
    background-color: #6a0dad;
    border-color: #5a0c9a;
    color: #fff;
    font-weight: bold;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-purple:hover {
    background-color: #570e85;
    border-color: #4c0b73;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: #fff;
}

.btn-purple:active {
    background-color: #4c0b73;
    border-color: #3f095f;
}

/* ===== ТАБЛИЦЫ ===== */
.table-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
}

.table {
    width: 100%;
    max-width: 1200px;
    table-layout: fixed;
    margin: 0 auto;
    border-collapse: collapse;
}

.table td .form-control {
    width: 100%;
    box-sizing: border-box;
    padding: 5px;
}

/* ===== ФУТЕР ===== */
.footer {
    padding: 1px 0;
    background-color: #343a40;
    color: #ffffff;
    text-align: center;
    width: 100%;
    margin-top: auto;
    font-size: 0.9rem;
}

.footer a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 0.5rem;
}

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

.footer p {
    color: #ffffff;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

/* ===== УВЕДОМЛЕНИЯ ===== */
.notification {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    padding: 10px;
    margin: 10px 0;
    font-size: 14px;
    border-radius: 5px;
    color: #333;
}

/* ===== ПРОГРЕСС-БАРЫ ===== */
.progress {
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .1);
}

.smooth-progress {
    background: linear-gradient(to right, rgba(30, 144, 255, 0.1), rgba(30, 144, 255, 1));
    width: 0;
    height: 100%;
    transition: width 0.4s ease, background 0.4s ease;
    border-radius: 10px 0 0 10px;
    color: transparent;
    font-size: 0;
}

.smooth-progress.fill {
    background: linear-gradient(to right, rgba(30, 144, 255, 0.4), rgba(30, 144, 255, 1));
    transition: background 0.4s ease-in-out;
}

.progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease, background-color 0.3s ease;
    text-align: center;
    color: white;
}

.progress-bar-weak {
    background-color: rgba(255, 0, 0, 0.7);
}

.progress-bar-medium {
    background-color: rgba(255, 255, 0, 0.7);
}

.progress-bar-strong {
    background-color: rgba(0, 248, 124, 0.7);
}

/* ===== ВАКАНСИИ ===== */
.vacancies-table-container {
    max-height: 400px;
    overflow-y: scroll;
    border: 1px solid #ddd;
}

.vacancies-table-container table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    text-align: left;
}

.vacancies-table-container th {
    background-color: #343a40;
    color: white;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.vacancies-table-container td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

/* ===== ГРАФИКИ ===== */
.dash-graph-container {
    width: 100%;
    margin-bottom: 20px;
}

.dash-graph {
    overflow-x: auto;
}

/* ===== ВЫПАДАЮЩИЕ МЕНЮ ===== */
.dropdown-toggle .fas.fa-ellipsis-v {
    color: white;
}

.dropdown-toggle::after {
    border-top-color: white;
}

.dropdown-menu {
    background-color: #333;
    color: white;
}

.dropdown-item {
    color: white;
}

.dropdown-item:hover {
    background-color: #555;
    color: white;
}

/* ===== КАТЕГОРИИ ===== */
.categories-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.category-card {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    width: 150px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.category-card .icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.category-card .text {
    font-weight: bold;
    font-size: 1.1em;
}

/* ===== ИКОНКИ ФАЙЛОВ ===== */
.file-icon {
    width: 64px;
    height: 64px;
    display: inline-block;
    background-repeat: no-repeat;
    background-size: contain;
    margin-right: 10px;
    vertical-align: middle;
}

.pdf-icon {
    background-image: url('/static/img/pdf-icon.png');
}

.jpeg-icon {
    background-image: url('/static/img/jpeg-icon.png');
}

.png-icon {
    background-image: url('/static/img/png-icon.png');
}

.xls-icon,
.xlsx-icon {
    background-image: url('/static/img/excel-icon.png');
}

/* ===== МОБИЛЬНЫЕ УСТРОЙСТВА ===== */
@media (max-width: 768px) {
    body {
        font-size: 0.875rem;
    }

    .container {
        margin: 10px;
        padding: 10px;
        max-width: 95%;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        text-align: center;
    }

    .form-control,
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }

    .btn {
        width: 100%;
        margin: 0.5rem 0;
    }

    .navbar-brand,
    .navbar-nav .nav-link {
        font-size: 0.875rem;
    }

    /* Старые стили для navbar-toggler удалены - теперь используются градиентные из base.html */

    .form-control {
        width: 100%;
    }

    .footer {
        text-align: center;
        font-size: 0.875rem;
        padding: 15px;
    }

    .footer a {
        display: block;
        margin: 0.5rem 0;
        text-align: center;
    }

    .footer p {
        font-size: 0.8rem;
        text-align: center;
    }

    .footer i {
        font-size: 20px;
    }

    /* Таблицы на мобильных */
    .table {
        width: 100%;
        font-size: 14px;
    }

    .table tbody tr {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .table tbody tr td {
        width: 100%;
        margin-bottom: 10px;
    }

    .table thead {
        display: none;
    }

    .table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .form-control[placeholder]::placeholder {
        font-weight: bold;
        font-size: 14px;
    }

    /* Вакансии на мобильных */
    .vacancies-table-container table {
        font-size: 14px;
    }

    .vacancies-table-container th,
    .vacancies-table-container td {
        padding: 8px;
    }

    .vacancies-table-container {
        max-height: 300px;
    }

    .dash-graph {
        height: 250px;
    }

    .dash-graph-container,
    .vacancies-table-container {
        padding: 0 5px;
        margin-bottom: 10px;
    }

    .dash-graph-container {
        width: 100%;
    }

    /* Иконки файлов на мобильных */
    .file-icon {
        width: 48px;
        height: 48px;
    }
}

/* ===== БОЛЬШИЕ ЭКРАНЫ ===== */
@media (min-width: 1200px) {
    .file-icon {
        width: 80px;
        height: 80px;
    }
}

/* ===== УТИЛИТЫ ===== */
.fade {
    transition: opacity 0.15s linear;
}

.show {
    opacity: 1;
}

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

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

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

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 1rem;
}

.p-4 {
    padding: 1.5rem;
}

.p-5 {
    padding: 3rem;
}

/* ===== КАСТОМНЫЙ СКРОЛЛБАР ===== */
/* Firefox */
body {
    scrollbar-width: thin;
    scrollbar-color: #6c757d #f8f9fa;
}

/* WebKit/Blink */
@supports selector(::-webkit-scrollbar) {
    body::-webkit-scrollbar {
        width: 8px;
    }

    body::-webkit-scrollbar-track {
        background: #f8f9fa;
    }

    body::-webkit-scrollbar-thumb {
        background: #6c757d;
        border-radius: 4px;
    }

    body::-webkit-scrollbar-thumb:hover {
        background: #495057;
    }
}

/* ===== GOOGLE OAUTH СТИЛИ ===== */
.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #6c757d;
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #dee2e6;
    margin: 0 1rem;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 2px solid #dadce0;
    border-radius: 8px;
    color: #3c4043;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #c1c7cd;
    color: #3c4043;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.btn-google:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-google svg {
    flex-shrink: 0;
}

/* Адаптивность для Google кнопки */
@media (max-width: 576px) {
    .btn-google {
        padding: 0.625rem 0.875rem;
        font-size: 0.8rem;
        gap: 0.5rem;
    }
}

/* ===== Footer social (фикс наложения) ===== */
.footer-social,
.social-links {
    display: flex;
    align-items: center;
    gap: 12px;
    /* расстояние между ссылками */
    flex-wrap: wrap;
    /* безопасный перенос на маленьких экранах */
    margin-top: 8px;
}

.footer-social .social-link,
.social-links .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    /* круглые кнопки */
    text-decoration: none;
    color: inherit;
    transition: all .3s ease;
}

.footer-social .social-link span,
.social-links .social-link span {
    display: none;
    /* скрываем текст */
}

.footer-social .social-link:hover,
.social-links .social-link:hover {
    background: rgba(255, 255, 255, .15);
    border-color: rgba(255, 255, 255, .3);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

.footer-social .social-link i,
.social-links .social-link i {
    font-size: 18px;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Цвета иконок */
.social-link.telegram i {
    color: #229ED9;
}

.social-link.whatsapp i {
    color: #25D366;
}

.social-link.viber i {
    color: #7360F2;
}

/* гарантируем видимость текста на любых темах */
.footer-social .social-link span:last-child,
.social-links .social-link span:last-child {
    color: rgba(255, 255, 255, .95);
    font-weight: 500;
}

/* Фикс: убираем белый фон у contact-info в футере */
.footer-premium .contact-info,
footer .contact-info {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.footer-premium .contact-item,
footer .contact-item {
    color: rgba(255, 255, 255, .9) !important;
}

.footer-premium .contact-item span,
footer .contact-item span {
    color: rgba(255, 255, 255, .9) !important;
}

/* ===== Documents toolbar alignment (Perfect Align) ===== */
.docs-toolbar {
    --dt-h: 44px;
    /* общая высота контролов */
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 12px 0 24px;
}

.docs-toolbar>* {
    align-self: stretch;
}

/* поиск тянется, селекты — компактные */
.docs-toolbar .toolbar-search {
    flex: 1 1 420px;
    min-width: 260px;
}

.docs-toolbar .toolbar-select {
    flex: 0 0 180px;
}

/* единый размер шрифта */
.docs-toolbar .form-control,
.docs-toolbar .form-select {
    font-size: 0.95rem;
    line-height: 1.25;
    margin: 0;
}

/* === input-group: ровный блок */
.docs-toolbar .toolbar-search .input-group {
    display: flex;
    align-items: stretch;
    height: var(--dt-h);
}

.docs-toolbar .input-group>.input-group-text,
.docs-toolbar .input-group>.form-control {
    height: var(--dt-h);
    padding-top: 10px;
    padding-bottom: 10px;
}

.docs-toolbar .input-group>.input-group-text {
    border-right: 0;
}

.docs-toolbar .input-group>.form-control {
    border-left: 0;
}

/* скругления */
.docs-toolbar .input-group .input-group-text {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.docs-toolbar .input-group .form-control {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.docs-toolbar .form-select {
    border-radius: 12px;
}

/* === селекты: жёсткая высота */
.docs-toolbar .form-select {
    height: var(--dt-h);
    min-height: var(--dt-h);
    padding-top: 10px;
    padding-bottom: 10px;
    background-position: right .75rem center;
    background-size: 16px 12px;
}

/* счетчик и действия (для crew page) */
.docs-toolbar .counter {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--dt-h);
    padding: 0 12px;
    border-radius: 20px;
    line-height: 1;
    white-space: nowrap;
    margin-left: auto;
}

.docs-toolbar .toolbar-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
}

/* адаптив */
@media (max-width: 992px) {
    .docs-toolbar .toolbar-search {
        flex-basis: 100%;
    }

    .docs-toolbar .toolbar-select {
        flex: 1 1 160px;
    }

    .docs-toolbar .counter {
        margin-left: 0;
    }

    .docs-toolbar .toolbar-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ===== Company Dashboard cards ===== */
.dashboard-cards .dashboard-card {
    min-height: 260px;
}

.dashboard-cards .card-body {
    display: flex;
    flex-direction: column;
}

.dashboard-cards .card-actions {
    margin-top: auto;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dashboard-cards .btn-action {
    min-height: 40px;
}

.dashboard-cards .app-icon {
    font-size: 44px;
    line-height: 1;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.dashboard-cards .card-title {
    font-weight: 600;
}

.dashboard-cards .card-subtitle {
    min-height: 22px;
}

/* чтобы строки под иконкой выровнялись */
.dashboard-cards .feature-note {
    min-height: 18px;
    display: block;
}

/* фикс высоты под короткое примечание */

@media (max-width: 991.98px) {
    .dashboard-cards .dashboard-card {
        min-height: 240px;
    }
}