:root {
  --bg: #0f1113;
  --panel: #17191c;
  --panel-soft: #22262a;
  --ink: #f7f4ee;
  --muted: #a9b3b7;
  --line: #343a40;
  --green: #77a968;
  --blue: #00a8b8;
  --orange: #f47c21;
  --red: #ef4e3f;
  --purple: #8e75c9;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  font-family: Aptos, "Aptos Display", Calibri, "Segoe UI", Arial, Helvetica, sans-serif;
  background: #0f1113;
}

body.is-locked {
  overflow: hidden;
}

body.is-locked .app-shell {
  display: none;
}

body.is-authenticated .login-screen {
  display: none;
}

button,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-screen {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 0, rgba(244, 124, 33, 0.14), transparent 34%),
    #0f1113;
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  background: #17191c;
  box-shadow: var(--shadow);
}

.login-brand {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.login-brand span,
.login-card label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.login-brand strong {
  display: block;
  margin-top: 4px;
  font-size: 1.45rem;
  line-height: 1.05;
}

.login-card label {
  display: grid;
  gap: 8px;
}

.login-error {
  min-height: 20px;
  margin: -4px 0 0;
  color: #ffb4aa;
  font-size: 0.88rem;
  font-weight: 800;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100svh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid #25292d;
  padding: 22px;
  background: #111316;
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 86px;
}

.brand-mark {
  width: 92px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  color: #fff;
  background: #000;
  font-size: 1rem;
  font-weight: 900;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 1.15rem;
}

.brand span,
.field-label,
.client-card p,
.panel-head p,
.hero-copy,
.hero-score span,
.hero-score small,
.save-status {
  color: var(--muted);
}

.field-label {
  margin-bottom: -10px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
}

select {
  min-height: 44px;
  padding: 0 12px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--panel);
  font: inherit;
  font-weight: 800;
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input {
  padding-right: 58px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 44px;
  height: 36px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 124, 33, 0.5);
  border-radius: 8px;
  color: #101214;
  background: var(--orange);
  font-size: 0.76rem;
  font-weight: 900;
}

.password-toggle:hover,
.password-toggle.is-visible {
  color: #101214;
  background: #ffb12e;
}

.new-client-button {
  min-height: 42px;
  border: 1px solid rgba(244, 124, 33, 0.55);
  border-radius: 8px;
  color: var(--orange);
  background: rgba(244, 124, 33, 0.09);
  font-weight: 900;
}

.sidebar-action-button {
  min-height: 38px;
  border: 1px solid rgba(244, 124, 33, 0.78);
  border-radius: 8px;
  color: #101214;
  background: var(--orange);
  font-weight: 900;
}

.sidebar-action-button:hover {
  border-color: #ffb12e;
  color: #101214;
  background: #ffb12e;
}

.logout-button {
  min-height: 38px;
  margin-top: -10px;
}

.user-badge {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #151719;
}

.user-badge:empty {
  display: none;
}

.user-badge span {
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.user-badge strong {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
  font-size: 0.92rem;
  white-space: nowrap;
}

.client-card {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #191c20;
}

.thermometer {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  margin-top: 2px;
}

.thermometer-track {
  position: relative;
  height: 14px;
  overflow: hidden;
  border: 1px solid #3f454b;
  border-radius: 999px;
  background: #30353a;
}

.thermometer-track::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.28);
}

.thermometer-track i {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: var(--thermo-width, 0%);
  border-radius: inherit;
  background: #f7f4ee;
}

.thermometer-meta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.thermometer-meta strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.thermometer-meta span:last-child {
  text-align: right;
}

.client-card p,
.client-card strong {
  display: block;
  margin: 0;
}

.client-card strong {
  margin-top: 4px;
  font-size: 1.08rem;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--status-color, var(--blue));
}

.tabs {
  display: grid;
  gap: 8px;
}

.tab {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  text-align: left;
}

.tab.active {
  color: #fff;
  background: var(--orange);
}

.workspace {
  min-width: 0;
  padding: 22px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 20px;
  align-items: stretch;
  min-height: 178px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: #17191c;
  box-shadow: var(--shadow);
}

.hero-side {
  display: grid;
  gap: 12px;
}

.client-logo-box {
  min-height: 88px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #101214;
}

.client-logo-box img {
  max-width: 100%;
  max-height: 78px;
  object-fit: contain;
}

.client-logo-box strong {
  color: var(--orange);
  font-size: 2.1rem;
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 860px;
  margin-bottom: 12px;
  font-size: 1.02rem;
  line-height: 1.48;
}

.level-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(244, 124, 33, 0.48);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--orange);
  background: rgba(244, 124, 33, 0.1);
  font-size: 0.8rem;
  font-weight: 900;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.edit-client-button {
  min-height: 30px;
  border: 1px solid rgba(244, 124, 33, 0.78);
  border-radius: 999px;
  padding: 0 12px;
  color: #101214;
  background: var(--orange);
  font-size: 0.78rem;
  font-weight: 900;
}

.edit-client-button:hover {
  background: #ffb12e;
}

.hero-score {
  display: grid;
  align-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 18px;
  background: #22262a;
}

.hero-score strong {
  display: block;
  font-size: 3.1rem;
  line-height: 0.95;
}

.hero-score span,
.hero-score small {
  font-weight: 800;
}

.view {
  display: none;
  margin-top: 18px;
}

.view.active {
  display: block;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.kpi,
.panel,
.mini-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.kpi {
  min-height: 188px;
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--status-color);
}

.kpi p {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.kpi strong {
  display: block;
  margin-bottom: 10px;
  font-size: 2.1rem;
  line-height: 1;
}

.kpi-meta {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.kpi .kpi-note {
  margin: 0;
  color: #d5dadd;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.32;
  text-transform: none;
}

.monthly-panel {
  margin-top: 18px;
}

.monthly-history {
  display: grid;
  gap: 20px;
  padding: 20px;
}

.history-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.history-summary article {
  min-height: 108px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #151719;
}

.history-summary span,
.history-summary small,
.history-month span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.history-summary span,
.history-month span {
  text-transform: uppercase;
}

.history-summary strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 1.55rem;
  line-height: 1;
}

.history-bars {
  min-height: 190px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 16px 14px;
  background:
    linear-gradient(180deg, transparent 0 24%, rgba(255, 255, 255, 0.04) 24% 25%, transparent 25% 49%, rgba(255, 255, 255, 0.04) 49% 50%, transparent 50% 74%, rgba(255, 255, 255, 0.04) 74% 75%, transparent 75%),
    #151719;
}

.history-month {
  display: grid;
  gap: 8px;
  align-items: end;
  min-width: 0;
  text-align: center;
}

.history-stack {
  height: 128px;
  display: flex;
  gap: 5px;
  align-items: end;
  justify-content: center;
}

.history-stack i {
  width: 12px;
  min-height: 8px;
  border-radius: 999px 999px 3px 3px;
}

.sales-bar,
.sales-dot {
  background: #f7f4ee;
}

.revenue-bar,
.revenue-dot {
  background: var(--orange);
}

.investment-bar,
.investment-dot {
  background: #7d8589;
}

.history-month strong {
  font-size: 0.9rem;
  text-transform: uppercase;
}

.history-month span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.history-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.history-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid color-mix(in srgb, var(--status-color) 72%, #ffffff);
  border-radius: 999px;
  padding: 0 10px;
  color: #fff;
  background: var(--status-color);
  font-size: 0.78rem;
  font-weight: 900;
}

.grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 78px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
  background: #1b1e22;
}

.panel-head h2 {
  margin-bottom: 5px;
  font-size: 1.25rem;
}

.panel-head p {
  margin-bottom: 0;
  line-height: 1.35;
}

.journey-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 10px;
  padding: 20px;
}

.step-chip {
  position: relative;
  min-height: 112px;
  border: 1px solid var(--line);
  padding: 14px 12px;
  background: #151719;
}

.step-chip.status-red,
.step-card.status-red {
  border-color: rgba(239, 78, 63, 0.85);
  background:
    linear-gradient(180deg, rgba(239, 78, 63, 0.16), rgba(21, 23, 25, 0.96)),
    #151719;
  box-shadow: 0 0 0 1px rgba(239, 78, 63, 0.26), 0 0 28px rgba(239, 78, 63, 0.12);
}

.step-chip.status-red::after,
.step-card.status-red::after {
  content: "URGENTE";
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  padding: 4px 8px;
  color: #fff;
  background: var(--red);
  font-size: 0.64rem;
  font-weight: 900;
}

.step-chip strong,
.step-card strong {
  display: block;
  margin-bottom: 8px;
}

.step-chip span,
.step-card span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #30353a;
}

.progress > i {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: 999px;
  background: #f7f4ee;
}

.journey-grid {
  display: block;
  padding: 20px;
}

.customer-path {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111316;
}

.customer-path::before {
  content: "";
  position: absolute;
  left: 48px;
  right: 48px;
  top: 54px;
  height: 4px;
  border-radius: 999px;
  background: #cfd4d6;
  opacity: 0.36;
}

.path-step {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 128px;
  text-align: center;
}

.path-node {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 3px solid var(--status-color);
  border-radius: 50%;
  color: var(--ink);
  background: #111316;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.26);
  font-size: 1.05rem;
  font-weight: 900;
}

.path-step strong {
  display: block;
  font-size: 0.98rem;
}

.path-step span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.critical-caption {
  grid-column: 1 / -1;
  border-left: 6px solid var(--red);
  border-radius: 8px;
  padding: 14px 16px;
  color: #fff;
  background: rgba(239, 78, 63, 0.12);
}

.critical-caption strong {
  color: var(--red);
}

.journey-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.step-card {
  position: relative;
  min-height: 238px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #151719;
}

.step-card h3 {
  margin-bottom: 8px;
  font-size: 1.18rem;
}

.step-card p {
  color: #d4d9db;
  line-height: 1.42;
}

.step-card .progress {
  margin: 14px 0;
}

.status-red.pulse-alert,
.urgent-focus.pulse-alert {
  animation: alertPulse 1.25s infinite;
}

.diagnosis-card,
.source-list,
.insight-list,
.funnel,
.projection,
.goal-list,
.checklist,
.ai-report,
.action-plan {
  padding: 20px;
}

.diagnosis-card h3 {
  margin-bottom: 10px;
  font-size: 1.65rem;
}

.diagnosis-card p,
.ai-report p,
.action-plan p {
  color: #d4d9db;
  line-height: 1.48;
}

.source-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(170px, 2fr) 74px;
  gap: 14px;
  align-items: center;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
}

.source-name {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.source-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #384047;
  border-radius: 50%;
  color: #fff;
  background: #101214;
  font-size: 0.78rem;
  font-weight: 900;
}

.source-icon svg {
  width: 22px;
  height: 22px;
}

.source-icon.provider-google {
  background: #151719;
}

.source-icon.provider-meta,
.source-icon.provider-linkedin {
  background: rgba(10, 102, 194, 0.12);
}

.source-icon.provider-instagram {
  background: rgba(255, 106, 61, 0.12);
}

.source-icon.provider-whatsapp {
  background: rgba(35, 195, 99, 0.12);
}

.source-icon.provider-indicacao {
  background: rgba(143, 209, 125, 0.12);
}

.source-icon.provider-lista {
  background: rgba(239, 78, 63, 0.12);
}

.source-row:last-child,
.goal-row:last-child,
.check-row:last-child {
  border-bottom: 0;
}

.source-row strong,
.goal-row strong {
  display: block;
}

.source-row span,
.goal-row span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.source-count {
  font-weight: 900;
  text-align: right;
}

.mini-card {
  min-height: 96px;
  margin-bottom: 12px;
  border-left: 5px solid var(--status-color);
  padding: 15px;
}

.mini-card h3 {
  margin-bottom: 8px;
  color: var(--status-color);
  font-size: 1rem;
}

.mini-card p {
  margin-bottom: 0;
  color: #d4d9db;
  line-height: 1.42;
}

.funnel-alert {
  margin-bottom: 18px;
}

.funnel-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 22px;
  align-items: center;
}

.hourglass-shell {
  position: relative;
  width: min(560px, 100%);
  min-height: 560px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 30px 12px 18px;
}

.hourglass-glass {
  position: absolute;
  inset: 18px 44px 72px;
  border-top: 2px solid rgba(247, 244, 238, 0.22);
  border-bottom: 2px solid rgba(247, 244, 238, 0.22);
  border-radius: 48%;
  background: radial-gradient(ellipse at center, rgba(247, 244, 238, 0.06), transparent 58%);
  pointer-events: none;
}

.sand-stream {
  position: absolute;
  left: 50%;
  top: 246px;
  z-index: 4;
  width: 4px;
  height: 82px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 218, 124, 0), rgba(255, 214, 109, 0.82) 22%, rgba(255, 159, 28, 0.5) 76%, rgba(255, 159, 28, 0));
  opacity: 0.72;
  animation: sandFall 1.6s linear infinite;
}

.sand-stream::before,
.sand-stream::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 34px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 187, 66, 0.78), rgba(255, 187, 66, 0.12) 58%, transparent 70%);
}

.sand-stream::before {
  top: -10px;
}

.sand-stream::after {
  bottom: -8px;
}

.hourglass {
  position: relative;
  z-index: 2;
  width: min(520px, 100%);
  display: grid;
  gap: 9px;
  justify-items: center;
  padding: 10px 0;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.22));
}

.hourglass-segment {
  width: var(--segment-width, 70%);
  min-height: 58px;
  display: grid;
  place-items: center;
  position: relative;
  margin-top: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 9px 22px;
  color: #fff;
  background: var(--status-color);
  box-shadow: inset 0 -8px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  text-align: center;
  transition: transform 180ms ease, filter 180ms ease;
}

.hourglass-segment:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.hourglass-funil + .hourglass-ampulheta {
  margin-top: 20px;
}

.hourglass-ampulheta {
  border-radius: 16px;
}

.hourglass-segment strong,
.hourglass-segment span {
  display: block;
}

.hourglass-segment strong {
  font-size: 1rem;
  line-height: 1.15;
}

.hourglass-segment span {
  margin-top: 5px;
  font-size: 0.78rem;
  font-weight: 900;
  opacity: 0.92;
}

.hourglass-loop {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.hourglass-loop span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(244, 124, 33, 0.6);
  border-radius: 999px;
  padding: 0 11px;
  color: #fff;
  background: var(--orange);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.funnel-details {
  display: grid;
  gap: 10px;
}

.funnel-detail {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 1.4fr) 90px;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--status-color);
  border-radius: 8px;
  padding: 12px;
  background: #151719;
}

.funnel-detail strong,
.funnel-detail span {
  display: block;
}

.funnel-detail span,
.funnel-copy {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
}

.funnel-number {
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 900;
  text-align: right;
}

.projection-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.projection-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #151719;
}

.projection-tile span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.projection-tile strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.priority-focus {
  min-height: 190px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-left: 7px solid var(--status-color);
  border-radius: 8px;
  padding: 18px;
  background: #151719;
}

.current-task {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  border: 1px solid var(--status-color, rgba(244, 124, 33, 0.55));
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--status-color, var(--orange)) 18%, transparent), transparent 48%),
    #151719;
}

.current-task.urgent-focus {
  border-width: 2px;
  box-shadow: 0 0 0 1px rgba(239, 78, 63, 0.32), 0 0 34px rgba(239, 78, 63, 0.16);
}

.current-task span {
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.current-task strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.22;
}

.current-task p {
  margin-bottom: 4px;
  color: var(--muted);
  font-weight: 800;
}

.task-description {
  margin: 0 0 10px;
  color: #c7ced1;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
}

.priority-focus h3 {
  margin-bottom: 9px;
  color: var(--status-color);
  font-size: 1.45rem;
}

.priority-focus p {
  color: #d4d9db;
  line-height: 1.45;
}

.goal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 16px;
  align-items: center;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
}

.goal-signal {
  width: 24px;
  height: 24px;
  justify-self: end;
  border: 3px solid color-mix(in srgb, var(--status-color) 42%, #ffffff);
  border-radius: 50%;
  background: var(--status-color);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--status-color) 15%, transparent);
}

.priority-lane {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.stage-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.stage-filter {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  background: #151719;
  font-size: 0.82rem;
  font-weight: 900;
}

.stage-filter strong {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #2b3035;
  font-size: 0.72rem;
}

.stage-filter.active {
  border-color: var(--orange);
  color: #fff;
  background: rgba(244, 124, 33, 0.16);
}

.stage-filter.active strong {
  background: var(--orange);
}

.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.board-column {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #171a1e;
}

.drop-zone {
  min-height: 220px;
  border: 1px dashed transparent;
  border-radius: 8px;
  transition: border-color 160ms ease, background 160ms ease;
}

.drop-zone.drag-over {
  border-color: var(--orange);
  background: rgba(244, 124, 33, 0.08);
}

.board-column h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.task-card {
  position: relative;
  min-height: 116px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #151719;
  cursor: grab;
  user-select: none;
}

.task-card.dragging {
  opacity: 0.55;
  cursor: grabbing;
  transform: rotate(-1deg);
}

.task-card.status-red:not(.done) {
  border-color: rgba(239, 78, 63, 0.9);
  background:
    linear-gradient(135deg, rgba(239, 78, 63, 0.18), rgba(21, 23, 25, 0.98) 58%),
    #151719;
  box-shadow: 0 0 0 1px rgba(239, 78, 63, 0.22), 0 0 30px rgba(239, 78, 63, 0.13);
}

.task-card.status-red:not(.done)::before {
  content: "URGENTE";
  position: absolute;
  top: 12px;
  right: 32px;
  border-radius: 999px;
  padding: 4px 8px;
  color: #fff;
  background: var(--red);
  font-size: 0.64rem;
  font-weight: 900;
}

.task-card:not(.done)::after {
  content: "";
  position: absolute;
  inset: 12px 12px auto auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--status-color);
}

.task-card.done {
  border-left-color: #aeb9bd;
  color: #818b90;
  background: #24282c;
  opacity: 0.62;
}

.task-card strong {
  display: block;
  margin-bottom: 10px;
  line-height: 1.28;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.task-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--status-color) 72%, #ffffff);
  color: #fff;
  background: var(--status-color);
  font-size: 0.76rem;
  font-weight: 900;
}

.agenda-link {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--orange);
  border-radius: 999px;
  padding: 0 9px;
  color: #fff;
  background: var(--orange);
  font-size: 0.76rem;
  font-weight: 900;
  text-decoration: none;
}

.task-card.done .task-pill {
  color: #78858b;
  background: #e1e6e4;
}

.ai-report h3,
.action-plan h3 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.action-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  min-height: 72px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #151719;
}

.action-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--orange);
  font-weight: 900;
}

.panel-actions {
  display: flex;
  gap: 10px;
}

.add-action-button {
  min-height: 40px;
  border: 1px solid var(--orange);
  border-radius: 8px;
  padding: 0 14px;
  color: #fff;
  background: var(--orange);
  font-weight: 900;
}

.primary-button,
.plain-button {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 900;
}

.primary-button {
  border: 1px solid var(--orange);
  color: #fff;
  background: var(--orange);
}

.plain-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #151719;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
}

.modal-backdrop.open {
  display: grid;
}

.client-modal {
  width: min(760px, 100%);
  max-height: min(92svh, 900px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  color: var(--ink);
  background: #17191c;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.action-modal {
  width: min(680px, 100%);
}

.modal-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.modal-head h2 {
  margin-bottom: 6px;
}

.modal-head p {
  margin-bottom: 0;
  color: var(--muted);
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #111316;
  font-size: 1.4rem;
  font-weight: 900;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.client-modal label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.modal-hint {
  margin: 2px 0 14px;
  border: 1px solid rgba(244, 124, 33, 0.42);
  border-radius: 8px;
  padding: 12px 14px;
  color: #f7f4ee;
  background: rgba(244, 124, 33, 0.12);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.client-modal textarea {
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.logo-upload-field {
  grid-row: span 2;
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.field-title {
  display: block;
}

.logo-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.logo-upload-button {
  min-height: 112px;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 1px dashed rgba(244, 124, 33, 0.7);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: rgba(244, 124, 33, 0.08);
  cursor: pointer;
}

.logo-upload-button span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  color: #fff;
  background: var(--orange);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.logo-upload-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #101214;
}

.logo-upload-button strong {
  font-size: 0.82rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.client-manager-list,
.login-list,
.login-editor {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.manager-row,
.login-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #151719;
}

.manager-row {
  grid-template-columns: 64px minmax(0, 1fr) auto;
}

.manager-row.active {
  border-color: rgba(244, 124, 33, 0.7);
}

.empty-state {
  display: grid;
  gap: 6px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: #151719;
}

.empty-state strong {
  color: var(--ink);
}

.manager-logo {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  color: var(--orange);
  background: #101214;
  font-weight: 900;
}

.manager-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.manager-row strong,
.manager-row span,
.manager-row small,
.login-row strong,
.login-row span,
.login-row small {
  display: block;
}

.manager-row strong,
.login-row strong {
  margin-bottom: 4px;
}

.manager-row span,
.manager-row small,
.login-row span,
.login-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.manager-row small,
.login-row small {
  margin-top: 6px;
  color: #d5dadd;
}

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

.integration-list {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.integration-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #151719;
}

.integration-card h3 {
  margin-bottom: 0;
}

.integration-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.integration-status {
  justify-self: start;
  border: 1px solid rgba(244, 124, 33, 0.55);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--orange);
  background: rgba(244, 124, 33, 0.08);
  font-size: 0.76rem;
  font-weight: 900;
}

.integration-status.is-connected {
  border-color: rgba(143, 209, 125, 0.6);
  color: #d9f4d1;
  background: rgba(143, 209, 125, 0.12);
}

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

.danger-button {
  border-color: rgba(239, 78, 63, 0.58);
  color: #ffb4aa;
}

.login-editor label {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

textarea {
  min-height: 560px;
  border: 0;
  border-radius: 0;
  padding: 18px 20px;
  color: #f3eee7;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.48;
  resize: vertical;
}

.save-status {
  min-height: 40px;
  margin: 0;
  padding: 0 20px 18px;
  font-weight: 800;
}

.status-green {
  --status-color: var(--green);
}

.status-blue {
  --status-color: var(--blue);
}

.status-orange {
  --status-color: var(--orange);
}

.status-red {
  --status-color: var(--red);
}

.status-purple {
  --status-color: var(--purple);
}

@keyframes alertPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(213, 79, 67, 0);
  }

  45% {
    box-shadow: 0 0 0 7px rgba(213, 79, 67, 0.18);
  }
}

@keyframes sandFall {
  0% {
    transform: translate(-50%, -8px) scaleY(0.72);
    opacity: 0.45;
  }

  45% {
    transform: translate(-50%, 0) scaleY(1);
    opacity: 0.95;
  }

  100% {
    transform: translate(-50%, 12px) scaleY(0.78);
    opacity: 0.45;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .kpi-grid,
  .history-summary,
  .journey-cards,
  .journey-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-path {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .customer-path::before {
    display: none;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  .funnel-layout,
  .board,
  .priority-lane {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .workspace,
  .sidebar {
    padding: 12px;
  }

  .hero,
  .projection-hero,
  .source-row,
  .funnel-detail,
  .goal-row,
  .manager-row,
  .login-row {
    grid-template-columns: 1fr;
  }

  .login-actions {
    flex-wrap: wrap;
  }

  .hero {
    padding: 20px 16px;
  }

  .tabs,
  .kpi-grid,
  .history-summary,
  .history-bars,
  .journey-cards,
  .journey-strip,
  .customer-path,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .source-count,
  .funnel-number {
    text-align: left;
  }

  .panel-head {
    flex-direction: column;
  }
}

@media print {
  body {
    background: #fff;
  }

  .login-screen,
  .sidebar,
  .panel-actions,
  .edit-client-button,
  .add-action-button,
  .plain-button,
  .primary-button,
  .agenda-link,
  .modal-backdrop {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .workspace {
    padding: 0;
  }

  .hero,
  .panel,
  .kpi-card,
  .history-card {
    break-inside: avoid;
    border-color: #d6d6d6;
    color: #111;
    background: #fff;
  }

  .view {
    display: none !important;
  }

  #view-resumo {
    display: block !important;
  }
}
