.time-calendar-view {
  --tc-bg: #f6f2ea;
  --tc-ink: #1f1b16;
  --tc-muted: #645a4b;
  --tc-accent: #1a7f5a;
  --tc-accent-soft: #d9f2e6;
  --tc-grid: #d2c5b5;
  --tc-weekend: #ffe1e1;
  --tc-header: #2d2319;
  --tc-header-ink: #f8f2e9;
  --tc-today: #fff1b8;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 14px;
  color: var(--tc-ink);
  background: linear-gradient(135deg, #fbf7f0 0%, #f1e6d8 100%);
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(43, 32, 20, 0.15);
}

.time-calendar__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  background: var(--tc-header);
  color: var(--tc-header-ink);
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.time-calendar__tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.time-calendar__tabs a {
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f0e6d8;
  color: var(--tc-ink);
  font-weight: 700;
  font-size: 13px;
}

.time-calendar__tabs a.is-active {
  background: var(--tc-header);
  color: var(--tc-header-ink);
}

.time-calendar__nav {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.time-calendar__nav a {
  color: var(--tc-header-ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 10px;
  border-radius: 6px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.time-calendar__nav a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.time-calendar__range {
  font-size: 14px;
  text-transform: uppercase;
}

.time-calendar__meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  margin-left: auto;
  align-self: center;
  justify-content: flex-end;
  text-align: right;
}

.controller-work_schedule .time-calendar__meta {
  margin-left: 0;
  justify-content: center;
  text-align: center;
}

.controller-work_schedule .time-calendar__meta--center {
  flex: 1;
}

.controller-work_schedule .time-calendar__meta--right {
  margin-left: auto;
  justify-content: flex-end;
  text-align: right;
  flex: 0 0 auto;
}

.controller-work_schedule .time-calendar__meta-title {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.time-calendar__meta-value {
  font-size: 18px;
  font-weight: 700;
  color: #b5ffdc;
}

.time-calendar__meta-note {
  color: #e8e0d8;
  font-size: 12px;
}

.time-calendar__export {
  margin-top: 12px;
  background: #f6efe6;
  border: 1px solid #e1d4c5;
  border-radius: 10px;
  padding: 10px 12px;
}

.time-calendar__export-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.time-calendar__export-form label {
  font-size: 12px;
  font-weight: 700;
  color: #5b4636;
}

.time-calendar__export-form select {
  border: 1px solid #d6c4b1;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 12px;
  background: #ffffff;
}

.tc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #d6c4b1;
  background: #f6efe6;
  color: #2b2018;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.tc-button:hover {
  background: #efe3d4;
  text-decoration: none;
}

.tc-button--primary {
  border-color: #7bbf95;
  background: #dff4e7;
  color: #1b6b46;
}

.tc-button--primary:hover {
  background: #cfead9;
}

.tc-button--ghost {
  background: #ffffff;
  border-color: #d6c4b1;
  color: #5b4636;
}

.tc-button--ghost:hover {
  background: #f6efe6;
}

.time-calendar__report {
  background: #f6f2ea;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #d2c5b5;
}

.time-calendar__report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.time-calendar__report-title {
  font-size: 16px;
  font-weight: 800;
  color: #2b2018;
}

.time-calendar__report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #5b4636;
  margin-top: 4px;
}

.time-calendar__report-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.time-calendar__report-table th,
.time-calendar__report-table td {
  text-align: left;
}

.time-calendar__report-table {
  table-layout: fixed;
}

.time-calendar__report-table .col-date {
  width: 88px;
}

.time-calendar__report-table .col-kind {
  width: 78px;
}

@media print {
  @page {
    size: A4 landscape;
    margin: 8mm;
  }
  .time-calendar__report-actions {
    display: none;
  }
  .time-calendar__tabs,
  .time-calendar__header,
  .time-calendar__export {
    display: none;
  }
  #top-menu,
  #main-menu,
  #header,
  #footer,
  #sidebar {
    display: none !important;
  }
  .attachment-modal,
  .schedule-edit-modal,
  .time-entry-modal,
  .toast,
  .toast-container,
  .rtc-toast-modal,
  .rtc-toast,
  .flash,
  .modal,
  .ui-dialog,
  [role="dialog"],
  [aria-modal="true"] {
    display: none !important;
  }
  .time-calendar__grid-wrapper {
    overflow: visible !important;
  }
  .time-calendar__report {
    text-align: center;
  }
  .time-calendar__report-table {
    width: auto !important;
    max-width: 100% !important;
    display: inline-table;
    table-layout: fixed;
  }
  .time-calendar__report-table th,
  .time-calendar__report-table td {
    font-size: 10px;
    padding: 3px 4px;
    word-break: break-word;
    white-space: normal;
  }
  .time-calendar__report-table .col-date {
    width: 70px !important;
  }
  .time-calendar__report-table .col-kind {
    width: 60px !important;
  }
}

.time-calendar__user {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
}

.time-calendar__user-picker {
  position: relative;
  min-width: 200px;
}

.time-calendar__user-current {
  width: 220px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: var(--tc-header-ink);
  line-height: 1.4;
  height: 30px;
  box-sizing: border-box;
  cursor: pointer;
}

.time-calendar__user-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 240px;
  background: #ffffff;
  color: #1f1b16;
  border: 1px solid #d9cbb9;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  padding: 8px;
  z-index: 20;
}

.time-calendar__user-search {
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #d6c4b1;
  margin-bottom: 6px;
  font-size: 12px;
  box-sizing: border-box;
}

.time-calendar__user-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow: auto;
}

.time-calendar__user-option {
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.time-calendar__user-option:hover {
  background: #f6efe6;
}

.time-calendar__user-filter {
  display: none;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: var(--tc-header-ink);
  min-width: 160px;
  max-width: 240px;
  line-height: 1.4;
  height: 30px;
  box-sizing: border-box;
}

.time-calendar__user:focus-within .time-calendar__user-filter {
  display: block;
}

.time-calendar__user select {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: var(--tc-header-ink);
  min-width: 160px;
  max-width: 240px;
  line-height: 1.4;
  height: 30px;
}

.time-calendar__user select option {
  color: #1f1b16;
  background: #ffffff;
}

.time-calendar__grid-wrapper {
  margin-top: 16px;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--tc-grid);
  background: var(--tc-bg);
}

.time-calendar__grid {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  table-layout: fixed;
}

.time-calendar__schedule th {
  font-size: 12px;
}

.time-calendar__grid th,
.time-calendar__grid td {
  border: 1px solid var(--tc-grid);
  text-align: center;
  padding: 6px 4px;
  font-size: 13px;
}

.time-calendar__left {
  min-width: 200px;
  text-align: left;
  background: #f4eee4;
}

.time-calendar__grid th:not(.time-calendar__left),
.time-calendar__grid td:not(.time-calendar__left) {
  width: 37.5px;
  min-width: 37.5px;
}

.time-calendar__day-header.is-holiday {
  width: 37.5px;
  min-width: 37.5px;
}
 
.time-calendar__holiday-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.time-calendar__schedule {
  table-layout: fixed;
}

.time-calendar__schedule .time-calendar__left {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  overflow: hidden;
  position: sticky;
  left: 0;
  z-index: 3;
  background: #f4eee4;
  box-shadow: 6px 0 0 rgba(210, 197, 181, 0.4);
}

.time-calendar__schedule th:not(.time-calendar__left),
.time-calendar__schedule td:not(.time-calendar__left) {
  width: 140px;
  min-width: 140px;
}

.time-calendar__schedule .time-calendar__day-header.is-holiday {
  width: 140px;
  min-width: 140px;
}

.time-calendar__schedule .time-calendar__left-label,
.time-calendar__schedule .schedule-user {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-calendar__schedule .time-calendar__left-label {
  text-align: center;
}

.time-calendar__schedule .time-calendar__holiday-name {
  max-height: 28px;
  overflow: hidden;
}

.schedule-cell {
  vertical-align: top;
  min-width: 140px;
}

.time-calendar__schedule .time-calendar__day-header {
  position: sticky;
  top: 0;
  z-index: 2;
}

.time-calendar__schedule .time-calendar__day-header.is-weekend,
.time-calendar__schedule .schedule-cell.is-weekend {
  background: var(--tc-weekend);
}

.time-calendar__schedule .time-calendar__day-header.is-holiday,
.time-calendar__schedule .schedule-cell.is-holiday {
  background: #d9f5e2;
}

.time-calendar__schedule .schedule-cell.is-focused {
  box-shadow: inset 0 0 0 2px #8fbf9a;
  transition: box-shadow 0.2s ease-in-out;
}

.schedule-user {
  font-weight: 700;
  white-space: nowrap;
}

.schedule-user-row {
  display: block;
}

.schedule-user-row::before,
.schedule-user-row::after,
.schedule-user-name::before,
.schedule-user-name::after {
  content: none;
}

.schedule-user-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-button--lock {
  padding: 2px 8px;
  font-size: 11px;
  height: auto;
}

.schedule-lock-note {
  margin-top: 4px;
  font-size: 11px;
  color: #7c2c2c;
  font-weight: 700;
  background: #ffe6e6;
  border: 1px solid #e1a1a1;
  border-radius: 6px;
  padding: 2px 6px;
  display: inline-block;
}

.schedule-lock-note--month {
  margin: 10px 0 0;
}

.schedule-lock-date {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #9c4a4a;
}

.time-calendar__logs-button {
  margin-left: 10px;
}

.schedule-entry {
  background: #ffffff;
  border: 1px solid #e0d6c8;
  border-radius: 8px;
  padding: 6px 8px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 6px;
}

.schedule-entry--l4 {
  background: #ffd4d4;
  border-color: #d25f5f;
}

.schedule-entry--urlop {
  background: #e8f6ea;
  border-color: #8bc59a;
}

.schedule-entry--zdalnie {
  background: #ffe2c0;
  border-color: #d9984a;
}

.schedule-entry--wyjazd {
  background: #dbe7fb;
  border-color: #5f7fb4;
}

.schedule-entry--praca {
  background: #dcf4ee;
  border-color: #7cbfb0;
}

.schedule-entry.is-pending {
  border-color: #f3c46a;
  background: #fff7e1;
  animation: pendingPulse 1.6s ease-in-out infinite;
}

.schedule-entry.is-rejected {
  border-color: #d25f5f;
}

@keyframes pendingPulse {
  0% {
    background: #fff7e1;
  }
  50% {
    background: #ffecc2;
  }
  100% {
    background: #fff7e1;
  }
}

.schedule-kind {
  font-weight: 700;
  color: var(--tc-accent);
}

.schedule-time {
  font-size: 12px;
  margin-top: 2px;
}

.schedule-comment {
  font-size: 11px;
  color: var(--tc-muted);
  margin-top: 4px;
}

.schedule-status {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #9b6b00;
}

.schedule-status.is-approved {
  color: #1a7f5a;
}

.schedule-status.is-rejected {
  color: #b34a4a;
}

.schedule-review {
  margin-top: 2px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px dashed #d8b3a0;
  background: #fde4d1;
  font-size: 10px;
  color: #6b5b4c;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.schedule-actions .danger {
  margin-left: 6px;
}

.schedule-actions .danger button,
.schedule-actions .danger input[type="submit"] {
  background: #f3dada;
  border: 1px solid #d9a4a4;
  color: #7c2c2c;
}

.schedule-actions .inline.accept button,
.schedule-actions .inline.accept input[type="submit"] {
  background: #d7f3e1;
  border: 1px solid #6fb48a;
  color: #146948;
}

.schedule-actions .inline.accept button:hover,
.schedule-actions .inline.accept input[type="submit"]:hover {
  background: #c7ecd8;
}

.attachment-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
}

.attachment-modal.is-open {
  display: block;
}

.attachment-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
}

.attachment-modal__dialog {
  position: absolute;
  inset: 6vh 6vw;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.attachment-modal.is-open .attachment-modal__dialog {
  opacity: 1;
  transform: scale(1);
}

.attachment-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f6efe6;
  border-bottom: 1px solid #e1d4c5;
}

.attachment-modal__title {
  font-weight: 700;
  color: #2b2018;
}

.attachment-modal__close {
  appearance: none;
  border: 1px solid #d6c4b1;
  background: #ffffff;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  color: #5b4636;
  font-weight: 700;
}

.attachment-modal__body {
  flex: 1;
  background: #ffffff;
}

.attachment-modal__body iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.schedule-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: none;
}

.schedule-edit-modal.is-open {
  display: block;
}

.schedule-edit-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
}

.schedule-edit-modal__dialog {
  position: absolute;
  top: 6vh;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 620px;
  max-width: 94vw;
  height: 600px;
  max-height: 80vh;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.schedule-edit-modal.is-open .schedule-edit-modal__dialog {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.schedule-edit-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f6efe6;
  border-bottom: 1px solid #e1d4c5;
}

.schedule-edit-modal__title {
  font-weight: 700;
  color: #2b2018;
}

.schedule-edit-modal__close {
  appearance: none;
  border: 1px solid #d6c4b1;
  background: #ffffff;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  color: #5b4636;
  font-weight: 700;
}

.schedule-edit-modal__body {
  flex: 1;
  background: #f8f1e7;
}

.schedule-edit-modal__body iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.schedule-actions .accept button,
.schedule-actions .accept input[type="submit"] {
  background: #e4f5ec;
  border: 1px solid #8bc59a;
  color: #1a7f5a;
}

.schedule-action--view {
  background: #eef3f8;
  border: 1px solid #b9c7d6;
  color: #2b4a68;
}

.schedule-action--add {
  background: #dff4e7;
  border: 1px solid #7bbf95;
  color: #1b6b46;
  font-size: 16px;
}

.schedule-action--add:hover {
  background: #cfead9;
}

.schedule-actions {
  margin-top: 0;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.work-schedule-errors {
  margin: 8px 0 14px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #e1a1a1;
  background: #ffe6e6;
  color: #7c2c2c;
  font-size: 12px;
}

.schedule-actions .inline,
.schedule-actions .inline form {
  display: inline-block;
  margin: 0;
}

.schedule-action,
.schedule-actions .inline button,
.schedule-actions .inline input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid #d9cbb9;
  background: #f6efe6;
  color: #2b2018;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  margin: 0;
}

.schedule-action:hover,
.schedule-actions .inline button:hover,
.schedule-actions .inline input[type="submit"]:hover {
  background: #efe3d4;
  text-decoration: none;
}

.schedule-actions .danger button,
.schedule-actions .danger input[type="submit"] {
  background: #f3dada;
  border: 1px solid #d9a4a4;
  color: #7c2c2c;
}

.schedule-actions .inline.accept button,
.schedule-actions .inline.accept input[type="submit"],
.schedule-actions .danger button,
.schedule-actions .danger input[type="submit"] {
  width: 26px;
  height: 24px;
}

.time-calendar__left-label {
  font-weight: 700;
  color: var(--tc-muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.time-calendar__day-header {
  background: #f7efe2;
  padding: 8px 4px;
}

.time-calendar__day-header.is-weekend {
  background: #ffdede;
}

.time-calendar__day-header.is-today {
  background: var(--tc-today);
}

.time-calendar__day-header.is-holiday {
  background: #d9f5e2;
}

.time-calendar__day-header.is-selected,
.project-day.is-selected,
.issue-day.is-selected,
.total-day.is-selected {
  box-shadow: inset 0 0 0 1px #7fb98f;
}

.time-calendar__day-link,
.time-calendar__total-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.time-calendar__day-link:hover,
.time-calendar__total-link:hover {
  text-decoration: none;
}

.time-calendar__daily {
  margin-top: 16px;
  background: #fbf6ef;
  border: 1px solid #e3d6c7;
  border-radius: 10px;
  padding: 12px;
}

.time-calendar__daily-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  color: #2b2018;
  margin-bottom: 10px;
}

.time-calendar__daily-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 700;
}

.time-calendar__daily-overtime {
  color: #1a7f5a;
}

.time-calendar__daily-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid #e3d6c7;
  border-radius: 8px;
  overflow: hidden;
}

.time-calendar__daily-table th,
.time-calendar__daily-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #efe2d4;
  font-size: 12px;
}

.time-calendar__daily-table th {
  background: #f6efe6;
  color: #5b4636;
  text-align: left;
  font-weight: 700;
}

.time-calendar__daily-table tbody tr.is-editable {
  cursor: pointer;
}

.time-calendar__daily-table tbody tr.is-editable:hover {
  background: #f9f2e9;
}

.time-calendar__daily-table tbody tr:hover td {
  background: #f7efe4;
}


.time-entry-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
}

.time-entry-modal.is-open {
  display: block;
}

.time-entry-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
}

.time-entry-modal__dialog {
  position: absolute;
  top: 10vh;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 520px;
  max-width: 92vw;
  max-height: 80vh;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.time-entry-modal.is-open .time-entry-modal__dialog {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.time-entry-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f6efe6;
  border-bottom: 1px solid #e1d4c5;
}

.time-entry-modal__title {
  font-weight: 700;
  color: #2b2018;
}

.time-entry-modal__close {
  appearance: none;
  border: 1px solid #d6c4b1;
  background: #ffffff;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  color: #5b4636;
  font-weight: 700;
}

.time-entry-modal__body {
  flex: 1;
  background: #ffffff;
  padding: 12px 14px 14px;
  overflow: auto;
}

.time-entry-modal__loading,
.time-entry-modal__error {
  padding: 12px;
  font-size: 12px;
}

.time-entry-modal__error {
  color: #7c2c2c;
}

.time-entry-form__row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.time-entry-form__row label {
  font-size: 12px;
  font-weight: 700;
  color: #5b4636;
}

.time-entry-form__row input,
.time-entry-form__row select,
.time-entry-form__row textarea {
  border: 1px solid #d6c4b1;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 12px;
  width: 100%;
  box-sizing: border-box;
}

.time-entry-form__actions {
  margin-top: 8px;
}

.time-entry-form__actions input[type="submit"] {
  background: #dff4e7;
  border: 1px solid #7bbf95;
  color: #1b6b46;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.time-entry-modal-errors {
  margin-bottom: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #e1a1a1;
  background: #ffe6e6;
  color: #7c2c2c;
  font-size: 12px;
}

.time-entry-modal-errors:empty {
  display: none;
}

.time-calendar__day-number {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
}

.time-calendar__day-name {
  font-size: 11px;
  color: var(--tc-muted);
  line-height: 1.15;
}

.time-calendar__holiday-name {
  font-size: 9px;
  line-height: 1.1;
  white-space: normal;
}

.time-calendar__holiday-name {
  margin-top: 2px;
  font-size: 10px;
  color: #1c6b45;
  font-weight: 700;
  line-height: 1.1;
}

.project-cell {
  background: #1f1b16;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-total {
  color: #b5ffdc;
  font-weight: 700;
}

.issue-cell {
  background: #f9f4ed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.issue-title a {
  color: var(--tc-ink);
  text-decoration: none;
}

.issue-title a:hover {
  color: var(--tc-accent);
}

.issue-fallback {
  color: var(--tc-muted);
}

.issue-total {
  font-weight: 700;
  color: var(--tc-accent);
}

.issue-day,
.project-day,
.total-day {
  text-align: center;
  vertical-align: middle;
}

.issue-day.is-weekend,
.project-day.is-weekend,
.total-day.is-weekend {
  background: var(--tc-weekend);
}

.issue-day.is-holiday,
.project-day.is-holiday,
.total-day.is-holiday {
  background: #e6f7ec;
}

.issue-day.has-hours {
  background: var(--tc-accent-soft);
}

.issue-day.is-holiday.has-hours {
  background: #c8efd8;
}

.hours-pill {
  display: block;
  width: fit-content;
  margin: 0 auto;
  padding: 2px 6px;
  background: #1a7f5a;
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

/* top menu selection legibility */
#top-menu a.time-calendar.selected,
#top-menu a.time-calendar.selected:visited {
  color: inherit;
  background: transparent;
}

.time-calendar__total-row .total-cell {
  background: #f1e6d8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-right: 2px solid #d2c5b5;
}

.time-calendar__total-row .total-cell .total-value {
  color: var(--tc-accent);
  font-weight: 700;
}

.time-calendar__total-row .total-day {
  background: #efe3d4;
  font-weight: 700;
  color: #2b2018;
}

.time-calendar__total-row .total-day a {
  display: block;
  text-align: center;
}

.time-calendar__total-row .total-day.is-weekend,
.time-calendar__total-row .total-day.is-holiday {
  background: #efe3d4;
}

.time-calendar__empty {
  margin-top: 16px;
  padding: 18px;
  background: #fef5e7;
  border: 1px dashed var(--tc-grid);
  border-radius: 10px;
  text-align: center;
  color: var(--tc-muted);
}

.time-calendar__logs-table th,
.time-calendar__logs-table td {
  text-align: left;
  font-size: 12px;
}

.time-calendar__logs-table .tc-log-details {
  font-size: 11px;
  color: #5b4636;
  word-break: break-word;
}

.rtc-toast {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rtc-toast__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 12px;
  color: #2b2018;
}

.rtc-toast__open {
  border: 1px solid var(--toast-border);
  background: #fff7e6;
  color: #7a4d00;
  font: inherit;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.rtc-toast__open:hover {
  text-decoration: none;
  background: #ffeac0;
  border-color: #f0b35c;
  color: #6a3f00;
}

.rtc-toast__count {
  background: #1a7f5a;
  color: #ffffff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.rtc-toast__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.rtc-toast-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
}

.rtc-toast-modal.is-open {
  display: block;
}

.rtc-toast-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.rtc-toast-modal__dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, 92vw);
  max-height: min(70vh, 560px);
  background: var(--toast-bg);
  border: 1px solid var(--toast-border);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

.rtc-toast-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  font-weight: 700;
}

.rtc-toast-modal__body {
  padding: 0 16px 16px;
  overflow: auto;
}

.rtc-toast-modal__close {
  border: 1px solid var(--toast-close-border);
  background: var(--toast-close-bg);
  color: var(--toast-close-text);
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
}

.rtc-toast-modal__close:hover {
  background: var(--toast-close-bg-hover);
  border-color: var(--toast-close-border-hover);
}

.rtc-toast__item {
  background: #ffffff;
  border: 1px solid rgba(227, 214, 199, 0.9);
  border-radius: 8px;
  padding: 6px 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.rtc-toast__name {
  font-weight: 700;
  font-size: 12px;
  color: #2b2018;
}

.rtc-toast__ranges {
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: #5b4636;
}

.rtc-toast__range {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  padding: 2px 4px;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
}

.rtc-toast__range:hover {
  background: #f6efe6;
  border-color: #eadfcd;
}

.rtc-decision-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #2b2018;
}

.rtc-decision-list li {
  background: #ffffff;
  border: 1px solid rgba(227, 214, 199, 0.9);
  border-radius: 8px;
  padding: 6px 8px;
}

.rtc-toast__days {
  font-weight: 700;
  font-size: 10px;
  color: #1a7f5a;
  background: #e7f6ee;
  border: 1px solid #8bc59a;
  border-radius: 999px;
  padding: 1px 6px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .time-calendar-view {
    padding: 12px;
  }

  .time-calendar__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .time-calendar__left {
    min-width: 220px;
  }
}
:root {
  --toast-width: 296.77px;
}
