/* RecoHR sign-in pages (E46.3, reco-devops#478; DESIGN.md, prototype reco-demo/recohr/dang-nhap.html).
   Layout of templates/account/auth_base.html: >=1024 px photo + message on the left, form on the
   right; <1024 px photo on top and the form card floating over it. Components (.field, .inp, .btn,
   .check…) come from ui.css; this file adds the layout, notices, OTP tabs and the eye button. */

.auth {
  min-height: 100vh; display: grid; grid-template-rows: auto 1fr;
  background: var(--paper); color: var(--ink); font-family: var(--font-body);
}
.auth:focus { outline: none; }
@media (min-width: 1024px) { .auth { grid-template-columns: 1.1fr 1fr; grid-template-rows: none; } }

/* ---------- Photo + message ---------- */
.auth-art {
  position: relative; display: flex; flex-direction: column; gap: 18px; color: var(--white);
  padding: 20px var(--gutter) 56px;
  background: linear-gradient(160deg, rgb(5 31 53 / 0.94), rgb(9 49 82 / 0.78)), url("../images/auth/reco-team.647792dc2355.jpg") center / cover no-repeat;
}
@media (min-width: 1024px) { .auth-art { padding: 44px 56px; justify-content: space-between; } }
.auth-brand { display: inline-flex; align-self: flex-start; text-decoration: none; }
/* Stacked logo (white wordmark) on the navy art pane: a single screen, not a bar. */
.auth-brand img { display: block; height: 56px; width: auto; }
@media (min-width: 1024px) { .auth-brand img { height: 96px; } }
.auth-message { display: none; gap: 10px; max-width: 34rem; }
@media (min-width: 1024px) { .auth-message { display: grid; } }  /* phones show the logo only, so the form fits the first screen (reco-devops#1791) */
.auth .auth-message .eyebrow { color: var(--accent-light); }
.auth-headline {
  margin: 0; max-width: 16ch; font-family: var(--font-display); font-weight: 700; color: var(--white);
  font-size: clamp(1.7rem, 3.6vw, 2.7rem); line-height: 1.1; letter-spacing: -0.042em;
}
.auth-message p:not(.auth-headline) { margin: 0; color: rgb(255 255 255 / 0.84); max-width: 46ch; }
.auth-points { display: none; list-style: none; margin: 0; padding: 0; gap: 12px; }
.auth-points li { display: flex; align-items: center; gap: 12px; color: rgb(255 255 255 / 0.9); font-size: 0.95rem; }
.auth-points svg.i { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: rgb(255 255 255 / 0.12); color: var(--accent-light); }
@media (min-width: 1024px) { .auth-points { display: grid; } }

/* ---------- Form pane + card ---------- */
.auth-pane { display: flex; flex-direction: column; align-items: center; padding: 0 var(--gutter) 28px; }
@media (min-width: 1024px) { .auth-pane { justify-content: center; padding: 40px 32px; } }
.auth-card {
  position: relative; width: min(420px, 100%); margin-top: -40px; display: grid; gap: 16px;
  padding: 24px 22px; border-radius: var(--radius-xl); background: var(--white); box-shadow: var(--shadow-float);
}
@media (min-width: 1024px) { .auth-card { margin-top: 0; padding: 34px 32px; background: transparent; box-shadow: none; } }
.auth-head h1 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); }
.auth-head p { margin: 6px 0 0; color: var(--muted); }
.auth-form { display: grid; gap: 16px; }
.auth .field-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auth .field label { font-size: 0.8rem; font-weight: 700; color: var(--navy); }
.auth .link { color: var(--orange-text); }
.auth-micro { margin: 0; font-size: 0.8rem; color: var(--muted); }
.auth-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.auth-links a { display: inline-flex; align-items: center; gap: 6px; min-height: var(--touch-min); font-size: 0.86rem; font-weight: 700; color: var(--navy-2); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-foot form { display: contents; }
.auth-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 18px; width: min(420px, 100%); margin-top: 14px; }
.auth-foot a, .auth-foot button {
  display: inline-flex; align-items: center; min-height: var(--touch-min); padding: 0 4px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 0.82rem; color: var(--muted); text-decoration: none;
}
.auth-foot a:hover, .auth-foot button:hover { color: var(--navy); text-decoration: underline; }
.auth a:focus-visible, .auth button:focus-visible { outline: 2px solid var(--navy-2); outline-offset: 2px; }

/* ---------- Notices (messages, form errors) ---------- */
.auth-messages { display: grid; gap: 8px; }
.auth-notice {
  display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 11px 14px; border-radius: var(--radius-md);
  font-size: 0.86rem; line-height: 1.45; background: var(--soft); color: var(--ink);
}
.auth-notice > svg.i { flex: none; margin-top: 1px; }
.auth-notice p { margin: 0; }
.auth-notice ul { margin: 6px 0 0; padding-left: 18px; }
.auth-notice.is-error { background: var(--danger-soft); color: var(--danger); }
.auth-notice.is-success { background: var(--verified-soft); color: var(--verified-text); }
.auth-notice.is-warning { background: var(--notice); color: var(--orange-text); }
.auth-notice.is-info { background: var(--navy-soft); color: var(--navy-2); }
.auth .field-error { font-size: 0.78rem; color: var(--danger); }
.auth .inp.is-invalid { border-color: var(--danger); }

/* ---------- Password field: one eye button per field (reco-devops#467) ---------- */
.password-input-wrapper { position: relative; }
.password-toggle-btn {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  width: var(--touch-min); height: var(--touch-min); display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: var(--radius-md);
}
.password-toggle-btn:hover, .password-toggle-btn[aria-pressed="true"] { color: var(--navy); }

/* ---------- OTP sign-in (shown only while OTP is on) ---------- */
.auth-tabs { display: flex; gap: 4px; padding: 4px; border-radius: var(--radius-md); background: var(--soft); }
.auth-tab {
  flex: 1; min-height: 40px; border: 0; border-radius: var(--radius-sm); background: transparent; cursor: pointer;
  font: inherit; font-size: 0.86rem; font-weight: 600; color: var(--muted);
}
.auth-tab--active { background: var(--white); color: var(--navy); box-shadow: 0 2px 8px rgb(8 39 67 / 0.1); }
.auth-otp-send, .auth-resend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 0.84rem; color: var(--muted); }
.auth .input-group { display: flex; gap: 8px; }
.auth .input-group .form-select { width: auto; min-height: 46px; border-radius: var(--radius-md); border-color: var(--line); }
.auth .input-group .form-control { min-height: 46px; border-radius: var(--radius-md); border-color: var(--line); }

/* ---------- Social sign-in ---------- */
.auth-social { display: grid; gap: 10px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 0.78rem; color: var(--muted); }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- django-allauth pages rendered with allauth's own elements ---------- */
.auth-generic h1 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); }
.auth-generic form { display: grid; gap: 14px; }
.auth-generic form p { margin: 0; display: grid; gap: 6px; }
.auth-generic label { font-size: 0.8rem; font-weight: 700; color: var(--navy); }
.auth-generic input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--white); color: var(--ink); font: inherit; font-size: 0.95rem;
}
.auth-generic input:focus { outline: none; border-color: var(--navy); box-shadow: var(--focus-ring); }
.auth-generic button[type="submit"], .auth-generic button:not([type]) {
  min-height: var(--touch-min); padding: 10px 18px; border: 1px solid var(--orange-button); border-radius: var(--radius-md);
  background: var(--orange-button); color: var(--white); font: inherit; font-weight: 700; cursor: pointer;
}
.auth-generic button[type="submit"]:hover, .auth-generic button:not([type]):hover { background: var(--orange-button-hover); border-color: var(--orange-button-hover); }
.auth-generic ul.errorlist { margin: 0; padding: 0; list-style: none; color: var(--danger); font-size: 0.82rem; }
.auth-generic a { color: var(--navy-2); }
