/* ValidCRM — Time clock (v348). Shared by /clock and the in-app Time Clock page. */
.tck-muted { color: var(--color-text-muted); font-size: 13px; }
.tck-center { text-align: center; }
.tck-h3 { font-size: 16px; font-weight: 700; color: var(--color-text); }
.tck-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.tck-label { display: block; font-size: 13px; font-weight: 600; color: var(--color-text); margin: 10px 0 6px; }
.tck-input { width: 100%; box-sizing: border-box; height: 44px; padding: 0 12px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); color: var(--color-text); font-size: 16px; font-family: inherit; }
.tck-input:focus { outline: 2px solid var(--color-accent); outline-offset: 1px; border-color: transparent; }
select.tck-input { padding-right: 28px; }
.tck-link { background: none; border: 0; padding: 0; color: var(--color-accent-text, #B4410A); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; font-family: inherit; }
.tck-link:hover { text-decoration: underline; }
.tck-icon-btn { min-height: 0; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); font-size: 20px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-family: inherit; }
.tck-icon-btn:disabled { opacity: .35; cursor: default; }
.tck-err { color: var(--color-error); font-size: 14px; margin-top: 10px; min-height: 18px; }
.tck-check { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; color: var(--color-text); }

/* buttons */
.tck-btn { border: 0; border-radius: 12px; font-weight: 700; font-size: 16px; padding: 12px 16px; cursor: pointer; font-family: inherit; width: 100%; }
.tck-btn:disabled { opacity: .6; cursor: default; }
.tck-btn-big { height: 64px; font-size: 20px; letter-spacing: .01em; }
.tck-btn-primary { background: var(--color-primary); color: #fff; margin-top: 18px; }
.tck-btn-go { background: #17804B; color: #fff; }
.tck-btn-go:hover:not(:disabled) { background: #11663B; }
.tck-btn-stop { background: #C42B1C; color: #fff; }
.tck-btn-stop:hover:not(:disabled) { background: #A32317; }
.tck-btn-soft { background: var(--color-surface-offset); color: var(--color-text); }
.tck-btn-soft:hover:not(:disabled) { background: var(--color-surface-offset-2); }
.tck-row2 { display: flex; gap: 10px; margin-top: 10px; }

/* clock card */
.tck-clock { padding: 0; overflow: hidden; }
.tck-state { padding: 22px 18px 18px; text-align: center; }
.tck-state-out { background: var(--color-surface-2); }
.tck-state-in { background: #17804B; color: #fff; }
.tck-state-break { background: #B45309; color: #fff; }
.tck-state-label { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.tck-state-out .tck-state-label { color: var(--color-text-muted); }
.tck-elapsed { font-size: 52px; font-weight: 800; line-height: 1.05; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.tck-state-job { font-size: 18px; font-weight: 700; margin-top: 4px; }
.tck-state-job span { display: block; font-size: 13px; font-weight: 500; opacity: .85; margin-top: 2px; }
.tck-state-sub { font-size: 13px; margin-top: 8px; opacity: .9; }
.tck-state-out .tck-state-sub { color: var(--color-text-muted); font-size: 15px; }
.tck-actions { padding: 16px; }

/* today list */
.tck-seg { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--color-divider); }
.tck-seg:first-of-type { border-top: 0; }
.tck-card .tck-h3 + .tck-seg { border-top: 0; margin-top: 4px; }
.tck-seg-main { flex: 1; min-width: 0; }
.tck-seg-title { font-weight: 600; font-size: 15px; color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tck-seg-hrs { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--color-text); }
.tck-seg-break .tck-seg-title, .tck-seg-break .tck-seg-hrs { color: var(--color-text-muted); font-weight: 500; }

/* week */
.tck-wk-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tck-wk-row { display: flex; justify-content: space-between; padding: 8px 2px; border-top: 1px solid var(--color-divider); font-size: 15px; color: var(--color-text); font-variant-numeric: tabular-nums; }
.tck-wk-row.today { font-weight: 700; }
.tck-wk-total { font-weight: 800; font-size: 16px; border-top: 2px solid var(--color-border); }
.tck-ot { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--color-warning); }

/* crew page shell */
.tck-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tck-top-name { font-size: 20px; font-weight: 800; color: var(--color-text); }
.tck-login { max-width: 420px; margin: 0 auto; padding-top: 6vh; }
.tck-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.tck-brand-name { font-size: 24px; font-weight: 800; color: var(--color-text); }
.tck-pin { letter-spacing: .3em; }

/* sheets & modals */
.tck-sheet-bg, .tck-modal-bg { position: fixed; inset: 0; background: rgba(11, 18, 32, .5); z-index: 10000; display: flex; align-items: flex-end; justify-content: center; }
.tck-sheet { background: var(--color-surface); width: 100%; max-width: 560px; max-height: 86vh; border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; box-sizing: border-box; }
.tck-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.tck-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.tck-sheet-list { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tck-group { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted); margin: 12px 2px 6px; }
.tck-job { display: block; width: 100%; text-align: left; padding: 12px; border: 1px solid var(--color-border); background: var(--color-surface); border-radius: 12px; margin-bottom: 8px; cursor: pointer; font-family: inherit; }
.tck-job:hover { border-color: var(--color-accent); }
.tck-job-name { font-weight: 700; font-size: 16px; color: var(--color-text); }
.tck-modal-bg { align-items: center; padding: 16px; box-sizing: border-box; }
.tck-modal { background: var(--color-surface); width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; border-radius: 16px; padding: 18px; box-sizing: border-box; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.tck-modal-wide { max-width: 720px; }
.tck-modal-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.tck-grid3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.tck-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tck-hist { padding: 10px 0; border-top: 1px solid var(--color-divider); font-size: 14px; color: var(--color-text); display: grid; gap: 3px; }
.tck-hist:first-of-type { border-top: 0; }
.tck-map { height: 380px; border-radius: 12px; overflow: hidden; background: var(--color-surface-offset); }
.tck-map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 10px; font-size: 13px; color: var(--color-text-muted); }
.tck-map-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.tck-map-legend a { margin-left: auto; }
.tck-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #0B1220; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px; z-index: 10001; display: none; max-width: 90vw; }
.tck-toast.error { background: #C42B1C; }
.tck-toast.success { background: #17804B; }

/* app page */
.tck-app .tck-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--color-border); margin: 0 0 16px; overflow-x: auto; }
.tck-tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--color-text-muted); cursor: pointer; white-space: nowrap; font-family: inherit; }
.tck-tab.on { color: var(--color-text); border-bottom-color: var(--color-accent); }
.tck-mine { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; max-width: 980px; }
.tck-sheet-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tck-weeknav { display: flex; align-items: center; gap: 10px; }
.tck-sheet-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.tck-table-card { padding: 0; overflow: hidden; }
.tck-table-wrap { overflow-x: auto; }
.tck-table { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--color-text); font-variant-numeric: tabular-nums; }
.tck-table th { text-align: right; font-size: 12px; font-weight: 700; color: var(--color-text-muted); padding: 10px 12px; background: var(--color-surface-2); border-bottom: 1px solid var(--color-border); white-space: nowrap; }
.tck-table th span { display: block; font-weight: 500; }
.tck-table td { text-align: right; padding: 12px; border-bottom: 1px solid var(--color-divider); white-space: nowrap; }
.tck-table .tck-th-name, .tck-table .tck-td-name { text-align: left; }
.tck-td-name { font-weight: 600; white-space: normal !important; min-width: 180px; }
.tck-td-total { font-weight: 800; }
.tck-td-ot { color: var(--color-warning); font-weight: 700; }
.tck-dash { color: var(--color-text-faint); }
.tck-tr { cursor: pointer; }
.tck-tr:hover td { background: var(--color-surface-2); }
.tck-caret { display: inline-block; width: 14px; color: var(--color-text-muted); transition: transform .15s; }
.tck-tr.open .tck-caret { transform: rotate(90deg); }
.tck-pill { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; background: var(--color-surface-offset); color: var(--color-text-muted); vertical-align: 1px; border: 0; font-family: inherit; }
.tck-pill-on { background: var(--color-success-light); color: var(--color-success); }
.tck-pill-warn { background: var(--color-warning-light); color: var(--color-warning); }
.tck-pill-edit { cursor: pointer; margin: 0 6px 0 0; }
.tck-detail td { background: var(--color-surface-2); padding: 8px 12px 14px; text-align: left; white-space: normal; }
.tck-dwrap { display: grid; gap: 10px; }
.tck-dday { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; overflow: hidden; }
.tck-dday-head { display: flex; justify-content: space-between; padding: 8px 12px; font-weight: 700; font-size: 13px; background: var(--color-surface-offset); }
.tck-dseg { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1.2fr) 56px 84px; gap: 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--color-divider); font-size: 13px; }
.tck-dseg.brk { color: var(--color-text-muted); }
.tck-dseg-time { font-variant-numeric: tabular-nums; }
.tck-dseg-job { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.tck-dseg.brk .tck-dseg-job { font-weight: 500; }
.tck-dseg-loc { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.tck-loc-k { font-size: 11px; color: var(--color-text-faint); font-weight: 600; }
.tck-dseg-hrs { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.tck-dseg-act { display: flex; justify-content: flex-end; align-items: center; }
.tck-dseg-act .tck-icon-btn { width: 30px; height: 30px; }
.tck-badge { min-height: 0 !important; line-height: 1.5; display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; border: 0; font-family: inherit; cursor: pointer; white-space: nowrap; }
.tck-badge-ok { background: var(--color-success-light); color: var(--color-success); }
.tck-badge-warn { background: var(--color-warning-light); color: var(--color-warning); }
.tck-badge-plain { background: var(--color-surface-offset); color: var(--color-text-muted); }
.tck-badge-none { background: transparent; color: var(--color-text-faint); cursor: default; padding-left: 0; }
.tck-foot { margin: 0 2px 16px; font-size: 12px; }
.tck-howto { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.tck-howto p { margin: 6px 0 0; max-width: 620px; line-height: 1.5; }
.tck-howto-btns { display: flex; gap: 8px; flex-shrink: 0; }
.tck-crew td { white-space: normal; }
.tck-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tck-chip { border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.tck-chip.on { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.tck-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.tck-stat { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; padding: 14px 16px; }
.tck-stat-n { font-size: 26px; font-weight: 800; color: var(--color-text); font-variant-numeric: tabular-nums; }
.tck-report td .tck-muted { font-size: 12px; font-weight: 400; margin-top: 2px; }

/* job panel labor card */
.tck-labor-top { display: flex; gap: 22px; margin-bottom: 8px; }
.tck-labor-n { font-size: 20px; font-weight: 800; color: var(--color-text); font-variant-numeric: tabular-nums; }
.tck-labor-top .tck-muted { font-size: 12px; }
.tck-labor-people > div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 6px 0; border-top: 1px solid var(--color-divider); color: var(--color-text); }

@media (max-width: 860px) {
  .tck-mine { grid-template-columns: 1fr; }
  .tck-dseg { grid-template-columns: 1fr auto; grid-template-areas: 'time hrs' 'job act' 'loc loc'; gap: 4px 10px; }
  .tck-dseg-time { grid-area: time; } .tck-dseg-hrs { grid-area: hrs; } .tck-dseg-job { grid-area: job; } .tck-dseg-act { grid-area: act; } .tck-dseg-loc { grid-area: loc; }
  .tck-howto { flex-direction: column; align-items: stretch; }
  .tck-stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .tck-stat { padding: 10px; } .tck-stat-n { font-size: 18px; }
}
@media (min-width: 640px) { .tck-sheet-bg { align-items: center; } .tck-sheet { border-radius: 18px; max-height: 80vh; } }

/* mobile timesheet cards */
.tck-mcard { padding: 0; overflow: hidden; }
.tck-mhead { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: none; border: 0; cursor: pointer; font-family: inherit; color: var(--color-text); text-align: left; }
.tck-mname { font-weight: 700; font-size: 16px; }
.tck-mtot { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; text-align: right; }
.tck-mtot span { display: block; font-size: 12px; font-weight: 700; color: var(--color-warning); }
.tck-caret.open { transform: rotate(90deg); }
.tck-mtags { padding: 0 16px 12px 22px; margin-top: -6px; }
.tck-mtags .tck-pill:first-child { margin-left: 0; }
.tck-mcard .tck-dwrap { padding: 0 10px 12px; }
.tck-mcard .tck-dwrap > .tck-link { padding: 4px 6px; }
@media (max-width: 860px) { .tck-dseg { padding: 10px 12px; } .tck-dseg-job { font-size: 14px; } }
.tck-grid3 > div, .tck-grid2 > div { min-width: 0; }
.tck-grid3 .tck-input { padding: 0 8px; font-size: 15px; }
.tck-pin:placeholder-shown { letter-spacing: normal; }
.tck-shoprow { display: flex; gap: 8px; }
.tck-shoprow .btn { flex-shrink: 0; }
.tck-nomatch { font-size: 16px !important; font-weight: 700 !important; opacity: 1 !important; }
