/* The login, forgot-password and set-password screens. They sit inside gate() in server.js, in the workspace's own brand. */
:root { --danger: #ff9b8a; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --danger: #a8271b; } }
:root[data-theme="light"] { --danger: #a8271b; }

.box.auth { width: min(100%, 480px); gap: 22px; }
#auth, .view { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* Whose login this is: the business's logo and name. */
.who { display: flex; align-items: center; gap: 16px; min-width: 0; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.who img { width: 56px; height: 56px; flex: none; object-fit: contain; background: var(--ink); border: 1px solid var(--line); border-radius: var(--radius, 2px); }
.who div { min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.who h2 { font-size: clamp(23px, 3vw, 31px); line-height: 1.05; overflow-wrap: anywhere; }

.view h3 { font-size: 22px; }
.view > p { color: var(--soft); }
.fields { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font: 500 12px/1 var(--label, var(--mono)); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.field input { width: 100%; padding: 14px; }
.field input:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 0; }
.field input[readonly] { color: var(--soft); background: var(--ink-2); }
.field .hint { color: var(--mute); font-size: 13.5px; }

/* Password with a show/hide control inside the field. */
.pw { position: relative; display: flex; }
.pw input { padding-right: 78px; }
.pw button { position: absolute; right: 5px; top: 5px; bottom: 5px; min-width: 60px; padding: 0 10px; cursor: pointer; background: transparent; border: 1px solid transparent; border-radius: var(--radius, 2px); color: var(--mute); font: 600 13px/1 var(--body); }
.pw button:hover { color: var(--bone); border-color: var(--line); }
.pw button:focus-visible { outline-offset: 0; color: var(--bone); }

.fields .btn { width: 100%; padding: 16px 20px; font-size: 16px; }
.err { color: var(--danger); font-weight: 600; font-size: 14.5px; line-height: 1.45; padding: 10px 12px; border-left: 2px solid var(--danger); background: color-mix(in srgb, var(--danger) 9%, transparent); border-radius: var(--radius, 2px); }
.err a { color: inherit; text-underline-offset: 3px; }

.links { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; font-size: 15px; }
.links a { color: var(--mute); text-underline-offset: 4px; padding: 6px 0; }
.links a:hover { color: var(--bone); }
.links a.strong { color: var(--bone); font-weight: 600; }

/* "Check your email" and "This link no longer works". */
.note { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--ink-2); border: 1px solid var(--line); border-left: 2px solid var(--accent-line); border-radius: var(--radius, 2px); color: var(--soft); font-size: 15px; overflow-wrap: anywhere; }
.note b { color: var(--bone); font-weight: 600; }

@media (max-width: 600px) {
  .who { gap: 13px; padding-bottom: 18px; }
  .who img { width: 48px; height: 48px; }
  .links { flex-direction: column; align-items: flex-start; }
}

[tabindex="-1"]:focus { outline: none; }

/* Phones: links and the Show button are 44px tall, hints are 14px, and long emails wrap instead of running off. */
@media (max-width: 600px) {
  .links { gap: 0; }
  .links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
  .pw button { font-size: 14px; min-width: 64px; }
  .field .hint { font-size: 14px; }
  .field label { font-size: 12.5px; }
  .note, .who h2 { overflow-wrap: anywhere; }
}
