/*
 * auth.css -- shared styling for the customer-facing auth screens: login.html, auth/link.html,
 * auth/checkout-return.html and account.html. Matches the approved mockup (auth-mock/index.html).
 *
 * No webfont link. styles-ato.css already established the reason: this domain's CSP is
 * default-src 'self' with no font CDN allowed, and it's pen-tested -- loosening it for
 * typography is not this branch's call to make. Inter is named first in the stack for anyone
 * who has it installed locally; everyone else gets the system font, which is the same fallback
 * order the rest of the app already uses.
 */

:root {
  --bg: #0f1417;
  --panel: #1a242a;
  --line: #2b3841;
  --ink: #f4f7f8;
  --soft: #aab6c8;
  --dim: #7c8aa3;
  --accent: #ff5a2c;
  --accent2: #ff7d54;
  --gold: #ffb43d;
  --good: #5fd49a;
  --bad: #ef9a9a;
}

.auth-body {
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  padding: 24px 16px 48px;
  -webkit-font-smoothing: antialiased;
}

.auth-screen {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.auth-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 22px;
}

.auth-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.auth-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  color: #0c1114;
}

.auth-word {
  font-weight: 700;
  font-size: 15px;
}

.auth-eyebrow {
  display: block;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.auth-card h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 6px 0 8px;
  line-height: 1.15;
}

.auth-sub {
  color: var(--soft);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-btn + .auth-btn {
  margin-top: 10px;
}

.auth-btn-google {
  background: #fff;
  color: #1f1f1f;
}

.auth-btn-primary {
  background: var(--accent);
  color: #0c1114;
}

.auth-btn-primary:hover:not(:disabled) {
  background: var(--accent2);
}

.auth-btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.auth-btn-danger {
  background: transparent;
  color: var(--bad);
  border: 1px solid var(--line);
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--dim);
  font-size: 13px;
  margin: 18px 0;
}

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

.auth-field {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--soft);
  margin-bottom: 6px;
}

.auth-input {
  /* Without border-box, width:100% plus the 14px padding and 1px border pushed the field ~30px
     past the card's inner edge at 390px (seen in the login screenshot; MobileCheck can't catch it
     because the document itself doesn't scroll). */
  box-sizing: border-box;
  width: 100%;
  min-height: 50px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #121a1f;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 0 14px;
  margin-bottom: 12px;
}

.auth-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.auth-fine {
  color: var(--dim);
  font-size: 13px;
  text-align: center;
  margin-top: 16px;
  line-height: 1.5;
}

.auth-fine a,
.auth-link {
  color: var(--accent2);
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.auth-error {
  color: var(--bad);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.auth-note {
  color: var(--soft);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.auth-inbox-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255, 90, 44, 0.12);
  display: grid;
  place-items: center;
  font-size: 28px;
  margin-bottom: 16px;
}

.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.auth-row:first-of-type {
  border-top: 0;
}

.auth-row .k {
  color: var(--soft);
  min-width: 0;
  /* The label stays on one line ("Email" broke as "Em / ail" at 390px); only the value wraps. */
  white-space: nowrap;
}

.auth-row .v {
  font-weight: 600;
  text-align: right;
  min-width: 0;
  /* A long email pushed the page 51px past a 390px phone (live, 2026-09-16). Let it break. */
  overflow-wrap: anywhere;
}

.auth-pill {
  display: inline-block;
  background: rgba(38, 167, 105, 0.15);
  color: var(--good);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}

.auth-pill-warn {
  background: rgba(255, 180, 61, 0.15);
  color: var(--gold);
}

.auth-section {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 22px 0 4px;
}

.auth-section:first-of-type {
  margin-top: 0;
}

.auth-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  animation: auth-spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

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

.auth-hidden {
  display: none !important;
}

.auth-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 400px) {
  .auth-card {
    padding: 22px 18px;
  }

  .auth-card h1 {
    font-size: 23px;
  }
}

/* "Your tools" on the account page (2026-09-15). */
.tool-group {
  font-size: 13px;
  color: var(--dim);
  margin: 12px 0 8px;
}
.tool-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}
.tool-row:hover {
  border-color: var(--accent);
}
.tool-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.tool-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tool-name {
  font-weight: 700;
  font-size: 15px;
}
.tool-desc {
  color: var(--soft);
  font-size: 13px;
  line-height: 1.4;
}
.tool-go {
  flex: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent2);
  white-space: nowrap;
}
/* A locked row must never read as an open one (Drew, 2026-09-16: paid tools looked available on a free
   account). Dimmed, flat, no hover lift, and the price sits on the row so the reason is obvious. */
.tool-row.locked {
  border-style: dashed;
  border-color: var(--line);
  background: transparent;
  opacity: 0.72;
}
.tool-row.locked:hover {
  border-color: var(--gold);
  opacity: 1;
}
.tool-row.locked .tool-name {
  color: var(--soft);
  font-weight: 600;
}
.tool-row.locked .tool-desc {
  color: var(--soft);
}
.tool-locked-tag {
  color: var(--gold);
  font-weight: 700;
  white-space: nowrap;
}

