/* ── Login ─────────────────────────────────────────────────────────────── */
.login-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px 20px;
}

.login-card {
  width: min(100%, 460px);
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%), var(--panel);
  box-shadow: var(--shadow);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(76, 141, 255, 0.45);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(76, 141, 255, 0.28), rgba(76, 141, 255, 0.04));
  color: #dbe8ff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark.small {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-size: 12px;
}

.login-card h1 {
  margin: 20px 0 8px;
  font-size: clamp(28px, 5vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.login-card .muted {
  margin: 0 0 26px;
  font-size: 14px;
}

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

.field > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.field small {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--muted-2);
}

.field input,
.field textarea,
.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--text);
  outline: none;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.field textarea {
  min-height: 104px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
}

.field input:focus,
.field textarea:focus,
.input:focus,
.select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

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

.login-foot {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: 12px;
  text-align: center;
}

.login-card .form-error {
  margin: 12px 0 0;
}

/* The error line lives outside the (collapsed) ticket form; don't reserve
   space for it when there is nothing to say. */
.login-card .form-error:empty {
  min-height: 0;
  margin: 0;
}

/* Secondary entry point: the ticket paste form stays collapsed behind a
   summary so Slack remains the primary, one-click login path. */
.ticket-login {
  margin-top: 16px;
}

.ticket-login > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  border-radius: 4px;
}

.ticket-login > summary::-webkit-details-marker {
  display: none;
}

.ticket-login > summary::before {
  content: '▸';
  font-size: 11px;
  color: var(--muted-2);
}

.ticket-login[open] > summary::before {
  content: '▾';
}

.ticket-login > summary:hover {
  color: var(--text);
}

.ticket-login > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ticket-login[open] > summary {
  margin-bottom: 10px;
}

.ticket-hint {
  margin: 0 0 16px;
}

/* Emergency (break-glass) login: the same collapsed treatment as the ticket
   form, with a text button that swaps password + TOTP for a one-time code. */
.local-login .ticket-hint {
  margin-bottom: 14px;
}

.local-switch {
  margin: 2px 0 0;
}

.link-button {
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-button:hover {
  color: #7aa9ff;
}

.link-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
