:root {
  --danger: #C1352F;
}
body.dark {
  --danger: #F0665F;
}
[hidden] {
  display: none !important;
}
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.topbar-in {
  max-width: 760px;
}
.wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 40px 20px;
  padding-left: calc(20px + env(safe-area-inset-left));
  padding-right: calc(20px + env(safe-area-inset-right));
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
}
.login {
  width: 100%;
  max-width: 760px;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  overflow: hidden;
  min-height: 440px;
}
.brand-panel {
  background: var(--grad);
  color: #fff;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
}
.brand-panel::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  right: -90px;
  bottom: -90px;
}
.brand-panel::before {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  left: -50px;
  top: -50px;
}
.brand-logo {
  width: 120px;
  height: auto;
  position: relative;
  z-index: 1;
}
.brand-panel h2 {
  font-size: 21px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0;
  font-weight: 700;
  position: relative;
  z-index: 1;
}
.brand-panel p {
  margin: 0;
  font-size: 14px;
  opacity: 0.85;
  line-height: 1.55;
  position: relative;
  z-index: 1;
}
.form-panel {
  padding: clamp(28px, 5vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
}
.btn-google {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 340px;
  min-height: 52px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1.5px solid #C3CFD7;
  background: #FFFFFF;
  color: #1C2B33;
  font-weight: 600;
  font-size: 15.5px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.10), 0 8px 20px rgba(16, 24, 40, 0.10);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.btn-google:hover {
  border-color: #8FA0AB;
  box-shadow: var(--shadow-lg);
}
.btn-google:active {
  transform: scale(0.99);
}
.btn-google svg {
  width: 20px;
  height: 20px;
  flex: none;
}
body.dark .btn-google {
  background: var(--card);
  border-color: var(--line);
  color: var(--text);
  box-shadow: var(--shadow);
}
body.dark .btn-google:hover {
  border-color: var(--text3);
}
.foot {
  border-top: 1px solid var(--line2);
  padding: 22px 20px 28px;
  padding-left: calc(20px + env(safe-area-inset-left));
  padding-right: calc(20px + env(safe-area-inset-right));
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
  text-align: center;
}
.foot .made {
  font-size: 13px;
  color: var(--text2);
  margin: 0 0 10px;
}
.foot nav {
  display: flex;
  gap: 22px;
  justify-content: center;
  font-size: 13.5px;
}
.foot nav a {
  color: var(--text2);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.foot nav a:hover {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.toast.success .ic {
  color: #4ADE80;
}
.toast.error .ic {
  color: #F87171;
}
.logo-mono .p-body {
  fill: #FFFFFF;
}
.logo-mono .p-txt {
  fill: #FFFFFF;
}
.tabs {
  display: flex;
  background: var(--field);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  width: 100%;
  max-width: 340px;
  margin-bottom: 22px;
}
.tab {
  flex: 1;
  border: 0;
  background: transparent;
  min-height: 44px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text2);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.tab[aria-selected="true"] {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.12);
}
.auth-form {
  width: 100%;
  max-width: 340px;
  text-align: left;
  display: grid;
  gap: 14px;
}
.field {
  display: grid;
  gap: 6px;
}
.lbl {
  font-size: 13.5px;
  font-weight: 700;
}
.inp {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  background: var(--card);
  color: var(--text);
  min-height: 46px;
  font-size: 15px;
  font-family: inherit;
}
.inp::placeholder {
  color: var(--text3);
}
.inp:focus {
  outline: none;
  border-color: #5BC8AF;
  box-shadow: 0 0 0 4px rgba(91, 200, 175, 0.18);
}
.field.err .inp {
  border-color: var(--danger);
}
.field.err .inp:focus {
  box-shadow: 0 0 0 4px rgba(193, 53, 47, 0.15);
}
.emsg {
  font-size: 12.5px;
  color: var(--danger);
  font-weight: 600;
  margin: 0;
}
.pw-wrap {
  position: relative;
}
.pw-wrap .inp {
  padding-right: 52px;
}
.pw-bot {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--text3);
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 11px;
  transition: color 0.2s ease, background 0.2s ease;
}
.pw-bot:hover {
  color: var(--brand);
  background: var(--hover);
}
.bot {
  width: 27px;
  height: 27px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bot .eyes-open circle {
  fill: currentColor;
  stroke: none;
}
.bot .eyes-open {
  opacity: 1;
  transition: opacity 0.15s ease;
  transform-box: fill-box;
  transform-origin: center;
  animation: blink 4.8s ease-in-out infinite;
}
.bot .eyes-closed {
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.18s ease, transform 0.18s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.pw-bot.seeing .eyes-open {
  opacity: 0;
  animation: none;
}
.pw-bot.seeing .eyes-closed {
  opacity: 1;
  transform: scale(1);
}
@keyframes blink {
  0%, 93%, 100% {
    transform: scaleY(1);
  }
  96% {
    transform: scaleY(0.1);
  }
}
.forgot-row {
  text-align: right;
  margin-top: -6px;
}
.forgot-row a {
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.forgot-row a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-primary {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 15.5px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(34, 91, 91, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.btn-primary:active {
  transform: scale(0.99);
}
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 340px;
  margin: 20px 0 4px;
  color: var(--text3);
  font-size: 12.5px;
}
.divider::before {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.rules {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: grid;
  gap: 3px;
  font-size: 12.5px;
  color: var(--text3);
}
.rules li {
  display: flex;
  gap: 7px;
  align-items: center;
}
.rules li::before {
  content: "·";
  font-weight: 800;
  width: 12px;
  text-align: center;
  flex: none;
}
.rules li.ok {
  color: #1F7A4D;
}
.rules li.ok::before {
  content: "✓";
}
body.dark .rules li.ok {
  color: #4ADE80;
}
.rules li.bad {
  color: var(--danger);
}
.rules li.bad::before {
  content: "✕";
}
.meter {
  height: 6px;
  border-radius: 99px;
  background: var(--line2);
  overflow: hidden;
  margin-top: 2px;
}
.meter i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad);
  border-radius: 99px;
  transition: width 0.3s ease;
}
@media (max-width: 640px) {
  .login {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .brand-panel {
    padding: 28px 24px;
    gap: 10px;
  }
  .brand-panel::after {
    width: 180px;
    height: 180px;
    right: -60px;
    bottom: -60px;
  }
  .brand-logo {
    width: 88px;
  }
  .brand-panel h2 {
    font-size: 18px;
  }
  .brand-panel p {
    font-size: 13px;
  }
  .wrap {
    padding: 24px 14px;
    padding-left: calc(14px + env(safe-area-inset-left));
    padding-right: calc(14px + env(safe-area-inset-right));
    align-items: flex-start;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
