/*
 * 登录 / 注册 / 找回密码 / 重置密码 / WHOIS 页面（M6a.2：对齐旧 FOSSBilling hidns 主题的 hidns-auth-* 与 nl-* 样式）。
 * 只在这些页面里通过 <x-slot:head> 加载。颜色全部走 tokens.css 的变量；
 * 表单控件仍是 x-theme::field / input / select 组件，这里用 .hidns-auth-card 作用域覆盖成旧版外观，
 * 所以与用户中心共用的 profile-fields 不受影响。
 */

/* ===== 认证卡片 ===== */
.hidns-auth-wrap { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.hidns-auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 1rem; padding: 2.5rem 2rem; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); }
.hidns-auth-card.is-wide { max-width: 520px; }
.hidns-auth-title { margin: 0 0 2rem; font-size: 1.75rem; font-weight: 700; text-align: center; color: var(--text); }
.hidns-auth-wrap > .alert { width: 100%; max-width: 520px; }

.hidns-auth-card .stack { gap: 1.25rem; }
.hidns-auth-card .field { gap: 0.5rem; }
.hidns-auth-card .label { font-size: 0.875rem; font-weight: 500; color: var(--text-muted); }
.hidns-auth-card .input, .hidns-auth-card .select { padding: 0.65rem 1rem; font-size: 1rem; border-width: 1.5px; border-radius: 0.5rem; transition: border-color 0.2s; }
.hidns-auth-card .tos-block .check { font-size: 0.875rem; color: var(--text-muted); }
.hidns-auth-card .tos-block .check input { width: 16px; height: 16px; }
.hidns-auth-card .hint { font-size: 0.8rem; line-height: 1.5; }
.hidns-auth-card .btn-primary { width: 100%; margin-top: 0.5rem; padding: 0.75rem; font-size: 1rem; font-weight: 600; border: 0; border-radius: 0.5rem; transition: opacity 0.2s, transform 0.1s; }
.hidns-auth-card .btn-primary:hover { opacity: 0.9; background: var(--primary); }
.hidns-auth-card .btn-primary:active { transform: scale(0.98); }
.hidns-auth-card .btn[disabled] { opacity: 0.6; }

.hidns-form-notice { position: relative; margin: 0; font-size: 0.8rem; line-height: 1.5; color: var(--text-muted); }
.hidns-form-notice--warn { color: #e17055; }

.hidns-auth-footer { margin-top: 1.5rem; font-size: 0.9rem; text-align: center; color: var(--text-muted); }
.hidns-auth-footer a { margin-left: 0.25rem; font-weight: 600; color: inherit; text-decoration: none; }
.hidns-auth-footer a:hover { text-decoration: underline; }

/* ===== “？”气泡：纯 CSS，悬停 / 键盘聚焦 / 手机点按都会显示 ===== */

/* ===== WHOIS（旧版 nl-page / nl-card 外观） ===== */
.nl-page { width: 100%; padding: 2rem 0 4rem; }
.nl-container { width: 100%; max-width: 56rem; margin: 0 auto; padding: 0 1rem; box-sizing: border-box; }
@media (min-width: 640px) { .nl-container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .nl-container { padding: 0 2rem; } }
.hn-page-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1.5rem; margin-bottom: 2rem; }
.nl-page-title { margin: 0 0 0.5rem; font-size: 1.875rem; font-weight: 700; line-height: 1.25; color: var(--text); }
.nl-page-sub { margin: 0.5rem 0 0; font-size: 1.125rem; color: var(--text-muted); opacity: 0.7; }
.nl-card { width: 100%; min-width: 0; margin-bottom: 1rem; background: var(--surface-2); border-radius: 1rem; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05); overflow: hidden; overflow-wrap: anywhere; box-sizing: border-box; }
.nl-card-body { padding: 2rem; }
.nl-card-title { margin: 0 0 1rem; font-size: 1.5rem; font-weight: 700; line-height: 1.3; color: var(--text); }
.whois-search { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-start; }
.whois-search .input { flex: 1; min-width: 200px; padding: 0.65rem 1rem; font-size: 1rem; border-width: 1.5px; border-radius: 0.5rem; }
.whois-label { display: block; margin-bottom: 0.5rem; font-size: 0.875rem; font-weight: 500; color: var(--text-muted); }
.whois-btn { display: inline-flex; align-items: center; gap: 4px; padding: 0.65rem 1.25rem; font: inherit; font-size: 1rem; font-weight: 600; white-space: nowrap; color: var(--primary-text); background: var(--primary); border: 0; border-radius: 6px; cursor: pointer; transition: opacity 0.2s; }
.whois-btn:hover { opacity: 0.85; }
.whois-btn svg { width: 15px; height: 15px; }
.whois-error { margin-top: 0.75rem; font-size: 0.875rem; color: var(--danger); }
.whois-captcha { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.whois-grid { display: grid; grid-template-columns: 200px 1fr; font-size: 0.875rem; }
.whois-row { display: contents; }
.whois-row .wk { padding: 0.45rem 0; font-weight: 500; color: var(--text-muted); border-bottom: 1px solid var(--border); word-break: break-word; }
.whois-row .wv { padding: 0.45rem 0 0.45rem 1rem; font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.82rem; color: var(--text); border-bottom: 1px solid var(--border); word-break: break-word; }
.whois-row:last-child .wk, .whois-row:last-child .wv { border-bottom: 0; }
.whois-ns-item { padding: 0.3rem 0; font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.85rem; color: var(--text); border-bottom: 1px solid var(--border); }
.whois-ns-item:last-child { border-bottom: 0; }
.redacted-tag { font-family: inherit; font-style: italic; color: var(--text-faint); }
.whois-raw { margin: 0; font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.82rem; white-space: pre-wrap; word-break: break-all; color: var(--text); }
.whois-note { margin: 0.5rem 0 0; font-size: 0.78rem; line-height: 1.6; color: var(--text-faint); }
.whois-note a { color: var(--primary); }
.whois-empty { padding: 2.5rem 2rem; text-align: center; }
.whois-empty svg { width: 40px; height: 40px; margin-bottom: 1rem; color: var(--text-faint); }
.whois-empty-title { margin: 0 0 0.5rem; font-size: 1rem; font-weight: 600; color: var(--text); }
.whois-empty-msg { margin: 0; font-size: 0.875rem; color: var(--text-muted); }
@media (max-width: 480px) {
  .whois-grid { grid-template-columns: 1fr; }
  .whois-row .wv { padding-left: 0; }
  .nl-card-body { padding: 1.25rem; }
}

/* 后台登录相关页面（M9）：两个按钮并排各占一半（验证 / 返回登录） */
.hidns-auth-actions { display: flex; gap: 0.75rem; margin-top: 0.5rem; }
.hidns-auth-actions .btn { flex: 1 1 0; width: auto; margin-top: 0; justify-content: center; text-align: center; padding: 0.75rem; font-size: 1rem; font-weight: 600; border: 0; border-radius: 0.5rem; box-sizing: border-box; }
.hidns-auth-card .hidns-auth-actions .btn-primary { width: auto; margin-top: 0; }
.hidns-auth-wrap.is-compact { min-height: 0; align-items: flex-start; padding: 1.5rem 1rem; }

/* 注册关闭：锁图标 + 一行文字（与无权限用户打开邀请码页的样式一致） */
.hidns-auth-closed { display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--text-muted); }
.hidns-auth-closed svg { width: 40px; height: 40px; margin-bottom: 1rem; opacity: 0.35; }
.hidns-auth-closed p { margin: 0; font-size: 0.95rem; }
.hidns-auth-closed a { color: var(--primary); }
