/* ============================================================
   Quooter — login.css
   The login screen is styled as the top of a trade quote docket:
   a paper card with a torn/perforated edge and a ticket number
   stamped in the corner, like the pad a tradesperson writes a
   job estimate on.
   ============================================================ */

.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);

  /* Faint graph-paper grid, evoking a measuring/estimating surface. */
  background-image:
    linear-gradient(var(--colour-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--colour-line) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center;
  background-color: var(--colour-paper);
  background-blend-mode: overlay;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.wordmark__name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--colour-ink);
}

.wordmark__tagline {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--colour-steel);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- The docket card itself --- */

.docket {
  position: relative;
  width: 100%;
  max-width: 400px;
  background-color: var(--colour-paper-raised);
  border: 1px solid var(--colour-line);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 24px -12px rgba(31, 36, 34, 0.25);
  padding: var(--space-7) var(--space-6) var(--space-6);
}

/* Perforated tear-off edge along the top of the card. */
.docket::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 14px;
  background-image: radial-gradient(
    circle at center,
    var(--colour-paper) 0,
    var(--colour-paper) 6px,
    transparent 6.5px
  );
  background-size: 20px 20px;
  background-position: top center;
  background-repeat: repeat-x;
}

/* Ticket number stub — rotated slightly, like a stapled tag. */
.docket__ticket {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  transform: rotate(3deg);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--colour-steel);
  border: 1px dashed var(--colour-line);
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2);
  background-color: var(--colour-paper);
}

.docket__heading {
  font-size: 1.35rem;
  margin-bottom: var(--space-1);
}

.docket__subheading {
  font-size: 0.9rem;
  color: var(--colour-steel);
  margin-bottom: var(--space-6);
}

/* --- Form --- */

.field {
  margin-bottom: var(--space-5);
}

.field__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--colour-steel);
  margin-bottom: var(--space-2);
}

/* Underlined field, like writing a line on a paper docket rather
   than filling a boxed input — keeps the paper metaphor consistent. */
.field__input {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--colour-line);
  background: transparent;
  padding: var(--space-2) var(--space-1);
  font-size: 1rem;
  transition: border-color 0.15s ease;
}

.field__input::placeholder {
  color: var(--colour-steel-light);
}

.field__input:focus-visible {
  border-bottom-color: var(--colour-signal);
  box-shadow: none; /* underline itself is the focus signal here */
}

.field__error {
  display: block;
  min-height: 1.2em;
  font-size: 0.8rem;
  color: var(--colour-error);
  margin-top: var(--space-2);
}

/* --- "Stay logged in" checkbox --- */

.checkbox-field {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  font-size: 0.85rem;
  color: var(--colour-steel);
  cursor: pointer;
}

.checkbox-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--colour-signal);
  cursor: pointer;
}

/* --- Buttons --- */

/* .btn / .btn--primary base rules moved to base.css — see the note
   there. This file keeps only what's genuinely login-specific. */

.btn--google {
  background-color: transparent;
  border: 1px solid var(--colour-line);
  color: var(--colour-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-transform: none;
  letter-spacing: normal;
  font-family: var(--font-body);
  font-weight: 500;
}

.btn--google:hover {
  border-color: var(--colour-steel);
}

/* --- Divider between the two sign-in methods --- */

.divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0;
  color: var(--colour-steel-light);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

/* --- Status / confirmation message (shown after a magic link is sent) --- */

.status-message {
  font-size: 0.9rem;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background-color: var(--colour-success-bg);
  color: var(--colour-success);
  border: 1px solid var(--colour-success-border);
}

.status-message--error {
  background-color: var(--colour-error-bg);
  color: var(--colour-error);
  border-color: var(--colour-error-border);
}

.status-message[hidden],
.field__error:empty {
  display: none;
}

.footnote {
  margin-top: var(--space-6);
  text-align: center;
  font-size: 0.75rem;
  color: var(--colour-steel-light);
}
