* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; background: #f7f9fc; color: #1b1f2a; }
.auth-body { min-height: 100vh; display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid #e8edf3; border-radius: 14px; padding: 22px; }
.auth-brand { margin-bottom: 10px; }
.auth-subtitle { color: #7986a0; margin-top: 0; margin-bottom: 14px; }
.auth-form { display: grid; gap: 10px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; color: #4f5b72; font-size: 13px; }
.auth-form input { border: 1px solid #dfe7f3; border-radius: 8px; padding: 10px; background: #fff; }
.remember-row { flex-direction: row !important; align-items: center; gap: 8px; }
.auth-footer { margin: 14px 0 0; text-align: center; }
.auth-footer-link { margin: 14px 0 0; text-align: center; }
.auth-link { color: #2f6bff; font-weight: 600; font-size: 14px; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
.topbar { height: 62px; background: #fff; border-bottom: 1px solid #e8edf3; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon-wrap { width: 44px; height: 30px; border-radius: 6px; background: linear-gradient(90deg, #2f6bff 0%, #7ed957 100%); display: grid; place-items: center; padding: 2px; }
.brand-icon { width: 34px; height: 22px; border-radius: 4px; background: #fff; color: #2f6bff; display: grid; place-items: center; font-size: 15px; font-weight: 900; line-height: 1; }
.brand-text { font-size: 24px; line-height: 1; font-weight: 800; letter-spacing: -0.4px; }
.brand-blue { color: #0f4db8; }
.brand-green { color: #72c23c; }
.top-actions { display: flex; align-items: center; gap: 10px; color: #74809a; }
.topbar-user-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  max-width: min(280px, 40vw);
}
.topbar-user-link:hover .user-name {
  text-decoration: underline;
}
.tenant-logo-topbar {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #e8edf3;
  background: #fff;
  flex-shrink: 0;
}
.badge { background: #ff4d4f; color: #fff; font-size: 11px; border-radius: 99px; padding: 2px 6px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: #e8efff; color: #3357d0; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.user-name { color: #202938; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-logo-preview {
  max-height: 120px;
  max-width: 240px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #e8edf3;
  background: #fff;
  padding: 8px;
}

.profile-layout {
  max-width: 760px;
  margin: 0 auto;
}
.profile-panel {
  padding: 0;
  overflow: hidden;
}
.profile-form {
  padding: 0;
}
.profile-section {
  padding: 20px 22px;
  border-bottom: 1px solid #eef2f8;
}
.profile-section:last-of-type {
  border-bottom: 0;
}
.profile-section-head {
  margin-bottom: 16px;
}
.profile-section-head h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #1b1f2a;
}
.profile-section-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
}
.profile-badge-readonly {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #f1f5f9;
  color: #64748b;
  vertical-align: middle;
}
.settings-grid input.input-readonly,
input.input-readonly {
  background: #f8fafc !important;
  color: #64748b !important;
  border-color: #e2e8f0 !important;
  cursor: not-allowed;
}
.profile-logo-row {
  display: grid;
  gap: 20px;
  align-items: start;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .profile-logo-row {
    grid-template-columns: minmax(160px, 220px) 1fr;
  }
}
.profile-logo-slot {
  min-height: 140px;
  border-radius: 12px;
  border: 2px dashed #d8e0ed;
  background: linear-gradient(180deg, #fbfcfe 0%, #f4f7fb 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  text-align: center;
}
.profile-logo-slot.has-image {
  border-style: solid;
  border-color: #e8edf3;
  background: #fff;
  padding: 12px;
}
.profile-logo-slot.has-image img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #e8edf3;
}
.profile-logo-placeholder-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e8efff;
  color: #3357d0;
  display: grid;
  place-items: center;
}
.profile-logo-placeholder-inner {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
}
.profile-logo-placeholder-text {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}
.profile-upload-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-file-label {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  margin: 0;
  color: #4f5b72;
  font-size: 13px;
  font-weight: 500;
}
.profile-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.profile-file-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  border: 1px solid #dfe7f3;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s;
}
.profile-file-label:hover .profile-file-trigger {
  border-color: #c5d4ef;
  background: #f8fafc;
}
.profile-file-label:focus-within .profile-file-trigger {
  outline: 2px solid #2f6bff;
  outline-offset: 2px;
}
.profile-file-hint {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
}
.profile-file-name {
  margin: 0;
  font-size: 13px;
  color: #475569;
  min-height: 1.25em;
  word-break: break-all;
}
.profile-actions {
  padding: 18px 22px;
  background: #fafbfd;
  border-top: 1px solid #eef2f8;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}
@media (max-width: 480px) {
  .profile-actions {
    justify-content: stretch;
  }
  .profile-actions .btn-primary {
    width: 100%;
  }
}
.profile-callout {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
}
.profile-callout strong {
  color: #334155;
}

.profile-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.profile-crop-modal[hidden] {
  display: none !important;
}
.profile-crop-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
}
.profile-crop-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8edf3;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
  padding: 20px 22px;
}
.profile-crop-modal__dialog h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: #1b1f2a;
}
.profile-crop-modal__lead {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
}
.profile-crop-wrap {
  max-height: min(52vh, 420px);
  background: #f1f5f9;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  margin-bottom: 16px;
}
.profile-crop-wrap img {
  display: block;
  max-width: 100%;
}
.profile-crop-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
@media (max-width: 480px) {
  .profile-crop-modal__actions {
    flex-direction: column-reverse;
  }
  .profile-crop-modal__actions .btn-primary,
  .profile-crop-modal__actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

.logout-btn { border: 0; background: #eef3fb; color: #415174; padding: 6px 10px; border-radius: 8px; cursor: pointer; font-weight: 600; }

.nav { background: #fff; border-bottom: 1px solid #e8edf3; display: flex; gap: 24px; padding: 0 20px; height: 46px; align-items: center; }
.nav a { text-decoration: none; color: #6d7890; font-size: 14px; padding: 12px 0; border-bottom: 2px solid transparent; }
.nav a.active { color: #2b67f6; border-bottom-color: #2b67f6; font-weight: 600; }

.container { max-width: 1120px; margin: 20px auto; padding: 0 16px 30px; }
.alert { border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-weight: 600; }
.alert.success { background: #e7fff2; color: #087a4d; border: 1px solid #b9f1d6; }
.alert.error { background: #ffecec; color: #ac2d2d; border: 1px solid #ffc8c8; }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { border-radius: 10px; padding: 14px 16px; color: #fff; }
.card small { opacity: 0.95; display: block; margin-bottom: 6px; font-size: 12px; }
.card h3 { margin: 0; font-size: 34px; line-height: 1; }
.trend { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); color: #fff; }
.trend.up { background: rgba(17, 179, 96, 0.25); }
.trend.down { background: rgba(221, 47, 47, 0.25); }
.trend.neutral { background: rgba(255, 255, 255, 0.22); }
.trend-icon { margin-right: 6px; font-weight: 800; }
.blue { background: #2f6bff; } .red { background: #ef4343; } .yellow { background: #f3c228; } .green { background: #17c88c; }
.light-yellow { background: #fff4dd; color: #9a5d00; } .light-red { background: #ffe7e7; color: #a12626; } .light-green { background: #e7fff2; color: #087a4d; }

.panel { background: #fff; border: 1px solid #e8edf3; border-radius: 10px; padding: 14px; margin-bottom: 16px; }
.panel h4 { margin: 0 0 12px; font-size: 15px; }
.chart-placeholder { height: 180px; border: 1px dashed #ccdaee; border-radius: 10px; display: grid; place-items: center; color: #8b98af; font-weight: 600; }
.chart-wrap { height: 240px; }
.chart-wrap canvas { width: 100% !important; height: 100% !important; }

.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.page-head h2 { margin: 0; font-size: 33px; }
.page-head small { color: #8e99ad; }
.btn-primary { background: #2f6bff; color: #fff; border: 0; border-radius: 8px; padding: 10px 16px; font-weight: 600; cursor: pointer; }
.link-btn { text-decoration: none; display: inline-block; }
.btn-primary.full { width: 100%; }
.btn-whatsapp { background: #17c88c; color: #fff; border: 0; border-radius: 8px; padding: 8px 12px; cursor: pointer; font-weight: 600; }
.btn-whatsapp:disabled { background: #9ecab9; cursor: not-allowed; }

/* Dashboard — ação WhatsApp em lista (contorno, menos peso visual) */
.list-row--dash-charge {
  align-items: center;
}
.dash-charge-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #86efac;
  background: #fff;
  color: #15803d;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.dash-charge-wa:hover {
  background: #f0fdf4;
  border-color: #4ade80;
  color: #166534;
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.18);
}
.dash-charge-wa__icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #25d366;
  color: #fff;
  flex-shrink: 0;
}
.dash-charge-wa__icon .wa-svg {
  width: 15px;
  height: 15px;
  display: block;
}
.dash-charge-wa__text {
  line-height: 1;
}
.dash-charge-wa-muted {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
}
.btn-danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 8px; padding: 10px 16px; font-weight: 600; cursor: pointer; }
.btn-secondary { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 16px; font-weight: 600; cursor: pointer; }

.search { width: 100%; border: 1px solid #e3eaf5; border-radius: 8px; padding: 10px; margin-bottom: 12px; }
.filters .search { margin-bottom: 0; }
.filters { display: grid; grid-template-columns: 1fr 180px 120px; gap: 10px; margin-bottom: 10px; }
.filters.filters--payments {
  grid-template-columns:
    minmax(0, 1.5fr) minmax(132px, 0.95fr) minmax(132px, 0.95fr) minmax(118px, 0.85fr) minmax(100px, auto);
  align-items: end;
}
.payments-filter-date {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
}
.payments-filter-date span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.payments-filter-date input {
  width: 100%;
  border: 1px solid #e3eaf5;
  border-radius: 8px;
  padding: 10px 10px;
  min-height: 42px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  background: #fff;
}
.payments-filter-date input:focus {
  outline: none;
  border-color: #2f6bff;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.12);
}

.payments-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.payments-summary-strip__item {
  flex: 1 1 200px;
  max-width: 320px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #e8edf3;
  background: linear-gradient(180deg, #fbfcfe 0%, #fff 100%);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.payments-summary-strip__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 6px;
}
.payments-summary-strip__value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
}

.payments-panel { padding-top: 16px; }
.payment-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 20px;
  align-items: center;
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #e8edf3;
  background: linear-gradient(180deg, #fff 0%, #fafbfd 100%);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.payment-card__main strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #1b1f2a;
  margin-bottom: 6px;
}
.payment-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: 13px;
  color: #64748b;
}
.payment-card__dot { color: #cbd5e1; user-select: none; }
.payment-card__muted { color: #94a3b8; font-size: 12px; }
.payment-card__amount {
  text-align: right;
}
.payment-card__amount-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 4px;
}
.payment-card__amount strong {
  font-size: 17px;
  font-weight: 800;
  color: #15803d;
  letter-spacing: -0.02em;
}
.payments-pagination-footer {
  margin-top: 8px;
}
.filters.filters--clients {
  grid-template-columns: minmax(0, 1fr) minmax(140px, 1fr) minmax(120px, 0.9fr) minmax(100px, auto);
}
.filters.filters--dash {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr) minmax(100px, auto);
}
.dash-upcoming-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}
.dash-upcoming-head h4 {
  margin: 0;
}
.dash-upcoming-meta {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}
.dash-upcoming-meta strong {
  color: #334155;
  font-weight: 700;
}
.dash-upcoming-pagination {
  margin-top: 16px;
}
.filters select { border: 1px solid #e3eaf5; border-radius: 8px; padding: 10px; background: #fff; }
.clients-pagination-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #eef2f8;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}
.pagination-meta {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}
.pagination-meta strong { color: #334155; font-weight: 700; }
.clients-pagination-footer .pagination-container,
.clients-pagination-footer > nav.pagination-container {
  margin-top: 0;
}
.create-form { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid #eef2f8; }
.create-form h4 { margin: 0 0 10px; }
.list-row { display: flex; justify-content: space-between; align-items: center; border: 1px solid #edf1f8; border-radius: 10px; padding: 12px; margin-top: 8px; }
.customer-row { cursor: default; }
.customer-row__main { min-width: 0; flex: 1; padding-right: 10px; }
.customer-row__side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.customer-row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.btn-icon-action {
  width: 40px;
  height: 40px;
  padding: 0;
}
.btn-icon-danger { color: #b91c1c; border-color: #fecaca; background: #fff5f5; }
.btn-icon-danger:hover { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.icon-svg { width: 18px; height: 18px; display: block; }
.list-row strong { display: block; margin-bottom: 3px; }
.list-row small { color: #8a95aa; }
.row-actions { display: flex; align-items: center; gap: 10px; }
.tag { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 9px; text-transform: capitalize; }
.tag.active, .tag.pending { background: #fff4dd; color: #9a5d00; }
.tag.blocked, .tag.overdue, .tag.delinquent { background: #ffe7e7; color: #b22222; }
.tag.paid { background: #e7fff2; color: #087a4d; }
.tag.cancelled { background: #f1f5f9; color: #64748b; }

/* Financeiro / cobranças */
.charge-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px 16px;
  align-items: center;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 10px;
  background: linear-gradient(180deg, #fff 0%, #fafbfd 100%);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.charge-card__main strong {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
  color: #1b1f2a;
}
.charge-amount-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  font-size: 13px;
  color: #64748b;
}
.charge-card__total {
  font-weight: 700;
  font-size: 15px;
  color: #1b1f2a;
}
.charge-card__split { font-size: 12px; color: #8a95aa; }
.charge-card__due { font-size: 12px; color: #8a95aa; }
.charge-card__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}
.charge-card__toolbar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 12px;
}
.charge-status-form {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(200px, 100%);
}
.charge-status-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
}
.charge-status-field--inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.charge-status-field__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  white-space: nowrap;
  flex-shrink: 0;
}
.charge-status-field--inline .charge-status-select {
  min-width: 118px;
}
.charge-status-select {
  width: 100%;
  min-height: 42px;
  padding: 8px 36px 8px 12px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  color: #0f172a;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.charge-status-select:hover {
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}
.charge-status-select:focus {
  outline: none;
  border-color: #2f6bff;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.18);
}
.charge-status-select--pending {
  border-color: #f59e0b;
  background-color: #fffbeb;
  color: #92400e;
}
.charge-status-select--paid {
  border-color: #22c55e;
  background-color: #ecfdf5;
  color: #14532d;
}
.charge-status-select--overdue {
  border-color: #f87171;
  background-color: #fef2f2;
  color: #991b1b;
}
.charge-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.btn-wa-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.35);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn-wa-icon .wa-svg { width: 22px; height: 22px; display: block; }
.btn-wa-icon:hover { filter: brightness(1.06); transform: translateY(-1px); }

.btn-receive {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(180deg, #4d86ff 0%, #2f6bff 50%, #2456d9 100%);
  box-shadow: 0 2px 8px rgba(47, 107, 255, 0.38);
  transition: filter 0.12s ease, transform 0.12s ease;
}
.btn-receive:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-receive:active { transform: translateY(0); }

.btn-icon-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.btn-icon-ghost:hover { border-color: #c5d4ec; background: #f8fafc; color: #1b1f2a; }

.form-panel { max-width: 540px; background: #fff; border: 1px solid #e8edf3; border-radius: 12px; padding: 16px; }
.form-panel h2 { margin: 0; }
.form-panel small { color: #8f99ab; }
.form-grid { margin: 12px 0; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #4f5b72; }
.form-grid label:first-child { grid-column: 1 / span 2; }
.form-grid input, .form-grid select, .settings-grid input { border: 1px solid #dfe7f3; border-radius: 8px; padding: 10px; background: #fff; }

/* Nova venda — layout profissional */
.sales-pro-card {
  max-width: 720px;
  margin: 0 auto;
  background: linear-gradient(165deg, #f8fafc 0%, #fff 42%, #fff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 4px 32px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}
.sales-pro-card__head {
  padding: 22px 24px 20px;
  border-bottom: 1px solid #eef2f8;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 252, 0.5) 100%);
}
.sales-pro-card__eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2f6bff;
}
.sales-pro-card__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.25;
}
.sales-pro-card__lead {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: #64748b;
  max-width: 54ch;
}
.sales-pro-card__lead strong { color: #334155; font-weight: 600; }

.sales-pro-empty {
  padding: 28px 24px 32px;
  text-align: center;
}
.sales-pro-empty p {
  margin: 0 0 16px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.sales-pro-form { padding: 4px 24px 26px; }
.sales-form-section {
  margin-top: 22px;
  padding-top: 4px;
}
.sales-form-section__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.sales-form-section__icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(145deg, #eff6ff 0%, #e0e7ff 100%);
  color: #2f6bff;
  display: grid;
  place-items: center;
  border: 1px solid rgba(47, 107, 255, 0.15);
}
.sales-form-section__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}

.sales-form-grid {
  display: grid;
  gap: 14px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.sales-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}
.sales-form-grid__full { grid-column: 1 / -1; }
.sales-form-grid input,
.sales-form-grid select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sales-form-grid input:hover,
.sales-form-grid select:hover {
  border-color: #cbd5e1;
}
.sales-form-grid input:focus,
.sales-form-grid select:focus {
  outline: none;
  border-color: #2f6bff;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.14);
}
.sales-form-grid select {
  padding-right: 40px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px;
}

.sales-form-footer {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid #eef2f8;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.sales-form-footer__note {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #94a3b8;
  max-width: 300px;
}
.sales-form-footer__note strong {
  color: #64748b;
  font-weight: 600;
}
.btn-sales-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 200px;
  padding: 12px 22px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #4d86ff 0%, #2f6bff 48%, #2456d9 100%);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.2) inset,
    0 4px 14px rgba(47, 107, 255, 0.38);
  transition: filter 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-sales-submit:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.22) inset,
    0 6px 20px rgba(47, 107, 255, 0.42);
}
.btn-sales-submit:active {
  transform: translateY(0);
}
.btn-sales-submit__arrow {
  flex-shrink: 0;
  opacity: 0.95;
}

@media (max-width: 640px) {
  .sales-pro-card__head,
  .sales-pro-form,
  .sales-pro-empty {
    padding-left: 16px;
    padding-right: 16px;
  }
  .sales-form-grid {
    grid-template-columns: 1fr;
  }
  .sales-form-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .btn-sales-submit {
    width: 100%;
    min-width: 0;
  }
  .sales-form-footer__note {
    max-width: none;
    text-align: center;
  }
}

.settings-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 14px; }
.settings-grid label { display: flex; flex-direction: column; gap: 6px; color: #4f5b72; font-size: 13px; }
.settings-grid__full { grid-column: 1 / -1; }
.settings-grid textarea {
  border: 1px solid #dfe7f3;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  resize: vertical;
  min-height: 72px;
}
.settings-grid textarea:focus {
  outline: none;
  border-color: #2f6bff;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.12);
}

/* Cadastro de clientes — formulário com abas */
.client-pro-form {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eef2f8;
  background: linear-gradient(180deg, #fbfcfe 0%, #fff 48%);
  border: 1px solid #e8edf3;
  border-radius: 14px;
  padding: 18px 18px 16px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.client-pro-form.create-form { border-bottom: 1px solid #e8edf3; }
.client-pro-form__head { margin-bottom: 14px; }
.client-pro-form__title { margin: 0; font-size: 17px; font-weight: 700; color: #1b1f2a; }
.client-pro-form__subtitle { margin: 6px 0 0; font-size: 13px; color: #64748b; line-height: 1.45; }
.client-pro-form__footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #eef2f8;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.client-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  padding: 4px;
  background: #f1f5f9;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.client-tab-btn {
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}
.client-tab-btn:hover { color: #334155; background: rgba(255, 255, 255, 0.65); }
.client-tab-btn.is-active {
  background: #fff;
  color: #1e40af;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.client-tab-panels { min-height: 120px; }
.client-tab-panel[hidden] { display: none !important; }
.client-tab-panel:not([hidden]) { display: block; }
.client-upload-label {
  border: 1px dashed #c5d4ec;
  border-radius: 10px;
  padding: 12px 14px;
  background: #f8fafc;
}
.client-upload-label__text { font-weight: 600; color: #334155; margin-bottom: 4px; }
.client-upload-label__hint { font-size: 12px; color: #64748b; margin-bottom: 10px; }
.client-file-input { font-size: 13px; }
.client-photo-remove-block {
  border: 1px solid #e8edf3;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
}
.client-photo-remove-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 140px; overflow-y: auto; }
.client-photo-remove-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}
.client-photo-remove-item:last-child { border-bottom: 0; }
.client-edit-title { margin: 0 0 14px; font-size: 20px; }
.customer-modal--wide { max-width: 720px; }
.modal-grid--dense { gap: 12px 14px; }
.modal-grid__span2 { grid-column: 1 / -1; }
.modal-section-title {
  margin: 18px 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
}
.modal-text-block { font-weight: 500; white-space: pre-wrap; }
.customer-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.customer-photo-thumb {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e8edf3;
  aspect-ratio: 1;
  background: #f8fafc;
}
.customer-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.customer-photo-thumb:hover { box-shadow: 0 4px 14px rgba(47, 107, 255, 0.2); }
.modal-actions--start { justify-content: flex-start; }

/* Selects (ex.: /configuracoes) — mesmo visual dos inputs, seta custom */
.create-form label > select,
.settings-grid select {
  border: 1px solid #dfe7f3;
  border-radius: 8px;
  padding: 11px 40px 11px 12px;
  background-color: #fff;
  font-size: 14px;
  font-family: inherit;
  color: #1b1f2a;
  min-height: 42px;
  width: 100%;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236d7890' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.create-form label > select:hover,
.settings-grid select:hover {
  border-color: #c5d4ec;
}
.create-form label > select:focus,
.settings-grid select:focus {
  outline: none;
  border-color: #2f6bff;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.12);
}

.settings-whatsapp-block {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem 1.15rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e8edf3;
  border-radius: 10px;
}
.settings-whatsapp-block > h4 {
  margin: 0 0 0.35rem;
  font-size: 15px;
  color: #1b1f2a;
}
.settings-whatsapp-block .whatsapp-help {
  margin: 0 0 1rem;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
}
.settings-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 1rem;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 8px;
  cursor: pointer;
}
.settings-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #2f6bff;
  cursor: pointer;
  flex-shrink: 0;
}
.settings-toggle span {
  font-size: 14px;
  color: #334155;
  font-weight: 500;
  line-height: 1.4;
}

.empty { color: #7f8da8; }
.customer-modal { border: 0; border-radius: 12px; padding: 16px; width: 100%; max-width: 640px; }
.customer-modal::backdrop { background: rgba(0, 0, 0, 0.45); }
.close-btn { float: right; border: 0; background: #eef3fb; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.customer-modal h3 { margin: 0; font-size: 24px; }
.modal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0 12px; }
.modal-grid small { display: block; color: #8793a9; }
.modal-actions { margin-top: 16px; padding-top: 14px; border-top: 1px solid #f1f5f9; display: flex; gap: 10px; justify-content: flex-end; }
.history-row { display: flex; align-items: center; justify-content: space-between; border: 1px solid #edf1f8; border-radius: 8px; padding: 8px 10px; margin-top: 7px; }
.history-row .btn-whatsapp { padding: 6px 10px; font-size: 12px; }

.pagination-container { margin-top: 24px; display: flex; justify-content: center; }
.pagination { display: flex; list-style: none; padding: 0; gap: 6px; }
.page-item .page-link { display: block; padding: 8px 14px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; color: #475569; text-decoration: none; font-weight: 600; font-size: 14px; transition: all 0.2s; }
.page-item.active .page-link { background: #2f6bff; border-color: #2f6bff; color: #fff; }
.page-item .page-link:hover:not(.active) { background: #f1f5f9; }
.page-item.disabled .page-link { color: #cbd5e1; cursor: not-allowed; }

.notif-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}
.notif-link .badge {
  position: absolute;
  top: 2px;
  right: 2px;
  left: auto;
  z-index: 2;
  min-width: 1.25rem;
  padding: 0 5px;
  text-align: center;
  line-height: 1.25;
  font-size: 10px;
  font-weight: 700;
}

.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; background: #fff; border: 1px solid #e8edf3; border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
.notif-item--unread { border-color: #c7d7fb; background: #f8faff; }
.notif-item__title { display: block; font-size: 15px; color: #1b1f2a; margin-bottom: 4px; }
.notif-item__body { margin: 0 0 8px; color: #4f5b72; font-size: 14px; line-height: 1.45; }
.notif-item__time { font-size: 12px; color: #8a95aa; }
.inline-form { margin: 0; }
.btn-link { background: none; border: 0; color: #2f6bff; font-weight: 600; cursor: pointer; font-size: 13px; padding: 0; text-decoration: underline; }
.muted { color: #6d7890; }

.evolution-panel {
    margin-top: 1.25rem;
    padding: 1rem 1.1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}
.evolution-panel h4 { margin-top: 0; }
.evolution-meta { margin: 0 0 12px; font-size: 14px; color: #334155; }
.evolution-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.evolution-msg { min-height: 1.25em; margin: 8px 0; font-size: 14px; }
.evolution-pairing { font-size: 14px; margin-bottom: 10px; word-break: break-all; }
.evolution-qr-wrap { margin-top: 8px; }

.evo-status-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
  border: 1px solid #e8edf3;
}
.evo-status-banner.evo-status--ok {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.evo-status-banner.evo-status--wait {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}
.evo-status-banner.evo-status--off,
.evo-status-banner.evo-status--none {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

.automations-lead {
  margin: 0 0 0.75rem;
  font-size: 14px;
  line-height: 1.55;
  color: #334155;
}
.automations-timeline {
  margin: 0 0 1rem;
  padding: 10px 12px 10px 2rem;
  background: #f8fafc;
  border: 1px solid #e8edf3;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.55;
  color: #475569;
}
.automations-timeline li {
  margin-bottom: 4px;
}
.automations-timeline li:last-child {
  margin-bottom: 0;
}
.automations-placeholders {
  margin: 0 0 1rem;
  padding: 12px 14px;
  background: #f1f5f9;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
}
.automations-placeholders h5 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}
.automations-placeholders ul {
  margin: 0;
  padding-left: 1.15rem;
}
.automations-placeholders li {
  margin-bottom: 6px;
}
.automations-placeholders code {
  font-size: 12px;
  background: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

@media (max-width: 900px) {
  .cards, .cards.three, .settings-grid, .form-grid, .filters, .filters.filters--clients, .filters.filters--dash, .filters.filters--payments, .modal-grid { grid-template-columns: 1fr; }
  .customer-row__side { flex-direction: column; align-items: flex-end; gap: 8px; }
  .form-grid label:first-child { grid-column: auto; }
  .payment-card { grid-template-columns: 1fr; }
  .payment-card__amount { text-align: left; }
  .charge-card { grid-template-columns: 1fr; }
  .charge-card__side { align-items: stretch; }
  .charge-card__toolbar {
    justify-content: flex-start;
    width: 100%;
  }
  .charge-status-form { max-width: none; flex: 1 1 auto; }
  .charge-actions { justify-content: flex-end; flex: 0 0 auto; }
}
