/* ===== Сброс и базовые стили ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #212529;
    background: #f5f5f5;
}

/* ===== Контейнер ===== */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Сетка (Row/Col) ===== */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.row-no-gap {
    gap: 0;
}

.row-no-gap > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
}

.col { flex: 1; }
.col-auto { flex: 0 0 auto; width: auto; }
.col-12 { flex: 0 0 100%; }
.col-md-1 { flex: 0 0 8.33%; max-width: 8.33%; }
.col-md-2 { flex: 0 0 16.66%; max-width: 16.66%; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-4 { flex: 0 0 33.33%; max-width: 33.33%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-8 { flex: 0 0 66.66%; max-width: 66.66%; }
.col-md-12 { flex: 0 0 100%; }

[class*="col-"] {
    padding: 0 0.25rem;
}

/* ===== Таблицы ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    background: white;
}

th, td {
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    text-align: left;
    vertical-align: middle;
}

th {
    background: #f8f9fa;
    font-weight: 600;
}

.table-sm th, .table-sm td {
    padding: 0.3rem 0.5rem;
    font-size: 0.9rem;
}

/* ===== Формы ===== */
label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    font-weight: 500;
}

input, select, textarea {
    resize: none;
    padding: 0.4rem 0.6rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 100%;
    background: white;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control, .form-control-sm { display: block; }
.form-select { appearance: auto; }

/* ===== Кнопки ===== */
.btn {
    display: inline-block;
    padding: 2px;
    border: none;
    border-radius: 0;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    background: none;
    color: inherit;
}

.btn-sm { padding: 2px; font-size: 0.8rem; }

.btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-warning,
.btn-outline-primary, .btn-outline-secondary, .btn-outline-success,
.btn-outline-danger, .btn-outline-warning {
    background: none;
    border: none;
    color: inherit;
}

.btn-outline-light { color: white; border-color: white; }

/* ===== Иконки в кнопках и ссылках ===== */
.btn img, a img, button img {
    width: 16px;
    height: 16px;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    vertical-align: middle;
    opacity: 0.8;
    transition: opacity 0.15s;
}

.btn:hover img, a:hover img, button:hover img {
    opacity: 1;
    filter: none;
}

/* ===== Отступы между кнопками в ячейках ===== */
td .btn + .btn,
td form + .btn,
td .btn + form { margin-left: 2px; }
td .btn { margin-top: 2px; margin-bottom: 2px; }

/* ===== Навигация ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    background: #212529;
    color: white;
}

.navbar-brand-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand {
    font-size: 1.0rem;
    font-weight: 500;
    line-height: 1;
}

.navbar-text { font-size: 0.9rem; }

.navbar .btn-outline-light {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    line-height: 1.5;
    display: inline-flex;
    align-items: center;
}

/* ===== Иконка домой ===== */
.navbar-home-icon {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    margin-left: 0;
    line-height: 1;
}

.navbar-home-img {
    width: 16px;
    height: 16px;
    opacity: 0.8;
    transition: opacity 0.15s;
    vertical-align: middle;
}

.navbar-home-img:hover { opacity: 1; }

/* ===== Выпадающее меню ===== */
.dropdown { position: relative; }

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    list-style: none;
    padding: 0.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 180px;
}

.dropdown-menu.show { display: block; }

.dropdown-item {
    display: block;
    padding: 0.25rem 0.5rem;
    color: #212529;
    text-decoration: none;
}

.dropdown-item:hover { background: #f8f9fa; }
.dropdown-toggle { color: white; border-color: white; }

.navbar .dropdown-toggle {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    line-height: 1.5;
}

/* ===== Вкладки (Tabs) ===== */
.nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    border-bottom: 2px solid #dee2e6;
}

.nav-item { margin: 0; }

.nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #0d6efd;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 0.95rem;
}

.nav-link:hover { border-color: #0d6efd; }
.nav-link.active { border-color: #0d6efd; font-weight: 600; }
.tab-content { background: white; padding: 1rem; border-radius: 0 0 8px 8px; }

/* ===== Модальное окно ===== */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1050;
}

.modal.show { display: flex; }

.modal-dialog {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    width: 90%;
    max-width: 500px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-title { font-size: 1.1rem; font-weight: 600; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }

/* ===== Вспомогательные утилиты ===== */
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.ms-2 { margin-left: 0.5rem; }
.me-2 { margin-right: 0.5rem; }
.p-3 { padding: 1rem; }
.text-muted { color: #6c757d; }
.text-center { text-align: center; }
.text-nowrap { white-space: nowrap; }
.small { font-size: 0.85rem; }
.badge { display: inline-block; padding: 0.2em 0.6em; border-radius: 0.25rem; font-size: 0.75em; font-weight: 600; }
.bg-success { background: #198754; color: white; }
.bg-light { background: #f8f9fa; }
.flex-grow-1 { flex-grow: 1; }
.w-100 { width: 100%; }
.rounded { border-radius: 4px; }
.border { border: 1px solid #dee2e6; }
.shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.list-group { list-style: none; padding: 0; }
.list-group-item { padding: 0.5rem 1rem; background: white; border-bottom: 1px solid #dee2e6; }
.list-group-item:last-child { border-bottom: none; }
.form-check { display: flex; align-items: center; gap: 0.25rem; }
.form-check-input { width: auto; }
.form-check-label { margin-bottom: 0; font-size: 0.9rem; }
.btn-check { display: none; }
.kanban-hidden { display: none; }
.task-form-hidden { display: none; }

/* ===== Специфичные для проекта ===== */
.phase-btn, .status-btn, .template-badge { margin: 0 2px; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-radius: 4px 0 0 4px; }
.btn-group .btn:last-child { border-radius: 0 4px 4px 0; }

/* ===== Адаптивность ===== */
@media (max-width: 768px) {
    .container { padding: 0 1rem; }
    .navbar .d-flex { flex-wrap: wrap; gap: 0.5rem; }
    .navbar-brand { font-size: 1rem; }
}
@media (max-width: 480px) {
    .container { padding: 0 0.5rem; }
    .navbar-text { font-size: 0.8rem; }
}

/* ===== Аватар пользователя ===== */
.navbar-user-photo {
    width: 36px; height: 36px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 8px;
}

.navbar-user-initials {
    width: 36px; height: 36px;
    background: #dc3545;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    margin-right: 8px;
}

/* ===== Иконка выхода ===== */
.btn-logout-icon {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
    text-decoration: none;
}

.navbar-exit-icon {
    width: 16px; height: 16px;
    opacity: 0.8;
    transition: opacity 0.15s;
}
.navbar-exit-icon:hover { opacity: 1; }

/* ===== Блок часов и таймера сессии ===== */
.navbar-session-block { display: flex; flex-direction: column; gap: 2px; }
.navbar-session-left { text-align: right; }
.navbar-session-right { text-align: left; margin-right: 8px; }
.navbar-session-block .navbar-clock { font-size: 22px; font-weight: 600; color: white; line-height: 1; }
.navbar-session-block .navbar-session-timer { font-size: 12px; color: rgba(255,255,255,0.7); line-height: 1; }
.navbar-session-divider { width: 1px; height: 30px; background: rgba(255,255,255,0.3); margin: 0 1px; }

/* ===== Проект: заголовок ===== */
.project-title { font-size: 1.3rem; font-weight: 600; line-height: 1.2; margin: 0; }
.project-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; gap: 1rem; }
.project-header-left { display: flex; align-items: center; gap: 0.5rem; flex: 1; min-width: 0; }
.project-header-right { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

.create-project-toggle {
    margin-bottom: 0.5rem;
}

.create-project-form {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* ===== Проект: этапы и даты ===== */
.project-phases-row {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.project-phases { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }

.phase-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    border: 1px solid #dee2e6;
    cursor: pointer;
    white-space: nowrap;
    background: #fff;
    color: #212529;
    transition: all 0.15s;
}

.phase-btn:first-child { border-radius: 6px 0 0 6px; }
.phase-btn:last-child { border-radius: 0 6px 6px 0; }
.phase-btn:not(:first-child):not(:last-child) { border-radius: 0; }

.phase-arrow { color: #adb5bd; margin: 0 2px; font-size: 0.85rem; }
.phase-done { background: #28a745; color: white; border-color: #28a745; }
.phase-active { background: #ffc107; color: #212529; border-color: #e0a800; font-weight: 600; box-shadow: 0 0 0 2px rgba(255,193,7,0.4); }
.phase-future { background: #cfe2ff; color: #084298; border-color: #b6d4fe; }
.phase-btn:hover { filter: brightness(0.95); }

.project-dates {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    background: #f1f3f5;
    border-radius: 6px;
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
    color: #495057;
    flex-shrink: 0;
    line-height: 1.4;
}

.project-date-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    line-height: inherit;
}

.project-date-display { font-weight: 500; font-size: 0.9rem; line-height: inherit; }
.project-dates .date-input-inline { width: 140px; padding: 0.25rem 0.4rem; font-size: 0.85rem; }

/* ===== Проект: табы ===== */
.project-tabs { display: flex; border-bottom: 2px solid #dee2e6; margin-bottom: 1rem; }

.tab-link {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #0d6efd;
}

.tab-link:hover { border-color: #0d6efd; }
.tab-link.active { border-color: #0d6efd; font-weight: 600; }
.tab-link.disabled { color: #6c757d; cursor: default; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.view-toggle { display: none; margin-left: 0.5rem; }
.tab-link.active .view-toggle { display: inline-flex; }

.view-switch {
    padding: 0.15rem 0.5rem;
    font-size: 0.8rem;
    background: none;
    border: 1px solid #dee2e6;
    cursor: pointer;
    color: #6c757d;
}

.view-switch:first-child { border-radius: 4px 0 0 4px; }
.view-switch:last-child { border-radius: 0 4px 4px 0; }
.view-switch.active { background: #0d6efd; color: white; border-color: #0d6efd; }

.days-overdue {
    font-weight: 600;
    color: #c62828;
}

.overdue-label {
    display: block;
    font-size: 0.65rem;
    color: #c62828;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1px;
}

/* ===== Канбан ===== */
.kanban-board { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; }

.kanban-column {
    width: 280px; min-width: 280px;
    flex-shrink: 0;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
}

.kanban-column-header { font-weight: 500; margin-bottom: 0.5rem; padding-bottom: 0.3rem; border-bottom: 2px solid #dee2e6; }

.task-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: grab;
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    position: relative;
}

.task-card.dragging { opacity: 0.5; }
.task-card-title { font-size: 0.85rem; font-weight: 500; }
.task-card-title a { text-decoration: none; color: inherit; }
.task-card-executor { font-size: 0.75rem; color: #6c757d; }
.task-card-dates { font-size: 0.75rem; }

.placeholder { height: 4px; background: #0d6efd; border-radius: 2px; margin: 4px 0; transition: all 0.2s; }

/* ===== Режим просмотра формы ===== */
.view-mode input,
.view-mode select,
.view-mode textarea {
    background-color: #fff !important;
    border: 1px solid #ced4da;
    color: #212529;
    -webkit-text-fill-color: #212529;
    opacity: 1;
}

.view-mode select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: none !important;
    padding-right: 0.5rem;
}

.view-mode .form-select { background-image: none !important; }
.view-mode #edit-buttons { display: none !important; }
.view-mode .required-star { display: none; }

#edit-buttons.d-none { display: none; }
#toggle-edit-btn.d-none { display: none; }

/* ===== Таблица проектов ===== */
.projects-table th {
    position: relative;
    user-select: none;
    cursor: pointer;
    padding: 8px 20px 8px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.projects-table th:hover { background: #e9ecef; }
.projects-table th.asc,
.projects-table th.desc { background: #cfe2ff; overflow: visible; }

.projects-table th.asc::after,
.projects-table th.desc::after {
    font-size: 0.8em;
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    line-height: 1;
}

.projects-table th.asc::after { content: '▲'; }
.projects-table th.desc::after { content: '▼'; }

.projects-table .resize-handle {
    display: inline-block;
    width: 5px;
    height: 100%;
    background: transparent;
    cursor: col-resize;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2;
}

.projects-table .resize-handle:hover { background: #adb5bd; }
.measure-span { visibility: hidden; position: absolute; white-space: nowrap; }
.phase-bars { display: flex; gap: 2px; margin-bottom: 4px; }
.phase-bar { height: 10px; width: 30px; border: 1px solid #999; background: #fff; }
.phase-bar.phase-active { background: #ffc107; }
.phase-bar.phase-done { background: #28a745; }

.task-readonly {
    cursor: default;
    user-select: none;
    pointer-events: none;
    background: #f5f5f5;
    color: #6c757d;
}

.template-badge a { text-decoration: none; }

/* ===== Раскладка задачи ===== */
.task-side-title {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #212529;
}

#panel-general .col-md-4 {
    padding-left: 16px;
}

/* ===== Трекер работы ===== */
.work-tracker {
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 250px);
    min-height: 400px;
}

.work-timer {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    flex-shrink: 0;
}

.work-timer-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
}

.work-timer-clock {
    font-size: 1.5rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #212529;
    min-width: 100px;
}

.work-log-table input {
    padding: 0.25rem 0.4rem;
    font-size: 0.85rem;
}

.work-log-confirmed {
    background: #f1f3f5;
    opacity: 0.8;
}

/* ===== Исполнение: трекер ===== */
.execution-layout {
    display: flex;
    gap: 4px;
    flex: 1;
    min-height: 0;
}

.work-log-table img {
    width: 16px;
    height: 16px;
}

.work-log-table-wrap {
    flex: 1;
    min-width: 300px;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.work-log-body-scroll {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.work-log-table {
    table-layout: auto;
    width: auto;
    min-width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    border: none;
}

.work-log-table thead th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 2;
    font-size: 0.7rem;
    border-bottom: 1px solid #dee2e6;
}

.work-log-table th,
.work-log-table td {
    white-space: nowrap;
    padding: 0.3rem 0.5rem;
    border: none;
}

.work-log-table td {
    font-size: 0.8rem;
    height: 30px;
    line-height: 1;
}

.work-log-table tbody tr:nth-child(odd) {
    background: #ffffff;
}

.work-log-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.work-log-table button:disabled {
    cursor: default;
    pointer-events: none;
}

.work-log-confirmed {
    background: #e6f4e6 !important;
}

.work-log-table tr.row-selected {
    background: #cfe2ff !important;
}

.work-comment-panel {
    width: 400px;
    min-width: 300px;
    display: flex;
    flex-direction: column;
}

.work-comment-panel textarea {
    flex: 1;
    resize: none;
    font-size: 0.9rem;
}

.work-image-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    min-width: 200px;
}

.work-image-panel .image-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.85rem;
}

.work-image-panel img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.upload-progress {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 1rem;
}

.upload-progress-bar {
    height: 8px;
    background: #0d6efd;
    border-radius: 4px;
    transition: width 0.1s;
    width: 0;
}

.work-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    flex-shrink: 0;
    border-top: 1px solid #dee2e6;
}

.work-pagination button:disabled {
    opacity: 0.4;
    cursor: default;
}

/* ===== Активная задача в навбаре ===== */
.navbar-active-task,
.navbar-active-placeholder {
    height: 36px;
    align-items: center;
    margin-left: 8px;
}

.navbar-active-placeholder .navbar-not-working {
    width: 300px;
    height: 36px;
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding-left: 12px;
    justify-content: flex-start;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

.navbar-task-link {
    width: 300px;
    height: 36px;
    background: rgba(255,255,255,0.12);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.75rem;
    text-decoration: none;
    color: white;
    transition: background 0.15s;
}

.navbar-task-link:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

.navbar-task-title {
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.navbar-task-timer {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    line-height: 1;
}

/* ===== История задачи ===== */
.task-history-list {
    font-size: 12px;
    color: #6c757d;
    max-height: 100%;
    overflow-y: auto;
}

.task-history-item {
    padding: 0.25rem 0;
    border-bottom: 1px solid #eee;
}

.task-history-line {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6c757d;
}

.task-history-date {
    font-size: 12px;
    color: #6c757d;
}

.task-history-user {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.task-history-text {
    margin-top: 2px;
}

.task-history-empty {
    color: #adb5bd;
    font-style: italic;
}

/* ===== Рабочий стол работника ===== */
.worker-layout {
    display: flex;
    gap: 1.5rem;
}

.worker-projects {
    flex: 0 0 400px;
}

.worker-tasks {
    flex: 1;
}

.worker-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #212529;
}

.worker-project-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.worker-project-item {
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: box-shadow 0.15s;
}

.worker-project-item:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.worker-project-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.worker-project-phase {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.worker-task-card {
    display: block;
    padding: 1rem;
    background: linear-gradient(135deg, #e6f0ff, #f0f4ff);
    border: 1px solid #b6d4fe;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s;
}

.worker-task-card:hover {
    box-shadow: 0 2px 8px rgba(13,110,253,0.2);
    color: inherit;
}

.worker-task-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.worker-task-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

.worker-task-status {
    background: #cfe2ff;
    color: #084298;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.worker-task-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.worker-task-item {
    display: block;
    padding: 0.6rem 0.8rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s;
}

.worker-task-item:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    color: inherit;
}

.worker-task-name {
    font-weight: 500;
    font-size: 0.85rem;
}

.phase-btn.no-click {
    cursor: default;
}

/* ===== Таймлайн работника ===== */
.worker-timeline {
    margin-top: 0.5rem;
    padding-bottom: 1rem;
}

.timeline-months-row,
.timeline-days-row {
    display: flex;
    flex-wrap: nowrap;
}

.timeline-months-row {
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 2px;
}

.timeline-days-row {
    font-size: 11px;
    color: #6c757d;
    padding-bottom: 4px;
}

.timeline-month {
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-day {
    flex-shrink: 0;
    text-align: center;
}

.timeline-body {
    min-width: 100%;
}

.timeline-row {
    display: flex;
    align-items: center;
    margin: 4px 0;
}

.timeline-label {
    width: 200px;
    flex-shrink: 0;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 8px;
}

.timeline-bar-wrap {
    position: relative;
    height: 22px;
}

.timeline-bar {
    position: absolute;
    top: 3px;
    height: 16px;
    border-radius: 3px;
    opacity: 0.85;
}

.timeline-label-header {
    flex-shrink: 0;
}

.timeline-future {
    flex-shrink: 0;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #adb5bd;
    letter-spacing: 2px;
}

/* ===== Форма создания проекта ===== */
.create-form {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.create-form-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.create-form-row + .create-form-row {
    margin-top: 8px;
}

.create-form-row select,
.create-form-row input {
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    height: 29px;
    box-sizing: border-box;
}

.create-form-row select {
    flex: 1;
}

.create-form-row input[name="object_name"] {
    flex: 2;
}

.create-form-row input[name="short_description"] {
    flex: 3;
}

.create-form-row input[type="date"] {
    flex: 0 0 130px;
    min-width: 130px;
    height: 29px;
    box-sizing: border-box;
    -webkit-appearance: none;
    -webkit-padding-start: 8px;
}

.btn-create-save {
    flex-shrink: 0;
}

#toggle-icon {
    margin-left: 4px !important;
    vertical-align: middle;
}

/* Login page */
.login-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('/static/img/promaero_login.webp') center/cover no-repeat;
    animation: slowZoom 30s alternate infinite;
    z-index: 0;
}
.login-bg::after {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(21, 21, 21, 0.7);
    z-index: 1;
}
@keyframes slowZoom {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}
.login-form-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-form {
    background: rgba(21, 21, 21, 0.8);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 2.5rem;
    width: 400px;
    box-shadow: 0 8px 32px rgba(21, 21, 21, 0.2);
}
.login-form h1 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}
.login-error {
    background: rgba(255,255,255,0.15);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Стили ТОЛЬКО для формы логина */
.login-form-wrapper .form-label {
    color: rgba(255,255,255,0.9);
}
.login-form-wrapper .form-control {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
}
.login-form-wrapper .form-control:focus {
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.15);
}
.login-form-wrapper .form-control::placeholder {
    color: rgba(255,255,255,0.5);
}
.login-form-wrapper .btn-primary {
    background: #d1001d;
    color: white;
    border: none;
    padding: 0.7rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
}
.login-form-wrapper .btn-primary:hover {
    background: #b00018;
}