html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f3f7f8;
  color: #23363c;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 15% 0%, rgba(0, 255, 255, 0.16), transparent 28%), linear-gradient(180deg, #0b171b, #102128 55%, #0c191e);
}

.auth-card {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid #dce7ea;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.auth-card h2 {
  margin: 0 0 6px;
  text-align: center;
  color: #17282e;
}

.auth-card p {
  text-align: center;
  color: #71858b;
  margin: 0 0 18px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field label {
  font-size: 12px;
  font-weight: 800;
  color: #4c6971;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #dce7ea;
  border-radius: 10px;
  background: #fff;
  color: #23363c;
  outline: none;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #00cfd8;
  box-shadow: 0 0 0 3px rgba(0, 216, 223, 0.12);
}

.btn,
.ui-btn {
  border: 1px solid #d4e2e5;
  background: #fff;
  color: #23363c;
  border-radius: 9px;
  padding: 9px 12px;
  font-weight: 800;
}

.btn.primary,
.ui-btn.primary-action {
  background: #00d8df;
  border-color: #00d8df;
  color: #0b171b;
}

.ui-btn.small {
  padding: 6px 8px;
  font-size: 11px;
}

.ui-btn.danger-btn {
  color: #991b1b;
  border-color: #fecaca;
  background: #fff5f5;
}

.auth-error {
  display: none;
  padding: 9px 11px;
  border-radius: 9px;
  background: #fff0f0;
  color: #b92d2d;
  margin-bottom: 12px;
  font-size: 12px;
}

.auth-error.show {
  display: block;
}

.auth-note {
  margin-top: 14px;
  color: #71858b;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.auth-secondary {
  width: 100%;
  margin-top: 9px;
  padding: 10px 12px;
  border: 1px solid #d4e2e5;
  border-radius: 9px;
  background: #f7fbfc;
  color: #2d444a;
  font-weight: 800;
}

.auth-secondary:hover {
  border-color: #00cfd8;
  background: #eefbfc;
}

.auth-message {
  display: none;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.45;
}

.auth-message.show {
  display: block;
}

.auth-message.error {
  color: #b92d2d;
  background: #fff0f0;
  border: 1px solid #fecaca;
}

.auth-message.success {
  color: #166534;
  background: #effcf3;
  border: 1px solid #bbefca;
}

#signupForm {
  width: min(460px, 100%);
}

.loading-toast {
  display: none;
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #17282e;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 9999;
}

.loading-toast.show {
  display: block;
}

#appRoot {
  min-height: 100vh;
}

.system-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.system-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  background: radial-gradient(circle at 10% 0%, rgba(0, 255, 255, 0.16), transparent 28%), linear-gradient(180deg, #0b171b, #102128 58%, #0c191e);
  color: #fff;
}

.system-brand {
  padding: 5px 8px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.system-brand span {
  display: block;
  margin-top: 10px;
  color: #91aeb5;
  font-size: 11px;
  letter-spacing: 0.05em;
}

.system-brand b {
  color: #00ffff;
}

.system-nav {
  display: grid;
  gap: 5px;
  padding: 18px 0;
  overflow-y: auto;
}

.system-nav button {
  border: 1px solid transparent;
  background: transparent;
  color: #b7cbd0;
  border-radius: 10px;
  padding: 11px 12px;
  text-align: left;
  font-weight: 750;
  display: flex;
  align-items: center;
  gap: 9px;
}

.system-nav button:hover,
.system-nav button.active {
  color: #fff;
  background: rgba(0, 255, 255, 0.08);
  border-color: rgba(0, 255, 255, 0.14);
  box-shadow: inset 3px 0 #00ffff;
}

.system-user {
  margin-top: auto;
  padding: 14px 8px 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 3px;
}

.system-user b {
  font-size: 13px;
}

.system-user span {
  color: #7f9ca3;
  font-size: 11px;
}

.system-user button {
  margin-top: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #bcd1d6;
  padding: 7px 9px;
  border-radius: 8px;
}

.system-main {
  min-width: 0;
  padding: 24px;
}

.system-main > section {
  min-width: 0;
}

.system-topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: -24px -24px 20px;
  padding: 18px 24px;
  background: rgba(243, 247, 248, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #dce7ea;
}

.system-topbar h1 {
  margin: 5px 0 0;
  font-size: 26px;
  color: #17282e;
}

.system-topbar p {
  margin: 4px 0 0;
  color: #71858b;
  font-size: 13px;
}

.version-pill,
.status,
.count-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  white-space: nowrap;
}

.version-pill {
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 900;
  color: #0b5054;
  background: #d9ffff;
  border: 1px solid #adf8fa;
  padding: 4px 8px;
}

.top-actions,
.admin-hero-actions,
.admin-actions,
.admin-data-actions,
.permission-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 14px;
}

.metric {
  background: #fff;
  border: 1px solid #dce7ea;
  border-radius: 15px;
  padding: 16px;
  box-shadow: 0 8px 25px rgba(39, 71, 79, 0.07);
  position: relative;
  overflow: hidden;
}

.metric::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #00d8df;
}

.metric.danger::before {
  background: #d64545;
}

.metric span {
  display: block;
  color: #71858b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric strong {
  display: block;
  font-size: 27px;
  color: #17282e;
  margin: 7px 0;
}

.metric small,
.muted {
  color: #71858b;
}

.content-grid,
.admin-layout {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.two-col,
.admin-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  background: #fff;
  border: 1px solid #dce7ea;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(39, 71, 79, 0.07);
  overflow: hidden;
  margin-bottom: 14px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px 17px;
  border-bottom: 1px solid #e4ecee;
}

.panel-head h3 {
  margin: 0;
  color: #17282e;
  font-size: 17px;
}

.panel-head p {
  margin: 4px 0 0;
  color: #71858b;
  font-size: 12px;
}

.status,
.count-chip {
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 850;
  background: #e8f3f5;
  color: #315f69;
}

.status.ok {
  background: #dcfce7;
  color: #166534;
}

.status.bad {
  background: #fee2e2;
  color: #991b1b;
}

.status.dark {
  background: #17282e;
  color: #fff;
}

.status.info {
  background: #e6f2f4;
  color: #315f69;
}

.count-chip {
  background: #f1f6f7;
  color: #4c6971;
}

.system-health,
.admin-health {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.system-health div,
.admin-health div {
  padding: 16px;
  border-right: 1px solid #edf2f3;
}

.system-health div:last-child,
.admin-health div:last-child {
  border-right: 0;
}

.system-health span,
.admin-health span {
  display: block;
  color: #71858b;
  font-size: 11px;
}

.system-health b,
.admin-health b {
  display: block;
  margin-top: 5px;
  color: #17282e;
}

.health-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 999px;
  background: #22c55e;
}

.health-dot.warn {
  background: #f59e0b;
}

.funnel-list {
  padding: 12px 16px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 95px 1fr 28px;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
}

.funnel-row span {
  font-size: 12px;
}

.funnel-row > div {
  height: 7px;
  background: #eef4f5;
  border-radius: 999px;
  overflow: hidden;
}

.funnel-row i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #00d8df, #4c6971);
  border-radius: 999px;
}

.funnel-row b {
  text-align: right;
  font-size: 12px;
}

.record-list {
  padding: 7px 16px;
}

.record {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #edf2f3;
}

.record:last-child {
  border-bottom: 0;
}

.record > div {
  display: grid;
  gap: 4px;
}

.record span,
.record small {
  color: #71858b;
  font-size: 11px;
}

.page-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.search-box {
  flex: 1;
}

.search-box input {
  width: min(480px, 100%);
  padding: 10px 12px;
  border: 1px solid #dce7ea;
  border-radius: 10px;
  background: #fff;
}

.page-toolbar > span {
  color: #71858b;
  font-size: 12px;
}

.kanban-online {
  display: grid;
  grid-template-columns: repeat(7, 260px);
  gap: 11px;
  overflow-x: auto;
  padding: 2px 1px 12px;
}

.kanban-col {
  background: #f7fbfc;
  border: 1px solid #dce7ea;
  border-radius: 14px;
  padding: 10px;
  min-height: 380px;
}

.kanban-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.kanban-head b {
  font-size: 12px;
  color: #2d444a;
}

.kanban-head span {
  background: #fff;
  border: 1px solid #dce7ea;
  border-radius: 999px;
  min-width: 24px;
  text-align: center;
  padding: 3px 6px;
  font-size: 10px;
}

.lead-card {
  background: #fff;
  border: 1px solid #dbe7e9;
  border-left: 3px solid #00d8df;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  box-shadow: 0 3px 10px rgba(39, 71, 79, 0.05);
}

.lead-card b {
  display: block;
  font-size: 12px;
}

.lead-card span,
.lead-card small {
  display: block;
  color: #71858b;
  font-size: 10px;
  margin-top: 3px;
}

.wa-link {
  margin-top: 8px;
  border: 0;
  background: #dcfce7;
  color: #166534;
  border-radius: 7px;
  padding: 6px 8px;
  font-weight: 800;
  font-size: 10px;
}

.empty-mini,
.empty-state {
  padding: 18px;
  color: #82979c;
  text-align: center;
  font-size: 12px;
}

.empty-state {
  padding: 28px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf2f3;
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 10px;
  color: #71858b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #fbfdfd;
}

tbody tr:hover {
  background: #fbfdfd;
}

.block {
  display: block;
  color: #71858b;
  margin-top: 3px;
}

.actions-cell {
  text-align: right;
  white-space: nowrap;
}

.actions-cell .ui-btn + .ui-btn {
  margin-left: 6px;
}

.admin-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px;
  margin-bottom: 14px;
  border-radius: 17px;
  background: linear-gradient(135deg, #0f2026, #17343c);
  color: #fff;
  box-shadow: 0 12px 32px rgba(24, 48, 56, 0.18);
}

.admin-hero h2 {
  margin: 8px 0 6px;
  font-size: 24px;
}

.admin-hero p {
  margin: 0;
  color: #a9c0c6;
  font-size: 12px;
  max-width: 760px;
}

.admin-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 4px 0 12px;
  margin-bottom: 4px;
}

.admin-tab {
  min-width: max-content;
  border: 1px solid #dce7ea;
  background: #fff;
  color: #536f76;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 800;
}

.admin-tab.active {
  color: #0d4f53;
  border-color: #8cecf0;
  background: #e9feff;
  box-shadow: inset 0 -2px #00d8df;
}

.admin-pane {
  display: none;
}

.admin-pane.active {
  display: block;
}

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

.admin-shortcut {
  border: 1px solid #dce7ea;
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  text-align: left;
  box-shadow: 0 6px 18px rgba(39, 71, 79, 0.05);
}

.admin-shortcut:hover {
  border-color: #9beef1;
  transform: translateY(-1px);
}

.admin-shortcut b,
.admin-shortcut small {
  display: block;
}

.admin-shortcut b {
  color: #17282e;
  margin-bottom: 5px;
}

.admin-shortcut small {
  color: #71858b;
  line-height: 1.4;
}

.admin-control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-control-card {
  padding: 15px;
  border: 1px solid #dce7ea;
  border-radius: 13px;
  background: #fff;
}

.admin-control-card h4 {
  margin: 0 0 6px;
  color: #17282e;
}

.admin-control-card p {
  margin: 0;
  color: #71858b;
  font-size: 12px;
  line-height: 1.5;
}

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

.admin-form-grid .field {
  margin: 0;
}

.admin-form-grid .full {
  grid-column: 1 / -1;
}

.admin-form-stack {
  padding: 16px;
}

.admin-actions,
.admin-data-actions {
  justify-content: flex-end;
  padding: 0 16px 16px;
}

.admin-note {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #dce7ea;
  border-radius: 11px;
  background: #f8fbfc;
  color: #526c73;
  font-size: 12px;
  line-height: 1.5;
}

.document-preview {
  margin: 16px;
  padding: 18px;
  min-height: 180px;
  border-radius: 12px;
  background: #102128;
  color: #d9ffff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.7;
  font-size: 12px;
}

.admin-inline-select {
  min-width: 150px;
  padding: 7px 9px;
  border: 1px solid #dce7ea;
  border-radius: 8px;
  background: #fff;
}

.admin-audit {
  max-height: 480px;
  overflow-y: auto;
  padding: 6px 16px 14px;
}

.admin-audit-row {
  display: grid;
  grid-template-columns: 145px 130px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #edf2f3;
  font-size: 11px;
}

.admin-audit-row span,
.admin-audit-row small {
  color: #71858b;
}

.admin-modal-back {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 20, 25, 0.66);
  backdrop-filter: blur(4px);
}

.admin-modal {
  width: min(980px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.admin-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 18px;
  border-bottom: 1px solid #e4ecee;
}

.admin-modal-head h3 {
  margin: 0;
  color: #17282e;
}

.admin-modal-head p {
  margin: 4px 0 0;
  color: #71858b;
  font-size: 12px;
}

.admin-modal-head > button {
  border: 0;
  background: #f1f6f7;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 22px;
  line-height: 1;
}

.permission-toolbar {
  padding: 14px 18px 0;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px;
}

.permission-group {
  border: 1px solid #dce7ea;
  border-radius: 13px;
  padding: 14px;
}

.permission-group h4 {
  margin: 0;
  color: #17282e;
}

.permission-group > p {
  margin: 4px 0 12px;
  color: #71858b;
  font-size: 11px;
}

.permission-option {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  align-items: start;
  padding: 8px 0;
  border-top: 1px solid #edf2f3;
}

.permission-option input {
  margin-top: 3px;
}

.permission-option span b,
.permission-option span small {
  display: block;
}

.permission-option span b {
  font-size: 12px;
  color: #2d444a;
}

.permission-option span small {
  margin-top: 2px;
  color: #71858b;
  font-size: 10px;
  line-height: 1.4;
}

@media (max-width: 1050px) {
  .metric-grid,
  .admin-shortcuts,
  .admin-control-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-col,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .system-health,
  .admin-health {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .system-layout {
    grid-template-columns: 1fr;
  }

  .system-sidebar {
    position: static;
    height: auto;
    padding: 10px 12px;
  }

  .system-brand {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 4px 10px;
  }

  .system-brand > div {
    width: 150px !important;
  }

  .system-brand span {
    margin: 0;
  }

  .system-nav {
    display: flex;
    overflow-x: auto;
    padding: 8px 0;
  }

  .system-nav button {
    min-width: max-content;
  }

  .system-user {
    display: none;
  }

  .system-main {
    padding: 14px;
  }

  .system-topbar {
    margin: -14px -14px 14px;
    padding: 13px 14px;
    align-items: flex-start;
  }

  .system-topbar h1 {
    font-size: 21px;
  }

  .system-topbar p {
    display: none;
  }

  .metric-grid,
  .admin-shortcuts,
  .admin-control-grid {
    grid-template-columns: 1fr 1fr;
  }

  .system-health,
  .admin-health {
    grid-template-columns: 1fr 1fr;
  }

  .kanban-online {
    grid-template-columns: repeat(7, 86vw);
  }

  .page-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box input {
    width: 100%;
  }

  .admin-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-form-grid,
  .permission-grid {
    grid-template-columns: 1fr;
  }

  .admin-audit-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

@media (max-width: 440px) {
  .metric-grid,
  .admin-shortcuts,
  .admin-control-grid,
  .system-health,
  .admin-health {
    grid-template-columns: 1fr;
  }

  .system-topbar {
    flex-direction: column;
  }

  .top-actions,
  .admin-hero-actions {
    width: 100%;
  }

  .top-actions .ui-btn,
  .admin-hero-actions .ui-btn {
    flex: 1;
  }
}

/* Shell fixo V15.5: interface imóvel; somente o conteúdo do módulo rola. */
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden !important;
}

.auth-gate {
  height: 100vh;
  overflow-y: auto;
}

#appRoot {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.system-layout {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.system-sidebar {
  position: relative;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.system-nav {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.system-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden !important;
  overscroll-behavior: none;
}

.system-topbar {
  grid-row: 1;
  position: relative;
  top: auto;
  z-index: 40;
  background: #f3f7f8;
}

#viewContent {
  grid-row: 2;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  padding-bottom: 24px;
}

.kanban-online {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
}

.table-wrap,
.admin-tabs {
  max-width: 100%;
}

@media (max-width: 760px) {
  .system-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
  }

  .system-sidebar {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: hidden;
  }

  .system-nav {
    overflow-x: auto;
    overflow-y: hidden;
  }

  .system-main {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    overflow: hidden !important;
  }

  #viewContent {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 18px;
  }
}

/* CRM alinhado à V15 offline */
.crm-module-grid{display:grid;gap:14px;min-width:0}.crm-metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.crm-metric-card{position:relative;overflow:hidden;padding:15px 16px;border:1px solid #dce7ea;border-radius:15px;background:#fff;box-shadow:0 7px 22px rgba(32,65,74,.055)}.crm-metric-card.dark{background:linear-gradient(135deg,#10272d,#173b44);border-color:#173b44;color:#fff}.crm-metric-card span{display:block;color:#71858b;font-size:10px;font-weight:850;letter-spacing:.06em;text-transform:uppercase}.crm-metric-card.dark span,.crm-metric-card.dark small{color:#b9d3d9}.crm-metric-card strong{display:block;margin:7px 0 4px;font-size:24px;color:#17282e}.crm-metric-card.dark strong{color:#fff}.crm-metric-card small{color:#71858b;font-size:10.5px}.crm-soft-panel{min-width:0;overflow:hidden;border:1px solid #dce7ea;border-radius:18px;background:linear-gradient(180deg,#fff,#fbfdfe);box-shadow:0 8px 25px rgba(39,71,79,.07)}.crm-panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding:15px 17px;border-bottom:1px solid #e4ecee}.crm-panel-head h3{margin:0;color:#17282e;font-size:17px}.crm-panel-head p{margin:4px 0 0;color:#71858b;font-size:12px}.crm-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.crm-toolbar input,.crm-toolbar select{min-height:38px;padding:9px 11px;border:1px solid #dce7ea;border-radius:9px;background:#fff;color:#23363c;font-size:12px}.crm-toolbar input{width:260px}.crm-panel-body{min-width:0;overflow:hidden;padding:12px}.crm-kanban{display:grid;grid-template-columns:repeat(7,260px);gap:12px;width:100%;min-width:0;max-width:100%;overflow-x:auto;overflow-y:visible;padding:2px 2px 12px;overscroll-behavior-x:contain;scrollbar-gutter:stable}.crm-kanban::-webkit-scrollbar{height:10px}.crm-kanban::-webkit-scrollbar-track{background:#edf3f4;border-radius:999px}.crm-kanban::-webkit-scrollbar-thumb{background:#9db2b8;border:2px solid #edf3f4;border-radius:999px}.crm-kanban-col{--stage:#78949c;--stage-soft:#eef4f5;position:relative;width:260px;min-width:260px;max-width:260px;min-height:360px;overflow:hidden;padding:10px;border:1px solid #d9e7ea;border-radius:15px;background:linear-gradient(180deg,var(--stage-soft),#f8fbfc 120px,#f8fbfc);transition:.18s ease}.crm-kanban-col::before{content:'';position:absolute;left:0;right:0;top:0;height:4px;background:var(--stage)}.crm-kanban-col.drop-active{outline:2px dashed var(--stage);outline-offset:-4px;background:var(--stage-soft)}.crm-kanban-head{display:flex;justify-content:space-between;align-items:center;margin:3px 0 10px;color:#23363c;font-size:13px;font-weight:850}.crm-stage-name{display:flex;align-items:center;gap:7px}.crm-stage-name i{width:9px;height:9px;border-radius:50%;background:var(--stage);box-shadow:0 0 0 4px rgba(0,0,0,.04)}.crm-stage-count{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:24px;padding:0 7px;border:1px solid #d9e7ea;border-radius:999px;background:#fff;color:var(--stage);font-size:11px;font-weight:800}.crm-lead-card{margin-bottom:8px;padding:12px 12px 11px;cursor:pointer;border:1px solid #dce7ea;border-left:4px solid var(--stage);border-radius:12px;background:#fff;box-shadow:0 3px 12px rgba(48,79,87,.05);transition:.18s ease}.crm-lead-card:hover{transform:translateY(-1px);border-color:#cbdade;border-left-color:var(--stage);box-shadow:0 8px 22px rgba(48,79,87,.09)}.crm-lead-card.dragging{opacity:.45}.crm-lead-title{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}.crm-lead-title b{color:#17282e;font-size:13px}.crm-lead-card>small{display:block;margin-top:3px;color:#71858b;font-size:10px}.crm-priority{display:inline-flex;align-items:center;gap:5px;padding:3px 6px;border-radius:999px;font-size:9.5px;font-weight:800;white-space:nowrap}.crm-priority::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor}.crm-priority.priority-baixa{color:#658087;background:#eef4f5}.crm-priority.priority-normal{color:#387789;background:#e9f4f7}.crm-priority.priority-alta{color:#c06d00;background:#fff2df}.crm-priority.priority-urgente{color:#c0392b;background:#fff0ee}.crm-lead-meta{display:flex;gap:6px;flex-wrap:wrap;margin-top:7px}.crm-lead-meta>span{padding:3px 6px;border:1px solid #e1eaec;border-radius:999px;background:#f2f6f7;color:#60767c;font-size:9.5px;font-weight:700}.crm-lead-value{margin-top:8px;color:#17282e;font-size:13px;font-weight:850}.crm-lead-next{margin-top:7px;color:#657b81;font-size:10px}.crm-lead-next.overdue{color:#bd3429;font-weight:800}.crm-card-actions{display:flex;gap:5px;flex-wrap:wrap;margin-top:9px}.crm-mini-btn{border:1px solid #dce7ea;border-radius:7px;background:#fff;color:#315f69;padding:6px 8px;font-size:10px;font-weight:800;cursor:pointer}.crm-mini-btn.whatsapp,.whatsapp-action{border-color:#bfe9cf;background:#dcfce7;color:#166534}.crm-mini-btn.danger,.danger-action{border-color:#fecaca!important;background:#fff0f0!important;color:#b42318!important}.crm-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:18px}.crm-form-grid .full{grid-column:1/-1}.crm-form-grid textarea{min-height:92px;resize:vertical}.crm-form-grid select,.crm-form-grid textarea{width:100%;padding:12px 13px;border:1px solid #dce7ea;border-radius:10px;background:#fff}.crm-modal-foot{display:flex;justify-content:flex-end;gap:8px;padding:0 18px 18px}.crm-record-modal{width:min(1120px,100%)}.crm-record-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:start;padding:18px;border-bottom:1px solid #dce7ea}.crm-record-hero h3{margin:8px 0 4px;color:#17282e;font-size:23px}.crm-record-hero p{margin:0;color:#71858b;font-size:12px}.crm-record-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.crm-record-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:14px 18px}.crm-record-kpis>div{padding:11px;border:1px solid #dce7ea;border-radius:11px;background:#f9fcfd}.crm-record-kpis span{display:block;color:#71858b;font-size:9px;font-weight:800;letter-spacing:.05em;text-transform:uppercase}.crm-record-kpis b{display:block;margin-top:5px;color:#17282e;font-size:15px}.crm-record-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:14px;padding:0 18px 18px}.crm-record-panel{padding:14px;border:1px solid #dce7ea;border-radius:13px;background:#fff}.crm-record-panel h4{margin:0 0 11px;color:#17282e;font-size:13px}.crm-timeline{display:flex;flex-direction:column}.crm-timeline-item{position:relative;padding:0 0 15px 26px}.crm-timeline-item::before{content:'';position:absolute;left:7px;top:4px;width:9px;height:9px;border-radius:50%;background:#00cfd7;box-shadow:0 0 0 4px #e9fbfc}.crm-timeline-item::after{content:'';position:absolute;left:11px;top:17px;bottom:0;width:1px;background:#dce7ea}.crm-timeline-item:last-child::after{display:none}.crm-timeline-item small,.crm-timeline-item b,.crm-timeline-item p{display:block}.crm-timeline-item small{color:#8a9ba0;font-size:9.5px}.crm-timeline-item b{margin-top:3px;color:#17282e;font-size:12px}.crm-timeline-item p{margin:3px 0 0;color:#71858b;font-size:11px;line-height:1.45}.crm-record-row{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid #edf2f3}.crm-record-row small{display:block;margin-top:3px;color:#71858b;font-size:10px}@media(max-width:1050px){.crm-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.crm-panel-head{flex-direction:column}.crm-toolbar{width:100%;justify-content:flex-start}.crm-toolbar input{flex:1 1 260px;width:auto}.crm-record-grid{grid-template-columns:1fr}}@media(max-width:760px){.crm-metric-grid{grid-template-columns:1fr 1fr}.crm-kanban{grid-template-columns:repeat(7,86vw)}.crm-kanban-col{width:86vw;min-width:86vw;max-width:86vw}.crm-form-grid{grid-template-columns:1fr}.crm-form-grid .full{grid-column:auto}.crm-record-hero{grid-template-columns:1fr}.crm-record-actions{justify-content:flex-start}.crm-record-kpis{grid-template-columns:1fr 1fr}}@media(max-width:440px){.crm-metric-grid,.crm-record-kpis{grid-template-columns:1fr}}
