:root {
  --navy: #0b1f3a;
  --navy-2: #132a4a;
  --navy-3: #1c3a5f;
  --gold: #c9a227;
  --gold-soft: #e8d48b;
  --gold-dark-text: #1a1400;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1a2332;
  --muted: #4a5a6c;
  --border: #d9e0ea;
  --ok: #1f7a4d;
  --err: #a11f2c;
  --warn: #8a6d1d;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(11, 31, 58, 0.08);
  --shadow-lg: 0 4px 16px rgba(11, 31, 58, 0.12);
  /* Stage palette (WCAG-friendly on white) */
  --stage-gray: #5b6b7c;
  --stage-gray-bg: #e8ecf1;
  --stage-blue: #1a5fb4;
  --stage-blue-bg: #dceafb;
  --stage-purple: #6c3fc5;
  --stage-purple-bg: #efe7fb;
  --stage-orange: #b85a00;
  --stage-orange-bg: #ffe8cc;
  --stage-teal: #0d7a74;
  --stage-teal-bg: #d5f3f1;
  --stage-green: #1f7a4d;
  --stage-green-bg: #e7f6ee;
  --stage-red: #a11f2c;
  --stage-red-bg: #fdecee;
  --alert-urgent: #c62828;
  --alert-normal: #b8860b;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;
  font-size: 1rem;
}
a { color: var(--navy-3); text-decoration: none; }
a:hover { color: var(--gold); }

.topbar {
  background: linear-gradient(90deg, var(--navy), var(--navy-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 3px solid var(--gold);
  gap: 0.75rem;
  flex-wrap: wrap;
}
.brand { display: flex; flex-direction: column; gap: 0.1rem; }
.brand strong { font-size: 1.15rem; letter-spacing: 0.04em; }
.brand span { font-size: 0.8rem; color: var(--gold-soft); }
.topnav { display: flex; gap: 0.45rem; flex-wrap: wrap; align-items: center; }
.topnav a {
  color: #dce6f5;
  font-size: 0.95rem;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.topnav a:hover, .topnav a.active {
  background: rgba(201, 162, 39, 0.18);
  color: var(--gold-soft);
}
/* Grupos A/B no topnav — admin/Vitória (e quem vê os dois lados) */
.topnav .nav-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.35rem 0.2rem 0.45rem;
  border-radius: 10px;
  border: 1px solid transparent;
}
.topnav .nav-group-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  white-space: nowrap;
  line-height: 1.2;
  color: #fff;
}
.topnav .nav-group-a {
  background: rgba(108, 63, 197, 0.18);
  border-color: rgba(108, 63, 197, 0.45);
}
.topnav .nav-group-a .nav-group-label { background: #6c3fc5; }
.topnav .nav-group-b {
  background: rgba(13, 122, 116, 0.18);
  border-color: rgba(13, 122, 116, 0.45);
}
.topnav .nav-group-b .nav-group-label { background: #0d7a74; }
.topnav .nav-group a {
  padding: 0.4rem 0.55rem;
  min-height: 38px;
}
.userchip {
  font-size: 0.85rem;
  background: rgba(255,255,255,0.08);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(201,162,39,0.35);
}

/* ── Canais strip (WhatsApp / Telefone / E-mail) — separados do topnav ── */
.topbar-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  flex: 0 1 auto;
  min-width: 0;
}
.canais-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.canais-strip .canal {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0.4rem 0.75rem;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  text-decoration: none;
  border: 1px solid transparent;
  transition: filter 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.canais-strip .canal:hover { filter: brightness(1.08); color: #fff; }
.canais-strip .canal.active {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(201, 162, 39, 0.55);
}
.canais-strip .canal-ico { flex-shrink: 0; display: block; }
.canais-strip .canal-label { white-space: nowrap; }
/* Official WhatsApp brand green #25D366 */
.canais-strip .canal-wa {
  background: #25D366;
  color: #fff;
  border-color: #1ebe57;
}
.canais-strip .canal-wa:hover { color: #fff; }
.canais-strip .canal-wa .bell-count {
  background: #fff;
  color: #075E54;
}
.canais-strip .canal-tel {
  background: #1a5fb4;
  border-color: #154e96;
}
.canais-strip .canal-mail {
  background: #6c3fc5;
  border-color: #5a32a8;
}
.canais-strip .canal-mail .bell-count {
  background: #fff;
  color: #4a2a8a;
}

.wrap { max-width: 1240px; margin: 1.25rem auto; padding: 0 1rem 2.5rem; }
h1 { font-size: 1.55rem; margin: 0 0 0.75rem; color: var(--navy); }
h2 { font-size: 1.15rem; margin: 1.25rem 0 0.5rem; color: var(--navy-2); }
.muted { color: var(--muted); font-size: 0.95rem; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
}

.grid { display: grid; gap: 0.9rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.stat {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  border-top: 3px solid var(--gold);
}
.stat .n { font-size: 1.7rem; font-weight: 700; }
.stat .l { font-size: 0.85rem; color: var(--gold-soft); }

.flash { list-style: none; padding: 0; margin: 0 0 1rem; }
.flash li {
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.flash .ok { background: #e7f6ee; color: var(--ok); border: 1px solid #b7e0c7; }
.flash .err { background: #fdecee; color: var(--err); border: 1px solid #f0b8be; }
.flash .warn { background: #fff7e0; color: var(--warn); border: 1px solid #edd89a; }

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.65rem 0.5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #e8eef7;
  color: var(--navy-2);
  border: 1px solid var(--border);
}
.badge.gold { background: #f8efd0; color: #5c4a08; border-color: #e5d38a; }
.badge.danger { background: #fdecee; color: var(--err); border-color: #f0b8be; }
.badge.ok { background: #e7f6ee; color: var(--ok); border-color: #b7e0c7; }
.badge.urgent {
  background: #fdecee; color: var(--alert-urgent); border-color: #f0b8be;
  font-weight: 700;
}
.badge.alert-normal {
  background: #fff8e1; color: #7a5c00; border-color: #edd89a;
}

label { display: block; font-size: 0.9rem; margin: 0.6rem 0 0.3rem; color: var(--navy-2); font-weight: 600; }
input, select, textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  background: #fff;
  min-height: 44px;
}
textarea { min-height: 100px; resize: vertical; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: none;
  cursor: pointer;
  background: var(--navy);
  color: #fff;
  padding: 0.7rem 1.15rem;
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  min-height: 44px;
  text-decoration: none;
}
.btn:hover { background: var(--navy-3); color: #fff; }
.btn.gold {
  background: var(--gold);
  color: var(--gold-dark-text) !important;
  text-align: center;
}
.btn.gold:hover { background: #b8921c; color: var(--gold-dark-text) !important; }
.btn.ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--border);
}
.btn.ghost:hover { background: #eef2f8; color: var(--navy); }
.btn.small { padding: 0.45rem 0.75rem; font-size: 0.9rem; min-height: 38px; }
.actions { display: flex; gap: 0.55rem; flex-wrap: wrap; margin-top: 0.85rem; align-items: center; }

/* ── Login ─────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at top, #1c3a5f, var(--navy));
  padding: 1.25rem;
}
.login-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 16px;
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  border-top: 5px solid var(--gold);
}
.login-card h1 { margin-bottom: 0.25rem; font-size: 1.75rem; text-align: center; }
.login-card .login-sub { text-align: center; margin-bottom: 1.25rem; }
.login-card .btn {
  width: 100%;
  margin-top: 1rem;
  font-size: 1.1rem;
  padding: 0.85rem 1.2rem;
  min-height: 52px;
}
.login-forgot {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.funil {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0 1rem;
}
.funil .step {
  flex: 1 1 110px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.55rem 0.35rem;
  border-radius: 8px;
  background: var(--stage-gray-bg);
  color: var(--stage-gray);
  border: 1px solid var(--border);
  border-bottom: 3px solid var(--stage-gray);
}
.funil .step.on {
  background: var(--navy);
  color: var(--gold-soft);
  border-color: var(--gold);
  border-bottom-color: var(--gold);
  font-weight: 700;
}
.funil .step.done {
  background: var(--stage-green-bg);
  color: var(--stage-green);
  border-bottom-color: var(--stage-green);
}
.funil .step.sg-gray { border-bottom-color: var(--stage-gray); }
.funil .step.sg-blue { border-bottom-color: var(--stage-blue); color: var(--stage-blue); background: var(--stage-blue-bg); }
.funil .step.sg-purple { border-bottom-color: var(--stage-purple); color: var(--stage-purple); background: var(--stage-purple-bg); }
.funil .step.sg-teal { border-bottom-color: var(--stage-teal); color: var(--stage-teal); background: var(--stage-teal-bg); }
.funil .step.sg-green { border-bottom-color: var(--stage-green); color: var(--stage-green); background: var(--stage-green-bg); }
.funil .step.on.sg-blue,
.funil .step.on.sg-purple,
.funil .step.on.sg-teal,
.funil .step.on.sg-green,
.funil .step.on.sg-gray {
  background: var(--navy);
  color: var(--gold-soft);
}

.note-box {
  background: #f8fafc;
  border-left: 4px solid var(--gold);
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0.75rem 0;
  border-radius: 0 8px 8px 0;
}
.footer-note {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* ── Stage color system ────────────────────────────────── */
.st, .badge.stage {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}
.st.stage-gray, .badge.stage-gray,
.st.aguardando_aprovacao, .st.captada, .st.em_triagem,
.badge.cotacao_solicitada {
  background: var(--stage-gray-bg); color: var(--stage-gray); border-color: #c5ced8;
}
.st.stage-blue, .badge.stage-blue,
.st.aguardando_preco, .st.decisao, .st.proposta_cadastrada,
.badge.cotacoes, .badge.negociacao {
  background: var(--stage-blue-bg); color: var(--stage-blue); border-color: #b9cdf0;
}
.st.stage-purple, .badge.stage-purple,
.st.em_disputa, .st.disputa_encerrada, .st.aguardando_chamada,
.badge.aprovacao {
  background: var(--stage-purple-bg); color: var(--stage-purple); border-color: #d6c2f2;
}
.st.stage-orange, .badge.stage-orange,
.st.convocada, .st.docs_enviados {
  background: var(--stage-orange-bg); color: var(--stage-orange); border-color: #f0c98a;
}
.st.stage-teal, .badge.stage-teal,
.st.aguardando_homologacao, .st.homologada, .st.aguardando_empenho,
.badge.pedido {
  background: var(--stage-teal-bg); color: var(--stage-teal); border-color: #9ed9d5;
}
.st.stage-green, .badge.stage-green,
.st.empenho_recebido,
.badge.entrega {
  background: var(--stage-green-bg); color: var(--stage-green); border-color: #b7e0c7;
}
.st.stage-red, .badge.stage-red,
.st.nao_entrou, .st.rejeitada_liana, .st.perdida, .st.inabilitada, .st.desclassificada,
.st.cancelada_orgao, .st.desistencia {
  background: var(--stage-red-bg); color: var(--stage-red); border-color: #f0b8be;
  text-decoration: line-through;
}

.card-stage { border-left: 5px solid var(--stage-gray); }
.card-stage.stage-gray { border-left-color: var(--stage-gray); }
.card-stage.stage-blue { border-left-color: var(--stage-blue); }
.card-stage.stage-purple { border-left-color: var(--stage-purple); }
.card-stage.stage-orange { border-left-color: var(--stage-orange); }
.card-stage.stage-teal { border-left-color: var(--stage-teal); }
.card-stage.stage-green { border-left-color: var(--stage-green); }
.card-stage.stage-red { border-left-color: var(--stage-red); }

.stage-legend {
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.85rem;
  padding: 0.5rem 0.75rem; margin: 0.35rem 0 0.75rem;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.78rem; color: var(--muted);
}
.stage-legend .leg { display: inline-flex; align-items: center; gap: 0.35rem; }
.stage-legend .sw {
  display: inline-block; width: 12px; height: 12px; border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.12);
}
.sw.stage-gray { background: var(--stage-gray); }
.sw.stage-blue { background: var(--stage-blue); }
.sw.stage-purple { background: var(--stage-purple); }
.sw.stage-orange { background: var(--stage-orange); }
.sw.stage-teal { background: var(--stage-teal); }
.sw.stage-green { background: var(--stage-green); }
.sw.stage-red { background: var(--stage-red); }

/* ── Home tiles ────────────────────────────────────────── */
.home-greeting {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: flex-start; gap: 0.75rem; margin-bottom: 0.5rem;
}
.home-greeting h1 { margin: 0; }
.ponto-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.85rem; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600;
  border: 1px solid var(--border); background: #fff;
}
.ponto-chip.on { background: var(--stage-green-bg); color: var(--stage-green); border-color: #b7e0c7; }
.ponto-chip.off { background: var(--stage-gray-bg); color: var(--stage-gray); }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}
.tile {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 0.35rem;
  padding: 1.25rem 1.15rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  min-height: 130px;
  position: relative;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  border-top: 4px solid var(--gold);
}
.tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}
.tile .tile-icon { font-size: 1.85rem; line-height: 1; }
.tile .tile-label { font-size: 1.1rem; font-weight: 700; color: var(--navy); padding-right: 1.75rem; }
.tile .tile-hint { font-size: 0.88rem; color: var(--muted); line-height: 1.35; }
.tile .tile-badge {
  position: absolute; top: 0.75rem; right: 0.75rem;
  min-width: 1.5rem; height: 1.5rem; padding: 0 0.4rem;
  border-radius: 999px; font-size: 0.8rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--alert-urgent); color: #fff;
}
.tile .tile-badge.warn { background: var(--alert-normal); color: #1a1400; }
.tile.t-navy { border-top-color: var(--navy); background: linear-gradient(180deg, #eef2f8 0%, #fff 45%); }
.tile.t-gold { border-top-color: var(--gold); background: linear-gradient(180deg, #fbf6e4 0%, #fff 45%); }
.tile.t-blue { border-top-color: var(--stage-blue); background: linear-gradient(180deg, #e8f0fc 0%, #fff 45%); }
.tile.t-purple { border-top-color: var(--stage-purple); background: linear-gradient(180deg, #f3ecfc 0%, #fff 45%); }
.tile.t-orange { border-top-color: var(--stage-orange); background: linear-gradient(180deg, #fff3e0 0%, #fff 45%); }
.tile.t-teal { border-top-color: var(--stage-teal); background: linear-gradient(180deg, #e6f7f6 0%, #fff 45%); }
.tile.t-green { border-top-color: var(--stage-green); background: linear-gradient(180deg, #e8f6ee 0%, #fff 45%); }
.tile.t-red { border-top-color: var(--stage-red); background: linear-gradient(180deg, #fdecee 0%, #fff 45%); }

/* ── First-time help ───────────────────────────────────── */
.first-help {
  background: #fff9e6;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 0.5rem 0 0.85rem;
  position: relative;
}
.first-help[hidden] { display: none !important; }
.first-help-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 0.75rem; margin-bottom: 0.5rem; flex-wrap: wrap;
}
.first-help-head strong { color: var(--navy); font-size: 1.05rem; }
.first-help ol { margin: 0; padding-left: 1.35rem; color: var(--text); }
.first-help li { margin: 0.2rem 0; font-size: 0.92rem; }
.first-help-dismiss {
  background: var(--gold); color: var(--gold-dark-text);
  border: none; border-radius: 8px; padding: 0.45rem 0.85rem;
  font: inherit; font-weight: 700; cursor: pointer; min-height: 40px;
  text-align: center;
}
.first-help-dismiss:hover { background: #b8921c; }

.abbr { white-space: nowrap; }
.abbr-exp { color: var(--muted); font-weight: 400; font-size: 0.9em; }

.empty-state {
  text-align: center; padding: 2rem 1.25rem; color: var(--muted);
}
.empty-state p { font-size: 1.05rem; margin: 0 0 1rem; }
.empty-state .btn { margin: 0 auto; }

/* ── Grupo A · Disputas ───────────────────────────────── */
.bell-count {
  display: inline-block; min-width: 1.25rem; text-align: center;
  background: var(--alert-urgent); color: #fff; border-radius: 999px;
  font-size: 0.75rem; padding: 0.1rem 0.4rem; margin-left: 0.15rem; font-weight: 700;
}
.bell-count.warn { background: var(--alert-normal); color: #1a1400; }
.tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.85rem; }
.tabs a {
  padding: 0.5rem 0.9rem; border-radius: 999px; font-size: 0.9rem;
  border: 1px solid var(--border); background: #fff; color: var(--navy-2);
  min-height: 40px; display: inline-flex; align-items: center;
}
.tabs a.on { background: var(--navy); color: var(--gold-soft); border-color: var(--gold); }
.dcard { border-left: 5px solid var(--gold); }
.dcard.hoje { box-shadow: 0 0 0 1px rgba(31,122,77,0.25), var(--shadow); }
.dcard h3 { margin: 0 0 0.25rem; font-size: 1.05rem; color: var(--navy); }
.dcard .meta { font-size: 0.88rem; color: var(--muted); }
.itens-mini { width: 100%; margin-top: 0.55rem; font-size: 0.9rem; }
.itens-mini td, .itens-mini th { padding: 0.35rem 0.4rem; }
.lock { color: var(--err); font-size: 0.85rem; font-weight: 600; }
.alert-row.unread { background: #fffbea; }
.alert-row .prio { font-weight: 700; color: var(--alert-urgent); }
.instrucao {
  background: #fff9e6; border: 2px solid var(--gold); border-radius: var(--radius);
  padding: 1rem 1.1rem; margin: 0.75rem 0 1rem; white-space: pre-wrap; font-size: 1rem; color: var(--text);
}
.instrucao h2 { margin: 0 0 0.4rem; color: var(--navy); font-size: 1.1rem; }
.restrito { font-size: 0.8rem; color: var(--err); font-weight: 600; }
.item-edit { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 0.7rem 0.85rem; margin-top: 0.55rem; }
.item-edit .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.55rem; }
.item-edit label { margin-top: 0.2rem; font-size: 0.8rem; }
.item-edit input, .item-edit select { padding: 0.45rem 0.5rem; font-size: 0.9rem; min-height: 40px; }
.help { font-size: 0.85rem; color: var(--muted); margin: 0.2rem 0 0; }

/* ── Caça PNCP ───────────────────────────────────────── */
.ufs-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.35rem 0 0.5rem; }
.ufs-grid .chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.85rem; font-weight: 500; color: var(--navy-2);
  background: #eef2f8; border: 1px solid var(--border);
  border-radius: 999px; padding: 0.35rem 0.65rem; margin: 0;
  min-height: 36px;
}
.ufs-grid .chip input { width: auto; margin: 0; min-height: auto; }

@media (max-width: 700px) {
  .topnav a { font-size: 0.88rem; padding: 0.45rem 0.55rem; }
  .canais-strip .canal { font-size: 0.82rem; padding: 0.35rem 0.55rem; min-height: 36px; }
  .canais-strip .canal-label { /* keep label — staff need names */ }
  .tile-grid { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 1.35rem; }
}
@media (max-width: 480px) {
  .tile-grid { grid-template-columns: 1fr; }
}


/* ── Empresa chips (multi-CNPJ) ───────────────────────── */
.emp-chip {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
  vertical-align: middle;
}
.emp-chip.emp-teal { background: #d5f3f1; color: #0d7a74; border-color: #9ed9d5; }
.emp-chip.emp-purple { background: #efe7fb; color: #6c3fc5; border-color: #d6c2f2; }
.emp-chip.emp-orange { background: #ffe8cc; color: #b85a00; border-color: #f0c98a; }
.emp-chip.emp-blue { background: #dceafb; color: #1a5fb4; border-color: #b9cdf0; }
.emp-chip.emp-rose { background: #fde8ef; color: #a11f5c; border-color: #f0b8d0; }
.emp-chip.emp-olive { background: #e8f0d8; color: #4a6b1f; border-color: #c5d99a; }

.emp-counts {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin: 0.5rem 0 0.85rem;
}
.emp-count {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 0.4rem 0.7rem; text-decoration: none; color: inherit;
  min-height: 44px;
}
.emp-count:hover { border-color: var(--gold); }
.emp-count.on { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,162,39,0.25); }
.emp-count strong { font-size: 1.05rem; color: var(--navy); }

.assign-matrix th, .assign-matrix td { vertical-align: middle; }
.assign-matrix .chk-cell { display: inline-flex; justify-content: center; min-height: 44px; min-width: 44px; align-items: center; cursor: pointer; }
.assign-matrix input[type=checkbox] { width: 1.15rem; height: 1.15rem; min-height: auto; }

.note-box.warn-oficial{border-left-color:var(--err);background:#fdecee;color:#5a1520;}
.pacote-form h3{color:var(--navy);font-size:1rem;margin:0.75rem 0 0.4rem;}

.pacote-files{display:flex;flex-direction:column;gap:0.75rem;}
.pacote-file{display:flex;gap:0.75rem;align-items:flex-start;flex-wrap:wrap;}
.pacote-thumb img{max-width:180px;max-height:140px;border-radius:8px;border:1px solid var(--border);object-fit:cover;}


/* ── Prazo / limite de entrega (Pacote Compras) ── */
.prazo-card {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.5rem 1.5rem; padding: 0.9rem 1.1rem; border-radius: 10px;
  margin: 0.75rem 0 1rem; border: 2px solid transparent; font-size: 1.05rem;
}
.prazo-card .prazo-limite { font-size: 1.15rem; }
.prazo-card .prazo-count { font-size: 1.35rem; font-weight: 700; letter-spacing: 0.01em; }
.prazo-mini {
  display: inline-block; margin-top: 0.35rem; padding: 0.25rem 0.55rem;
  border-radius: 6px; font-size: 0.85rem; font-weight: 600; line-height: 1.3;
}
.prazo-green, .prazo-card.prazo-green { background: #e7f7ee; border-color: #1f9d55; color: #0f5132; }
.prazo-yellow, .prazo-card.prazo-yellow { background: #fff8db; border-color: #e0b400; color: #6b5300; }
.prazo-orange, .prazo-card.prazo-orange { background: #ffe8d6; border-color: #e67e22; color: #8a3b00; }
.prazo-red, .prazo-card.prazo-red { background: #fdecee; border-color: #c0392b; color: #7a1212; }
.prazo-none { color: var(--muted); }

.pacote-full { width: 100%; }
.pacote-full .pacote-form { width: 100%; }
.pacote-full .pacote-form > .grid.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pacote-full .warn-oficial { margin: 0.75rem 0 1rem; }
.pacote-full .actions { justify-content: flex-start; }

/* ── Conversas (chat interno) ─────────────────────────── */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.chat-shell {
  display: grid; grid-template-columns: 370px minmax(0, 1fr);
  height: calc(100vh - 170px); min-height: 520px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.chat-list { border-right: 1px solid var(--border); overflow-y: auto; background: #fbfcfe; }
.chat-list-head {
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
  padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--border); background: var(--navy); color: #fff;
  position: sticky; top: 0; z-index: 1;
}
.chat-list-head strong { font-size: 1.05rem; color: var(--gold-soft); }
.chat-list-head .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); min-height: 34px; padding: 0.3rem 0.6rem; }
.chat-list-sep { padding: 0.5rem 0.9rem; font-size: 0.8rem; font-weight: 700; color: var(--warn); background: #fff7e0; border-bottom: 1px solid var(--border); }
.chat-item {
  display: flex; gap: 0.6rem; align-items: center; padding: 0.7rem 0.9rem;
  border-bottom: 1px solid #eef1f5; color: var(--text); min-height: 64px;
}
.chat-item:hover { background: #f1f5fa; color: var(--text); }
.chat-item.on { background: #e8f0fc; box-shadow: inset 4px 0 0 var(--gold); }
.chat-item.aud { opacity: 0.85; }
.chat-item-icon { font-size: 1.45rem; width: 2rem; text-align: center; flex: none; }
.chat-item-body { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 0.15rem; }
.chat-item-top { display: flex; align-items: center; gap: 0.35rem; min-width: 0; }
.chat-item-name { font-weight: 700; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-hora { margin-left: auto; font-size: 0.75rem; color: var(--muted); flex: none; }
.chat-item-prev { font-size: 0.84rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-badge, #nav-chat-count {
  min-width: 1.4rem; height: 1.4rem; padding: 0 0.4rem; border-radius: 999px;
  background: var(--stage-green); color: #fff; font-size: 0.78rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.chat-badge[hidden], #nav-chat-count[hidden] { display: none; }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1rem; align-items: center;
  padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); background: #fff;
}
.chat-head h1 { font-size: 1.2rem; margin: 0; display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.chat-head-sub { font-size: 0.85rem; color: var(--muted); }
.chat-back { font-size: 0.85rem; display: inline-block; margin-bottom: 0.15rem; }
.chat-members { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; font-size: 0.82rem; }
.chat-member { padding: 0.1rem 0.5rem; border-radius: 999px; border: 1px solid var(--border); background: #f6f8fb; font-weight: 600; }
.chat-member.g-a, .chat-who.g-a { color: var(--stage-purple); }
.chat-member.g-b, .chat-who.g-b { color: var(--stage-teal); }
.chat-member.g-adm, .chat-who.g-adm { color: #8a6d1d; }
.chat-msgs {
  flex: 1; overflow-y: auto; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 0.45rem;
  background: #efeae2 linear-gradient(180deg, #f3efe8, #ebe5dc);
}
.chat-empty { margin: auto; color: var(--muted); background: #fff; padding: 0.6rem 1rem; border-radius: 10px; }
.chat-row { display: flex; }
.chat-row.eu { justify-content: flex-end; }
.chat-bubble {
  max-width: min(68%, 620px); background: #fff; border-radius: 10px; padding: 0.45rem 0.7rem 0.3rem;
  box-shadow: 0 1px 1px rgba(11,31,58,0.12); border-top-left-radius: 2px;
}
.chat-row.eu .chat-bubble { background: #dcf3e3; border-top-left-radius: 10px; border-top-right-radius: 2px; }
.chat-who { font-size: 0.82rem; font-weight: 700; margin-bottom: 0.1rem; }
.chat-papel { font-weight: 400; color: var(--muted); }
.chat-text { white-space: pre-wrap; word-wrap: break-word; font-size: 0.97rem; line-height: 1.38; }
.chat-meta { display: flex; gap: 0.6rem; justify-content: flex-end; font-size: 0.72rem; color: var(--muted); margin-top: 0.15rem; flex-wrap: wrap; }
.chat-visto { color: #2a7bd4; }
.chat-img img { display: block; max-width: 100%; max-height: 260px; border-radius: 8px; margin: 0.2rem 0 0.25rem; border: 1px solid var(--border); }
.chat-file { display: inline-block; padding: 0.4rem 0.6rem; background: #f1f5fa; border: 1px solid var(--border); border-radius: 8px; margin: 0.15rem 0 0.25rem; font-weight: 600; }
.chat-compose { border-top: 1px solid var(--border); padding: 0.6rem 0.9rem 0.75rem; background: #f6f8fb; }
.chat-compose-row { display: flex; gap: 0.5rem; align-items: flex-end; }
.chat-compose textarea { min-height: 46px; max-height: 160px; resize: none; flex: 1; margin: 0; }
.chat-attach { cursor: pointer; font-size: 1.2rem; min-height: 46px; padding: 0.4rem 0.75rem; margin: 0; }
.chat-compose .btn.gold { min-height: 46px; }
.chat-guard-hint { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.4rem; }
.chat-file-chip { font-size: 0.85rem; background: #fff; border: 1px dashed var(--border); border-radius: 8px; padding: 0.3rem 0.6rem; margin-bottom: 0.4rem; display: inline-block; }
.chat-file-chip[hidden] { display: none; }
.chat-file-x { border: none; background: none; color: var(--err); cursor: pointer; font-weight: 700; }
.chat-block {
  background: #fdecee; border: 2px solid var(--err); color: #5a1520; border-radius: 10px;
  padding: 0.6rem 0.8rem; margin-bottom: 0.5rem; font-size: 0.92rem; line-height: 1.4;
}
.chat-block strong { display: block; color: var(--err); font-size: 1rem; margin-bottom: 0.15rem; }
.chat-block[hidden] { display: none; }
.chat-readonly { border-top: 1px solid var(--border); padding: 0.85rem 1rem; background: #fff7e0; color: var(--warn); font-size: 0.92rem; }
.audit-table td { vertical-align: middle; }
.pacote-chat { border-left: 5px solid var(--stage-green); }
.pacote-chat .pc-msg { padding: 0.4rem 0.6rem; background: #f6f8fb; border-radius: 8px; margin: 0.3rem 0; font-size: 0.93rem; }
.pacote-chat .pc-msg strong { color: var(--navy); }
@media (max-width: 900px) {
  .chat-shell { grid-template-columns: 1fr; height: auto; }
  .chat-list { max-height: 260px; border-right: none; border-bottom: 1px solid var(--border); }
  .chat-main { height: 70vh; }
  .chat-bubble { max-width: 88%; }
}

/* ═════════ Rodada 3: ponto, parados, WhatsApp, telefone, e-mail, relatórios, URA, histórico, segurança ═════════ */
.tile.t-red { border-top-color: var(--err); background: linear-gradient(180deg, #fdecee 0%, #fff 45%); }
a.ponto-chip { text-decoration: none; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.page-head h1 { margin: 0; }
.filtros-inline { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.filtros-inline label { display: flex; flex-direction: column; font-size: 0.85rem; color: var(--muted); }
.inline-form { display: inline-flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; margin: 0; }
.inline-form input, .inline-form select { width: auto; margin: 0; }
.small { font-size: 0.85rem; }
.btn.big { font-size: 1.08rem; padding: 0.8rem 1.25rem; min-height: 50px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.seg-btn { padding: 0.5rem 0.9rem; text-decoration: none; color: var(--navy); font-weight: 600; border-right: 1px solid var(--border); }
.seg-btn:last-child { border-right: none; }
.seg-btn.on { background: var(--navy); color: #fff; }

/* Itens parados / atenção */
.chip-parado { display: inline-block; background: var(--err); color: #fff; font-weight: 800; font-size: 0.75rem; letter-spacing: .05em; padding: 0.15rem 0.5rem; border-radius: 6px; }
.atencao-box { background: #fff8e6; border: 2px solid #f0c98a; border-radius: var(--radius); padding: 0.9rem 1.1rem; margin-bottom: 1.1rem; }
.atencao-box h2 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.atencao-box ul { list-style: none; margin: 0; padding: 0; }
.atencao-item { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; padding: 0.55rem 0.4rem; border-top: 1px solid #f3dfb5; }
.atencao-item:first-child { border-top: none; }
.atencao-nome { font-weight: 700; }
.atencao-motivos { color: var(--muted); flex: 1; min-width: 200px; }
.atencao-acoes { display: flex; gap: 0.4rem; }
.atencao-item.lvl-red { border-left: 5px solid var(--err); padding-left: 0.6rem; }
.atencao-item.lvl-orange { border-left: 5px solid var(--stage-orange); padding-left: 0.6rem; }
.atencao-item.lvl-gold { border-left: 5px solid var(--gold); padding-left: 0.6rem; }
.btn.sos-btn { background: #fdecee; color: var(--err); border: 2px solid #e8a3ab; font-weight: 700; }
.btn.sos-btn:hover { background: #fbd9dd; }
.dias-parado { font-weight: 800; padding: 0.2rem 0.55rem; border-radius: 8px; white-space: nowrap; }
.dias-parado.red { background: #fdecee; color: var(--err); }
.dias-parado.orange { background: #ffe8cc; color: var(--stage-orange); }
.dias-parado.gold { background: #f8efd0; color: #5c4a08; }
.dias-parado.green { background: #e7f6ee; color: var(--ok); }
table.parados tr.lvl-red td:first-child { border-left: 5px solid var(--err); }
.acoes-parado { display: flex; flex-direction: column; gap: 0.35rem; }
.acoes-parado form { margin: 0; display: flex; gap: 0.3rem; }
.acoes-parado select { margin: 0; width: auto; }
.prazo-chip { display: inline-block; padding: 0.2rem 0.55rem; border-radius: 8px; border: 1px solid; font-weight: 600; font-size: 0.88rem; }
.mov-bar { display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-left: 6px solid var(--ok); border-radius: var(--radius); padding: 0.75rem 1rem; margin: 0.5rem 0 1rem; }
.mov-bar.lvl-red { border-left-color: var(--err); background: #fff6f7; }
.mov-bar.lvl-orange { border-left-color: var(--stage-orange); }
.mov-bar.lvl-gold { border-left-color: var(--gold); }
.dific-aberta { margin-top: 0.4rem; color: var(--err); }
.dific-box > summary { list-style: none; cursor: pointer; }
.dific-box > summary::-webkit-details-marker { display: none; }
.dific-box[open] > summary { margin-bottom: 0.5rem; }
.dific-form { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem; max-width: 520px; }
.dific-motivos { border: none; padding: 0; margin: 0 0 0.5rem; display: grid; gap: 0.3rem; }
.radio-big { display: flex; gap: 0.5rem; align-items: center; padding: 0.4rem 0.5rem; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.radio-big input { width: auto; margin: 0; }
.hist-mini { padding: 0.35rem 0; border-top: 1px solid #eef1f5; font-size: 0.93rem; }
.hist-ico { display: inline-block; width: 1.6rem; }

/* Relatórios */
.per-nav { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.per-rot { min-width: 150px; text-align: center; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; margin-bottom: 1rem; }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 0.7rem 0.8rem; border-top: 4px solid var(--navy); }
.kpi-v { font-size: 1.5rem; font-weight: 800; color: var(--navy); }
.kpi-l { font-size: 0.82rem; color: var(--muted); }
.tabela-rol { overflow-x: auto; }
.rel-tab th { font-size: 0.8rem; white-space: nowrap; }
.rel-tab td.num, .rel-tab th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rel-tab td.ruim { color: var(--err); font-weight: 700; }
.rel-tab tr.lider td { background: #f6f8fc; }
.rel-tab tfoot th { background: #eef2f8; }
.crumbs { margin: 0 0 0.75rem; }

/* WhatsApp */
.wa-head { background: #e7f6ee; }
.wa-avatar { background: #25a35a !important; color: #fff; font-weight: 700; }
.wa-item-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.15rem; }
.wa-item-tags .badge { font-size: 0.7rem; padding: 0.05rem 0.4rem; }
.tag-forn, .tag-ped { font-size: 0.72rem; padding: 0.05rem 0.4rem; border-radius: 6px; background: #eef2f8; color: var(--navy-3); }
.tag-ped { background: #f8efd0; color: #5c4a08; }
.wa-msgs { background: #efeae2; }
.wa-shell .chat-row.eu .chat-bubble { background: #d9fdd3; }
.chat-bubble.wa-auto { background: #eef2f8 !important; font-style: italic; }
.wa-img { max-width: 260px; max-height: 220px; border-radius: 8px; display: block; }
.wa-vinc { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; margin: 0; }
.wa-vinc select { width: auto; max-width: 210px; margin: 0; }
.wa-nova { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); }
.wa-nova form { display: grid; gap: 0.35rem; margin-top: 0.4rem; }
.wa-nova input, .wa-nova select { margin: 0; }
.wa-desc-banner { display: flex; gap: 0.8rem; align-items: center; background: #fdecee; border: 2px solid #e8a3ab; color: #7a1212; border-radius: var(--radius); padding: 0.8rem 1rem; margin-bottom: 0.75rem; font-size: 1.05rem; }
.wa-desc-ico { font-size: 2rem; }
.wa-desc-inline { background: #fdecee; color: #7a1212; }
.wa-aviso-admin { border-left: 5px solid var(--warn); margin-bottom: 0.75rem; }
.wa-conectar-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; align-items: start; }
.wa-conectar-grid tr.sel td { background: #fbf6e4; }
.wa-conectar-grid .acoes form { margin: 0; }
.qr-card { text-align: center; }
.qr-box { display: inline-block; padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: 12px; margin: 0.5rem 0; }
.qr-box svg { width: 260px; height: 260px; display: block; }
.qr-passos { text-align: left; margin: 0.5rem auto 1rem; max-width: 360px; }
@media (max-width: 900px) { .wa-conectar-grid { grid-template-columns: 1fr; } }

/* Telefone */
.tel-grid { display: grid; grid-template-columns: 340px 1fr; gap: 1rem; align-items: start; }
@media (max-width: 900px) { .tel-grid { grid-template-columns: 1fr; } }
.acoes-topo { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.softphone { background: linear-gradient(180deg, #0b1f3a 0%, #132a4a 100%); color: #fff; }
.softphone select, .softphone .sp-display { margin: 0 0 0.45rem; }
.sp-status { margin-bottom: 0.6rem; }
.sp-status .muted { color: #c9d4e3; }
.sp-display { font-size: 1.6rem; text-align: center; letter-spacing: .05em; font-weight: 700; }
.sp-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45rem; margin: 0.5rem 0; }
.sp-key { background: #1c3a5f; color: #fff; border: 1px solid #2c4d78; border-radius: 14px; font-size: 1.5rem; font-weight: 700; padding: 0.55rem 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.sp-key small { font-size: 0.6rem; color: #a9bad0; letter-spacing: .12em; min-height: 0.7rem; }
.sp-key:hover { background: #24497a; }
.sp-acts { display: grid; grid-template-columns: 1fr 2fr; gap: 0.45rem; }
.sp-ligar { background: #1f9d55; color: #fff; border: none; border-radius: 14px; font-size: 1.7rem; cursor: pointer; min-height: 56px; }
.sp-ligar:disabled { background: #4a5a6c; cursor: not-allowed; }
.sp-call { background: #fff; color: var(--text); border-radius: 12px; padding: 0.8rem; margin-bottom: 0.6rem; text-align: center; }
.sp-call.st-tocando { animation: tocar 1s infinite alternate; }
@keyframes tocar { from { box-shadow: 0 0 0 0 rgba(31,157,85,.6); } to { box-shadow: 0 0 0 10px rgba(31,157,85,0); } }
.sp-call-who { font-weight: 800; font-size: 1.15rem; }
.sp-call-t { font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.sp-call-btns { display: flex; gap: 0.5rem; justify-content: center; margin-top: 0.4rem; }
.sp-atender { background: #1f9d55; color: #fff; }
.sp-desligar { background: var(--err); color: #fff; }
.tel-hist tr.st-nao_atendida td { color: var(--err); }
.nota-card { border-left: 5px solid var(--gold); }

/* URA */
.ura-grid { display: grid; grid-template-columns: 1fr 340px; gap: 1rem; align-items: start; }
@media (max-width: 1100px) { .ura-grid { grid-template-columns: 1fr; } }
.ura-form fieldset { border: none; padding: 0; margin: 0; }
.ura-ops input, .ura-ops select { margin: 0; }
.ura-ops td { padding: 0.25rem; }
.ura-ops tr.vazia input, .ura-ops tr.vazia select { opacity: 0.55; }
.ura-ops td:first-child input { width: 2.6rem; text-align: center; font-weight: 800; }
.ura-horario { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.75rem; }
.ura-horario input[type=time] { width: auto; margin: 0; }
.dia-chip { display: inline-flex; gap: 0.2rem; align-items: center; border: 1px solid var(--border); border-radius: 8px; padding: 0.2rem 0.45rem; margin-right: 0.2rem; }
.dia-chip input { width: auto; margin: 0; }
.switch-row { display: flex; gap: 0.5rem; align-items: center; font-weight: 700; }
.switch-row input { width: auto; margin: 0; }
.ura-bolha { white-space: pre-wrap; background: #d9fdd3; border-radius: 12px; padding: 0.75rem; font-size: 0.95rem; }
.ura-teste { margin-top: 0.5rem; padding: 0.5rem; border-radius: 8px; }
.ura-teste.ok { background: #e7f6ee; } .ura-teste.err { background: #fdecee; }

/* E-mail */
.mail-shell { display: grid; grid-template-columns: 210px 340px 1fr; gap: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); min-height: 600px; overflow: hidden; }
.mail-side { padding: 0.8rem; border-right: 1px solid var(--border); background: #f8fafc; display: flex; flex-direction: column; gap: 0.6rem; }
.mail-novo { text-align: center; }
.mail-conta { font-size: 0.85rem; word-break: break-all; }
.mail-pastas, .mail-contas { display: flex; flex-direction: column; }
.mail-pastas a, .mail-contas a { padding: 0.45rem 0.6rem; border-radius: 8px; text-decoration: none; color: var(--navy); }
.mail-pastas a.on, .mail-contas a.on { background: var(--navy); color: #fff; }
.mail-lista { border-right: 1px solid var(--border); overflow-y: auto; max-height: 75vh; }
.mail-item { display: block; padding: 0.65rem 0.8rem; border-bottom: 1px solid #eef1f5; text-decoration: none; color: var(--text); }
.mail-item.on { background: #eef2f8; }
.mail-item.unread .mail-assunto, .mail-item.unread .mail-de { font-weight: 800; }
.mail-item-top { display: flex; justify-content: space-between; gap: 0.5rem; }
.mail-de { font-weight: 600; }
.mail-prev { font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-ler { padding: 1rem 1.2rem; overflow-y: auto; max-height: 75vh; display: flex; flex-direction: column; }
.mail-ler-head h1 { font-size: 1.3rem; margin: 0 0 0.2rem; }
.mail-ler-head { border-bottom: 1px solid var(--border); padding-bottom: 0.6rem; margin-bottom: 0.6rem; display: grid; gap: 0.35rem; }
.mail-msg { border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 0.9rem; margin-bottom: 0.6rem; }
.mail-msg.out { background: #f6fbf8; border-color: #cfe9da; }
.mail-corpo { white-space: pre-wrap; margin-top: 0.35rem; }
.mail-resp textarea { margin-bottom: 0.3rem; }
.mail-arq { margin-top: 0.4rem; }
.mail-form { max-width: 820px; }
.mail-bloq { max-width: 820px; margin-bottom: 0.8rem; }
@media (max-width: 1000px) { .mail-shell { grid-template-columns: 1fr; } .mail-lista, .mail-ler { max-height: none; } }

/* Histórico unificado */
.hist-filtros { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.hist-f { padding: 0.4rem 0.8rem; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; color: var(--navy); background: #fff; font-weight: 600; }
.hist-f.on { background: var(--navy); color: #fff; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 3px solid var(--border); }
.tl-dia { margin: 1rem 0 0.4rem -1.1rem; font-weight: 800; color: var(--muted); background: var(--bg); padding-left: 0.3rem; }
.tl-ev { position: relative; display: flex; gap: 0.7rem; background: #fff; border: 1px solid var(--border); border-left: 5px solid var(--border); border-radius: 10px; padding: 0.6rem 0.8rem; margin: 0 0 0.5rem; }
.tl-ev::before { content: ''; position: absolute; left: -1.55rem; top: 1rem; width: 12px; height: 12px; border-radius: 50%; background: currentColor; }
.tl-ev.c-teal { border-left-color: var(--stage-teal); color: var(--stage-teal); }
.tl-ev.c-green { border-left-color: #25a35a; color: #25a35a; }
.tl-ev.c-blue { border-left-color: var(--stage-blue); color: var(--stage-blue); }
.tl-ev.c-purple { border-left-color: var(--stage-purple); color: var(--stage-purple); }
.tl-body { color: var(--text); flex: 1; }
.tl-ico { font-size: 1.4rem; }
.tl-fonte { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.tl-tit { font-weight: 600; }
.tl-txt { white-space: pre-wrap; color: #334; margin: 0.2rem 0; }
.hist-f.c-teal.on { background: var(--stage-teal); } .hist-f.c-green.on { background: #25a35a; }
.hist-f.c-blue.on { background: var(--stage-blue); } .hist-f.c-purple.on { background: var(--stage-purple); }

/* Segurança */
.marca-dagua { position: fixed; inset: 0; z-index: 9999; pointer-events: none; background-repeat: repeat; background-size: 540px 300px; }
@media print { .marca-dagua { position: fixed; -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
img.no-save, .chat-img img, .visor-img { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
.seg-wrap { display: flex; justify-content: center; padding: 1rem 0 2rem; }
.seg-card { max-width: 640px; width: 100%; }
.seg-card h1 { font-size: 1.45rem; margin: 0.3rem 0 0.6rem; }
.seg-passos { font-size: 0.85rem; color: var(--muted); margin: 0; }
.seg-passos span.on { color: var(--navy); font-weight: 700; }
.seg-lista li { margin-bottom: 0.25rem; }
.seg-qr { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; margin: 0.6rem 0 1rem; }
.seg-qr .qr-box svg { width: 210px; height: 210px; }
.seg-chave code { display: block; font-size: 1.05rem; font-weight: 700; letter-spacing: .08em; background: #eef2f8; padding: 0.5rem 0.6rem; border-radius: 8px; margin: 0.3rem 0; word-break: break-all; }
.seg-form { display: grid; gap: 0.6rem; }
.codigo-6 { font-size: 2rem; letter-spacing: .4em; text-align: center; font-weight: 800; max-width: 280px; }
.seg-codigo-ap, .ap-cod { text-align: center; background: #f8efd0; border: 2px dashed #e5d38a; border-radius: 12px; padding: 0.7rem; margin: 0.6rem 0; }
.cod { font-size: 2rem; font-weight: 800; letter-spacing: .15em; color: var(--navy); font-family: ui-monospace, monospace; }
.seg-espera { color: var(--ok); font-weight: 700; animation: pisca 1.6s infinite; }
@keyframes pisca { 50% { opacity: .45; } }
.seg-pend.tem { border: 2px solid var(--gold); }
.ap-pend { display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center; padding: 0.7rem 0; border-top: 1px solid var(--border); }
.ap-pend:first-of-type { border-top: none; }
.ap-quem { font-size: 1.1rem; }
.ap-cod { margin: 0; min-width: 170px; }
.ap-cod .cod { font-size: 1.5rem; }
.ap-acoes { display: flex; gap: 0.4rem; align-items: center; }
.ap-acoes form { margin: 0; }
@media (max-width: 800px) { .ap-pend { grid-template-columns: 1fr; } }
.aud-tab td { padding: 0.35rem 0.5rem; }
.visor { text-align: center; }
.visor-img { max-width: 100%; max-height: 75vh; }
.visor-pdf { width: 100%; height: 78vh; border: none; }
.visor-txt { text-align: left; white-space: pre-wrap; max-height: 75vh; overflow: auto; background: #f8fafc; padding: 1rem; border-radius: 8px; }
.visor-tab td { border: 1px solid var(--border); padding: 0.25rem 0.5rem; font-size: 0.88rem; text-align: left; }

.ura-form { overflow-x: auto; }
.ura-ops td:nth-child(2) input { min-width: 200px; }
.ura-ops td:nth-child(3) select { min-width: 190px; }
.ura-ops td:nth-child(4) select { max-width: 120px; }
.ura-ops td:nth-child(5) input { min-width: 200px; }
.dific-motivos .radio-big { margin: 0; padding: 0.4rem 0.6rem; min-height: 0; font-weight: 600; }

/* ── Rodada 5: canais do cliente ─────────────────────────── */
.cli-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.45rem 0.75rem; border-bottom: 1px solid var(--line, #e3e7ee); background: #fafbfd; }
.cli-chip { display: inline-flex; align-items: center; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.82rem; color: inherit; text-decoration: none; border: 1px solid transparent; }
.cli-chip.on { border-color: #1b2a4a; background: #fff; font-weight: 700; }
.cli-chip .emp-chip { margin: 0; }
.wa-item-tags .emp-chip { font-size: 0.7rem; padding: 0 0.4rem; }
.wa-transf { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; padding: 0.5rem 0.9rem; background: #fff8e6; border-bottom: 1px solid #f0dfb0; font-size: 0.9rem; }
.wa-transf select, .wa-transf input { width: auto; min-width: 0; margin: 0; padding: 0.3rem 0.45rem; font-size: 0.88rem; }
.wa-transf input[name=motivo] { width: 13rem; }
.wa-transf-log { padding: 0.3rem 0.9rem; background: #fbfbfd; border-bottom: 1px solid #eef0f4; }
.mail-ler-head .wa-transf { border: 1px solid #f0dfb0; border-radius: 8px; margin: 0.4rem 0; }
.mail-contas a { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.sp-linha { margin-bottom: 0.4rem; font-weight: 600; }
.sp-linha-fixa { color: #dfe7f5; font-size: 0.88rem; margin-bottom: 0.45rem; }
.sp-linha-fixa .emp-chip { margin: 0 0.15rem; }
.linhas-emp-h { margin-top: 0; display: flex; align-items: center; gap: 0.5rem; }
.linhas-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.linhas-col h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.linha-box { border: 1px solid #e3e7ee; border-radius: 10px; padding: 0.55rem 0.65rem; margin-bottom: 0.5rem; background: #fcfdff; }
.linha-top { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; margin-bottom: 0.35rem; word-break: break-all; }
.linha-ops { list-style: none; margin: 0; padding: 0; }
.linha-ops li { display: flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0; border-top: 1px dashed #edf0f5; font-size: 0.9rem; flex-wrap: wrap; }
.linha-ops li:first-child { border-top: 0; }
.linha-ops li.off .nome { text-decoration: line-through; color: #8a93a3; }
.linha-ops .nome { flex: 1; min-width: 6rem; }
.grp { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; font-size: 0.72rem; font-weight: 800; color: #fff; }
.grp-A { background: #6c3fc5; } .grp-B { background: #0d7a74; }
.linha-op-form { display: inline-flex; gap: 0.25rem; align-items: center; margin: 0; }
.linha-op-form input[name=ramal] { width: 4.2rem; padding: 0.15rem 0.3rem; margin: 0; font-size: 0.85rem; }
.btn.tiny { padding: 0.12rem 0.45rem; font-size: 0.78rem; min-height: 0; }
.linha-nova summary { cursor: pointer; font-size: 0.88rem; color: #1a5fb4; }
.linha-nova form { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.linha-nova input { width: auto; flex: 1; min-width: 8rem; margin: 0; }
.linha-add-form { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; margin: 0.4rem 0 0; padding-top: 0.35rem; border-top: 1px dashed #edf0f5; }
.linha-add-form select { flex: 1; min-width: 9rem; margin: 0; font-size: 0.85rem; padding: 0.2rem 0.35rem; }
.linha-add-form input[name=ramal] { width: 4.2rem; padding: 0.15rem 0.3rem; margin: 0; font-size: 0.85rem; }

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

/* Linhas do cliente: ramal + botões numa linha só */
.linha-ops li { flex-wrap: nowrap; }
.linha-ops .nome { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linha-ops .linha-op-form input[name=ramal] { width: 3.6rem !important; min-width: 0; height: auto; padding: 0.15rem 0.3rem !important; }
.linha-ops .linha-op-form .btn.tiny { padding: 0.15rem 0.45rem; }

/* Equipe */
.eq-bloco { margin-bottom: 1rem; }
.eq-bloco.eq-A { border-top: 4px solid #6d4bc4; } .eq-bloco.eq-B { border-top: 4px solid #1f8a70; } .eq-bloco.eq-D { border-top: 4px solid #0b1f3a; } .eq-bloco.eq-off { border-top: 4px solid #9aa3b2; }
.eq-h { margin: 0 0 0.5rem; font-size: 1.15rem; }
.eq-lista { list-style: none; margin: 0; padding: 0; }
.eq-pessoa { display: flex; align-items: center; gap: 0.9rem; padding: 0.7rem 0; border-top: 1px solid #edf0f5; }
.eq-pessoa:first-child { border-top: 0; }
.eq-pessoa.off { opacity: 0.75; }
.eq-av { width: 44px; height: 44px; border-radius: 50%; background: #0b1f3a; color: #f2d27a; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; flex: none; }
.eq-A .eq-av { background: #6d4bc4; color: #fff; } .eq-B .eq-av { background: #1f8a70; color: #fff; }
.eq-info { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.eq-nome { font-weight: 700; font-size: 1.05rem; color: var(--navy); }
.eq-emps { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.eq-acoes { display: flex; gap: 0.5rem; flex: none; }
.btn.big { min-height: 46px; padding: 0.6rem 1.1rem; font-size: 1rem; }
.btn.danger { background: #c62828; color: #fff; } .btn.danger:hover { background: #a31f1f; color: #fff; }
.btn.danger-ghost { background: #fff; color: #c62828; border: 1px solid #f0b8be; } .btn.danger-ghost:hover { background: #fdecee; color: #a31f1f; }
.eq-form { display: flex; flex-direction: column; gap: 0.9rem; max-width: 820px; }
.eq-lbl { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 600; }
.eq-escolha { border: 0; padding: 0; margin: 0; display: flex; gap: 0.7rem; flex-wrap: wrap; }
.eq-escolha legend { font-weight: 700; margin-bottom: 0.4rem; }
.eq-card-op { flex: 1 1 240px; display: flex; flex-direction: column; gap: 0.2rem; border: 2px solid #dfe4ec; border-radius: 12px; padding: 0.8rem 0.9rem; cursor: pointer; background: #fff; }
.eq-card-op:has(input:checked) { border-color: #c9a227; background: #fffaf0; box-shadow: 0 0 0 3px #f6e7b5; }
.eq-card-op input { margin: 0 0 0.2rem; width: auto; }
.eq-card-op.eq-A strong { color: #5b3aa8; } .eq-card-op.eq-B strong { color: #17705b; }
.eq-emps-check { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.eq-emps-check label { display: flex; align-items: center; gap: 0.35rem; }
.eq-emps-check input { width: auto; }
.eq-senha { max-width: 760px; }
.eq-cred { display: flex; gap: 2rem; flex-wrap: wrap; margin: 1rem 0; }
.eq-cred div { display: flex; flex-direction: column; gap: 0.2rem; }
.eq-big { font-size: 1.5rem; padding: 0.4rem 0.8rem; background: #f4f6fa; border-radius: 8px; border: 1px dashed #b9c2d0; }
.eq-desligar { max-width: 820px; border-top: 4px solid #c62828; }
.eq-checklist { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.eq-confirmo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; } .eq-confirmo input { width: auto; transform: scale(1.3); }
.eq-acoes-fim { display: flex; gap: 0.6rem; }
.eq-hist { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }

/* Lembrete gentil (nunca bloqueia) — regra da casa: faturado, boleto 30 dias */
.flash .lembrete, .lembrete-box { background: #eef6ff; color: #1d4f91; border: 1px solid #c4dbf5; display: flex; align-items: center; gap: 0.6rem; justify-content: space-between; }
.lembrete-box { border-radius: 10px; padding: 0.55rem 0.8rem; margin: 0.4rem 0; font-size: 0.92rem; }
.lembrete-x { background: #fff; border: 1px solid #c4dbf5; color: #1d4f91; border-radius: 8px; padding: 0.2rem 0.6rem; cursor: pointer; font-size: 0.85rem; }

/* Fase do trabalho do comprador + painel (Gantt simples) */
.fase-card { border-left: 5px solid #2f6fd6; }
.fase-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.fase-st { display: inline-block; border-radius: 999px; padding: 0.15rem 0.7rem; font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.st-ok { background: #e3f4e8; color: #1e6b37; } .st-apertado { background: #fff4d6; color: #8a6200; }
.st-estourado { background: #fde3e3; color: #a32020; } .st-sem { background: #eceff3; color: #5b6472; }
.fase-steps { display: flex; flex-wrap: wrap; gap: 0.3rem; list-style: none; padding: 0; margin: 0.8rem 0 0.4rem; }
.fase-steps li { flex: 1 1 0; min-width: 7.5rem; text-align: center; font-size: 0.82rem; padding: 0.35rem 0.4rem; border-radius: 8px;
  background: #f1f3f6; color: #6b7380; border: 1px solid #e1e5ea; }
.fase-steps li.feito { background: color-mix(in srgb, var(--c) 14%, white); color: var(--c); border-color: color-mix(in srgb, var(--c) 35%, white); }
.fase-steps li.atual { background: var(--c); color: #fff; border-color: var(--c); font-weight: 700; }
.fase-resumo { margin: 0.4rem 0 0.7rem; }
.fase-form { display: grid; grid-template-columns: 1fr 1fr 2fr auto; gap: 0.6rem; align-items: end; }
.fase-form label { display: block; font-size: 0.85rem; margin-bottom: 0.2rem; }
.fase-form .fase-cond { grid-column: 1 / -1; background: #fffbea; border: 1px solid #f0e2a8; border-radius: 8px; padding: 0.4rem 0.6rem; }
.fase-hist { margin-top: 0.7rem; } .fase-hist ul { list-style: none; padding-left: 0.2rem; margin: 0.4rem 0 0; }
.fase-hist li { padding: 0.25rem 0; border-bottom: 1px dashed #e6e9ee; }
.fase-dot { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; margin-right: 0.3rem; vertical-align: middle; }
.fase-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0 0 0.8rem; }
.fase-filtros .chip { text-decoration: none; border: 1px solid #d9dee5; border-radius: 999px; padding: 0.2rem 0.7rem; font-size: 0.88rem; color: #333; background: #fff; }
.fase-filtros .chip.on { outline: 2px solid #1d4f91; }
.fase-legenda { margin-left: auto; display: flex; flex-wrap: wrap; gap: 0.6rem; font-size: 0.78rem; color: #5b6472; }
.fase-legenda i { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 3px; margin-right: 0.2rem; vertical-align: middle; }
.gantt-row { display: grid; grid-template-columns: 17rem 1fr 10.5rem; gap: 0.8rem; align-items: center; padding: 0.55rem 0; border-bottom: 1px solid #eef0f3; }
.gantt-row:last-child { border-bottom: 0; }
.gantt-bar { position: relative; height: 1.3rem; background: #f3f5f8; border-radius: 6px; }
.gantt-bar .seg { position: absolute; top: 0.2rem; bottom: 0.2rem; border-radius: 4px; opacity: 0.9; }
.gantt-bar .mk, .fase-legenda i.mk-prev, .fase-legenda i.mk-lim, .fase-legenda i.mk-hoje { width: 3px; }
.gantt-bar .mk { position: absolute; top: -0.15rem; bottom: -0.15rem; }
.mk-prev { background: #2f6fd6; } .mk-lim { background: #c62828; } .mk-hoje { background: #222; opacity: 0.55; }
.gantt-bar .mk-prev { border-left: 1px dashed #fff; }
.gantt-st { text-align: right; }
.fase-form .fase-cond { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-size: 0.92rem; }
.fase-form .fase-cond[hidden] { display: none; }
.fase-form .fase-cond input[type=checkbox] { width: 1.1rem; height: 1.1rem; min-height: 0; margin: 0; padding: 0; flex: 0 0 auto; }
/* caixas de aviso/lembrete escondidas de verdade (display:flex acima ganhava do [hidden]) */
.lembrete-box[hidden], .flash .lembrete[hidden], .chat-block[hidden] { display: none !important; }
.st-vencida { background: #ffe9d6; color: #9a4a00; } .st-travado { background: #fde3e3; color: #a32020; }

/* Relatório do dia inteligente */
.rd-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.rd-nav { display: flex; gap: 0.35rem; flex-wrap: wrap; align-items: center; }
.rd-nav .chip { text-decoration: none; border: 1px solid #d9dee5; border-radius: 999px; padding: 0.2rem 0.8rem; color: #333; background: #fff; }
.rd-nav .chip.on { outline: 2px solid #1d4f91; font-weight: 600; }
.rd-frase { background: #f4f6fa; border-radius: 10px; padding: 0.5rem 0.8rem; margin: 0.4rem 0 0.9rem; }
.rd-pill { display: inline-block; border-radius: 999px; padding: 0.1rem 0.6rem; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.rd-pill.sev-vermelho { background: #fde3e3; color: #a32020; } .rd-pill.sev-laranja { background: #ffe9d6; color: #9a4a00; } .rd-pill.sev-verde { background: #e3f4e8; color: #1e6b37; }
.rd-saude { display: inline-flex; gap: 0.3rem; flex-wrap: wrap; }
.rd-topo { display: flex; align-items: center; gap: 1rem; border-radius: 12px; padding: 0.8rem 1.1rem; margin-bottom: 0.9rem; }
.rd-topo.sev-vermelho { background: #fde3e3; border: 1px solid #f3b9b9; } .rd-topo.sev-verde { background: #e3f4e8; border: 1px solid #b9e2c6; }
.rd-topo-num { font-size: 2.6rem; font-weight: 800; line-height: 1; color: #a32020; }
.rd-topo.sev-verde .rd-topo-num { color: #1e6b37; }
.rd-top ul { margin: 0.3rem 0 0.4rem; padding-left: 1.1rem; } .rd-top li { margin: 0.15rem 0; }
.rd-equipe { margin: 1.1rem 0; } .rd-equipe-head { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.rd-sub { margin: 0.8rem 0 0.4rem; font-size: 1rem; color: #4b5563; }
.rd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(26rem, 1fr)); gap: 0.7rem; }
.rd-card { background: #fff; border: 1px solid #e3e7ec; border-left: 6px solid #2e7d32; border-radius: 12px; padding: 0.7rem 0.9rem; margin-bottom: 0.7rem; }
.rd-grid .rd-card { margin-bottom: 0; }
.rd-card.sev-vermelho { border-left-color: #c62828; } .rd-card.sev-laranja { border-left-color: #e07b00; }
.rd-card-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.rd-nums { display: flex; gap: 0.9rem; flex-wrap: wrap; font-size: 0.88rem; margin: 0.3rem 0 0.2rem; color: #374151; }
.rd-ins { list-style: none; margin: 0.35rem 0 0; padding: 0; }
.rd-ins li { display: flex; gap: 0.5rem; align-items: flex-start; padding: 0.28rem 0; border-top: 1px dashed #eef0f3; font-size: 0.92rem; }
.rd-dot { flex: 0 0 auto; width: 0.7rem; height: 0.7rem; border-radius: 50%; margin-top: 0.32rem; background: #2e7d32; }
.rd-ins li.sev-vermelho .rd-dot { background: #c62828; } .rd-ins li.sev-laranja .rd-dot { background: #e07b00; }
.rd-itens { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.2rem; }
.rd-itens a { font-size: 0.8rem; background: #f3f5f8; border-radius: 6px; padding: 0.05rem 0.45rem; text-decoration: none; color: #1d4f91; }
.rd-lim { width: 100%; border-collapse: collapse; margin-bottom: 0.8rem; }
.rd-lim th, .rd-lim td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid #eef0f3; vertical-align: top; }
.rd-lim input { width: 6rem; }

/* «Estou com dificuldade» aberto: o formulário ocupa a largura da barra (sem vazio à esquerda) e os motivos ficam lado a lado */
.mov-bar { flex-wrap: wrap; }
.mov-bar .dific-box[open] { flex: 1 1 100%; display: block; width: 100%; text-align: right; }
.mov-bar .dific-box[open] > .dific-form { max-width: none; width: 100%; box-sizing: border-box; text-align: left; }
.mov-bar .dific-box[open] .dific-motivos { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
/* Contratar: bolinha de escolha no tamanho normal (não esticar como campo de texto) */
.eq-card-op input[type=radio] { width: 1.1rem !important; height: 1.1rem !important; min-height: 0 !important; padding: 0 !important; flex: none; align-self: flex-start; box-shadow: none; accent-color: #c9a227; }

/* caixa de instrução: só o texto da instrução preserva quebras de linha (sem faixas vazias em cima/embaixo) */
.instrucao { white-space: normal; }
.instrucao .instrucao-txt { white-space: pre-wrap; }

/* ── Início · resumo do momento (não é menu) ───────────── */
.home-sec { margin: 1rem 0 1.25rem; }
.home-sec-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.5rem; margin-bottom: 0.55rem;
}
.home-sec-head h2 { margin: 0; font-size: 1.15rem; color: var(--navy); }
.home-sec-meta { display: inline-flex; gap: 0.35rem; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; padding: 0.15rem 0.55rem;
  border-radius: 999px; font-size: 0.8rem; font-weight: 700;
}
.pill-red { background: #fdecee; color: #b71c1c; }
.pill-orange { background: #fff3e0; color: #e65100; }
.pill-green { background: #e8f6ee; color: #1b5e20; }

.home-alert-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.home-alert {
  border-radius: 10px; border: 1px solid var(--border); background: #fff;
  box-shadow: var(--shadow);
}
.home-alert-link {
  display: flex; align-items: flex-start; gap: 0.65rem;
  padding: 0.7rem 0.85rem; text-decoration: none; color: inherit;
}
.home-alert:not(:has(a)) { padding: 0.7rem 0.85rem; display: flex; align-items: flex-start; gap: 0.65rem; }
.home-alert-link:hover { background: #f7f9fc; border-radius: 10px; }
.home-alert-dot {
  width: 0.65rem; height: 0.65rem; border-radius: 50%; margin-top: 0.35rem; flex-shrink: 0;
  background: var(--muted);
}
.home-alert.sev-vermelho .home-alert-dot { background: var(--alert-urgent, #c62828); }
.home-alert.sev-laranja .home-alert-dot { background: var(--stage-orange, #ef6c00); }
.home-alert.sev-verde .home-alert-dot { background: var(--stage-green, #2e7d32); }
.home-alert.sev-vermelho { border-left: 4px solid #c62828; }
.home-alert.sev-laranja { border-left: 4px solid #ef6c00; }
.home-alert.sev-verde { border-left: 4px solid #2e7d32; }
.home-alert-body { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; min-width: 0; }
.home-alert-body strong { font-size: 0.98rem; color: var(--navy); }
.home-alert-n {
  font-weight: 800; font-size: 1.15rem; color: var(--navy);
  min-width: 1.5rem; text-align: right;
}

.home-empty.calm {
  margin: 0; padding: 0.85rem 1rem; color: var(--muted);
  background: #f7f9fc; border-radius: 10px; border: 1px dashed var(--border);
  font-size: 0.95rem;
}

.home-blocos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1.5rem;
}
.home-bloco {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); padding: 0.9rem 1rem 1rem;
  border-top: 4px solid var(--navy);
  display: flex; flex-direction: column; gap: 0.45rem; min-height: 140px;
}
.home-bloco-em_execucao { border-top-color: var(--stage-blue, #2f6fd6); }
.home-bloco-ja_pronto { border-top-color: var(--stage-green, #2e7d32); }
.home-bloco-a_pagar { border-top-color: var(--stage-orange, #ef6c00); }
.home-bloco-a_receber { border-top-color: var(--stage-teal, #00897b); }
.home-bloco-head {
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
}
.home-bloco-head h2 { margin: 0; font-size: 1.05rem; color: var(--navy); }
.home-bloco-n {
  font-size: 1.6rem; font-weight: 800; color: var(--navy); line-height: 1;
}
.home-bloco-nota { margin: 0; font-size: 0.82rem; line-height: 1.35; }
.home-bloco-list { list-style: none; margin: 0; padding: 0; }
.home-bloco-list li { border-top: 1px solid #eef1f5; }
.home-bloco-list li:first-child { border-top: none; }
.home-bloco-list a {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 0.45rem 0.1rem; text-decoration: none; color: inherit;
}
.home-bloco-list a:hover .home-bloco-nome { color: var(--stage-blue); text-decoration: underline; }
.home-bloco-nome { font-weight: 650; font-size: 0.92rem; color: var(--navy); display: inline; }
.home-bloco-det { font-size: 0.8rem; }
.home-badge {
  display: inline-block; margin-left: 0.35rem; padding: 0.05rem 0.4rem;
  border-radius: 6px; font-size: 0.72rem; font-weight: 700; vertical-align: middle;
}
.home-badge.sev-vermelho { background: #fdecee; color: #b71c1c; }
.home-badge.sev-laranja { background: #fff3e0; color: #e65100; }
.home-badge.sev-verde { background: #e8f6ee; color: #1b5e20; }
.home-bloco-mais {
  margin-top: auto; font-size: 0.88rem; font-weight: 600; color: var(--navy-2, var(--navy));
}
.home-ops-card { margin-top: 0.5rem; }
.home-foot { margin: 0.5rem 0 1.5rem; font-size: 0.9rem; }

@media (max-width: 860px) {
  .home-blocos { grid-template-columns: 1fr; }
}

.home-sec-meu { background: #fffaf0; border: 1px solid #f0d9a8; border-radius: 14px; padding: 0.85rem 1rem 1rem; }
.home-meu-list { background: #fff; border-radius: 10px; border: 1px solid #f0e2c0; padding: 0 0.65rem; }
.home-meu-item a { padding: 0.5rem 0.15rem; }


/* Buckets Fila · Oportunidades · Ativas · Passadas */
.tabs.buckets a.on { font-weight: 700; }
.fila-acoes { background: #faf6ea; border-radius: 8px; padding: 0.65rem 0.75rem; }
.empty-state { text-align: center; padding: 1.5rem 1rem; color: #5b6b7c; }
.empty-state p { margin: 0.35rem 0; }
.empty-state .muted { font-size: 0.9rem; }
