/* Стили приложения: только нужное (донор — Bulma), всё в одном файле */

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #363636;
  background-color: #e5e3de;
  padding-top: 3.25rem;
}
a { color: #2563eb; }
a:visited { color: #2563eb; }
a:hover { color: #1d4ed8; }
.section { padding: 3rem 1.5rem; background-color: #e5e3de; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }

/* Сетка: два ряда колонок */
.columns { display: flex; flex-wrap: wrap; margin-left: -0.75rem; margin-right: -0.75rem; }
.column { flex: none; padding: 0.75rem; }
@media (min-width: 769px) {
  .column.is-5 { width: 41.6666%; }
  .column:not(.is-narrow):not(.is-12) { flex-grow: 1; }
}

/* Карточка */
.box {
  padding: 1.25rem;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #a8a59e;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* Типографика */
.title { font-size: 2rem; font-weight: 300; line-height: 1.125; margin: 0 0 1.5rem; color: #363636; }
.title.is-5 { font-size: 1.25rem; }
.subtitle { font-size: 1.25rem; font-weight: 400; line-height: 1.25; margin: 0 0 1rem; color: #363636; }
.subtitle.is-6 { font-size: 1rem; }
.has-text-weight-semibold { font-weight: 600; }
.has-text-grey { color: #7a7a7a; }
.is-size-7 { font-size: 0.75rem; }
.has-text-danger { color: #f14668; }

/* Формы */
.field:not(:last-child) { margin-bottom: 1rem; }
.label { display: block; font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; color: #363636; }
.control { clear: both; font-size: 1rem; position: relative; }
.control:not(:last-child) { margin-bottom: 0.75rem; }
.input, .select select, .textarea {
  width: 100%;
  max-width: 100%;
  font-size: 1rem;
  height: 2.5em;
  padding: 0.375rem 0.75rem;
  line-height: 1.5;
  color: #363636;
  background: #fff;
  border: 1px solid #dbdbdb;
  border-radius: 4px;
  box-shadow: inset 0 1px 2px rgba(10,10,10,.05);
}
.input:focus, .select select:focus { outline: none; border-color: #485fc7; }
.select { display: inline-block; max-width: 100%; position: relative; vertical-align: top; }
.select select { cursor: pointer; display: block; padding-right: 2.5em; }
.select:not(.is-multiple):not(.is-loading)::after { border-color: #363636; right: 1.125em; }
.help { font-size: 0.75rem; margin-top: 0.25rem; color: #7a7a7a; }
.checkbox { cursor: pointer; display: inline-flex; align-items: center; }
.checkbox input { margin-right: 0.5em; cursor: pointer; }

/* Кнопки */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 4px;
  text-decoration: none;
  color: #363636;
  background: #f5f5f5;
  border-color: #dbdbdb;
}
.button:hover { border-color: #b5b5b5; color: #363636; }
.button.is-primary { background: #485fc7; border-color: #485fc7; color: #fff; }
.button.is-primary:hover { background: #3a51bb; border-color: #3a51bb; color: #fff; }
.button.is-light { background: #f5f5f5; border-color: #dbdbdb; color: #363636; }
.button.is-light:hover { border-color: #b5b5b5; background: #eee; color: #363636; }
.button.is-small { font-size: 0.75rem; padding: 0.25rem 0.5rem; }
.field.is-grouped { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.field.is-grouped .control:last-child { margin-bottom: 0; }
.field-body { flex-grow: 1; }
.field.is-horizontal { display: flex; }
.field-label { flex: 0 0 auto; margin-right: 1rem; }
.field-label.is-normal { padding-top: 0.375rem; }
.field-label .label { margin-bottom: 0; }
.field-body .field { margin-bottom: 0.75rem; }

/* Навбар: одна строка — бренд слева, меню по центру и справа */
.navbar {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 3.25rem;
  background: #f5f5f5;
  border-bottom: 1px solid #b5b2ad;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
}
.navbar-brand,
.navbar-menu {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 3.25rem;
}
.navbar-brand { align-items: center; }
.navbar-menu { flex-grow: 1; flex-shrink: 0; }
.navbar-start,
.navbar-end {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
}
.navbar-start { justify-content: flex-start; margin-right: auto; }
.navbar-end { justify-content: flex-end; margin-left: auto; }
.navbar-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  color: #363636;
  text-decoration: none;
}
.navbar-item:hover { background: #e8e8e8; color: #363636; }
.navbar-item.is-active { background: #e8e8e8; color: #363636; font-weight: 600; }
@media (max-width: 768px) {
  .navbar-menu { display: none; }
  .navbar .navbar-menu.is-active { display: flex; }
}

/* Таблица */
.table { width: 100%; border-collapse: collapse; border: 1px solid #a8a59e; background: #fff; }
.table td, .table th {
  border: 1px solid #b5b2ad;
  padding: 0.5em;
  text-align: left;
  vertical-align: middle;
}
.table thead th { border-bottom: 2px solid #7a7874; color: #363534; font-weight: 600; }
.table tbody tr:hover td { background-color: #f2f0eb; }
.table.is-striped tbody tr:nth-child(even) td { background-color: #e8e6e3; }
.table.is-striped tbody tr:nth-child(odd) td { background-color: #fff; }
.table.is-striped tbody tr:hover td { background-color: #d4d2ce; }
.table-users .button.is-small { text-decoration: none; }

/* Страница «События»: фильтры в одну строку */
.events-filter-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; }
.events-filter-row .field { margin-bottom: 0; }
.events-filter-row .field .input[type="date"] { width: 10.5em; }
.events-filter-row .field .select select { min-width: 12em; }
.events-filter-tags .event-filter-tag { text-decoration: none; border: 2px solid #0d9488; background: #f0fdfa; color: #0f766e; font-weight: 500; border-radius: 6px; cursor: pointer; }
.events-filter-tags .event-filter-tag:hover { background: #ccfbf1; color: #0f766e; }
.events-filter-tags .event-filter-tag.is-link { background: #0d9488; color: #fff; border-color: #0d9488; }

/* Таблица событий: изменяемая ширина столбцов (перетаскивание правой границы заголовка), перенос текста в границах колонки */
.table-events { table-layout: fixed; }
.table-events thead th,
.table-events tbody td { word-wrap: break-word; overflow-wrap: break-word; white-space: normal; }
.table-events thead th { position: relative; padding-right: 10px; }
.th-resize-handle { position: absolute; top: 0; right: 0; width: 8px; height: 100%; cursor: col-resize; }
.th-resize-handle:hover { background: rgba(72,95,199,.25); }
.table-events .th-resize-handle { user-select: none; }
.event-time-accent { font-weight: 700; }
.table-events tbody tr.event-row-exception td { color: #b91c1c !important; }

.page-title-with-help { display: flex; align-items: center; gap: 0.5rem; }
.page-help-btn { width: 2rem; height: 2rem; border-radius: 999px; padding: 0; font-weight: 700; line-height: 1; }

/* Уведомления */
.notification { padding: 1rem 1.5rem; border-radius: 4px; position: relative; }
.notification.is-danger { background: #f14668; color: #fff; }
.notification.is-danger.is-light { background: #feecf0; color: #cc0f35; }
.notification.is-success.is-light { background: #eff5ef; color: #257942; }
.notification.is-warning { background: #ffe08a; color: #363636; }
.notification.is-warning.is-light { background: #fff8e8; color: #946c00; }

/* Теги */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0 0.75em;
  font-size: 0.75rem;
  height: 2em;
  line-height: 1.5;
  white-space: nowrap;
  border-radius: 4px;
  background: #f5f5f5; color: #363636;
}
.tag.is-medium { font-size: 0.875rem; height: 2.25em; padding: 0 1em; }
.tag.is-link { background: #485fc7; color: #fff; }
.tag.is-link.is-light { background: #eef2ff; color: #3850b7; }
.delete {
  -webkit-touch-callout: none; user-select: none;
  -moz-appearance: none; -webkit-appearance: none;
  background: rgba(10,10,10,.2);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px; width: 20px;
  padding: 0;
}
.delete::before { content: "×"; color: #fff; font-size: 1rem; font-weight: 700; }
.delete.is-small { height: 16px; width: 16px; }
.delete.is-small::before { font-size: 0.75rem; }

/* Отступы */
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1.5rem; }

/* --- Собственные стили приложения --- */
.form-page.section { padding-top: 1.25rem; }
.table th.reports-money, .table td.reports-money,
.table th.reports-hours, .table td.reports-hours {
  text-align: right;
  white-space: nowrap;
}

/* Форма редактирования события: одна карточка, единые отступы 0.5rem */
.event-edit-card { padding: 0.5rem; }
.event-edit-card-title { margin: 0 0 1rem 0; padding-left: 0.5rem; font-size: 1.5rem; font-weight: 600; }
.event-edit-row { display: table; width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.event-edit-col { display: table-cell; vertical-align: top; padding: 0.5rem; box-sizing: border-box; }
.event-edit-col--left { width: 42%; }
.event-edit-col--right { width: 58%; }
.event-edit-col .box { box-sizing: border-box; }
.event-edit-form-actions { width: 100%; margin-top: 1rem; padding-left: 0.5rem; }

/* Форма «Ручная отметка»: одна карточка; отступы как у формы редактирования события (только классы manual-mark-*) */
.manual-mark-card { padding: 0.5rem; }
.manual-mark-card-title { margin: 0 0 1rem 0; padding-left: 0.5rem; font-size: 1.5rem; font-weight: 600; }
.manual-mark-form-actions { width: 100%; margin-top: 1rem; padding-left: 0.5rem; }
.manual-mark-first-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.manual-mark-first-row .field { flex: 1; min-width: 12rem; }
.manual-mark-datetime-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.manual-mark-hr { margin: 1.75rem 0; border: none; border-top: 2px solid #999; }
.manual-mark-card .event-tag-add,
.manual-mark-card .event-tag-chip { border: 2px solid #0d9488; background: #f0fdfa; color: #0f766e; font-weight: 500; border-radius: 6px; padding: 0.35em 0.75em; cursor: pointer; display: inline-flex; align-items: center; min-height: 2em; }
.manual-mark-card .event-tag-add:hover { background: #0d9488; color: #fff; border-color: #0d9488; }
.manual-mark-card .event-tag-chip { background: #0d9488; color: #fff; border-color: #0d9488; }
.manual-mark-card .event-tag-chip .delete { margin-left: 0.35rem; }
.manual-mark-card .event-tag-chip .delete:hover { background: rgba(255,255,255,.3); }

.event-edit-datetime { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.event-edit-datetime .field { flex: 0 0 auto; margin-bottom: 0; }
.event-edit-date { width: 10.5em; }
.event-edit-time { width: 7em; }

/* Общий виджет даты и времени: дата + селекты час/минута (без бесконечной прокрутки) */
.datetime-widget { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.datetime-widget-date { width: 10.5em; }
.datetime-widget-time { display: flex; align-items: center; gap: 0.25rem; }
.datetime-widget-hour,
.datetime-widget-minute { width: 4.5em; padding: 0.35em 0.5em; font-size: 1rem; border: 1px solid #dbdbdb; border-radius: 4px; background: #fff; cursor: pointer; }
.datetime-widget-time-sep { font-weight: 600; color: #363636; }

.role-tiles { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.role-tiles label.button { margin-bottom: 0; cursor: pointer; }
.role-tiles input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.role-tiles label.button:has(input:checked) { background-color: #485fc7; color: #fff; border-color: #485fc7; }

/* Стиль «выбор при правке»: переключатель Вход/Выход и теги — один визуальный язык, не как кнопки Сохранить/Отмена */
.choice-color { --choice-border: #0d9488; --choice-bg: #f0fdfa; --choice-text: #0f766e; --choice-bg-selected: #0d9488; --choice-text-selected: #fff; }
.event-type-tiles { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.event-type-tiles label.button { margin-bottom: 0; cursor: pointer; border: 2px solid var(--choice-border, #0d9488); background: var(--choice-bg, #f0fdfa); color: var(--choice-text, #0f766e); font-weight: 500; border-radius: 6px; padding: 0.4em 0.9em; }
.event-type-tiles label.button:hover { background: #ccfbf1; color: #0f766e; border-color: #0d9488; }
.event-type-tiles input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.event-type-tiles label.button.is-primary { background: var(--choice-bg-selected, #0d9488); color: var(--choice-text-selected, #fff); border-color: #0d9488; box-shadow: none; }
.event-type-tiles label.button.is-light { background: #f0fdfa; color: #0f766e; border-color: #0d9488; }

/* Теги в форме редактирования — тот же стиль «выбор», без серых кнопок */
.event-edit-card .event-tag-add,
.event-edit-card .event-tag-chip { border: 2px solid #0d9488; background: #f0fdfa; color: #0f766e; font-weight: 500; border-radius: 6px; padding: 0.35em 0.75em; cursor: pointer; display: inline-flex; align-items: center; min-height: 2em; }
.event-edit-card .event-tag-add:hover { background: #0d9488; color: #fff; border-color: #0d9488; }
.event-edit-card .event-tag-chip { background: #0d9488; color: #fff; border-color: #0d9488; }
.event-edit-card .event-tag-chip .delete { margin-left: 0.35rem; }
.event-edit-card .event-tag-chip .delete:hover { background: rgba(255,255,255,.3); }

/* Модальное окно (Bulma-совместимая разметка) */
.modal { display: none; align-items: center; justify-content: center; position: fixed; inset: 0; z-index: 40; }
.modal.is-active { display: flex; }
.modal-background { position: absolute; inset: 0; z-index: 0; background: rgba(10,10,10,.86); cursor: pointer; }
.modal-content { position: relative; z-index: 1; max-height: calc(100vh - 2rem); overflow-y: auto; margin: 1rem; width: 100%; max-width: 56em; background: #fff; border-radius: 6px; border: 1px solid #a8a59e; box-shadow: 0 8px 24px rgba(10,10,10,.25); flex-shrink: 0; }
.modal-close { position: absolute; z-index: 2; top: 0.5rem; right: 0.5rem; }
/* Модалка разрешения инцидента: две колонки, границы, плотнее по вертикали */
#incident-resolve-modal-body { padding: 1rem; background: #fff; }
#incident-resolve-modal-body .field { margin-bottom: 0.6rem; }
#incident-resolve-modal-body .field .label { margin-bottom: 0.25rem; }
#incident-resolve-modal-body .help { margin-top: 0.2rem; margin-bottom: 0.25rem; }
.incident-resolve-title { font-size: 1.2rem; margin: 0 0 0.6rem; padding-bottom: 0.5rem; border-bottom: 2px solid #4a4a4a; color: #363636; }
.incident-resolve-title-prefix { font-weight: 400; }
.incident-resolve-title-type { font-weight: 700; color: #0f766e; }
.incident-resolve-columns { margin: 0 -0.5rem; display: flex; flex-wrap: nowrap; }
.incident-resolve-left { flex: 0 0 38%; max-width: 38%; border-right: 2px solid #8a8a8a; padding: 0 0.75rem 0 0; }
.incident-resolve-right { flex: 1 1 60%; min-width: 0; padding-left: 0.75rem; }
.incident-resolve-block { padding: 0.4rem 0; }
.incident-resolve-block:not(:last-child) { border-bottom: 1px solid #b5b5b5; }
.incident-resolve-divider { padding-top: 0.5rem; margin-top: 0.4rem; border-top: 2px solid #8a8a8a; }
.incident-timeline { font-size: 0.9rem; }
.incident-timeline-row { margin-bottom: 0.25rem; }
.incident-timeline-last { background: #fef3c7; border-left: 3px solid #d97706; padding: 0.35rem 0.5rem; margin-left: -0.5rem; padding-left: 0.5rem; font-weight: 600; color: #92400e; }
.incident-timeline .notification { margin-top: 0.4rem; padding: 0.4rem 0.6rem; }
/* Теги и время в модалке — как на странице «Ручная отметка» */
.incident-resolve-right .event-tag-add,
.incident-resolve-right .event-tag-chip { border: 2px solid #0d9488; background: #f0fdfa; color: #0f766e; font-weight: 500; border-radius: 6px; padding: 0.35em 0.75em; cursor: pointer; display: inline-flex; align-items: center; min-height: 2em; }
.incident-resolve-right .event-tag-add:hover { background: #0d9488; color: #fff; border-color: #0d9488; }
.incident-resolve-right .event-tag-chip { background: #0d9488; color: #fff; border-color: #0d9488; }
.incident-resolve-right .event-tag-chip .delete { margin-left: 0.35rem; }
.incident-resolve-right .event-tag-chip .delete:hover { background: rgba(255,255,255,.3); }
.incident-resolve-right .datetime-widget { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.incident-resolve-right .datetime-widget-time { display: flex; align-items: center; gap: 0.25rem; }
.incident-resolve-right .datetime-widget-hour,
.incident-resolve-right .datetime-widget-minute { width: 4.5em; padding: 0.35em 0.5em; font-size: 1rem; border: 1px solid #dbdbdb; border-radius: 4px; background: #fff; cursor: pointer; }
.incident-resolve-right .datetime-widget-time-sep { font-weight: 600; color: #363636; }
@media (max-width: 768px) {
  .incident-resolve-columns { flex-wrap: wrap; }
  .incident-resolve-left { flex: none; max-width: none; width: 100%; border-right: none; border-bottom: 1px solid #dbdbdb; padding-right: 0; padding-bottom: 1rem; }
  .incident-resolve-right { flex: none; min-width: 0; padding-left: 0; }
}
.modal-card { position: relative; max-width: 28em; width: 100%; max-height: calc(100vh - 2rem); margin: 1rem; background: #fff; border-radius: 6px; box-shadow: 0 8px 16px rgba(10,10,10,.1); display: flex; flex-direction: column; }
.modal-card-head { padding: 1rem 1.5rem; border-bottom: 1px solid #dbdbdb; display: flex; align-items: center; justify-content: space-between; }
.modal-card-title { margin: 0; font-size: 1.25rem; font-weight: 600; }
.modal-card-body { padding: 1.5rem; overflow: auto; flex: 1; }
.modal-card-foot { padding: 1rem 1.5rem; border-top: 1px solid #dbdbdb; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.control.has-addons { display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; }
.control.has-addons .select + .button { flex-shrink: 0; }
.control.has-addons .input + .button { flex-shrink: 0; }

/* Reports (time_track/reports): используем общую тему */
.reports-section { padding: 1rem 0.75rem; }
.reports-screen { width: 100%; max-width: none; margin: 0; }
.reports-layout { display: flex; gap: 1rem; align-items: flex-start; }
.reports-sidebar { width: 250px; position: sticky; top: 4.25rem; }
.reports-main { flex: 1; min-width: 0; }
.reports-side-list { list-style: none; margin: 0; padding: 0; }
.reports-side-list li { margin: 0 0 0.25rem; }
.reports-side-link { display: block; padding: 0.45rem 0.6rem; border-radius: 4px; color: #363636; text-decoration: none; border: 1px solid transparent; margin-bottom: 0.25rem; }
.reports-side-link:hover { background: #f5f5f5; border-color: #dbdbdb; }
.reports-side-link.is-active { background: #e8ecff; border-color: #485fc7; color: #2f3ea8; font-weight: 600; }
.reports-filters { display: flex; gap: 0.75rem; margin: 0 0 1rem; align-items: end; flex-wrap: wrap; }
.reports-employee-select { min-width: 320px; }
.reports-employee-toolbar { align-items: center; gap: 0.55rem; }
.reports-toolbar-title { font-weight: 600; margin-right: 0.5rem; }
.reports-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.reports-card { padding: 0.9rem; }
.reports-muted { color: #7a7a7a; font-size: 0.875rem; }
.kpi { font-size: 1.75rem; font-weight: 700; line-height: 1.1; margin-top: 0.25rem; }
.reports-table-scroll { overflow-x: auto; }
.reports-timesheet { border-collapse: separate; border-spacing: 0; }
.reports-timesheet th, .reports-timesheet td { text-align: center; white-space: nowrap; min-width: 62px; border: 1px solid #d1d5db; padding: 0.35rem; font-size: 0.78rem; }
.reports-timesheet thead th { position: sticky; top: 0; background: #f8fafc; z-index: 10; }

/* Закреплённые колонки в шапке должны быть выше остальных заголовков */
.reports-timesheet thead th:first-child { z-index: 90; background: #f8fafc; }
.reports-timesheet thead th:nth-child(2) { z-index: 89; background: #f8fafc; }
.reports-timesheet thead th:nth-child(3) { z-index: 88; background: #f8fafc; }
.reports-timesheet th:first-child,
.reports-timesheet td:first-child {
  text-align: left;
  position: sticky;
  top: 0;
  left: 0;
  background: #fff;
  z-index: 25;
  min-width: 210px;
  width: 210px;
  max-width: 210px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reports-timesheet th:nth-child(2),
.reports-timesheet td:nth-child(2) {
  text-align: right;
  position: sticky;
  top: 0;
  left: 210px;
  background: #fff;
  z-index: 24;
  min-width: 120px;
  width: 120px;
  max-width: 120px;
}
.reports-timesheet th:nth-child(3),
.reports-timesheet td:nth-child(3) {
  text-align: right;
  position: sticky;
  top: 0;
  left: 330px;
  background: #fff;
  z-index: 23;
  min-width: 110px;
  width: 110px;
  max-width: 110px;
}
.reports-weekday { font-size: 0.68rem; text-transform: lowercase; color: #475569; }
.reports-col-weekend { background: #dbeafe !important; color: #1e3a8a; }
.reports-col-divider { border-left: 3px solid #475569 !important; }
.reports-day-ok { background: #bbf7d0; color: #14532d; }
.reports-day-warn { background: #fed7aa; color: #7c2d12; }
.reports-day-bad { background: #fecaca; color: #7f1d1d; }
.reports-day-missing { background: #f3f4f6; color: #6b7280; }
.reports-cell { position: relative; cursor: help; }
.reports-timesheet tbody tr:hover td { border-color: #94a3b8 !important; }
.reports-timesheet tbody tr:hover td:nth-child(1),
.reports-timesheet tbody tr:hover td:nth-child(2),
.reports-timesheet tbody tr:hover td:nth-child(3) {
  box-shadow: inset 0 0 0 2px rgba(72,95,199,.25);
}
.reports-cell.reports-has-manual::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  background: #2563eb;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  z-index: 1;
}
.reports-cell.reports-has-floor::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  background: #dc2626;
  clip-path: polygon(100% 100%, 0 100%, 100% 0);
  z-index: 1;
}
.reports-legend-marker-manual, .reports-legend-marker-floor { display: inline-block; width: 10px; height: 10px; margin-right: 4px; vertical-align: middle; border-radius: 2px; }
.reports-legend-marker-manual { background: #2563eb; }
.reports-legend-marker-floor { background: #dc2626; }
.reports-tooltip { display: none; position: fixed; z-index: 10000; max-width: 420px; background: rgba(248, 250, 252, 0.98); color: #0f172a; border: 1px solid #94a3b8; border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.5; box-shadow: 0 10px 24px rgba(15,23,42,.22); pointer-events: none; }
.reports-tooltip .rtt-title { font-weight: 700; margin-bottom: 8px; color: #1e40af; font-size: 15px; }
.reports-heatmap th, .reports-heatmap td { text-align: center; min-width: 22px; padding: 2px; font-size: 11px; line-height: 1.1; }
.reports-heatmap .reports-weekday { font-size: 10px; }
.reports-employee-heatmap th, .reports-employee-heatmap td { min-width: 44px; }
.reports-employee-heatmap th:first-child, .reports-employee-heatmap td:first-child { min-width: 40px; }
.reports-heat-on { background: #c7d2fe; }
.reports-heat-floor { background: #99f6e4; }
.reports-heat-off { background: #f5f5f5; }
.reports-hour-mark { border-left: 2px solid #334155 !important; }
.reports-delta-pos { color: #166534; font-weight: 600; }
.reports-delta-neg { color: #b91c1c; font-weight: 600; }
.reports-delta-zero { color: #475569; font-weight: 600; }
.reports-day-details .reports-group-head {
  background: #e2e8f0;
  color: #0f172a;
  text-align: center;
  font-weight: 700;
  border-bottom: 2px solid #94a3b8;
}
.reports-day-details thead tr:first-child th:nth-child(2),
.reports-day-details thead tr:first-child th:nth-child(3) {
  border-left: 8px solid #6b7280;
}
.reports-day-details thead tr:nth-child(2) th:nth-child(7),
.reports-day-details tbody tr td:nth-child(7) {
  border-left: 8px solid #6b7280;
}
.reports-day-details thead tr:nth-child(2) th:nth-child(12),
.reports-day-details tbody tr td:nth-child(12) {
  border-left: 8px solid #6b7280;
}

/* Выравнивание колонок в расшифровке по дням */
.reports-day-details th,
.reports-day-details td { text-align: center; }
.reports-day-details th:nth-child(1),
.reports-day-details td:nth-child(1),
.reports-day-details th:nth-child(16),
.reports-day-details td:nth-child(16) { text-align: left; }
.reports-day-details th:nth-child(10),
.reports-day-details td:nth-child(10),
.reports-day-details th:nth-child(11),
.reports-day-details td:nth-child(11) { text-align: right; }
.reports-day-details td:nth-child(11) { font-weight: 700; }
@media (max-width: 1000px) {
  .reports-layout { display: block; }
  .reports-sidebar { width: auto; position: static; margin-bottom: 1rem; }
  .reports-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .reports-grid { grid-template-columns: 1fr; }
}
