/* MY WORK — Новый табель с редактированием прямо в строке. */

#timesheet {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.timesheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.timesheet-head h1 {
  margin: 0 0 6px;
}

.timesheet-description {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.timesheet-divider {
  height: 1px;
  background: var(--line);
  border-radius: 999px;
}

.timesheet-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.timesheet-month-switcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.timesheet-month-switcher strong {
  min-width: 150px;
  font-size: 18px;
  font-weight: 700;
}

.timesheet-nav-btn {
  width: 40px;
  min-width: 40px;
  padding-inline: 0;
}

.timesheet-table-card {
  overflow: hidden;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 22px;
}

.timesheet-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.timesheet-table th,
.timesheet-table td {
  padding: 16px 14px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

/* MY WORK — Внешний контур рисует контейнер таблицы. */
.timesheet-table tr > :last-child {
  border-right: 0;
}

.timesheet-table tbody tr:last-child > td {
  border-bottom: 0;
}

.timesheet-table thead th {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  background: var(--background);
}

.timesheet-table th:nth-child(1) {
  width: 19%;
}

.timesheet-table th:nth-child(2) {
  width: 12%;
}

.timesheet-table th:nth-child(3) {
  width: 18%;
}

.timesheet-table th:nth-child(4),
.timesheet-table th:nth-child(5) {
  width: 12%;
}

.timesheet-table th:nth-child(6) {
  width: 10%;
}

.timesheet-table th:nth-child(7) {
  width: 10%;
}

.timesheet-message {
  color: var(--text-muted);
  text-align: center;
}

.timesheet-date-cell {
  font-weight: 600;
  color: var(--text);
  background: color-mix(in srgb, var(--background) 94%, var(--line));
}

.timesheet-editable {
  cursor: text;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.timesheet-editable:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.timesheet-editable.is-editing {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.timesheet-inline-editor {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
}

.timesheet-inline-editor--fact input,
.timesheet-inline-editor--break input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  background: var(--background);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  outline: none;
}

.timesheet-inline-editor--fact input {
  max-width: 92px;
}

.timesheet-inline-editor--break input {
  max-width: 90px;
}

.timesheet-inline-separator {
  color: var(--text-muted);
  user-select: none;
}

.timesheet-muted {
  color: var(--text-muted);
}

@media (max-width: 1200px) {
  .timesheet-table {
    min-width: 980px;
  }

  .timesheet-table-card {
    overflow: auto;
  }
}

@media (max-width: 768px) {
  .timesheet-head {
    flex-direction: column;
    align-items: stretch;
  }

  .timesheet-month-switcher {
    width: 100%;
  }

  .timesheet-month-switcher strong {
    min-width: 0;
  }
}
