.tm-page,
.tm-form {
  --tm-ink: #292b25;
  --tm-muted: #696a61;
  --tm-rule: #deded4;
  --tm-soft: #f5f5ef;
  --tm-paper: #fffefa;
  --tm-accent: #a14b38;
  color: var(--tm-ink);
}
.tm-page {
  display: grid;
  gap: 22px;
  min-width: 0;
}
.tm-page *,
.tm-form * {
  box-sizing: border-box;
}
.tm-heading,
.tm-toolbar,
.tm-panel-title,
.tm-actions,
.tm-simple-row,
.tm-week-nav,
.tm-row-status,
.tm-person,
.tm-day-heading {
  display: flex;
  align-items: center;
}
.tm-heading,
.tm-toolbar,
.tm-simple-row,
.tm-day-heading {
  justify-content: space-between;
  gap: 16px;
}
.tm-heading {
  padding: 6px 0 3px;
}
.tm-heading h1 {
  font: normal clamp(2.2rem, 4vw, 3.7rem) / 1.06 var(--serif, Georgia, 'Times New Roman', serif);
  letter-spacing: -0.045em;
  margin: 0;
}
.tm-panel {
  background: var(--tm-paper);
  border: 1px solid var(--tm-rule);
  border-radius: 16px;
  overflow: hidden;
  min-width: 0;
}
.tm-toolbar,
.tm-panel-title {
  padding: 20px 24px;
  border-bottom: 1px solid var(--tm-rule);
  flex-wrap: wrap;
  row-gap: 14px;
}
.tm-panel-title h2,
.tm-toolbar h2 {
  font: normal 1.65rem/1.15 var(--serif, Georgia, 'Times New Roman', serif);
  letter-spacing: -0.025em;
  margin: 0;
}
.tm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 550;
  line-height: 1.25;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.tm-btn:focus-visible,
.tm-task-row:focus-visible,
.tm-slot:focus-visible,
.tm-control:focus-visible,
.tm-check input:focus-visible {
  outline: 2px solid #a35039;
  outline-offset: 2px;
}
.tm-btn:disabled {
  cursor: wait;
  opacity: 0.6;
}
.tm-primary {
  background: var(--tm-accent);
  color: white;
}
.tm-primary:hover {
  background: #883e2e;
}
.tm-secondary,
.tm-icon-btn {
  border-color: var(--tm-rule);
  background: var(--tm-paper);
  color: var(--tm-ink);
}
.tm-secondary:hover,
.tm-icon-btn:hover,
.tm-quiet:hover {
  background: var(--tm-soft);
}
.tm-quiet,
.tm-danger {
  background: transparent;
  color: var(--tm-muted);
}
.tm-danger {
  color: #9c382c;
}
.tm-danger:hover {
  background: #fff0ed;
}
.tm-icon-btn {
  padding: 0;
  width: 38px;
  min-height: 36px;
}
.tm-tabs,
.tm-wrap,
.tm-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tm-tabs {
  gap: 4px;
}
.tm-tab {
  min-height: 35px;
  border-radius: 7px;
  padding: 7px 10px;
  color: var(--tm-muted);
  background: transparent;
  gap: 6px;
}
.tm-tab:hover,
.tm-tab.is-active {
  background: #f2eee6;
  color: var(--tm-ink);
}
.tm-count {
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--tm-muted);
}
.tm-control {
  font: inherit;
  color: var(--tm-ink);
  background: var(--tm-paper);
  border: 1px solid var(--tm-rule);
  border-radius: 8px;
  min-height: 42px;
  padding: 9px 12px;
  max-width: 100%;
  min-width: 0;
}
select.tm-control {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23585b51' stroke-width='1.5' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}
.tm-toolbar > .tm-control,
.tm-toolbar .tm-wrap > .tm-control {
  font-size: 0.9rem;
  min-height: 38px;
  padding-top: 6px;
  padding-bottom: 6px;
}
textarea.tm-control {
  resize: vertical;
}
.tm-task-row,
.tm-swap-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 18px 24px;
  background: transparent;
  border: 0;
  color: var(--tm-ink);
  font: inherit;
  border-bottom: 1px solid var(--tm-rule);
}
.tm-task-row:last-child,
.tm-swap-row:last-child {
  border-bottom: 0;
}
.tm-task-row,
.tm-slot {
  cursor: pointer;
}
.tm-task-row:hover {
  background: #f8f6f0;
}
.tm-tile,
.tm-avatar {
  display: grid;
  place-items: center;
  flex: none;
  background: #eee9de;
  color: #715e48;
}
.tm-tile {
  height: 42px;
  width: 42px;
  border-radius: 12px;
}
.tm-tile-done,
.tm-badge-done,
.tm-badge-pending {
  color: #845e26;
  background: #f7ecd3;
}
.tm-tile-verified,
.tm-badge-verified,
.tm-badge-approved {
  color: #436343;
  background: #e7eee2;
}
.tm-tile-late,
.tm-badge-late,
.tm-badge-rejected {
  color: #9b4434;
  background: #f9e9e2;
}
.tm-badge-new {
  color: #5d6155;
  background: #edefe6;
}
.tm-task-text {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.tm-task-text strong,
.tm-slot strong,
.tm-person strong {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.tm-task-text .tm-wrap {
  gap: 6px 15px;
}
.tm-meta,
.tm-muted {
  color: var(--tm-muted);
  font-size: 0.86rem;
  line-height: 1.4;
}
.tm-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tm-meta svg {
  width: 15px;
  height: 15px;
  flex: none;
}
.tm-badge {
  display: inline-flex;
  align-items: center;
  align-self: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 550;
  line-height: 1.25;
  padding: 5px 10px;
}
.tm-row-status {
  gap: 14px;
  color: var(--tm-muted);
}
.tm-empty {
  padding: 34px 20px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  color: var(--tm-muted);
  font-size: 0.92rem;
  text-align: center;
}
.tm-empty svg {
  flex: none;
}
.tm-form {
  display: grid;
  gap: 16px;
  min-width: 0;
  text-align: left;
}
.tm-form p,
.tm-form h3 {
  margin: 0;
}
.tm-detail-title {
  font-size: 1.24rem;
  font-weight: 550;
  line-height: 1.45;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.tm-form .tm-meta {
  font-size: 0.93rem;
}
.tm-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.tm-field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}
.tm-field > span,
.tm-check {
  font-size: 0.91rem;
  font-weight: 500;
}
.tm-field .tm-control {
  width: 100%;
}
.tm-check {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}
.tm-check input {
  width: 17px;
  height: 17px;
  min-height: 0;
  accent-color: var(--tm-accent);
  flex: none;
}
.tm-errors,
.tm-error {
  line-height: 1.4;
  font-size: 0.91rem;
  color: #9b382e;
}
.tm-error:empty {
  display: none;
}
.tm-actions {
  justify-content: flex-end;
  padding-top: 10px;
}
.tm-photo {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--tm-soft);
}
.tm-week-nav {
  gap: 12px;
}
.tm-period {
  font-weight: 570;
  font-size: 1rem;
  text-align: center;
}
.tm-own-shifts {
  padding: 12px 24px;
  border-bottom: 1px solid var(--tm-rule);
}
.tm-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.tm-day {
  min-height: 225px;
  border-right: 1px solid var(--tm-rule);
  padding: 14px 9px 18px;
}
.tm-day:last-child {
  border-right: 0;
}
.tm-day.is-today {
  background: #f8f4ed;
}
.tm-day-heading {
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 35px;
}
.tm-day-date {
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.tm-day-date span {
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--tm-muted);
  letter-spacing: 0.04em;
}
.tm-day-date strong {
  font-size: 1.25rem;
  font-weight: 540;
}
.tm-today {
  font-size: 0.72rem;
  color: #92452f;
}
.tm-slot {
  width: 100%;
  display: grid;
  gap: 5px;
  text-align: left;
  border: 0;
  border-left: 3px solid #a66048;
  padding: 10px 8px;
  margin-top: 8px;
  border-radius: 4px 7px 7px 4px;
  background: #f3e7dd;
  color: #493e37;
  font: inherit;
  transition: filter 0.15s;
}
.tm-slot:hover {
  filter: brightness(0.97);
}
.tm-slot strong {
  font-size: 0.87rem;
  line-height: 1.3;
}
.tm-slot-time,
.tm-slot-point {
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.tm-slot-time {
  font-variant-numeric: tabular-nums;
  font-weight: 550;
}
.tm-color-1 {
  border-color: #8b9473;
  background: #eaf0df;
  color: #3b4737;
}
.tm-color-2 {
  border-color: #a48cab;
  background: #efe9f1;
  color: #524457;
}
.tm-day-empty {
  display: block;
  color: var(--tm-muted);
  font-size: 0.8rem;
  padding: 8px 2px;
}
.tm-person {
  gap: 10px;
}
.tm-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}
.tm-shift-reports {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--tm-rule);
  padding-top: 16px;
}
.tm-shift-reports h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}
.tm-simple-row {
  padding: 5px 0;
  font-size: 0.92rem;
}
.tm-chart,
.tm-table-wrap {
  max-width: 100%;
  overflow: auto;
}
.tm-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.tm-table th,
.tm-table td {
  padding: 13px 22px;
  border-bottom: 1px solid var(--tm-rule);
}
.tm-table th {
  background: var(--tm-soft);
  font-weight: 500;
  color: var(--tm-muted);
  font-size: 0.87rem;
}
.tm-table tr:last-child td {
  border-bottom: 0;
}
.tm-table th:not(:first-child),
.tm-table td:not(:first-child) {
  text-align: center;
}
@media (max-width: 900px) {
  .tm-week {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .tm-day {
    min-height: 150px;
    border-bottom: 1px solid var(--tm-rule);
  }
  .tm-day:nth-child(4n) {
    border-right: 0;
  }
  .tm-day:nth-child(n + 5) {
    border-bottom: 0;
  }
  .tm-swap-row {
    flex-wrap: wrap;
  }
}
@media (max-width: 620px) {
  .tm-page {
    gap: 15px;
  }
  .tm-heading {
    gap: 10px;
    flex-wrap: wrap;
  }
  .tm-heading h1 {
    font-size: 2.45rem;
  }
  .tm-heading .tm-btn {
    padding: 8px 10px;
  }
  .tm-toolbar,
  .tm-panel-title {
    padding: 15px;
  }
  .tm-tabs {
    max-width: 100%;
    flex-wrap: wrap;
  }
  .tm-tab {
    font-size: 0.83rem;
    padding: 6px 8px;
  }
  .tm-task-row,
  .tm-swap-row {
    padding: 15px;
    gap: 10px;
  }
  .tm-task-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
  }
  .tm-task-row > .tm-tile {
    width: 34px;
    height: 34px;
    grid-row: 1/3;
  }
  .tm-row-status {
    grid-column: 2;
    justify-content: space-between;
  }
  .tm-task-text {
    gap: 6px;
  }
  .tm-task-text .tm-wrap {
    gap: 4px 9px;
  }
  .tm-week {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tm-day {
    padding: 11px;
    min-height: 135px;
  }
  .tm-day:nth-child(2n) {
    border-right: 0;
  }
  .tm-day:nth-child(5),
  .tm-day:nth-child(6) {
    border-bottom: 1px solid var(--tm-rule);
  }
  .tm-week-nav {
    width: 100%;
    justify-content: space-between;
    gap: 3px;
  }
  .tm-period {
    font-size: 0.94rem;
  }
  .tm-simple-row {
    align-items: flex-start;
  }
  .tm-simple-row .tm-muted {
    text-align: right;
  }
  .tm-table th,
  .tm-table td {
    padding: 11px 8px;
  }
  .tm-table th {
    font-size: 0.78rem;
  }
  .tm-table .tm-person {
    gap: 5px;
  }
  .tm-table .tm-avatar {
    display: none;
  }
}
@media (max-width: 380px) {
  .tm-form-grid {
    grid-template-columns: 1fr;
  }
  .tm-table .tm-person {
    font-size: 0.86rem;
  }
}
.tm-history {
  border-top: 1px solid var(--tm-rule);
  padding-top: 10px;
}
.tm-history summary {
  cursor: pointer;
  font-size: 1rem;
  font-weight: 550;
  padding: 4px 0;
}
.tm-history-item {
  display: grid;
  gap: 5px;
  padding: 10px 0;
  border-bottom: 1px solid var(--tm-rule);
}
.tm-history-item:last-child {
  border: 0;
}
.tm-history-item strong {
  font-size: 0.94rem;
  font-weight: 550;
}
