/* =====================================================================
   TEMPIA · styles for the timesheet agent's screens only
   ===================================================================== */

/* === SECTION: TEMPIA LAYOUT === */
.tempia-two-col { display: grid; gap: var(--sp-4); }
@media (min-width: 900px) {
  .tempia-two-col { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
}
.week-nav { display: flex; }
/* === /SECTION: TEMPIA LAYOUT === */

/* === SECTION: DAY PICKER === */
.day-picker { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 0 6px;
  border: 1.5px solid var(--surface-line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  position: relative;
  min-width: 0;
}
.day-chip-name { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--surface-sub); }
.day-chip-num { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.day-chip-dot { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.day-chip.has-entries .day-chip-dot { background: var(--ok); }
.day-chip.is-missing .day-chip-dot { background: var(--bad); }
.day-chip.is-missing { border-color: var(--bad-soft); }
.day-chip[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.day-chip[aria-checked="true"] .day-chip-name { color: var(--muted); }
.day-chip[disabled] { opacity: .35; cursor: not-allowed; }
/* === /SECTION: DAY PICKER === */

/* === SECTION: ENTRY TOTAL === */
.entry-total {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--ink);
}
.entry-total-main { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.entry-total-sub { font-size: var(--fs-sm); font-weight: 600; color: var(--sub); }
.signal-card .row { margin-bottom: var(--sp-2); }
.signal-icon { width: 22px; height: 22px; }
.signal-icon.is-on { color: var(--ok-dark); }
.signal-icon.is-off { color: var(--warn-dark); }
.signal-queued { margin-top: var(--sp-3); }
/* === /SECTION: ENTRY TOTAL === */

/* === SECTION: MY WEEK === */
.week-days { display: flex; flex-direction: column; }
.week-day {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: var(--sp-3);
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--surface-line);
}
.week-day:last-child { border-bottom: 0; }
.week-day-date {
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 0; border-radius: 12px; background: var(--surface-2);
}
.week-day.is-today .week-day-date { background: var(--ink); color: var(--cream); }
.week-day.is-missing .week-day-date { background: var(--bad-soft); color: var(--bad); }
.week-day.is-future { opacity: .55; }
.week-day-name { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.week-day-num { font-size: 20px; font-weight: 800; line-height: 1.1; }
.week-day-body { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.week-entry { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 36px; }
.week-entry .list-end { flex-direction: row; align-items: center; gap: var(--sp-2); }
.week-entry .list-hours { font-size: var(--fs-md); }
.week-transport { color: var(--surface-sub); }
.week-day-total { font-weight: 800; font-size: var(--fs-lg); font-variant-numeric: tabular-nums; min-width: 48px; text-align: right; padding-top: 6px; }
@media (max-width: 599px) {
  .week-day { grid-template-columns: 46px minmax(0, 1fr); }
  .week-day-total { display: none; }
  .week-entry { flex-direction: column; align-items: flex-start; gap: 4px; }
  .week-entry .list-end { flex-direction: row-reverse; align-items: center; }
}
/* === /SECTION: MY WEEK === */

/* === SECTION: APPROVALS === */
.approval-row {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--surface-line);
}
.approval-row:last-child { border-bottom: 0; padding-bottom: 0; }
.approval-row:first-child { padding-top: 0; }
.approval-who { display: flex; align-items: flex-start; gap: var(--sp-3); }
.approval-who .list-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.approval-extra { margin-top: 4px; font-size: var(--fs-sm); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.approval-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding-left: 46px; }
@media (max-width: 599px) {
  .approval-actions { padding-left: 0; display: grid; grid-template-columns: 1fr 1fr 1fr; }
  .approval-actions .btn { padding-left: 6px; padding-right: 6px; }
}
/* === /SECTION: APPROVALS === */

/* === SECTION: OWNER WEEK === */
.flags { display: flex; flex-direction: column; gap: var(--sp-2); }
.flag {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.flag > span { flex: 1; min-width: 0; }
.flag svg { width: 18px; height: 18px; flex: none; }
.flag-bad { background: var(--bad-soft); color: var(--bad); }
.flag-warn { background: var(--warn-soft); color: var(--warn); }
.flag .btn { flex: none; }
.flags-foot { margin-top: var(--sp-3); }
.th-date { font-size: 13px; color: var(--ink); letter-spacing: 0; }
.cell-icon { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; }
.pending-dot, .extra-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-left: 4px; vertical-align: 2px; }
.pending-dot { background: var(--warn); }
.extra-dot { background: var(--accent); }
.person-link {
  border: 0; background: none; padding: 0; text-align: left; color: var(--ink); font-weight: 700;
  text-decoration: underline; text-decoration-color: var(--surface-line); text-underline-offset: 3px;
}
.person-link:hover { text-decoration-color: var(--accent); }
.table .col-sticky { min-width: 150px; }
.grid-legend {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4);
  padding: var(--sp-3) var(--sp-5); color: var(--surface-sub);
}
.grid-legend > span { display: inline-flex; align-items: center; gap: 4px; }
.grid-legend .pending-dot, .grid-legend .extra-dot { margin-left: 0; vertical-align: 0; }
.legend-icon svg { width: 14px; height: 14px; color: var(--bad); }
.approve-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.approve-icon { width: 32px; height: 32px; color: var(--ok); flex: none; }
.stats-modal { margin-top: var(--sp-4); grid-template-columns: 1fr 1fr !important; }
/* === /SECTION: OWNER WEEK === */

/* === SECTION: WEEKLY RESULT === */
.table-result td, .table-result th { font-size: 13px; }
.steps-list { display: flex; flex-direction: column; margin-top: var(--sp-3); }
.step {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
  padding: 14px 0;
  border-top: 1px solid var(--surface-line);
}
.step-num {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  font-weight: 800;
}
.step-num svg { width: 16px; height: 16px; }
.step.is-done .step-num { background: var(--ok); color: var(--white); }
.step.is-planned { opacity: .75; }
.mail-meta { display: grid; grid-template-columns: auto 1fr; gap: 6px var(--sp-4); margin-bottom: var(--sp-4); font-size: var(--fs-sm); }
.mail-meta dt { font-weight: 700; color: var(--surface-sub); }
.mail-meta dd { display: flex; align-items: center; gap: 6px; }
.mail-meta svg { width: 16px; height: 16px; }
.mail-preview { padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md); background: var(--white); border: 1px solid var(--surface-line); margin-bottom: var(--sp-3); }
/* === /SECTION: WEEKLY RESULT === */
