/* ==========================================================
   WhatsCompany Admin - Layout Final Suave
   Referência: print enviado pelo Julio
   Substituir: assets/css/style.css
   ========================================================== */

@import url("mobile-fix.css");
@import url("financeiro-fix.css");
@import url("dashboard-financeiro-fix.css");

* {
  box-sizing: border-box;
}

/* ==========================================================
   Agenda interna individual
   ========================================================== */

.internal-agenda-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.internal-agenda-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.internal-agenda-eyebrow svg,
.internal-agenda-submit svg {
  width: 18px;
  height: 18px;
}

.internal-agenda-alert {
  margin-bottom: 18px;
}

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

.internal-agenda-summary article {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.internal-agenda-summary-icon {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  color: var(--blue);
  background: rgba(8, 124, 255, .1);
}

.internal-agenda-summary-icon svg {
  width: 22px;
  height: 22px;
}

.internal-agenda-summary-icon.is-orange { color: #e96f12; background: rgba(249, 115, 22, .12); }
.internal-agenda-summary-icon.is-red { color: var(--danger); background: rgba(255, 77, 116, .11); }
.internal-agenda-summary-icon.is-green { color: var(--success); background: rgba(16, 185, 129, .11); }

.internal-agenda-summary article > div {
  display: grid;
  min-width: 0;
}

.internal-agenda-summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.internal-agenda-summary strong {
  margin: 2px 0;
  color: var(--text);
  font-size: 27px;
  line-height: 1;
}

.internal-agenda-summary article div span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.internal-agenda-layout {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.internal-agenda-create,
.internal-agenda-list-card {
  padding: 22px;
  border-radius: 20px;
}

.internal-agenda-create {
  position: sticky;
  top: 18px;
}

.internal-agenda-section-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 20px;
}

.internal-agenda-create-toggle {
  display: none;
}

.internal-agenda-section-icon {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(8, 124, 255, .15);
  border-radius: 15px;
  color: var(--blue);
  background: rgba(8, 124, 255, .08);
}

.internal-agenda-section-icon svg {
  width: 22px;
  height: 22px;
}

.internal-agenda-section-head h2,
.internal-agenda-list-head h2,
.internal-agenda-modal-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}

.internal-agenda-section-head p,
.internal-agenda-list-head p,
.internal-agenda-modal-card header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.internal-agenda-form {
  display: grid;
  gap: 15px;
}

.internal-agenda-field {
  display: grid;
  gap: 7px;
}

.internal-agenda-field > span {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
}

.internal-agenda-field > span small {
  color: var(--muted);
  font-weight: 600;
}

.internal-agenda-field input,
.internal-agenda-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  outline: none;
  color: var(--text);
  background: var(--surface-soft);
  font: inherit;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.internal-agenda-field textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.5;
}

.internal-agenda-field input:focus,
.internal-agenda-field textarea:focus {
  border-color: rgba(8, 124, 255, .65);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(8, 124, 255, .1);
}

.internal-agenda-date-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 12px;
}

.internal-agenda-private-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(8, 124, 255, .12);
  border-radius: 13px;
  color: var(--muted);
  background: rgba(8, 124, 255, .055);
  font-size: 12px;
  line-height: 1.45;
}

.internal-agenda-private-note svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--blue);
}

.internal-agenda-private-note strong {
  color: var(--text-soft);
}

.internal-agenda-sharing-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--muted);
  background: var(--surface-soft);
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.internal-agenda-sharing-option input {
  position: absolute;
  opacity: 0;
}

.internal-agenda-sharing-switch {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--border);
  transition: background-color .18s ease, box-shadow .18s ease;
}

.internal-agenda-sharing-switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, .2);
  transition: transform .18s ease;
}

.internal-agenda-sharing-option > span:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.internal-agenda-sharing-option strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.internal-agenda-sharing-option small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.internal-agenda-sharing-option:has(input:checked) {
  border-color: rgba(8, 124, 255, .3);
  background: rgba(8, 124, 255, .06);
}

.internal-agenda-sharing-option input:checked + .internal-agenda-sharing-switch {
  background: var(--blue);
}

.internal-agenda-sharing-option input:checked + .internal-agenda-sharing-switch span {
  transform: translateX(18px);
}

.internal-agenda-sharing-option input:focus-visible + .internal-agenda-sharing-switch {
  box-shadow: 0 0 0 4px rgba(8, 124, 255, .15);
}

.internal-agenda-sharing-option.is-compact {
  margin-top: 2px;
}

.internal-agenda-sharing-config[hidden],
.internal-agenda-recipient-list[hidden] {
  display: none !important;
}

.internal-agenda-sharing-config {
  display: grid;
  gap: 10px;
  margin-top: -5px;
  padding: 11px;
  border: 1px solid rgba(8, 124, 255, .16);
  border-radius: 12px;
  background: rgba(8, 124, 255, .035);
}

.internal-agenda-sharing-scope {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.internal-agenda-sharing-scope label {
  position: relative;
  cursor: pointer;
}

.internal-agenda-sharing-scope input {
  position: absolute;
  opacity: 0;
}

.internal-agenda-sharing-scope label > span {
  display: inline-flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--muted);
  background: var(--surface);
  font-size: 10px;
  font-weight: 800;
}

.internal-agenda-sharing-scope label > span svg {
  width: 14px;
  height: 14px;
}

.internal-agenda-sharing-scope input:checked + span {
  border-color: rgba(8, 124, 255, .32);
  color: var(--blue);
  background: rgba(8, 124, 255, .08);
  box-shadow: 0 0 0 2px rgba(8, 124, 255, .06);
}

.internal-agenda-recipient-list {
  display: grid;
  max-height: 190px;
  overflow-y: auto;
  gap: 6px;
  padding-right: 2px;
}

.internal-agenda-recipient-list > label {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
}

.internal-agenda-recipient-list input {
  position: absolute;
  opacity: 0;
}

.internal-agenda-recipient-list label > span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  color: transparent;
}

.internal-agenda-recipient-list label > span svg {
  width: 13px;
  height: 13px;
  stroke-width: 3;
}

.internal-agenda-recipient-list label > strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.internal-agenda-recipient-list label > small {
  color: var(--muted);
  font-size: 9px;
}

.internal-agenda-recipient-list input:checked + span {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.internal-agenda-recipient-list > p {
  margin: 0;
  padding: 10px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.internal-agenda-submit {
  justify-content: center;
  width: 100%;
  min-height: 48px;
}

.internal-agenda-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.internal-agenda-filters {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.internal-agenda-filters button {
  min-height: 32px;
  padding: 6px 11px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.internal-agenda-filters button.is-active {
  color: var(--blue);
  background: var(--surface);
  box-shadow: 0 3px 10px rgba(15, 23, 42, .08);
}

.internal-agenda-search-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 14px;
}

.internal-agenda-search {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.internal-agenda-search svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.internal-agenda-search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px 10px 43px;
  border: 1px solid var(--border);
  border-radius: 13px;
  outline: 0;
  color: var(--text);
  background: var(--surface-soft);
  font: inherit;
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.internal-agenda-search input::placeholder {
  color: var(--muted-light);
}

.internal-agenda-search input:focus {
  border-color: rgba(8, 124, 255, .5);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(8, 124, 255, .1);
}

.internal-agenda-reset-filters {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--muted);
  background: var(--surface-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.internal-agenda-reset-filters svg {
  width: 16px;
  height: 16px;
}

.internal-agenda-reset-filters:hover {
  border-color: rgba(8, 124, 255, .3);
  color: var(--blue);
  background: rgba(8, 124, 255, .07);
}

.internal-agenda-period {
  display: grid;
  grid-template-columns: 150px 150px minmax(0, 1fr);
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
}

.internal-agenda-period > label {
  display: grid;
  gap: 5px;
}

.internal-agenda-period > label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.internal-agenda-period input {
  width: 100%;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: 0;
  color: var(--text);
  background: var(--surface-soft);
  font: inherit;
  font-size: 13px;
}

.internal-agenda-period input:focus {
  border-color: rgba(8, 124, 255, .5);
  box-shadow: 0 0 0 3px rgba(8, 124, 255, .09);
}

.internal-agenda-period-shortcuts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.internal-agenda-period-shortcuts button {
  min-height: 40px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface-soft);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.internal-agenda-period-shortcuts button:hover,
.internal-agenda-period-shortcuts button.is-active {
  border-color: rgba(8, 124, 255, .32);
  color: var(--blue);
  background: rgba(8, 124, 255, .08);
}

.internal-agenda-events {
  display: grid;
  gap: 12px;
}

.internal-agenda-pagination[hidden],
.internal-agenda-empty[hidden] {
  display: none !important;
}

.internal-agenda-search-empty {
  min-height: 220px;
}

.internal-agenda-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--border-soft);
}

.internal-agenda-pagination button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text-soft);
  background: var(--surface-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.internal-agenda-pagination button svg {
  width: 16px;
  height: 16px;
}

.internal-agenda-pagination button:hover:not(:disabled) {
  border-color: rgba(8, 124, 255, .3);
  color: var(--blue);
  background: rgba(8, 124, 255, .07);
}

.internal-agenda-pagination button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.internal-agenda-pagination > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.internal-agenda-event {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 15px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface-soft);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.internal-agenda-event[hidden] {
  display: none !important;
}

.internal-agenda-event:hover {
  border-color: rgba(8, 124, 255, .26);
  box-shadow: 0 9px 24px rgba(15, 23, 42, .055);
  transform: translateY(-1px);
}

.internal-agenda-event.is-overdue {
  border-color: rgba(255, 77, 116, .28);
}

.internal-agenda-event.is-completed {
  opacity: .72;
}

.internal-agenda-event.is-focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(8, 124, 255, .12), 0 12px 30px rgba(8, 124, 255, .1);
}

.internal-agenda-event-date {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 62px;
  border: 1px solid rgba(8, 124, 255, .14);
  border-radius: 15px;
  color: var(--blue);
  background: rgba(8, 124, 255, .075);
}

.internal-agenda-event.is-overdue .internal-agenda-event-date {
  border-color: rgba(255, 77, 116, .16);
  color: var(--danger);
  background: rgba(255, 77, 116, .08);
}

.internal-agenda-event-date span {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.internal-agenda-event-date small {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

.internal-agenda-event-main {
  min-width: 0;
}

.internal-agenda-event-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.internal-agenda-event-title-row > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.internal-agenda-event-title-row strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.internal-agenda-event-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.internal-agenda-event-time svg {
  width: 14px;
  height: 14px;
}

.internal-agenda-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(8, 124, 255, .09);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.internal-agenda-status svg {
  width: 12px;
  height: 12px;
}

.internal-agenda-status.is-overdue { color: var(--danger); background: rgba(255, 77, 116, .1); }
.internal-agenda-status.is-completed { color: var(--success); background: rgba(16, 185, 129, .1); }

.internal-agenda-event-main > p {
  overflow: hidden;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.internal-agenda-event-sharing,
.internal-agenda-readonly {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  margin-top: 9px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
}

.internal-agenda-event-sharing svg,
.internal-agenda-readonly svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
}

.internal-agenda-readonly {
  margin-top: 0;
  padding: 7px 2px;
  color: var(--muted);
}

.internal-agenda-event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.internal-agenda-event-actions form {
  margin: 0;
}

.internal-agenda-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text-soft);
  background: var(--surface);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.internal-agenda-action:hover {
  border-color: rgba(8, 124, 255, .32);
  color: var(--blue);
}

.internal-agenda-action svg {
  width: 14px;
  height: 14px;
}

.internal-agenda-action.is-complete { color: var(--success); }
.internal-agenda-action.is-view { color: var(--blue); }
.internal-agenda-action.is-delete:hover { border-color: rgba(255, 77, 116, .32); color: var(--danger); }

.internal-agenda-empty {
  display: grid;
  justify-items: center;
  min-height: 330px;
  align-content: center;
  padding: 30px;
  text-align: center;
}

.internal-agenda-empty > span {
  display: grid;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 20px;
  color: var(--blue);
  background: rgba(8, 124, 255, .08);
}

.internal-agenda-empty svg { width: 28px; height: 28px; }
.internal-agenda-empty strong { color: var(--text); font-size: 17px; }
.internal-agenda-empty p { max-width: 360px; margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.internal-agenda-modal[hidden] { display: none !important; }

.internal-agenda-modal {
  position: fixed;
  z-index: 10020;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.internal-agenda-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(5px);
}

.internal-agenda-modal-card {
  position: relative;
  width: min(100%, 560px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
}

.internal-agenda-modal-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}

.internal-agenda-modal-card > header > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.internal-agenda-modal-card > header > div > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: var(--blue);
  background: rgba(8, 124, 255, .09);
}

.internal-agenda-modal-card > header svg { width: 20px; height: 20px; }

.internal-agenda-modal-card > header > button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface-soft);
  cursor: pointer;
}

.internal-agenda-modal-card > .internal-agenda-form { padding: 22px; }

.internal-agenda-view-content {
  display: grid;
  gap: 20px;
  padding: 22px;
}

.internal-agenda-view-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.internal-agenda-view-heading h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.internal-agenda-view-description {
  min-height: 120px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.internal-agenda-view-visibility {
  display: flex;
  align-items: center;
  min-height: 42px;
  margin: -7px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(8, 124, 255, .14);
  border-radius: 12px;
  color: var(--blue);
  background: rgba(8, 124, 255, .06);
  font-size: 12px;
  font-weight: 750;
}

.internal-agenda-view-description > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.internal-agenda-view-description p {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.internal-agenda-view-content footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.internal-agenda-view-content footer .btn[hidden] {
  display: none !important;
}

.internal-agenda-modal-card .internal-agenda-form footer,
.internal-agenda-modal-card.is-confirm form {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 3px;
}

.internal-agenda-modal-card.is-confirm {
  padding: 28px;
  text-align: center;
}

.internal-agenda-confirm-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 18px;
  color: var(--danger);
  background: rgba(255, 77, 116, .1);
}

.internal-agenda-confirm-icon svg { width: 25px; height: 25px; }
.internal-agenda-modal-card.is-confirm p { margin: 8px auto 22px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.internal-agenda-modal-card.is-confirm form { justify-content: center; }
.internal-agenda-modal-card .btn-ghost {
  border: 1px solid var(--border);
  color: var(--text-soft);
  background: var(--surface-soft);
}

.internal-agenda-modal-card .internal-agenda-danger { border-color: var(--danger); background: var(--danger); color: #fff; }
.internal-agenda-modal-open { overflow: hidden; }

@media (max-width: 1180px) {
  .internal-agenda-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .internal-agenda-layout { grid-template-columns: minmax(280px, 350px) minmax(0, 1fr); }
}

@media (max-width: 880px) {
  .internal-agenda-layout { grid-template-columns: 1fr; }
  .internal-agenda-create { position: static; }
}

@media (max-width: 640px) {
  .internal-agenda-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .internal-agenda-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .internal-agenda-summary article { min-height: 96px; padding: 13px; gap: 10px; }
  .internal-agenda-summary-icon { flex-basis: 40px; width: 40px; height: 40px; border-radius: 13px; }
  .internal-agenda-summary article div span { display: none; }
  .internal-agenda-create, .internal-agenda-list-card { padding: 16px; border-radius: 17px; }
  .internal-agenda-create.is-mobile-collapsible .internal-agenda-section-head {
    flex-wrap: wrap;
    margin-bottom: 0;
  }
  .internal-agenda-create-toggle {
    display: inline-flex;
    flex: 1 0 100%;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(8, 124, 255, .2);
    border-radius: 12px;
    color: var(--blue);
    background: rgba(8, 124, 255, .08);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
  }
  .internal-agenda-create-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform .2s ease;
  }
  .internal-agenda-create.is-mobile-collapsible .internal-agenda-form { display: none; }
  .internal-agenda-create.is-mobile-open .internal-agenda-section-head { margin-bottom: 18px; }
  .internal-agenda-create.is-mobile-open .internal-agenda-form { display: grid; }
  .internal-agenda-create.is-mobile-open .internal-agenda-create-toggle svg { transform: rotate(180deg); }
  .internal-agenda-list-head { display: grid; }
  .internal-agenda-filters { width: 100%; }
  .internal-agenda-filters button { flex: 1; }
  .internal-agenda-search-row { display: grid; }
  .internal-agenda-search input { min-height: 46px; font-size: 16px; }
  .internal-agenda-reset-filters { width: 100%; min-height: 42px; }
  .internal-agenda-period { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .internal-agenda-period input { min-height: 44px; font-size: 16px; }
  .internal-agenda-period-shortcuts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .internal-agenda-period-shortcuts button { min-height: 42px; padding: 6px; }
  .internal-agenda-pagination { gap: 8px; }
  .internal-agenda-pagination button { min-width: 86px; padding-inline: 8px; }
  .internal-agenda-pagination > span { font-size: 11px; }
  .internal-agenda-event { grid-template-columns: 52px minmax(0, 1fr); gap: 11px; padding: 12px; }
  .internal-agenda-event-date { min-height: 56px; }
  .internal-agenda-event-title-row { display: grid; }
  .internal-agenda-status { width: max-content; }
  .internal-agenda-event-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .internal-agenda-event-actions form { display: contents; }
  .internal-agenda-action { width: 100%; }
  .internal-agenda-date-row { grid-template-columns: 1fr 110px; }
  .internal-agenda-modal { padding: 10px; }
  .internal-agenda-modal-card { max-height: calc(100vh - 20px); border-radius: 18px; }
  .internal-agenda-modal-card > header, .internal-agenda-modal-card > .internal-agenda-form { padding: 17px; }
  .internal-agenda-view-content { padding: 17px; }
  .internal-agenda-view-heading { display: grid; }
  .internal-agenda-view-content footer { display: grid; }
  .internal-agenda-modal-card.is-confirm { padding: 24px 18px; }
  .internal-agenda-modal-card.is-confirm form { display: grid; }
}

/* ==========================================================
   Agenda interna - blocos destacados
   ========================================================== */

.internal-agenda-topbar {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 18px 22px;
  border: 1px solid rgba(8, 124, 255, .16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 10%, rgba(8, 124, 255, .13), transparent 32%),
    linear-gradient(135deg, rgba(8, 124, 255, .065), transparent 48%),
    var(--surface);
  box-shadow: 0 12px 34px rgba(15, 23, 42, .055);
}

.internal-agenda-topbar h1 {
  font-size: 25px;
}

.internal-agenda-topbar p {
  margin-top: 5px;
  font-size: 13px;
}

.internal-agenda-eyebrow {
  margin-bottom: 6px;
  font-size: 11px;
}

.internal-agenda-topbar::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 170px;
  height: 5px;
  border-radius: 0 0 0 999px;
  background: linear-gradient(90deg, var(--blue), #06b6d4);
  content: "";
}

.internal-agenda-summary {
  gap: 12px;
  margin-bottom: 14px;
}

.internal-agenda-summary article {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 86px;
  padding: 12px 14px;
  gap: 10px;
  border-color: rgba(8, 124, 255, .16);
  background:
    linear-gradient(145deg, rgba(8, 124, 255, .055), transparent 62%),
    var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.internal-agenda-summary article::before {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--blue);
  content: "";
}

.internal-agenda-summary article:nth-child(2) {
  border-color: rgba(249, 115, 22, .2);
  background:
    linear-gradient(145deg, rgba(249, 115, 22, .06), transparent 62%),
    var(--surface);
}

.internal-agenda-summary article:nth-child(2)::before { background: #f97316; }

.internal-agenda-summary article:nth-child(3) {
  border-color: rgba(255, 77, 116, .2);
  background:
    linear-gradient(145deg, rgba(255, 77, 116, .06), transparent 62%),
    var(--surface);
}

.internal-agenda-summary article:nth-child(3)::before { background: var(--danger); }

.internal-agenda-summary article:nth-child(4) {
  border-color: rgba(16, 185, 129, .2);
  background:
    linear-gradient(145deg, rgba(16, 185, 129, .06), transparent 62%),
    var(--surface);
}

.internal-agenda-summary article:nth-child(4)::before { background: var(--success); }

.internal-agenda-summary article:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(15, 23, 42, .085);
}

.internal-agenda-summary-icon {
  flex-basis: 38px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(8, 124, 255, .13);
  box-shadow: 0 7px 18px rgba(8, 124, 255, .1);
}

.internal-agenda-summary-icon svg {
  width: 18px;
  height: 18px;
}

.internal-agenda-summary strong {
  font-size: 23px;
}

.internal-agenda-summary small {
  font-size: 10px;
}

.internal-agenda-summary article div span {
  font-size: 11px;
}

.internal-agenda-summary-icon.is-orange { border-color: rgba(249, 115, 22, .16); box-shadow: 0 7px 18px rgba(249, 115, 22, .1); }
.internal-agenda-summary-icon.is-red { border-color: rgba(255, 77, 116, .16); box-shadow: 0 7px 18px rgba(255, 77, 116, .1); }
.internal-agenda-summary-icon.is-green { border-color: rgba(16, 185, 129, .16); box-shadow: 0 7px 18px rgba(16, 185, 129, .1); }

.internal-agenda-layout {
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  gap: 16px;
}

.internal-agenda-create,
.internal-agenda-list-card {
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(8, 124, 255, .15);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 16px 42px rgba(15, 23, 42, .07);
}

.internal-agenda-create {
  top: 16px;
}

.internal-agenda-section-head,
.internal-agenda-list-head {
  position: relative;
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(8, 124, 255, .075), transparent 62%),
    var(--surface);
}

.internal-agenda-section-head::after,
.internal-agenda-list-head::after {
  position: absolute;
  bottom: -1px;
  left: 18px;
  width: 62px;
  height: 3px;
  border-radius: 999px;
  background: var(--blue);
  content: "";
}

.internal-agenda-create > .internal-agenda-form {
  gap: 10px;
  padding: 15px 18px 18px;
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
}

.internal-agenda-create .internal-agenda-field {
  gap: 6px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 5px 16px rgba(15, 23, 42, .035);
}

.internal-agenda-create .internal-agenda-date-row {
  gap: 8px;
}

.internal-agenda-section-icon {
  flex-basis: 40px;
  width: 40px;
  height: 40px;
  border-radius: 13px;
}

.internal-agenda-section-icon svg {
  width: 20px;
  height: 20px;
}

.internal-agenda-section-head h2,
.internal-agenda-list-head h2 {
  font-size: 17px;
}

.internal-agenda-section-head p,
.internal-agenda-list-head p {
  margin-top: 3px;
  font-size: 12px;
}

.internal-agenda-create .internal-agenda-field input,
.internal-agenda-create .internal-agenda-field textarea {
  min-height: 42px;
  padding: 9px 11px;
}

.internal-agenda-create .internal-agenda-field textarea {
  min-height: 82px;
}

.internal-agenda-create .internal-agenda-field input,
.internal-agenda-create .internal-agenda-field textarea {
  border-color: var(--border-soft);
  background: var(--surface-soft);
}

.internal-agenda-create .internal-agenda-sharing-option {
  min-height: 54px;
  padding: 9px 11px;
  border-color: rgba(8, 124, 255, .15);
  background: var(--surface);
  box-shadow: 0 5px 16px rgba(15, 23, 42, .035);
}

.internal-agenda-create .internal-agenda-submit {
  margin-top: 2px;
  min-height: 42px;
  box-shadow: 0 10px 22px rgba(8, 124, 255, .22);
}

.internal-agenda-list-head {
  align-items: center;
}

.internal-agenda-toolbar {
  margin: 14px 18px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
}

.internal-agenda-toolbar .internal-agenda-search-row {
  margin-bottom: 9px;
}

.internal-agenda-toolbar .internal-agenda-period {
  margin-bottom: 0;
  padding-top: 9px;
  border-top: 1px solid var(--border);
}

.internal-agenda-toolbar input,
.internal-agenda-toolbar button {
  background-color: var(--surface);
}

.internal-agenda-toolbar .internal-agenda-search input,
.internal-agenda-toolbar .internal-agenda-reset-filters {
  min-height: 40px;
}

.internal-agenda-toolbar .internal-agenda-period input,
.internal-agenda-toolbar .internal-agenda-period-shortcuts button {
  min-height: 36px;
}

.internal-agenda-events {
  gap: 10px;
  padding: 0 18px 18px;
}

.internal-agenda-event {
  position: relative;
  overflow: hidden;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-color: rgba(8, 124, 255, .15);
  border-left: 4px solid var(--blue);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}

.internal-agenda-event::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 90px;
  height: 90px;
  border-radius: 0 0 0 100%;
  background: rgba(8, 124, 255, .035);
  content: "";
  pointer-events: none;
}

.internal-agenda-event:hover {
  border-color: rgba(8, 124, 255, .34);
  border-left-color: var(--blue);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .09);
  transform: translateY(-2px);
}

.internal-agenda-event.is-overdue {
  border-color: rgba(255, 77, 116, .25);
  border-left-color: var(--danger);
}

.internal-agenda-event.is-overdue::after {
  background: rgba(255, 77, 116, .045);
}

.internal-agenda-event.is-completed {
  border-left-color: var(--success);
  background:
    linear-gradient(145deg, rgba(16, 185, 129, .035), transparent 58%),
    var(--surface);
}

.internal-agenda-event-date {
  position: relative;
  z-index: 1;
  min-height: 58px;
  border-radius: 13px;
  border-width: 1px;
  box-shadow: 0 7px 18px rgba(8, 124, 255, .08);
}

.internal-agenda-event-main {
  position: relative;
  z-index: 1;
}

.internal-agenda-event-date span {
  font-size: 21px;
}

.internal-agenda-event-main > p {
  margin-top: 8px;
  font-size: 12px;
}

.internal-agenda-event-actions {
  gap: 6px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--border-soft);
}

.internal-agenda-action {
  min-height: 30px;
  padding: 5px 9px;
  background: var(--surface-soft);
}

.internal-agenda-pagination {
  margin: 0 18px 18px;
  padding: 12px 0 0;
}

.internal-agenda-empty {
  min-height: 250px;
  padding: 22px;
  border: 1px dashed rgba(8, 124, 255, .22);
  border-radius: 17px;
  background: rgba(8, 124, 255, .025);
}

@media (max-width: 1180px) {
  .internal-agenda-layout {
    grid-template-columns: minmax(280px, 350px) minmax(0, 1fr);
  }
}

@media (max-width: 880px) {
  .internal-agenda-layout {
    grid-template-columns: 1fr;
  }

  .internal-agenda-create {
    position: static;
  }
}

@media (max-width: 640px) {
  .internal-agenda-topbar {
    padding: 16px;
    border-radius: 16px;
  }

  .internal-agenda-summary {
    gap: 10px;
  }

  .internal-agenda-summary article {
    min-height: 80px;
    padding: 10px;
  }

  .internal-agenda-summary-icon {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  .internal-agenda-create,
  .internal-agenda-list-card {
    border-radius: 18px;
  }

  .internal-agenda-section-head,
  .internal-agenda-list-head {
    padding: 14px;
  }

  .internal-agenda-section-head::after,
  .internal-agenda-list-head::after {
    left: 14px;
  }

  .internal-agenda-create > .internal-agenda-form {
    padding: 13px;
  }

  .internal-agenda-toolbar {
    margin: 12px 14px;
    padding: 10px;
  }

  .internal-agenda-toolbar .internal-agenda-search input,
  .internal-agenda-toolbar .internal-agenda-reset-filters,
  .internal-agenda-toolbar .internal-agenda-period input,
  .internal-agenda-toolbar .internal-agenda-period-shortcuts button {
    min-height: 42px;
  }

  .internal-agenda-events {
    padding: 0 14px 14px;
  }

  .internal-agenda-event {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 10px;
    padding: 11px;
  }

  .internal-agenda-pagination {
    margin: 0 14px 14px;
  }
}

:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --menu-soft: #f1f5fb;

  --text: #10172a;
  --text-soft: #27364f;
  --muted: #64748b;
  --muted-light: #8fa0b8;

  --border: #dfe7f3;
  --border-soft: #edf2f7;

  --blue: #087cff;
  --green: #00f21d;
  --danger: #ff4d74;
  --warning: #ff8a3d;
  --success: #10b981;
  --info: #06b6d4;
  --purple: #8b5cf6;

  --rail-w: 56px;
  --sidebar-w: 312px;

  --radius-sidebar: 22px;
  --radius-card: 14px;

  --shadow-sidebar: 0 18px 46px rgba(15, 23, 42, .07);
  --shadow-card: 0 6px 22px rgba(15, 23, 42, .035);
}

html[data-theme="dark"] {
  --bg: #0f1115;
  --surface: #161a21;
  --surface-soft: #1b2028;
  --menu-soft: #1b2028;

  --text: #e6edf3;
  --text-soft: #d8e2f0;
  --muted: #b5bec8;
  --muted-light: #8b949e;

  --border: #1f2630;
  --border-soft: #202832;

  --shadow-sidebar: 0 18px 46px rgba(0, 0, 0, .28);
  --shadow-card: 0 6px 22px rgba(0, 0, 0, .14);
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 32% 0%, rgba(8, 124, 255, .025), transparent 34%),
    var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

/* =======================
   SIDEBAR
   ======================= */

.sidebar {
  position: fixed;
  left: 8px;
  top: 14px;
  bottom: 14px;
  width: var(--sidebar-w);
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sidebar);
  box-shadow: var(--shadow-sidebar);
  overflow: hidden;
  z-index: 50;
}

.side-rail {
  width: var(--rail-w);
  background:
    linear-gradient(
      180deg,
      #087cff 0%,
      #0797ef 28%,
      #05b6d2 49%,
      #02d56f 72%,
      #00f21d 100%
    );
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 13px 7px;
}

.rail-logo {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .16);
  font-size: 16px;
  margin-bottom: 6px;
}

.rail-logo.mini,
.rail-mini {
  width: 28px;
  height: 28px;
  background: transparent;
  font-size: 13px;
  opacity: .95;
  margin-top: -3px;
}

.rail-logo svg,
.rail-btn svg {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}

.rail-spacer {
  flex: 1;
}

.rail-separator,
.rail-divider {
  width: 18px;
  height: 1px;
  display: block;
  background: rgba(0, 0, 0, .18);
  margin-bottom: 8px;
}

.rail-btn {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: rgba(255, 255, 255, .10);
  color: #fff;
  cursor: pointer;
  margin-top: 7px;
  font-size: 13px;
  font-weight: 800;
}

.rail-btn:hover {
  background: rgba(255, 255, 255, .18);
}

.side-content {
  width: 100%;
  height: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-brand {
  flex: 0 0 auto;
  padding: 18px 18px 15px;
  border-bottom: 1px solid var(--border-soft);
}

.eyebrow,
.sidebar-brand .eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .11em;
  font-size: 10px;
  font-weight: 700;
}

.sidebar-brand strong {
  display: block;
  font-size: 25px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.04em;
}

/* Whats */
.sidebar-brand strong .brand-blue {
  color: #0087FF;
}

/* Company */
.sidebar-brand strong .brand-green {
  color: #02DD02;
}

.sidebar-brand small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

/* =======================
   MENU
   ======================= */

.side-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, .34) transparent;
  padding: 13px 12px 16px;
  display: grid;
  align-content: start;
  gap: 7px;
}

.side-nav-scroll {
  position: sticky;
  z-index: 8;
  width: 100%;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 1px solid rgba(8, 124, 255, .16);
  border-radius: 10px;
  background: rgba(255, 255, 255, .96);
  color: var(--blue);
  box-shadow: 0 5px 16px rgba(15, 23, 42, .10);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.side-nav-scroll.is-visible {
  display: flex;
}

.side-nav-scroll-up {
  top: 0;
}

.side-nav-scroll-down {
  bottom: 0;
}

.side-nav-scroll:hover,
.side-nav-scroll:focus-visible {
  background: var(--blue);
  color: #fff;
}

.side-nav-scroll svg {
  width: 17px;
  height: 17px;
  display: block;
}

html[data-theme="dark"] .side-nav-scroll {
  background: rgba(22, 27, 36, .96);
}

.side-nav::-webkit-scrollbar {
  width: 6px;
}

.side-nav::-webkit-scrollbar-track {
  background: transparent;
}

.side-nav::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, .34);
  border-radius: 999px;
}

.side-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, .5);
}

.nav-card,
.nav-box {
  padding: 0;
  border-radius: 12px;
  background: transparent;
}

.side-nav a,
.submenu-link {
  min-height: 37px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.side-nav > a:hover,
.side-nav > a.active,
.nav-parent:hover,
.nav-main:hover {
  background: rgba(8, 124, 255, .06);
  border-color: rgba(8, 124, 255, .12);
  color: var(--blue);
}

.nav-parent.active,
.nav-main.active {
  background: transparent;
  border-color: transparent;
  color: var(--text-soft);
}

.nav-ico,
.submenu-ico {
  width: 16px;
  min-width: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.nav-ico svg,
.submenu-ico svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
  display: block;
}

.nav-arrow {
  margin-left: auto;
  color: var(--muted-light);
  font-size: 12px;
}

.nav-arrow svg {
  width: 12px;
  height: 12px;
  display: block;
}

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

.submenu-link {
  min-height: 34px;
}

.submenu-link.active {
  background: rgba(2, 221, 2, .10);
  border-color: transparent;
  color: #00a900;
  font-weight: 700;
}

.submenu-link.active .submenu-ico,
.submenu-link.active svg {
  color: #00a900;
  stroke: #00a900;
}

.side-footer {
  flex: 0 0 auto;
  margin-top: auto;
  padding: 15px 18px 19px;
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
  position: relative;
  z-index: 2;
}

.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.back-link svg {
  width: 14px;
  height: 14px;
}

/* =======================
   CONTENT
   ======================= */

.content {
  margin-left: 320px;
  min-height: 100vh;
  padding: 34px 18px 26px;
}

.mobile-topbar {
  display: none;
}

.topbar {
  margin-bottom: 22px;
}

.topbar h1 {
  margin: 0;
  color: var(--text);
  font-size: 27px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -.055em;
}

.topbar p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.users-page-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.users-page-topbar .btn {
  flex: 0 0 auto;
}

/* =======================
   KPI CARDS
   ======================= */

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 21px;
}

.kpi-card {
  min-height: 92px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-card);

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kpi-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kpi-top span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.kpi-card strong {
  display: block;
  margin-top: 10px;
  color: var(--text);
  font-size: 19px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.03em;
}

.kpi-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
}

.kpi-icon svg {
  width: 15px;
  height: 15px;
}

.kpi-icon.danger {
  background: #ffe5ed;
  color: var(--danger);
}

.kpi-icon.warning {
  background: #ffeadd;
  color: var(--warning);
}

.kpi-icon.success {
  background: #daf8e7;
  color: var(--success);
}

.kpi-icon.info {
  background: #d8f7ff;
  color: var(--info);
}

.kpi-icon.blue {
  background: #e2edff;
  color: #347dff;
}

.kpi-icon.purple {
  background: #efe5ff;
  color: var(--purple);
}

/* =======================
   PANELS / DASHBOARD
   ======================= */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-card);
  padding: 18px;
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 405px;
  gap: 17px;
}

.overview-main,
.overview-side {
  min-width: 0;
}

.chart-panel {
  min-height: 288px;
}

.chart-panel canvas {
  max-height: 218px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 9px;
}

.panel h2,
.panel-head h2,
.mini-title h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.panel-head span,
.mini-title span {
  color: var(--muted-light);
  font-size: 12px;
}

.mini-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  margin-top: 17px;
}

.mini-panel {
  min-height: 158px;
}

.mini-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
}

.simple-list-item {
  padding: 9px 0;
  border-bottom: 1px solid var(--border-soft);
}

.simple-list-item:last-child {
  border-bottom: 0;
}

.simple-list-item strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.simple-list-item small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 12px;
}

.token-card {
  min-height: 106px;
}

.token-card strong {
  display: block;
  margin-top: 14px;
  color: var(--text);
  font-size: 23px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.04em;
}

.side-chart-panel {
  min-height: 176px;
  margin-top: 17px;
}

.side-chart-panel canvas {
  max-height: 95px;
}

.token-usage-card {
  min-height: 158px;
  margin-top: 17px;
}

.token-filters {
  display: flex;
  gap: 9px;
  margin: 10px 0 16px;
}

.token-filters button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.token-usage-card > strong {
  display: block;
  text-align: center;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
}

.payments-panel {
  margin-top: 22px;
}

/* =======================
   TABLE
   ======================= */

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 11px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
}

th {
  color: var(--muted-light);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-weight: 700;
  background: var(--surface-soft);
}

td {
  color: var(--text-soft);
  font-size: 12px;
}

td small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted-light);
  font-size: 12px;
}

/* =======================
   BADGES / BUTTONS / FORMS
   ======================= */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}

.badge.ativo,
.badge.paga,
.badge.entrada {
  background: rgba(34, 197, 94, .14);
  color: #16a34a;
}

.badge.pendente,
.badge.teste {
  background: rgba(8, 124, 255, .14);
  color: var(--blue);
}

.badge.vencida,
.badge.bloqueado {
  background: rgba(251, 146, 60, .16);
  color: #f97316;
}

.badge.cancelada,
.badge.cancelado,
.badge.inativo,
.badge.saida {
  background: rgba(244, 63, 94, .16);
  color: #f43f5e;
}

.agency-period-statuses {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.agency-period-statuses > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
}

.agency-period-statuses > span svg {
  width: 15px;
  height: 15px;
}

.agency-period-statuses .is-active {
  color: #16a34a;
  background: rgba(34, 197, 94, .11);
}

.agency-period-statuses .is-cancelled {
  color: #f43f5e;
  background: rgba(244, 63, 94, .11);
}

.agency-period-statuses small {
  flex: 1;
  min-width: 260px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .agency-period-statuses {
    padding: 12px 14px 14px;
  }

  .agency-period-statuses small {
    flex-basis: 100%;
    min-width: 0;
  }
}

.btn,
button,
.logout {
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  padding: 0 12px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.btn svg,
button svg,
.logout svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: block;
}

.btn.light,
.logout {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn.small,
button.small {
  min-height: 29px;
  padding: 0 9px;
  gap: 6px;
  border-radius: 8px;
  font-size: 11px;
}

button.danger {
  background: #f43f5e;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  outline: none;
  font-size: 13px;
}

textarea {
  min-height: 110px;
  padding: 12px;
}

label {
  display: block;
  margin: 0 0 7px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

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

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

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.users-form-actions {
  align-items: center;
  gap: 10px;
}

/* Links personalizados de afiliados */
.affiliate-links-topbar { align-items: flex-start; }
.affiliate-link-admin-form { margin-bottom: 18px; }
.affiliate-link-section-head { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.affiliate-link-section-head > span { display: grid; place-items: center; width: 44px; min-width: 44px; height: 44px; border-radius: 14px; background: rgba(8,124,255,.1); color: var(--blue); }
.affiliate-link-section-head > span svg { width: 21px; }
.affiliate-link-section-head h2,
.affiliate-link-list-head h2,
.affiliate-link-card h2 { margin: 0; }
.affiliate-link-section-head p,
.affiliate-link-list-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.affiliate-link-form-grid { display: grid; grid-template-columns: minmax(190px,.55fr) minmax(360px,1.5fr) 150px; gap: 14px; }
.affiliate-link-form-grid input,
.affiliate-link-form-grid select { margin: 0; }
.affiliate-link-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.affiliate-link-form-actions .btn,
.affiliate-link-form-actions button { display: inline-flex; align-items: center; gap: 7px; margin: 0; }
.affiliate-link-list-panel { padding: 0; overflow: hidden; }
.affiliate-link-list-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.affiliate-link-list-head > span { display: grid; place-items: center; min-width: 32px; height: 30px; padding: 0 10px; border-radius: 999px; background: rgba(8,124,255,.09); color: var(--blue); font-size: 12px; font-weight: 900; }
.affiliate-link-list-panel .table-wrap { border: 0; border-radius: 0; }
.affiliate-link-admin-table { min-width: 900px; }
.affiliate-link-template { display: block; max-width: 620px; color: var(--muted); overflow-wrap: anywhere; }
.affiliate-link-admin-table .row-actions .btn,
.affiliate-link-admin-table .row-actions button { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.affiliate-link-admin-table .row-actions svg { width: 15px; }
.affiliate-link-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.affiliate-link-card { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 14px; padding: 20px; }
.affiliate-link-card-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: rgba(8,124,255,.1); color: var(--blue); }
.affiliate-link-card-icon svg { width: 22px; }
.affiliate-link-card-copy small { display: block; color: var(--blue); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.affiliate-link-card h2 { margin-top: 4px; font-size: 18px; }
.affiliate-link-card-copy p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.affiliate-link-ready { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; margin-top: 4px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); }
.affiliate-link-ready > span { padding: 0 5px; color: var(--text); font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.affiliate-copy-link { display: inline-flex; align-items: center; gap: 7px; margin: 0; white-space: nowrap; }
.affiliate-copy-link.is-copied { background: #10b981; }
.affiliate-link-empty { grid-column: 1 / -1; padding: 48px 20px; text-align: center; }
.affiliate-link-empty > span { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 17px; background: rgba(8,124,255,.09); color: var(--blue); }
.affiliate-link-empty strong { display: block; }
.affiliate-link-empty p { margin: 6px 0 0; color: var(--muted); }

@media (max-width: 900px) {
  .affiliate-link-form-grid,
  .affiliate-link-cards { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .affiliate-link-form-actions,
  .affiliate-link-ready { grid-template-columns: 1fr; }
  .affiliate-link-form-actions { display: grid; }
  .affiliate-link-form-actions .btn,
  .affiliate-link-form-actions button,
  .affiliate-copy-link { width: 100%; }
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 175px 175px 210px;
  gap: 13px;
  align-items: end;
}

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

.alert {
  padding: 13px 15px;
  border-radius: 13px;
  margin-bottom: 15px;
  font-size: 13px;
  font-weight: 700;
}

.alert.error {
  background: rgba(244, 63, 94, .14);
  color: #f43f5e;
}

.alert.success {
  background: rgba(34, 197, 94, .14);
  color: #16a34a;
}

.notice {
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-soft);
  padding: 15px;
  margin-bottom: 11px;
}

.field-help,
.muted {
  color: var(--muted);
}

.employee-access-control {
  margin-top: 6px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
}

.employee-access-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.employee-access-heading h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.employee-access-heading p,
.employee-access-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.employee-access-toggle,
.employee-holiday-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
}

.employee-access-toggle input,
.employee-holiday-option input,
.employee-weekdays input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.employee-access-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: 16px 22px;
  align-items: end;
  transition: opacity .2s ease;
}

.employee-access-fields.is-disabled {
  opacity: .5;
}

.employee-weekdays {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.employee-weekdays legend {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
}

.employee-weekdays label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 10px 6px 0;
}

.employee-access-times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.employee-holiday-option {
  grid-column: 1 / -1;
  align-items: flex-start;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
}

.employee-holiday-option small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 500;
}

.employee-access-note {
  margin-top: 13px;
}

@media (max-width: 760px) {
  .employee-access-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .employee-access-fields,
  .employee-access-times {
    grid-template-columns: 1fr;
  }
}

.next-box {
  padding: 15px;
  border-radius: 13px;
  background: rgba(34, 197, 94, .12);
  border: 1px solid rgba(34, 197, 94, .22);
}

/* =======================
   COLLAPSE
   ======================= */

body.sidebar-collapsed .sidebar {
  width: var(--rail-w);
  grid-template-columns: var(--rail-w);
}

body.sidebar-collapsed .side-content {
  display: none;
}

body.sidebar-collapsed .content {
  margin-left: 64px;
}

/* =======================
   RESPONSIVO
   ======================= */

@media (max-width: 1500px) {
  .dashboard-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overview-layout {
    grid-template-columns: 1fr;
  }

  .overview-side {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
  }

  .side-chart-panel,
  .token-usage-card {
    margin-top: 0;
  }
}

@media (max-width: 1100px) {
  .overview-side,
  .mini-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 45;
    height: 60px;
    padding: 0 15px;
    background: rgba(246, 248, 252, .88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  html[data-theme="dark"] .mobile-topbar {
    background: rgba(15, 17, 21, .88);
  }

  .mobile-topbar button {
    width: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 13px;
  }

  .sidebar {
    inset: 12px auto 12px 12px;
    width: min(312px, calc(100vw - 24px));
    transform: translateX(-112%);
    transition: .25s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .content,
  body.sidebar-collapsed .content {
    margin-left: 0;
    padding: 21px 14px 86px;
  }

  .topbar h1 {
    font-size: 24px;
  }

  .users-page-topbar {
    flex-direction: column;
  }

  .users-page-topbar .btn {
    width: 100%;
    justify-content: center;
  }

  .dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-card {
    min-height: 86px;
  }

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

  .filter-actions,
  .top-actions {
    width: 100%;
    flex-direction: column;
  }

  .filter-actions a,
  .filter-actions button,
  .top-actions a,
  .top-actions button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .dashboard-kpis {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   DASHBOARD COMERCIAL
   Arquivo: dashboard_comercial.php
   ========================================================== */

.commercial-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 21px;
}

.commercial-kpi-card {
  min-height: 86px;
  padding: 15px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.commercial-kpi-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
}

.commercial-kpi-card strong {
  display: block;
  margin-top: 10px;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.03em;
}

.commercial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 17px;
}

.commercial-chart-panel {
  min-height: 255px;
}

.commercial-chart-panel canvas {
  max-height: 180px;
}

.commercial-funnel-panel {
  min-height: 255px;
}

.funnel-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.funnel-item {
  display: grid;
  gap: 7px;
}

.funnel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.funnel-top span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.funnel-top strong {
  color: var(--muted-light);
  font-size: 13px;
  font-weight: 700;
}

.funnel-track {
  height: 6px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--surface-soft);
}

.funnel-fill {
  height: 100%;
  border-radius: 99px;
  background: rgba(52, 125, 255, .72);
}

.commercial-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1fr;
  gap: 17px;
  margin-top: 21px;
}

.commercial-full-span {
  grid-column: 1 / -1;
}


.mrr-panel,
.sdr-panel {
  min-height: 265px;
}

.mrr-box {
  padding: 14px 15px;
  background: var(--surface-soft);
  border-radius: 11px;
  margin-top: 14px;
}

.mrr-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.mrr-box strong {
  display: block;
  color: var(--text);
  font-size: 17px;
  margin-top: 7px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.mrr-progress {
  height: 8px;
  border-radius: 99px;
  background: var(--surface-soft);
  overflow: hidden;
  margin-top: 18px;
}

.mrr-progress div {
  height: 100%;
  border-radius: 99px;
  background: rgba(16, 185, 129, .58);
}

.sdr-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.sdr-item {
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.sdr-item strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.sdr-item span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.sdr-item em {
  font-style: normal;
  color: #10b981;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 1500px) {
  .commercial-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .commercial-grid,
  .commercial-bottom-grid {
    grid-template-columns: 1fr;
  }
}

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

  .commercial-grid,
  .commercial-bottom-grid {
    grid-template-columns: 1fr;
  }

  .commercial-chart-panel,
  .commercial-funnel-panel,
  .mrr-panel,
  .sdr-panel {
    min-height: auto;
  }
}

/* ==========================================================
   DASHBOARD TÉCNICO
   Arquivo: dashboard_tecnico.php
   ========================================================== */

.technical-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 21px;
}

.technical-kpi-card {
  min-height: 86px;
  padding: 15px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.technical-kpi-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
}

.technical-kpi-card strong {
  display: block;
  margin-top: 10px;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.03em;
}

.technical-kpi-card strong.good {
  color: #10b981;
}

.technical-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 17px;
}

.technical-chart-panel {
  min-height: 255px;
}

.technical-chart-panel canvas {
  max-height: 180px;
}

.technical-categories-panel {
  min-height: 255px;
}

.tech-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.tech-progress-item,
.sla-item {
  display: grid;
  gap: 7px;
}

.tech-progress-top,
.sla-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tech-progress-top span,
.sla-top span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.tech-progress-top strong,
.sla-top small {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 700;
}

.tech-progress-track {
  height: 6px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--surface-soft);
}

.tech-progress-fill {
  height: 100%;
  border-radius: 99px;
}

.tech-progress-fill.blue {
  background: rgba(52, 125, 255, .72);
}

.tech-progress-fill.green {
  background: rgba(16, 185, 129, .58);
}

.technical-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1fr;
  gap: 17px;
  margin-top: 21px;
}

.sla-panel,
.services-panel {
  min-height: 230px;
}

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

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

.service-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.service-item > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.service-item strong {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.service-item em {
  color: var(--muted-light);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.service-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  display: inline-block;
  background: #10b981;
}

.service-dot.warning {
  background: #ffbe0b;
}

.servers-panel {
  margin-top: 21px;
}

.servers-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.servers-head h2 {
  margin: 0;
}

@media (max-width: 1500px) {
  .technical-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .technical-grid,
  .technical-bottom-grid {
    grid-template-columns: 1fr;
  }
}

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

  .technical-grid,
  .technical-bottom-grid {
    grid-template-columns: 1fr;
  }

  .technical-chart-panel,
  .technical-categories-panel,
  .sla-panel,
  .services-panel {
    min-height: auto;
  }

  .servers-head {
    align-items: stretch;
    flex-direction: column;
  }

  .servers-head .btn {
    width: 100%;
  }
}

/* ==========================================================
   CORREÇÃO MENU ACCORDION / ACTIVE
   ========================================================== */

.nav-card.menu-group {
  overflow: hidden;
}

.menu-toggle.nav-parent {
  width: 100%;
  min-height: 37px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-soft);
  background: transparent;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  justify-content: flex-start;
}

.menu-toggle.nav-parent:hover {
  background: rgba(8, 124, 255, .06);
  border-color: rgba(8, 124, 255, .12);
  color: var(--blue);
}

.menu-toggle.nav-parent .nav-arrow {
  margin-left: auto;
  transition: transform .22s ease;
}

.menu-group.open .menu-toggle.nav-parent .nav-arrow {
  transform: rotate(180deg);
}

.menu-group.open .menu-toggle.nav-parent {
  color: #00a900;
}

.menu-group.open .menu-toggle.nav-parent .nav-ico,
.menu-group.open .menu-toggle.nav-parent .nav-ico svg,
.menu-group.open .menu-toggle.nav-parent .nav-arrow,
.menu-group.open .menu-toggle.nav-parent .nav-arrow svg {
  color: #00a900;
  stroke: #00a900;
}

.menu-group .submenu {
  overflow: hidden;
  max-height: 0;
  transition: max-height .24s ease;
}

.menu-group.open .submenu {
  max-height: min(248px, 42vh);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(8, 124, 255, .42) transparent;
  padding-right: 4px;
}

.menu-group.open .submenu::-webkit-scrollbar {
  width: 5px;
}

.menu-group.open .submenu::-webkit-scrollbar-track {
  background: transparent;
}

.menu-group.open .submenu::-webkit-scrollbar-thumb {
  background: rgba(8, 124, 255, .42);
  border-radius: 999px;
}

.menu-group.open .submenu::-webkit-scrollbar-thumb:hover {
  background: rgba(8, 124, 255, .62);
}

/* O submenu aberto utiliza sua altura completa; a rolagem fica no menu lateral. */
.menu-group.open .submenu {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.submenu-link.active {
  background: rgba(2, 221, 2, .10);
  border-color: transparent;
  color: #00a900;
  font-weight: 700;
}

.submenu-link.active .submenu-ico,
.submenu-link.active svg {
  color: #00a900;
  stroke: #00a900;
}

/* ==========================================================
   AJUSTE RODAPÉ DA SIDEBAR
   Ícones pretos + seta invertida + texto Desconectar
   ========================================================== */

.rail-btn {
  color: #000 !important;
}

.rail-btn svg,
.rail-btn i {
  color: #000 !important;
  stroke: #000 !important;
}

#collapseSidebar svg {
  transition: transform .22s ease;
}

body.sidebar-collapsed #collapseSidebar svg {
  transform: rotate(180deg);
}

.side-footer .back-link {
  font-size: 0;
}

.side-footer .back-link::after {
  content: "Desconectar";
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.side-footer .back-link:hover::after {
  color: var(--text);
}

/* ==========================================================
   CORREÇÃO FINAL COLUNA AÇÕES CLIENTES
   ========================================================== */

.clients-table-panel table{
  table-layout:auto !important;
}

.clients-table-panel th:last-child,
.clients-table-panel td:last-child{
  width: 92px !important;
  min-width: 92px !important;
  text-align:center;
  white-space:nowrap;
}

.clients-table-panel .row-actions{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:0;
  flex-wrap:nowrap;
}

.clients-table-panel .row-actions .btn,
.clients-table-panel .row-actions button{
  min-width:auto !important;
  width:auto !important;
  padding:0 12px !important;
  min-height:32px !important;
  height:32px !important;
  border-radius:10px !important;
  font-size:12px !important;
  line-height:32px !important;
}

.clients-table-panel td{
  vertical-align:middle;
}

/* ==========================================================
   PIPELINE COMERCIAL / KANBAN
   ========================================================== */

.pipeline-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.commercial-pipeline-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 17px;
  margin-bottom: 18px;
}

.pipeline-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.pipeline-panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  color: var(--text);
}

.pipeline-panel-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

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

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

.pipeline-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 14px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 8px;
}

.pipeline-column {
  min-width: 260px;
  background: rgba(248,250,252,.78);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
}

.pipeline-column-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pipeline-column-head strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.pipeline-column-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.pipeline-column-head > span {
  min-width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(8,124,255,.10);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.pipeline-cards {
  display: grid;
  gap: 10px;
}

.pipeline-card {
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(15,23,42,.035);
}

.pipeline-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pipeline-card-top strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.pipeline-card-top small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.pipeline-value {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.pipeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.pipeline-meta span {
  min-height: 22px;
  padding: 0 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.pipeline-details {
  margin-top: 10px;
}

.pipeline-details summary {
  cursor: pointer;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.pipeline-edit-form,
.pipeline-event-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}

.pipeline-edit-form label,
.pipeline-event-form label {
  margin-bottom: -3px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
}

.pipeline-edit-form input,
.pipeline-edit-form select,
.pipeline-edit-form textarea,
.pipeline-event-form input,
.pipeline-event-form select,
.pipeline-event-form textarea {
  min-height: 34px;
  border-radius: 10px;
  font-size: 12px;
}

.pipeline-edit-form textarea,
.pipeline-event-form textarea {
  min-height: 62px;
}

.pipeline-event-grid {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 8px;
}

.pipeline-empty {
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 13px;
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.pipeline-events {
  display: grid;
  gap: 10px;
}

.pipeline-event {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-soft);
}

.pipeline-event strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.pipeline-event span,
.pipeline-event small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.status-fechado .pipeline-column-head > span {
  background: rgba(16,185,129,.12);
  color: var(--success);
}

.status-recusado .pipeline-column-head > span,
.status-cancelado .pipeline-column-head > span {
  background: rgba(255,77,116,.12);
  color: var(--danger);
}

.status-sem_resposta .pipeline-column-head > span {
  background: rgba(255,138,61,.14);
  color: var(--warning);
}

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

  .pipeline-board {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 700px) {
  .pipeline-topbar {
    flex-direction: column;
  }

  .commercial-pipeline-layout,
  .pipeline-form,
  .pipeline-board {
    grid-template-columns: 1fr;
  }

  .pipeline-column {
    min-width: 0;
  }

  .pipeline-event {
    align-items: stretch;
    flex-direction: column;
  }

  .pipeline-event form,
  .pipeline-event button {
    width: 100%;
  }
}

/* Biblioteca de materiais de marketing */
.mkt-page-topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.mkt-page-topbar > .btn { flex: 0 0 auto; margin-left: auto; white-space: nowrap; }
.mkt-filter { margin-bottom: 16px; padding: 18px 20px; }
.mkt-filter form { display: grid; grid-template-columns: minmax(280px, 1.4fr) minmax(180px, .65fr) minmax(220px, .85fr) auto; gap: 12px; align-items: end; }
.mkt-filter label,
.mkt-form-panel label { display: block; margin-bottom: 7px; color: var(--text); font-size: 12px; font-weight: 800; }
.mkt-filter input,
.mkt-filter select,
.mkt-form-panel input,
.mkt-form-panel select,
.mkt-form-panel textarea { margin: 0; }
.mkt-filter-actions { display: flex; gap: 8px; }
.mkt-filter-actions .btn,
.mkt-filter-actions button { height: 43px; margin: 0; white-space: nowrap; }
.mkt-list { overflow: hidden; padding: 0; }
.mkt-list > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.mkt-list h2 { margin: 0 0 4px; font-size: 17px; }
.mkt-list header p { margin: 0; color: var(--muted); font-size: 12px; }
.mkt-list table { min-width: 940px; }
.mkt-list td > strong,
.mkt-list td > small { display: block; }
.mkt-list td > small { max-width: 280px; margin-top: 4px; color: var(--muted); font-size: 10px; }
.mkt-audience { display: inline-flex; padding: 6px 9px; border-radius: 999px; color: var(--primary); background: var(--primary-soft); font-size: 10px; font-weight: 800; }
.mkt-actions { display: flex; align-items: center; gap: 6px; }
.mkt-actions form,
.mkt-actions .btn { margin: 0; }
.mkt-actions .btn { white-space: nowrap; }
.mkt-admin-view { color: var(--primary) !important; }
.mkt-empty { padding: 42px !important; color: var(--muted); text-align: center; }
.mkt-form-panel { padding: 22px; }
.mkt-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mkt-form-grid .wide { grid-column: 1 / -1; }
.mkt-form-panel textarea { min-height: 118px; resize: vertical; }
.mkt-upload { padding: 20px; border: 1px dashed rgba(8, 124, 255, .3); border-radius: 14px; background: var(--surface-soft); }
.mkt-upload > small { display: block; margin-top: 10px; color: var(--muted); }
.mkt-upload-title { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; color: var(--text); }
.mkt-upload-title svg { width: 19px; height: 19px; color: var(--blue); }
.mkt-upload-title strong { font-size: 13px; }
.mkt-upload-picker { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mkt-upload-input { position: absolute; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.mkt-upload-trigger { display: inline-flex !important; min-height: 36px; margin: 0 !important; padding: 0 12px; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--blue); border-radius: 10px; color: #fff !important; background: var(--blue); font-size: 12px !important; font-weight: 700 !important; cursor: pointer; white-space: nowrap; transition: filter .18s ease, box-shadow .18s ease; }
.mkt-upload-trigger svg { width: 20px; height: 20px; }
.mkt-upload-trigger:hover { filter: brightness(.96); }
.mkt-upload-input:focus + .mkt-upload-trigger { box-shadow: 0 0 0 3px rgba(8, 124, 255, .2); }
.mkt-upload-selection { min-width: 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mkt-current-file { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.mkt-current-file svg { flex: 0 0 auto; width: 18px; color: var(--primary); }
.mkt-current-file strong,
.mkt-current-file small { display: block; }
.mkt-current-file small { margin-top: 3px; color: var(--muted); }
.mkt-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.mkt-form-actions .btn,
.mkt-form-actions button { margin: 0; }
.affiliate-material-filter form { grid-template-columns: minmax(280px, 1fr) minmax(220px, .55fr) auto; }
.mkt-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mkt-material-card { display: flex; min-height: 360px; padding: 20px; flex-direction: column; align-items: stretch; }
.mkt-material-preview { display: grid; height: 180px; margin: -8px -8px 16px; overflow: hidden; place-items: center; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-soft); }
.mkt-material-preview img,
.mkt-material-preview video,
.mkt-material-preview iframe { display: block; width: 100%; height: 100%; border: 0; }
.mkt-material-preview img { object-fit: cover; }
.mkt-material-preview video { object-fit: contain; background: #0f172a; }
.mkt-material-preview .mkt-file-icon { width: auto; height: auto; margin: 0; gap: 8px; color: var(--muted); background: transparent; }
.mkt-material-preview .mkt-file-icon svg { width: 34px; height: 34px; color: var(--primary); }
.mkt-material-preview .mkt-file-icon span { font-size: 11px; font-weight: 800; }
.mkt-file-icon { display: grid; width: 48px; height: 48px; margin-bottom: 16px; place-items: center; border-radius: 14px; color: var(--primary); background: var(--primary-soft); }
.mkt-file-icon svg { width: 24px; height: 24px; }
.mkt-material-body { display: flex; flex: 1; flex-direction: column; }
.mkt-material-body > span { color: var(--primary); font-size: 10px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.mkt-material-body h2 { margin: 7px 0 8px; font-size: 18px; line-height: 1.25; }
.mkt-material-body p { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.mkt-material-body small { margin-top: auto; color: var(--muted); overflow-wrap: anywhere; }
.mkt-material-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.mkt-material-actions > .btn { width: 100%; min-width: 0; margin: 0; white-space: nowrap; }
.mkt-material-actions > .btn:only-child { grid-column: 1 / -1; }
.mkt-material-actions [data-mkt-preview-open] { border-color: #02dd02; color: #073b0d !important; background: #02dd02; box-shadow: 0 7px 16px rgba(2, 221, 2, .15); }
.mkt-material-actions [data-mkt-preview-open]:hover { border-color: #00c900; background: #00d500; filter: none; }
.mkt-material-actions [data-mkt-preview-open]:focus-visible { box-shadow: 0 0 0 3px rgba(2, 221, 2, .24), 0 7px 16px rgba(2, 221, 2, .15); }
.mkt-support-modal { position: fixed; z-index: 10020; inset: 0; display: none; padding: 24px; align-items: center; justify-content: center; }
.mkt-support-modal.is-open { display: flex; }
.mkt-support-modal__backdrop { position: absolute; inset: 0; background: rgba(9, 18, 35, .72); backdrop-filter: blur(3px); }
.mkt-support-modal__dialog { position: relative; display: flex; width: min(1060px, 94vw); max-height: 92vh; overflow: hidden; flex-direction: column; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: 0 28px 80px rgba(4, 15, 35, .32); }
.mkt-support-modal__header,
.mkt-support-modal__footer { display: flex; flex: 0 0 auto; padding: 16px 18px; align-items: center; gap: 10px; border-color: var(--border); }
.mkt-support-modal__header { justify-content: space-between; border-bottom: 1px solid var(--border); }
.mkt-support-modal__header h2 { margin: 0; font-size: 18px; }
.mkt-support-modal__close { display: inline-grid; width: 36px; height: 36px; padding: 0; place-items: center; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: var(--surface-soft); }
.mkt-support-modal__close svg { width: 18px; height: 18px; }
.mkt-support-modal__viewer { display: grid; min-height: 300px; height: min(70vh, 720px); padding: 14px; place-items: center; overflow: auto; background: #0c1422; }
.mkt-support-modal__viewer img,
.mkt-support-modal__viewer video,
.mkt-support-modal__viewer iframe { display: block; width: 100%; height: 100%; border: 0; }
.mkt-support-modal__viewer img,
.mkt-support-modal__viewer video { object-fit: contain; }
.mkt-support-modal__footer { justify-content: flex-end; border-top: 1px solid var(--border); }
.mkt-support-modal__footer .btn { margin: 0; }
.mkt-admin-modal .mkt-support-modal__dialog { width: min(1180px, 95vw); }
.mkt-admin-modal__eyebrow { display: block; margin-bottom: 3px; color: var(--primary); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.mkt-admin-modal__content { display: grid; min-height: 0; grid-template-columns: minmax(0, 1fr) 310px; overflow: hidden; }
.mkt-admin-modal__content .mkt-support-modal__viewer { min-width: 0; height: min(68vh, 680px); }
.mkt-admin-modal__details { padding: 20px; overflow-y: auto; border-left: 1px solid var(--border); background: var(--surface); }
.mkt-admin-modal__description { margin-bottom: 18px; }
.mkt-admin-modal__description strong { display: block; margin-bottom: 6px; font-size: 11px; }
.mkt-admin-modal__description p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.mkt-admin-modal__details dl { display: grid; margin: 0; gap: 0; }
.mkt-admin-modal__details dl > div { padding: 11px 0; border-top: 1px solid var(--border); }
.mkt-admin-modal__details dt { margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.mkt-admin-modal__details dd { margin: 0; color: var(--text); font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.mkt-admin-modal__file-fallback { display: flex; padding: 32px; align-items: center; flex-direction: column; gap: 7px; color: #fff; text-align: center; }
.mkt-admin-modal__file-fallback strong { font-size: 17px; }
.mkt-admin-modal__file-fallback span { color: #aab6c8; font-size: 12px; }
.mkt-portal-empty { grid-column: 1 / -1; padding: 48px 20px; color: var(--muted); text-align: center; }
.mkt-portal-empty svg { width: 34px; height: 34px; margin-bottom: 10px; color: var(--primary); }
.mkt-portal-empty strong,
.mkt-portal-empty p { display: block; margin: 0; }
.mkt-portal-empty p { margin-top: 5px; }

@media (max-width: 1100px) {
  .mkt-filter form,
  .affiliate-material-filter form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mkt-filter-actions { grid-column: 1 / -1; }
  .mkt-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .mkt-page-topbar { align-items: stretch; flex-direction: column; }
  .mkt-page-topbar > .btn { width: 100%; margin-left: 0; }
  .mkt-filter form,
  .affiliate-material-filter form,
  .mkt-form-grid,
  .mkt-card-grid { grid-template-columns: 1fr; }
  .mkt-form-grid .wide,
  .mkt-filter-actions { grid-column: auto; }
  .mkt-filter-actions,
  .mkt-form-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .mkt-support-modal { padding: 10px; }
  .mkt-support-modal__dialog { width: 100%; max-height: 96vh; }
  .mkt-support-modal__viewer { min-height: 240px; height: 65vh; padding: 8px; }
  .mkt-support-modal__footer { display: grid; grid-template-columns: 1fr 1fr; }
  .mkt-admin-modal__content { grid-template-columns: 1fr; overflow-y: auto; }
  .mkt-admin-modal__content .mkt-support-modal__viewer { min-height: 230px; height: 48vh; }
  .mkt-admin-modal__details { overflow: visible; border-top: 1px solid var(--border); border-left: 0; }
  .mkt-admin-modal .mkt-support-modal__footer { grid-template-columns: 1fr; }
  .mkt-support-modal__footer .btn { width: 100%; }
  .mkt-filter-actions .btn,
  .mkt-filter-actions button,
  .mkt-form-actions .btn,
  .mkt-form-actions button { width: 100%; }
  .mkt-upload-picker { align-items: stretch; flex-direction: column; }
  .mkt-upload-trigger { width: 100%; }
  .mkt-upload-selection { white-space: normal; }
}

/* ==========================================================
   PIPELINE COMERCIAL - VISUAL PREMIUM COM MODAL
   ========================================================== */

.pipeline-topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;}
.pipeline-top-actions{display:flex;align-items:center;gap:10px;}
.pipeline-new-btn{min-height:40px;border-radius:13px;padding:0 15px;gap:8px;box-shadow:0 12px 24px rgba(8,124,255,.16);}
.pipeline-new-btn span{width:20px;height:20px;display:grid;place-items:center;border-radius:8px;background:rgba(255,255,255,.18);font-size:16px;line-height:1;}

.commercial-pipeline-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:16px;}
.pipeline-summary-card{min-height:94px;padding:16px;display:flex;flex-direction:column;justify-content:space-between;overflow:hidden;position:relative;}
.pipeline-summary-card::after{content:"";position:absolute;right:-22px;top:-22px;width:76px;height:76px;border-radius:999px;background:rgba(8,124,255,.06);}
.pipeline-summary-card span{display:block;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.04em;font-weight:800;}
.pipeline-summary-card strong{display:block;margin-top:8px;color:var(--text);font-size:25px;line-height:1;letter-spacing:-.05em;font-weight:900;}
.pipeline-summary-card small{color:var(--muted);font-size:11px;line-height:1.35;font-weight:650;}

.pipeline-agenda-strip{margin-bottom:16px;padding:16px;}
.pipeline-events-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
.pipeline-events-strip .pipeline-empty.compact{grid-column:1 / -1;padding:14px;}
.pipeline-events-strip .pipeline-event{min-height:78px;align-items:flex-start;background:linear-gradient(180deg,#fff 0%,#fbfcff 100%);}

.pipeline-board{display:grid;grid-template-columns:repeat(4,minmax(280px,1fr));gap:14px;align-items:start;overflow-x:auto;padding-bottom:10px;}
.pipeline-column{min-width:280px;padding:12px;border-radius:18px;border:1px solid rgba(223,231,243,.95);background:linear-gradient(180deg,rgba(248,250,252,.92),rgba(244,248,253,.78));box-shadow:0 10px 28px rgba(15,23,42,.035);}
.pipeline-column-head{min-height:58px;padding:2px 2px 12px;border-bottom:1px solid rgba(223,231,243,.72);margin-bottom:12px;}
.pipeline-column-head strong{font-size:14px;letter-spacing:-.02em;}
.pipeline-column-head small{font-size:11px;}
.pipeline-column-head > span{width:30px;min-width:30px;height:30px;border-radius:11px;}
.pipeline-load-more{width:100%;min-height:38px;margin-top:10px;display:flex;align-items:center;justify-content:center;gap:7px;border-radius:12px;white-space:nowrap;}
.pipeline-load-more[hidden]{display:none !important;}
.pipeline-load-more svg{width:20px;height:20px;}
.pipeline-load-more small{color:var(--muted);font-size:10px;font-weight:750;}

.pipeline-card{padding:14px;border-radius:16px;border:1px solid rgba(223,231,243,.85);background:#fff;box-shadow:0 10px 22px rgba(15,23,42,.045);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;}
.pipeline-card:hover{transform:translateY(-2px);border-color:rgba(8,124,255,.22);box-shadow:0 16px 32px rgba(15,23,42,.075);}
.pipeline-card-top strong{font-size:14px;}
.pipeline-card-top small{font-size:11px;}
.pipeline-value{min-height:27px;display:inline-flex;align-items:center;padding:0 9px;border-radius:9px;background:rgba(8,124,255,.08);color:var(--blue);}
.pipeline-meta span{border:1px solid var(--border-soft);background:#f8fafc;}
.pipeline-details{border-top:1px solid var(--border-soft);padding-top:10px;}
.pipeline-details summary{width:100%;min-height:32px;display:flex;align-items:center;justify-content:center;border-radius:10px;background:rgba(8,124,255,.07);color:var(--blue);}
.pipeline-edit-form,.pipeline-event-form{background:#fbfcff;border:1px solid var(--border-soft);border-radius:13px;padding:10px;}

.pipeline-modal-overlay{position:fixed;inset:0;z-index:2147483500;display:none;align-items:center;justify-content:center;padding:18px;background:rgba(15,23,42,.62);backdrop-filter:blur(10px);}
.pipeline-modal-overlay.open{display:flex;}
.pipeline-modal{width:min(100%,820px);max-height:calc(100vh - 36px);overflow:auto;border:1px solid rgba(223,231,243,.95);border-radius:24px;background:var(--surface);box-shadow:0 35px 90px rgba(15,23,42,.32);}
.pipeline-modal-head{position:sticky;top:0;z-index:2;padding:20px 22px;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;border-bottom:1px solid var(--border-soft);background:rgba(255,255,255,.94);backdrop-filter:blur(12px);}
.pipeline-modal-head h2{margin:0;color:var(--text);font-size:22px;line-height:1.1;letter-spacing:-.05em;font-weight:900;}
.pipeline-modal-head p{margin:6px 0 0;color:var(--muted);font-size:13px;font-weight:650;}
.pipeline-modal-close{width:38px;min-width:38px;height:38px;min-height:38px;padding:0;border-radius:13px;background:var(--surface-soft);color:var(--text);border:1px solid var(--border);font-size:24px;line-height:1;}
.pipeline-modal-form{padding:22px;}
.pipeline-modal-form .form-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;}
body.modal-open{overflow:hidden;}

@media(max-width:1300px){
  .commercial-pipeline-summary{grid-template-columns:repeat(2,minmax(0,1fr));}
  .pipeline-events-strip{grid-template-columns:repeat(2,minmax(0,1fr));}
}

@media(max-width:760px){
  .pipeline-topbar,.pipeline-top-actions{flex-direction:column;width:100%;}
  .pipeline-top-actions .btn,.pipeline-top-actions button{width:100%;}
  .commercial-pipeline-summary,.pipeline-events-strip{grid-template-columns:1fr;}
  .pipeline-board{grid-template-columns:1fr;overflow:visible;}
  .pipeline-column{min-width:0;}
  .pipeline-modal{border-radius:20px;}
  .pipeline-modal-form{grid-template-columns:1fr;padding:18px;}
  .pipeline-modal-form .form-actions{display:grid;grid-template-columns:1fr;}
  .pipeline-modal-form .form-actions button{width:100%;}
}

/* ==========================================================
   PIPELINE COMERCIAL - EDITAR LEAD EM MODAL
   ========================================================== */

.pipeline-edit-open{
  width:100%;
  min-height:34px;
  margin-top:12px;
  border-radius:11px;
  background:rgba(8,124,255,.08);
  color:var(--blue);
  border:1px solid rgba(8,124,255,.10);
  font-size:12px;
  font-weight:900;
  box-shadow:none;
}

.pipeline-edit-open:hover{
  background:rgba(8,124,255,.12);
}

.pipeline-modal-section{
  padding:0 22px 22px;
}

.pipeline-modal-section h3{
  margin:0;
  color:var(--text);
  font-size:15px;
  font-weight:900;
}

.pipeline-modal-section p{
  margin:5px 0 14px;
  color:var(--muted);
  font-size:12px;
  font-weight:650;
}

.pipeline-event-modal-form{
  padding:0 !important;
}

.pipeline-event-modal-form label{
  margin-bottom:5px !important;
  font-size:12px !important;
  text-transform:none !important;
  letter-spacing:0 !important;
  color:var(--text) !important;
}

.pipeline-event-modal-form textarea{
  grid-column:1 / -1;
}

.pipeline-event-modal-form button{
  justify-self:end;
}

@media(max-width:760px){
  .pipeline-modal-section{
    padding:0 18px 18px;
  }

  .pipeline-event-modal-form button{
    width:100%;
  }
}

/* FIX MODAL PIPELINE */

.pipeline-edit-overlay{
  position:fixed !important;
  inset:0 !important;
  width:100vw !important;
  height:100vh !important;
  display:none;
  align-items:center;
  justify-content:center;
  overflow-y:auto;
  padding:24px;
  z-index:999999 !important;
  background:rgba(15,23,42,.72) !important;
  backdrop-filter:blur(8px);
}

.pipeline-edit-overlay.open{
  display:flex !important;
}

.pipeline-edit-overlay .pipeline-modal{
  position:relative;
  width:min(860px,100%);
  margin:auto;
  animation:pipelineModalIn .18s ease;
}

@keyframes pipelineModalIn{
  from{
    opacity:0;
    transform:translateY(10px) scale(.98);
  }
  to{
    opacity:1;
    transform:translateY(0) scale(1);
  }
}

.pipeline-column{
  overflow:visible !important;
}

.pipeline-card{
  overflow:visible !important;
}

/* ==========================================================
   PIPELINE - CORREÇÃO DEFINITIVA MODAL DE EDIÇÃO
   ========================================================== */

.pipeline-edit-overlay{
  position:fixed !important;
  inset:0 !important;
  width:100vw !important;
  height:100vh !important;
  display:none !important;
  align-items:center !important;
  justify-content:center !important;
  padding:24px !important;
  overflow:auto !important;
  background:rgba(15,23,42,.72) !important;
  backdrop-filter:blur(10px) !important;
  z-index:2147483600 !important;
}

.pipeline-edit-overlay.open{
  display:flex !important;
}

.pipeline-edit-overlay .pipeline-modal{
  position:relative !important;
  width:min(100%,860px) !important;
  max-height:calc(100vh - 48px) !important;
  margin:auto !important;
  overflow:auto !important;
  transform:none !important;
}

body.modal-open .pipeline-card,
body.modal-open .pipeline-card:hover{
  transform:none !important;
}

body.modal-open{
  overflow:hidden !important;
}

/* ==========================================================
   PIPELINE - 4 COLUNAS + MÁSCARAS
   ========================================================== */

.pipeline-board{
  grid-template-columns:repeat(4,minmax(280px,1fr)) !important;
}

.js-phone-mask,
.js-money-mask{
  font-variant-numeric:tabular-nums;
}

/* ==========================================================
   PIPELINE - AGENDA DO LEAD MAIS HARMONIOSA
   ========================================================== */

.pipeline-modal-section{
  margin:0 22px 22px !important;
  padding:18px !important;
  border:1px solid var(--border) !important;
  border-radius:18px !important;
  background:linear-gradient(180deg,#fbfcff 0%,#f8fafc 100%) !important;
}

.pipeline-modal-section h3{
  display:flex;
  align-items:center;
  gap:9px;
  margin:0 !important;
  color:var(--text);
  font-size:16px !important;
  font-weight:900 !important;
  letter-spacing:-.02em;
}

.pipeline-modal-section h3::before{
  content:"";
  width:32px;
  height:32px;
  border-radius:11px;
  background:rgba(8,124,255,.10);
  box-shadow:inset 0 0 0 1px rgba(8,124,255,.08);
}

.pipeline-modal-section p{
  margin:8px 0 16px !important;
  color:var(--muted) !important;
  font-size:12px !important;
  font-weight:700 !important;
}

.pipeline-event-modal-form{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) 300px auto !important;
  gap:12px !important;
  align-items:end !important;
  padding:0 !important;
}

.pipeline-event-modal-form label{
  margin:0 0 6px !important;
  color:var(--text) !important;
  font-size:12px !important;
  font-weight:900 !important;
  text-transform:none !important;
  letter-spacing:0 !important;
}

.pipeline-event-modal-form input{
  background:#fff !important;
}

.pipeline-event-modal-form .pipeline-event-title-field{
  grid-column:1 !important;
  min-width:0;
}

.pipeline-event-modal-form .pipeline-event-grid{
  grid-column:2 !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) 110px !important;
  gap:12px !important;
}

.pipeline-event-modal-form button{
  grid-column:3 !important;
  justify-self:end !important;
  min-height:42px !important;
  border-radius:12px !important;
  padding:0 18px !important;
  background:var(--blue) !important;
  color:#fff !important;
  border:0 !important;
}

@media(max-width:760px){
  .pipeline-modal-section{
    margin:0 18px 18px !important;
    padding:15px !important;
  }

  .pipeline-event-modal-form{
    grid-template-columns:1fr !important;
  }

  .pipeline-event-modal-form .pipeline-event-title-field,
  .pipeline-event-modal-form .pipeline-event-grid,
  .pipeline-event-modal-form button{
    grid-column:1 !important;
  }

  .pipeline-event-modal-form .pipeline-event-grid{
    grid-template-columns:1fr !important;
  }

  .pipeline-event-modal-form button{
    width:100% !important;
  }
}

/* ==========================================================
   FOLLOW-UP COMERCIAL - ALERTA SSE
   ========================================================== */

.followup-toast-wrap{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:2147483000;
  width:min(380px,calc(100vw - 44px));
  display:grid;
  gap:12px;
  pointer-events:none;
}

.followup-toast{
  pointer-events:auto;
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  gap:12px;
  padding:14px;
  border:1px solid rgba(8,124,255,.18);
  border-radius:18px;
  background:rgba(255,255,255,.96);
  box-shadow:0 24px 60px rgba(15,23,42,.22);
  backdrop-filter:blur(14px);
  animation:followupToastIn .22s ease;
}

.followup-toast-icon{
  width:42px;
  height:42px;
  border-radius:15px;
  display:grid;
  place-items:center;
  background:rgba(8,124,255,.11);
  color:var(--blue);
  font-size:18px;
  font-weight:950;
}

.followup-toast-body{
  min-width:0;
}

.followup-toast-body strong{
  display:block;
  color:var(--text);
  font-size:14px;
  font-weight:950;
  letter-spacing:-.02em;
}

.followup-toast-body span{
  display:block;
  margin-top:4px;
  color:var(--text-soft);
  font-size:12px;
  font-weight:750;
}

.followup-toast-body small{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:11px;
  font-weight:700;
}

.followup-toast-actions{
  margin-top:10px;
}

.followup-toast-close{
  min-height:32px;
  padding:0 11px;
  border-radius:10px;
  background:var(--blue);
  color:#fff;
  font-size:11px;
  font-weight:900;
}

@keyframes followupToastIn{
  from{
    opacity:0;
    transform:translateY(10px) scale(.98);
  }
  to{
    opacity:1;
    transform:translateY(0) scale(1);
  }
}

@media(max-width:760px){
  .followup-toast-wrap{
    right:14px;
    bottom:14px;
    width:calc(100vw - 28px);
  }
}

/* ==========================================================
   FOLLOW-UP COMERCIAL - ALERTA GLOBAL
   ========================================================== */

.followup-toast-wrap{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:2147483000;
  width:min(400px,calc(100vw - 44px));
  display:grid;
  gap:12px;
  pointer-events:none;
}

.followup-toast{
  pointer-events:auto;
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  gap:12px;
  padding:14px;
  border:1px solid rgba(8,124,255,.18);
  border-radius:18px;
  background:rgba(255,255,255,.97);
  box-shadow:0 24px 60px rgba(15,23,42,.22);
  backdrop-filter:blur(14px);
  animation:followupToastIn .22s ease;
}

.followup-toast-icon{
  width:42px;
  height:42px;
  border-radius:15px;
  display:grid;
  place-items:center;
  background:rgba(8,124,255,.11);
  color:var(--blue);
  font-size:18px;
  font-weight:950;
}

.followup-toast-body strong{
  display:block;
  color:var(--text);
  font-size:14px;
  font-weight:950;
}

.followup-toast-body span{
  display:block;
  margin-top:4px;
  color:var(--text-soft);
  font-size:12px;
  font-weight:750;
}

.followup-toast-body small{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:11px;
  font-weight:700;
}

.followup-toast-actions{
  margin-top:10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.followup-toast-close,
.followup-toast-link{
  min-height:32px;
  padding:0 11px;
  border-radius:10px;
  background:var(--blue);
  color:#fff;
  font-size:11px;
  font-weight:900;
  border:0;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.followup-toast-link{
  background:var(--surface-soft);
  color:var(--text);
  border:1px solid var(--border);
}

@keyframes followupToastIn{
  from{opacity:0;transform:translateY(10px) scale(.98);}
  to{opacity:1;transform:translateY(0) scale(1);}
}

@media(max-width:760px){
  .followup-toast-wrap{
    right:14px;
    bottom:14px;
    width:calc(100vw - 28px);
  }
}

/* ==========================================================
   HOTFIX FINAL - PIPELINE COMERCIAL / DARK / MOBILE / TOAST
   Mantém os blocos anteriores e apenas corrige conflitos visuais.
   ========================================================== */

.pipeline-summary-card,
.pipeline-agenda-strip,
.pipeline-column,
.pipeline-card,
.pipeline-modal,
.pipeline-modal-head,
.pipeline-modal-section,
.pipeline-edit-form,
.pipeline-event-form,
.pipeline-event,
.followup-toast {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.pipeline-column {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%) !important;
  box-shadow: var(--shadow-card) !important;
}

.pipeline-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-card) !important;
}

.pipeline-card:hover {
  border-color: rgba(8,124,255,.28) !important;
}

.pipeline-summary-card::after {
  background: rgba(8,124,255,.08) !important;
}

.pipeline-card-top strong,
.pipeline-column-head strong,
.pipeline-summary-card strong,
.pipeline-modal-head h2,
.pipeline-modal-section h3,
.pipeline-event strong,
.followup-toast-body strong {
  color: var(--text) !important;
}

.pipeline-card-top small,
.pipeline-summary-card small,
.pipeline-modal-head p,
.pipeline-modal-section p,
.pipeline-event span,
.pipeline-event small,
.followup-toast-body span,
.followup-toast-body small {
  color: var(--muted) !important;
}

.pipeline-meta span,
.pipeline-value,
.pipeline-details summary,
.pipeline-edit-open,
.pipeline-empty,
.pipeline-empty.compact {
  background: var(--surface-soft) !important;
  border-color: var(--border) !important;
}

.pipeline-meta span,
.pipeline-empty,
.pipeline-empty.compact {
  color: var(--muted) !important;
}

.pipeline-value,
.pipeline-details summary,
.pipeline-edit-open {
  color: var(--blue) !important;
}

.pipeline-modal-overlay,
.pipeline-edit-overlay {
  background: rgba(15,23,42,.72) !important;
}

.pipeline-modal-head {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
}

.pipeline-modal-section {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%) !important;
}

.pipeline-modal-close {
  background: var(--surface-soft) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.pipeline-modal input,
.pipeline-modal select,
.pipeline-modal textarea,
.pipeline-edit-form input,
.pipeline-edit-form select,
.pipeline-edit-form textarea,
.pipeline-event-form input,
.pipeline-event-form select,
.pipeline-event-form textarea {
  background-color: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] .pipeline-modal input,
html[data-theme="dark"] .pipeline-modal select,
html[data-theme="dark"] .pipeline-modal textarea,
html[data-theme="dark"] .pipeline-edit-form input,
html[data-theme="dark"] .pipeline-edit-form select,
html[data-theme="dark"] .pipeline-edit-form textarea,
html[data-theme="dark"] .pipeline-event-form input,
html[data-theme="dark"] .pipeline-event-form select,
html[data-theme="dark"] .pipeline-event-form textarea {
  background-color: var(--surface-soft) !important;
}

.followup-toast-wrap {
  z-index: 2147483000 !important;
}

.followup-toast {
  border-radius: 18px !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 24px 60px rgba(15,23,42,.22) !important;
}

html[data-theme="dark"] .followup-toast {
  box-shadow: 0 24px 60px rgba(0,0,0,.45) !important;
}

.followup-toast-icon {
  background: rgba(8,124,255,.13) !important;
  color: var(--blue) !important;
}

.followup-toast-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.followup-toast-close,
.followup-toast-link {
  min-height: 34px !important;
  padding: 0 13px !important;
  border-radius: 11px !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

.followup-toast-close {
  background: var(--blue) !important;
  color: #fff !important;
  border: 1px solid var(--blue) !important;
}

.followup-toast-link {
  background: var(--surface-soft) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}

.followup-toast-link:hover {
  color: var(--blue) !important;
  border-color: rgba(8,124,255,.35) !important;
}

@media (max-width: 900px) {
  .content {
    overflow-x: hidden !important;
  }

  .pipeline-board {
    display: flex !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    gap: 14px !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 2px 16px !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    scroll-snap-type: x mandatory;
  }

  .pipeline-column {
    flex: 0 0 86vw !important;
    min-width: 86vw !important;
    max-width: 86vw !important;
    scroll-snap-align: start;
    overflow: visible !important;
  }

  .pipeline-card {
    overflow: visible !important;
  }

  .pipeline-board::-webkit-scrollbar {
    height: 6px;
  }

  .pipeline-board::-webkit-scrollbar-thumb {
    background: rgba(100,116,139,.35);
    border-radius: 999px;
  }

  .followup-toast-wrap {
    right: 14px !important;
    bottom: 14px !important;
    width: calc(100vw - 28px) !important;
  }
}

@media (max-width: 520px) {
  .pipeline-column {
    flex-basis: 88vw !important;
    min-width: 88vw !important;
    max-width: 88vw !important;
  }

  .followup-toast {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    padding: 13px !important;
  }

  .followup-toast-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }

  .followup-toast-close,
  .followup-toast-link {
    width: 100% !important;
  }
}

/* ==========================================================
   LOGIN / AUTH - SEÇÃO OFICIAL ÚNICA
   Usada por: index.php, esqueci_senha.php e redefinir_senha.php
   ========================================================== */

.login-page.login-modern-page{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:22px;
  overflow:hidden;
  background:
    radial-gradient(circle at 12% 88%, rgba(255,255,255,.14), transparent 24%),
    radial-gradient(circle at 88% 18%, rgba(255,255,255,.12), transparent 28%),
    linear-gradient(135deg,#087cff 0%,#05b6d2 46%,#00f21d 100%) !important;
}

.login-modern-shell{
  width:min(100%,920px);
  min-height:500px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 380px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.34);
  border-radius:28px;
  background:rgba(255,255,255,.16);
  box-shadow:0 30px 76px rgba(15,23,42,.20);
  backdrop-filter:blur(22px);
}

.login-hero{
  padding:44px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
}

.login-hero-badge{
  width:max-content;
  min-height:25px;
  padding:0 13px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.22);
  color:rgba(255,255,255,.92);
  font-size:10px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.login-hero h1{
  margin:20px 0 0;
  color:#087cff;
  font-size:46px;
  line-height:.98;
  letter-spacing:-.075em;
  font-weight:950;
}

.login-hero h1 span{
  color:#28e428;
}

.login-hero p{
  max-width:430px;
  margin:18px 0 0;
  color:rgba(255,255,255,.90);
  font-size:15px;
  line-height:1.5;
  font-weight:800;
}

.login-hero-cards{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:11px;
  margin-top:34px;
}

.login-hero-cards div{
  min-height:66px;
  padding:13px;
  border-radius:15px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.20);
  color:#fff;
}

.login-hero-cards strong{
  display:block;
  font-size:13px;
  font-weight:950;
}

.login-hero-cards small{
  display:block;
  margin-top:5px;
  color:rgba(255,255,255,.78);
  font-size:11px;
  line-height:1.35;
  font-weight:800;
}

.login-modern-card{
  align-self:center;
  margin:16px;
  padding:26px;
  border-radius:22px;
  background:rgba(255,255,255,.96);
}

.login-brand{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:20px;
}

.login-brand-icon{
  width:42px;
  height:42px;
  min-width:42px;
  min-height:42px;
  max-width:42px;
  max-height:42px;
  border-radius:10px;
  overflow:hidden;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#000;
  flex:0 0 42px;
  color:transparent;
  font-size:0;
  line-height:0;
  box-shadow:0 10px 22px rgba(8,124,255,.14);
}

.login-brand-icon img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  border-radius:13px;
}

.login-brand h2{
  margin:0;
  color:#10172a;
  font-size:25px;
  line-height:1.05;
  letter-spacing:-.055em;
  font-weight:950;
}

.login-brand p{
  margin:4px 0 0;
  color:#64748b;
  font-size:13px;
  line-height:1.25;
  font-weight:800;
}

.login-modern-form{
  display:grid;
  gap:12px;
  margin:0;
}

.login-field{
  margin:0;
}

.login-field label{
  margin:0 0 6px;
  color:#182238;
  font-size:11px;
  font-weight:900;
}

.login-field input{
  width:100%;
  height:42px;
  min-height:42px;
  border-radius:13px;
  border:1px solid #dbe5f2;
  background:#f8fafc;
  color:#10172a;
  padding:0 13px;
  outline:none;
  font-size:13px;
  font-weight:700;
}

.login-field input:focus{
  border-color:rgba(8,124,255,.48);
  box-shadow:0 0 0 4px rgba(8,124,255,.10);
}

.login-field input::placeholder{
  color:#94a3b8;
  font-weight:800;
}

.forgot-link,
.login-bottom-link{
  color:#087cff;
  font-weight:900;
  text-decoration:none;
}

.forgot-link{
  justify-self:end;
  margin-top:-2px;
  margin-bottom:2px;
  font-size:11px;
}

.login-bottom-link{
  justify-self:start;
  display:inline-flex;
  margin-top:10px;
  padding-top:4px;
  font-size:12px;
}

.login-bottom-link:hover,
.forgot-link:hover{
  text-decoration:underline;
}

.login-submit,
.login-modern-form button[type="submit"],
.login-modern-card button[type="submit"]{
  width:100%;
  min-height:44px;
  height:44px;
  margin-top:4px;
  border:0;
  border-radius:13px;
  background:linear-gradient(135deg,#087cff 0%,#2d72ff 100%);
  color:#fff;
  font-size:14px;
  font-weight:950;
  box-shadow:0 14px 28px rgba(8,124,255,.18);
}

.login-helper-text{
  margin:0 0 16px;
  color:#64748b;
  font-size:13px;
  line-height:1.45;
  font-weight:700;
}

.login-secure,
.auth-secure{
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid rgba(148,163,184,.20);
  text-align:center;
  color:#94a3b8;
  font-size:11px;
  font-weight:850;
}

.login-modern-card .alert{
  margin:0 0 16px;
  padding:12px 14px;
  border-radius:13px;
  font-size:12px;
  font-weight:800;
}

@media(max-width:1100px){
  .login-modern-shell{
    width:min(100%,860px);
    grid-template-columns:minmax(0,1fr) 360px;
  }

  .login-hero{
    padding:38px;
  }

  .login-hero h1{
    font-size:40px;
  }
}

@media(max-width:760px){
  .login-page.login-modern-page{
    padding:16px;
  }

  .login-modern-shell{
    width:100%;
    min-height:auto;
    display:block;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
    backdrop-filter:none;
  }

  .login-hero{
    display:none;
  }

  .login-modern-card{
    margin:0;
    padding:24px 22px;
    border-radius:24px;
  }

  .login-brand{
    gap:14px;
    margin-bottom:20px;
  }

  .login-brand-icon{
    width:48px;
    height:48px;
    min-width:48px;
    min-height:48px;
    max-width:48px;
    max-height:48px;
    flex-basis:48px;
    border-radius:10px;
  }

  .login-brand-icon img{
    border-radius:15px;
  }

  .login-brand h2{
    font-size:30px;
  }

  .login-brand p{
    font-size:15px;
  }

  .login-field input{
    height:50px;
    min-height:50px;
    border-radius:16px;
    font-size:16px;
  }

  .login-submit,
  .login-modern-form button[type="submit"],
  .login-modern-card button[type="submit"]{
    height:52px;
    min-height:52px;
    border-radius:16px;
    font-size:16px;
  }

  .forgot-link,
  .login-bottom-link{
    font-size:14px;
  }
}

/* ==========================================================
   WC CONFIRM MODAL - COMPACTO GLOBAL
   Visual único para confirmações do sistema.
   ========================================================== */

.wc-confirm-overlay{
  position:fixed;
  inset:0;
  z-index:2147483600;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(15,23,42,.64);
  backdrop-filter:blur(7px);
}

.wc-confirm-overlay.open{
  display:flex;
}

.wc-confirm-modal{
  width:min(100%,420px);
  overflow:hidden;
  border:1px solid rgba(15,23,42,.12);
  border-radius:20px;
  background:var(--surface);
  box-shadow:0 28px 72px rgba(15,23,42,.28);
  transform:translateY(7px) scale(.985);
  opacity:0;
  transition:transform .18s ease, opacity .18s ease;
}

.wc-confirm-overlay.open .wc-confirm-modal{
  transform:translateY(0) scale(1);
  opacity:1;
}

.wc-confirm-body{
  padding:28px 26px 20px;
  text-align:center;
}

.wc-confirm-icon{
  width:62px;
  height:62px;
  margin:0 auto 18px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:rgba(244,63,94,.12);
  color:#e34848;
  border:1px solid rgba(244,63,94,.20);
}

.wc-confirm-icon svg{
  width:27px;
  height:27px;
}

.wc-confirm-title{
  margin:0;
  color:var(--text);
  font-size:25px;
  line-height:1.08;
  letter-spacing:-.055em;
  font-weight:900;
}

.wc-confirm-message{
  margin:12px auto 0;
  max-width:340px;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
  font-weight:600;
}

.wc-confirm-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  padding:18px 22px 22px;
  border-top:1px solid var(--border-soft);
}

.wc-confirm-btn{
  width:100%;
  min-height:40px !important;
  height:40px !important;
  border-radius:12px !important;
  padding:0 14px !important;
  font-size:13px !important;
  font-weight:800 !important;
  cursor:pointer;
}

.wc-confirm-btn.cancel{
  background:var(--surface) !important;
  color:var(--text-soft) !important;
  border:1px solid rgba(8,124,255,.32) !important;
}

.wc-confirm-btn.confirm{
  background:#d53532 !important;
  color:#fff !important;
  border:1px solid #d53532 !important;
}

.wc-confirm-btn.cancel:hover{
  background:var(--surface-soft) !important;
}

.wc-confirm-btn.confirm:hover{
  filter:brightness(.96);
}

html[data-theme="dark"] .wc-confirm-overlay{
  background:rgba(0,0,0,.62);
}

html[data-theme="dark"] .wc-confirm-modal{
  border-color:var(--border);
}

@media(max-width:520px){
  .wc-confirm-overlay{
    padding:14px;
  }

  .wc-confirm-modal{
    width:100%;
    border-radius:18px;
  }

  .wc-confirm-body{
    padding:24px 20px 18px;
  }

  .wc-confirm-icon{
    width:56px;
    height:56px;
    margin-bottom:15px;
  }

  .wc-confirm-icon svg{
    width:24px;
    height:24px;
  }

  .wc-confirm-title{
    font-size:22px;
  }

  .wc-confirm-message{
    font-size:12px;
  }

  .wc-confirm-actions{
    grid-template-columns:1fr;
    gap:10px;
    padding:16px 18px 18px;
  }

  .wc-confirm-btn{
    min-height:40px !important;
    height:40px !important;
  }
}

body.modal-open{
  overflow:hidden;
}


/* ==========================================================
   MINHA CONTA / SEGURANÇA / NOTIFICAÇÕES
   ========================================================== */

.account-page-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 360px;
  gap:17px;
  align-items:start;
}

.account-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow-card);
  padding:18px;
}

.account-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}

.account-card-title{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.account-card-icon{
  width:38px;
  min-width:38px;
  height:38px;
  border-radius:13px;
  display:grid;
  place-items:center;
  background:rgba(8,124,255,.10);
  color:var(--blue);
}

.account-card-icon svg{
  width:18px;
  height:18px;
}

.account-card h2{
  margin:0;
  color:var(--text);
  font-size:16px;
  line-height:1.15;
  letter-spacing:-.03em;
  font-weight:900;
}

.account-card p{
  margin:5px 0 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
  font-weight:600;
}

.account-profile-box{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px;
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--surface-soft);
}

.account-avatar{
  width:54px;
  min-width:54px;
  height:54px;
  border-radius:18px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#087cff,#00d56f);
  color:#fff;
  font-size:20px;
  font-weight:950;
  letter-spacing:-.04em;
}

.account-profile-box strong{
  display:block;
  color:var(--text);
  font-size:15px;
  font-weight:900;
}

.account-profile-box span{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
  word-break:break-word;
}

.account-info-list{
  display:grid;
  gap:10px;
  margin-top:14px;
}

.account-info-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:11px 12px;
  border:1px solid var(--border);
  border-radius:13px;
  background:var(--surface-soft);
}

.account-info-item span{
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.03em;
}

.account-info-item strong{
  color:var(--text);
  font-size:12px;
  font-weight:900;
  text-align:right;
}

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

.account-security-grid .full{
  grid-column:1 / -1;
}

.account-form-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:16px;
}

.account-notification-status{
  display:flex;
  align-items:center;
  gap:13px;
  padding:14px;
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--surface-soft);
}

.account-notification-status-icon{
  width:42px;
  min-width:42px;
  height:42px;
  border-radius:15px;
  display:grid;
  place-items:center;
  background:rgba(8,124,255,.10);
  color:var(--blue);
}

.account-notification-status-icon svg{
  width:20px;
  height:20px;
}

.account-notification-status strong{
  display:block;
  color:var(--text);
  font-size:13px;
  font-weight:900;
}

.account-notification-status span{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
  font-weight:650;
}

.account-notification-actions{
  display:grid;
  gap:10px;
  margin-top:14px;
}

.account-notification-actions .btn,
.account-notification-actions button{
  width:100%;
  min-height:40px;
  border-radius:12px;
}

.account-muted-note{
  margin-top:13px;
  padding:12px;
  border-radius:13px;
  border:1px solid rgba(8,124,255,.14);
  background:rgba(8,124,255,.06);
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
  font-weight:650;
}

.account-alert{
  grid-column:1 / -1;
}

html[data-theme="dark"] .account-card,
html[data-theme="dark"] .account-profile-box,
html[data-theme="dark"] .account-info-item,
html[data-theme="dark"] .account-notification-status{
  border-color:var(--border);
}

html[data-theme="dark"] .account-muted-note{
  background:rgba(8,124,255,.09);
  border-color:rgba(8,124,255,.18);
}

@media(max-width:1100px){
  .account-page-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:760px){
  .account-card{
    padding:15px;
  }

  .account-card-head{
    flex-direction:column;
  }

  .account-security-grid{
    grid-template-columns:1fr;
  }

  .account-security-grid .full{
    grid-column:auto;
  }

  .account-form-actions{
    display:grid;
    grid-template-columns:1fr;
  }

  .account-form-actions .btn,
  .account-form-actions button{
    width:100%;
  }

  .account-info-item{
    align-items:flex-start;
    flex-direction:column;
  }

  .account-info-item strong{
    text-align:left;
  }
}


/* ==========================================================
   APP UPDATE BANNER
   Aviso global de nova versão do sistema
   ========================================================== */

.wc-update-banner{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:2147483601;
  width:min(420px, calc(100vw - 28px));
  display:flex;
  align-items:center;
  gap:13px;
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(8,124,255,.22);
  background:var(--surface);
  box-shadow:0 24px 70px rgba(15,23,42,.22);
  animation:wcUpdateIn .22s ease;
}

@keyframes wcUpdateIn{
  from{opacity:0;transform:translateY(10px) scale(.98);}
  to{opacity:1;transform:none;}
}

.wc-update-icon{
  width:42px;
  min-width:42px;
  height:42px;
  border-radius:15px;
  display:grid;
  place-items:center;
  background:rgba(8,124,255,.10);
  color:var(--blue);
}

.wc-update-icon svg{
  width:20px;
  height:20px;
}

.wc-update-body{
  min-width:0;
  flex:1;
}

.wc-update-body strong{
  display:block;
  color:var(--text);
  font-size:13px;
  font-weight:900;
  letter-spacing:-.02em;
}

.wc-update-body span{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
  font-weight:650;
}

.wc-update-btn{
  width:auto;
  min-width:118px;
  min-height:38px !important;
  height:38px !important;
  border-radius:12px !important;
  padding:0 14px !important;
  font-size:12px !important;
  white-space:nowrap;
}

@media(max-width:640px){
  .wc-update-banner{
    left:14px;
    right:14px;
    bottom:14px;
    width:auto;
    align-items:flex-start;
    flex-wrap:wrap;
  }

  .wc-update-btn{
    width:100%;
  }
}



/* =======================
   PERMISSÕES / ACESSO NEGADO
   ======================= */
.permissions-page > .panel + .panel {
  margin-top: 22px;
}

.permissions-page .section-title {
  margin-bottom: 18px;
}

.permissions-page .grid.two {
  gap: 14px;
}

.permissions-page .card-mini {
  padding: 15px 16px;
}

.permissions-page .form-grid {
  row-gap: 16px;
}

.access-denied-page {
  min-height: calc(100vh - 110px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 0 48px;
}

.access-denied-card {
  width: min(620px, 100%);
  padding: 38px 34px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.access-denied-icon {
  width: 74px;
  height: 74px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: #ff3b30;
  background: rgba(255, 59, 48, .10);
  border: 1px solid rgba(255, 59, 48, .18);
}

.access-denied-icon svg {
  width: 34px;
  height: 34px;
}

.access-denied-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: #ff3b30;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.access-denied-card h1 {
  max-width: 500px;
  margin: 0 auto;
  color: var(--text);
  font-size: 27px;
  line-height: 1.22;
  letter-spacing: -.035em;
}

.access-denied-card p {
  max-width: 500px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.access-denied-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 26px;
}

.access-denied-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.access-denied-actions .btn svg {
  width: 17px;
  height: 17px;
}

@media (max-width: 700px) {
  .permissions-page > .panel + .panel {
    margin-top: 16px;
  }

  .access-denied-page {
    min-height: auto;
    align-items: flex-start;
    padding: 18px 0 36px;
  }

  .access-denied-card {
    padding: 30px 20px;
    border-radius: 20px;
  }

  .access-denied-card h1 {
    font-size: 23px;
  }

  .access-denied-actions {
    flex-direction: column;
  }

  .access-denied-actions .btn {
    width: 100%;
  }
}

/* =======================
   BOLETOS PENDENTES
   ======================= */
.boletos-pendentes-topbar {
  align-items: flex-start;
}

.boletos-pendentes-topbar .top-actions {
  margin-left: auto;
}

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

.boletos-pendentes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.boletos-pendentes-panel {
  min-width: 0;
}

.boletos-pendentes-grid .boletos-pendentes-panel {
  margin: 0;
  height: 100%;
}

.boletos-pendentes-review {
  margin-top: 18px;
}

.boletos-pendentes-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.boletos-pendentes-title-row h2 {
  margin: 0;
}

.boletos-pendentes-count {
  min-width: 27px;
  height: 27px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 124, 255, .10);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.boletos-pendentes-empty {
  min-height: 210px;
  padding: 30px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.boletos-pendentes-empty.compact {
  min-height: 150px;
}

.boletos-pendentes-empty-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: rgba(34, 197, 94, .12);
  color: var(--success);
}

.boletos-pendentes-empty-icon svg {
  width: 24px;
  height: 24px;
}

.boletos-pendentes-empty strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.boletos-pendentes-empty span {
  max-width: 390px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 1350px) {
  .boletos-pendentes-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .boletos-pendentes-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .boletos-pendentes-topbar {
    align-items: stretch;
  }

  .boletos-pendentes-topbar .top-actions {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 520px) {
  .boletos-pendentes-kpis {
    grid-template-columns: 1fr;
  }

  .boletos-pendentes-empty {
    min-height: 170px;
  }
}

/* Ícones Lucide padronizados no modal de edição do lead. */
.pipeline-edit-overlay .pipeline-modal-head > div:first-child::before,
.pipeline-edit-overlay .pipeline-form-block-head::before,
.pipeline-edit-overlay .pipeline-form-block-head::after,
.pipeline-modal-section h3::before{
  display:none !important;
  content:none !important;
}

.pipeline-modal-title-icon,
.pipeline-form-block-icon,
.pipeline-modal-section-icon{
  display:grid;
  place-items:center;
  background:rgba(8,124,255,.09);
  color:var(--blue);
  box-shadow:inset 0 0 0 1px rgba(8,124,255,.10);
}

.pipeline-modal-title-icon{
  position:absolute;
  left:0;
  top:50%;
  width:50px;
  height:50px;
  border-radius:18px;
  transform:translateY(-50%);
}

.pipeline-form-block-icon{
  position:absolute;
  left:0;
  top:0;
  width:46px;
  height:46px;
  border-radius:16px;
}

.pipeline-modal-section-icon{
  width:32px;
  min-width:32px;
  height:32px;
  border-radius:11px;
}

.pipeline-modal-title-icon svg{
  width:23px;
  height:23px;
}

.pipeline-form-block-icon svg{
  width:21px;
  height:21px;
}

.pipeline-modal-section-icon svg{
  width:17px;
  height:17px;
}

.pipeline-edit-open,
.pipeline-edit-actions button,
.pipeline-event-modal-form button{
  gap:7px;
}

.pipeline-edit-open svg,
.pipeline-edit-actions button svg,
.pipeline-event-modal-form button svg,
.pipeline-modal-close svg{
  width:16px;
  height:16px;
  stroke-width:2.2;
}

@media(max-width:560px){
  .pipeline-modal-title-icon{
    width:42px;
    height:42px;
    border-radius:14px;
  }
}

/* ==========================================================
   BOLETOS PENDENTES - APROVEITAMENTO TOTAL DA ÁREA ÚTIL
   Mantém o ajuste isolado nesta página.
   ========================================================== */
@media (min-width: 901px) {
  .content.boletos-pendentes-page {
    width: auto !important;
    max-width: none !important;
    margin-left: 320px !important;
    margin-right: 0 !important;
    padding: 34px 18px 28px !important;
    overflow: visible !important;
  }

  body.sidebar-collapsed .content.boletos-pendentes-page {
    margin-left: 64px !important;
  }

  .boletos-pendentes-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
  }

  .boletos-pendentes-topbar > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
  }

  .boletos-pendentes-topbar .top-actions {
    flex: 0 0 auto;
    margin-left: 0;
  }

  .boletos-pendentes-kpis,
  .boletos-pendentes-grid,
  .boletos-pendentes-review {
    width: 100%;
    max-width: none;
  }

  .boletos-pendentes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .boletos-pendentes-panel .table-wrap {
    width: 100%;
    max-width: 100%;
  }

  .boletos-pendentes-panel table {
    width: 100%;
    min-width: 100%;
  }

  .boletos-pendentes-panel th,
  .boletos-pendentes-panel td {
    white-space: normal;
  }
}

@media (min-width: 901px) and (max-width: 1250px) {
  .boletos-pendentes-grid {
    grid-template-columns: 1fr;
  }
}


/* Destaque visual para leads pertencentes a colaboradores */
.pipeline-card.pipeline-card-collaborator {
  position: relative;
  border-color: rgba(124, 58, 237, .30);
  background: linear-gradient(180deg, rgba(124, 58, 237, .055) 0%, var(--surface) 42%);
  box-shadow: 0 10px 24px rgba(124, 58, 237, .08);
}
.pipeline-card.pipeline-card-collaborator::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: #7c3aed;
}
.pipeline-card.pipeline-card-collaborator:hover {
  border-color: rgba(124, 58, 237, .48);
  box-shadow: 0 16px 34px rgba(124, 58, 237, .13);
}
.pipeline-meta span.pipeline-owner-collaborator {
  gap: 5px;
  border: 1px solid rgba(124, 58, 237, .20);
  background: rgba(124, 58, 237, .10);
  color: #6d28d9;
}
.pipeline-meta span.pipeline-owner-collaborator strong {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}
[data-theme="dark"] .pipeline-card.pipeline-card-collaborator {
  border-color: rgba(167, 139, 250, .36);
  background: linear-gradient(180deg, rgba(124, 58, 237, .15) 0%, var(--surface) 44%);
}
[data-theme="dark"] .pipeline-meta span.pipeline-owner-collaborator {
  border-color: rgba(167, 139, 250, .30);
  background: rgba(124, 58, 237, .20);
  color: #c4b5fd;
}

/* ==========================================================
   PIPELINE COMERCIAL - MODAL DE EDIÇÃO ORGANIZADA
   ========================================================== */

.pipeline-edit-overlay .pipeline-modal{
  width:min(100%,1000px) !important;
  max-height:calc(100vh - 48px) !important;
  border-radius:24px !important;
  overflow:auto !important;
  background:#fff !important;
  box-shadow:0 34px 90px rgba(15,23,42,.30) !important;
}

.pipeline-edit-overlay .pipeline-modal-head{
  position:sticky;
  top:0;
  z-index:5;
  align-items:center;
  padding:22px 28px !important;
  background:rgba(255,255,255,.97) !important;
  border-bottom-color:#e5edf6 !important;
  color:#0f172a !important;
}

.pipeline-edit-overlay .pipeline-modal-head > div:first-child{
  position:relative;
  min-height:54px;
  padding-left:70px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.pipeline-edit-overlay .pipeline-modal-head > div:first-child::before{
  content:"✎";
  position:absolute;
  left:0;
  top:50%;
  width:50px;
  height:50px;
  display:grid;
  place-items:center;
  transform:translateY(-50%);
  border:1px solid rgba(8,124,255,.22);
  border-radius:18px;
  background:rgba(8,124,255,.07);
  color:var(--blue);
  font-size:25px;
  font-weight:800;
}

.pipeline-edit-overlay .pipeline-modal-head h2{
  color:#0f172a !important;
  font-size:25px !important;
  letter-spacing:-.04em !important;
}

.pipeline-edit-overlay .pipeline-modal-head p{
  margin-top:5px !important;
  color:#64748b !important;
  font-size:13px !important;
}

.pipeline-edit-overlay .pipeline-modal-close{
  width:44px !important;
  min-width:44px !important;
  height:44px !important;
  min-height:44px !important;
  border-radius:14px !important;
  background:#fff !important;
  color:#334155 !important;
  border-color:#d6e0ec !important;
  font-size:25px !important;
}

.pipeline-edit-overlay .pipeline-edit-modal-form{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  gap:0 26px !important;
  padding:28px 28px 0 !important;
}

.pipeline-edit-overlay .pipeline-form-block{
  min-width:0;
  padding:0 0 24px;
  margin:0;
}

.pipeline-edit-overlay .pipeline-form-block:nth-of-type(2){
  padding-left:26px;
  border-left:1px solid #e5edf6;
}

.pipeline-edit-overlay .pipeline-form-block:nth-of-type(3){
  grid-column:1 / -1;
  padding-top:20px;
  border-top:1px solid #e5edf6;
}

.pipeline-edit-overlay .pipeline-form-block-head{
  position:relative;
  min-height:48px;
  margin-bottom:18px;
  padding-left:60px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.pipeline-edit-overlay .pipeline-form-block-head::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:46px;
  height:46px;
  border-radius:16px;
  background:rgba(8,124,255,.09);
  box-shadow:inset 0 0 0 1px rgba(8,124,255,.05);
}

.pipeline-edit-overlay .pipeline-form-block:nth-of-type(1) .pipeline-form-block-head::after,
.pipeline-edit-overlay .pipeline-form-block:nth-of-type(2) .pipeline-form-block-head::after,
.pipeline-edit-overlay .pipeline-form-block:nth-of-type(3) .pipeline-form-block-head::after{
  position:absolute;
  left:13px;
  top:10px;
  color:var(--blue);
  font-size:22px;
  line-height:1;
}

.pipeline-edit-overlay .pipeline-form-block:nth-of-type(1) .pipeline-form-block-head::after{content:"♙";}
.pipeline-edit-overlay .pipeline-form-block:nth-of-type(2) .pipeline-form-block-head::after{content:"◇";}
.pipeline-edit-overlay .pipeline-form-block:nth-of-type(3) .pipeline-form-block-head::after{content:"▣";}

.pipeline-edit-overlay .pipeline-form-block-head strong{
  display:block;
  color:#0f172a;
  font-size:17px;
  line-height:1.2;
  font-weight:900;
  letter-spacing:-.02em;
}

.pipeline-edit-overlay .pipeline-form-block-head span{
  display:block;
  margin-top:4px;
  color:#64748b;
  font-size:12px;
  line-height:1.35;
  font-weight:650;
}

.pipeline-edit-overlay .pipeline-edit-grid{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:13px !important;
}

.pipeline-edit-overlay .pipeline-edit-grid-followup{
  grid-template-columns:220px 220px minmax(0,1fr) !important;
  align-items:end !important;
  gap:18px !important;
}

.pipeline-edit-overlay .pipeline-field{
  min-width:0;
}

.pipeline-edit-overlay .pipeline-field label{
  display:block;
  margin:0 0 6px !important;
  color:#334155 !important;
  font-size:12px !important;
  line-height:1.2;
  font-weight:900 !important;
  text-transform:none !important;
  letter-spacing:0 !important;
}

.pipeline-edit-overlay .pipeline-field input,
.pipeline-edit-overlay .pipeline-field select,
.pipeline-edit-overlay .pipeline-field textarea{
  width:100%;
  min-height:46px;
  margin:0 !important;
  border:1px solid #d9e3f1 !important;
  border-radius:12px !important;
  background:#f8fafc !important;
  color:#0f172a !important;
  box-shadow:0 1px 2px rgba(15,23,42,.02) !important;
}

.pipeline-edit-overlay .pipeline-field input::placeholder,
.pipeline-edit-overlay .pipeline-field textarea::placeholder{
  color:#94a3b8 !important;
  opacity:1;
}

.pipeline-edit-overlay .pipeline-field input,
.pipeline-edit-overlay .pipeline-field select{
  padding:0 14px !important;
}

.pipeline-edit-overlay .pipeline-field textarea{
  min-height:78px !important;
  padding:12px 14px !important;
  resize:vertical;
}

.pipeline-edit-overlay .pipeline-edit-notes-field textarea{
  min-height:132px !important;
}

.pipeline-edit-overlay .pipeline-field input:focus,
.pipeline-edit-overlay .pipeline-field select:focus,
.pipeline-edit-overlay .pipeline-field textarea:focus{
  border-color:rgba(8,124,255,.55) !important;
  box-shadow:0 0 0 3px rgba(8,124,255,.10) !important;
  outline:none !important;
}

.pipeline-edit-overlay .pipeline-field-full{
  grid-column:auto !important;
}

.pipeline-edit-overlay .pipeline-edit-actions{
  grid-column:1 / -1;
  position:sticky;
  bottom:0;
  z-index:4;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin:0 -28px;
  padding:16px 28px;
  border-top:1px solid #e5edf6;
  background:rgba(255,255,255,.97);
  backdrop-filter:blur(12px);
}

.pipeline-edit-overlay .pipeline-edit-actions .btn.light{
  background:#eef3f8 !important;
  color:#334155 !important;
  border:1px solid #d6e0ec !important;
  box-shadow:none !important;
}

.pipeline-edit-overlay .pipeline-edit-actions button{
  min-height:44px;
  padding:0 18px;
  border-radius:12px;
  font-size:13px;
  font-weight:900;
}

.pipeline-edit-overlay .pipeline-edit-actions button[type="submit"]{
  min-width:150px;
  background:var(--blue);
  color:#fff;
  box-shadow:0 10px 24px rgba(8,124,255,.18);
}

.pipeline-edit-overlay .pipeline-modal-section{
  margin:22px 28px 28px !important;
  border-color:#dbe5f1 !important;
  background:#f8fafc !important;
  color:#0f172a !important;
}

.pipeline-edit-overlay .pipeline-modal-section h3{
  color:#0f172a !important;
}

.pipeline-edit-overlay .pipeline-modal-section p{
  color:#64748b !important;
}

@media(max-width:900px){
  .pipeline-edit-overlay{
    padding:14px !important;
  }

  .pipeline-edit-overlay .pipeline-modal{
    max-height:calc(100vh - 28px) !important;
  }

  .pipeline-edit-overlay .pipeline-edit-modal-form{
    grid-template-columns:1fr !important;
    padding:22px 20px 0 !important;
  }

  .pipeline-edit-overlay .pipeline-form-block:nth-of-type(2){
    padding-left:0;
    padding-top:20px;
    border-left:0;
    border-top:1px solid var(--border-soft);
  }

  .pipeline-edit-overlay .pipeline-edit-grid-followup{
    grid-template-columns:1fr 1fr !important;
  }

  .pipeline-edit-overlay .pipeline-edit-grid-followup .pipeline-field-full{
    grid-column:1 / -1 !important;
  }

  .pipeline-edit-overlay .pipeline-edit-actions{
    margin:0 -20px;
    padding:14px 20px;
  }

  .pipeline-edit-overlay .pipeline-modal-section{
    margin:18px 20px 20px !important;
  }
}

@media(max-width:560px){
  .pipeline-edit-overlay .pipeline-modal-head{
    padding:17px 18px !important;
  }

  .pipeline-edit-overlay .pipeline-modal-head > div:first-child{
    min-height:44px;
    padding-left:56px;
  }

  .pipeline-edit-overlay .pipeline-modal-head > div:first-child::before{
    width:42px;
    height:42px;
    border-radius:14px;
    font-size:21px;
  }

  .pipeline-edit-overlay .pipeline-modal-head h2{
    font-size:21px !important;
  }

  .pipeline-edit-overlay .pipeline-edit-grid-followup{
    grid-template-columns:1fr !important;
  }

  .pipeline-edit-overlay .pipeline-edit-grid-followup .pipeline-field-full{
    grid-column:1 !important;
  }

  .pipeline-edit-overlay .pipeline-edit-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
  }

  .pipeline-edit-overlay .pipeline-edit-actions button{
    width:100%;
    padding:0 10px;
  }
}

/* O modal acompanha o tema escuro sem alterar sua versão clara. */
html[data-theme="dark"] .pipeline-edit-overlay .pipeline-modal{
  background:var(--surface) !important;
  border-color:var(--border) !important;
  color:var(--text) !important;
  box-shadow:0 34px 90px rgba(0,0,0,.52) !important;
}

html[data-theme="dark"] .pipeline-edit-overlay .pipeline-modal-head,
html[data-theme="dark"] .pipeline-edit-overlay .pipeline-edit-actions{
  background:var(--surface) !important;
  border-color:var(--border) !important;
  color:var(--text) !important;
}

html[data-theme="dark"] .pipeline-edit-overlay .pipeline-modal-head h2,
html[data-theme="dark"] .pipeline-edit-overlay .pipeline-form-block-head strong,
html[data-theme="dark"] .pipeline-edit-overlay .pipeline-field label,
html[data-theme="dark"] .pipeline-edit-overlay .pipeline-modal-section h3{
  color:var(--text) !important;
}

html[data-theme="dark"] .pipeline-edit-overlay .pipeline-modal-head p,
html[data-theme="dark"] .pipeline-edit-overlay .pipeline-form-block-head span,
html[data-theme="dark"] .pipeline-edit-overlay .pipeline-modal-section p{
  color:var(--muted) !important;
}

html[data-theme="dark"] .pipeline-edit-overlay .pipeline-modal-close,
html[data-theme="dark"] .pipeline-edit-overlay .pipeline-field input,
html[data-theme="dark"] .pipeline-edit-overlay .pipeline-field select,
html[data-theme="dark"] .pipeline-edit-overlay .pipeline-field textarea,
html[data-theme="dark"] .pipeline-edit-overlay .pipeline-edit-actions .btn.light{
  background:var(--surface-soft) !important;
  color:var(--text) !important;
  border-color:var(--border) !important;
}

html[data-theme="dark"] .pipeline-edit-overlay .pipeline-field input::placeholder,
html[data-theme="dark"] .pipeline-edit-overlay .pipeline-field textarea::placeholder{
  color:#8f9bad !important;
}

html[data-theme="dark"] .pipeline-edit-overlay .pipeline-form-block:nth-of-type(2){
  border-left-color:var(--border) !important;
}

html[data-theme="dark"] .pipeline-edit-overlay .pipeline-form-block:nth-of-type(3){
  border-top-color:var(--border) !important;
}

html[data-theme="dark"] .pipeline-edit-overlay .pipeline-modal-section{
  background:var(--surface-soft) !important;
  border-color:var(--border) !important;
  color:var(--text) !important;
}

@media(max-width:900px){
  html[data-theme="dark"] .pipeline-edit-overlay .pipeline-form-block:nth-of-type(2){
    border-left:0 !important;
    border-top-color:var(--border) !important;
  }
}

/* ==========================================================
   PIPELINE COMERCIAL - AGENDA COMPACTA E ESCALÁVEL
   ========================================================== */
.pipeline-agenda-strip{
  padding:14px 16px 12px !important;
  overflow:hidden;
}

.pipeline-agenda-strip .pipeline-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:11px;
}

.pipeline-agenda-heading{
  min-width:0;
  display:flex;
  align-items:center;
  gap:11px;
}

.pipeline-agenda-icon{
  width:38px;
  min-width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:rgba(8,124,255,.10);
  color:var(--blue);
  box-shadow:inset 0 0 0 1px rgba(8,124,255,.10);
}

.pipeline-agenda-icon svg{
  width:18px;
  height:18px;
}

.pipeline-agenda-heading h2{
  margin:0;
  color:var(--text);
  font-size:15px;
  line-height:1.2;
  font-weight:900;
  letter-spacing:-.02em;
}

.pipeline-agenda-heading p{
  margin:3px 0 0;
  color:var(--muted);
  font-size:11px;
  line-height:1.3;
  font-weight:650;
}

.pipeline-agenda-tools,
.pipeline-agenda-nav{
  display:flex;
  align-items:center;
  gap:8px;
}

.pipeline-agenda-count{
  min-height:30px;
  padding:0 10px;
  display:inline-flex;
  align-items:center;
  gap:5px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--surface-soft);
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  white-space:nowrap;
}

.pipeline-agenda-count strong{
  color:var(--text);
  font-size:12px;
}

.pipeline-agenda-nav button{
  width:30px;
  min-width:30px;
  height:30px;
  min-height:30px;
  padding:0;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--surface-soft);
  color:var(--text);
  font-size:21px;
  line-height:1;
  box-shadow:none;
}

.pipeline-agenda-nav button:hover:not(:disabled){
  border-color:rgba(8,124,255,.32);
  color:var(--blue);
}

.pipeline-agenda-nav button:disabled{
  opacity:.35;
  cursor:default;
}

.pipeline-events-strip{
  display:grid !important;
  grid-template-columns:none !important;
  grid-auto-flow:column;
  grid-auto-columns:minmax(270px,320px);
  align-items:stretch;
  gap:10px;
  max-width:100%;
  padding:2px 2px 8px;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-behavior:smooth;
  scroll-snap-type:x proximity;
  overscroll-behavior-inline:contain;
  scrollbar-width:thin;
  scrollbar-color:rgba(100,116,139,.30) transparent;
}

.pipeline-events-strip::-webkit-scrollbar{
  height:5px;
}

.pipeline-events-strip::-webkit-scrollbar-track{
  background:transparent;
}

.pipeline-events-strip::-webkit-scrollbar-thumb{
  border-radius:999px;
  background:rgba(100,116,139,.30);
}

.pipeline-events-strip .pipeline-event{
  position:relative;
  min-width:0;
  min-height:82px;
  padding:11px 11px 11px 16px;
  align-items:center !important;
  flex-direction:row !important;
  overflow:hidden;
  scroll-snap-align:start;
  background:var(--surface-soft) !important;
  box-shadow:none;
}

.pipeline-events-strip .pipeline-event::before{
  content:"";
  position:absolute;
  inset:10px auto 10px 0;
  width:3px;
  border-radius:0 999px 999px 0;
  background:var(--blue);
}

.pipeline-events-strip .pipeline-event.is-overdue::before{
  background:var(--danger);
}

.pipeline-event-content{
  min-width:0;
  flex:1 1 auto;
}

.pipeline-events-strip .pipeline-event-content strong,
.pipeline-events-strip .pipeline-event-content span{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.pipeline-events-strip .pipeline-event-content strong{
  font-size:12px !important;
}

.pipeline-events-strip .pipeline-event-content span{
  margin-top:3px;
  font-size:10px !important;
}

.pipeline-events-strip .pipeline-event-time{
  width:max-content;
  max-width:100%;
  margin-top:6px;
  padding:3px 7px;
  border-radius:7px;
  background:rgba(8,124,255,.09);
  color:var(--blue) !important;
  font-size:9px !important;
  line-height:1.2;
  font-weight:900 !important;
}

.pipeline-events-strip .pipeline-event.is-overdue .pipeline-event-time{
  background:rgba(255,77,116,.10);
  color:var(--danger) !important;
}

.pipeline-events-strip .pipeline-event form{
  width:auto !important;
  flex:0 0 auto;
  margin:0;
}

.pipeline-events-strip .pipeline-event button{
  width:auto !important;
  min-height:30px;
  padding:0 9px;
  gap:4px;
  border-radius:9px;
  font-size:10px;
  white-space:nowrap;
}

.pipeline-events-strip .pipeline-empty.compact{
  width:100%;
  min-height:64px;
  display:grid;
  place-items:center;
}

.pipeline-agenda-more{
  margin:1px 2px 0;
  color:var(--muted);
  font-size:9px;
  font-weight:700;
}

@media(max-width:640px){
  .pipeline-agenda-strip{
    padding:12px !important;
  }

  .pipeline-agenda-strip .pipeline-panel-head{
    align-items:flex-start;
    flex-direction:column;
    gap:10px;
  }

  .pipeline-agenda-tools{
    width:100%;
    justify-content:space-between;
  }

  .pipeline-events-strip{
    grid-auto-columns:minmax(245px,86vw);
  }
}

/* ==========================================================
   MÓDULO DE SUPORTE
   ========================================================== */
.support-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.support-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 220px auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 18px;
}

.support-topic-grid,
.support-time-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}

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

.support-classification {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  margin: 4px 0 16px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.support-classification span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.support-classification strong { font-size: 14px; }

.support-observations-field {
  margin-top: 16px;
}

.support-form-actions {
  gap: 12px;
  margin-top: 16px;
}
.support-classification.duvida { border-color: rgba(16,185,129,.35); background: rgba(16,185,129,.06); }
.support-classification.configuracao { border-color: rgba(8,124,255,.35); background: rgba(8,124,255,.06); }
.support-classification.erro_cliente { border-color: rgba(255,138,61,.40); background: rgba(255,138,61,.07); }
.support-classification.bug { border-color: rgba(255,77,116,.38); background: rgba(255,77,116,.07); }
.support-classification.melhoria { border-color: rgba(139,92,246,.38); background: rgba(139,92,246,.07); }

.support-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.support-type.duvida { color:#07804f; background:rgba(16,185,129,.12); }
.support-type.configuracao { color:#0870df; background:rgba(8,124,255,.11); }
.support-type.erro_cliente { color:#c56a19; background:rgba(255,138,61,.14); }
.support-type.bug { color:#d8335e; background:rgba(255,77,116,.12); }
.support-type.melhoria { color:#7044cf; background:rgba(139,92,246,.12); }

.support-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.support-catalog-grid .panel { margin: 0; }
.support-catalog-grid h2 { margin-top: 0; }
.support-inline-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
.support-inline-form-wide { grid-template-columns: 1.2fr 1.2fr .8fr auto; }
.support-solution-list { display:flex; flex-wrap:wrap; gap:9px; }
.support-solution-list span { padding:8px 11px; border:1px solid var(--border); border-radius:10px; background:var(--surface-soft); font-size:12px; font-weight:700; }

.support-type-summary,
.support-ranking { display:grid; gap:10px; margin-top:16px; }
.support-type-summary > div,
.support-ranking > div { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:10px 0; border-bottom:1px solid var(--border-soft); }
.support-ranking span { display:flex; align-items:center; gap:10px; }
.support-ranking b { width:25px; height:25px; display:grid; place-items:center; border-radius:8px; background:rgba(8,124,255,.08); color:var(--blue); }
.support-empty-chart { min-height:260px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:8px; color:var(--muted); }
.support-empty-chart svg { width:32px; height:32px; color:var(--blue); }
.support-empty-chart strong { color:var(--text); }
.support-empty-chart span { font-size:12px; }
.support-dashboard-kpis { grid-template-columns: repeat(5, minmax(0,1fr)); }

.support-dashboard-recent {
  margin-top: 21px;
}

.support-catalog-panel + .support-catalog-panel {
  margin-top: 18px;
}

@media (max-width: 1100px) {
  .support-kpis,
  .support-dashboard-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .support-time-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .support-inline-form-wide { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .support-kpis,
  .support-dashboard-kpis,
  .support-topic-grid,
  .support-time-grid,
  .support-catalog-grid,
  .support-filters,
  .support-inline-form,
  .support-inline-form-wide { grid-template-columns: 1fr; }
}


/* Menu lateral 17.91: rolagem integral sem esconder os grupos principais */
.side-nav-shell {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.side-nav-shell .side-nav {
  height: 100%;
  min-height: 0;
  padding-top: 13px;
  padding-bottom: 48px;
  scroll-padding-block: 44px;
}

.side-nav-shell .side-nav-scroll {
  position: absolute;
  left: 12px;
  right: 12px;
  z-index: 12;
  width: auto;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: flex;
  transition: opacity .16s ease, visibility .16s ease, background-color .16s ease;
}

.side-nav-shell .side-nav-scroll.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.side-nav-shell .side-nav-scroll-up {
  top: 7px;
}

.side-nav-shell .side-nav-scroll-down {
  bottom: 7px;
}


/* Menu lateral 17.92: submenu integral com rolagem nativa da navegação */
.side-nav {
  padding-bottom: 24px;
  scroll-padding-block: 12px 24px;
}

.side-nav .menu-group.open .submenu {
  max-height: none;
  height: auto;
  overflow: visible;
  padding-right: 0;
}

.side-nav-scroll {
  display: none !important;
}


/* ==========================================================
   Versão 17.93 — submenus completos no fluxo do menu lateral
   ========================================================== */
.side-nav {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
.side-nav .menu-group {
  flex: 0 0 auto;
  min-height: 0;
}
.side-nav .menu-group .submenu {
  display: none !important;
  position: static !important;
  width: auto !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  transition: none !important;
  contain: none !important;
  visibility: visible;
  opacity: 1;
}
.side-nav .menu-group.open .submenu {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
}
.side-nav .menu-group.open .submenu-link {
  display: flex !important;
  flex: 0 0 auto;
  visibility: visible !important;
  opacity: 1 !important;
  scroll-margin-block: 12px 24px;
}

/* ==========================================================
   Versão 18.23 — ícones superiores refinados no modal do lead
   ========================================================== */
.pipeline-edit-overlay .pipeline-form-block-head {
  min-height: 42px;
  padding-left: 52px;
}

.pipeline-edit-overlay .pipeline-form-block-head .pipeline-form-block-icon {
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  margin: 0 !important;
  display: grid !important;
  place-items: center !important;
  transform: translateY(-50%) !important;
  border: 1px solid rgba(8, 124, 255, .14) !important;
  border-radius: 13px !important;
  background: rgba(8, 124, 255, .06) !important;
  color: var(--blue) !important;
  box-shadow: none !important;
  line-height: 1 !important;
}

.pipeline-edit-overlay .pipeline-form-block-head .pipeline-form-block-icon svg {
  width: 18px !important;
  height: 18px !important;
  color: var(--blue) !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
}

/* ==========================================================
   Versão 18.24 — acesso direto ao lead pela agenda comercial
   ========================================================== */
.pipeline-events-strip .pipeline-event-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  flex-direction: column;
  gap: 6px;
}

.pipeline-events-strip .pipeline-event-actions form {
  width: 100% !important;
  flex: 0 0 auto;
}

.pipeline-events-strip .pipeline-event-actions button {
  width: 100% !important;
  justify-content: center;
}

.pipeline-events-strip .pipeline-event-open {
  border-color: rgba(8, 124, 255, .18) !important;
  background: rgba(8, 124, 255, .07) !important;
  color: var(--blue) !important;
}

.pipeline-events-strip .pipeline-event-open:hover {
  border-color: rgba(8, 124, 255, .34) !important;
  background: rgba(8, 124, 255, .12) !important;
}

.pipeline-events-strip .pipeline-event-open svg {
  width: 13px;
  height: 13px;
}

@media (max-width: 640px) {
  .pipeline-events-strip .pipeline-event {
    align-items: flex-start !important;
  }
}

/* ==========================================================
   Versão 18.26 — central global de notificações
   ========================================================== */
.notification-bell-toggle,
.notification-mobile-toggle {
  position: relative;
  overflow: visible;
}

.side-rail .notification-bell-toggle {
  margin-top: 12px;
  background: rgba(255, 255, 255, .14);
  color: #fff !important;
}

.side-rail .notification-bell-toggle svg,
.side-rail .notification-bell-toggle i {
  width: 17px;
  height: 17px;
  color: #fff !important;
  stroke: #fff !important;
}

.notification-bell-toggle.is-pending,
.notification-mobile-toggle.is-pending {
  animation: notificationBellPulse 1.65s ease-in-out infinite;
}

.notification-bell-toggle.is-pending svg,
.notification-mobile-toggle.is-pending svg {
  animation: notificationBellSwing 1.65s ease-in-out infinite;
  transform-origin: 50% 10%;
}

.notification-bell-badge {
  position: absolute;
  top: -6px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #087cff;
  border-radius: 999px;
  background: #ff3f68;
  color: #fff;
  font-size: 9px;
  line-height: 1;
  font-weight: 950;
  box-shadow: 0 4px 12px rgba(255, 63, 104, .35);
}

.notification-bell-badge[hidden],
.notification-popover[hidden],
.notification-popover-footer[hidden] {
  display: none !important;
}

.notification-popover {
  position: fixed;
  top: 14px;
  left: 72px;
  z-index: 2147482000;
  width: min(370px, calc(100vw - 92px));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 26px 70px rgba(15, 23, 42, .25);
  animation: notificationPopoverIn .18s ease;
}

.notification-popover-head {
  min-height: 69px;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--border-soft);
}

.notification-popover-head strong,
.notification-popover-head span {
  display: block;
}

.notification-popover-head strong {
  font-size: 15px;
  font-weight: 950;
}

.notification-popover-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.notification-popover-close {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--text);
}

.notification-popover-close svg {
  width: 16px;
  height: 16px;
}

.notification-popover-list {
  max-height: min(520px, calc(100vh - 165px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.notification-popover-item {
  padding: 14px 15px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 11px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
}

.notification-popover-item:hover {
  background: var(--surface-soft);
}

.notification-popover-item-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(8, 124, 255, .09);
  color: var(--blue);
}

.notification-popover-item-icon svg {
  width: 19px;
  height: 19px;
}

.notification-popover-item-body {
  min-width: 0;
}

.notification-popover-item-body strong,
.notification-popover-item-body span,
.notification-popover-item-body small {
  display: block;
}

.notification-popover-item-body strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 900;
}

.notification-popover-item-body span {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 650;
}

.notification-popover-item-body small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.notification-popover-item-actions {
  margin-top: 9px;
  display: flex;
  gap: 7px;
}

.notification-popover-item-actions button {
  width: auto;
  min-height: 29px;
  padding: 0 10px;
  border: 1px solid rgba(8, 124, 255, .18);
  border-radius: 9px;
  background: rgba(8, 124, 255, .08);
  color: var(--blue);
  font-size: 10px;
  font-weight: 850;
}

.notification-popover-item-actions button.is-read {
  border-color: var(--border);
  background: var(--surface-soft);
  color: var(--muted);
}

.notification-popover-footer {
  padding: 11px 14px;
  border-top: 1px solid var(--border-soft);
  background: var(--surface-soft);
}

.notification-popover-footer button {
  width: 100%;
  min-height: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--blue);
  font-size: 10px;
  font-weight: 850;
}

.notification-popover-footer button svg {
  width: 15px;
  height: 15px;
}

.notification-popover-empty {
  min-height: 190px;
  padding: 30px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.notification-popover-empty svg {
  width: 31px;
  height: 31px;
  margin-bottom: 12px;
  color: var(--blue);
}

.notification-popover-empty strong {
  font-size: 13px;
}

.notification-popover-empty span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.mobile-topbar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.system-notification-toast .followup-toast-icon {
  background: rgba(18, 185, 115, .11);
  color: #12a66b;
}

.system-notification-toast .followup-toast-icon svg {
  width: 21px;
  height: 21px;
}

@keyframes notificationBellPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(2, 221, 2, 0); }
  45% { box-shadow: 0 0 0 8px rgba(2, 221, 2, .24); }
}

@keyframes notificationBellSwing {
  0%, 100% { transform: rotate(0); }
  18% { transform: rotate(12deg); }
  34% { transform: rotate(-10deg); }
  50% { transform: rotate(6deg); }
  64% { transform: rotate(0); }
}

@keyframes notificationPopoverIn {
  from { opacity: 0; transform: translateY(-6px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 900px) {
  .notification-popover {
    top: 67px;
    right: 12px;
    left: auto;
    width: min(370px, calc(100vw - 24px));
  }

  .notification-bell-badge {
    border-color: var(--surface);
  }
}

@media (prefers-reduced-motion: reduce) {
  .notification-bell-toggle.is-pending,
  .notification-bell-toggle.is-pending svg,
  .notification-mobile-toggle.is-pending,
  .notification-mobile-toggle.is-pending svg {
    animation: none;
  }
}

/* ==========================================================
   AFILIADOS
   ========================================================== */

.affiliate-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.affiliate-primary-action,
.affiliate-top-actions .btn {
  margin: 0;
  white-space: nowrap;
}

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

.affiliate-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.affiliate-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.affiliate-metric {
  --affiliate-color: #087cff;
  --affiliate-soft: rgba(8, 124, 255, .1);
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.affiliate-metric::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -28px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--affiliate-soft);
}

.affiliate-metric.metric-green { --affiliate-color: #10b981; --affiliate-soft: rgba(16, 185, 129, .1); }
.affiliate-metric.metric-violet { --affiliate-color: #7c3aed; --affiliate-soft: rgba(124, 58, 237, .1); }
.affiliate-metric.metric-orange { --affiliate-color: #f97316; --affiliate-soft: rgba(249, 115, 22, .1); }

.affiliate-metric-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--affiliate-color);
  background: var(--affiliate-soft);
}

.affiliate-metric-icon svg { width: 21px; height: 21px; }
.affiliate-metric > div { position: relative; z-index: 1; min-width: 0; }
.affiliate-metric small { display: block; color: var(--muted); font-size: 11px; font-weight: 750; }
.affiliate-metric strong { display: block; margin-top: 7px; color: var(--text); font-size: 22px; line-height: 1.05; font-weight: 900; letter-spacing: -.035em; }

.affiliate-filter {
  margin-bottom: 20px;
  padding: 18px 20px;
}

.affiliate-filter-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 220px auto;
  align-items: end;
  gap: 13px;
}

.affiliate-filter-actions,
.affiliate-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.affiliate-filter-actions .btn,
.affiliate-filter-actions button,
.affiliate-row-actions .btn { margin: 0; }

.affiliate-section {
  padding: 0;
  overflow: hidden;
  margin-bottom: 20px;
}

.affiliate-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.affiliate-section-head h2 { margin: 0; font-size: 16px; }
.affiliate-section-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.affiliate-count { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 30px; padding: 0 10px; border-radius: 999px; background: rgba(8, 124, 255, .09); color: var(--blue); font-size: 12px; font-weight: 900; }
.affiliate-section .table-wrap { border: 0; border-radius: 0; }
.affiliate-section table { margin: 0; }
.affiliate-list-table { min-width: 1180px; }

.affiliate-name {
  display: flex;
  align-items: center;
  gap: 11px;
}

.affiliate-avatar {
  display: grid;
  place-items: center;
  width: 39px;
  min-width: 39px;
  height: 39px;
  border-radius: 13px;
  color: var(--blue);
  background: rgba(8, 124, 255, .09);
  font-weight: 900;
}

.affiliate-name strong,
.affiliate-name small,
.affiliate-cell-sub { display: block; }
.affiliate-name small,
.affiliate-cell-sub { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 650; }
.affiliate-code { display: inline-flex; padding: 7px 10px; border-radius: 999px; background: rgba(124, 58, 237, .09); color: #7c3aed; font-size: 11px; font-weight: 850; }
.affiliate-table-number { font-size: 16px; font-weight: 900; }

.affiliate-empty {
  padding: 48px 20px !important;
  text-align: center;
}

.affiliate-empty-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: rgba(8, 124, 255, .08);
  color: var(--blue);
}

.affiliate-empty strong,
.affiliate-empty small { display: block; }
.affiliate-empty small { margin-top: 5px; color: var(--muted); }

.affiliate-selector {
  display: flex;
  align-items: end;
  gap: 14px;
  margin-bottom: 20px;
  padding: 15px 18px;
}

.affiliate-selector > div { width: min(100%, 560px); }
.affiliate-selector > span { padding-bottom: 10px; color: var(--muted); font-size: 12px; font-weight: 650; }

.affiliate-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding: 18px 20px;
}

.affiliate-identity-main {
  display: flex;
  align-items: center;
  gap: 13px;
}

.affiliate-identity-icon {
  display: grid;
  place-items: center;
  width: 48px;
  min-width: 48px;
  height: 48px;
  border-radius: 15px;
  color: var(--blue);
  background: rgba(8, 124, 255, .1);
}

.affiliate-identity-main small,
.affiliate-terms small { display: block; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.affiliate-identity-main strong { display: block; margin-top: 3px; color: var(--text); font-size: 19px; }
.affiliate-identity-main p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.affiliate-terms { display: grid; grid-template-columns: repeat(3, minmax(100px, 1fr)); gap: 9px; }
.affiliate-terms > div { padding: 11px 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.affiliate-terms strong { display: block; margin-top: 5px; color: var(--text); font-size: 15px; }

.affiliate-customer-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.affiliate-customer-search > div { position: relative; flex: 1; max-width: 620px; }
.affiliate-customer-search > div svg { position: absolute; top: 50%; left: 13px; width: 17px; height: 17px; color: var(--muted); transform: translateY(-50%); }
.affiliate-customer-search input { height: 41px; margin: 0; padding-left: 40px; background: var(--surface); }
.affiliate-customer-search .btn { height: 41px; margin: 0; }

.affiliate-withdrawal-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.affiliate-withdrawal-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 16px; margin-bottom: 16px; }
.affiliate-pix-panel,
.affiliate-request-panel { overflow: hidden; padding: 0; }
.affiliate-pix-form { display: grid; grid-template-columns: 170px minmax(240px, 1fr) minmax(190px, .55fr) auto; gap: 12px; align-items: end; padding: 18px 20px 20px; }
.affiliate-pix-form label { display: block; margin-bottom: 7px; color: var(--text); font-size: 12px; font-weight: 800; }
.affiliate-pix-form input,
.affiliate-pix-form select { margin: 0; height: 43px; }
.affiliate-pix-form .btn { height: 43px; margin: 0; white-space: nowrap; }
.affiliate-pix-summary { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; margin: 0; padding: 20px; }
.affiliate-pix-summary > div { padding: 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-soft); }
.affiliate-pix-summary dt { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.affiliate-pix-summary dd { margin: 6px 0 0; color: var(--text); font-weight: 850; overflow-wrap: anywhere; }
.affiliate-inline-empty,
.affiliate-admin-note { margin: 18px 20px 20px; padding: 16px; border: 1px dashed var(--border); border-radius: 13px; color: var(--muted); background: var(--surface-soft); text-align: center; }
.affiliate-request-balance { padding: 18px 20px 14px; }
.affiliate-request-balance span,
.affiliate-request-balance small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.affiliate-request-balance strong { display: block; margin: 7px 0; color: var(--text); font-size: 27px; line-height: 1; }
.affiliate-request-panel form { padding: 0 20px 20px; }
.affiliate-withdraw-button { width: 100%; margin: 0; }
.affiliate-withdrawal-table { min-width: 1080px; }
.affiliate-pix-key { max-width: 260px; overflow-wrap: anywhere; }
.affiliate-withdrawal-actions { display: flex; gap: 7px; align-items: center; }
.affiliate-withdrawal-actions form,
.affiliate-withdrawal-actions .btn { margin: 0; }
.affiliate-withdrawal-highlight td { background: rgba(8, 124, 255, .055); }

@media (max-width: 1050px) {
  .affiliate-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .affiliate-filter-grid { grid-template-columns: 1fr 210px; }
  .affiliate-filter-actions { grid-column: 1 / -1; }
  .affiliate-identity { align-items: flex-start; flex-direction: column; }
  .affiliate-pix-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .affiliate-pix-form .btn { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 700px) {
  .affiliate-topbar,
  .affiliate-selector { display: grid; }
  .affiliate-primary-action,
  .affiliate-top-actions,
  .affiliate-top-actions .btn { width: 100%; }
  .affiliate-top-actions { display: grid; }
  .affiliate-metrics,
  .affiliate-filter-grid,
  .affiliate-terms { grid-template-columns: 1fr; }
  .affiliate-filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .affiliate-filter-actions .btn,
  .affiliate-filter-actions button { width: 100%; }
  .affiliate-selector > div { width: 100%; }
  .affiliate-selector > span { padding: 0; }
  .affiliate-identity-main { align-items: flex-start; }
  .affiliate-customer-search { display: grid; grid-template-columns: 1fr auto; }
  .affiliate-customer-search > div { grid-column: 1 / -1; max-width: none; }
  .affiliate-withdrawal-metrics,
  .affiliate-withdrawal-grid,
  .affiliate-pix-form,
  .affiliate-pix-summary { grid-template-columns: 1fr; }
  .affiliate-withdrawal-actions { align-items: stretch; flex-direction: column; }
}
