:root {
  --login-bg: #051424;
  --login-dark: #010f1f;
  --login-panel: #0d1c2d;
  --login-card: #122131;
  --login-raised: #1c2b3c;
  --login-line: rgba(255, 255, 255, 0.07);
  --login-divider: rgba(255, 255, 255, 0.045);
  --login-orange: #ff6b00;
  --login-orange-soft: #ffb693;
  --login-text: #d4e4fa;
  --login-muted: #8fa8c8;
  --login-faint: #4a6080;
  --login-success: #22c55e;
  --login-font: "DM Sans", sans-serif;
  --login-mono: "DM Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body.login-page {
  margin: 0;
  color: var(--login-text);
  background: var(--login-bg);
  font-family: var(--login-font);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(440px, .88fr);
  min-height: 100vh;
}

.login-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 28px clamp(28px, 5vw, 76px) 34px;
  overflow: hidden;
  border-right: 1px solid var(--login-divider);
  background: var(--login-dark);
}

.login-showcase::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: .42;
  background-image:
    linear-gradient(var(--login-divider) 1px, transparent 1px),
    linear-gradient(90deg, var(--login-divider) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
}

.login-brand,
.showcase-content {
  position: relative;
  z-index: 1;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.login-brand-link,
.mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.login-brand-link strong,
.mobile-brand strong {
  display: block;
  color: var(--login-text);
  font-size: 18px;
  letter-spacing: -.02em;
}

.login-brand-link small {
  display: block;
  margin-top: 2px;
  color: var(--login-orange-soft);
  font-family: var(--login-mono);
  font-size: 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.login-brand-icon {
  display: grid;
  width: 38px;
  height: 38px;
  color: var(--login-orange);
  border: 1px solid rgba(255, 107, 0, .3);
  border-radius: 9px;
  place-items: center;
  background: rgba(255, 107, 0, .08);
}

.login-brand-icon svg {
  width: 26px;
  height: 26px;
}

.login-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--login-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.login-back:hover,
.label-row a:hover,
.login-footer a:hover {
  color: var(--login-orange-soft);
}

.login-back svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.showcase-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 48px 0 10px;
}

.showcase-copy {
  max-width: 620px;
}

.showcase-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--login-orange-soft);
  font-family: var(--login-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.showcase-kicker i,
.scanner-toolbar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--login-orange);
}

.showcase-copy h1 {
  max-width: 660px;
  margin: 0;
  color: var(--login-text);
  font-size: clamp(40px, 4.2vw, 64px);
  font-weight: 800;
  letter-spacing: -.065em;
  line-height: 1.02;
}

.showcase-copy > p:last-child {
  max-width: 610px;
  margin: 20px 0 0;
  color: var(--login-muted);
  font-size: 16px;
  line-height: 1.65;
}

.scanner-preview {
  margin-top: 42px;
  overflow: hidden;
  border: 1px solid var(--login-line);
  border-radius: 12px;
  background: var(--login-panel);
}

.scanner-toolbar,
.scanner-footer {
  display: flex;
  align-items: center;
}

.scanner-toolbar {
  justify-content: space-between;
  min-height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--login-line);
  background: rgba(1, 15, 31, .72);
}

.scanner-toolbar span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--login-orange-soft);
  font-family: var(--login-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.scanner-toolbar b {
  color: var(--login-muted);
  font-family: var(--login-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.scanner-stage {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  background: var(--login-bg);
}

.scanner-map,
.scanner-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scanner-grid {
  opacity: .42;
  background-image:
    linear-gradient(var(--login-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--login-line) 1px, transparent 1px);
  background-size: 28px 28px;
}

.scanner-result {
  position: absolute;
  right: 20px;
  bottom: 18px;
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  padding: 12px 14px;
  border: 1px solid var(--login-line);
  border-radius: 8px;
  background: rgba(1, 15, 31, .86);
}

.scanner-result span {
  color: var(--login-orange-soft);
  font-family: var(--login-mono);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.scanner-result strong {
  margin-top: 5px;
  color: var(--login-text);
  font-size: 15px;
}

.scanner-result small {
  margin-top: 3px;
  color: var(--login-muted);
  font-size: 12px;
}

.scanner-result b {
  color: var(--login-orange-soft);
}

.scanner-footer {
  min-height: 62px;
  border-top: 1px solid var(--login-line);
  background: rgba(18, 33, 49, .7);
}

.scanner-footer div {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  padding: 0 16px;
  border-right: 1px solid var(--login-line);
}

.scanner-footer div:last-child {
  border-right: 0;
}

.scanner-footer span {
  color: var(--login-muted);
  font-size: 11px;
}

.scanner-footer b {
  color: var(--login-text);
  font-size: 16px;
}

.showcase-note {
  margin: 22px 0 0;
  color: var(--login-faint);
  font-family: var(--login-mono);
  font-size: 10px;
  letter-spacing: .07em;
  text-align: center;
  text-transform: uppercase;
}

.login-access {
  display: grid;
  min-height: 100vh;
  padding: 42px;
  place-items: center;
  background: var(--login-bg);
}

.login-card {
  width: min(100%, 420px);
}

.mobile-brand {
  display: none;
  margin-bottom: 34px;
}

.login-heading {
  margin-bottom: 26px;
}

.login-heading h2 {
  margin: 0;
  color: var(--login-text);
  font-size: 32px;
  letter-spacing: -.045em;
  line-height: 1.08;
}

.login-heading p {
  margin: 10px 0 0;
  color: var(--login-muted);
  font-size: 15px;
}

.btn-google,
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: border-color .18s ease, background .18s ease, color .18s ease, opacity .18s ease;
}

.btn-google {
  gap: 10px;
  color: var(--login-text);
  border: 1px solid var(--login-line);
  background: var(--login-card);
}

.btn-google:hover {
  border-color: rgba(255, 182, 147, .38);
  background: var(--login-raised);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--login-faint);
  font-family: var(--login-mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.login-divider::before,
.login-divider::after {
  flex: 1;
  height: 1px;
  content: "";
  background: var(--login-line);
}

.form-group {
  margin-bottom: 17px;
}

.form-group label,
.label-row a {
  color: var(--login-muted);
  font-size: 13px;
  font-weight: 700;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.label-row a {
  color: var(--login-orange-soft);
  font-size: 12px;
  text-decoration: none;
}

.form-group > label {
  display: block;
  margin-bottom: 8px;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--login-faint);
  pointer-events: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transform: translateY(-50%);
}

.input-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 44px;
  color: var(--login-text);
  border: 1px solid var(--login-line);
  border-radius: 9px;
  outline: 0;
  background: var(--login-card);
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.input-wrap input:focus {
  border-color: rgba(255, 107, 0, .7);
  background: var(--login-panel);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, .1);
}

.input-wrap:focus-within .input-icon {
  color: var(--login-orange-soft);
}

.input-wrap input::placeholder {
  color: var(--login-faint);
}

.show-pass {
  position: absolute;
  top: 50%;
  right: 12px;
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--login-faint);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  place-items: center;
  background: transparent;
  transform: translateY(-50%);
}

.show-pass:hover {
  color: var(--login-text);
  background: rgba(255, 255, 255, .04);
}

.show-pass svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.remember-check,
.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
}

.remember-check {
  margin: 2px 0 18px;
}

.terms-check {
  margin: 0 0 20px;
}

.remember-check input,
.terms-check input {
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: var(--login-orange);
}

.remember-check span,
.terms-check span {
  color: var(--login-muted);
  font-size: 12px;
  line-height: 1.5;
}

.terms-check a {
  color: var(--login-orange-soft);
  text-decoration: none;
}

.terms-check a:hover {
  text-decoration: underline;
}

.btn-primary {
  gap: 6px;
  color: #051424;
  border: 1px solid var(--login-orange);
  background: var(--login-orange);
  box-shadow: none;
}

.btn-primary:hover {
  border-color: var(--login-orange-soft);
  background: var(--login-orange-soft);
  box-shadow: none;
}

.btn-primary svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.btn-primary:disabled,
.btn-google:disabled {
  cursor: wait;
  opacity: .62;
}

.login-footer {
  margin: 24px 0 0;
  color: var(--login-muted);
  font-size: 13px;
  text-align: center;
}

.login-footer a {
  color: var(--login-orange-soft);
  font-weight: 700;
  text-decoration: none;
}

.auth-message {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--login-line);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.auth-message.error {
  color: #fecaca;
  border-color: rgba(239, 68, 68, .24);
  background: rgba(239, 68, 68, .08);
}

.auth-message.success {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, .26);
  background: rgba(34, 197, 94, .08);
}

.auth-message.info {
  color: var(--login-orange-soft);
  border-color: rgba(255, 107, 0, .22);
  background: rgba(255, 107, 0, .07);
}

.field-error input {
  border-color: rgba(239, 68, 68, .7) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .12) !important;
}

.checkbox-error span {
  color: #fca5a5;
}

.toast-root {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20;
  display: grid;
  width: min(360px, calc(100vw - 36px));
  gap: 8px;
  pointer-events: none;
}

.toast-card {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  padding: 12px;
  color: var(--login-text);
  border: 1px solid rgba(239, 68, 68, .24);
  border-radius: 8px;
  background: var(--login-card);
  box-shadow: 0 4px 8px rgba(1, 15, 31, .22);
  animation: toast-in .2s ease both;
}

.toast-icon {
  display: grid;
  width: 26px;
  height: 26px;
  color: #fca5a5;
  border-radius: 6px;
  place-items: center;
  background: rgba(239, 68, 68, .1);
  font-weight: 800;
}

.toast-title {
  color: var(--login-text);
  font-size: 13px;
  font-weight: 700;
}

.toast-text {
  margin-top: 2px;
  color: var(--login-muted);
  font-size: 12px;
  line-height: 1.45;
}

.toast-card.leaving {
  animation: toast-out .18s ease forwards;
}

.animate-spin {
  animation: spin .8s linear infinite;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(-6px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.mobile-header {
  display: none;
}

.mobile-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--login-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--login-line);
  border-radius: 8px;
  background: var(--login-card);
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.mobile-back:hover {
  color: var(--login-orange-soft);
  border-color: rgba(255, 182, 147, .38);
  background: var(--login-raised);
}

.mobile-back svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

@media (max-width: 980px) {
  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-showcase {
    display: none;
  }

  .login-access {
    padding: 36px 22px;
  }

  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 34px;
  }

  .mobile-brand {
    display: inline-flex;
    margin-bottom: 0;
  }
}

@media (max-width: 480px) {
  .login-access {
    align-items: start;
    padding-top: 26px;
  }

  .login-heading h2 {
    font-size: 28px;
  }
}

.signup-access {
  align-items: center;
  overflow-y: auto;
  padding-top: 30px;
  padding-bottom: 30px;
}

.signup-card {
  width: min(100%, 460px);
}

.signup-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.input-wrap .input-plain {
  padding-right: 14px;
  padding-left: 14px;
}

.strength-bar {
  display: flex;
  gap: 5px;
  margin-top: 9px;
}

.strength-seg {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: var(--login-line);
  transition: background .18s ease;
}

.strength-seg.weak {
  background: #ef4444;
}

.strength-seg.fair {
  background: #f59e0b;
}

.strength-seg.strong {
  background: var(--login-success);
}

.strength-label {
  min-height: 14px;
  margin: 5px 0 0;
  color: var(--login-faint);
  font-family: var(--login-mono);
  font-size: 9px;
  letter-spacing: .07em;
  text-align: right;
  text-transform: uppercase;
}

.strength-label.weak {
  color: #fca5a5;
}

.strength-label.fair {
  color: #fcd34d;
}

.strength-label.strong {
  color: #86efac;
}

.pass-reqs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.req-chip {
  padding: 4px 7px;
  color: var(--login-faint);
  border: 1px solid var(--login-line);
  border-radius: 6px;
  font-family: var(--login-mono);
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.req-chip.ok {
  color: #86efac;
  border-color: rgba(34, 197, 94, .26);
  background: rgba(34, 197, 94, .07);
}

@media (max-width: 480px) {
  .signup-fields-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.forgot-card {
  width: min(100%, 430px);
}

.forgot-heading {
  margin-bottom: 24px;
}

.forgot-heading p {
  max-width: 410px;
  line-height: 1.6;
}

.forgot-icon,
.forgot-success-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 107, 0, .25);
  border-radius: 9px;
  place-items: center;
  color: var(--login-orange-soft);
  background: rgba(255, 107, 0, .08);
}

.forgot-icon svg,
.forgot-success-icon svg,
.forgot-note svg,
.forgot-back-link svg {
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.forgot-icon svg,
.forgot-success-icon svg {
  width: 23px;
  height: 23px;
}

.forgot-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 4px 0 18px;
  padding: 10px 11px;
  color: var(--login-muted);
  border: 1px solid var(--login-line);
  border-radius: 8px;
  background: rgba(18, 33, 49, .62);
  font-size: 12px;
  line-height: 1.5;
}

.forgot-note svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--login-orange-soft);
}

.forgot-back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 20px;
  color: var(--login-muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.forgot-back-link:hover,
.forgot-retry:hover {
  color: var(--login-orange-soft);
}

.forgot-back-link svg {
  width: 15px;
  height: 15px;
}

.forgot-success h2 {
  margin: 0;
  color: var(--login-text);
  font-size: 30px;
  letter-spacing: -.045em;
}

.forgot-success > p {
  margin: 12px 0 6px;
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.6;
}

.forgot-success > strong {
  display: block;
  margin-bottom: 20px;
  color: var(--login-orange-soft);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.forgot-success-icon {
  color: #86efac;
  border-color: rgba(34, 197, 94, .26);
  background: rgba(34, 197, 94, .08);
}

.forgot-login-button {
  text-decoration: none;
}

.forgot-retry {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 0;
  color: var(--login-muted);
  border: 0;
  cursor: pointer;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}
