/* =========================================================
   Contador de Atividades dos Vendedores — Estilos
   Paleta: fundo claro, verde-escuro, preto e branco
   ========================================================= */

/* ---------- Tokens de design ---------- */
:root {
  --bg: #f2f5f3;
  --surface: #ffffff;
  --surface-2: #f7faf8;
  --ink: #0d1411;
  --ink-2: #33403a;
  --muted: #6b7871;
  --line: #e1e8e4;
  --line-strong: #cdd8d2;

  --green-950: #062b1d;
  --green-900: #0b3d2a;
  --green-700: #0f5c3c;
  --green-600: #13734b;
  --green-500: #1a8a5a;
  --green-100: #e3f1ea;
  --green-50: #f0f8f4;

  --danger: #b42318;
  --danger-bg: #fdeceb;
  --warn: #8a5a00;
  --warn-bg: #fff5dc;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(13, 20, 17, .04), 0 4px 16px rgba(13, 20, 17, .05);
  --shadow-lg: 0 20px 50px rgba(13, 20, 17, .22);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }

[hidden] { display: none !important; }

.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;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.muted { color: var(--muted); font-size: 13.5px; }

/* ---------- Cabeçalho ---------- */
.topbar {
  background: var(--ink);
  color: #fff;
  border-bottom: 3px solid var(--green-600);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand__logo {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--green-600);
  color: #fff;
  flex-shrink: 0;
}

.brand h1 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.brand p { font-size: 13px; color: #a9b8b0; }

.topbar__date {
  font-size: 13px;
  color: #cfdad4;
  text-align: right;
}

/* ---------- Layout ---------- */
.main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.grid { display: grid; gap: 20px; }
.grid--top { grid-template-columns: 1fr 1fr; align-items: start; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  min-width: 0;
}

.card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.card__titles { flex: 1; min-width: 0; }
.card__head h2 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }

.step {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--green-900);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.step--icon { background: var(--ink); }

.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge--edit { background: var(--warn-bg); color: var(--warn); border: 1px solid #f1d58f; }

/* ---------- Formulários ---------- */
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }

label, .label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.req { color: var(--danger); }
.hint-inline { font-weight: 500; color: var(--muted); }

input, select, textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-height: 44px;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}

input::placeholder, textarea::placeholder { color: #9aa7a0; }

input:hover, select:hover, textarea:hover { border-color: #b5c3bb; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(19, 115, 75, .16);
}

input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, .1); }

.input-money { font-variant-numeric: tabular-nums; font-weight: 600; }

.help { font-size: 12px; color: var(--muted); }
.error { font-size: 12px; color: var(--danger); font-weight: 600; min-height: 0; }
.error:empty { display: none; }

.readout {
  display: flex; align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.readout--accent { background: var(--green-50); border-color: #b9dcc9; color: var(--green-900); }

.input-group { display: flex; gap: 8px; }
.input-group input { flex: 1; min-width: 0; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(19, 115, 75, .35); outline-offset: 2px; }

.btn--primary { background: var(--green-700); color: #fff; }
.btn--primary:hover { background: var(--green-900); box-shadow: 0 4px 12px rgba(11, 61, 42, .25); }

.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #26302b; box-shadow: 0 4px 12px rgba(13, 20, 17, .22); }

.btn--outline { background: var(--surface); color: var(--green-700); border-color: #b9dcc9; }
.btn--outline:hover { background: var(--green-50); border-color: var(--green-600); }

.btn--ghost { background: transparent; color: var(--ink-2); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface-2); border-color: #b5c3bb; }

.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #8f1c13; }

.btn--sm { min-height: 44px; padding: 8px 14px; font-size: 13px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* Botões de ícone da tabela */
.icon-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--green-50); color: var(--green-700); border-color: #b9dcc9; }
.icon-btn--danger:hover { background: var(--danger-bg); color: var(--danger); border-color: #f3b8b2; }
.icon-btn:focus-visible { outline: 3px solid rgba(19, 115, 75, .35); outline-offset: 1px; }

/* ---------- Barra de progresso ---------- */
.progress-block {
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.progress-block__top {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
}
.progress-block__top strong { font-size: 20px; color: var(--green-900); font-variant-numeric: tabular-nums; }

.progress {
  height: 14px;
  border-radius: 999px;
  background: #dfe8e3;
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-700), var(--green-500));
  transition: width .5s ease;
}
.progress__bar.is-complete { background: linear-gradient(90deg, var(--green-900), var(--green-600)); }

.progress-block__legend {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- Mensagem de status da meta ---------- */
.status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
}
.status:empty { display: none; }
.status--success { background: var(--green-100); border-color: #a7d3bc; color: var(--green-950); font-weight: 600; }
.status--pending { background: var(--warn-bg); border-color: #f1d58f; color: #5c3d00; }
.status strong { font-variant-numeric: tabular-nums; }

/* ---------- KPIs ---------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.kpi {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green-600);
  min-width: 0;
}

.kpi__label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}

.kpi__value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.kpi__sub { font-size: 13px; color: var(--muted); }

.kpi--dark { background: var(--green-900); border-color: var(--green-900); border-left-color: #4fd394; color: #fff; }
.kpi--dark .kpi__label { color: #a8d5be; }
.kpi--dark .kpi__sub { color: #cfe6da; }

.kpi.is-good .kpi__value { color: var(--green-700); }
.kpi--dark.is-good .kpi__value { color: #fff; }

/* ---------- Relatório ---------- */
.report { display: flex; flex-direction: column; gap: 12px; }

.report__controls {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
}
.report__controls .field { flex: 1 1 260px; }

.report__warn {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--warn-bg);
  color: #5c3d00;
  border: 1px solid #f1d58f;
}

textarea {
  resize: vertical;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  background: var(--surface-2);
  min-height: 280px;
}

.report__footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.report__msg { font-size: 14px; font-weight: 600; }
.report__msg.is-ok { color: var(--green-700); }
.report__msg.is-error { color: var(--danger); }

/* ---------- Filtros e tabela ---------- */
.filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
  margin-bottom: 16px;
}
.filters .field { flex: 1 1 200px; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.table th, .table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table thead th {
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.table .num { text-align: right; }
.table .actions-col { text-align: center; width: 1%; }

.table tbody tr:nth-child(even) { background: #fafcfb; }
.table tbody tr:hover { background: var(--green-50); }
.table tbody tr.is-editing { background: var(--warn-bg); }
.table tbody tr.is-selected td:first-child { box-shadow: inset 4px 0 0 var(--green-600); }

.table tfoot td {
  background: var(--green-50);
  font-weight: 700;
  color: var(--green-950);
  border-bottom: 0;
}

.row-actions { display: inline-flex; gap: 6px; }

.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn);
  vertical-align: middle;
}

.money { font-weight: 700; color: var(--green-900); }

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 36px 16px;
  color: var(--muted);
  text-align: center;
}

/* ---------- Rodapé ---------- */
.footer {
  padding-top: 4px;
  padding-bottom: 32px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  padding: 16px;
  z-index: 50;
}
.modal__backdrop { position: absolute; inset: 0; background: rgba(6, 20, 14, .55); animation: fade .15s ease; }
.modal__box {
  position: relative;
  width: 100%; max-width: 440px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  animation: pop .18s ease;
}
.modal__box h3 { font-size: 18px; margin-bottom: 8px; }
.modal__box p { color: var(--ink-2); }
.modal__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 24px;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 60;
  animation: rise .2s ease;
}
.toast--ok { background: var(--green-900); }
.toast--error { background: var(--danger); }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- Mural de metas (dia e mês) ---------- */
.goals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.goal {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  min-width: 0;
}
.goal--month { background: var(--green-900); border-color: var(--green-900); color: #fff; }

.goal__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.goal__label {
  display: block;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted);
}
.goal__date { display: block; font-size: 12.5px; color: var(--muted); }
.goal--month .goal__label { color: #a8d5be; }
.goal--month .goal__date { color: #cfe6da; }

.goal__pct { font-size: 18px; color: var(--green-900); font-variant-numeric: tabular-nums; }
.goal--month .goal__pct { color: #fff; }

.goal__nums { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-variant-numeric: tabular-nums; }
.goal__nums strong { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.goal__nums span { font-size: 13px; color: var(--muted); }
.goal--month .goal__nums span { color: #cfe6da; }
.goal--month .goal__nums b { color: #fff; }

.goal--month .progress { background: rgba(255, 255, 255, .18); }
.goal--month .progress__bar { background: linear-gradient(90deg, #4fd394, #a8f0c9); }

.goal__legend { font-size: 12.5px; color: var(--muted); }
.goal--month .goal__legend { color: #cfe6da; }
.goal.is-hit { border-color: #a7d3bc; background: var(--green-100); }
.goal.is-hit .goal__legend { color: var(--green-900); font-weight: 700; }

.fields--goals { margin-top: 18px; }

/* ---------- Aviso diário ---------- */
.notify {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
}
.notify__info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.notify__info strong { display: block; font-size: 14px; }
.notify__info small { display: block; font-size: 12.5px; color: var(--muted); }
.notify__icon {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--green-100); color: var(--green-900);
  flex-shrink: 0;
}
.notify__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Interruptor (liga/desliga) */
.switch { position: relative; display: inline-flex; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track {
  width: 46px; height: 26px;
  border-radius: 999px;
  background: var(--line-strong);
  position: relative;
  transition: background-color .15s;
}
.switch__track::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .15s;
}
.switch input:checked + .switch__track { background: var(--green-600); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 3px solid rgba(19, 115, 75, .35); outline-offset: 2px; }

/* ---------- Calendário do histórico ---------- */
.calendar {
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal__title { font-size: 15px; }

.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal__grid--wd { margin-bottom: 6px; }
.cal__grid--wd span {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); text-align: center;
}

.cal__day {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 2px;
  min-height: 58px;
  padding: 6px 7px;
  font: inherit;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
  min-width: 0;
}
.cal__day:hover { border-color: var(--green-600); }
.cal__day:focus-visible { outline: 3px solid rgba(19, 115, 75, .35); outline-offset: 1px; }
.cal__num { font-size: 13px; font-weight: 700; }
.cal__val { font-size: 11px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cal__day.is-weekend .cal__num { color: var(--muted); }
.cal__day.has-record { background: #eef3f6; border-color: #cfdbe3; }
.cal__day.is-hit { background: var(--green-100); border-color: #a7d3bc; }
.cal__day.is-hit .cal__val { color: var(--green-900); }
.cal__day.is-miss { background: var(--warn-bg); border-color: #f1d58f; }
.cal__day.is-miss .cal__val { color: #6b4500; }
.cal__day.is-today { box-shadow: inset 0 0 0 2px var(--ink); }
.cal__day.in-range { box-shadow: inset 0 0 0 2px var(--green-600); }
.cal__empty { min-height: 58px; }

.cal__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.cal__legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; border: 1px solid transparent; }
.dot--hit { background: var(--green-100); border-color: #a7d3bc; }
.dot--miss { background: var(--warn-bg); border-color: #f1d58f; }
.dot--rec { background: #eef3f6; border-color: #cfdbe3; }

/* ---------- Barra de períodos e exportação ---------- */
.history-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 16px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 14px;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--green-600); color: var(--green-700); background: var(--green-50); }
.chip.is-active { background: var(--green-700); border-color: var(--green-700); color: #fff; }

#modal-mensagem { white-space: pre-line; }

/* ---------- Tela de login ---------- */
.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(19, 115, 75, .18), transparent 70%),
    var(--bg);
}
.login__box { width: 100%; max-width: 400px; }
.login__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; justify-content: center; }
.login__brand .brand__logo { width: 48px; height: 48px; border-radius: 14px; }
.login__brand h1 { font-size: 20px; letter-spacing: -.01em; }
.login__brand p { font-size: 13px; color: var(--muted); }

.login__form {
  display: flex; flex-direction: column; gap: 14px;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--green-700);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.login__form h2 { font-size: 18px; }
.login__erro { font-size: 13px; font-weight: 600; color: var(--danger); }
.login__erro:empty { display: none; }
.login__submit { width: 100%; margin-top: 4px; }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--green-700); }

/* ---------- Usuário no cabeçalho ---------- */
.topbar__right { display: flex; align-items: center; gap: 18px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip__avatar {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--green-700); color: #fff;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.user-chip__text { display: flex; flex-direction: column; line-height: 1.25; }
.user-chip__text strong { font-size: 13.5px; }
.user-chip__text small { font-size: 12px; color: #a9b8b0; }
.btn--topbar { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); min-height: 36px; }
.btn--topbar:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .6); }

/* Faixa "vendo o painel de..." */
.viewing-bar { background: var(--warn-bg); border-bottom: 1px solid #f1d58f; color: #5c3d00; font-size: 14px; }
.viewing-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; padding-bottom: 10px; }

/* Campos de meta bloqueados para o vendedor */
input[readonly] { background: var(--surface-2); color: var(--ink-2); cursor: not-allowed; border-style: dashed; }

/* ---------- Painel da equipe ---------- */
.field--inline { flex-direction: row; align-items: center; gap: 8px; }
.field--inline input { width: auto; }
.kpis--team { margin-bottom: 16px; grid-template-columns: repeat(4, 1fr); }
.table--team th, .table--team td { vertical-align: middle; padding: 10px 10px; }
.table--team .input-money { width: 116px; min-width: 0; min-height: 40px; padding: 8px 10px; font-size: 14px; }
.table--team .seller small { white-space: nowrap; }
.seller { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.seller small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.mini-progress { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.mini-progress .progress { flex: 1; height: 10px; }
.mini-progress strong { font-size: 13px; min-width: 48px; text-align: right; }
.team-help { margin-top: 10px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill--hit { background: var(--green-100); color: var(--green-900); }
.pill--miss { background: var(--warn-bg); color: #6b4500; }

/* =========================================================
   Responsividade
   ========================================================= */

/* Tablets */
@media (max-width: 1024px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  .grid--top { grid-template-columns: 1fr; }
}

/* Celulares */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .container { padding: 0 16px; }
  .main { gap: 16px; padding-top: 16px; }
  .card { padding: 18px 16px; }
  .topbar__date { display: none; }
  .fields { grid-template-columns: 1fr; }
  .kpi__value { font-size: 22px; }
  .actions .btn, .report__controls .btn, .report__footer .btn, .filters .btn { flex: 1 1 100%; }
  .modal__actions .btn { flex: 1 1 100%; }
  .goals { grid-template-columns: 1fr; }
  .user-chip__text { display: none; }
  .brand h1 { font-size: 16px; }
  .brand p { display: none; }
  .brand__logo { width: 36px; height: 36px; }
  .topbar__inner { padding-top: 12px; padding-bottom: 12px; }
  .kpi { padding: 14px 12px; }
  .kpi__value { font-size: 19px; overflow-wrap: normal; white-space: nowrap; }
  .card__head { flex-wrap: wrap; }
  .field--inline { width: 100%; }
  .field--inline input { flex: 1; }
  .table--team .input-money { min-width: 0; width: 60%; }
  .mini-progress { width: 60%; min-width: 0; }
  .notify__actions { width: 100%; }
  .notify__actions .btn { flex: 1 1 auto; }
  .history-toolbar .btn { flex: 1 1 100%; }

  /* Calendário compacto: só o número e a cor do dia */
  .cal__grid { gap: 4px; }
  .cal__day { min-height: 42px; padding: 4px; align-items: center; justify-content: center; }
  .cal__empty { min-height: 42px; }
  .cal__val { display: none; }

  /* Tabela vira lista de cartões */
  .table-wrap { border: 0; overflow: visible; }
  .table thead { display: none; }
  .table, .table tbody, .table tfoot, .table tr, .table td { display: block; width: 100%; }
  .table tr {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    background: var(--surface) !important;
    overflow: hidden;
  }
  .table td {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 9px 14px;
    text-align: right;
    white-space: normal;
  }
  .table td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    text-align: left;
  }
  .table td:first-child { background: var(--ink); color: #fff; font-weight: 700; }
  .table td:first-child::before { color: #a9b8b0; }
  .table tr.is-selected td:first-child { box-shadow: none; background: var(--green-900); }
  .table tr.is-editing td:first-child { background: var(--warn); }
  .table td:last-child { border-bottom: 0; }
  .table .actions-col { width: 100%; }
  .table tfoot tr { background: var(--green-50) !important; }
  .table tfoot td:first-child { background: var(--green-900); }
}
