:root {
  color-scheme: dark;
  --bg: #080a0f;
  --panel: #111722;
  --panel-2: #172131;
  --text: #f6f8fb;
  --muted: #a8b4c2;
  --gold: #f6b700;
  --green: #20c973;
  --red: #ff5c70;
  --line: #253246;
  --sidebar-bg: #090d14;
  --nav-bg: rgba(255,255,255,.04);
  --shadow: 0 18px 42px rgba(0,0,0,.20);
  --soft-shadow: 0 10px 24px rgba(0,0,0,.14);
}

body.light {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-2: #eef2f7;
  --text: #121722;
  --muted: #526071;
  --line: #d9e0ea;
  --sidebar-bg: #ffffff;
  --nav-bg: #eef2f7;
  --shadow: 0 16px 40px rgba(20,30,45,.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0;
  font-size: 13px;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea {
  font: inherit;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 8px 10px;
  outline: none;
  transition: border-color .18s ease, transform .18s ease, background .18s ease, box-shadow .18s ease;
}
input:focus, select:focus, textarea:focus { border-color: rgba(246,183,0,.75); box-shadow: 0 0 0 3px rgba(246,183,0,.10); }
button {
  background: var(--gold);
  color: #111;
  border: 0;
  font-weight: 750;
  cursor: pointer;
  min-height: 36px;
}
button:hover, .button-like:hover { transform: translateY(-1px); filter: brightness(1.03); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.secondary {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
}
button.danger-button, .danger-button {
  background: var(--red);
  color: white;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 292px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--soft-shadow);
  overflow-y: auto;
  max-height: 100vh;
}
.brand img {
  display: block;
  width: min(210px, 100%);
  height: auto;
  margin: 0 auto 14px;
}
.brand {
  text-align: center;
}
.brand span, .userbox, .institutional { color: var(--muted); font-size: 13px; line-height: 1.45; }
.brand .site-button {
  margin: 14px auto 0;
}
nav { display: grid; gap: 8px; }
nav a, .institutional a {
  display: block;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--nav-bg);
  color: var(--text);
  border: 1px solid transparent;
}
nav a:hover, .institutional a:hover {
  border-color: rgba(246,183,0,.35);
  background: rgba(246,183,0,.08);
  transform: translateY(-1px);
}
.institutional { margin-top: auto; display: grid; gap: 8px; }
.institutional .wa { background: #168c35; color: white; display: flex; align-items: center; gap: 8px; }
.wa-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  font-size: 11px;
  font-weight: 900;
}
.shell {
  margin-left: 292px;
  min-height: 100vh;
  padding: 22px;
}
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.login-card, .panel, .card, .lane {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--soft-shadow);
}
.login-card {
  width: min(440px, 100%);
  padding: 34px;
}
.login-card > img,
.login-card > p,
.login-card > .site-button {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.login-card > p {
  max-width: 360px;
}
.login-card h1 { color: var(--gold); margin-top: 0; }
.login-logo {
  width: min(280px, 100%);
  height: auto;
  display: block;
  margin: 0 auto 20px;
}
.login-card .site-button {
  margin-top: 14px;
  margin-bottom: 24px;
}
.login-card form, .stack { display: grid; gap: 14px; }
label { display: grid; gap: 7px; color: var(--muted); }
.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.top h1 { margin: 0; font-size: 24px; letter-spacing: 0; }
.top p { margin: 6px 0 0; color: var(--muted); }
.top > div:first-child {
  flex: 0 0 auto;
}
.top .actions {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.grid { display: grid; gap: 14px; }
.grid > * { min-width: 0; }
.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { padding: 14px; min-height: 92px; }
.card span { color: var(--muted); display: block; margin-bottom: 8px; }
.card strong { font-size: 22px; color: var(--gold); }
.panel { padding: 14px; margin-bottom: 12px; }
.panel h2 { margin-top: 0; font-size: 16px; }
.inline-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}
.form-grid > *, .filters-grid > *, .period-filter > * {
  min-width: 0;
}
.filters-grid, .period-filter, .order-filter {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}
.period-filter {
  grid-template-columns: minmax(180px, 260px) 160px 160px auto;
}
.order-filter {
  grid-template-columns: minmax(190px, 280px) auto;
}
.auto-field-label,
.financial-doc-form label,
.form-grid label:not(.check-line),
.filters-grid label,
.period-filter label,
.order-filter label {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.auto-field-caption {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}
.auto-field-label > input,
.auto-field-label > select,
.auto-field-label > textarea {
  width: 100%;
  min-width: 0;
}
.auto-field-label.textarea-field {
  grid-column: 1 / -1;
}
.form-grid .span-2 {
  grid-column: span 2;
}
.form-grid .span-full {
  grid-column: 1 / -1;
}
.check-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.55);
  line-height: 1.35;
}
.check-card input[type="checkbox"] {
  width: auto;
  min-width: 18px;
  margin-top: 3px;
}
.check-card span {
  display: block;
}
.check-card .muted {
  margin-top: 4px;
}
.ai-result-list {
  display: grid;
  gap: 9px;
}
.ai-result-row {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.ai-result-row header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.ai-result-row header span {
  font-weight: 800;
  color: var(--muted);
}
.ai-result-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 8px;
}
.ai-result-fields div {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: #f8fafc;
}
.ai-result-fields small {
  display: block;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 4px;
}
.ai-result-row p {
  margin: 0;
  line-height: 1.35;
}
.ai-result-row .actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.ai-scan-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr)) minmax(140px, .8fr);
  gap: 8px;
  align-items: end;
  width: min(100%, 1120px);
  flex: 1 1 760px;
}
.ai-scan-form .check-card {
  min-height: 38px;
  padding: 7px 9px;
}
.ai-scan-form .muted {
  font-size: 11px;
  line-height: 1.25;
  color: #667085;
  max-width: 260px;
}
.ai-select-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 750;
}
.ai-select-check input {
  width: auto;
}
.compact-panel {
  padding: 12px;
}
.compact-actions {
  grid-template-columns: repeat(2, max-content);
  justify-content: start;
}
.toolbar-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.financial-settings-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 1fr) auto;
  gap: 14px;
  align-items: end;
}
.financial-settings-form label,
.financial-settings-form button {
  min-width: 0;
}
.financial-settings-form .check-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.35;
}
.financial-settings-form .check-line input {
  width: auto;
  min-width: 16px;
  margin-top: 3px;
}
.financial-settings-help {
  grid-column: 1 / -1;
  margin: 0;
}
.catalog-item summary {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
}
.catalog-item summary::marker {
  color: var(--gold);
}
.catalog-item form {
  margin-top: 14px;
}
.financial-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
.financial-doc-form,
.financial-doc-form label {
  min-width: 0;
}
.financial-doc-form input,
.financial-doc-form select,
.financial-doc-form textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.financial-doc-form select[multiple] {
  overflow-x: auto;
}
.financial-document-panel {
  overflow: hidden;
}
.financial-generator-form {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: end;
}
.financial-generator-form h2,
.financial-generator-form .document-items-label,
.financial-generator-form button {
  grid-column: 1 / -1;
}
.financial-generator-form select[multiple] {
  min-height: 112px;
}
.financial-generator-form button {
  min-height: 58px;
  align-self: end;
}
.financial-generator-form .document-items-label {
  align-self: stretch;
}
.financial-document-row {
  display: block;
}
.financial-document-row summary {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(150px, .9fr) minmax(150px, .8fr) minmax(120px, .7fr);
  gap: 12px;
  align-items: center;
  cursor: pointer;
}
.document-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  align-items: start;
  margin-top: 12px;
}
.document-actions > *,
.document-actions form,
.document-actions button,
.document-actions .button-like {
  min-width: 0;
  max-width: 100%;
}
.document-actions .form-grid {
  grid-column: 1 / -1;
  width: 100%;
}
.form-grid.compact {
  grid-template-columns: 1fr 1fr;
}
.form-grid textarea {
  grid-column: 1 / -1;
}
.form-section-title {
  grid-column: 1 / -1;
  margin-top: 8px;
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.hidden { display: none !important; }
.notification-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-color: rgba(32,201,115,.38);
  background: color-mix(in srgb, var(--panel) 86%, var(--green));
}
.notification-panel strong {
  color: var(--green);
  font-size: 18px;
}
.notification-panel p {
  margin: 4px 0 0;
  color: var(--muted);
}
.quick-actions, .action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.quick-actions {
  margin-top: 12px;
}
.button-like {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--gold);
  color: #111;
  font-weight: 750;
  padding: 8px 11px;
  min-height: 36px;
}
.site-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 800;
  padding: 10px 13px;
  width: fit-content;
}
.site-button:hover {
  border-color: var(--gold);
}
.button-like.secondary {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
}
.folder-tabs {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  margin: 2px 0 0;
  padding: 0 10px;
  overflow-x: auto;
}
.folder-tabs a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 11px 15px 10px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}
.folder-tabs a.active {
  min-height: 52px;
  padding-top: 15px;
  background: var(--panel);
  color: var(--text);
  border-color: rgba(246,183,0,.55);
  box-shadow: 0 -8px 18px rgba(0,0,0,.06);
}
.folder-tabs + .table {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.table { display: grid; gap: 8px; }
.row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 64px;
}
.clean-table .row:hover { border-color: rgba(246,183,0,.35); background: color-mix(in srgb, var(--panel) 82%, var(--gold)); }
.row span { color: var(--muted); }
.row form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.row form select, .row form button {
  width: 100%;
  min-width: 0;
}
.master-tools {
  display: grid;
  gap: 8px;
}
.master-tools button {
  width: 100%;
  padding: 9px 10px;
  font-size: 12px;
}
.kanban {
  display: grid;
  grid-template-columns: repeat(9, minmax(190px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
}
.lane {
  padding: 10px;
  min-height: 360px;
  overflow: hidden;
  border-top: 4px solid var(--gold);
}
.lane h2 {
  font-size: 13px;
  color: var(--text);
  margin-top: 0;
}
.lane-stage-0 { border-top-color: #ff7a45; }
.lane-stage-1 { border-top-color: #ffb703; }
.lane-stage-2 { border-top-color: #4dabf7; }
.lane-stage-3 { border-top-color: #8b5cf6; }
.lane-stage-4 { border-top-color: #14b8a6; }
.lane-stage-5 { border-top-color: #20c973; }
.lane-stage-6 { border-top-color: #08a05c; }
.lane-stage-7 { border-top-color: #ff5c70; }
.lane-stage-8 { border-top-color: #7b8794; }
.deal {
  display: block;
  background: var(--panel-2);
  padding: 0;
  border-radius: 9px;
  margin-bottom: 7px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  overflow: hidden;
}
.deal-stage-0 { border-left-color: #ff7a45; }
.deal-stage-1 { border-left-color: #ffb703; }
.deal-stage-2 { border-left-color: #4dabf7; }
.deal-stage-3 { border-left-color: #8b5cf6; }
.deal-stage-4 { border-left-color: #14b8a6; }
.deal-stage-5 { border-left-color: #20c973; }
.deal-stage-6 { border-left-color: #08a05c; }
.deal-stage-7 { border-left-color: #ff5c70; }
.deal-stage-8 { border-left-color: #7b8794; }
.deal-closed-customer {
  background: rgba(246,183,0,.12);
  border-color: rgba(246,183,0,.34);
}
.deal-active-customer {
  background: rgba(32,201,115,.13);
  border-color: rgba(32,201,115,.35);
}
.deal-active-customer summary small,
.deal-active-customer .deal-detail-box p {
  color: #1d6b43;
}
.deal-no-lead {
  opacity: .82;
  background: rgba(123,135,148,.12);
}
.deal summary {
  display: grid;
  gap: 2px;
  padding: 7px 9px;
  cursor: pointer;
  min-height: 46px;
}
.deal summary::-webkit-details-marker { display: none; }
.deal summary strong {
  font-size: 12px;
  line-height: 1.15;
}
.deal summary small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deal-detail-box {
  display: grid;
  gap: 5px;
  padding: 8px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.35);
}
.deal-detail-box p {
  margin: 0;
  font-size: 11px;
  line-height: 1.28;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.deal-detail-box strong {
  color: var(--text);
}
.deal form {
  display: grid;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid var(--line);
}
.deal input, .deal select, .deal button, .deal a {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 12px;
}
.deal button {
  white-space: normal;
  line-height: 1.2;
}
.deal a {
  display: block;
  padding: 7px 6px;
}
.deal-action {
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  background: rgba(255,255,255,.04);
  font-weight: 700;
}
.deal-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.deal-action.primary {
  border-color: rgba(32,201,115,.45);
  background: rgba(32,201,115,.12);
  color: var(--green);
}
.conversation-list {
  display: grid;
  gap: 8px;
  max-height: 58vh;
  overflow: auto;
  padding-right: 3px;
}
.conversation-link {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  min-width: 0;
}
.conversation-link.active {
  border-color: rgba(246,183,0,.55);
  box-shadow: inset 0 0 0 1px rgba(246,183,0,.2);
}
.system-user-link {
  border-color: rgba(77,171,247,.45);
  background: rgba(77,171,247,.08);
}
.invalid-conversation-link {
  border-color: rgba(255,92,112,.4);
  background: color-mix(in srgb, var(--panel-2) 84%, #ff5c70);
}
.unseen-conversation-link {
  background: rgba(32, 201, 115, .12);
  border-color: rgba(32, 201, 115, .35);
}
.seen-conversation-link {
  background: var(--panel-2);
}
.conversation-link span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.conversation-seen-state {
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.conversation-seen-state.is-unseen {
  color: #087b45;
}
.conversation-seen-state.is-seen {
  color: var(--muted);
}
.conversation-warning {
  color: var(--red);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.conversation-link small {
  color: var(--muted);
  font-size: 11px;
}
.conversation-warning-box {
  padding: 12px 14px;
  border: 1px solid rgba(255,92,112,.45);
  border-radius: 10px;
  color: var(--red);
  font-weight: 700;
}
.chat-box {
  display: grid;
  gap: 10px;
  min-height: 320px;
  max-height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  min-width: 0;
}
.bubble {
  width: fit-content;
  max-width: min(88%, 100%);
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.bubble.out {
  justify-self: end;
  background: rgba(32,201,115,.13);
}
.bubble small, .bubble span {
  color: var(--muted);
  font-size: 12px;
  display: block;
  overflow-wrap: anywhere;
}
.bubble p {
  margin: 6px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble-media {
  margin: 6px 0 8px;
}
.bubble-media-image {
  display: block;
  max-width: min(320px, 100%);
}
.bubble-media-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.bubble audio,
.bubble video {
  display: block;
  width: min(320px, 100%);
  max-width: 100%;
}
.bubble-delete {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}
.bubble-delete button {
  padding: 6px 10px;
  font-size: 12px;
}
.whatsapp-layout {
  grid-template-columns: minmax(300px, 0.92fr) minmax(430px, 1.08fr);
  align-items: start;
}
.whatsapp-layout > .panel {
  min-width: 0;
  overflow: visible;
}
.whatsapp-layout > .panel.stack:first-child {
  display: flex;
  flex-direction: column;
}
.whatsapp-layout .panel.stack:last-child {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.whatsapp-layout .conversation-link {
  padding: 9px 11px;
}
.whatsapp-layout .conversation-link strong {
  font-size: 13px;
}
.whatsapp-layout .conversation-link span {
  font-size: 12px;
}
.whatsapp-layout .form-grid.compact {
  grid-template-columns: 1fr;
  width: 100%;
}
.whatsapp-layout .form-grid.compact input,
.whatsapp-layout .form-grid.compact select,
.whatsapp-layout .form-grid.compact button {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
}
.whatsapp-layout .form-grid.compact button {
  width: 100%;
}
.whatsapp-layout .chat-box {
  min-height: 260px;
  flex: 0 1 auto;
  max-height: min(56vh, 560px);
  width: 100%;
}
.whatsapp-layout textarea {
  min-height: 86px;
  max-height: 128px;
  resize: vertical;
}
.whatsapp-layout form[action*="/messages"] {
  gap: 10px;
  margin-top: 10px;
  flex: 0 0 auto;
}
.whatsapp-layout form[action*="/messages"] button {
  min-height: 48px;
}
@media (max-width: 1100px) {
  .whatsapp-layout {
    grid-template-columns: 1fr;
  }
  .whatsapp-layout .chat-box {
    max-height: 55vh;
  }
}
.task-list {
  display: grid;
  gap: 12px;
}
.task-card {
  display: block;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-left: 6px solid var(--gold);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
}
.task-card[open] {
  box-shadow: 0 18px 40px rgba(15, 23, 42, .10);
}
.task-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(130px, .55fr) minmax(150px, .65fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
}
.task-summary::-webkit-details-marker { display: none; }
.task-summary::after {
  content: "Abrir";
  color: var(--muted);
  font-size: 12px;
  justify-self: end;
}
.task-card[open] .task-summary::after { content: "Fechar"; }
.task-title-row {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.task-title-row strong,
.task-title-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-card p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
}
.task-card small, .task-card span {
  color: var(--muted);
}
.task-meta-label {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.task-badge {
  justify-self: start;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--text);
  font-weight: 800;
  font-size: 12px;
}
.task-detail {
  display: grid;
  gap: 12px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
}
.task-info {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 13px;
}
.task-history {
  display: grid;
  gap: 8px;
  max-height: 190px;
  overflow: auto;
  padding: 10px;
  border-radius: 10px;
  background: var(--soft);
}
.task-history-item {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.task-actions {
  display: grid;
  grid-template-columns: minmax(130px, .5fr) minmax(190px, 1fr) auto;
  gap: 8px;
  min-width: 0;
}
.task-actions > * {
  min-width: 0;
}
.task-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.task-delete {
  margin: 0;
}
.task-delete .danger-button {
  min-width: 84px;
  padding-inline: 12px;
}
.task-status-pendente { border-left-color: #ff5c70; }
.task-status-em-andamento { border-left-color: #ffb703; }
.task-status-transferida { border-left-color: #8b5cf6; }
.task-status-cancelada { border-left-color: #6b7280; }
.task-status-concluida { border-left-color: #20c973; }
.task-status-pendente .task-badge { background: rgba(255, 92, 112, .14); color: #c21f38; }
.task-status-em-andamento .task-badge { background: rgba(255, 183, 3, .18); color: #8a5a00; }
.task-status-transferida .task-badge { background: rgba(139, 92, 246, .14); color: #5b2bc7; }
.task-status-cancelada .task-badge { background: rgba(107, 114, 128, .16); color: #4b5563; }
.task-status-concluida .task-badge { background: rgba(32, 201, 115, .16); color: #087b45; }
.task-timing-label {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
}
.task-card.task-timing-open {
  background: linear-gradient(90deg, rgba(32, 201, 115, .06), var(--panel) 28%);
}
.task-card.task-timing-overdue {
  background: linear-gradient(90deg, rgba(255, 92, 112, .10), var(--panel) 30%);
}
.task-timing-open .task-timing-label,
.task-info .task-timing-open {
  color: #087b45;
  font-weight: 800;
}
.task-timing-overdue .task-timing-label,
.task-info .task-timing-overdue {
  color: #c21f38;
  font-weight: 900;
}
.task-timing-done .task-timing-label,
.task-info .task-timing-done {
  color: #4b5563;
  font-weight: 800;
}
.schedule-list {
  display: grid;
  gap: 12px;
}
.schedule-card {
  display: block;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-left: 6px solid var(--gold);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
}
.schedule-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(110px, .45fr) minmax(150px, .7fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
}
.schedule-summary::-webkit-details-marker { display: none; }
.schedule-summary::after {
  content: "Abrir";
  color: var(--muted);
  font-size: 12px;
  justify-self: end;
}
.schedule-card[open] .schedule-summary::after { content: "Fechar"; }
.schedule-detail {
  display: grid;
  gap: 12px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
}
.schedule-message {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}
.schedule-message p {
  white-space: pre-wrap;
  margin-bottom: 0;
}
.schedule-status-pendente { border-left-color: #ffb703; }
.schedule-status-enviado { border-left-color: #20c973; }
.schedule-status-erro { border-left-color: #ff5c70; }
.schedule-status-cancelado { border-left-color: #6b7280; }
.schedule-status-pendente .task-badge { background: rgba(255, 183, 3, .18); color: #8a5a00; }
.schedule-status-enviado .task-badge { background: rgba(32, 201, 115, .16); color: #087b45; }
.schedule-status-erro .task-badge { background: rgba(255, 92, 112, .14); color: #c21f38; }
.schedule-status-cancelado .task-badge { background: rgba(107, 114, 128, .16); color: #4b5563; }
.rules-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  padding: 10px 12px;
}
.rules-box summary {
  cursor: pointer;
  font-weight: 800;
}
.rule-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 260px;
  overflow: auto;
}
.rule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.rule-item span {
  display: grid;
  gap: 2px;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tabs a {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-weight: 800;
}
.tabs a.active {
  background: linear-gradient(135deg, var(--gold), #ffd86b);
  color: #17120a;
  border-color: rgba(246, 183, 0, .5);
}
.campaign-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.platform-card {
  display: grid;
  gap: 12px;
}
.platform-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.platform-head h2 {
  margin-bottom: 4px;
}
.switch-line {
  display: inline-flex;
  align-items: center;
  grid-auto-flow: column;
  white-space: nowrap;
  font-weight: 800;
}
.conversion-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--panel);
}
.conversion-row summary {
  cursor: pointer;
}
.conversion-detail {
  padding: 14px;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
}
.conversion-detail pre,
.timeline-item pre {
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  background: var(--panel-2);
}
.status-enviado { color: var(--green); }
.status-erro { color: var(--red); }
.status-pendente { color: var(--gold); }
.ok { color: var(--green); }
.danger { color: var(--red); }
.danger-box {
  border-color: rgba(255,92,112,.45);
  background: color-mix(in srgb, var(--panel) 88%, var(--red));
}
.qr-panel img {
  width: min(280px, 100%);
  height: auto;
  display: block;
  background: white;
  padding: 10px;
  border-radius: 8px;
}
.result strong { color: var(--gold); }
textarea { width: 100%; resize: vertical; }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips span {
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.timeline-item {
  border-left: 3px solid var(--gold);
  padding: 8px 0 8px 12px;
  margin: 8px 0;
}
.timeline-item span {
  color: var(--muted);
  margin-left: 8px;
  font-size: 13px;
}
.muted { color: var(--muted); }

.dashboard-charts {
  margin-top: 14px;
}
.chart-panel {
  min-height: 260px;
}
.bar-chart {
  display: grid;
  gap: 11px;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 3fr 48px;
  gap: 10px;
  align-items: center;
}
.bar-row span {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-row div {
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  overflow: hidden;
}
.bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--green));
}
.bar-row strong {
  color: var(--text);
  text-align: right;
}
.mini-bars {
  display: flex;
  align-items: end;
  gap: 8px;
  min-height: 190px;
  overflow-x: auto;
  padding-top: 18px;
}
.mini-bar {
  display: grid;
  gap: 8px;
  justify-items: center;
  min-width: 38px;
}
.mini-bar strong {
  width: 18px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, var(--gold), var(--green));
}
.mini-bar span {
  color: var(--muted);
  font-size: 11px;
}
.donut-list {
  display: grid;
  gap: 12px;
}
.donut-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.03);
}
.donut-item em {
  color: var(--muted);
  font-style: normal;
}
.dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--gold);
}
.dot.c1 { background: var(--green); }
.dot.c2 { background: #7aa2ff; }
.dot.c3 { background: #ff7a90; }
.dot.c4 { background: #b7f65a; }
.dot.c5 { background: #d8a6ff; }

/* Sales website */
.sales-body {
  --sales-black: #050505;
  --sales-dark: #151515;
  --sales-gold: #D4AF37;
  --sales-bright: #FFD700;
  --sales-green: #25D366;
  --sales-green-dark: #128C3A;
  --sales-muted: #637083;
  --sales-line: rgba(8, 17, 31, .12);
  background:
    radial-gradient(circle at 76% 0%, rgba(212,175,55,.12), transparent 28%),
    linear-gradient(180deg, #fbfcff 0%, #f4f7fb 46%, #eef3f7 100%);
  color: #111827;
  font-size: 15px;
}
.sales-body:not(.light) {
  --sales-muted: #B8B8B8;
  --sales-line: rgba(212, 175, 55, .24);
  background:
    radial-gradient(circle at top left, rgba(212,175,55,.14), transparent 28%),
    linear-gradient(180deg, #050505 0%, #111 100%);
  color: #fff;
}
.sales-body a { color: inherit; }
.sales-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, .84);
  border: 1px solid rgba(8, 17, 31, .08);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
}
.sales-body:not(.light) .sales-nav {
  background: rgba(5, 5, 5, .84);
  border-bottom-color: rgba(212, 175, 55, .18);
}
.sales-logo img {
  width: 224px;
  max-height: 46px;
  object-fit: contain;
  max-width: 48vw;
  display: block;
}
.sales-nav nav {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--sales-muted);
  font-weight: 700;
  font-size: 14px;
}
.sales-nav nav a:hover { color: var(--sales-gold); }
.theme-toggle {
  border: 1px solid var(--sales-line);
  background: rgba(255,255,255,.72);
  color: inherit;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}
.sales-body:not(.light) .theme-toggle { background: rgba(255,255,255,.06); }
.sales-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px 54px;
}
.sales-campaign {
  max-width: 1180px;
  margin: 16px auto 0;
  padding: 12px 16px;
  border: 1px solid rgba(212, 175, 55, .38);
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(255,215,0,.22), rgba(37,211,102,.12));
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #3a2b00;
  font-weight: 800;
}
.sales-body:not(.light) .sales-campaign { color: #fff3bb; }
.sales-hero {
  min-height: calc(100vh - 110px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, .98fr);
  align-items: center;
  gap: 44px;
  padding: 58px 0 44px;
}
.sales-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 9px 13px;
  border: 1px solid rgba(212,175,55,.38);
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  color: #5a4505;
  font-weight: 900;
  margin-bottom: 18px;
}
.sales-body:not(.light) .sales-badge {
  background: rgba(255,255,255,.06);
  color: #ffe999;
}
.sales-copy h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(42px, 5.8vw, 74px);
  line-height: .96;
  letter-spacing: 0;
}
.sales-copy p {
  color: var(--sales-muted);
  font-size: 19px;
  line-height: 1.56;
  max-width: 700px;
}
.sales-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}
.sales-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.sales-proof span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 999px;
  color: #193225;
  background: rgba(37,211,102,.16);
  border: 1px solid rgba(37,211,102,.22);
  font-weight: 900;
}
.sales-proof span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--sales-green);
}
.sales-body:not(.light) .sales-proof span {
  color: #d9ffe8;
  background: rgba(37,211,102,.10);
}
.sales-cta,
.checkout-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sales-green), var(--sales-green-dark));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(37, 211, 102, .22);
  cursor: pointer;
  text-decoration: none;
}
.sales-cta:hover,
.checkout-card button:hover { transform: translateY(-1px); }
.sales-cta.ghost {
  background: rgba(255,255,255,.76);
  color: #101828;
  border: 1px solid var(--sales-line);
  box-shadow: none;
}
.sales-body:not(.light) .sales-cta.ghost {
  color: #fff;
  background: rgba(255,255,255,.06);
}
.sales-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--sales-muted);
  font-weight: 800;
}
.sales-mini span {
  border: 1px solid var(--sales-line);
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(255,255,255,.58);
}
.sales-body:not(.light) .sales-mini span { background: rgba(255,255,255,.05); }
.sales-mockup {
  border: 1px solid var(--sales-line);
  border-radius: 28px;
  padding: 16px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 34px 90px rgba(15, 23, 42, .17);
  transform: rotate(1deg);
}
.sales-body:not(.light) .sales-mockup {
  background: rgba(255,255,255,.06);
  box-shadow: 0 34px 80px rgba(0,0,0,.34);
}
.mock-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--sales-line);
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.mock-logo { width: 170px; max-width: 48%; }
.mock-pill {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(37,211,102,.14);
  color: var(--sales-green-dark);
  font-weight: 900;
}
.mock-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.mock-card,
.mock-chart,
.mock-chat {
  border: 1px solid var(--sales-line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(248, 250, 252, .9);
}
.sales-body:not(.light) .mock-card,
.sales-body:not(.light) .mock-chart,
.sales-body:not(.light) .mock-chat { background: rgba(5,5,5,.34); }
.mock-card strong {
  display: block;
  font-size: 23px;
  margin-top: 6px;
}
.mock-card em {
  display: block;
  color: var(--sales-muted);
  font-style: normal;
  margin-top: 6px;
  font-size: 13px;
}
.mock-chart {
  display: flex;
  align-items: end;
  gap: 10px;
  min-height: 190px;
}
.mock-chart i {
  flex: 1;
  min-width: 22px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, var(--sales-bright), var(--sales-green));
}
.mock-chat { display: grid; gap: 10px; }
.mock-chat span {
  padding: 11px;
  border-radius: 16px;
  background: #eef3fa;
  color: #25324a;
}
.mock-chat span:nth-child(even) {
  justify-self: end;
  background: rgba(37,211,102,.18);
}
.sales-body:not(.light) .mock-chat span { color: #fff; background: rgba(255,255,255,.08); }
.mock-table {
  display: grid;
  grid-template-columns: .8fr 1.3fr 1fr;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  background: #0f172a;
  color: #fff;
}
.mock-table span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.mock-table strong,
.mock-table em,
.mock-table b {
  background: rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 10px;
  font-style: normal;
}
.mock-table b {
  color: #b7ffd2;
}
.sales-section {
  padding: 66px 0;
  border-top: 1px solid rgba(8,17,31,.08);
}
.sales-body:not(.light) .sales-section { border-top-color: rgba(212,175,55,.14); }
.sales-section h2,
.checkout-card h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
}
.section-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 8px 11px;
  margin-bottom: 14px;
  border-radius: 999px;
  color: #725800;
  background: rgba(212,175,55,.18);
  border: 1px solid rgba(212,175,55,.22);
  font-weight: 950;
}
.sales-body:not(.light) .section-kicker {
  color: #ffe999;
  background: rgba(212,175,55,.11);
}
.sales-section > p,
.ai-band p,
.checkout-card p {
  color: var(--sales-muted);
  line-height: 1.6;
  max-width: 850px;
}
.sales-cards,
.resource-grid,
.pricing,
.faq-list,
.testimonials,
.metric-wall,
.compare-grid,
.steps > div {
  display: grid;
  gap: 14px;
}
.sales-cards { grid-template-columns: repeat(3, 1fr); }
.resource-grid { grid-template-columns: repeat(4, 1fr); }
.pricing { grid-template-columns: repeat(3, 1fr); }
.steps > div { grid-template-columns: repeat(3, 1fr); }
.testimonials { grid-template-columns: repeat(2, 1fr); }
.metric-wall { grid-template-columns: repeat(4, 1fr); margin-top: 24px; }
.compare-grid { grid-template-columns: repeat(2, 1fr); margin-top: 22px; }
.sales-cards article,
.resource-grid article,
.pricing article,
.steps article,
.testimonials article,
.faq-list details,
.ai-band,
.metric-wall article,
.compare-grid article,
.guarantee {
  border: 1px solid var(--sales-line);
  border-radius: 22px;
  background: rgba(255,255,255,.82);
  padding: 20px;
  box-shadow: 0 18px 40px rgba(15,23,42,.08);
}
.sales-body:not(.light) .sales-cards article,
.sales-body:not(.light) .resource-grid article,
.sales-body:not(.light) .pricing article,
.sales-body:not(.light) .steps article,
.sales-body:not(.light) .testimonials article,
.sales-body:not(.light) .faq-list details,
.sales-body:not(.light) .ai-band,
.sales-body:not(.light) .metric-wall article,
.sales-body:not(.light) .compare-grid article,
.sales-body:not(.light) .guarantee {
  background: rgba(255,255,255,.055);
  box-shadow: none;
}
.pain-cards article:first-child,
.metric-wall article:first-child,
.compare-grid article:nth-child(2) {
  border-color: rgba(212,175,55,.42);
}
.radar-section {
  padding: 42px;
  margin: 20px 0;
  border: 1px solid rgba(212,175,55,.24);
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(255,215,0,.18), transparent 35%),
    rgba(255,255,255,.56);
}
.sales-body:not(.light) .radar-section {
  background:
    radial-gradient(circle at top right, rgba(255,215,0,.16), transparent 35%),
    rgba(255,255,255,.035);
}
.metric-wall article strong {
  display: block;
  font-size: 22px;
  margin-bottom: 8px;
}
.metric-wall article span,
.compare-grid article p {
  color: var(--sales-muted);
  line-height: 1.55;
}
.compare-grid article span {
  display: block;
  margin-bottom: 14px;
  font-size: 22px;
  font-weight: 950;
}
.compare-grid article:nth-child(1) span { color: #d64a5f; }
.compare-grid article:nth-child(2) span { color: var(--sales-green-dark); }
.sales-cards h3,
.resource-grid h3,
.pricing h3,
.steps h3 {
  margin: 0 0 8px;
}
.sales-cards p,
.resource-grid p,
.steps p,
.pricing p,
.testimonials p {
  color: var(--sales-muted);
  line-height: 1.52;
}
.resource-grid article h3 {
  font-size: 17px;
}
.pricing article {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
}
.pricing article.featured {
  border-color: rgba(212,175,55,.76);
  box-shadow: 0 28px 70px rgba(212,175,55,.18);
  transform: translateY(-8px);
}
.pricing article > span {
  width: fit-content;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(212,175,55,.14);
  color: #795f06;
  font-weight: 900;
}
.sales-body:not(.light) .pricing article > span { color: #ffe999; }
.pricing strong {
  font-size: 32px;
  color: var(--sales-gold);
}
.pricing s {
  color: var(--sales-muted);
  font-size: 18px;
  margin-right: 6px;
}
.pricing ul {
  margin: 0;
  padding-left: 18px;
  color: var(--sales-muted);
  line-height: 1.8;
  flex: 1;
}
.pricing .sales-cta.ghost { margin-top: -4px; }
.ai-band {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 18px;
  align-items: center;
  background: linear-gradient(135deg, rgba(212,175,55,.18), rgba(37,211,102,.12));
}
.ai-options {
  display: grid;
  gap: 10px;
}
.ai-options span {
  border-radius: 16px;
  padding: 12px;
  background: rgba(255,255,255,.62);
  border: 1px solid var(--sales-line);
  font-weight: 900;
}
.sales-body:not(.light) .ai-options span { background: rgba(0,0,0,.22); }
.crm-suite {
  padding: 42px;
  border: 1px solid rgba(37,211,102,.22);
  border-radius: 32px;
  background:
    radial-gradient(circle at bottom left, rgba(37,211,102,.14), transparent 36%),
    rgba(255,255,255,.56);
}
.sales-body:not(.light) .crm-suite {
  background:
    radial-gradient(circle at bottom left, rgba(37,211,102,.12), transparent 36%),
    rgba(255,255,255,.035);
}
.payment-safe {
  margin: 18px auto 0;
  width: fit-content;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(37,211,102,.13);
  color: #128C3A;
  border: 1px solid rgba(37,211,102,.22);
  font-weight: 950;
  text-align: center;
}
.sales-body:not(.light) .payment-safe {
  color: #d9ffe8;
  background: rgba(37,211,102,.08);
}
.guarantee {
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
  background:
    radial-gradient(circle at top, rgba(37,211,102,.18), transparent 38%),
    rgba(255,255,255,.86);
}
.guarantee p {
  margin: 0 auto 20px;
  max-width: 760px;
  color: var(--sales-muted);
  line-height: 1.6;
}
.faq-list details summary {
  cursor: pointer;
  font-weight: 900;
}
.faq-list details p {
  color: var(--sales-muted);
  line-height: 1.55;
}
.sales-footer {
  margin-top: 22px;
  padding: 34px 0 54px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  border-top: 1px solid var(--sales-line);
  color: var(--sales-muted);
  text-align: center;
  justify-items: center;
}
.sales-footer img {
  width: 260px;
  max-width: 70vw;
  max-height: 58px;
  object-fit: contain;
}
.sales-footer small a {
  color: var(--sales-green-dark);
  font-weight: 950;
}
.sales-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: center;
}
.checkout-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}
.checkout-card {
  width: min(560px, 100%);
  border: 1px solid var(--sales-line);
  border-radius: 28px;
  padding: 30px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 34px 80px rgba(15,23,42,.16);
  display: grid;
  gap: 14px;
}
.sales-body:not(.light) .checkout-card { background: rgba(255,255,255,.07); }
.checkout-card img {
  width: 230px;
  max-width: 80%;
}
.manual-card {
  text-align: center;
}
.manual-card img {
  margin: 0 auto;
}
.manual-actions {
  justify-content: center;
  margin: 6px 0;
}
.manual-card p {
  margin-left: auto;
  margin-right: auto;
}
.help-resource-grid,
.help-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  text-align: left;
}
.help-resource-grid article,
.help-visual-grid article {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--sales-line);
  background: rgba(255,255,255,.72);
}
.sales-body:not(.light) .help-resource-grid article,
.sales-body:not(.light) .help-visual-grid article {
  background: rgba(255,255,255,.06);
}
.help-resource-grid h2,
.help-visual-grid strong {
  margin: 0;
  color: var(--sales-gold);
}
.help-resource-grid p,
.help-visual-grid span {
  margin: 0;
  color: var(--sales-muted);
}
.checkout-card strong {
  color: var(--sales-gold);
  font-size: 30px;
}
.checkout-card form {
  display: grid;
  gap: 11px;
}
.checkout-card input {
  min-height: 48px;
  border: 1px solid var(--sales-line);
  border-radius: 14px;
  padding: 0 14px;
  font: inherit;
  background: rgba(255,255,255,.72);
  color: inherit;
}
.sales-body:not(.light) .checkout-card input { background: rgba(0,0,0,.22); }

.tracking-shell {
  display: grid;
  gap: 18px;
}
.tracking-intro {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}
.tracking-intro p,
.setup-choice p,
.tracking-code-card p {
  color: var(--muted);
  line-height: 1.55;
}
.setup-choice {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255,255,255,.72);
}
.tracking-code-card {
  display: grid;
  gap: 10px;
}
.tracking-code {
  white-space: pre-wrap;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #eef3f9;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 1250px) {
  .task-summary { grid-template-columns: 1fr 1fr; }
  .schedule-summary { grid-template-columns: 1fr 1fr; }
  .ai-scan-form { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .task-controls {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: auto;
  }
  .shell { margin-left: 0; padding: 16px; }
  .cards, .three, .two, .inline-form, .form-grid, .filters-grid, .period-filter, .order-filter, .campaign-grid, .financial-settings-form, .financial-grid, .financial-generator-form, .ai-scan-form, .ai-result-fields { grid-template-columns: 1fr; }
  .ai-result-row header { align-items: flex-start; flex-direction: column; }
  .task-summary, .schedule-summary, .task-actions, .task-controls { grid-template-columns: 1fr; }
  .task-summary::after, .schedule-summary::after { justify-self: start; }
  .row { grid-template-columns: 1fr; }
  .toolbar-panel { align-items: stretch; }
  .tracking-intro { flex-direction: column; }
  .bar-row { grid-template-columns: 1fr; }
  .sales-nav {
    position: static;
    flex-wrap: wrap;
  }
  .sales-nav nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .sales-hero,
  .ai-band,
  .sales-footer {
    grid-template-columns: 1fr;
  }
  .sales-cards,
  .help-resource-grid,
  .help-visual-grid,
  .resource-grid,
  .pricing,
  .steps > div,
  .testimonials,
  .metric-wall,
  .compare-grid {
    grid-template-columns: 1fr;
  }
  .pricing article.featured { transform: none; }
  .sales-copy h1 { font-size: 42px; }
  .sales-mockup { padding: 12px; border-radius: 20px; }
  .mock-grid { grid-template-columns: 1fr; }
  .mock-table { grid-template-columns: 1fr; }
  .radar-section { padding: 24px; border-radius: 24px; }
  .crm-suite { padding: 24px; border-radius: 24px; }
  .sales-footer nav { justify-content: center; }
}

/* ============================================================
   PWA / MOBILE — Flow Radar CRM v2.2.71
   Melhorias de usabilidade para celular e tablet
   ============================================================ */

/* Garante que o app ocupe a tela toda quando instalado como PWA */
@media (display-mode: standalone) {
  body { padding-top: env(safe-area-inset-top); }
  .shell { padding-bottom: env(safe-area-inset-bottom); }
}

@media (max-width: 768px) {

  /* =====================================================
     BOTTOM NAV BAR
     ===================================================== */
  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto !important;
    height: 80px;
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    z-index: 300;
    padding: 6px 8px 6px 8px;
    border-top: 2px solid var(--line);
    border-right: none;
    gap: 0;
    justify-content: flex-start;
    align-items: center;
    box-shadow: 0 -4px 16px rgba(0,0,0,.18);
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .sidebar::-webkit-scrollbar { display: none; }

  /* Gradiente lateral — indica que tem mais itens para rolar */
  .sidebar::after {
    content: '›';
    position: fixed;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 80px;
    background: linear-gradient(to left, var(--sidebar-bg) 40%, transparent);
    pointer-events: none;
    z-index: 301;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 4px;
    font-size: 20px;
    color: var(--muted);
  }

  .sidebar nav {
    display: flex;
    flex-direction: row;
    gap: 0;
    flex-shrink: 0;
  }

  /* Links de navegacao — maiores e mais legíveis */
  .sidebar nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    white-space: nowrap;
    min-width: 70px;
    text-align: center;
    border-radius: 10px;
    gap: 0;
    flex-shrink: 0;
    height: 64px;
    line-height: 1.3;
  }

  /* Botao Sair — no fluxo normal do nav, NAO fixo */
  .sidebar .mobile-logout {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    white-space: nowrap;
    min-width: 70px;
    text-align: center;
    border-radius: 10px;
    gap: 0;
    flex-shrink: 0;
    height: 64px;
    color: #e53e3e;
    text-decoration: none;
    border-left: 1px solid var(--line);
    margin-left: 4px;
  }

  /* Esconde elementos que nao pertencem ao bottom nav */
  .sidebar .brand,
  .sidebar .userbox,
  .sidebar .institutional,
  .sidebar .site-button,
  .sidebar .master-tools {
    display: none !important;
  }

  /* =====================================================
     SHELL / CONTEUDO PRINCIPAL
     ===================================================== */
  .shell {
    margin-left: 0 !important;
    padding-bottom: 100px !important;
    padding-top: 16px;
    padding-left: 12px;
    padding-right: 12px;
  }

  /* =====================================================
     FORMULARIOS — corrige sobreposicao de labels/inputs
     ===================================================== */
  .form-grid {
    grid-template-columns: 1fr !important;
  }
  .form-grid .span-2,
  .form-grid .span-full {
    grid-column: 1 / -1 !important;
  }
  .filters-grid,
  .period-filter,
  .order-filter {
    grid-template-columns: 1fr !important;
  }
  /* Labels empilham corretamente: texto em cima, input embaixo */
  .form-grid label,
  .filters-grid label,
  .period-filter label,
  .order-filter label,
  .auto-field-label,
  .financial-doc-form label {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    width: 100% !important;
  }
  /* Todos inputs/selects ocupam 100% */
  input, select, textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }
  button {
    box-sizing: border-box;
  }
  /* Grids de cards viram 1 coluna */
  .grid.two,
  .grid.three,
  .cards,
  .three,
  .two {
    grid-template-columns: 1fr !important;
  }

  /* =====================================================
     FORMULARIOS FINANCEIROS — tambem 1 coluna
     ===================================================== */
  .financial-settings-form,
  .financial-form,
  .financial-doc-form,
  .financial-generator-form {
    grid-template-columns: 1fr !important;
  }
  .financial-settings-form label,
  .financial-form label {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }

  /* =====================================================
     KANBAN / FUNIL — scroll horizontal entre colunas
     ===================================================== */
  .kanban {
    display: flex !important;
    flex-direction: row;
    overflow-x: auto;
    gap: 12px;
    padding: 8px 4px 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .kanban .lane {
    min-width: 88vw;
    max-width: 92vw;
    scroll-snap-align: start;
    flex-shrink: 0;
  }
  /* Deal cards — conteudo completo visivel */
  .deal summary small {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
  }
  .deal-detail-box p {
    font-size: 12px !important;
    overflow-wrap: anywhere;
  }
  .deal form {
    padding: 10px 8px;
  }
  .deal-buttons {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
  }
  .deal input, .deal select {
    font-size: 14px !important;
    padding: 10px 8px !important;
  }

  /* =====================================================
     CARDS E PAINEIS
     ===================================================== */
  .deal summary {
    padding: 12px;
    min-height: 56px;
  }
  .table .row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
  }
  .panel {
    padding: 12px;
    border-radius: 10px;
  }

  /* =====================================================
     CABECALHO TOP
     ===================================================== */
  .top {
    flex-direction: column;
    gap: 8px;
    padding: 12px 0;
  }
  .top h1 { font-size: 1.3rem; }
  .actions {
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }
  .actions a, .actions button {
    width: 100%;
    text-align: center;
  }

  /* =====================================================
     TOOLBAR DE PERIODO
     ===================================================== */
  .toolbar-panel {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* =====================================================
     WHATSAPP
     ===================================================== */
  .conversation-layout {
    flex-direction: column;
  }
  .conversation-list {
    max-height: 40vh;
    overflow-y: auto;
  }

  /* =====================================================
     TASK / AGENDAMENTOS — garante que mostra tudo
     ===================================================== */
  .task-summary {
    grid-template-columns: 1fr !important;
  }
  .task-card {
    overflow: visible;
  }
}

@media (max-width: 480px) {
  .kanban .lane { min-width: 88vw; max-width: 92vw; }
  .top h1 { font-size: 1.1rem; }
  .panel { padding: 10px; }
}
