/* Área de trabalho dos portais (empresa e administração): barra lateral escura + telas por seção.
   Segue o manual de marca BestMap (tinta e papel; laranja só em links, foco e pontos de demanda); o login continua em styles.css. */
.portal {
  --side-w: 220px;
  --mx: 24px;
  --display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --body: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, Menlo, monospace;
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.45;
}
.portal h1,
.portal h2,
.portal h3 {
  font-family: var(--display);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.2px;
  text-wrap: balance;
}
.portal h1 {
  font-size: 30px;
}
.portal h2 {
  font-size: 21px;
}
.portal h3 {
  font-size: 17px;
}
.portal p {
  margin: 0;
}
.portal button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.portal button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.portal :focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.portal .num {
  font-variant-numeric: tabular-nums;
}
.portal .eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--mute);
}
.portal .muted {
  color: var(--mute);
}
.portal .small {
  font-size: 13px;
}
.portal label {
  margin: 0;
  font-weight: 400;
}
.portal input,
.portal textarea,
.portal select {
  font: inherit;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line-3);
  border-radius: var(--radius-md);
  padding: 7px 11px;
  width: 100%;
  min-height: 38px;
  transition: border-color 0.12s;
}
.portal input:focus,
.portal textarea:focus,
.portal select:focus {
  outline: none;
  border-color: var(--fg);
}
.portal input[type='checkbox'],
.portal input[type='radio'],
.portal input[type='range'] {
  width: auto;
  min-height: 0;
  padding: 0;
}
.portal input[type='file'] {
  padding: 7px;
}
.portal textarea {
  min-height: 72px;
}

/* barra lateral */
.portal .side {
  min-width: 0;
  background: var(--side-bg);
  color: var(--side-fg);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  align-self: start;
  z-index: 30;
}
.portal .side .brand {
  width: 118px;
  margin: 0;
  display: block;
  line-height: 0;
}
.portal .badge-op {
  flex: none;
  align-self: center;
  margin: 0;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--side-mute);
  padding: 1px 5px;
  border: 1px solid var(--side-line);
  border-radius: var(--radius-sm);
}
.portal .snav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.portal .snav button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  text-align: left;
  background: none;
  border: 0;
  color: var(--side-mute);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 15px;
  line-height: 1.35;
  min-height: 0;
}
.portal .snav button:hover {
  background: var(--side-hover);
  color: var(--side-fg);
}
.portal .snav button[aria-current='page'] {
  background: var(--side-line);
  color: var(--side-fg);
  font-weight: 600;
}
.portal .snav .it {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.portal .snav .it svg {
  flex: none;
}
.portal .snav .cnt {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}
.portal .sfoot {
  margin-top: auto;
  padding: 12px 10px;
  border: 1px dashed var(--side-line);
  border-radius: var(--radius-lg);
  font-size: 12.5px;
  color: var(--side-mute);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.portal .sfoot .button {
  align-self: flex-start;
  min-height: 30px;
  padding: 4px 12px;
  font-size: 12.5px;
  color: var(--side-fg);
  border-color: var(--side-line);
}
.portal .sfoot .button:hover {
  background: var(--side-hover);
}
.portal .sfoot .demo-tag {
  color: var(--side-mute);
  border-color: var(--side-line);
  align-self: flex-start;
}
.portal .sfoot .lang-switch select {
  width: 100%;
}

/* telas */
.portal .main {
  margin: 0;
  align-self: start;
  min-width: 0;
  padding: 22px var(--mx) 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
}
.portal .main.flush {
  padding: 0;
  gap: 0;
  max-width: none;
}
.portal .view {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}
.portal .main.flush .view {
  gap: 0;
}
.portal .head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
}
.portal .head .crumb {
  font-size: 13px;
  color: var(--mute);
  margin-bottom: 4px;
}
.portal .head h1 {
  font-size: 30px;
  line-height: 1.2;
}
.portal .head p {
  margin: 6px 0 0;
  color: var(--mute);
}
.portal .demo-tag {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--mute);
  border: 1px dashed var(--line-3);
  border-radius: var(--radius-sm);
  padding: 3px 9px;
}

/* componentes */
.portal .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-3);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  color: var(--fg);
  transition:
    background 0.12s,
    opacity 0.12s;
}
.portal .btn:not(:disabled):hover {
  background: var(--hover);
}
.portal .btn.primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
  font-weight: 600;
}
.portal .btn.primary:not(:disabled):hover {
  background: var(--fg);
  opacity: 0.86;
}
.portal .btn.quiet {
  background: transparent;
  color: var(--fg);
  font-weight: 500;
}
.portal .btn.quiet:not(:disabled):hover {
  background: var(--sunk);
}
.portal .btn.sm {
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
  border-radius: var(--radius-md);
}
.portal .btn.block {
  width: 100%;
}
.portal .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: none;
}
.portal .pad {
  padding: 16px;
}
.portal .inv {
  background: var(--inv-bg);
  color: var(--inv-fg);
  border-radius: var(--radius-lg);
}
.portal .inv .muted,
.portal .inv .eyebrow {
  color: var(--inv-mute);
}
.portal .kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.portal .kpis.k3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.portal .kpi {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.portal .kpi .v {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.portal .kpi .l {
  font-size: 12.5px;
  color: var(--mute);
}
.portal .kpi .s {
  font-size: 12.5px;
  color: var(--faint);
}
.portal .inv.kpi .l {
  color: var(--inv-mute);
}
.portal .inv.kpi .s {
  color: var(--inv-mute);
}
.portal .ptabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  border-bottom: 1px solid var(--line);
}
.portal .ptabs button {
  height: 34px;
  padding: 0 2px;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  color: var(--mute);
  font-size: 13px;
  font-weight: 500;
}
.portal .ptabs button:hover {
  color: var(--fg);
}
.portal .ptabs button[aria-pressed='true'] {
  border-bottom-color: var(--fg);
  color: var(--fg);
  font-weight: 600;
}
.portal .psearch {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-3);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--mute);
  min-width: 0;
  flex: 0 1 280px;
}
.portal .psearch:focus-within {
  border-color: var(--fg);
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}
.portal .psearch input {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  outline: none;
  flex: 1;
  min-width: 0;
  min-height: 0;
}
.portal .tablewrap {
  overflow-x: auto;
  position: relative;
  padding: 0;
}
.portal table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  white-space: normal;
}
.portal th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--mute);
  padding: 12px 14px;
  white-space: nowrap;
  background: var(--surface);
  border: 0;
  border-bottom: 1px solid var(--line);
}
.portal td {
  padding: 11px 14px;
  border-top: 0;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
  font-size: 14px;
  transition: background 0.12s;
}
.portal tbody tr:last-child td {
  border-bottom: 0;
}
.portal th:first-child,
.portal td:first-child {
  padding-left: 14px;
}
.portal th:last-child,
.portal td:last-child {
  padding-right: 14px;
}
.portal tbody tr.click {
  cursor: pointer;
}
.portal tbody tr.click:hover td {
  background: var(--hover);
}
.portal tbody tr.click td:last-child {
  text-align: right;
}
.portal .dname {
  font-weight: 600;
}
.portal .dsub {
  font-size: 12.5px;
  color: var(--faint);
  margin-top: 2px;
}
.portal .open-arrow {
  color: var(--faint);
  font-size: 18px;
}
.portal .bar {
  height: 6px;
  border-radius: var(--radius-sm);
  background: var(--sunk);
  overflow: hidden;
  display: flex;
  min-width: 110px;
}
.portal .bar i {
  display: block;
  height: 100%;
  background: var(--fg);
}
.portal .bar i.half {
  background: var(--faint);
}
/* Situação: cinza (aguardando), âmbar (decisão do cliente), preto (para aprovar), verde (concluído). */
.portal .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  border: 0;
  background: var(--sunk);
  color: var(--mute);
  white-space: nowrap;
  line-height: 1.4;
}
.portal .pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.portal .pill.done {
  background: var(--ok-soft);
  color: var(--ok);
}
.portal .pill.approve {
  background: var(--fg);
  color: var(--bg);
}
.portal .pill.wait {
  background: var(--warn-soft);
  color: var(--warn);
}
.portal .pill.open {
  background: var(--sunk);
  color: var(--mute);
}
.portal .pill.muted {
  background: transparent;
  color: var(--faint);
  box-shadow: inset 0 0 0 1px var(--line-3);
}
.portal .pill.plain::before {
  display: none;
}
.portal .legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12px;
  color: var(--mute);
}
.portal .legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.portal .lg {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--fg);
  display: inline-block;
}
.portal .lg.f {
  background: var(--fg);
}
.portal .lg.h {
  background: linear-gradient(90deg, var(--surface) 50%, var(--fg) 50%);
}
.portal .lg.b {
  border-color: var(--brand);
  border-width: 2px;
}
.portal .lg.d {
  border-radius: 1px;
  transform: rotate(45deg);
  width: 9px;
  height: 9px;
}
.portal .pmap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--map-bg);
  height: clamp(320px, 38vh, 520px);
  z-index: 0;
}
.portal .pmap.tall {
  height: clamp(380px, 52vh, 680px);
}
.portal .grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
@media (min-width: 1700px) {
  .portal .grid2 {
    grid-template-columns: minmax(0, 2fr) minmax(380px, 1fr);
  }
}
.portal .g-nova {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
}
.portal .stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.portal .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.portal .between {
  justify-content: space-between;
}
.portal .stat4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.portal .stat4 .v {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
}
.portal dl.meta {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px 14px;
  font-size: 13px;
}
.portal dl.meta dt {
  color: var(--mute);
}
.portal dl.meta dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.portal .photo {
  border-radius: var(--radius-lg);
  background: repeating-linear-gradient(45deg, var(--sunk) 0 8px, var(--line-2) 8px 16px);
  border: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--mute);
  min-height: 120px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.portal .photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portal .photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 220px));
  gap: 10px;
}
.portal .photos button {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--sunk);
  aspect-ratio: 4/3;
}
.portal .photos button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portal .plist {
  display: flex;
  flex-direction: column;
}
.portal .li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line-2);
  flex-wrap: wrap;
}
.portal .li:first-child {
  border-top: 0;
}
.portal .li.sel {
  background: var(--sunk);
}
.portal .li .t {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.portal button.li {
  width: 100%;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  text-align: left;
  background: none;
}
.portal button.li:first-child {
  border-top: 0;
}
.portal button.li.sel {
  background: var(--sunk);
}
.portal .linkbtn {
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--brand);
  font-size: 13px;
}
.portal .side .linkbtn,
.portal .inv .linkbtn {
  color: inherit;
}
.portal .checks {
  background: var(--sunk);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.portal .checks > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--line-2);
  font-size: 14px;
  align-items: center;
}
.portal .checks > div:first-child {
  border-top: 0;
}
.portal .checks .fail {
  background: var(--sunk);
  font-weight: 600;
}
.portal .checks .fail b {
  color: var(--bad);
  text-decoration: underline;
}
.portal label.f {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}
.portal .tipos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.portal .prods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.portal .saidas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.portal .q {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}
.portal fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.portal legend {
  padding: 0;
  margin-bottom: 10px;
}
.portal .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.portal .chip {
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-3);
  background: var(--surface);
  font-size: 13.5px;
}
.portal .chip:hover {
  background: var(--line-2);
}
.portal .chip[aria-pressed='true'] {
  background: var(--surface);
  color: var(--fg);
  box-shadow: inset 0 0 0 1.5px var(--fg);
  font-weight: 600;
}
.portal .opt {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  font-size: 13px;
  color: var(--mute);
}
.portal .opt b {
  font-size: 15px;
  color: var(--fg);
}
.portal .opt[aria-pressed='true'] {
  border: 2px solid var(--fg);
  padding: 13px 15px;
}
.portal .opt .inc {
  font-size: 12px;
  color: var(--faint);
  margin-top: 4px;
}
.portal .est {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 14px;
  padding: 18px 20px;
}
.portal .est .estp {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--inv-line);
}
.portal .est .estp b {
  font-family: var(--display);
  font-size: 16px;
}
.portal .est .v {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
}
.portal .notice {
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
}
.portal .confirm {
  border: 2px solid var(--fg);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.portal .pempty {
  padding: 40px 20px;
  text-align: center;
  color: var(--mute);
}
.portal .extabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding: 0 20px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 5;
}
.portal .extabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--mute);
}
.portal .extabs button[aria-selected='true'] {
  border-bottom-color: var(--fg);
  color: var(--fg);
  font-weight: 600;
}
.portal .expad {
  padding: 20px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* explorer */
.portal .exfull {
  position: relative;
  height: calc(100vh - 43px);
  min-height: 360px;
  background: var(--map-bg);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.portal .exfull.pon {
  grid-template-columns: minmax(0, 1fr) 320px;
}
.portal .exmap {
  position: relative;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}
.portal .exmap .leaflet-container {
  position: absolute;
  inset: 0;
}
.portal .exopen {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-3);
  background: var(--surface);
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(14, 14, 14, 0.12);
}
.portal .exopen .nb {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  background: var(--fg);
  color: var(--bg);
  font-size: 12px;
  display: inline-grid;
  place-items: center;
}
.portal .expanel {
  position: relative;
  z-index: 4;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--line);
}
.portal .exph {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.portal .exph h2 {
  font-size: 16px;
  margin: 0;
  flex: 1;
}
.portal .exph .x {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-3);
  background: var(--surface);
  display: grid;
  place-items: center;
  padding: 0;
}
.portal .expb {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 16px 16px;
}
.portal .expb details {
  border-bottom: 1px solid var(--line-2);
  padding: 12px 0;
}
.portal .expb details:last-child {
  border-bottom: 0;
}
.portal .expb summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.portal .expb summary::-webkit-details-marker {
  display: none;
}
.portal .expb summary::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-right: 3px;
}
.portal .expb details[open] summary::after {
  transform: rotate(-135deg);
}
.portal .expb summary .on {
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg);
  background: var(--sunk);
  border-radius: var(--radius-sm);
  padding: 1px 8px;
  margin-left: auto;
}
.portal .exsec {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 10px;
}
.portal .exck {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  cursor: pointer;
}
.portal .exck:hover {
  background: var(--sunk);
}
.portal .exck input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--fg);
  flex: none;
}
.portal .exck .t {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.portal .exck .c {
  font-size: 12px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.portal .exck.zero {
  color: var(--faint);
}
.portal .expb .chips {
  gap: 6px;
  margin-top: 10px;
}
.portal .expb .chip {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}
.portal .exrange {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  font-size: 14px;
}
.portal .exrange input {
  width: 100%;
  accent-color: var(--fg);
}
.portal .exrange .ends {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--faint);
}
.portal .exsw {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 4px;
  font-size: 14px;
  cursor: pointer;
}
.portal .exsw input {
  appearance: none;
  -webkit-appearance: none;
  width: 34px;
  height: 20px;
  border-radius: var(--radius-sm);
  background: var(--line-3);
  position: relative;
  margin: 0;
  flex: none;
  cursor: pointer;
  border: 0;
}
.portal .exsw input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  transition: left 0.15s;
}
.portal .exsw input:checked {
  background: var(--fg);
}
.portal .exsw input:checked::after {
  left: 16px;
}
.portal .expb .psearch {
  margin-top: 12px;
  flex: none;
}
.portal .expf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.portal .expf .btn {
  display: none;
}
.portal .excount {
  position: absolute;
  left: 56px;
  bottom: 16px;
  z-index: 500;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
}
.portal .exfloat {
  position: absolute;
  top: 66px;
  right: 16px;
  width: 320px;
  max-width: calc(100% - 28px);
  box-shadow: 0 12px 32px rgba(14, 14, 14, 0.18);
  z-index: 600;
  max-height: calc(100% - 90px);
  overflow-y: auto;
}
.portal .exfull.pon .exfloat {
  top: 16px;
}
.portal .exfold {
  display: grid;
  grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.portal .tree {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.portal .tree-p {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.portal .tree-b {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-radius: var(--radius-lg);
  padding: 8px;
  font-size: 14px;
}
.portal .tree-p > .tree-b:first-child {
  justify-content: flex-start;
  font-weight: 600;
}
.portal .tree-b.sub {
  padding-left: 38px;
}
.portal .tree-b.on {
  background: var(--sunk);
  font-weight: 600;
}
.portal .tree-b:hover {
  background: var(--sunk);
}
.portal .tree-new {
  margin-top: 6px;
  border-top: 1px solid var(--line-2);
  padding-top: 8px;
}
.portal .tree-new button {
  color: var(--mute);
  font-size: 13px;
}
.portal .ftiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.portal .ftile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 18px;
  text-align: left;
}
.portal .ftile:hover {
  border-color: var(--line-3);
}
.portal .fsplit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 16px;
  align-items: start;
}
.portal .fgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.portal .fcard {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  text-align: left;
}
.portal .fcard.on {
  box-shadow: 0 0 0 2px var(--fg);
}
.portal .fcard:hover {
  border-color: var(--line-3);
}
.portal .fimg {
  display: block;
  aspect-ratio: 4/3;
  width: 100%;
  background: var(--sunk);
  border: 0;
  padding: 0;
  overflow: hidden;
}
.portal .fimg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portal .fcap {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
}
.portal .newproj {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}
.portal .newproj label.f {
  flex: 1 1 240px;
}
.portal .oprels {
  display: flex;
  flex-direction: column;
}
.portal .oprel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}
.portal .oprel + .oprel {
  border-top: 1px solid var(--line-2);
}
.portal .oprel .t {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.portal .opdoc {
  flex: none;
  width: 34px;
  height: 40px;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--mute);
}
.portal .split {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}
.portal .split > .plist {
  flex: 1 1 300px;
  min-width: 0;
}
.portal .split > .detail {
  flex: 2 1 480px;
  min-width: 0;
}
.portal .pin {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.portal .sv-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

/* símbolos dos pontos no Leaflet */
.bm-diamond {
  width: 12px;
  height: 12px;
  border: 2px solid #0e0e0e;
  background: #fff;
  transform: rotate(45deg);
  box-sizing: border-box;
}
.bm-half {
  width: 12px;
  height: 12px;
  border: 2px solid #0e0e0e;
  border-radius: 50%;
  background: linear-gradient(90deg, #fff 50%, #0e0e0e 50%);
  box-sizing: border-box;
}
.bm-half.on,
.bm-diamond.on {
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 5px #0e0e0e;
}

@media (max-width: 1100px) {
  .portal .g-nova,
  .portal .grid2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .portal .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .portal .est {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .portal .fsplit {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 860px) {
  .portal {
    align-content: start;
  }
  .portal .view,
  .portal .card {
    min-width: 0;
    max-width: 100%;
  }
  .portal .main {
    padding: 0 16px 40px;
  }
  .portal .main.flush {
    padding: 0;
  }
  .portal h1 {
    font-size: 25px;
  }
  .portal .kpis.k3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .portal .exfold {
    grid-template-columns: minmax(0, 1fr);
  }
  .portal .exfull {
    height: 70vh;
  }
  .portal .exfull.pon {
    grid-template-columns: minmax(0, 1fr);
  }
  .portal .expanel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    height: auto;
    max-height: 82vh;
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -12px 32px rgba(14, 14, 14, 0.22);
  }
  .portal .expf .btn {
    display: inline-flex;
  }
  .portal .exfloat,
  .portal .exfull.pon .exfloat {
    top: auto;
    bottom: 12px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    max-height: 60%;
  }
  .portal .extabs {
    position: static;
    overflow-x: auto;
    padding: 0 8px;
  }
  .portal .extabs button {
    white-space: nowrap;
    flex: none;
  }
  .portal .expad {
    padding: 16px 16px 32px;
  }
}
@media (max-width: 520px) {
  .portal .kpis {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Formulário de cadastro internacional de empresa (autocadastro e administração). */
.cf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px 20px;
  align-items: start;
}
.cf-grid.cf-inline {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.cf-group {
  border: 0;
  margin: 0 0 6px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  min-width: 0;
}
.cf-group legend {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 6px 0 8px;
  padding: 0;
}
.cf-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  margin: 0;
  min-width: 0;
}
.cf-field.wide {
  grid-column: 1/-1;
}
.cf-field small {
  font-weight: 400;
  color: var(--faint);
}
.cf-field input,
.cf-field select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-3);
  border-radius: var(--radius-md);
  padding: 8px 11px;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  font-weight: 400;
}
.cf-note {
  grid-column: 1/-1;
  font-size: 12px;
  color: var(--faint);
  margin: 0;
}
.register-dialog {
  width: min(980px, calc(100vw - 32px));
}
.register-dialog form > .cf-group {
  grid-template-columns: 1fr;
}
@media (max-width: 620px) {
  .cf-group {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Seletor de idioma: no login (canto superior) e na barra lateral. */
.lang-float {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
}
.lang-switch select {
  min-height: 34px;
  padding: 4px 28px 4px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-3);
  background: var(--surface);
  font:
    13px 'IBM Plex Sans',
    Arial,
    sans-serif;
  color: var(--fg);
  width: auto;
}
.portal .sfoot .lang-switch select {
  background: var(--side-hover);
  color: var(--side-fg);
  border-color: var(--side-line);
}

/* Perfil (ícone no canto superior direito) e recuperação de senha */
.portal .main {
  position: relative;
}
.portal .profile-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: var(--fg);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.portal .main > .profile-btn {
  position: absolute;
  top: 11px;
  right: var(--mx);
  z-index: 21;
}
.portal .sfoot .profile-btn {
  align-self: flex-start;
  width: auto;
  height: 30px;
  gap: 8px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--side-line);
  background: none;
  color: var(--side-fg);
  font-size: 12.5px;
}
.portal .sfoot .profile-btn:hover {
  background: var(--side-hover);
  opacity: 1;
}
.portal .sfoot .profile-btn svg {
  width: 16px;
  height: 16px;
}
.portal .profile-btn:hover {
  opacity: 0.86;
}
.account-dialog {
  width: min(480px, calc(100vw - 32px));
}
.acc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.acc-head .button {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 13px;
}
.acc-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0;
}
.acc-list {
  display: grid;
  gap: 0;
  margin: 0 0 10px;
}
.acc-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
}
.acc-list dt {
  color: var(--mute);
  font-size: 13px;
}
.acc-list dd {
  margin: 0;
  text-align: right;
  font-weight: 500;
  word-break: break-word;
}
.acc-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 9px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  background: var(--warn-soft);
  color: var(--warn);
}
.acc-pill.ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.acc-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.acc-section h3 {
  font-size: 16px;
  margin: 0;
}
.acc-channels {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}
.acc-channels legend {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  padding: 0;
}
.acc-channels label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#recover-form .billing-note,
#profile-body .billing-note {
  margin: 4px 0;
}

/* Preços e oferta (administração) */
.pr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px 24px;
  align-items: start;
}
.pr-group {
  grid-template-columns: 1fr;
}
.pr-input {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pr-input input {
  max-width: 160px;
}
.neg-form .cf-field {
  min-width: 120px;
}
.neg-cell {
  width: 120px;
  min-height: 36px;
  border: 1px solid var(--line-3);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  text-align: right;
}
.neg-cell::placeholder {
  color: var(--mute);
  text-align: right;
}
.neg-cell.changed {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}
.neg-cell:disabled {
  opacity: 0.7;
}
/* Vídeo da Checagem de Veiculação dinâmica (sem som; liberado após a revisão da BestMap). */
.portal .fvideo {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--sunk);
  border: 0;
  border-radius: inherit;
}
.portal .fvideo.wait {
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
}

/* menu lateral, barra do topo e menu do celular (side-toggle.js), como no CRM */
.portal {
  transition: grid-template-columns 0.15s;
}
.portal .side-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 40px;
  padding: 6px 10px 22px;
}
.portal .side-head .brand {
  flex: none;
}
.portal .brand .brand-mark {
  display: none;
}
.portal .nav-collapse {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--radius-md);
  background: none;
  color: var(--side-mute);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.portal .nav-collapse:hover {
  background: var(--side-hover);
  color: var(--side-fg);
}
.portal .nav-collapse svg {
  flex: none;
  transition: transform 0.15s;
}
@media (min-width: 861px) {
  .portal.min {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .portal.min .side {
    padding: 14px 8px;
  }
  .portal.min .side-head {
    justify-content: center;
    padding: 6px 0 22px;
  }
  .portal.min .brand img:not(.brand-mark) {
    display: none;
  }
  .portal.min .brand .brand-mark {
    display: block;
    width: 28px;
    height: 28px;
  }
  .portal.min .side .brand {
    width: auto;
  }
  .portal.min .lbl,
  .portal.min .badge-op,
  .portal.min .nav-collapse span,
  .portal.min .sfoot > :not(#logout):not(#profile-button) {
    display: none;
  }
  .portal.min .sfoot {
    border: 0;
    padding: 0;
    align-items: center;
  }
  .portal.min .sfoot .button {
    align-self: center;
    padding: 4px 6px;
    font-size: 12px;
  }
  .portal.min .snav button,
  .portal.min .nav-collapse {
    justify-content: center;
    padding: 10px 0;
    position: relative;
  }
  .portal.min .snav .it {
    gap: 0;
  }
  .portal.min .nav-collapse {
    margin-top: 10px;
  }
  .portal.min .nav-collapse svg {
    transform: rotate(180deg);
  }
  .portal.min .snav .cnt {
    position: absolute;
    top: 3px;
    right: 5px;
    font-size: 10px;
    line-height: 16px;
    min-width: 16px;
    text-align: center;
    background: var(--side-fg);
    color: var(--side-bg);
    border-radius: var(--radius-sm);
    padding: 0 4px;
    opacity: 1;
  }
  .portal.min .snav .cnt:empty {
    display: none;
  }
}
.portal .ptop {
  position: sticky;
  top: 0;
  z-index: 20;
  display: none;
  align-items: center;
  gap: 12px;
  height: 56px;
  margin: 0 calc(-1 * var(--mx));
  padding: 0 var(--mx);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.portal .main.flush .ptop {
  margin: 0;
}
.portal .ptop-title {
  font-size: 14px;
  color: var(--mute);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.portal .ptop-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.portal .ptop-nav {
  display: none;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line-3);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--fg);
}
.portal .ptop-nav:hover {
  background: var(--hover);
}
.portal .side-scrim {
  display: none;
}
@media (max-width: 860px) {
  .portal {
    grid-template-columns: minmax(0, 1fr);
  }
  .portal .side {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    height: 100dvh;
    padding: 14px 10px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.15s;
  }
  .portal.navopen .side {
    transform: none;
  }
  .portal.navopen .side-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 25;
    background: var(--scrim);
  }
  .portal .nav-collapse {
    display: none;
  }
  .portal .ptop {
    display: flex;
    gap: 6px;
    padding: 0 10px;
    margin: 0 -16px;
  }
  .portal .ptop-nav {
    display: inline-grid;
  }
}

/* pagamento com cartão (checkout simulado do provedor) */
.card-dialog {
  width: min(520px, calc(100vw - 32px));
}
.card-tests {
  border: 0;
  padding: 0;
  margin: 12px 0;
  display: grid;
  gap: 8px;
}
.card-tests legend {
  font-weight: 600;
  margin-bottom: 6px;
}
.card-test {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
}
.card-test input {
  flex: none;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  accent-color: var(--fg);
}
.card-test span {
  flex: 1;
  min-width: 0;
}
.card-test:has(input:checked) {
  border-color: var(--fg);
}
.card-test span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.card-test small {
  color: var(--mute);
}
.boleto-line {
  display: block;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
  margin: 4px 0 8px;
}
.portal .card-pay .btn {
  margin-top: 8px;
}
.portal .card .extabs {
  background: transparent;
  position: static;
  padding: 0;
}

/* Pedido de Pedro (01/11): sem o número de pedidos no menu. */
.portal #nav-count {
  display: none !important;
}
/* Textos clicáveis em laranja, como no CRM: nomes nas listas e tabelas e links. */
.portal .main a:not(.btn),
.portal .dname,
.portal .li .t > b {
  color: var(--brand);
}
.portal .linkbtn {
  text-decoration: none;
}
.portal .linkbtn:hover,
.portal .main a:not(.btn):hover {
  text-decoration: underline;
}
.portal tr.click:hover .dname,
.portal button.li:hover .t > b {
  text-decoration: underline;
  text-underline-offset: 2px;
}
/* Clientes e Usuários: só a lista; os detalhes abrem no lugar dela, com "Voltar". */
.portal .split.listonly > .plist {
  flex: 1 1 100%;
}
.portal .split.open > .plist {
  display: none;
}
.portal .detail-wrap {
  flex: 1 1 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.portal .detail-wrap > .back {
  align-self: flex-start;
  padding-left: 6px;
}
