﻿/* Login wizard isolada para o totem (arquivo separado para integracao futura). */
.totem-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  pointer-events: auto;
}

.totem-login-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #ecf0f3;
}

.totem-login-stage {
  position: relative;
  z-index: 1;
  min-height: 100%;
}

.totem-login-overlay-screen {
  --totem-login-shell-max: 520px;
  --totem-login-step-max: 520px;
  --totem-login-keyboard-max: 520px;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100vw;
  position: relative;
  overflow: hidden;
  background: rgba(236, 240, 243, 0.5);
  color: #181c32;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.totem-login-overlay-screen.totem-login-layout-identity,
.totem-login-overlay-screen.totem-login-layout-wide {
  --totem-login-shell-max: 760px;
  --totem-login-step-max: 760px;
  --totem-login-keyboard-max: 760px;
}

.totem-login-content {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  justify-content: center;
}

.totem-login-shell {
  width: 100%;
  max-width: var(--totem-login-shell-max);
  margin-inline: auto;
  display: grid;
  gap: 10px;
}

.totem-login-shell .totem-login-heading {
  display: grid;
  gap: 2px;
  margin-bottom: 6px;
}

.totem-login-layout-identity .totem-login-heading {
  transform: translateY(30px);
  margin-bottom: -24px;
}

.totem-login-shell .totem-login-title {
  margin: 0;
  color: #1d2437;
  font-size: 2rem;
  line-height: 1.08;
  font-weight: 800;
}

.totem-login-shell .totem-login-subtitle {
  margin: 0;
}

.totem-login-ident-row {
  width: 100%;
  max-width: var(--totem-login-step-max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 146px;
  gap: 14px;
  align-items: end;
  margin-top: 2px;
}

.totem-login-layout-cnpj .totem-login-ident-row {
  grid-template-columns: 1fr;
}

.totem-login-ident-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.totem-login-layout-cnpj [data-slot='login-logo'],
.totem-login-layout-cnpj .totem-login-company-line {
  display: none;
}

.totem-login-step,
.totem-login-back-wrap {
  width: 100%;
  max-width: var(--totem-login-step-max);
  margin-inline: auto;
}

.totem-login-keyboard-wrap,
.totem-login-next-action {
  width: 100%;
  max-width: var(--totem-login-keyboard-max);
  margin-inline: auto;
}

.totem-login-client-logo-wrap {
  width: 146px;
  min-width: 146px;
  height: 146px;
  border-radius: 30px;
  background: transparent !important;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.totem-login-client-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.totem-login-company-line {
  color: #1f2937;
  font-size: 1.08rem;
  line-height: 1.2;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.totem-login-company-line strong {
  font-weight: 800;
}

.totem-login-input,
.totem-login-field-input {
  width: 100%;
  min-height: 84px;
  border: 1px solid #d7dee9 !important;
  border-radius: 14px;
  background: #f7f8fa !important;
  box-shadow: none !important;
  color: #1f2a44;
  text-align: center;
  padding: 12px 14px;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}

.totem-login-input {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.totem-login-field-input {
  font-size: 1.8rem;
  font-weight: 700;
}

.totem-login-save-cnpj-check {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  color: #1f2937;
  font-size: 0.96rem;
  font-weight: 500;
}

.totem-login-save-cnpj-input {
  width: 20px;
  min-width: 20px;
  height: 20px;
  margin: 0;
  border: 1px solid #9aa7be;
  border-radius: 5px;
  background: #f8fafc;
  accent-color: #1b1ab3;
}

.totem-login-save-cnpj-text {
  line-height: 1.2;
}

.totem-login-password-wrap {
  position: relative;
}

.totem-login-password-input {
  padding-right: 98px;
}

.totem-login-password-tools {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 14px;
  transform: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.totem-login-password-tools .totem-login-password-show-btn {
  position: static;
  transform: none;
}

.totem-login-password-show-btn {
  display: inline-flex !important;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  align-items: center;
  justify-content: center;
}

.totem-login-password-show-btn i {
  display: block;
  line-height: 1;
  font-size: 1.2rem !important;
}

.totem-login-help {
  color: #7e8299;
  font-weight: 600;
}

.totem-login-error {
  min-height: 20px;
  color: var(--bs-danger, #dc2626);
  font-size: 0.94rem;
  font-weight: 700;
  text-align: center;
}

.totem-login-error.is-empty {
  visibility: hidden;
}

.totem-login-keyboard {
  margin-top: 0 !important;
  width: 100%;
  max-width: var(--totem-login-keyboard-max);
  margin-inline: auto;
  box-sizing: border-box;
  background: #ccd3df;
  border: 1px solid #98a2bb;
  border-radius: 18px;
  padding: 14px;
  box-shadow: none;
}

.totem-login-keyboard .totem-login-kbd-grid,
.totem-login-keyboard .totem-login-kbd-row,
.totem-login-keyboard .totem-login-kbd-row-center {
  gap: 8px;
}

.totem-login-keyboard .key-caps {
  max-width: 74px;
  font-size: 0.84rem;
  letter-spacing: 0.2px;
}

.totem-login-keyboard .totem-login-caps-active {
  background: #1b1ab3;
  color: #fff;
}

.totem-login-next-action {
  margin-top: 10px;
  margin-inline: auto;
}

.totem-login-back-wrap {
  display: grid;
}

.totem-login-back-wrap button {
  min-height: 44px;
  color: #1b1ab3 !important;
}

@media (max-width: 575.98px) {
  .totem-login-overlay-screen,
  .totem-login-overlay-screen.totem-login-layout-identity,
  .totem-login-overlay-screen.totem-login-layout-wide {
    --totem-login-shell-max: 100%;
    --totem-login-step-max: 100%;
    --totem-login-keyboard-max: 100%;
    padding: 10px;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
  }

  .totem-login-shell {
    margin-top: 0;
    gap: 8px;
  }

  .totem-login-shell .totem-login-title {
    font-size: 1.6rem;
  }

  .totem-login-layout-identity .totem-login-heading {
    transform: none;
    margin-bottom: 6px;
  }

  .totem-login-ident-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .totem-login-layout-identity [data-slot='login-logo'] {
    display: none;
  }

  .totem-login-company-line {
    font-size: 0.95rem;
  }

  .totem-login-input,
  .totem-login-field-input {
    min-height: 68px;
    font-size: 1.35rem;
  }

  .totem-login-field-input {
    font-size: 1.24rem;
  }

  .totem-login-save-cnpj-check {
    font-size: 0.9rem;
  }

  .totem-login-password-input {
    padding-right: 86px;
  }

  .totem-login-keyboard {
    padding: 8px;
    border-radius: 14px;
  }

  .totem-login-keyboard .key-btn {
    min-height: 50px;
    font-size: 1rem;
    padding: 8px 6px;
  }

  .totem-login-keyboard .totem-login-kbd-grid,
  .totem-login-keyboard .totem-login-kbd-row,
  .totem-login-keyboard .totem-login-kbd-row-center {
    gap: 6px;
  }

  .totem-login-keyboard .keyboard-grid-full {
    --alpha-key-size: 36px;
  }

  .totem-login-keyboard .keyboard-grid-full .totem-login-kbd-row-center {
    gap: 4px;
    justify-content: center;
    width: 100%;
  }

  .totem-login-keyboard .keyboard-grid-full .key-btn {
    width: var(--alpha-key-size);
    min-width: var(--alpha-key-size);
    max-width: var(--alpha-key-size);
    min-height: var(--alpha-key-size);
    border-radius: 10px;
    font-size: 0.7rem;
    line-height: 1;
    flex: 0 0 var(--alpha-key-size);
  }

  .totem-login-keyboard .keyboard-grid-full .keyboard-row-actions .key-btn {
    min-width: 0;
    max-width: none;
    width: auto;
    min-height: 34px;
    flex: 0.74 1 0;
    font-size: 0.64rem;
  }

  .totem-login-keyboard .keyboard-grid-full .keyboard-row-actions .key-btn.key-special,
  .totem-login-keyboard .keyboard-grid-full .keyboard-row-actions .key-btn.key-wide {
    flex: 0.56 1 0;
    font-size: 0.58rem;
  }

  .totem-login-keyboard .keyboard-grid-full .keyboard-row-actions .key-btn.key-space {
    flex: 2.7 1 0;
  }

  .totem-login-keyboard .keyboard-grid-full .key-btn i {
    font-size: 0.68rem !important;
  }

  .totem-login-keyboard .key-caps {
    max-width: 58px;
    font-size: 0.72rem;
  }
}

@media (max-width: 420px) {
  .totem-login-overlay-screen,
  .totem-login-overlay-screen.totem-login-layout-identity,
  .totem-login-overlay-screen.totem-login-layout-wide {
    padding: 8px;
  }

  .totem-login-keyboard {
    padding: 6px;
  }

  .totem-login-keyboard .totem-login-kbd-grid,
  .totem-login-keyboard .totem-login-kbd-row,
  .totem-login-keyboard .totem-login-kbd-row-center {
    gap: 5px;
  }

  .totem-login-keyboard .key-btn {
    min-height: 46px;
    font-size: 0.94rem;
    padding: 6px 5px;
  }

  .totem-login-keyboard .keyboard-grid-full {
    --alpha-key-size: 32px;
  }

  .totem-login-keyboard .keyboard-grid-full .totem-login-kbd-row-center {
    gap: 2px;
  }

  .totem-login-keyboard .keyboard-grid-full .key-btn {
    width: var(--alpha-key-size);
    min-width: var(--alpha-key-size);
    max-width: var(--alpha-key-size);
    min-height: var(--alpha-key-size);
    border-radius: 9px;
    font-size: 0.64rem;
    flex: 0 0 var(--alpha-key-size);
  }

  .totem-login-keyboard .keyboard-grid-full .keyboard-row-actions .key-btn {
    min-height: 32px;
    font-size: 0.58rem;
    flex: 0.72 1 0;
  }

  .totem-login-keyboard .keyboard-grid-full .keyboard-row-actions .key-btn.key-special,
  .totem-login-keyboard .keyboard-grid-full .keyboard-row-actions .key-btn.key-wide {
    flex: 0.54 1 0;
    font-size: 0.52rem;
  }

  .totem-login-keyboard .keyboard-grid-full .keyboard-row-actions .key-btn.key-space {
    flex: 2.6 1 0;
  }

  .totem-login-keyboard .keyboard-grid-full .key-btn i {
    font-size: 0.6rem !important;
  }
}
