/* Экран входа: выбор группы, роли, ключи, гаммы, анимация полей */

.sres {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: -4px 0 10px;
}

.sres button {
  justify-content: flex-start;
  margin: 0 !important;
  padding: 10px 12px !important;
  font-size: 15px !important;
}

.sres .av {
  margin-right: 4px;
}

.sh {
  font-size: 13px;
  color: var(--mut);
  padding: 4px;
}

.other {
  display: block;
  font-size: 13px;
  color: var(--acc);
  margin-top: 2px;
}

.who {
  font-size: 20px;
  font-weight: 700;
  margin: -8px 0 14px;
}

#gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.gb {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 22px;
  padding: 28px 24px;
  box-shadow: 0 20px 50px -20px rgba(16, 24, 40, 0.35);
  width: min(360px, 100%);
  text-align: center;
}

.gb h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.gb p {
  color: var(--mut);
  margin: 0 0 16px;
  font-size: 14px;
}

.gb button {
  width: 100%;
  margin-bottom: 10px;
  padding: 14px;
  font-size: 16px;
}

.gb input {
  width: 100%;
  font: inherit;
  padding: 12px;
  margin-bottom: 10px;
  background: var(--bg);
  color: var(--tx);
  border: 1px solid var(--bd);
  border-radius: 10px;
}

#gate .gsub {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mut);
  margin: -2px 0 18px;
}

#gate .gcur {
  font-size: 13px;
  color: var(--mut);
  margin: -10px 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

#gate {
  overflow: hidden;
}

.gbg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--tx) 9%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
}

.gbg span {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
}

.gbg .b1 {
  width: 380px;
  height: 380px;
  background: var(--g1, #6a5cf0);
  top: -120px;
  left: -100px;
}

.gbg .b2 {
  width: 340px;
  height: 340px;
  background: var(--g2, #1fb3a6);
  bottom: -120px;
  right: -80px;
  opacity: 0.4;
}

.gbg .b3 {
  width: 260px;
  height: 260px;
  background: var(--g3, #4766e6);
  top: 40%;
  left: 60%;
  opacity: 0.25;
}

.gbg .wmk {
  position: absolute;
  width: 520px;
  height: 520px;
  right: -140px;
  top: -120px;
  opacity: 0.06;
  transform: rotate(-12deg);
  filter: grayscale(0.2);
}

.gcol {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(380px, 100%);
}

.gcol .gb {
  width: 100%;
  backdrop-filter: blur(6px);
}

.wm {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.42em;
  color: var(--acc);
  margin: -4px 0 6px;
  padding-left: 0.42em;
}

.ginfo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.gi {
  background: color-mix(in srgb, var(--card) 82%, transparent);
  border: 1px solid var(--bd);
  border-radius: 14px;
  padding: 10px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  backdrop-filter: blur(6px);
}

.gi span {
  font-weight: 700;
  font-size: 16px;
}

.gi small {
  font-size: 11px;
  color: var(--mut);
}

.gfoot {
  font-size: 11px;
  color: var(--mut);
  text-align: center;
  letter-spacing: 0.02em;
}

@media (max-height: 700px) {
  .ginfo,
  .gfoot {
    display: none;
  }
}

.pals {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 4px 0;
}

.pal {
  width: 28px !important;
  height: 28px;
  min-width: 28px;
  border-radius: 50% !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 3px solid var(--card) !important;
  box-shadow: 0 0 0 1px var(--bd) !important;
}

.pal.on {
  box-shadow: 0 0 0 2px var(--tx) !important;
}

.pname {
  font-size: 12px;
  color: var(--mut);
  text-align: center;
  margin: 2px 0 4px;
  min-height: 16px;
}

#dlgP h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

#dlgP .seg {
  display: flex;
  margin-bottom: 14px;
}

.admhead {
  display: none;
}

.admlink #step1,
.admlink #step2 > p,
.admlink #g-curn,
.admlink #step2 > .seg,
.admlink #box-s,
.admlink #box-c,
.admlink #box-k,
.admlink .pals,
.admlink .pname {
  display: none !important;
}

.admlink #step2 {
  display: block !important;
}

.admlink #box-a {
  display: block !important;
}

/* поле кода из приложения: шесть клеток двумя группами по три */
.otp {
  display: none;
  justify-content: center;
  gap: 14px;
  margin: 12px 0 4px;
}
.otp-grp {
  display: flex;
  gap: 8px;
}
.otp-cell {
  box-sizing: border-box;
  width: 44px;
  min-width: 0;
  height: 54px;
  padding: 0;
  text-align: center;
  font: 600 24px/1 inherit;
  font-variant-numeric: tabular-nums;
  color: var(--tx);
  background: var(--card);
  border: 1.5px solid var(--bd);
  border-radius: 12px;
  caret-color: var(--acc);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.otp-cell:focus {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 25%, transparent);
}
.otp.err .otp-cell {
  border-color: var(--no);
  animation: otp-shake 0.4s;
}
@keyframes otp-shake {
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}
@media (max-width: 380px) {
  .otp { gap: 10px; }
  .otp-grp { gap: 6px; }
  .otp-cell { width: 38px; height: 50px; font-size: 22px; }
}

.admlink .admhead {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  margin: 4px 0 14px;
  color: var(--acc);
}

.gb input,
#cfio,
#cinv {
  border: 2px solid transparent !important;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(90deg, var(--bd), var(--bd)) border-box !important;
  transition: box-shadow 0.3s;
}

.gb input:focus {
  outline: none;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(
        90deg,
        var(--g1, #6a5cf0),
        var(--g2, #1fb3a6),
        var(--acc),
        var(--g3, #e0507a),
        var(--g1, #6a5cf0)
      )
      border-box !important;
  background-size:
    100% 100%,
    300% 100% !important;
  animation: inFlow 2.4s linear infinite;
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--acc) 14%, transparent),
    0 6px 22px -8px color-mix(in srgb, var(--g1, #6a5cf0) 55%, transparent);
}

.gb input.typing {
  animation: inFlow 0.9s linear infinite;
}

.gb input:focus::placeholder {
  background: linear-gradient(90deg, var(--mut), var(--acc), var(--g2, #1fb3a6), var(--mut));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: inFlow 3s linear infinite;
}

.gb button.p {
  background: linear-gradient(
    90deg,
    var(--acc),
    var(--g1, #6a5cf0),
    var(--g2, #1fb3a6),
    var(--acc)
  ) !important;
  background-size: 300% 100% !important;
  animation: inFlow 6s linear infinite;
  border: 0 !important;
}

@keyframes inFlow {
  to {
    background-position:
      0 0,
      300% 0;
  }
}

.gb input.ok-flash {
  animation: okFlash 0.5s ease;
}

@keyframes okFlash {
  50% {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--ok) 35%, transparent);
  }
}

.gb input.bad-shake {
  animation: badShake 0.4s ease;
}

@keyframes badShake {
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}
