:root {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #272b34;
  background: #f8f9fb;
  font-size: 14px;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  letter-spacing: -0.04em;
}
h2 {
  letter-spacing: -0.03em;
}
p {
  line-height: 1.55;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.16em;
  font-weight: 800;
  color: #ed6a13;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid #e2e5eb;
  background: white;
  color: #343a46;
  font-weight: 700;
  white-space: nowrap;
}
.button:hover {
  border-color: #fa913e;
  color: #e65e05;
}
.button.primary {
  border-color: #ef6a0d;
  background: #f56e10;
  color: #fff;
  box-shadow: 0 6px 15px #f56e1022;
}
.button.primary:hover {
  background: #dc5d08;
  color: white;
}
.button.subtle {
  background: transparent;
  border-color: transparent;
}
.button.danger {
  color: #b73426;
  border-color: #f5d5d1;
}
.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.layout {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #fff;
  border-right: 1px solid #eceef2;
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 10px 35px;
}
.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
}
.brand b {
  display: block;
  font-size: 15px;
}
.brand small {
  color: #89909a;
  font-size: 11px;
  font-weight: 700;
}
.sidebar nav {
  display: grid;
  gap: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 10px;
  color: #656d79;
  font-weight: 650;
}
.nav-item:hover,
.nav-item.active {
  color: #e9690b;
  background: #fff3e9;
}
.nav-icon {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid #eceef2;
  padding: 15px 10px 0;
  display: grid;
  gap: 8px;
}
.sidebar-foot span {
  font-size: 12px;
  color: #66707d;
  overflow: hidden;
  text-overflow: ellipsis;
}
.content-shell {
  min-width: 0;
}
.topbar {
  height: 88px;
  background: #fff;
  border-bottom: 1px solid #eceef2;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.topbar h1 {
  margin: 3px 0 0;
  font-size: 22px;
}
.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  color: #88919c;
  font-size: 12px;
}
.avatar {
  height: 35px;
  width: 35px;
  border-radius: 50%;
  background: #fff0e5;
  color: #e65d09;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.menu-toggle {
  display: none;
  border: 0;
  background: white;
  padding: 6px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #404854;
  margin: 4px;
}
.view {
  max-width: 1460px;
  margin: auto;
  padding: 30px 32px 70px;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.page-head h2 {
  font-size: 25px;
  margin: 6px 0;
}
.muted {
  color: #858e98;
}
.hero {
  background: linear-gradient(105deg, #fff6ef, #fff 62%);
  border: 1px solid #ffe3cd;
  padding: 26px 28px;
  border-radius: 17px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.hero h2 {
  font-size: 27px;
  margin: 7px 0;
}
.hero p {
  margin: 0;
  color: #6c7580;
}
.hero-mark {
  font-size: 54px;
  color: #f78123;
  font-weight: 900;
  letter-spacing: -0.1em;
}
.grid {
  display: grid;
  gap: 16px;
}
.kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
}
.card,
.kpi {
  background: #fff;
  border: 1px solid #e9ebee;
  border-radius: 15px;
  box-shadow: 0 5px 22px #202d3b06;
}
.kpi {
  padding: 19px;
}
.kpi small {
  display: block;
  color: #818b97;
  font-weight: 650;
  font-size: 11px;
  line-height: 1.3;
}
.kpi strong {
  font-size: 29px;
  display: block;
  margin: 9px 0 2px;
  letter-spacing: -0.04em;
}
.kpi em {
  font-style: normal;
  font-size: 11px;
  color: #8b949e;
}
.kpi.accent {
  background: #fff8f1;
  border-color: #ffdfc5;
}
.card {
  padding: 22px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.card-head h3 {
  margin: 0;
  font-size: 16px;
}
.split {
  grid-template-columns: 1.3fr 1fr;
}
.list {
  display: grid;
  gap: 9px;
}
.list-row,
.lead-row,
.appointment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid #edf0f3;
  background: #fff;
  border-radius: 11px;
  min-width: 0;
}
.list-row:hover,
.lead-row:hover,
.appointment-row:hover {
  border-color: #ffc694;
}
.list-row strong,
.lead-row strong {
  display: block;
  font-size: 13px;
}
.list-row small,
.lead-row small {
  display: block;
  color: #818b95;
  margin-top: 4px;
}
.status {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
  color: #766957;
  background: #f5f2e8;
}
.status.green {
  background: #e7f7ed;
  color: #22824c;
}
.status.orange {
  background: #fff0e3;
  color: #d86409;
}
.status.red {
  background: #fff0ee;
  color: #b84938;
}
.status.blue {
  background: #eaf1ff;
  color: #4168ad;
}
.empty {
  color: #8d969e;
  padding: 20px;
  text-align: center;
  border: 1px dashed #dce0e5;
  border-radius: 11px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.field,
select,
input,
textarea {
  border: 1px solid #dfe3e9;
  border-radius: 9px;
  background: #fff;
  color: #252b35;
  padding: 10px 12px;
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #f5741c;
  box-shadow: 0 0 0 3px #f5741c1c;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
.toolbar input {
  min-width: 250px;
  flex: 1;
}
.board {
  display: grid;
  grid-auto-columns: minmax(230px, 1fr);
  grid-auto-flow: column;
  overflow: auto;
  gap: 12px;
  padding-bottom: 15px;
}
.board-col {
  background: #f3f5f7;
  border-radius: 14px;
  padding: 12px;
  min-height: 230px;
}
.board-col-head {
  display: flex;
  justify-content: space-between;
  padding: 5px 3px 14px;
  font-weight: 800;
  font-size: 12px;
}
.board-col .lead-row {
  display: block;
  margin-bottom: 9px;
  cursor: pointer;
}
.lead-row .status {
  margin-top: 10px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.form-grid label,
.login-card label {
  display: grid;
  gap: 6px;
  color: #4d5661;
  font-weight: 700;
  font-size: 12px;
}
.form-grid label.full {
  grid-column: 1/-1;
}
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
}
.section {
  margin-bottom: 22px;
}
.table-wrap {
  overflow: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th,
.table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid #edf0f3;
  white-space: nowrap;
}
.table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #949da7;
}
.table tr:last-child td {
  border: 0;
}
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline li {
  border-left: 2px solid #ffbc80;
  padding: 0 0 17px 16px;
  position: relative;
}
.timeline li:before {
  content: "";
  position: absolute;
  left: -5px;
  top: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f6781c;
}
.timeline b {
  display: block;
  font-size: 12px;
}
.timeline small {
  display: block;
  color: #959da6;
  margin: 3px 0;
}
.timeline p {
  white-space: pre-wrap;
  color: #65707a;
  font-size: 12px;
  margin: 0;
}
.modal {
  border: 0;
  border-radius: 17px;
  padding: 0;
  width: min(660px, calc(100vw - 22px));
  max-height: 90vh;
  box-shadow: 0 25px 80px #14203533;
}
.modal.wide {
  width: min(880px, calc(100vw - 22px));
}
.modal::backdrop {
  background: #15202d85;
}
.modal-body {
  padding: 24px;
  overflow: auto;
  max-height: 88vh;
}
.modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.modal-head h2 {
  margin: 0;
}
.modal-close {
  border: 0;
  background: #f4f5f7;
  border-radius: 8px;
  font-size: 20px;
  width: 32px;
  height: 32px;
  line-height: 1;
}
.form-error {
  color: #ba3b32;
  min-height: 18px;
  margin: 5px 0;
}
.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: grid;
  gap: 8px;
}
.toast {
  background: #242b35;
  color: white;
  border-radius: 10px;
  padding: 12px 17px;
  box-shadow: 0 10px 25px #242b3540;
  max-width: 340px;
}
.toast.error {
  background: #b63b30;
}
.ticket-thread {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}
.ticket-message {
  padding: 13px;
  border: 1px solid #e6e9ee;
  border-radius: 11px;
  background: #f9fafb;
}
.ticket-message.mine {
  background: #fff5ea;
  border-color: #ffe0bf;
}
.ticket-message p {
  margin: 5px 0;
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 12% 18%, #ffe1c8 0, transparent 28%),
    linear-gradient(125deg, #fffaf5, #fff 48%, #f4f6f8);
}
.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 72px;
  width: min(1000px, 100%);
  align-items: center;
}
.login-logo {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 16px 36px #e9691740;
  display: block;
  margin-bottom: 28px;
}
.login-intro h1 {
  font-size: clamp(34px, 4vw, 51px);
  line-height: 1.06;
  margin: 15px 0 19px;
}
.login-intro p {
  font-size: 16px;
  color: #6c7480;
  max-width: 430px;
}
.login-card {
  background: white;
  border: 1px solid #e9ebef;
  border-top: 4px solid #f47716;
  border-radius: 18px;
  padding: 34px;
  box-shadow: 0 25px 70px #32404b18;
  display: grid;
  gap: 19px;
}
.login-card h2 {
  margin: 0;
  font-size: 23px;
}
.login-card p {
  color: #87909c;
  margin: 0;
}
.login-card input {
  width: 100%;
  min-height: 45px;
  margin-top: 5px;
}
.login-card button {
  width: 100%;
  min-height: 45px;
}
@media (max-width: 1050px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .split {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .login-page {
    padding: 20px;
  }
  .layout {
    display: block;
  }
  .sidebar {
    position: fixed;
    z-index: 25;
    transform: translateX(-100%);
    transition: transform 0.2s;
    width: 250px;
    box-shadow: 0 15px 30px #25304022;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .topbar {
    padding: 15px 18px;
    height: 72px;
  }
  .topbar h1 {
    font-size: 18px;
  }
  .topbar-actions #today {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .view {
    padding: 20px 14px 80px;
  }
  .hero {
    padding: 20px;
  }
  .hero h2 {
    font-size: 22px;
  }
  .hero-mark {
    display: none;
  }
  .board {
    grid-auto-columns: minmax(245px, 80vw);
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .login-shell {
    grid-template-columns: 1fr;
    gap: 25px;
    max-width: 460px;
    padding: 25px 0;
  }
  .login-logo {
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
  }
  .login-intro h1 {
    font-size: 31px;
  }
  .login-intro p {
    font-size: 14px;
  }
  .login-card {
    padding: 23px;
  }
}
.performance-chart {
  height: 180px;
  display: flex;
  align-items: end;
  gap: 4px;
  overflow: auto;
  padding: 10px 0;
}
.performance-bar {
  height: 100%;
  flex: 1;
  min-width: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  gap: 7px;
}
.performance-bar i {
  display: block;
  width: 100%;
  max-width: 26px;
  min-height: 4px;
  background: linear-gradient(180deg, #ff9741, #f16a11);
  border-radius: 6px 6px 2px 2px;
}
.performance-bar small {
  font-size: 9px;
  color: #8c95a0;
  white-space: nowrap;
}

/* Navegação: áreas de trabalho distintas, sem perder a identidade clara. */
.sidebar {
  background:
    radial-gradient(circle at 12% 0, #fff1e5 0, transparent 185px),
    #fbfcfe;
  border-right-color: #e7eaf0;
  box-shadow: 5px 0 22px #25344b06;
}
.brand {
  margin: 0 2px 23px;
  padding: 11px;
  border: 1px solid #ffdcc1;
  border-radius: 14px;
  background: linear-gradient(125deg, #fff4e9, #fffdfa);
  box-shadow: 0 7px 17px #e56f1510;
}
.brand img {
  width: 42px;
  height: 42px;
}
.brand b {
  font-size: 14px;
  color: #29313e;
}
.brand small {
  color: #b45b1d;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 9px;
}
.sidebar nav {
  gap: 3px;
}
.nav-group {
  margin: 17px 11px 7px;
  color: #99a2ae;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-item {
  min-height: 42px;
  gap: 10px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #5b6572;
  transition: background 0.16s, border-color 0.16s, box-shadow 0.16s;
}
.nav-icon-box {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 8px;
  background: #f1f3f7;
  color: #798493;
}
.nav-item:hover {
  background: #fff;
  border-color: #e8ebf0;
  color: #313b48;
}
.nav-item.active {
  background: #fff;
  border-color: #ffd9b7;
  color: #d85e0c;
  box-shadow: 0 5px 16px #dc742012;
  font-weight: 800;
}
.nav-item.active .nav-icon-box {
  background: #fff0e2;
  color: #ed6a13;
}
.sidebar-foot {
  border-top-color: #e4e8ee;
  margin-top: auto;
  padding: 17px 4px 0;
}
.sidebar-foot span {
  font-weight: 700;
  color: #343e4c;
}
.sidebar-foot .button {
  justify-content: flex-start;
  padding-left: 10px;
  background: #f2f4f7;
  border-color: #edf0f4;
  color: #66717f;
}

/* Filtros com lista própria para manter o mesmo visual em todos os navegadores. */
.filter-control {
  position: relative;
  min-width: 180px;
  max-width: 100%;
  flex: none;
}
.filter-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
  pointer-events: none;
  padding: 0;
}
.filter-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 17px;
  min-width: 100%;
  min-height: 42px;
  padding: 9px 12px 9px 14px;
  border: 1px solid #dfe3ea;
  border-radius: 10px;
  background: #fff;
  color: #374251;
  box-shadow: 0 2px 8px #25344a08;
  font-weight: 700;
  text-align: left;
}
.filter-trigger::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-right: 2px solid #8994a1;
  border-bottom: 2px solid #8994a1;
  transform: rotate(45deg) translateY(-2px);
}
.filter-control.open .filter-trigger,
.filter-trigger:focus-visible {
  border-color: #f57b25;
  box-shadow: 0 0 0 3px #f57b2526;
  outline: none;
}
.filter-options {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 35;
  padding: 6px;
  max-height: 270px;
  overflow-y: auto;
  border: 1px solid #e5e8ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 17px 36px #26334625;
}
.filter-control.open .filter-options {
  display: grid;
  gap: 2px;
}
.filter-option {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #495362;
  text-align: left;
  font-weight: 600;
}
.filter-option:hover,
.filter-option:focus-visible {
  background: #f2f4f7;
  outline: none;
}
.filter-option[aria-selected="true"] {
  background: #fff0e4;
  color: #d75c0b;
  font-weight: 800;
}
.form-grid select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #818b96 50%),
    linear-gradient(135deg, #818b96 50%, transparent 50%);
  background-position: calc(100% - 17px) 49%, calc(100% - 12px) 49%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
@media (max-width: 760px) {
  .filter-control {
    min-width: 0;
    width: 100%;
  }
  .page-head > .filter-control {
    width: auto;
    min-width: 180px;
  }
}

/* Identidade de sistema comercial: hierarquia forte, superfície plana e linhas claras. */
:root { background: #f3f5f8; color: #25303b; }
.sidebar { background: #f8fafc; border-right: 1px solid #dbe1e8; box-shadow: none; }
.brand { border-radius: 6px; box-shadow: none; background: #fff; border-color: #e1e6ed; }
.nav-item { border-radius: 7px; }
.nav-icon-box { border-radius: 6px; }
.nav-item.active { background: #fff1e6; border-color: transparent; border-left: 3px solid #ed6a13; color: #a94408; box-shadow: none; padding-left: 6px; }
.nav-item.active .nav-icon-box { background: #ffe0c6; color: #c9510a; }
.topbar { height: 74px; border-bottom-color: #dbe1e8; }
.view { padding-top: 26px; }
.page-head { border-bottom: 1px solid #e1e5eb; padding-bottom: 17px; }
.page-head h2 { letter-spacing: -0.018em; }
.page-head .action-row { align-items: center; margin: 0; }
.lead-count { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 6px 10px; border: 1px solid #f5d6bb; border-radius: 6px; background: #fff5ec; color: #a94e11; font-size: 11px; font-weight: 750; line-height: 1; white-space: nowrap; }
.new-lead-actions { grid-column: 1 / -1; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-top: 4px; }
.new-lead-actions > div { min-width: 0; flex: 1; }
.new-lead-actions .form-error { margin: 0; min-height: 0; line-height: 1.4; }
.new-lead-actions .form-error:empty { display: none; }
.new-lead-actions .existing-lead { margin-top: 8px; }
.new-lead-actions .existing-lead[hidden] { display: none; }
.new-lead-actions > .button { width: auto; min-width: 116px; min-height: 38px; padding: 9px 16px; flex: none; }
@media (max-width: 540px) { .new-lead-actions { flex-direction: column; align-items: stretch; } .new-lead-actions > .button { align-self: flex-end; } }
.hero { border-radius: 7px; background: linear-gradient(110deg,#fff5eb,#fff 65%); }
.card,.kpi { border-radius: 7px; border-color: #dee4eb; box-shadow: 0 2px 10px #202d3b08; }
.kpi { border-top: 3px solid #dde3e9; }
.kpi.accent { border-top-color: #ec6b14; }
.button,.field,select,input,textarea,.filter-trigger,.filter-options,.filter-option,.list-row,.appointment-row,.ticket-message,.empty { border-radius: 5px; }
.button.primary { box-shadow: none; }
.table th { color: #596779; background: #f4f6f9; }
.table tbody tr:nth-child(even) { background: #fbfcfe; }
.board { gap: 9px; }
.board-col { border: 1px solid #dce2e9; border-radius: 6px; padding: 0 10px 10px; background: #f6f8fa; transition: background .15s,border-color .15s; }
.board-col-head { margin: 0 -10px 10px; padding: 12px 13px; border-bottom: 1px solid #dce2e9; background: #fff; color: #364354; font-size: 12px; border-radius: 5px 5px 0 0; }
.board-col-head span { color: #ad570f; background: #fff1e6; padding: 2px 6px; border-radius: 4px; }
.board-col.drop-target { border-color: #ec6b14; background: #fff2e6; box-shadow: inset 0 0 0 2px #ec6b1430; }
.board-col.drop-target .board-col-head { border-bottom-color: #f5bc86; }
.board-col .lead-row { width: 100%; border-radius: 5px; border: 1px solid #dfe4eb; border-left: 3px solid #ee7620; text-align: left; padding: 11px 12px; box-shadow: 0 2px 5px #1e2e4508; cursor: grab; }
.board-col .lead-row:active { cursor: grabbing; }
.board-col .lead-row.dragging { opacity: .45; }
.board-col .lead-row strong { font-size: 13px; color: #2e3947; margin: 5px 0; }
.lead-row-id { display: block; text-transform: uppercase; color: #a75510; font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.lead-row-foot { display: block; border-top: 1px solid #edf0f3; margin-top: 10px; padding-top: 8px; font-size: 11px; color: #536276; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-options { border-radius: 5px; }
.filter-option { border-radius: 4px; }
.modal,.modal.wide { border-radius: 7px; }
.lead-dialog.modal.wide { width: min(1030px,calc(100vw - 20px)); }
.lead-dialog .modal-body { padding: 0; max-height: 88vh; }
.lead-dialog .modal-head { margin: 0; padding: 16px 22px 12px; border-bottom: 1px solid #e3e7ed; background: #fff; }
.lead-dialog .modal-head h2 { font-size: 18px; letter-spacing: -.015em; }
.lead-topbar { z-index: 6; position: sticky; top: 0; background: #fff; border-bottom: 1px solid #e3e7ed; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 22px; }
.lead-topbar > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.lead-topbar .button[hidden] { display: none; }
#history-older[hidden] { display: none; }
.lead-reference { font-size: 11px; color: #697587; font-weight: 800; letter-spacing: .06em; margin-right: 10px; }
.lead-tabs { display: flex; gap: 0; overflow-x: auto; padding: 0 22px; background: #f8fafc; border-bottom: 1px solid #dfe5ec; }
.lead-tabs button { border: 0; border-bottom: 3px solid transparent; background: transparent; color: #627083; font-size: 12px; font-weight: 750; white-space: nowrap; padding: 15px 13px 12px; }
.lead-tabs button.active { color: #ce590b; border-bottom-color: #ef711c; background: #fff; }
.lead-pane { display: none; padding: 20px 22px 28px; }
.lead-pane.active { display: block; }
.lead-section-intro { font-size: 12px; color: #667586; }
.lead-profile { gap: 13px; }
.lead-profile label { font-size: 11px; color: #48586a; }
.lead-profile textarea { min-height: 76px; }
.lead-profile label:nth-last-of-type(-n+6) textarea { min-height: 84px; }
.lead-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; margin: 0 0 22px; border: 1px solid #e2e6ec; border-radius: 5px; overflow: hidden; }
.lead-facts > div { display: grid; gap: 5px; padding: 12px; border-right: 1px solid #e2e6ec; min-width: 0; }
.lead-facts > div:last-child { border: 0; }
.lead-facts small { color: #68788b; text-transform: uppercase; font-size: 10px; letter-spacing: .05em; }
.lead-facts b { word-break: break-word; font-size: 12px; }
.lead-section { border: 1px solid #e2e6ec; border-radius: 5px; padding: 17px; margin: 14px 0; background: #fff; }
.lead-section h3 { margin: 0 0 10px; font-size: 14px; }
.prepared-message { white-space: pre-wrap; overflow-wrap: anywhere; padding: 14px; border-left: 3px solid #ef711c; background: #f8f9fb; color: #354457; line-height: 1.6; }
.lead-section #note-form textarea { display: block; width: 100%; min-height: 95px; margin-bottom: 11px; }
.timeline { border-top: 1px solid #e5e9ef; padding-top: 14px; }
.timeline-detail { color: #596879; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.timeline-detail b { display: inline; color: #354153; font-weight: 650; text-transform: capitalize; }
.calendar-field { position: relative; }
.calendar-trigger { width: 100%; min-height: 41px; border: 1px solid #dfe3e9; border-radius: 5px; background: #fff; text-align: left; color: #2b3744; font-weight: 650; padding: 10px 34px 10px 12px; }
.calendar-trigger::after { content: "▦"; position: absolute; right: 13px; top: 10px; color: #ef711c; }
.calendar-trigger:focus-visible { outline: 2px solid #ef711c; outline-offset: 2px; }
.calendar-panel { position: absolute; z-index: 12; top: calc(100% + 6px); left: 0; width: min(320px,calc(100vw - 54px)); padding: 12px; border: 1px solid #dfe4eb; border-radius: 6px; background: #fff; box-shadow: 0 16px 36px #25344b25; }
.calendar-panel[hidden] { display: none; }
.calendar-heading,.calendar-footer { display: flex; align-items: center; justify-content: space-between; }
.calendar-heading { margin-bottom: 12px; text-transform: capitalize; color: #2b3744; }
.calendar-heading button,.calendar-footer button { background: #f5f7fa; color: #4e6072; border: 1px solid #e2e6eb; border-radius: 4px; min-width: 32px; min-height: 32px; }
.calendar-heading button:hover,.calendar-footer button:hover { color: #d45c0d; background: #fff1e6; border-color: #f9bf92; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; text-align: center; }
.calendar-grid span { display: grid; place-items: center; min-height: 36px; }
.calendar-weekdays { font-size: 11px; font-weight: 800; color: #7e8a98; }
.calendar-days button { border: 0; background: transparent; min-height: 36px; border-radius: 4px; color: #344256; }
.calendar-days button:hover,.calendar-days button.today { background: #fff1e5; color: #d45c0d; }
.calendar-days button.selected { background: #ed6a13; color: #fff; font-weight: 800; }
.calendar-footer { justify-content: flex-end; gap: 8px; border-top: 1px solid #edf0f3; padding-top: 10px; margin-top: 9px; }
.schedule-date { display: grid; gap: 6px; color: #4d5661; font-weight: 700; font-size: 12px; }
@media (max-width: 760px) {
 .lead-dialog .modal-head,.lead-topbar,.lead-pane { padding-left: 14px; padding-right: 14px; }
 .lead-tabs { padding: 0 10px; }
 .lead-topbar { flex-wrap: wrap; }
 .lead-topbar #lead-save { width: 100%; }
 .lead-facts { grid-template-columns: 1fr; }
 .lead-facts > div { border-right: 0; border-bottom: 1px solid #e2e6ec; }
 .board-col .lead-row { touch-action: auto; }
}

/* Identidade comercial: laranja sólido e calmo, com superfícies de trabalho claras. */
:root { background: #f7f6f3; }
.sidebar { background: linear-gradient(165deg,#c75912 0%,#b94b0d 58%,#a9430b 100%); border-right: 0; color: #fff; }
.brand { background: #ffffffed; border: 1px solid #ffffffa8; box-shadow: 0 5px 16px #6c250b1a; }
.brand b { color: #29303b; }
.brand small { color: #b65213; }
.nav-group { color: #fff9; }
.nav-item { color: #fffdf4; border-color: transparent; }
.nav-icon-box { color: #fff; background: #ffffff1c; }
.nav-item:hover { background: #ffffff20; border-color: transparent; color: #fff; }
.nav-item:hover .nav-icon-box { color: #fff; background: #ffffff24; }
.nav-item.active { background: #fff9f3; color: #a83d05; border: 1px solid #fff7ec; border-left: 3px solid #783007; padding-left: 6px; box-shadow: 0 3px 11px #7628071c; }
.nav-item.active .nav-icon-box { color: #ba4c08; background: #ffe4cf; }
.sidebar-foot { border-top-color: #ffffff40; }
.sidebar-foot span { color: #fff; }
.sidebar-foot .button { background: #ffffff1c; border-color: #ffffff45; color: #fff; }
.sidebar-foot .button:hover { background: #ffffff32; color: #fff; }
.topbar { background: #fff; }
.view { background: #f7f6f3; }
.sidebar-close { display: none; }
.sidebar-scrim[hidden] { display: none; }

/* Agenda em calendário. */
.cal-page-head { align-items: center; }
.cal-shell { background: #fff; border: 1px solid #e6e2de; border-radius: 11px; overflow: hidden; box-shadow: 0 8px 30px #4b35280a; }
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid #ece8e3; }
.cal-navigation,.cal-views { display: flex; align-items: center; gap: 7px; }
.cal-navigation h3 { margin: 0 0 0 12px; font-size: 18px; color: #2d3137; font-weight: 750; }
.cal-arrow { border: 0; background: transparent; color: #6e737c; font-size: 28px; line-height: 1; width: 32px; height: 36px; border-radius: 7px; }
.cal-arrow:hover { background: #fff0e6; color: #ae4e11; }
.cal-views { background: #f7f5f3; padding: 3px; border-radius: 8px; border: 1px solid #ebe6e0; }
.cal-views button { border: 0; background: transparent; color: #666d77; padding: 8px 13px; border-radius: 6px; font-size: 12px; font-weight: 750; }
.cal-views button.active { background: #fff; color: #ad4b0d; box-shadow: 0 1px 5px #36221314; }
.cal-layout { display: grid; grid-template-columns: minmax(0,1fr) 295px; }
.cal-main { min-width: 0; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); background: #fffaf5; border-bottom: 1px solid #eee8e1; }
.cal-weekdays span { text-align: center; padding: 10px 3px; color: #806d61; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.cal-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.cal-cell { min-height: 112px; border-right: 1px solid #eeeae5; border-bottom: 1px solid #eeeae5; padding: 7px 5px; min-width: 0; background: #fff; }
.cal-cell { cursor: pointer; transition: background-color .16s ease; }
.cal-cell:hover { background: #fff8f2; }
.cal-cell.is-outside:hover { background: #fff5ed; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.is-outside { background: #faf9f7; }
.cal-cell.is-outside .cal-date { color: #b4a9a0; }
.cal-cell.is-selected { box-shadow: inset 0 0 0 2px #eda779; position: relative; }
.cal-date { display: grid; place-items: center; width: 28px; height: 28px; margin: 0 0 5px auto; border: 0; border-radius: 50%; color: #3e444b; background: transparent; font-size: 12px; font-weight: 700; }
.cal-date:hover { background: #fff0e2; color: #b34e0d; }
.cal-cell.is-today .cal-date { background: #d75c10; color: #fff; }
.cal-cell-events { display: grid; gap: 3px; }
.cal-event { display: flex; min-width: 0; gap: 4px; align-items: center; text-align: left; border: 0; border-left: 3px solid #cf641d; border-radius: 4px; background: #fff0e5; color: #8d3b0b; padding: 4px 5px; font-size: 10px; }
.cal-event:hover { background: #ffe1c8; }
.cal-event span { white-space: nowrap; font-weight: 800; }
.cal-event b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 650; }
.cal-event.cal-kind-meeting,.cal-event.cal-kind-daily { background: #eef2f8; color: #375072; border-left-color: #607ca5; }
.cal-event.cal-kind-whatsapp { background: #ecf6ee; color: #376845; border-left-color: #62a36f; }
.cal-event.is-done { opacity: .57; }
.cal-more { border: 0; background: transparent; text-align: left; color: #915124; font-size: 10px; padding: 3px; font-weight: 750; }

.topbar-presence { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; line-height: 1.1; white-space: nowrap; }
.session-status { display: inline-flex; align-items: center; gap: 7px; color: #317849; font-size: 11px; font-weight: 700; }
.session-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #22a659; }
.session-status[data-state="checking"] { color: #9a6b19; }
.session-status[data-state="checking"] .session-dot { background: #d99a31; }
.session-status[data-state="offline"] { color: #897b72; }
.session-status[data-state="offline"] .session-dot { background: #a79b92; }
@media (max-width: 760px) { .topbar-actions #today { display: none; } .topbar-presence { gap: 0; } .session-status { font-size: 10px; } }
.cal-grid.is-week .cal-cell { min-height: 360px; }
.cal-day-panel { border-left: 1px solid #eee8e1; background: #fffdfb; padding: 20px; }
.cal-day-heading { border-bottom: 1px solid #eae4de; padding-bottom: 12px; }
.cal-day-heading h3 { margin: 5px 0 0; color: #303640; font-size: 17px; line-height: 1.35; }
.cal-day-heading h3::first-letter,.cal-list-day h3::first-letter,.cal-detail-time::first-letter { text-transform: uppercase; }
.cal-day-list { display: grid; gap: 8px; padding: 13px 0; }
.cal-day-event { display: flex; align-items: flex-start; gap: 9px; width: 100%; text-align: left; border: 1px solid #e9e3dd; border-radius: 7px; background: #fff; padding: 10px; }
.cal-day-event:hover { border-color: #efaa79; background: #fff9f4; }
.cal-day-event > span:last-child { min-width: 0; }
.cal-day-event b { display: block; font-size: 12px; color: #303842; }
.cal-day-event small { display: block; margin-top: 4px; font-size: 10px; color: #7b8189; }
.cal-day-time { color: #bd570d; font-weight: 800; font-size: 11px; white-space: nowrap; }
.cal-empty-day { color: #8a8580; font-size: 12px; margin: 8px 0; }
.cal-add-day { width: 100%; color: #a94b10; border-color: #f0c5a5; background: #fff7f0; }
.cal-list-view { padding: 14px 22px 28px; min-height: 360px; }
.cal-list-day { padding: 10px 0 17px; border-bottom: 1px solid #eee8e1; }
.cal-list-day h3 { font-size: 13px; color: #665b53; }
.cal-list-row { display: flex; align-items: center; gap: 12px; padding: 3px 0; }
.cal-list-row .cal-event { flex: 1; max-width: 600px; padding: 10px 12px; font-size: 12px; }
.cal-list-row small { color: #7a8390; }
.cal-list-empty { text-align: center; color: #787f88; padding: 60px 20px; }
.cal-form-actions,.cal-detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.cal-detail-time { color: #b8500d; font-weight: 800; }
.cal-detail-kind { display: inline-flex; padding: 4px 8px; border-radius: 5px; background: #fff0e5; color: #ad4c0e; font-size: 11px; font-weight: 750; }
.cal-detail-note { white-space: pre-wrap; border: 1px solid #eee7df; padding: 12px; border-radius: 6px; background: #fffaf6; }
.cal-detail-actions { margin-top: 18px; }

/* Metas comerciais: progresso claro, com números de assinaturas confirmadas. */
.goals-hero { display: flex; justify-content: space-between; align-items: center; gap: 25px; background: linear-gradient(110deg,#b6480b,#d65e12); color: #fff; border-radius: 10px; padding: 30px; box-shadow: 0 12px 28px #b6480b24; }
.goals-overline { display: block; font-size: 10px; letter-spacing: .15em; font-weight: 800; color: #fffbd0; margin-bottom: 8px; }
.goals-hero strong { display: block; font-size: 40px; line-height: 1.1; }
.goals-hero strong small { font-size: 16px; font-weight: 600; }
.goals-hero p { margin: 11px 0 0; color: #fff3e7; }
.goals-hero-side { border-left: 1px solid #ffffff66; padding-left: 26px; min-width: 240px; }
.goals-hero-side span { display: block; font-size: 25px; font-weight: 800; }
.goals-hero-side small { display: block; color: #fff1e4; max-width: 260px; }
.goals-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 16px 0 24px; }
.goals-stats > div { border: 1px solid #e8e2db; background: #fff; border-radius: 8px; padding: 17px; }
.goals-stats b,.goals-stats span { display: block; }
.goals-stats b { color: #303740; font-size: 19px; }
.goals-stats span { color: #727c87; font-size: 11px; margin-top: 5px; }
.goals-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.goal-card { border: 1px solid #e2ded8; border-radius: 9px; background: #fff; padding: 20px; }
.goal-card.is-unlocked { border-color: #e8a66f; box-shadow: 0 0 0 1px #f8d7bd; }
.goal-top,.goal-progress-head,.goal-rewards { display: flex; justify-content: space-between; gap: 10px; }
.goal-index { font-size: 10px; color: #9a582c; letter-spacing: .12em; font-weight: 800; }
.goal-status { background: #f2f3f4; color: #7a8188; border-radius: 5px; padding: 4px 7px; font-size: 10px; font-weight: 800; }
.goal-card.is-unlocked .goal-status { background: #e8f6ea; color: #2d7d40; }
.goal-card h3 { margin: 15px 0 3px; font-size: 20px; }
.goal-name { color: #b65012; font-size: 12px; font-weight: 750; }
.goal-progress-head { margin: 22px 0 8px; color: #5f6975; font-size: 11px; }
.goal-progress { height: 10px; border-radius: 8px; overflow: hidden; background: #edeae6; }
.goal-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#ec8a3b,#d35a10); }
.goal-remaining { color: #687481; font-size: 11px; margin: 9px 0 18px; }
.goal-rewards { border-top: 1px solid #eee9e3; padding-top: 15px; }
.goal-rewards > div { display: grid; gap: 5px; }
.goal-rewards small { font-size: 10px; color: #74808b; }
.goal-rewards b { color: #303842; font-size: 15px; }
.goals-footnote { color: #717c87; font-size: 11px; margin-top: 18px; }

/* Informações e ações de contato visíveis no card do CRM. */
.referral-card { margin-top: 18px; display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,1fr); align-items: end; gap: 24px; border-left: 3px solid #ed6a13; }
.referral-card h3 { margin: 7px 0 5px; }
.referral-card p { margin-bottom: 0; }
.referral-link-row { display: flex; gap: 8px; min-width: 0; }
.referral-link-row input { min-width: 0; flex: 1; background: #fffaf6; }
.referral-link-row button { flex: none; }
.board-col .lead-row { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; }
.lead-row-open { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 12px 12px 9px; color: #2e3947; cursor: pointer; }
.lead-row-open:hover { background: #fffaf6; }
.lead-row.is-syncing { border-left-color: #d19c65; background: #fffaf4; }
.lead-row.is-syncing .lead-row-open { cursor: progress; }
.lead-row-phone { display: block; margin-top: 8px; font-size: 12px; font-weight: 700; color: #3e4b5b; overflow-wrap: anywhere; }
.lead-row-schedule-wrap { padding: 0 12px 9px; }
.lead-row-schedule { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #566476; line-height: 1.4; }
.lead-row-schedule.empty { color: #949da8; }
.lead-row-schedule.urgent { color: #ab3f14; font-weight: 800; }
.lead-alert { display: none; place-items: center; flex: none; width: 17px; height: 17px; border-radius: 50%; background: #dc5b1b; color: #fff; font-size: 11px; line-height: 1; }
.lead-row-schedule.urgent .lead-alert { display: inline-grid; }
.lead-row-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-top: 1px solid #edf0f3; }
.lead-row-actions button { min-width: 0; border: 0; border-right: 1px solid #edf0f3; background: #fff; padding: 9px 3px; color: #ad4b0d; font-size: 10px; font-weight: 800; cursor: pointer; }
.lead-row-actions button:last-child { border-right: 0; }
.lead-row-actions button:hover:not(:disabled) { background: #fff0e5; }
.lead-row-actions button:disabled { color: #abb3bc; cursor: not-allowed; }

@media (max-width: 1050px) { .cal-layout { grid-template-columns: 1fr; } .cal-day-panel { border-left: 0; border-top: 1px solid #eee8e1; } }
@media (max-width: 760px) {
 .referral-card { grid-template-columns: 1fr; }
 .referral-link-row { flex-wrap: wrap; }
 .referral-link-row button { width: 100%; }
 .sidebar { z-index: 31; box-shadow: 8px 0 28px #42200f4d; }
 .brand { margin-top: 35px; }
 .sidebar-close { display: grid; place-items: center; position: absolute; right: 14px; top: 13px; width: 34px; height: 34px; border: 1px solid #fff; border-radius: 7px; background: #fff; color: #a9430b; font-size: 25px; line-height: 1; z-index: 2; box-shadow: 0 2px 7px #52200e33; }
 .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 30; border: 0; background: #18151199; }
 body.menu-open { overflow: hidden; }
 .cal-page-head { align-items: flex-start; flex-direction: column; gap: 16px; }
 .cal-toolbar { flex-wrap: wrap; padding: 12px; }
 .cal-navigation { width: 100%; }
 .cal-navigation h3 { font-size: 15px; margin-left: 6px; }
 .cal-views { width: 100%; }
 .cal-views button { flex: 1; }
 .cal-main { overflow-x: auto; }
 .cal-grid,.cal-weekdays { min-width: 600px; }
 .cal-grid.is-week { min-width: 630px; }
 .cal-cell { min-height: 92px; }
 .cal-list-view { min-height: 220px; padding: 12px; }
 .goals-hero { flex-direction: column; align-items: stretch; padding: 23px; }
 .goals-hero-side { border-left: 0; border-top: 1px solid #ffffff66; padding: 16px 0 0; min-width: 0; }
 .goals-stats { grid-template-columns: 1fr; }
 .goals-grid { grid-template-columns: 1fr; }
}
