.tc-surface { height: var(--app-height); display: flex; flex-direction: column; overflow: hidden; }
#tcContent { display: flex; flex: 1; flex-direction: column; min-height: 0; padding: 24px 0 0; overflow: hidden; }
.tc-surface h2, .tc-dialog h2 { margin: 0; font-size: 20px; line-height: 1.3; }
.tc-surface p, .tc-dialog p { line-height: 1.45; }
.tc-message { color: #9f2537; overflow-wrap: anywhere; margin: 12px 0; }
.tc-message:empty { display: none; }
#loginScreen.login-reauth h1 { margin-bottom: 24px; }
.login-notice { margin: 0 0 24px; color: var(--muted); font-size: 16px; line-height: 1.45; }
.tc-loading { position: fixed; left: 50%; bottom: calc(40px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 10; max-width: calc(100% - 32px); margin: 0; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #656565; font-size: 14px; box-shadow: 0 2px 10px rgba(0, 0, 0, .08); pointer-events: none; }
.tc-home { margin: 22px 0 4px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.tc-home-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; min-height: 40px; font-size: 14px; line-height: 1.4; color: #656565; }
.tc-home-elapsed { flex: 0 0 auto; text-align: right; }
.tc-home-elapsed > span { display: block; font-size: 12px; }
.tc-home-elapsed time { display: block; min-width: 8ch; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.tc-home button.tc-link { width: auto; min-height: 32px; padding: 4px 0; margin: 0; border-radius: 0; background: none; color: #156092; font-size: 14px; box-shadow: none; }
.tc-home button.tc-link:hover { text-decoration: underline; }
.tc-home button.tc-home-punch { margin: 0; background: #128A36; color: #fff; }
.tc-home button.tc-home-punch.is-clocked-in { background: #D93025; }
.tc-home button.tc-home-punch.is-unverified { background: var(--soft); color: var(--text); }
.tc-home-punch .tc-icon, #timeClockHomeBtn .tc-icon { filter: brightness(0) invert(1); }
.tc-home-punch.is-unverified .tc-icon { filter: none; }
#timeClockHomeBtn.tc-admin-hours { background: #3983f7; color: #fff; }
#timeClockHomeBtn:disabled { opacity: 1; cursor: wait; }
.tc-home-recovery { display: flex; gap: 16px; }
.tc-icon { width: 22px; height: 22px; flex: 0 0 22px; vertical-align: middle; }
button.tc-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; min-height: 40px; padding: 8px; }
.tc-surface h1 { font-size: 26px; }
.tc-muted, .tc-empty { color: #656565; }
.tc-month, .tc-leave { display: flex; flex: 1; flex-direction: column; min-height: 0; overflow: hidden; }
.tc-filters { display: grid; flex: 0 0 auto; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tc-filters label { margin: 0 0 6px; font-size: 14px; }
.tc-filters input, .tc-filters select { height: 52px; }
.tc-tabs { display: grid; flex: 0 0 auto; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 16px 0 20px; border-bottom: 1px solid var(--line); }
.tc-tabs button { min-height: 44px; margin: 0; padding: 10px 4px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: #656565; font-size: 14px; box-shadow: none; }
.tc-tabs button[aria-selected="true"] { color: #1463ce; border-bottom-color: #1463ce; }
.tc-tabs button:focus-visible { outline: 2px solid #1463ce; outline-offset: -4px; }
.tc-summary { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.tc-summary h2:not(:first-child) { margin-top: 24px; }
.tc-review { color: #845311; background: #fff5dd; padding: 10px 12px; border-left: 3px solid #b57517; font-size: 14px; }
.tc-totals { margin: 16px 0; font-size: 15px; }
.tc-totals > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 9px 0; border-bottom: 1px solid #ededed; }
.tc-totals dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.tc-unverified { color: #845311; }
.tc-actions { display: flex; gap: 10px; }
.tc-actions > button { flex: 1; min-width: 0; }
.tc-records { display: grid; gap: 16px; align-content: start; grid-auto-rows: max-content; padding: 1px 1px 8px; }
.tc-records-scroll { flex: 1; min-height: 0; margin-top: 20px; padding-bottom: 8px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.tc-row > div { min-width: 0; }
.tc-row p { margin: 4px 0 0; font-size: 14px; }
.tc-row > strong { text-align: right; font-variant-numeric: tabular-nums; }
.tc-row-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.tc-row-actions button { width: auto; margin: 0; padding: 10px; min-height: 44px; background: var(--soft); color: var(--text); font-size: 14px; }
.tc-row-actions button.tc-icon-button { width: 44px; height: 44px; padding: 11px; }
.tc-row-actions button.danger-btn { background: var(--danger-bg); color: var(--danger); }
.tc-simple .tc-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.tc-simple .tc-row-actions { grid-column: auto; }
.tc-simple .tc-filters { grid-template-columns: minmax(0, 1fr); }
.tc-month > .tc-actions, .tc-leave > .tc-actions { flex: 0 0 auto; }
.tc-month > .tc-actions > button, .tc-leave > .tc-actions > button { margin: 0; }
#tcAddAbsence .tc-icon { filter: brightness(0) invert(1); }
#tcLoadMore { margin-top: 12px; }
.tc-row .tc-status { color: #845311; }
.tc-row.tc-attendance { column-gap: 8px; row-gap: 4px; align-items: center; }
.tc-row.tc-attendance .tc-record-info { display: contents; }
.tc-row.tc-attendance .checkout-date { grid-column: 1 / -1; font-size: 14px; overflow-wrap: anywhere; }
.tc-record-endpoint { white-space: nowrap; }
.tc-row.open { background: #fff8d9; border-color: #ecd88c; }
.tc-row.open .tc-record-start { color: #786018; }
.tc-row .tc-record-elapsed, .tc-row .tc-record-duration { grid-column: 1; grid-row: 2; margin: 0; }
.tc-record-elapsed time, .tc-record-duration time { display: block; width: max-content; max-width: 100%; overflow-wrap: anywhere; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tc-record-duration .tc-duration-unit { white-space: nowrap; }
.tc-record-duration .tc-duration-label { font-size: 14px; font-weight: 500; }
.tc-row.tc-attendance .tc-status { grid-column: 1 / -1; }
.tc-row.tc-attendance .tc-row-actions { grid-column: 2; grid-row: 2; flex-direction: row; align-items: center; justify-content: flex-end; }
.tc-row.tc-absence { align-items: center; row-gap: 4px; }
.tc-absence .checkout-date { grid-column: 1 / -1; font-size: 14px; overflow-wrap: anywhere; }
.tc-row .tc-absence-duration { grid-column: 1; grid-row: 2; text-align: left; font-size: 18px; }
.tc-absence .tc-row-actions { grid-column: 2; grid-row: 2; justify-content: flex-end; }
.tc-absence .tc-status { grid-column: 1 / -1; }
.tc-row-actions button.tc-record-punch { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 0 0 auto; min-height: 44px; padding: 8px; border-radius: 8px; background: #D93025; color: #fff; font-size: 14px; white-space: nowrap; }
.tc-record-punch .tc-icon { width: 18px; height: 18px; flex-basis: 18px; filter: brightness(0) invert(1); }
.tc-dialog { width: min(var(--app-width), calc(100% - 32px)); max-height: calc(100svh - 32px); border: 0; border-radius: var(--radius-card); padding: 24px; overflow: auto; color: var(--text); background: var(--card-bg); box-shadow: 0 20px 50px rgba(0, 0, 0, .12); }
.tc-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.tc-dialog button[type="submit"]:not(.danger-btn) { background: var(--save-blue); color: #fff; }
.tc-dialog .tc-actions { margin-top: 24px; }
.tc-dialog .tc-actions > button { margin-top: 0; }
#tcEditor, #tcAbsenceEditor { max-width: calc(100% - 32px); height: var(--app-height); margin: 16px auto auto; color-scheme: light; }
#tcEditor::backdrop, #tcAbsenceEditor::backdrop { background: var(--page-bg); }
#tcEditorTitle, #tcAbsenceTitle { font-size: 26px; }
#tcEditForm, #tcAbsenceForm { min-height: 100%; display: flex; flex-direction: column; }
#tcEditForm > *, #tcAbsenceForm > * { flex-shrink: 0; }
#tcEditForm > .tc-actions, #tcAbsenceForm > .tc-actions { margin-top: auto; padding-top: 24px; }
.tc-absence-total { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 16px; }
.tc-absence-total output { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tc-history-item { border-bottom: 1px solid var(--line); padding: 16px 0; overflow-wrap: anywhere; }
.tc-history-item p { margin: 6px 0; font-size: 14px; }
.tc-history-item pre { white-space: pre-wrap; font: 13px/1.4 Arial, sans-serif; margin: 8px 0; }
#timeClockPage button:hover, .tc-dialog button:hover,
#timeClockPage button:disabled, .tc-dialog button:disabled { opacity: 1; }
#timeClockPage button:disabled, .tc-dialog button:disabled { cursor: wait; }
#tcHome button:hover, #tcHome button:disabled { opacity: 1; }
#tcHome button:disabled { cursor: wait; }
@media (max-width: 390px) {
  .tc-filters { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tc-totals { font-size: 14px; }
}
@media (max-width: 360px) {
  .tc-simple .tc-row-actions { flex-direction: column; }
  .tc-row.tc-has-history .tc-row-actions { grid-column: 1 / -1; grid-row: 3; }
}
