/* Timesheet Calculator */
.tool-ui .ts-cur { width: auto; min-width: 74px; padding-right: 30px; background-color: var(--glass-soft); background-position: right 8px center; font-weight: 700; }
.ts-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.ts-ot-fields.grid-2 { gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ts-ot-fields.is-off { opacity: 0.45; }
.ts-table td, .ts-table th { vertical-align: middle; }
.ts-table td { padding: 6px 8px; }
.tool-ui .ts-table input { min-height: 38px; padding: 6px 8px; }
.tool-ui .ts-table input[type='time'] { min-width: 112px; }
.tool-ui .ts-table .ts-break { width: 86px; }
.ts-date { display: block; color: var(--muted); font-size: 0.78rem; }
.ts-day-total { display: none; }
.ts-next { display: block; color: var(--warn); font-size: 0.74rem; font-weight: 700; margin-top: 2px; }
.ts-row-error td { background: var(--err-soft); }
.ts-table tfoot th { font-size: 1rem; }
@media (max-width: 640px) {
  .ts-wrap { border: 0; overflow: visible; }
  .ts-table thead { display: none; }
  .ts-table, .ts-table tbody, .ts-table tfoot { display: block; }
  .ts-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 62px; gap: 6px 8px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--glass-soft); }
  .ts-table tbody td { display: block; padding: 0; border: 0; background: none; }
  .ts-table tbody td.ts-day { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; }
  .ts-table .ts-date { display: inline; }
  .ts-day-total { display: inline; margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
  .ts-table tbody td[data-label]::before { content: attr(data-label); display: block; white-space: nowrap; font-size: 0.72rem; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
  .ts-table tbody td.ts-hm, .ts-table tbody td.ts-dec { display: none; }
  .tool-ui .ts-table input[type='time'], .tool-ui .ts-table .ts-break { min-width: 0; width: 100%; padding: 6px; font-size: 0.9rem; }
  .tool-ui .ts-table input[type='time']::-webkit-calendar-picker-indicator { display: none; }
  .tool-ui .ts-table .ts-break { -moz-appearance: textfield; appearance: textfield; text-align: center; }
  .tool-ui .ts-table .ts-break::-webkit-inner-spin-button, .tool-ui .ts-table .ts-break::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
  .ts-row-error { outline: 2px solid var(--err); }
  .ts-table tfoot tr { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: var(--r); background: var(--glass-soft); border: 1px solid var(--line); }
  .ts-table tfoot th { border: 0; background: none; padding: 0; }
  .ts-table tfoot th[colspan] { flex: 1; }
  .ts-table tfoot th + th { margin-left: 14px; }
}

/* Printing: only the generated timesheet. */
.tw-print-sheet { display: none; }
@media print {
  @page { margin: 1.6cm; }
  html.tw-print-letter body > *:not(.tw-print-sheet) { display: none !important; }
  html.tw-print-letter .tw-print-sheet { display: block !important; color: #000; font: 10.5pt/1.45 Arial, Helvetica, sans-serif; }
  .ts-print h1 { font-size: 15pt; margin: 0 0 12px; }
  .ts-print table { width: 100%; border-collapse: collapse; }
  .ts-print th, .ts-print td { border: 1px solid #999; padding: 5px 7px; text-align: left; }
  .ts-print th { background: #eee; }
  .ts-print .sig { margin-top: 36px; }
}
