/* MF Consultoria — Dashboard styles
   Design: painel corporativo, tema claro, responsivo, acessível.
   Contraste de texto >= 4.5:1 sobre os fundos usados. */

:root {
  /* Cores de marca / UI (taupes) */
  --color-bg: #F6F5F3;
  --color-surface: #FFFFFF;
  --color-surface-alt: #EFEDE9;
  --color-text: #2A2620;        /* ~13:1 sobre branco */
  --color-text-muted: #726859;  /* ~5.2:1 sobre branco */
  --color-border: #E4E0DA;
  --color-border-strong: #B6B1AA;

  --color-primary: #726859;
  --color-primary-ink: #57503F;
  --color-primary-soft: #ECE8E2;
  --color-accent: #8E7F6C;
  --color-accent-2: #A49484;
  --color-accent-3: #9C9484;

  /* Cores semânticas — reservadas para dados de produtividade e status */
  --color-green: #2E6B4F;
  --color-green-fill: #4C8F6E;
  --color-red: #A94438;
  --color-red-fill: #C4685C;
  --color-gray: #6E675E;
  --color-gray-fill: #9C9484;
  --color-amber: #96702E;
  --color-timeline-active: #4C8F6E;
  --color-timeline-idle: #C9A35C;
  --color-timeline-hatch: rgba(42, 38, 32, .30);
  --color-chart-grid: #E9E6E1;

  /* Espaçamento */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;

  /* Forma / elevação */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(42, 38, 32, .06);
  --shadow-md: 0 2px 8px rgba(42, 38, 32, .08);
  --shadow-lg: 0 8px 24px rgba(42, 38, 32, .12);

  /* Tipografia */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 12.5px;
  --font-size-base: 15px;
  --font-size-md: 15.5px;
  --font-size-lg: 20px;
  --font-size-xl: 26px;
  --font-size-display: 32px;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: 1.5;
}

h1, h2, h3, h4, p, ul { margin: 0; }
ul { list-style: none; padding: 0; }

/* Acessibilidade: link de pular conteúdo */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 50;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Header ---------- */
.app-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.app-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: var(--space-4); }
.brand__logo { display: block; height: 56px; width: auto; }
.brand__name {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  letter-spacing: .2px;
  color: var(--color-text);
}
.brand__tagline { font-size: var(--font-size-sm); color: var(--color-text-muted); }

/* ---------- Área do usuário (sessão) ---------- */
.app-header__user { display: flex; align-items: center; gap: var(--space-3); }
.app-header__user-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
}

/* ---------- Layout ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-5) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* ---------- Banner de erro ---------- */
.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.banner--error {
  background: #FBEAE7;
  border: 1px solid #E4B8AF;
  color: #6E2E25;
}
.banner__content strong { display: block; }

/* ---------- Filtros ---------- */
.filters {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
  display: flex;
  align-items: flex-end;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.field { display: flex; flex-direction: column; gap: var(--space-1); }
.field label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
}
.field__opt { font-weight: var(--font-weight-medium); }
.field--action { margin-left: auto; }

.filters select,
.filters input[type="text"],
.filters input[type="date"] {
  font: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  min-width: 170px;
  height: 40px;
}
.filters select:hover,
.filters input:hover { border-color: var(--color-accent-2); }
.filters select:focus-visible,
.filters input:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.filters__status {
  flex-basis: 100%;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  min-height: 1em;
}

/* ---------- Botões ---------- */
.btn {
  font: inherit;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 0 18px;
  height: 40px;
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-ink); }
.btn--primary:disabled { background: var(--color-accent-2); cursor: progress; }
.btn--ghost {
  background: transparent;
  border-color: currentColor;
  color: #6E2E25;
}
.btn--ghost:hover { background: rgba(110, 46, 37, .08); }
.btn--ghost-neutral {
  background: transparent;
  border-color: var(--color-border-strong);
  color: var(--color-text-muted);
}
.btn--ghost-neutral:hover { background: var(--color-surface-alt); color: var(--color-text); }

/* ---------- KPIs ---------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
.kpi {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  transition: box-shadow .15s ease;
}
.kpi:hover { box-shadow: var(--shadow-md); }
.kpi--active   { border-left-color: var(--color-primary); }
.kpi--idle     { border-left-color: var(--color-amber); }
.kpi--prod     { border-left-color: var(--color-green); }
.kpi--unprod   { border-left-color: var(--color-red); }
.kpi__icon { font-size: 22px; line-height: 1; }
.kpi__label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.kpi__value {
  font-size: var(--font-size-display);
  font-weight: var(--font-weight-bold);
  letter-spacing: .2px;
  color: var(--color-text);
}
.kpi__value.is-muted { color: var(--color-text-muted); font-weight: var(--font-weight-semibold); }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: var(--space-4); }
.grid--2 { grid-template-columns: 1.35fr 1fr; }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
  transition: box-shadow .15s ease;
}
.card:hover { box-shadow: var(--shadow-md); }
.card--full { width: 100%; }
.card__head {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}
.card__title { font-size: var(--font-size-md); font-weight: var(--font-weight-bold); color: var(--color-text); }
.card__sub { font-size: var(--font-size-sm); color: var(--color-text-muted); }

/* ---------- Legendas textuais (não depender só de cor) ---------- */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text);
}
.legend--center { justify-content: center; margin-top: var(--space-3); margin-bottom: 0; }
.legend__item { display: inline-flex; align-items: center; gap: 6px; }
.legend__swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}
.legend__swatch--prod   { background: var(--color-green); }
.legend__swatch--unprod { background: var(--color-red); }
.legend__swatch--undef  { background: var(--color-gray); }
.legend__swatch--tlactive { background: var(--color-timeline-active); }
.legend__swatch--tlidle {
  background: var(--color-timeline-idle);
  background-image: repeating-linear-gradient(45deg,
    var(--color-timeline-hatch) 0, var(--color-timeline-hatch) 2px, transparent 2px, transparent 5px);
}

/* ---------- Área de gráficos ---------- */
.chart-wrap { position: relative; width: 100%; }
.chart-wrap--tall { height: 360px; }
.chart-wrap--doughnut { height: 300px; }

/* Estados vazio / erro sobrepostos */
/* Correção crítica: sem isto, o `display: flex` de .state ignora o atributo
   `hidden` do HTML e os overlays de erro/vazio ficam sempre visíveis, cobrindo
   os gráficos. O `hidden` precisa vencer. */
[hidden] {
  display: none !important;
}

.state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-5);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
}
.state--error { background: #FBEAE7; color: #6E2E25; }

/* Estados dentro da timeline / seções full-width (fluxo normal, não sobrepostos) */
.timeline-wrap + .state,
.card--full .state {
  position: static;
  inset: auto;
  margin-top: var(--space-1);
}

/* ---------- Timeline ---------- */
.timeline-wrap { position: relative; width: 100%; }
.timeline-wrap canvas { display: block; width: 100%; }
.tl-tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: var(--color-text);
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  max-width: 240px;
  transform: translate(-50%, -100%);
  white-space: nowrap;
}
.tl-tooltip strong { display: block; font-size: var(--font-size-sm); }
.tl-tooltip .muted { color: rgba(255, 255, 255, .72); }

/* ---------- Resumo por profissional ---------- */
.employees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-4);
}
.employee-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: box-shadow .15s ease;
}
.employee-card:hover { box-shadow: var(--shadow-md); }

.employee-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.employee-card__name {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}
.employee-card__badge {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.employee-card__head .employee-card__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.employee-card__export { flex-shrink: 0; }
.employee-card__export:disabled { opacity: .6; cursor: progress; }
.employee-card--skeleton .employee-card__export { visibility: hidden; }
.employee-card__active-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.employee-card__active-value {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}
.employee-card__block { display: flex; flex-direction: column; gap: var(--space-2); }
.employee-card__block-title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.employee-card__app-list { display: flex; flex-direction: column; gap: var(--space-2); }
.employee-card__pauses-summary { font-size: var(--font-size-sm); color: var(--color-text-muted); }
.employee-card__empty {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--space-4) 0;
}

/* Item de aplicativo dentro do card do profissional */
.employee-app { display: flex; flex-direction: column; gap: 4px; }
.employee-app__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}
.employee-app__name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.employee-app__value { font-size: var(--font-size-xs); color: var(--color-text-muted); flex-shrink: 0; }
.employee-app__bar-track {
  background: var(--color-surface-alt);
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
}
.employee-app__bar-fill { display: block; height: 100%; background: var(--color-accent); border-radius: inherit; }
.employee-app__bar-fill--produtivo { background: var(--color-green-fill); }
.employee-app__bar-fill--improdutivo { background: var(--color-red-fill); }

/* Sparkline de picos de atividade (24 barras, uma por hora) */
.employee-card__sparkline {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 48px;
}
.employee-spark__bar {
  display: block;
  flex: 1 1 0;
  min-height: 2px;
  border-radius: 2px;
  background: var(--color-accent-2);
}

/* Skeleton de carregamento */
.employee-card--skeleton { pointer-events: none; }
.employee-card--skeleton .employee-card__name,
.employee-card--skeleton .employee-card__badge,
.employee-card--skeleton .employee-card__active-value,
.employee-card--skeleton .employee-card__block-title,
.employee-card--skeleton .employee-app__name,
.employee-card--skeleton .employee-app__value,
.employee-card--skeleton .employee-card__pauses-summary {
  color: transparent;
  background-image: linear-gradient(90deg, var(--color-surface-alt) 25%, #E1DCD3 37%, var(--color-surface-alt) 63%);
  background-size: 400% 100%;
  background-position: 100% 0;
  border-radius: 4px;
  animation: employee-skeleton-shimmer 1.4s ease infinite;
}
.employee-card--skeleton .employee-app__bar-fill,
.employee-card--skeleton .employee-spark__bar {
  background: var(--color-surface-alt);
  animation: employee-skeleton-shimmer 1.4s ease infinite;
}
@keyframes employee-skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* ---------- Footer ---------- */
.app-footer {
  margin-top: var(--space-1);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  display: flex;
  gap: var(--space-2);
  align-items: center;
  justify-content: center;
}

/* ---------- Loading ---------- */
body.is-loading .filters__status::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border: 2px solid var(--color-border-strong);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Funcionários / contas ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.acct-form {
  display: flex; align-items: flex-end; gap: var(--space-4); flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.acct-form .field input {
  font: inherit; color: var(--color-text); background: var(--color-surface);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm);
  padding: 9px 11px; min-width: 220px; height: 40px;
}
.acct-form .field input:hover { border-color: var(--color-accent-2); }
.acct-form .field input:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}
.acct-form__status { flex-basis: 100%; font-size: var(--font-size-sm); color: var(--color-text-muted); min-height: 1em; }
.acct-form__status.is-ok { color: var(--color-green); font-weight: var(--font-weight-semibold); }
.acct-form__status.is-err { color: var(--color-red); font-weight: var(--font-weight-semibold); }

.acct-table-wrap { overflow-x: auto; }
.acct-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.acct-table th, .acct-table td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--color-border); white-space: nowrap;
}
.acct-table thead th { background: var(--color-primary-soft); }
.acct-table th { font-size: var(--font-size-sm); color: var(--color-text-muted); font-weight: var(--font-weight-semibold); }
.acct-table tbody tr:nth-child(even) { background: var(--color-surface-alt); }
.acct-table tbody tr.is-inactive { opacity: .6; }
.acct-actions { display: flex; gap: var(--space-2); }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge--ok     { background: #E1EEE7; color: var(--color-green); }
.badge--off    { background: var(--color-surface-alt); color: var(--color-text-muted); }
.badge--wait   { background: #F3E9D4; color: var(--color-amber); }
.badge--danger { background: #FBEAE7; color: var(--color-red); }

.btn--small {
  height: 32px; padding: 0 12px; font-size: 13px; font-weight: var(--font-weight-semibold);
  background: var(--color-surface); border: 1px solid var(--color-border-strong); color: var(--color-text);
}
.btn--small:hover { border-color: var(--color-accent-2); background: var(--color-surface-alt); }
.btn--small:disabled { opacity: .6; cursor: progress; }
.btn--ghost-blue { color: var(--color-primary); border-color: var(--color-accent-2); }
.btn--ghost-blue:hover { background: var(--color-primary-soft); }
.btn--success { color: var(--color-green); border-color: #9BC7AE; }
.btn--success:hover { background: #E1EEE7; border-color: var(--color-green-fill); }
.btn--danger { color: var(--color-red); border-color: #DCAFA7; }
.btn--danger:hover { background: #F7EAE7; border-color: var(--color-red-fill); }

/* ---------- Horas extras ---------- */
.overtime-filter { margin-bottom: var(--space-4); max-width: 220px; }
.overtime-filter select {
  font: inherit; color: var(--color-text); background: var(--color-surface);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm);
  padding: 9px 11px; height: 40px; width: 100%;
}
.overtime-filter select:hover { border-color: var(--color-accent-2); }
.overtime-filter select:focus-visible {
  outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft);
}
/* Especificidade maior que ".acct-table td" (que fixa white-space: nowrap)
   para o motivo poder quebrar linha em vez de forçar rolagem horizontal. */
.acct-table td.overtime-reason { white-space: normal; max-width: 280px; }
.overtime-total {
  margin-top: var(--space-3);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  text-align: right;
}

/* ---------- Folha de horas — fora do período ---------- */
.fs-filter {
  display: flex; align-items: flex-end; gap: var(--space-4); flex-wrap: wrap;
  margin-bottom: var(--space-3);
}
.fs-filter .field select,
.fs-filter .field input[type="month"] {
  font: inherit; color: var(--color-text); background: var(--color-surface);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm);
  padding: 9px 11px; min-width: 220px; height: 40px;
}
.fs-filter .field select:hover,
.fs-filter .field input[type="month"]:hover { border-color: var(--color-accent-2); }
.fs-filter .field select:focus-visible,
.fs-filter .field input[type="month"]:focus-visible {
  outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.fs-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-3);
  margin: var(--space-2) 0 var(--space-4);
}
.fs-tile {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fs-tile__label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.fs-tile__value { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); color: var(--color-text); }
.fs-tile--money { background: var(--color-primary-soft); }
.fs-tile--total { border-color: var(--color-green-fill); }
.fs-tile--total .fs-tile__value { color: var(--color-green); }

.fs-no-salary {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-amber);
  margin: 0 0 var(--space-4);
}

/* Sombreamento das linhas da folha: fim de semana neutro, feriado em âmbar */
.acct-table tbody tr.fs-row--weekend { background: var(--color-surface-alt); }
.acct-table tbody tr.fs-row--holiday { background: #F3E9D4; font-weight: var(--font-weight-semibold); }

/* Observação pode ser longa — quebra linha em vez de forçar rolagem horizontal */
.acct-table td.fs-note { white-space: normal; max-width: 260px; }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .grid--2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .app-header__inner { flex-direction: column; align-items: flex-start; }
  .app-header__user { width: 100%; justify-content: space-between; }
  .filters { flex-direction: column; align-items: stretch; }
  .field--action { margin-left: 0; }
  .filters select,
  .filters input[type="text"],
  .filters input[type="date"] { min-width: 0; width: 100%; }
  .btn--primary { width: 100%; }
  .kpis { grid-template-columns: 1fr; }
  .kpi__value { font-size: var(--font-size-xl); }
  .employees-grid { grid-template-columns: 1fr; }
  .overtime-filter { max-width: none; }
  .fs-filter { flex-direction: column; align-items: stretch; }
  .fs-filter .field select,
  .fs-filter .field input[type="month"] { min-width: 0; width: 100%; }
  .fs-summary { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition: none !important; }
}
