/* Authentication screens built on the shared DNS design tokens. */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 24px;
}

.auth-shell {
  width: min(100%, 480px);
  display: grid;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(19,26,36,.04), 0 24px 48px -24px rgba(19,26,36,.16);
}

/* Khoi lien he = "chan" cua the dang nhap: nen xam nhat, ngan bang 1 duong ke. */
.auth-support {
  order: 2;
  display: grid;
  gap: 10px;
  padding: 20px 40px 24px;
  color: var(--ink-2);
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}

.auth-support h1 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.auth-support-card { padding: 0; border: 0; background: transparent; }
.auth-support-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.auth-support-list li { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 4px 12px; font-size: 13px; line-height: 1.45; }
.auth-support-list strong { font-weight: 400; color: var(--ink-3); }
.auth-support-list span { color: var(--ink-2); }
.auth-support-list .support-detail { display: flex; flex-wrap: wrap; gap: 2px 8px; }
.auth-support-list .support-detail b { color: var(--ink); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.auth-support-list .support-detail span { color: var(--ink-3); }

.auth-panel { position: relative; order: 1; display: grid; align-content: center; padding: 36px 40px 28px; }
.auth-brand { justify-self: start; display: flex; margin: 0 0 28px; }
.auth-brand img { display: block; width: 148px; height: auto; }
.auth-heading { margin: 0 0 20px; font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.auth-heading:has(+ .auth-intro) { margin-bottom: 6px; }
.auth-intro { max-width: 440px; margin: 0 0 22px; color: var(--ink-3); font-size: 14px; line-height: 1.6; }
.auth-form { display: grid; gap: 12px; }
.auth-field { position: relative; }
.auth-field .input { height: 46px; padding-left: 42px; border-radius: 9px; font-size: 14.5px; }
.auth-field svg { position: absolute; top: 13px; left: 14px; width: 19px; height: 19px; color: var(--ink-3); pointer-events: none; }
.auth-field:focus-within svg { color: var(--brand); }
.auth-turnstile { min-height: 65px; overflow: hidden; }
.auth-turnstile .cf-turnstile > div { margin: 0; }
.auth-submit { width: 100%; height: 46px; border-radius: 9px; font-size: 14.5px; font-weight: 600; margin-top: 4px; }
.auth-back { margin-top: 4px; text-align: left; }
.auth-back a { font-weight: 500; text-decoration: none; }
.auth-back a:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .auth-page { display: block; padding: 16px; }
  .auth-shell { min-height: auto; }
  .auth-panel { order: 1; }
  .auth-support { order: 2; }
  .auth-panel { padding: 32px 24px 24px; }
  .auth-support { padding: 18px 24px 22px; }
  .auth-support-list li { grid-template-columns: 1fr; gap: 0; }
  .auth-field .input { font-size: 16px; }
}

@media (max-width: 440px) {
  .auth-page { padding: 0; }
  .auth-shell { min-height: 100vh; min-height: 100dvh; grid-template-rows: 1fr auto; border: 0; border-radius: 0; box-shadow: none; }
  .auth-panel { align-content: start; padding-top: 28px; }
}

/* Quy tac mat khau hien ngay duoi tieu de form. */
.auth-policy { margin: 0 0 16px; color: var(--ink-3); font-size: 13px; line-height: 1.5; }
/* Mat khau chua dat quy tac: to do CHINH dong huong dan (khong lap lai thanh 1 thong bao loi thu 2). */
.auth-policy.is-invalid { color: var(--err); font-weight: 500; }

/* Khung thong bao dung chung (xem webroot/js/auth-ui.js). */
.auth-alert { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; padding: 11px 14px; border: 1px solid; border-radius: 10px; font-size: 13.5px; line-height: 1.5; }
.auth-alert[hidden] { display: none; }
.auth-alert svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.auth-alert.is-err { color: var(--err); background: var(--err-bg); border-color: color-mix(in srgb, var(--err) 30%, transparent); }
.auth-alert.is-ok { color: var(--ok); background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.auth-alert.is-info { color: var(--brand-ink); background: var(--brand-bg); border-color: color-mix(in srgb, var(--brand) 25%, transparent); }
.auth-alert .message { color: var(--ink); }
.auth-alert.is-err .message { color: inherit; }

/* Trang loi 4xx/5xx (templates/layout/error.php). */
.error-code { margin: 0 0 8px; font-size: 64px; font-weight: 800; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--brand); opacity: .9; }
.error-url { margin: 0 0 22px; padding: 9px 12px; overflow-wrap: anywhere; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.error-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.error-actions .btn { height: 42px; padding: 0 18px; }
