/* ------------------------------------------------------------------ */
/* Lounge sign-in                                                      */
/*                                                                    */
/* Mirrors the workspace sign-in markup and styles (public/styles.css) */
/* so both sites present the same form. Only the API and the lounge    */
/* shell behind it differ. The rules are scoped to .lock so the Ember  */
/* shell and modal keep their own styling.                             */
/* ------------------------------------------------------------------ */

.lock {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px;
  overflow: auto;
}

.lock .lock-card {
  position: relative;
  display: block;
  width: min(100%, 382px);
  padding: 38px 34px 30px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.055),
    rgba(255, 255, 255, 0.025)
  );
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  text-align: center;
  animation: login-rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.lock .mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: 16px;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 34px rgba(103, 232, 249, 0.25);
  font-size: 24px;
}

.lock .lock-card h1 {
  margin-bottom: 6px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.lock .lock-card > .muted {
  margin-bottom: 24px;
  font-size: 13.5px;
}

.lock #auth-credentials {
  display: block;
}

.lock .field {
  display: block;
  margin-bottom: 12px;
}

.lock .lock-card input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-size: 14px;
  transition:
    border-color 0.18s,
    box-shadow 0.18s,
    background 0.18s;
}

.lock .lock-card input::placeholder {
  color: #626b7e;
}

.lock .lock-card input:focus {
  border-color: rgba(103, 232, 249, 0.7);
  background: rgba(0, 0, 0, 0.38);
  box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.14);
}

.lock .primary {
  padding: 11px 18px;
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 20px rgba(103, 232, 249, 0.18);
  transition:
    transform 0.15s,
    filter 0.15s,
    opacity 0.15s;
}

.lock .primary:hover {
  filter: brightness(1.06);
}

.lock .primary:active {
  transform: translateY(1px);
}

.lock .primary:disabled {
  opacity: 0.55;
  cursor: default;
}

.lock .primary.wide {
  display: block;
  width: 100%;
  text-decoration: none;
}

.lock .ghost {
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14.5px;
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s;
}

.lock .ghost:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: var(--surface);
  color: var(--text);
}

.lock .ghost.small {
  padding: 5px 10px;
  font-size: 12.5px;
}

.lock .ghost.wide {
  width: 100%;
  text-decoration: none;
}

.lock .form-error {
  min-height: 20px;
  margin-top: 12px;
  color: var(--danger);
  font-size: 13px;
}

.lock .lock-card.shake {
  animation: login-shake 0.35s;
}

/* The workspace hides these secondary hints on its sign-in page. */
.lock .auth-sub,
.lock #auth-hint,
.lock .twofa-hint,
.lock .fine-print {
  display: none !important;
}

.lock .twofa-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
  text-align: left;
}

.lock .twofa-account {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.lock .twofa-secret {
  display: block;
  padding: 10px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.lock .twofa-secret-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lock .twofa-secret-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}

.lock .twofa-secret-row code {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
}

.lock .twofa-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
}

.lock .twofa-qr {
  width: 168px;
  max-width: 100%;
  padding: 9px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.32);
}

.lock .twofa-qr svg {
  display: block;
  width: 100%;
  height: auto;
}

.lock .twofa-panel .field {
  margin-bottom: 16px;
}

.lock .twofa-back {
  position: absolute;
  top: 13px;
  left: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
}

.lock .twofa-back svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes login-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes login-shake {
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(5px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lock .lock-card,
  .lock .lock-card.shake {
    animation: none !important;
  }

  .lock *,
  .lock *::before,
  .lock *::after {
    transition-duration: 1ms !important;
  }
}

@media (max-width: 520px) {
  .lock {
    padding: 14px;
  }

  .lock .lock-card {
    padding: 30px 22px 24px;
  }
}
