/* ============================================================
   assets/css/style.css - ОСНОВНЫЕ СТИЛИ
   ============================================================ */

/* Bootstrap Icons (локальные шрифты) */
@font-face {
    font-family: 'bootstrap-icons';
    src: url('/assets/css/fonts/bootstrap-icons.woff2') format('woff2');
}

/* ============================================================
   ОБЩИЕ
   ============================================================ */
body {
    background-color: #f5f7fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card-header {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
}

/* ============================================================
   ТАБЛИЦЫ
   ============================================================ */
.table th {
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* ============================================================
   ИНДИКАТОРЫ ПОТРЕБНОСТИ
   ============================================================ */
.need-high {
    color: #dc3545;
    font-weight: 700;
}

.need-medium {
    color: #ffc107;
    font-weight: 700;
}

.need-low {
    color: #28a745;
    font-weight: 700;
}

.need-zero {
    color: #6c757d;
}

/* ============================================================
   ЛЕГЕНДА
   ============================================================ */
.legend-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.legend-high { background-color: #dc3545; }
.legend-medium { background-color: #ffc107; }
.legend-low { background-color: #28a745; }
.legend-zero { background-color: #6c757d; }

/* ============================================================
   СТАТУСЫ
   ============================================================ */
.status-badge {
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-frozen {
    background: #cce5ff;
    color: #004085;
}

.status-closed {
    background: #f8d7da;
    color: #721c24;
}

/* ============================================================
   РОЛИ
   ============================================================ */
.role-badge {
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
}

.role-admin {
    background: #dc3545;
    color: white;
}

.role-manager {
    background: #ffc107;
    color: #212529;
}

.role-user {
    background: #28a745;
    color: white;
}

/* ============================================================
   ФИЛЬТРЫ
   ============================================================ */
.filter-section {
    background: white;
    border-radius: 10px;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ============================================================
   ФОТО
   ============================================================ */
.photo-thumb {
    width: 50px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.preview-img {
    max-width: 200px;
    max-height: 150px;
    object-fit: contain;
    border-radius: 8px;
}

.photo-comment {
    font-style: italic;
    color: #6c757d;
    font-size: 0.9em;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 8px;
}

/* ============================================================
   ТЕМНАЯ ТЕМА
   ============================================================ */
body.dark-theme {
    background: #121212;
    color: #e0e0e0;
}

body.dark-theme .card {
    background: #1e1e2e;
    color: #e0e0e0;
    border: 1px solid #2a2a4a;
}

body.dark-theme .card-header {
    background: #0f3460;
    color: #fff;
    border-bottom: 2px solid #2a2a4a;
}

body.dark-theme .card-body {
    color: #e0e0e0;
}

/* ============================================================
   ТАБЛИЦЫ В ТЕМНОЙ ТЕМЕ
   ============================================================ */
body.dark-theme .table {
    color: #e0e0e0;
}

body.dark-theme .table thead th {
    color: #ffffff;
    background: #0f3460;
    border-bottom: 2px solid #2a2a4a;
}

body.dark-theme .table tbody td {
    color: #e0e0e0;
    border-color: #2a2a4a;
}

body.dark-theme .table-striped > tbody > tr:nth-of-type(odd) {
    --bs-table-bg: rgba(255,255,255,0.05);
}

body.dark-theme .table-striped > tbody > tr:nth-of-type(even) {
    --bs-table-bg: rgba(255,255,255,0.02);
}

/* При наведении на строку таблицы в темной теме */
body.dark-theme .table-hover > tbody > tr:hover {
    --bs-table-bg: rgba(255,255,255,0.12);
}

body.dark-theme .table-hover > tbody > tr:hover td {
    color: #ffffff;
}

/* Ссылки в таблице (номера вакансий) */
body.dark-theme .table td strong {
    color: #a8d8ea;
}

body.dark-theme .table-hover > tbody > tr:hover td strong {
    color: #ffffff;
}

/* ============================================================
   ОСТАЛЬНЫЕ ЭЛЕМЕНТЫ В ТЕМНОЙ ТЕМЕ
   ============================================================ */
body.dark-theme .filter-section {
    background: #16213e;
    border: 1px solid #2a2a4a;
}

body.dark-theme .filter-section .form-control,
body.dark-theme .filter-section .form-select {
    background: #0f3460;
    color: #e0e0e0;
    border-color: #2a2a4a;
}

body.dark-theme .filter-section .form-control:focus,
body.dark-theme .filter-section .form-select:focus {
    background: #0f3460;
    color: #e0e0e0;
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

body.dark-theme .filter-section .form-check-label {
    color: #e0e0e0;
}

body.dark-theme .filter-section .form-check-input {
    background-color: #0f3460;
    border-color: #2a2a4a;
}

body.dark-theme .filter-section .form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

body.dark-theme .text-muted {
    color: #a0a0b0 !important;
}

body.dark-theme .legend {
    background: #16213e !important;
    border-color: #2a2a4a !important;
    color: #e0e0e0;
}

body.dark-theme .legend .text-muted {
    color: #a0a0b0 !important;
}

/* ============================================================
   СТАТУСЫ В ТЕМНОЙ ТЕМЕ
   ============================================================ */
body.dark-theme .status-badge.status-active {
    background: #1a3a2a;
    color: #7ddfa0;
}

body.dark-theme .status-badge.status-frozen {
    background: #1a2a4a;
    color: #7db8df;
}

body.dark-theme .status-badge.status-closed {
    background: #3a1a1a;
    color: #df7d7d;
}

/* ============================================================
   МОДАЛЬНЫЕ ОКНА В ТЕМНОЙ ТЕМЕ
   ============================================================ */
body.dark-theme .modal-content {
    background: #1e1e2e;
    color: #e0e0e0;
    border-color: #2a2a4a;
}

body.dark-theme .modal-header {
    background: #0f3460;
    color: #fff;
    border-bottom-color: #2a2a4a;
}

body.dark-theme .modal-header .btn-close {
    filter: invert(1) brightness(100);
}

body.dark-theme .modal-footer {
    border-top-color: #2a2a4a;
}

body.dark-theme .modal-body {
    color: #e0e0e0;
}

body.dark-theme .modal-body .text-muted {
    color: #a0a0b0 !important;
}

body.dark-theme .modal-body .badge {
    color: #fff;
}

/* ============================================================
   ИНДИКАТОРЫ ПОТРЕБНОСТИ В ТЕМНОЙ ТЕМЕ
   ============================================================ */
body.dark-theme .need-high {
    color: #ff6b6b;
}

body.dark-theme .need-medium {
    color: #ffd93d;
}

body.dark-theme .need-low {
    color: #6bcb77;
}

body.dark-theme .need-zero {
    color: #888;
}

/* ============================================================
   ПРОЧИЕ ЭЛЕМЕНТЫ В ТЕМНОЙ ТЕМЕ
   ============================================================ */
body.dark-theme .dropdown-menu {
    background: #16213e;
    color: #e0e0e0;
}

body.dark-theme .dropdown-item {
    color: #e0e0e0;
}

body.dark-theme .dropdown-item:hover {
    background: #0f3460;
    color: #fff;
}

body.dark-theme .toast {
    background: #16213e !important;
    color: #e0e0e0;
}

body.dark-theme .backup-item {
    background: #0f3460;
    color: #e0e0e0;
}

body.dark-theme .backup-item:hover {
    background: #1a2a4a;
}

body.dark-theme .photo-item {
    background: #0f3460;
    color: #e0e0e0;
}

body.dark-theme .photo-item:hover {
    background: #1a2a4a;
}

body.dark-theme .dropzone {
    border-color: #2a2a4a;
    color: #a0a0b0;
}

body.dark-theme .dropzone:hover {
    border-color: #667eea;
}

body.dark-theme .form-label {
    color: #e0e0e0;
}

body.dark-theme .form-control,
body.dark-theme .form-select {
    background: #0f3460;
    color: #e0e0e0;
    border-color: #2a2a4a;
}

body.dark-theme .form-control:focus,
body.dark-theme .form-select:focus {
    background: #0f3460;
    color: #e0e0e0;
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

body.dark-theme .form-control::placeholder {
    color: #6a6a8a;
}

body.dark-theme .btn-close-white {
    filter: invert(1) brightness(100);
}

body.dark-theme .stat-card .stat-label {
    color: #a0a0b0;
}

body.dark-theme .stat-card .stat-number {
    color: #e0e0e0;
}

body.dark-theme .stat-card .stat-number.text-primary {
    color: #667eea !important;
}
body.dark-theme .stat-card .stat-number.text-danger {
    color: #ff6b6b !important;
}
body.dark-theme .stat-card .stat-number.text-warning {
    color: #ffd93d !important;
}
body.dark-theme .stat-card .stat-number.text-success {
    color: #6bcb77 !important;
}

body.dark-theme .detail-section-title {
    color: #e0e0e0;
    border-bottom-color: #2a2a4a;
}

body.dark-theme .detail-section-title i {
    color: #667eea;
}

body.dark-theme .formatted-text {
    color: #e0e0e0;
}

body.dark-theme .formatted-text blockquote {
    color: #a0a0b0;
    border-left-color: #667eea;
}

body.dark-theme .formatted-text table td,
body.dark-theme .formatted-text table th {
    border-color: #2a2a4a;
}

body.dark-theme .formatted-text table th {
    background: #0f3460;
}

body.dark-theme .formatted-text a {
    color: #667eea;
}

body.dark-theme .history-item .user {
    color: #a0a0b0;
}

body.dark-theme .history-item .date {
    color: #6a6a8a;
}

body.dark-theme .number-display {
    background: #0f3460;
    color: #667eea;
}

body.dark-theme .number-display small {
    color: #6a6a8a;
}

/* ============================================================
   АНИМАЦИИ
   ============================================================ */
.vacancy-row {
    transition: background-color 0.15s ease;
}

.vacancy-row:hover {
    cursor: pointer;
    background-color: rgba(102, 126, 234, 0.08) !important;
}

.stat-card {
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */
@media (max-width: 768px) {
    .filter-section .d-flex {
        flex-direction: column;
        gap: 8px;
    }

    .filter-section input,
    .filter-section select {
        width: 100% !important;
        max-width: 100% !important;
    }

    .table-responsive {
        font-size: 0.85em;
    }

    .stat-card .stat-number {
        font-size: 1.8rem;
    }
}

/* ============================================================
   НАВИГАЦИЯ В ТЁМНОЙ ТЕМЕ
   ============================================================ */
body.dark-theme .navbar {
    background: #0f3460 !important;
}

body.dark-theme .navbar .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.3);
    color: #e0e0e0;
}

body.dark-theme .navbar .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

body.dark-theme .navbar .btn-light {
    background: rgba(255, 255, 255, 0.9);
    border-color: #ffffff;
    color: #0f3460;
}

