:root {
  --orange: #e8590c;
  --orange-dark: #c94a06;
  --orange-light: #fdeade;
  --graphite: #2b2b30;
  --graphite-light: #45454e;
  --bg: #f6f5f3;
  --surface-alt: #faf9f7;
  --card: #ffffff;
  --border: #e6e4e0;
  --border-strong: #d6d4cf;
  --text: #26252a;
  --text-muted: #74727a;
  --green: #2f9e44;
  --green-light: #e6f7e9;
  --red: #e03131;
  --red-light: #fdeaea;
  --dept-comercial: var(--orange);
  --dept-marketing: var(--orange);
  --dept-operacional: var(--orange);
  --dept-financeiro: var(--orange);
  --dept-administrativo: var(--orange);
  --radius: 10px;
  --radius-lg: 14px;
  --radius-sm: 6px;
  --shadow-xs: 0 1px 2px rgba(20, 19, 22, .05);
  --shadow-sm: 0 1px 3px rgba(20, 19, 22, .06), 0 4px 10px rgba(20, 19, 22, .04);
  --shadow-md: 0 6px 20px rgba(20, 19, 22, .09), 0 2px 6px rgba(20, 19, 22, .05);
  --shadow-lg: 0 24px 64px rgba(15, 14, 17, .3);
  --focus-ring: 0 0 0 3px rgba(232, 89, 12, .18);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  height: 100%;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: 14px; }

a { color: var(--orange-dark); }

.hidden { display: none !important; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 20px; border: 2px solid var(--bg); background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #c3c1bc; background-clip: padding-box; }

/* ---------- Login / verificação em duas etapas ----------
   As três telas de acesso (login, desafio de MFA, ativação obrigatória de MFA) precisam cobrir a
   tela inteira, opacas, por cima de qualquer outra coisa — são "portões" antes do sistema.
   #mfa-screen e #mfa-setup-screen (Fase 1.65/1.66) ficavam sem nenhuma regra própria, então quando
   apareciam, renderizavam como um bloco comum sem preencher a tela, sem fundo — no aparelho da
   Vania isso deixava o cabeçalho e o menu do sistema visíveis embaixo do cartão de ativação.
   position:fixed + inset:0 + z-index alto garantem que cobrem tudo, mesmo se algo por trás não
   estiver escondido direito. */
#login-screen, #mfa-screen, #mfa-setup-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  min-height: 100vh;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 15% 15%, rgba(232, 89, 12, .16), transparent 45%),
    linear-gradient(135deg, var(--graphite) 0%, #17171a 100%);
}
.login-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  text-align: center;
  color: rgba(255, 255, 255, .38);
  font-size: 11px;
  letter-spacing: .02em;
}

.login-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  width: 380px;
  box-shadow: var(--shadow-lg);
}

.login-card h1 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.005em;
  margin: 0 0 22px;
  color: var(--graphite);
  text-align: center;
}

.login-card .brand-block {
  margin-bottom: 28px;
  text-align: center;
}
.login-card .brand-logo {
  display: block;
  max-width: 175px;
  height: auto;
  margin: 0 auto 18px;
}
.login-card .brand-tag {
  display: block;
  color: var(--orange);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: 11px;
}
.version-badge {
  display: inline-block;
  margin-top: 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--orange-dark);
  background: var(--orange-light);
  padding: 3px 11px;
  border-radius: 999px;
}

.login-card .hint-text {
  text-align: center;
  margin-top: 14px;
}

.field { margin-bottom: 15px; }
.field label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: var(--focus-ring);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: .01em;
  cursor: pointer;
  background: var(--graphite);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: background .15s ease, box-shadow .15s ease, transform .05s ease;
}
.btn:hover { background: var(--graphite-light); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn-primary { background: var(--orange); box-shadow: 0 1px 2px rgba(201, 74, 6, .18), 0 4px 12px rgba(232, 89, 12, .2); }
.btn-primary:hover { background: var(--orange-dark); box-shadow: 0 4px 16px rgba(232, 89, 12, .3); }
.btn-ghost { background: transparent; color: var(--graphite); border: 1px solid var(--border-strong); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-alt); border-color: var(--graphite-light); }
.btn-danger { background: transparent; color: var(--red); border: 1px solid #f3c2c2; box-shadow: none; }
.btn-danger:hover { background: var(--red-light); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; }

.error-text { color: var(--red); font-size: 13px; margin-top: 8px; }
.hint-text { color: var(--text-muted); font-size: 12px; margin-top: 12px; line-height: 1.5; }

/* ---------- App shell (navegação por departamentos, Fase 1.54) ---------- */
#app-screen { display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  background: linear-gradient(180deg, var(--graphite) 0%, #19191c 100%);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  flex-shrink: 0;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.topbar-logo { display: block; max-width: 118px; height: auto; }
.topbar-brand-text { line-height: 1.25; }
.topbar-cia-name { font-size: 15px; font-weight: 800; letter-spacing: .08em; color: var(--orange); }
.topbar-cia-tag { font-size: 9px; letter-spacing: .04em; text-transform: uppercase; color: #a9a8ae; }

.nav-toggle-btn {
  display: none;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .15);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  padding: 7px 11px;
  border-radius: 7px;
  cursor: pointer;
  flex-shrink: 0;
}

.global-search { position: relative; flex: 1; max-width: 380px; }
.global-search .search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); opacity: .55; color: #fff; pointer-events: none; }
.global-search input {
  width: 100%;
  padding: 8px 10px 8px 32px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .07);
  color: #fff;
  font-size: 13px;
  box-sizing: border-box;
  transition: border-color .15s ease, background .15s ease;
}
.global-search input::placeholder { color: #9c9ba1; }
.global-search input:focus { outline: none; border-color: var(--orange); background: rgba(255, 255, 255, .12); }
.global-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  width: 320px;
  margin-top: 4px;
  background: #fff;
  color: var(--graphite);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  max-height: 60vh;
  overflow-y: auto;
  z-index: 200;
}
.global-search-results .gsr-group-label {
  padding: 9px 12px 4px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--graphite-light);
  font-weight: 700;
}
.global-search-results .gsr-item {
  padding: 9px 12px;
  cursor: pointer;
  font-size: 13px;
  border-top: 1px solid var(--border);
}
.global-search-results .gsr-item:hover, .global-search-results .gsr-item.active { background: var(--surface-alt); }
.global-search-results .gsr-item .gsr-sub { color: #8a8a90; font-size: 11.5px; margin-top: 1px; }
.global-search-results .gsr-empty, .global-search-results .gsr-loading { padding: 14px 12px; color: #8a8a90; font-size: 13px; }

.topbar-spacer { flex: 1; }

.topbar-icon-btn {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .13);
  color: #d8d7db;
  border-radius: 9px;
  cursor: pointer;
  flex-shrink: 0;
}
.topbar-icon-btn:hover { background: rgba(255, 255, 255, .13); color: #fff; }
.topbar-icon-btn.active { background: var(--orange); border-color: var(--orange); color: #fff; }
.topbar-icon-btn .nav-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  font-size: 10px;
  line-height: 1;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  border: 2px solid var(--graphite);
}
.topbar-icon-btn[data-route="pomodoro"] .nav-badge { background: var(--orange); }

.topbar-user {
  display: flex; align-items: center; gap: 9px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, .12);
  flex-shrink: 0;
}
.topbar-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--orange);
  color: #fff; font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.topbar-user-info { line-height: 1.3; }
.topbar-user-info .name { color: #fff; font-weight: 600; font-size: 12.5px; }
.topbar-user-info .meta { display: flex; align-items: center; gap: 6px; }
.topbar-user-info .role-badge {
  color: var(--orange);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: none;
  padding: 0;
}
.topbar-user-info #user-email { color: #a9a7a2; font-size: 10.5px; }
.topbar-user .logout-link {
  color: #cfcdc8; font-size: 11px; text-decoration: none;
  border-left: 1px solid rgba(255, 255, 255, .14);
  padding-left: 10px; margin-left: 2px; white-space: nowrap;
}
.topbar-user .logout-link:hover { color: #fff; }

.version-strip {
  background: var(--graphite);
  padding: 0 20px 8px;
  flex-shrink: 0;
}
.version-strip .version-tag {
  font-size: 9.5px;
  letter-spacing: .03em;
  color: rgba(255, 255, 255, .45);
}

.dept-rail {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  overflow-x: auto;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.dept-tile {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  min-width: 92px;
  width: auto;
  min-height: 72px;
  padding: 10px 10px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border-strong);
  background: var(--card);
  color: var(--graphite);
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, color .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.dept-tile .dept-icon { width: 20px; height: 20px; }
/* Fase 1.80: rótulos ficam sempre numa linha só (nowrap) — um rótulo maior ("Tarefas internas")
   deixava a caixinha mais alta que as vizinhas e desalinhava a fileira toda (mesmo problema já
   visto antes com "Recursos Humanos"). Agora a caixinha só cresce em largura, nunca em altura. */
.dept-tile .dept-label { font-size: 11.5px; font-weight: 700; text-align: center; line-height: 1.2; white-space: nowrap; }
.dept-tile:hover { border-color: var(--orange); box-shadow: var(--shadow-xs); transform: translateY(-1px); }
.dept-tile.active { background: var(--orange); border-color: var(--orange); color: #fff; box-shadow: var(--shadow-sm); }

.workspace { flex: 1; display: flex; align-items: flex-start; min-height: 0; }

.side-panel {
  flex: 0 0 240px;
  background: var(--card);
  border-right: 1px solid var(--border);
  align-self: stretch;
  overflow-y: auto;
}
.side-panel .sp-head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}
.side-panel .sp-eyebrow {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--orange-dark);
  margin-bottom: 3px;
}
.side-panel .sp-head h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--graphite); }

.sidebar-footer {
  padding: 14px 16px 18px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 10.5px;
  letter-spacing: .02em;
}
.side-panel .sp-search { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.side-panel .sp-search input {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12.5px;
  background: var(--bg);
  color: var(--text);
}
.side-panel .sp-search input:focus { outline: none; border-color: var(--orange); }

#nav-menu { padding: 6px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 8px;
  border-left: 3px solid transparent;
  color: var(--graphite);
  cursor: pointer;
  margin-bottom: 1px;
  font-size: 13.5px;
  font-weight: 500;
  transition: background .12s ease, color .12s ease;
}
.nav-item .nav-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); flex-shrink: 0; }
.nav-item.sp-filtered-out { display: none; }
.nav-item:hover { background: var(--surface-alt); }
.nav-item.active { background: var(--orange-light); border-left-color: var(--orange); color: var(--graphite); font-weight: 700; }
.nav-item.active .nav-dot { background: var(--orange); }
.nav-badge.badge-fx { background: var(--surface-alt); color: var(--text-muted); border: 1px solid var(--border-strong); }
.nav-badge {
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 7px;
  line-height: 1.5;
}

.main {
  flex: 1;
  padding: 30px 34px;
  max-width: 1240px;
  overflow-y: auto;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.page-header h2 { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -.01em; color: var(--graphite); }
.page-header p { margin: 3px 0 0; color: var(--text-muted); font-size: 13px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.card h3 { font-weight: 700; letter-spacing: -.005em; }
.card.clickable { cursor: pointer; transition: box-shadow .15s ease, transform .12s ease, border-color .15s ease; }
.card.clickable:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); transform: translateY(-1px); }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 10px 12px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}
th:first-child { border-top-left-radius: 8px; }
th:last-child { border-top-right-radius: 8px; }
td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tr.clickable { cursor: pointer; transition: background .1s ease; }
tr.clickable:hover { background: var(--surface-alt); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge-gray { background: #eeedeb; color: var(--text-muted); }
.badge-orange { background: var(--orange-light); color: var(--orange-dark); }
.badge-green { background: var(--green-light); color: var(--green); }
.badge-red { background: var(--red-light); color: var(--red); }
.badge-dark { background: var(--graphite); color: #fff; }
.badge-ai { background: #eef1fb; color: #3b4a9c; }
.badge-ai::before { display: none; }

/* ---------- Projetos: workspace (abas, colaboradores, histórico) ---------- */
.project-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px 4px 4px; font-size: 12.5px; font-weight: 600; margin: 0 6px 6px 0; }
.chip .chip-avatar { width: 20px; height: 20px; border-radius: 50%; background: var(--orange); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.chip .chip-remove { cursor: pointer; color: var(--text-muted); font-weight: 700; margin-left: 2px; }
.chip .chip-remove:hover { color: var(--red); }
.checklist { max-height: 180px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; background: var(--surface-alt); }
.checklist label { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-weight: 400; font-size: 13.5px; text-transform: none; letter-spacing: normal; color: var(--text); cursor: pointer; }
.checklist label input[type="checkbox"] { width: auto; flex: 0 0 auto; }
.timeline { margin-top: 4px; }
.timeline-item { position: relative; padding: 0 0 18px 18px; border-left: 2px solid var(--border); }
.timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: -6px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); border: 2px solid var(--card); }
.timeline-item .timeline-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 3px; }
.timeline-item .timeline-content { white-space: pre-wrap; }
.ia-placeholder { text-align: center; padding: 46px 20px; color: var(--text-muted); }
.ia-placeholder .ia-icon { font-size: 30px; margin-bottom: 10px; opacity: .5; }

/* ---------- Relatórios: stat tiles e barras ---------- */
.stat-tile { }
.stat-tile .stat-label { color: var(--text-muted); font-size: 12px; margin-bottom: 4px; }
.stat-tile .stat-value { font-size: 27px; font-weight: 800; letter-spacing: -.01em; color: var(--graphite); font-variant-numeric: tabular-nums; }
.stat-tile .stat-sub { color: var(--text-muted); font-size: 12px; margin-top: 4px; }

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-row .bar-label { width: 150px; flex-shrink: 0; font-size: 13px; color: var(--text); text-align: right; }
.bar-row .bar-track { flex: 1; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 5px; height: 22px; position: relative; overflow: hidden; }
.bar-row .bar-fill { height: 100%; border-radius: 4px; min-width: 3px; transition: width .3s ease; }
.bar-row .bar-value { width: 90px; flex-shrink: 0; font-size: 13px; font-weight: 700; color: var(--graphite); font-variant-numeric: tabular-nums; }

.bar-fill-green { background: var(--green); }
.bar-fill-red { background: var(--red); }
.bar-fill-orange { background: var(--orange); }
.bar-fill-gray { background: #a5a3ac; }

.col-chart { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding: 10px 4px 0; }
.col-chart .col-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.col-chart .col-bar { width: 100%; max-width: 34px; background: var(--orange); border-radius: 4px 4px 0 0; min-height: 2px; }
.col-chart .col-value { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.col-chart .col-label { font-size: 11px; color: var(--text-muted); margin-top: 6px; text-align: center; }

.chart-legend { display: flex; gap: 18px; justify-content: center; margin-bottom: 8px; font-size: 12px; color: var(--text-muted); }
.chart-legend .legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.col-bar-pair { display: flex; align-items: flex-end; justify-content: center; gap: 3px; width: 100%; height: 100%; }
.col-bar-pair .col-bar { max-width: 16px; }
.col-chart .col-bar.col-bar-green { background: var(--green); }
.col-chart .col-bar.col-bar-red { background: var(--red); }

.pipeline { display: grid; grid-template-columns: repeat(7, minmax(180px, 1fr)); gap: 12px; overflow-x: auto; }
.pipeline-col { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px; min-height: 200px; transition: background .15s ease, outline .15s ease; outline: 2px dashed transparent; outline-offset: -2px; }
.pipeline-col.drag-over { background: var(--orange-light); outline-color: var(--orange); }
.pipeline-col h4 { margin: 4px 6px 10px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.pipeline-col-body { min-height: 40px; }
.deal-card {
  background: #fff;
  border-radius: 9px;
  padding: 11px 13px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  cursor: grab;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-xs);
  transition: opacity .15s ease, box-shadow .15s ease, border-color .15s ease, transform .1s ease;
}
.deal-card:hover { border-color: var(--orange); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.deal-card.dragging { opacity: .35; cursor: grabbing; }
.deal-card .val { color: var(--orange-dark); font-weight: 700; margin-top: 4px; font-size: 12.5px; }
.deal-card .client { color: var(--text-muted); font-size: 12px; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 14, 17, .55);
  backdrop-filter: blur(1px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto; z-index: 50;
}
.modal {
  background: #fff; border-radius: var(--radius-lg); width: 560px; max-width: 100%;
  padding: 26px 28px; box-shadow: var(--shadow-lg);
}
.modal h3 { margin: 0 0 16px; font-size: 18px; font-weight: 800; letter-spacing: -.01em; color: var(--graphite); }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.modal-wide { width: 760px; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.toolbar input[type=text], .toolbar input[type=search] { min-width: 220px; }

.items-table input, .items-table select { padding: 5px 7px; font-size: 12.5px; }
.items-table td { padding: 5px 6px; }
.total-row td { font-weight: 700; border-top: 2px solid var(--border); }

.quote-share-box {
  background: #fff7ef; border: 1px dashed var(--orange); border-radius: 8px;
  padding: 12px 14px; font-size: 13px; margin-top: 10px;
}
.quote-share-box code { background: #fff; padding: 2px 6px; border-radius: 4px; word-break: break-all; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }

.top-actions { display: flex; gap: 8px; }

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

/* ---------- Modo celular ---------- */
@media (max-width: 720px) {
  html, body { overflow-x: hidden; }

  #app-screen { min-height: 0; }

  .topbar { flex-wrap: wrap; padding: 10px 14px; gap: 8px; position: sticky; top: 0; z-index: 100; }
  .topbar-logo { max-width: 90px; }
  .topbar-cia-name { font-size: 13px; }
  .topbar-cia-tag { font-size: 8px; }
  /* No celular só o essencial fica visível no topo — avatar/nome/e-mail/papel do usuário somem,
     mas o link "Sair" continua sempre alcançável (antes ficava escondido junto com o menu fechado). */
  .topbar-user { gap: 0; padding-left: 0; border-left: none; }
  .topbar-avatar, .topbar-user-info { display: none; }
  .topbar-user .logout-link { padding-left: 8px; border-left: 1px solid rgba(255, 255, 255, .14); margin-left: 0; }
  .nav-toggle-btn { display: block; }

  .global-search { order: 3; flex: 1 1 100%; max-width: 100%; }
  .global-search-results { width: calc(100vw - 28px); max-width: 360px; }

  .version-strip { padding: 0 14px 6px; }
  .dept-rail { padding: 10px 14px; position: sticky; top: 61px; z-index: 90; }

  .workspace { flex-direction: column; position: relative; }
  .side-panel {
    display: none;
    width: 100%;
    flex: 1 1 auto;
    max-height: 50vh;
  }
  .workspace.nav-open .side-panel { display: block; }

  .main { padding: 16px; max-width: 100%; }
  .page-header { flex-wrap: wrap; gap: 8px; }

  .row-2, .row-3 { grid-template-columns: 1fr; }

  .modal-backdrop { padding: 0; align-items: stretch; }
  .modal, .modal-wide { width: 100%; max-width: 100%; min-height: 100vh; border-radius: 0; }

  .toolbar input[type=text], .toolbar input[type=search] { min-width: 0; width: 100%; }

  table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }

  .bar-row { flex-wrap: wrap; }
  .bar-row .bar-label { width: 100%; text-align: left; }
  .bar-row .bar-value { width: auto; }
}

/* ---------- Pomodoro ---------- */
@keyframes pomodoro-pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 89, 12, .45); }
  70% { box-shadow: 0 0 0 14px rgba(232, 89, 12, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 89, 12, 0); }
}

/* bottom deslocado de 20px pra 74px pra não ficar atrás do selo "Powered by Netlify"
   que a própria Netlify passou a exibir por padrão em sites do plano gratuito (ago/2026) —
   ver claude/status-do-projeto.md, Fase 1.69+. Some sozinho se a Vania desativar o selo
   em Project configuration > General > Powered by Netlify badge, mas não depende disso. */
#pomodoro-fab { position: fixed; right: 20px; bottom: 74px; z-index: 45; font-family: inherit; }

.pomodoro-btn {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #fff; border: none; border-radius: 999px;
  padding: 12px 18px; font-size: 14px; font-weight: 700;
  box-shadow: var(--shadow-lg); cursor: pointer;
  animation: pomodoro-pulse 2.4s infinite;
}
.pomodoro-btn:hover { animation: none; transform: translateY(-1px); }
.pomodoro-btn.is-running { animation: none; background: linear-gradient(135deg, var(--graphite), var(--graphite-light)); }
.pomodoro-btn.is-break { animation: none; background: linear-gradient(135deg, var(--green), #237a35); }
.pomodoro-btn .pomodoro-state-label { font-size: 13px; font-weight: 700; line-height: 1; }
.pomodoro-btn .pomodoro-timer { font-variant-numeric: tabular-nums; font-size: 15px; }

.pomodoro-panel {
  position: absolute; right: 0; bottom: calc(100% + 12px);
  width: 300px; max-width: calc(100vw - 40px);
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 18px; border: 1px solid var(--border);
}
.pomodoro-panel h4 { margin: 0 0 2px; font-size: 15px; font-weight: 800; color: var(--graphite); }
.pomodoro-panel .hint-text { margin: 0 0 12px; }
.pomodoro-close { position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--text-muted); font-size: 16px; cursor: pointer; line-height: 1; }
.pomodoro-clock { font-size: 40px; font-weight: 800; text-align: center; color: var(--graphite); font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.pomodoro-phase-label { text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--orange); margin-bottom: 10px; }
.pomodoro-phase-label.is-break { color: var(--green); }
.pomodoro-linked { text-align: center; font-size: 12.5px; color: var(--text-muted); margin-bottom: 12px; word-break: break-word; }
.pomodoro-actions-row { display: flex; gap: 8px; margin-top: 4px; }
.pomodoro-actions-row .btn { flex: 1; }
.pomodoro-field { margin-bottom: 10px; }
.pomodoro-field label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); margin-bottom: 4px; }
.pomodoro-field select, .pomodoro-field input { width: 100%; }

.pomodoro-quickstart { background: none; border: 1px solid transparent; cursor: pointer; font-size: 14px; padding: 4px 7px; line-height: 1; border-radius: 6px; vertical-align: middle; }
.pomodoro-quickstart:hover { background: var(--orange-light); border-color: var(--orange); }

/* ---------- Seletor de ferramenta de IA (Projetos) ---------- */
.ai-tool-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-tool-option {
  display: flex; align-items: center; gap: 6px;
  background: #fff; border: 1.5px solid var(--border-strong); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--text);
  cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.ai-tool-option:hover { border-color: var(--orange); }
.ai-tool-option.selected { border-color: var(--orange); background: var(--orange-light); color: var(--orange-dark); }
.ai-tool-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* ---------- Relatório do projeto ---------- */
.progress-ring {
  width: 108px; height: 108px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--orange) calc(var(--pct) * 1%), #eceae6 0);
  display: flex; align-items: center; justify-content: center;
}
.progress-ring-inner {
  width: 80px; height: 80px; border-radius: 50%; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.progress-ring-value { font-size: 21px; font-weight: 800; color: var(--graphite); line-height: 1; }
.progress-ring-label { font-size: 9.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; margin-top: 3px; }

.print-only { display: none; }
.print-logo { height: 38px; width: auto; margin-bottom: 8px; }

/* ---------- Confirmação de voo: voucher estilo cartão de embarque ---------- */
.voucher-summary { border-left: 4px solid var(--orange); }

.voucher-flight {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  overflow: hidden;
}
.voucher-flight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: var(--graphite);
  color: #fff;
}
.voucher-flight-head .hint-text { color: rgba(255, 255, 255, .62); }
.voucher-airline { display: flex; align-items: center; gap: 12px; min-width: 0; }
.voucher-airline-name { font-size: 15px; font-weight: 800; letter-spacing: -.005em; color: #fff; }

.airline-logo-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}
.airline-logo { max-width: 78%; max-height: 78%; object-fit: contain; display: block; }
.airline-logo-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .02em;
}
.airline-logo-wrap.logo-fallback .airline-logo-fallback { display: flex; }

.voucher-route {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px 18px;
}
.voucher-route-endpoint { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.voucher-route-endpoint.align-right { align-items: flex-end; text-align: right; margin-left: auto; }
.voucher-route-code {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--graphite);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.voucher-route-airport { font-size: 12px; color: var(--text-muted); max-width: 180px; line-height: 1.35; }
.voucher-route-arrow {
  flex: 1;
  min-width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
}
.voucher-route-duration {
  font-size: 11px;
  font-weight: 700;
  color: var(--orange-dark);
  background: var(--orange-light);
  padding: 2px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.voucher-route-line {
  position: relative;
  width: 100%;
  height: 2px;
  background: repeating-linear-gradient(to right, var(--border-strong) 0 6px, transparent 6px 11px);
}
.voucher-route-line::before, .voucher-route-line::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  transform: translateY(-50%);
}
.voucher-route-line::before { left: -3px; }
.voucher-route-line::after { right: -3px; }

.voucher-divider { position: relative; height: 0; margin: 0 24px; border-top: 1.5px dashed var(--border-strong); }
.voucher-divider::before, .voucher-divider::after {
  content: "";
  position: absolute;
  top: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg);
}
.voucher-divider::before { left: -33px; }
.voucher-divider::after { right: -33px; }

.voucher-body { padding: 18px 24px 20px; }
.voucher-field-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 3px; }

@media print {
  .voucher-divider::before, .voucher-divider::after { background: #fff; }
}

@media (max-width: 720px) {
  .voucher-route { flex-wrap: wrap; }
  .voucher-route-code { font-size: 22px; }
  .voucher-route-airport { max-width: 130px; }
  .voucher-route-arrow { order: 3; width: 100%; flex: 0 0 100%; margin-top: 4px; }
}

@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; left: 0; top: 0; width: 100%; padding: 16px; }
  .print-only { display: block; }
  .btn, .topbar, .version-strip, .dept-rail, .side-panel, #pomodoro-fab, .modal-backdrop, .project-tabs, .print-hide { display: none !important; }
}

@media (max-width: 720px) {
  #pomodoro-fab { right: 12px; bottom: 64px; }
  .pomodoro-panel { width: calc(100vw - 24px); right: -8px; }
}

/* ---------- O Mago — pesquisa de preço com IA (Fase 1.87: redesenho visual) ----------
   Pedido da Vania: "ele deve ser mais dinamico... ele eh MAGO, entao deve ser um espaco que
   literalmentre faz magicas". Usa a mesma cor de identidade da IA já usada em .badge-ai (#3b4a9c)
   combinada com o laranja da marca, formando um degradê "violeta -> laranja" só nesta área — sem
   nenhum emoji (regra da Fase 1.57), os ícones abaixo são todos SVG monocromático via currentColor. */
:root {
  --mago-violet: #3b4a9c;
  --mago-violet-dark: #2b3778;
  --mago-violet-light: #eef1fb;
}

.mago-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 16px;
  color: #fff;
  background: linear-gradient(120deg, var(--mago-violet-dark) 0%, var(--mago-violet) 55%, var(--orange-dark) 130%);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.mago-hero::before {
  /* brilho sutil que atravessa o cabeçalho, dá a sensação de "algo em movimento" sem exagerar */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.16) 45%, transparent 60%);
  background-size: 220% 100%;
  animation: mago-shimmer 5s ease-in-out infinite;
  pointer-events: none;
}
.mago-hero h2 { margin: 0 0 4px; display: flex; align-items: center; gap: 10px; color: #fff; }
.mago-hero p { margin: 0; color: rgba(255,255,255,.85); max-width: 560px; }
.mago-hero .btn-primary { background: #fff; color: var(--mago-violet-dark); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.mago-hero .btn-primary:hover { background: #f3f2ff; }

.mago-spark-icon { flex-shrink: 0; }
.mago-spark-icon.spin { animation: mago-spin 2.6s linear infinite; }

@keyframes mago-shimmer { 0% { background-position: 140% 0; } 100% { background-position: -40% 0; } }
@keyframes mago-spin { from { transform: rotate(0deg) scale(1); } 50% { transform: rotate(180deg) scale(1.12); } to { transform: rotate(360deg) scale(1); } }
@keyframes mago-pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(59, 74, 156, .35); } 70% { box-shadow: 0 0 0 12px rgba(59, 74, 156, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 74, 156, 0); } }
@keyframes mago-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Estado de "conjurando" — troca o antigo texto estático "Buscando..." por uma barra animada
   e o ícone girando, pra sensação de algo realmente acontecendo (pedido: "mais dinamico"). */
.mago-loading { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--mago-violet-light); border: 1px solid #dce1f5; }
.mago-loading .mago-loading-text { font-weight: 600; color: var(--mago-violet-dark); }
.mago-loading .mago-loading-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.mago-loading-bar { position: relative; height: 4px; border-radius: 4px; background: #dce1f5; overflow: hidden; margin-top: 8px; }
.mago-loading-bar::after { content: ""; position: absolute; inset: 0; width: 40%; border-radius: 4px; background: linear-gradient(90deg, var(--mago-violet), var(--orange)); animation: mago-loading-slide 1.3s ease-in-out infinite; }
@keyframes mago-loading-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

/* Resultado da pesquisa — antes era uma linha de texto pequena; agora um cartão com o preço
   em destaque, pra resolver "a gente nao ve direito o retorno da pesquisa". */
.mago-result-card { border: 1px solid #dce1f5; border-left: 4px solid var(--mago-violet); border-radius: var(--radius); padding: 16px 18px; background: linear-gradient(180deg, var(--mago-violet-light) 0%, #fff 70%); }
.mago-result-price { font-size: 26px; font-weight: 800; color: var(--mago-violet-dark); line-height: 1.15; }
.mago-result-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mago-source-chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #dce1f5; border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; color: var(--mago-violet-dark); }

.mago-highlight { display: flex; align-items: flex-start; gap: 8px; background: var(--orange-light); color: var(--orange-dark); border-radius: var(--radius-sm); padding: 10px 12px; font-weight: 600; margin: 10px 0; }
.mago-highlight .mago-highlight-label { text-transform: uppercase; font-size: 10.5px; letter-spacing: .04em; font-weight: 800; display: block; margin-bottom: 2px; }

/* Chat com a IA — antes era texto corrido "Consultor: / IA:" enterrado embaixo de tabelas de preço;
   agora balões de conversa de verdade, com o card sempre visível logo no topo (lista e relatório).
   Resolve "nao tem aba pra conversar com a IA... esta td mto oculto". */
.mago-chat-panel { border: 1px solid #dce1f5; border-radius: var(--radius); background: #fff; overflow: hidden; }
.mago-chat-panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--mago-violet-light); border-bottom: 1px solid #dce1f5; }
.mago-chat-panel-head h3 { margin: 0; font-size: 15px; }
.mago-chat-panel-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-muted); }
.mago-chat-log { max-height: 320px; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.mago-chat-empty { color: var(--text-muted); font-size: 13px; text-align: center; padding: 8px 0; }
.mago-bubble { max-width: 80%; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; }
.mago-bubble-label { display: block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 3px; opacity: .7; }
.mago-bubble-user { align-self: flex-end; background: var(--graphite); color: #fff; border-bottom-right-radius: 4px; }
.mago-bubble-mago { align-self: flex-start; background: var(--mago-violet-light); color: var(--mago-violet-dark); border-bottom-left-radius: 4px; }
.mago-chat-thinking { align-self: flex-start; display: flex; gap: 4px; padding: 10px 13px; }
.mago-chat-thinking span { width: 6px; height: 6px; border-radius: 50%; background: var(--mago-violet); animation: mago-dot 1.2s infinite ease-in-out; }
.mago-chat-thinking span:nth-child(2) { animation-delay: .15s; }
.mago-chat-thinking span:nth-child(3) { animation-delay: .3s; }
.mago-chat-input-row { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.mago-chat-input-row input { flex: 1; }

@media (max-width: 720px) {
  .mago-hero { padding: 18px; }
  .mago-bubble { max-width: 92%; }
}

/* ---------------- CRM: Pipeline e tela do negócio (Fase 1.97) ---------------- */
.crm-stage-strip { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.crm-stage-chip { text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; font: inherit; color: var(--text); box-shadow: var(--shadow-xs); transition: border-color .15s ease, box-shadow .15s ease; }
.crm-stage-chip:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.crm-stage-chip.active { border-color: var(--orange); box-shadow: var(--focus-ring); }
.crm-stage-name { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.crm-stage-n { display: block; font-size: 22px; font-weight: 800; color: var(--graphite); line-height: 1.2; margin-top: 2px; }
.crm-stage-val { display: block; font-size: 12px; color: var(--orange-dark); font-weight: 600; }
.crm-alert { background: var(--red-light); color: #a61e1e; border: 1px solid #f3c2c2; border-radius: var(--radius); padding: 10px 14px; font-size: 13px; margin-bottom: 14px; line-height: 1.5; }
.crm-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.crm-search { flex: 0 1 320px; min-width: 200px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px 10px; font: inherit; font-size: 13px; background: var(--card); color: var(--text); }
.crm-table td { vertical-align: top; }
.table-scroll { overflow-x: auto; }
.crm-actionbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px 12px; margin-bottom: 14px; box-shadow: var(--shadow-xs); }
.crm-actionbar .spacer { flex: 1; }
.crm-stage-select { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 7px 10px; font: inherit; font-size: 13px; background: var(--card); color: var(--text); }
.crm-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.crm-main .card, .crm-side .card { margin-bottom: 16px; }
.crm-kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.crm-kv:last-child { border-bottom: 0; }
.crm-kv > span { color: var(--text-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding-top: 1px; }
.crm-request { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13.5px; }
.crm-quote-row { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.crm-quote-row:last-child { border-bottom: 0; }
.crm-conv summary { cursor: pointer; font-size: 13.5px; color: var(--graphite); font-weight: 600; }
.crm-conv summary:hover { color: var(--orange-dark); }
.crm-conv-text { margin-top: 8px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; max-height: 420px; overflow-y: auto; }
.pipeline-col-total { display: block; font-size: 11px; color: var(--orange-dark); text-transform: none; letter-spacing: 0; margin-top: 2px; }
.deal-card-title { font-weight: 700; color: var(--graphite); line-height: 1.35; margin-bottom: 2px; }
.deal-card-meta { display: flex; justify-content: space-between; gap: 6px; margin-top: 6px; font-size: 11.5px; color: var(--text-muted); }
.deal-card-next { margin-top: 6px; font-size: 12px; color: var(--graphite-light); background: var(--surface-alt); border-radius: 6px; padding: 4px 6px; }
.deal-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.deal-card-tags .badge { font-size: 10.5px; }
.deal-card-pend { border-left: 3px solid var(--red); }
@media (max-width: 1100px) { .crm-stage-strip { grid-template-columns: repeat(3, 1fr); } .crm-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .crm-stage-strip { grid-template-columns: repeat(2, 1fr); } .crm-kv { grid-template-columns: 1fr; gap: 2px; } }
.badge.crm-pend { text-transform: none; letter-spacing: 0; font-weight: 600; margin: 0 4px 4px 0; line-height: 1.35; white-space: normal; }
.crm-request, .crm-conv-text { white-space: pre-wrap; }
.crm-main .timeline-item .timeline-content { font-size: 13.5px; line-height: 1.55; }

/* Fase 1.98 — Minha Viagem do passageiro (card na reserva) */
.trip-card { border-left: 4px solid var(--orange); }
.trip-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.trip-chip { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #f1efec; color: var(--text-muted, #6f6f78); }
.trip-chip.ok { background: var(--orange-light); color: var(--orange-dark); }
.trip-link-row { display: flex; gap: 8px; margin-top: 12px; }
.trip-link-row input { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-muted, #6f6f78); }
.trip-send { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.trip-switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12.5px; }
.trip-switch input { width: 16px; height: 16px; accent-color: var(--orange); }

/* 05/10 — CRM: segmento (Corporativo/Lazer) e responsável bem visíveis */
.seg-badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 6px; line-height: 1.4; white-space: nowrap; }
.seg-badge.seg-corporativo { background: var(--graphite); color: #fff; }
.seg-badge.seg-lazer { background: var(--orange); color: #fff; }
.seg-badge.seg-none { background: #fde2e1; color: var(--red, #c0392b); }
.owner-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--graphite); background: #f1efec; border-radius: 999px; padding: 2px 10px 2px 2px; white-space: nowrap; }
.owner-chip .owner-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--graphite-light); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.owner-chip.owner-none { padding: 2px 10px; color: var(--red, #c0392b); background: #fde2e1; }
.deal-card-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.crm-filterbar { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 12px; }
.crm-filtergroup { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.crm-filterlabel { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted, #6f6f78); margin-right: 2px; }
.crm-fbtn { border: 1.5px solid var(--border, #e3e1dd); background: #fff; color: var(--graphite); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.crm-fbtn:hover { border-color: var(--graphite-light); }
.crm-fbtn.active { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.crm-fbtn.seg-lazer.active { background: var(--orange); border-color: var(--orange); }
.crm-fbtn-n { font-size: 11px; font-weight: 700; opacity: .7; }
.seg-toggle { display: flex; gap: 8px; }
.seg-opt { flex: 1; border: 2px solid var(--border, #e3e1dd); background: #fff; border-radius: 10px; padding: 10px; font-size: 14px; font-weight: 800; cursor: pointer; color: var(--graphite); }
.seg-opt.seg-corporativo.active { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.seg-opt.seg-lazer.active { background: var(--orange); border-color: var(--orange); color: #fff; }

/* 05/10 (2) — cartões do pipeline mais claros para a equipe */
.owner-chip { --oc: var(--graphite-light); background: color-mix(in srgb, var(--oc) 12%, #fff); color: var(--oc); }
.owner-chip .owner-dot { background: var(--oc); }
.owner-chip.owner-big { font-size: 13.5px; padding: 3px 12px 3px 3px; }
.owner-chip.owner-big .owner-dot { width: 24px; height: 24px; font-size: 12px; }
.crm-fbtn-owner .owner-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--oc); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.crm-fbtn-owner.active { background: var(--oc); border-color: var(--oc); }
.crm-fbtn-owner.active .owner-dot { background: #fff; color: var(--oc); }
.board-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 0 12px; font-size: 12.5px; color: var(--text-muted, #6f6f78); }

.pipeline-col h4 { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.pipeline-col-n { background: var(--graphite); color: #fff; border-radius: 999px; font-size: 12px; min-width: 24px; text-align: center; padding: 1px 8px; }
.pipeline-col-hint { font-size: 11.5px; color: var(--text-muted, #6f6f78); margin: -2px 0 10px; line-height: 1.4; min-height: 32px; }
.pipeline-col-hint strong { color: var(--orange-dark); white-space: nowrap; }
.pipeline-col-empty { border: 2px dashed var(--border, #e3e1dd); border-radius: 10px; padding: 18px 8px; text-align: center; font-size: 12px; color: var(--text-muted, #6f6f78); }
.pipeline-col-ganho .pipeline-col-n { background: var(--green, #1f8a4c); }
.pipeline-col-perdido .pipeline-col-n { background: #9a9aa3; }

.deal-card { padding: 0 !important; overflow: hidden; border-left: 6px solid var(--oc, var(--border)) !important; }
.deal-card-band { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fff; padding: 5px 10px; }
.deal-card-seg-corporativo .deal-card-band { background: var(--graphite); }
.deal-card-seg-lazer .deal-card-band { background: var(--orange); }
.deal-card-seg-none .deal-card-band { background: #fde2e1; color: var(--red, #c0392b); }
.deal-card-inner { padding: 10px 11px 10px; }
.deal-card-owner { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 14px; color: var(--oc); margin-bottom: 6px; }
.deal-card-owner .owner-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--oc); color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.owner-none-text { color: var(--red, #c0392b); background: #fde2e1; padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.deal-card-row { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-top: 6px; }
.deal-card-row .val { margin-top: 0 !important; }
.deal-card-idle { font-size: 11.5px; color: var(--text-muted, #6f6f78); white-space: nowrap; }
.deal-card-idle.stale { color: var(--red, #c0392b); font-weight: 800; }
.deal-card-todo { margin-top: 8px; font-size: 12.5px; line-height: 1.35; color: var(--graphite); background: #f4f3f1; border-radius: 8px; padding: 6px 8px; }
.deal-card-todo-k { display: block; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted, #6f6f78); margin-bottom: 1px; }
.deal-card-todo.today { background: #fff4e5; } .deal-card-todo.today .deal-card-todo-k { color: var(--orange-dark); }
.deal-card-todo.late { background: #fde2e1; } .deal-card-todo.late .deal-card-todo-k { color: var(--red, #c0392b); }
.deal-card-todo.missing { background: #fff; border: 1.5px dashed #f0b4ae; color: var(--red, #c0392b); }
.deal-card-checks { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 8px; font-size: 11.5px; font-weight: 700; }
.deal-card-checks .ok { color: var(--green, #1f8a4c); } .deal-card-checks .no { color: var(--red, #c0392b); }
.deal-card-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--border, #eceae6); }
.dca { border: 1px solid var(--border, #e3e1dd); background: #fff; color: var(--graphite); border-radius: 7px; padding: 4px 8px; font-size: 11.5px; font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.3; }
.dca:hover { border-color: var(--graphite-light); background: #f7f6f4; }
.dca-next { background: var(--graphite); color: #fff; border-color: var(--graphite); margin-left: auto; }
.dca-next:hover { background: var(--graphite-light); color: #fff; }
.deal-card-late { box-shadow: 0 0 0 2px #f6c4bf; }
.deal-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.deal-card-actions .dca { text-align: center; }
.deal-card-actions .dca-next { grid-column: 1 / -1; margin-left: 0; }
.deal-card-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.deal-card-actions .dca { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 5px 4px; }
.deal-card-actions .dca { font-size: 10.5px; padding: 5px 2px; letter-spacing: -.01em; text-overflow: clip; }

/* Fase 2.02: pesquisa em todas as listas */
.qs-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.qs-input { width: 100%; max-width: 360px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius, 8px); font: inherit; font-size: 13.5px; background: var(--surface, #fff); }
.qs-input:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: var(--orange); }
.qs-count { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.qs-empty { margin: 0 0 10px; }
.qs-select-filter { margin: 0 0 4px; }
.qs-input-sm { max-width: none; padding: 6px 10px; font-size: 12.5px; }

/* ---------- CRM quadro: cartão enxuto (08/11) ----------
   Só o essencial no quadro; o detalhe completo fica na tela do negócio. */
.deal-card .deal-card-band { height: 4px; padding: 0; font-size: 0; }
.deal-card .deal-card-inner { padding: 8px 10px 9px; }
.deal-card .dc-head { display: flex; align-items: flex-start; gap: 7px; }
.deal-card .dc-head .owner-dot { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; background: var(--oc); color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.deal-card .dc-head .owner-dot.none { background: #c9c7c2; }
.deal-card .dc-title { font-weight: 700; font-size: 13px; color: var(--graphite); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deal-card .dc-client { font-size: 11.5px; color: var(--text-muted); margin: 3px 0 0 29px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-card .dc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-top: 6px; }
.deal-card .dc-val { color: var(--orange-dark); font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.deal-card .dc-idle { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.deal-card .dc-idle.stale { color: var(--red); font-weight: 800; }
.deal-card .dc-next { margin-top: 6px; font-size: 11.5px; line-height: 1.3; color: var(--graphite-light); background: #f4f3f1; border-radius: 6px; padding: 4px 7px; overflow: hidden; }
.deal-card .dc-next strong { display: block; font-size: 10.5px; }
.deal-card .dc-next .dc-next-t { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-card .dc-next strong { font-weight: 800; }
.deal-card .dc-next.today { background: #fff4e5; } .deal-card .dc-next.today strong { color: var(--orange-dark); }
.deal-card .dc-next.late { background: #fde2e1; } .deal-card .dc-next.late strong { color: var(--red); }
.deal-card .dc-next.missing { background: #fff; border: 1px dashed #f0b4ae; color: var(--red); font-weight: 700; }
.deal-card .dc-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.deal-card .dc-chip { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 10px; line-height: 1.5; }
.deal-card .dc-chip.ok { background: #e6f7e9; color: var(--green); }
.deal-card .dc-chip.no { background: #fdeaea; color: var(--red); }

/* Faturamento: gerar fatura e boleto (09/11) */
.nf-passo { margin-top:0; display:flex; align-items:center; gap:8px; }
.nf-passo span { display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; border-radius:50%; background:var(--orange); color:#fff; font-size:13px; font-weight:800; }
.nf-mais { margin-top:12px; }
.nf-mais summary { cursor:pointer; color:var(--text-muted); font-size:13px; font-weight:600; }
.nf-rodape { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; position:sticky; bottom:12px; z-index:5; box-shadow:0 6px 24px rgba(0,0,0,.08); }
.nf-total { font-size:22px; font-weight:800; color:var(--graphite); }
.nf-botoes { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.bol-alerta { background:var(--orange-light); color:var(--orange-dark); border-radius:10px; padding:10px 12px; margin-bottom:10px; font-size:13px; }
.bol-ok { display:flex; justify-content:space-between; align-items:center; gap:10px; border:1px solid var(--border); border-radius:10px; padding:10px 12px; background:var(--green-light); }
.bol-ok-t { font-weight:700; color:var(--graphite); }
.bol-form { border:1px solid var(--border); border-radius:10px; padding:12px; margin-top:10px; }
.bol-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:0 12px; }
.bol-span2 { grid-column:span 2; }
@media (max-width:720px) { .bol-grid { grid-template-columns:1fr 1fr; } }
.bol-item { border:1px solid var(--border); border-radius:10px; padding:12px; margin-bottom:10px; }
.bol-item-ativo { border-color:var(--green); background:var(--green-light); }
.bol-emitir-linha { display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; margin-top:12px; }
.fat-etapas { display:grid; grid-template-columns:repeat(auto-fit, minmax(190px, 1fr)); gap:10px; padding:14px; }
.fat-etapa { display:flex; gap:10px; padding:10px; border-radius:10px; border:1px solid var(--border); }
.fat-etapa-n { flex:none; width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:13px; background:#eeedeb; color:var(--text-muted); }
.fat-etapa.feito .fat-etapa-n { background:var(--green); color:#fff; }
.fat-etapa.agora { border-color:var(--orange); background:var(--orange-light); }
.fat-etapa.agora .fat-etapa-n { background:var(--orange); color:#fff; }
.fat-etapa.depois { opacity:.6; }
.fat-etapa-t { font-weight:700; color:var(--graphite); }
.fat-etapa-s { font-size:12px; color:var(--text-muted); margin-top:2px; }
.fat-etapa-a { margin-top:8px; }
.fat-aviso-ok { background:var(--green-light); color:var(--green); border-radius:10px; padding:10px 14px; margin-bottom:12px; font-weight:600; }
.fat-aviso-erro { background:var(--red-light); color:var(--red); border-radius:10px; padding:10px 14px; margin-bottom:12px; font-weight:600; }
.fat-destaque { box-shadow:0 0 0 3px var(--orange); transition:box-shadow .3s; }
@media (min-width:900px) { .nf-rodape { padding-right:150px; } }
.nf-botoes .btn:disabled, .bol-emitir .btn:disabled { opacity:.45; cursor:not-allowed; box-shadow:none; }
