/* Cuadro de saldos de RR. HH.: tabla editable por país.
   Solo se animan transform y opacity; el bloque prefers-reduced-motion de base.css las neutraliza. */

.sheet-countries { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.sheet-countries .seg button { gap: 8px; min-height: 40px; padding: 0 18px; font-size: 14px; }
.sheet-note { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: 12.5px; }
.sheet-note svg { flex: none; width: 15px; height: 15px; }

/* Los totales llegan a cinco cifras con decimales: la tipografía cede antes que recortarse. */
.sheet-tiles .tile strong { font-size: clamp(20px, 1.9vw, 28px); font-variant-numeric: tabular-nums; }

.sheet-head { flex-wrap: wrap; gap: 14px; }
.sheet-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.sheet-toolbar .control { width: min(260px, 100%); }
.sheet-status { margin: 0; padding: 0 22px 12px; font-size: 12.5px; }
.sheet-card .empty { padding: 32px 22px 42px; }

.sheet-wrap { padding-bottom: 6px; border-top: 1px solid var(--line-soft); }
.sheet-table { min-width: 940px; }
/* Los encabezados son los de la planilla y son largos: se parten en dos líneas antes que empujar
   la tabla fuera de la pantalla. */
.sheet-table thead th {
  padding-inline: 12px;
  position: sticky;
  top: 0;
  z-index: 2;
  max-width: 100px;
  line-height: 1.25;
  white-space: normal;
}
.sheet-table th[scope="row"] {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  font-weight: 700;
  text-align: left;
  vertical-align: middle;
}
.sheet-table td { padding: 10px 12px; }
.sheet-table tbody tr { animation: vm-rise .34s var(--spring) both; animation-delay: calc(var(--i, 0) * 22ms); }
.sheet-table tbody tr:hover { background: var(--blue-50); }
.sheet-table small { font-size: 11px; }

.sheet-input {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.sheet-table .num .sheet-input { max-width: 96px; margin-left: auto; text-align: right; }
td .sheet-input[type="date"] { min-width: 132px; }
.sheet-table .num { white-space: nowrap; }
.sheet-table .num b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sheet-real { color: var(--state-earned); }
.sheet-muted { color: var(--ink-3); }

/* Una fila tocada se distingue sin depender solo del color: lleva además una barra a la izquierda. */
.sheet-table tr.is-dirty { background: var(--amber-50); }
.sheet-table tr.is-dirty th[scope="row"] { box-shadow: inset 3px 0 0 var(--amber-500); }
.sheet-table tr.is-dirty .sheet-input { border-color: var(--amber-500); }

.sheet-flag {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--tone-ink);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.sheet-flag svg { width: 13px; height: 13px; }

.sheet-preview { display: grid; gap: 8px; margin: 0 0 18px; padding: 0; max-height: 240px; overflow-y: auto; list-style: none; }
.sheet-preview li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: 12.5px;
}
.sheet-preview strong { flex: 1 0 100%; font-size: 13px; }
.sheet-change { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sheet-change b { color: var(--ink); }
.sheet-change del { opacity: .75; }

@media (max-width: 720px) {
  .sheet-toolbar { width: 100%; justify-content: stretch; }
  .sheet-toolbar .control { flex: 1 1 160px; width: auto; }
  .sheet-status { padding: 0 16px 12px; }
}
