/* Só o que o app do lojista não desenha: código em 6 casas
   e a lista de e-mails. Tamanhos de botão, cartão e menu vêm do app.css. */

.code-slots {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
}

.code-slots input {
  width: 100%;
  min-height: 52px;
  text-align: center;
  border-radius: 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.email-line {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
}

.email-line span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card > .label + .field,
.card .email-line + .field {
  margin-top: 14px;
}

.icon-btn.quiet {
  color: var(--muted);
}

.screen > form {
  flex: 1 1 auto;
  min-height: 0;
}

.screen-pin {
  margin-top: auto;
}

.login-copy {
  margin: 0;
}

.login-copy strong {
  font-weight: 600;
}

.card.line-card {
  background: #121214;
  padding: 14px 14px 10px;
}

:root[data-theme="light"] .card.line-card {
  background: var(--surface);
}

.chart-card {
  cursor: pointer;
}

.chart-card .line-chart,
.chart-card .line-chart * {
  pointer-events: none;
}

/* Textos da tela não selecionam. Campo, texto longo e código continuam. */
html,
body,
.app {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

input,
textarea,
select,
code,
.mono,
[data-secret] {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

:root[data-theme="light"] .line-chart polyline {
  stroke: var(--ink);
}

:root[data-theme="light"] .line-chart line {
  stroke: var(--line-strong);
}

:root[data-theme="light"] .card.line-card .chart-now {
  color: var(--ink);
}

:root[data-theme="light"] .card.line-card .chart-name {
  color: var(--ink-2);
}

:root[data-theme="light"] .card.line-card .chart-tick,
:root[data-theme="light"] .card.line-card .chart-ends {
  color: var(--muted);
}

.chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}

.chart-name,
.chart-now,
.chart-ends,
.chart-tick {
  margin: 0;
}

.chart-name {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
  font-weight: 600;
}

.chart-now {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.chart-plot {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  grid-template-rows: 56px 56px 56px auto;
  column-gap: 10px;
}

.chart-y {
  display: grid;
  grid-column: 1;
  grid-row: 1 / span 3;
  grid-template-rows: 56px 56px 56px;
  align-self: stretch;
}

.own-machine,
.bot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chart-tick {
  grid-column: 1;
  justify-self: end;
  align-self: center;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.85rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chart-plot > .line-chart {
  grid-column: 2;
  grid-row: 1 / span 3;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: visible;
}

.line-chart {
  display: block;
  width: 100%;
  height: 168px;
}

.line-chart.mini {
  height: 72px;
}

.chart-ends {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.85rem;
}

.chart-plot > .chart-ends {
  grid-column: 2;
  grid-row: 4;
  align-self: start;
  margin: 6px 0 0;
}

.fee-line {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
}

.fee-field {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fee-box {
  flex: 0 0 64px;
  box-sizing: border-box;
  width: 64px;
  min-width: 64px;
  max-width: 64px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 52px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.fee-box input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 12px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 1.05rem;
  font-weight: 400;
  text-align: left;
}

.fee-box:focus-within {
  border-color: var(--accent);
  background: var(--surface-3);
}

.fee-box input:focus,
.fee-box input:focus-visible {
  outline: none;
  box-shadow: none;
}

.fee-suffix {
  flex: none;
  color: inherit;
  font-size: 1.05rem;
  font-weight: 400;
  user-select: none;
  pointer-events: none;
}

.fee-min {
  flex: none;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Comissão da loja: o mesmo card dos e-mails. Rótulo à esquerda. Campo largo na linha. */
.fee-store {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

.fee-store > .label {
  justify-content: flex-start;
  width: 100%;
}

.fee-store .fee-line {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.fee-store .fee-field {
  flex: 1 1 auto;
  min-width: 0;
}

.fee-store .fee-box {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  padding: 0 16px;
}

.row-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.row-head .row-title {
  flex: 0 1 auto;
  min-width: 0;
}

.row-head .pill {
  flex: none;
}

.highlight {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.18s ease;
}

.highlight.is-closing {
  opacity: 0;
}

.highlight-bell,
.highlight-x {
  align-self: flex-start;
  flex: none;
}

.highlight-bell {
  display: grid;
  color: var(--accent);
}

.highlight-bell .ico {
  width: 22px;
  height: 22px;
}

.highlight-body {
  flex: 1 1 auto;
  min-width: 0;
}

.highlight-x {
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.highlight-x .ico {
  width: 16px;
  height: 16px;
}

.highlight p {
  margin: 0;
}

.empty p,
.card > p.muted {
  margin: 0;
}

/* De onde vem: dois terços da janela, sempre. O valor fica no topo.
   A lista rola por baixo. Trocar o chip não muda a altura. */
.sheet.sheet-chart-sources {
  height: 66dvh;
  max-height: 66dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sheet.sheet-chart-sources .sheet-head,
.sheet.sheet-chart-sources .chart-now,
.sheet.sheet-chart-sources .hist-chips {
  flex: none;
}

.sheet.sheet-chart-sources .chart-now {
  text-align: center;
}

.sheet.sheet-chart-sources .chart-source-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

/* A folha separa o título do conteúdo com 12px. "Lojas" usa o mesmo. */
.sheet-hist-filter .hist-filter-body > .label {
  margin-top: 12px;
}

/* Mesma grade da maquininha: duas colunas iguais na largura da folha.
   O item ímpar fica na coluna da esquerda, com a mesma largura. */
.sheet-hist-filter .hist-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sheet-hist-filter .hist-chip {
  width: auto;
  min-width: 0;
  height: auto;
  white-space: normal;
}

.sheet-hist-filter .hist-chip .row-ico {
  flex: none;
}

.sheet-hist-filter .hist-chip > span:last-child {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.sheet-hist-filter .hist-chips-bots {
  margin-top: 10px;
}

.bio-use .bio-label {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 1rem;
  white-space: normal;
}

.switch {
  width: 52px;
  height: 32px;
  flex: none;
  border-radius: 999px;
  background: var(--line-strong);
  position: relative;
}

.bio-use[aria-pressed="true"] .switch {
  background: var(--ok);
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
}

.bio-use[aria-pressed="true"] .switch::after {
  transform: translateX(20px);
}

/* A página inteira rola. Nenhuma tela tem rolagem própria.
   A tela continua pelo menos da altura da janela, para o botão
   com screen-pin ficar no pé quando o conteúdo é curto. */
html,
body {
  height: auto;
  min-height: 100%;
  /* overflow-x: hidden faz o Chrome ignorar a roda do mouse na página. */
  overflow: auto;
}

/* Só o html rola. Body com overflow próprio + overscroll none
   bloqueia a rolagem com um dedo. */
body {
  overflow: visible;
}

/* A barra de rolagem nunca aparece. */
html,
body,
* {
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  display: none;
}

/* Conteúdo que cabe na tela não rola (regra no JS). */
html.page-lock {
  overflow: hidden;
}

html body .app,
html body .app > .screen,
html body .app > .screen.screen-scroll,
html.kb:not(.sheet-lock) body .app > .screen,
html body .history {
  height: auto;
  max-height: none;
  overflow: visible;
  min-height: 0;
}

/* --app-h é a altura real da janela, medida no JS. 100dvh passa da tela
   no PWA instalado do Android. */
html body .app {
  min-height: var(--app-h, 100dvh);
}

html body .app > .screen {
  flex: 1 0 auto;
  min-height: var(--app-h, 100dvh);
}

html body .app > .screen.screen-overlay {
  padding-bottom: calc(28px + var(--safe-b));
}

/* Loja: Histórico no pé, acima do menu, sem rolagem da página.
   O PWA deixa .app crescer; nesta tela a caixa volta à altura da janela. */
html body .app:has(> .screen.screen-store) {
  height: min(100dvh, var(--app-h, 100dvh));
  max-height: min(100dvh, var(--app-h, 100dvh));
  min-height: 0;
  overflow: hidden;
}

html body .app > .screen.screen-store,
html.kb:not(.sheet-lock) body .app > .screen.screen-store {
  height: auto;
  max-height: 100%;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
  margin-bottom: calc(var(--tabs-h) + var(--safe-b));
  padding-bottom: var(--btn-gap-nav, 20px);
}

html body .app > .screen.screen-store > .account-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

html:has(.screen-store),
html:has(.screen-store) body {
  overflow: hidden;
}

.screen > .label,
.screen > p.muted,
.screen > .form-error {
  margin: 0;
}

.account-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 0 0 auto;
}

.account-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.account-body .addr {
  text-align: center;
}

.account-foot .install-offer {
  width: 100%;
  align-self: stretch;
  margin-bottom: 16px;
}

/* Nome no centro da coluna do meio; o lápis fica na coluna da direita e não entra no centro. */
.bar h1 .bar-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
}

.bar h1 .bar-title .bar-name {
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar h1 .bar-title .bar-edit {
  grid-column: 3;
  justify-self: start;
  margin-left: 0.4em;
  display: grid;
  align-items: center;
}

.bar h1 .bar-title .bar-edit .ico {
  width: 16px;
  height: 16px;
}

.bot-list > .top {
  padding: 0;
}

.bot-list > .top > .label {
  margin: 0;
}

.sheet-hist-filter .hist-filter-body > .field + .hist-chips {
  margin-top: 12px;
}

/* Inativos fica na largura do conteúdo. A grade de duas colunas do Histórico não muda. */
.sheet-hist-filter .hist-filter-body > .field + .hist-chips.hist-chips-bots {
  display: flex;
  width: max-content;
  max-width: 100%;
}

.sheet-hist-filter .hist-filter-body > .field + .hist-chips.hist-chips-bots > .hist-chip {
  width: max-content;
  flex: none;
}

.sheet-hist-filter .hist-filter-body > .field + .hist-chips.hist-chips-bots > .hist-chip > span:last-child {
  flex: none;
}

.sheet-hist-filter .bot-sheet-rows:not(:empty) {
  margin-top: 12px;
}

.row-head .pill:has(.ico) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.row-head .pill .ico {
  width: 16px;
  height: 16px;
}

.home-hello .brand {
  flex-shrink: 0;
  min-width: 0;
}

.home-hello .brand-word {
  height: calc(22px * 1.4);
}

.home-hello .profile-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  text-align: right;
}

.install-offer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.install-offer p {
  margin: 0;
}

.screen > form {
  min-height: auto;
  flex: 1 0 auto;
}
