/* =====================================================================
   NestDaddy account pages (sign in, sign up, verify, password reset), laid out like
   Google's account sign-in (owner 2026-11-08: "polish bg big tech mcm google.. ikut je die").
   Used by templates/_auth_base.html. NestDaddy keeps its own logo and name; this copies
   layout, type and controls only.
   ===================================================================== */
:root {
  --a-page: #f6f7f9; --a-card: #ffffff; --a-text: #15181e; --a-text-2: #4a515c; --a-outline: #9aa1ab;
  --a-blue: #15181e; --a-blue-hover: #000000; --a-blue-tint: #f6f7f9; --a-error: #c8102e; --a-ok: #0a7c4e;  /* ink + the /markets green, as on the API pages */
  --a-sans: Helvetica, Arial, sans-serif; --a-body: Helvetica, Arial, sans-serif;  /* owner rule: system face, no web fonts */
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body.nd-auth {
  min-height: 100vh; background: var(--a-page); color: var(--a-text);
  font-family: var(--a-body); font-size: 14px; line-height: 20px; -webkit-font-smoothing: antialiased;
}
.auth-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; }

/* the card: heading on the left, form on the right (one column on small screens) */
.auth-card {
  width: 100%; max-width: 1040px; background: var(--a-card); border: 1px solid #d2d7de; border-radius: 2px; padding: 36px;
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; min-height: 384px;
}
.auth-logo { display: inline-block; margin-bottom: 20px; }
.auth-logo img { height: 28px; width: auto; display: block; }
.auth-title { font-family: var(--a-sans); font-size: 34px; line-height: 42px; font-weight: 700; margin: 0 0 16px; color: var(--a-text); }
.auth-sub { font-size: 16px; line-height: 24px; margin: 0; color: var(--a-text); }
.auth-body { padding-top: 24px; min-width: 0; }

/* the account chip used on code pages */
.auth-chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin-top: 16px;
  border: 1px solid var(--a-outline); border-radius: 2px; padding: 3px 12px 3px 4px;
  font-family: var(--a-sans); font-size: 14px; font-weight: 700; color: var(--a-text);
}
.auth-chip svg { flex: none; }
.auth-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* messages: plain text with an icon, no tinted boxes */
.auth-alert { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 20px; font-size: 14px; line-height: 20px; color: var(--a-text-2); }
.auth-alert svg { flex: none; margin-top: 1px; fill: currentColor; }
.auth-alert.is-error { color: var(--a-error); }
.auth-alert.is-ok { color: var(--a-ok); }

/* outlined text fields with a floating label */
.field { position: relative; margin: 0 0 24px; }
.field input {
  display: block; width: 100%; height: 56px; padding: 0 15px; margin: 0;
  font-family: var(--a-body); font-size: 16px; color: var(--a-text); background: var(--a-card);
  border: 1px solid var(--a-outline); border-radius: 2px; outline: none; -webkit-appearance: none; appearance: none;
}
.field input:hover { border-color: var(--a-text); }
.field input:focus { border-color: var(--a-blue); box-shadow: inset 0 0 0 1px var(--a-blue); }
.field label {
  position: absolute; left: 11px; top: 28px; transform: translateY(-50%); padding: 0 4px;
  background: var(--a-card); color: var(--a-text-2); font-size: 16px; line-height: 20px;
  pointer-events: none; transition: top .15s, font-size .15s, color .15s; max-width: calc(100% - 24px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label, .field.is-float label { top: 0; font-size: 12px; line-height: 16px; }
.field input:focus + label { color: var(--a-blue); }
.field input::placeholder { color: transparent; }
.field input[type="date"] { padding-right: 12px; }
.field-hint { margin: 4px 16px 0; font-size: 12px; line-height: 16px; color: var(--a-text-2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.field-otp input { font-size: 22px; letter-spacing: .35em; font-variant-numeric: tabular-nums; }

/* checkboxes and small links */
.auth-check { display: flex; align-items: center; gap: 12px; margin: -8px 0 16px; font-size: 14px; color: var(--a-text); cursor: pointer; width: fit-content; }
.auth-check input { width: 18px; height: 18px; margin: 0 3px; accent-color: var(--a-blue); cursor: pointer; }
.auth-link, .auth-body a:not([class]) { color: var(--a-ok); font-family: var(--a-sans); font-weight: 700; text-decoration: none; }
.auth-link:hover, .auth-body a:not([class]):hover { text-decoration: underline; }
.auth-note { font-size: 14px; color: var(--a-text-2); margin: 0 0 16px; }

/* buttons: Google's filled pill and text button */
.auth-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 32px; flex-wrap: wrap; }
.auth-actions .btn-fill { margin-left: auto; }
.btn-fill, .btn-text, .btn-google {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 24px;
  border-radius: 2px; font-family: var(--a-sans); font-size: 14px; font-weight: 700; letter-spacing: .01em;
  cursor: pointer; text-decoration: none; border: 0; white-space: nowrap;
}
.btn-fill { background: var(--a-blue); color: #fff; }
.btn-fill:hover { background: var(--a-blue-hover); box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 1px 3px 1px rgba(0,0,0,.15); }
.btn-fill:disabled { background: rgba(31,31,31,.12); color: rgba(31,31,31,.38); box-shadow: none; cursor: default; }
.btn-text { background: none; color: var(--a-blue); padding: 0 12px; }
.btn-text:hover { background: var(--a-blue-tint); text-decoration: none; }
.btn-text:disabled { color: rgba(31,31,31,.38); background: none; cursor: default; }
.auth-actions .btn-text { margin-left: -12px; }
.btn-google { width: 100%; background: #fff; color: var(--a-text); border: 1px solid var(--a-outline); font-family: var(--a-sans); }
.btn-google:hover { background: #f8fafd; text-decoration: none; }
.auth-or { display: flex; align-items: center; gap: 16px; margin: 20px 0; color: var(--a-text-2); font-size: 14px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: #c4c7c5; }

/* footer under the card */
.auth-foot {
  width: 100%; max-width: 1040px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 12px 0; font-size: 12px; line-height: 16px; color: var(--a-text);
}
.auth-foot nav { display: flex; gap: 4px; }
.auth-foot a { color: var(--a-text); text-decoration: none; padding: 8px 12px; border-radius: 4px; }
.auth-foot a:hover { background: rgba(31,31,31,.08); }

@media (max-width: 839px) {
  .auth-card { grid-template-columns: 1fr; max-width: 448px; min-height: 0; }
  .auth-title { font-size: 32px; line-height: 40px; }
  .auth-foot { max-width: 448px; }
}
@media (max-width: 599px) {
  body.nd-auth { background: var(--a-card); }
  .auth-page { justify-content: flex-start; padding: 0; }
  .auth-card { border-radius: 0; padding: 24px; max-width: none; }
  .auth-title { font-size: 28px; line-height: 36px; margin-bottom: 12px; }
  .auth-foot { max-width: none; padding: 16px 12px 24px; flex-wrap: wrap; }
  .field-row { grid-template-columns: 1fr; }
}
