/* Certificates + timesheets (modules/60_certs.php, modules/62_timesheets.php) */

/* certificate form: welder-only fields */
.cert-welder { border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 0.7rem 0.8rem 0.85rem; min-width: 0; }
.cert-welder legend { padding: 0 0.4rem; font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.cert-welder.is-welder { border-color: rgba(127, 208, 245, 0.35); }
.cert-list .side { min-width: 7.5rem; }

/* timesheets: daily entry */
.ts-pick .field { max-width: none; }
.ts-total { display: grid; justify-items: end; text-align: right; }
.ts-total strong { font: 600 1.6rem/1 var(--display); color: #fff; }
.ts-fill { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 0.8rem; }
.ts-list { list-style: none; display: grid; gap: 0.45rem; }
.ts-row {
    display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 0.4rem 0.6rem; align-items: center;
    padding: 0.55rem 0.65rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2);
}
.ts-row.has-hours { border-color: rgba(95, 211, 154, 0.35); }
.ts-row.is-filled { border-color: rgba(127, 208, 245, 0.35); }
.ts-name { min-width: 0; cursor: pointer; }
.ts-name strong { display: block; overflow-wrap: anywhere; }
.ts-name .sub { display: block; font-size: 0.78rem; color: var(--muted); overflow-wrap: anywhere; }
.ts-row input.ts-hours { min-height: 50px; text-align: center; font: 600 1.15rem var(--mono); padding: 0.4rem; }
.ts-row input.ts-note { grid-column: 1 / -1; min-height: 38px; padding: 0.35rem 0.65rem; font-size: 0.9rem; }
.ts-hours-ro { font: 600 1rem var(--mono); text-align: right; }
.ts-note-ro { grid-column: 1 / -1; }
.ts-note-ro:empty { display: none; }
@media (min-width: 760px) {
    .ts-row { grid-template-columns: minmax(0, 1.2fr) 96px minmax(0, 1fr); }
    .ts-row input.ts-note, .ts-note-ro { grid-column: auto; }
}
.ts-help { margin: 0.8rem 0 0.6rem; }
.ts-save { position: sticky; bottom: calc(4.6rem + env(safe-area-inset-bottom)); z-index: 5; padding-top: 0.4rem; }
@media (min-width: 960px) { .ts-save { position: static; } .ts-save .btn-block { width: auto; } }

.ts-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; }
.ts-day { display: grid; justify-items: center; gap: 0.1rem; padding: 0.45rem 0.1rem; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); font-size: 0.72rem; color: var(--muted); text-align: center; min-width: 0; }
.ts-day strong { font: 600 0.95rem var(--mono); color: var(--text-2); }
.ts-day.has-hours strong { color: var(--ok); }
.ts-day.is-current { border-color: rgba(127, 208, 245, 0.6); background: rgba(44, 125, 160, 0.15); }

/* reports */
.ts-matrix td:first-child, .ts-matrix th:first-child { white-space: nowrap; }
.ts-matrix th a { color: var(--arc); }
.ts-matrix td.ts-long { color: var(--warn); font-weight: 600; }
.ts-bars { list-style: none; display: grid; gap: 0.45rem; }
.ts-bars li { display: grid; grid-template-columns: 4.2rem 1fr 3.6rem; gap: 0.6rem; align-items: center; }
.ts-bars .meter { margin: 0; }
.ts-bars strong { font: 600 0.85rem var(--mono); text-align: right; }
.card-head .ts-total { margin-left: auto; }
