.geography {
  margin-top: 24px;
}
.geography .card-head {
  gap: 20px;
  flex-wrap: wrap;
}
.geography .card-head > span {
  color: #005176;
  font-size: 12px;
}
.geography-body {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(250px, 1fr);
  gap: 32px;
  padding: 25px;
}
.brazil-map {
  display: block;
  width: 100%;
  max-height: 490px;
}
.map-state {
  fill: #080d21;
  stroke: #111113;
  stroke-width: 1.5;
  cursor: pointer;
  transition: fill 0.15s;
  outline: none;
}
.map-state.has-customers {
  fill: #005176;
}
.map-state:hover,
.map-state:focus {
  fill: #005176;
  stroke: #005176;
  stroke-width: 2;
}
.map-state.selected {
  fill: #005176;
  stroke: #005176;
  stroke-width: 2.5;
}
.map-legend {
  text-align: center;
  font-size: 11px;
  color: #005176;
}
.map-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #005176;
  margin-right: 7px;
}
.state-cities {
  padding: 20px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  align-self: start;
}
.state-cities h3 {
  font-size: 22px;
  margin: 20px 0 8px;
}
.state-cities h3 span {
  font-size: 12px;
  color: #005176;
}
.state-cities p {
  font-size: 12px;
  color: #005176;
}
.state-shortcuts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 22px;
}
.state-shortcuts button {
  padding: 8px;
  font-size: 11px;
}
.city-counts {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  max-height: 370px;
  overflow: auto;
}
.city-counts li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 13px;
}
.city-counts strong {
  background: #005176;
  color: #005176;
  border-radius: 7px;
  padding: 5px 10px;
}
.customer-detail {
  margin-top: 20px;
}
.customer-detail .admin-profile {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.customer-detail form {
  max-width: 720px;
  margin: 25px auto 0;
}
@media (max-width: 760px) {
  .geography-body {
    grid-template-columns: 1fr;
    padding: 15px;
    gap: 15px;
  }
  .customer-detail .admin-profile {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 440px) {
  .customer-detail .admin-profile {
    grid-template-columns: 1fr;
  }
}
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 35px 22px;
  background: #f3f4f6;
}
.admin-login .auth-card {
  max-width: 450px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 32px;
}
.admin-login .brand {
  font-size: 22px;
  margin-bottom: 35px;
}
.admin-login h1 {
  font-size: 28px;
}
.admin-login .eyebrow {
  margin-top: 15px;
}
.admin-shell .sidebar .brand > span:last-child {
  font-size: 19px;
}
.admin-shell .sidebar .brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 1px;
  margin-top: 4px;
}
.admin-profile {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 22px;
  margin-bottom: 25px;
}
.admin-profile > div {
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
  min-width: 0;
}
.admin-profile span {
  display: block;
  color: #005176;
  font-size: 11px;
  margin-bottom: 6px;
}
.admin-profile strong {
  font-size: 12px;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.admin-shell .registry-search {
  width: 380px;
}
.admin-shell table {
  min-width: 750px;
}
.admin-shell td:first-child {
  width: auto;
}
.finance-note {
  display: block;
  color: #005176;
  font-size: 10px;
  line-height: 1.7;
  margin-top: 5px;
}
.support-thread {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 430px;
  overflow: auto;
  margin: 20px 0;
  padding: 6px;
}
.support-message {
  padding: 17px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  max-width: 92%;
}
.support-message.staff {
  align-self: flex-end;
  background: #00517644;
  border-color: #e5e7eb;
}
.support-message.internal {
  background: #f3f4f6;
  border-style: dashed;
}
.support-message > div {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  font-size: 11px;
}
.support-message small {
  color: #005176;
  font-size: 10px;
}
.support-message p {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.8;
  margin: 12px 0 0;
  font-size: 13px;
}
.admin-shell .metric-list > div {
  font-size: 12px;
}
.finance-due {
  padding: 13px 0;
  border-bottom: 1px solid #e5e7eb;
}
.finance-due > strong,
.finance-due > small {
  display: block;
  font-size: 12px;
}
.finance-due > small {
  color: #005176;
  font-size: 10px;
  margin-top: 5px;
}
.admin-shell .sidebar nav {
  overflow: auto;
}
.admin-shell .sidebar-bottom {
  padding-top: 30px;
}
@media (max-width: 760px) {
  .admin-profile {
    grid-template-columns: 1fr;
  }
  .admin-shell .sidebar nav {
    overflow: visible;
  }
  .admin-shell .sidebar-bottom {
    display: block;
    padding: 12px 0 0;
  }
  .admin-shell .sidebar-footer {
    padding: 12px 0 0;
  }
  .admin-login .auth-card {
    padding: 25px;
  }
  .support-message {
    max-width: 100%;
  }
  .support-message > div {
    flex-wrap: wrap;
    gap: 6px;
  }
}

.dashboard-payments {
  margin-bottom: 24px;
}
.admin-profile dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

#modal:has(.payment-detail) {
  width: min(740px, calc(100% - 32px));
}
#modal:has(.payment-detail) .modal-head h2 {
  color: #005176;
  font-weight: 750;
}
.payment-detail {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.payment-detail dt {
  color: #005176;
  font-size: 13px;
  font-weight: 750;
}
.payment-detail dd {
  color: #005176;
  font-weight: 650;
  white-space: nowrap;
  overflow-x: auto;
  overflow-wrap: normal;
}
.payment-detail .payment-amount dd {
  color: #fff;
  font-size: 22px;
}
.payment-detail .badge:not(.success):not(.cancel) {
  background: #005176;
  color: #005176;
}
.payment-detail .payment-reference {
  grid-column: 1/-1;
}
.payment-detail .payment-id {
  color: #fff;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
}
@media (max-width: 560px) {
  .payment-detail {
    grid-template-columns: minmax(0, 1fr);
  }
}

.payment-detail .payment-white dd {
  color: #fff;
}

.plan-limit-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-limit-help {
  width: 23px;
  min-height: 23px;
  padding: 0;
  border-radius: 50%;
  color: #005176;
}
.plan-limit p {
  margin: 0;
}
.plan-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-actions .icon {
  width: 16px;
  height: 16px;
}

.plan-limit-anchor {
  position: relative;
  display: inline-flex;
}
.plan-limit-anchor > p {
  position: absolute;
  z-index: 2;
  left: calc(100% + 8px);
  top: 0;
  width: min(250px, 40vw);
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  background: #005176;
  color: #005176;
  box-shadow: 0 8px 22px #17233c12;
}
@media (max-width: 480px) {
  .plan-limit-anchor > p {
    left: auto;
    right: 0;
    top: calc(100% + 6px);
  }
}

.badge.payment-pending {
  background: #005176;
  color: #005176;
}
.company-search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  min-width: 0;
}
.company-search-filters .field {
  margin: 0;
  min-width: 180px;
}
.company-segment-summary ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.company-segment-summary li {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(80px, 2fr) 40px;
  gap: 16px;
  align-items: center;
  margin-top: 12px;
}
.company-segment-summary meter {
  width: 100%;
  height: 16px;
  accent-color: #087f87;
}
.company-segment-summary strong {
  text-align: right;
}
@media (max-width: 600px) {
  .company-search-filters {
    width: 100%;
  }
  .company-search-filters > * {
    flex: 1 1 100%;
  }
  .company-segment-summary li {
    gap: 8px;
    font-size: 12px;
  }
}
.system-editor [hidden] {
  display: none !important;
}
.system-editor h3 {
  margin-top: 24px;
}
.system-editor .toolbar {
  flex-wrap: wrap;
}
.legal-rich-content .legal-align-left {
  text-align: left;
}
.legal-rich-content .legal-align-center {
  text-align: center;
}
.legal-rich-content .legal-align-right {
  text-align: right;
}
.legal-rich-content .legal-align-justify {
  text-align: justify;
}
.legal-rich-content blockquote {
  border-left: 3px solid #e5e7eb;
  padding-left: 16px;
  margin-left: 0;
}
.rich-color-popup {
  position: fixed;
  inset: auto;
  margin: 0;
  width: min(310px, calc(100vw - 16px));
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #253044;
  box-shadow: 0 8px 28px #17233c12;
}
.rich-color-popup > strong {
  display: block;
  font-size: 13px;
  margin-bottom: 12px;
}
.rich-color-popup .rich-color-area {
  display: block;
  width: 100%;
  height: 140px;
  border-radius: 6px;
  touch-action: none;
  cursor: crosshair;
}
.rich-color-popup [data-color-hue] {
  width: 100%;
  min-height: 16px;
  height: 16px;
  margin: 12px 0;
  padding: 0;
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
}
.rich-color-popup [data-color-hue]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 2px #17233c12;
}
.rich-color-popup [data-color-hue]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: transparent;
}
.rich-color-value {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rich-color-value canvas {
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  flex: none;
}
.rich-color-value input {
  min-width: 0;
  width: 100%;
  height: 34px;
  min-height: 34px;
  background: #fff;
  color: #253044;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-family: monospace;
}
.rich-color-value input[aria-invalid='true'] {
  border-color: #dc2626;
}
.rich-color-popup button {
  min-height: 30px;
  background: #fff;
  color: #253044;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
}
.rich-color-popup button:hover {
  background: #e0eaff;
  border-color: #93b4f5;
}
.rich-color-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.rich-color-popup [hidden] {
  display: none !important;
}
.document-editor {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
}
.document-editor-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  padding: 8px;
  background: #f3f4f6;
  overflow-x: auto;
  scrollbar-width: thin;
}
.document-editor-toolbar > select {
  flex: none;
  width: 110px;
  min-width: 0;
  min-height: 30px;
  height: 30px;
  padding: 3px 6px;
  background: #fff;
  color: #253044;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  font-size: 12px;
  color-scheme: light;
}
.document-editor-toolbar > select option {
  background: #fff;
  color: #253044;
}
.document-editor-toolbar > select[data-editor-control='size'] {
  width: 60px;
}
.document-editor-toolbar > button {
  flex: none;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #253044;
  font-size: 12px;
}
.document-editor-toolbar > button:hover,
.document-editor-toolbar > button[aria-pressed='true'] {
  background: #dbeafe;
  border-color: #93b4f5;
  color: #1d4ed8;
}
.document-editor-toolbar > button[data-rich-picker] {
  background: #e0eaff;
  border-color: #abc3f5;
}
.document-editor-workspace {
  padding: 24px;
  background: #e5e7eb;
  max-height: 70vh;
  overflow: auto;
}
.document-editor-workspace .ql-container.ql-snow {
  border: 0;
  max-width: 860px;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 2px 10px #17233c12;
}
.document-editor-workspace .ql-editor {
  padding: 48px;
  min-height: 640px;
  overflow: visible;
  line-height: 1.7;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #25243b;
}
.document-editor-workspace .ql-editor p {
  color: inherit;
}
.document-editor-workspace .ql-editor a {
  color: #087f87;
  text-decoration: underline;
}
.document-editor-workspace .ql-editor .ql-ui {
  display: none;
}
.document-editor-workspace .ql-editor li[data-list='bullet'] {
  list-style-type: disc;
}
.document-editor-workspace .ql-editor li[data-list='ordered'] {
  list-style-type: decimal;
}
.document-editor-workspace .ql-editor li::before {
  display: none;
}
@media (max-width: 600px) {
  .document-editor-workspace {
    padding: 10px;
  }
  .document-editor-workspace .ql-editor {
    padding: 20px;
    min-height: 400px;
  }
}

#plan-form textarea[name='description'] {
  min-height: 400px;
  height: 400px;
  line-height: 1.65;
  resize: vertical;
}
@media (max-width: 600px) {
  #plan-form textarea[name='description'] {
    min-height: 320px;
    height: 360px;
  }
}

.support-avatar-settings {
  display: grid;
  gap: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}
.support-avatar-settings [data-avatar-preview] {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #edf6f5;
  color: #087f87;
}
.support-avatar-settings img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.support-image-link {
  display: inline-block;
  max-width: 100%;
}
.support-attachment-thumbnail {
  display: block;

  max-width: 100%;
  object-fit: contain;
  background: #ffffff80;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  cursor: zoom-in;
}

.support-attachment-thumbnail {
  width: 96px !important;
  height: 76px !important;
}
dialog.support-image-viewer {
  width: fit-content !important;
  max-width: 90vw !important;
  max-height: 90dvh !important;
  padding: 38px 16px 16px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 16px !important;
  background: white !important;
  overflow: auto !important;
  position: fixed;
  inset: 0;
  margin: auto;
}
dialog.support-image-viewer::backdrop {
  background: #080d2199;
  backdrop-filter: blur(3px);
}
dialog.support-image-viewer > img {
  display: block;
  max-width: calc(90vw - 34px);
  max-height: calc(90dvh - 60px);
  object-fit: contain;
}
dialog.support-image-viewer > .support-image-viewer-close {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #647a83;
  font-size: 25px;
}

.admin-login .brand-mark {
  width: 34px;
  height: 34px;
  min-width: 34px;
  font-size: 22px;
}

.system-editor .legal-index-preview {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin: 18px 0;
  background: #ffffff;
}
.system-editor .legal-index-preview summary {
  font-weight: 650;
  cursor: pointer;
}
.system-editor .legal-index-preview ol {
  margin: 14px 0 0;
  padding-left: 24px;
  line-height: 1.8;
  font-size: 13px;
}

/* Upload central da marca e dos favicons da plataforma. */
.platform-brand-card { margin-top: 24px; }
.platform-brand-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px; }
.platform-brand-grid fieldset { min-width:0;padding:20px;border:1px solid #d4e5e8;border-radius:14px; }
.platform-brand-preview { height:110px;display:flex;align-items:center;justify-content:center;background:#f3f8f8;border-radius:12px;margin-bottom:16px; }
.platform-brand-preview img { max-width:100%;max-height:100%;object-fit:contain; }
.platform-brand-grid input[type=file][hidden] { display:none!important; }
@media(max-width:650px){.platform-brand-grid{grid-template-columns:1fr;}}

/* Uploads horizontais no padrão do cadastro da empresa. */
.platform-brand-grid { grid-template-columns: minmax(0, 1fr); }
html body .platform-image-row {
  display:grid; grid-template-columns:90px minmax(0,1fr) auto; gap:20px; align-items:center;
  padding:20px; border:1px solid #d4e5e8; border-radius:14px; margin:0 0 20px;
}
html body .platform-image-row .platform-brand-preview,
html body .platform-image-row [data-avatar-preview] {
 width:90px;height:90px;min-width:0;margin:0;border:1px solid #d4e5e8;border-radius:10px;background:#fff;display:flex;align-items:center;justify-content:center;
}
html body .platform-image-row img { max-width:100%;max-height:100%;object-fit:contain; }
.platform-image-copy { display:grid;gap:7px; }
.platform-image-copy small { color:#66828d; }
.platform-image-actions { display:flex;gap:10px;align-items:center;flex-wrap:wrap; }
html body .platform-image-actions .button,
html body .platform-image-actions button { margin:0;border-radius:10px;white-space:nowrap; }
html body .platform-image-actions button { color:#ef3340;border-color:#ef3340;background:#fff; }
html body .platform-image-actions input[hidden] { display:none!important; }
@media(max-width:760px){html body .platform-image-row{grid-template-columns:90px minmax(0,1fr);} .platform-image-actions{grid-column:1/-1;}}
