/* =====================================================
   PCCCTrace Web DN — CANONICAL PRE-AUTH LAYOUT
   Dùng chung 6 màn nhóm 1 · Auth & Onboarding (DN-001..DN-006).
   Nạp SAU tokens.css và TRƯỚC <style> của từng trang, nên trang
   vẫn đè được khi thật sự cần.

   Bề rộng thẻ — chỉ hai mức, không tự thêm mức thứ ba:
     .auth-card        440px  form ngắn      (đăng nhập, quên/đặt mật khẩu)
     .auth-card.wide   560px  form dài hoặc màn trạng thái
                              (đăng ký, chờ duyệt KYC, chấp nhận lời mời)
   ===================================================== */


/* ── Khung trang ── */
.auth-wrap {
    min-height: calc(100vh - var(--topbar-h));
    display: flex; align-items: center; justify-content: center;
    padding: var(--s-xl) var(--s-md);
    background: var(--neutral);
  }
.auth-card {
    width: 100%; max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: var(--s-xl);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }
.auth-card h1 { font-size: 22px; margin: 0 0 4px; }
.auth-card .lead { color: var(--text-secondary); font-size: 14px; line-height: 1.55; margin: 0 0 var(--s-lg); }
.key-ico {
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-soft); font-size: 22px;
    margin-bottom: var(--s-md);
  }

/* ── Trường nhập ── */
.form-group { margin-bottom: var(--s-md); }

/* ── Lỗi ── */
.err-banner {
    display: none; align-items: flex-start; gap: 10px;
    background: var(--error-soft); border: 1px solid var(--error-border); color: var(--error-strong);
    border-radius: var(--r-md); padding: 12px 16px;
    font-size: 13px; line-height: 1.5; margin-bottom: var(--s-md);
  }
body.st-error .err-banner { display: flex; }
body.st-error .input-err { border-color: var(--error); }
.field-msg-err { display: none; margin-top: 6px; font-size: 12.5px; font-weight: 500; color: var(--error); }
body.st-error .field-msg-err { display: block; }

/* ── Ghi chú và trạng thái xong ── */
.send-note {
    display: flex; gap: 8px; align-items: flex-start;
    margin-top: var(--s-md);
    padding: 10px 12px; background: var(--surface-muted);
    border-radius: var(--r-md); font-size: 12.5px;
    color: var(--text-secondary); line-height: 1.55;
  }
.send-note .ico { flex-shrink: 0; }
.success-state { display: none; text-align: center; }
body.st-success .success-state { display: block; }
.success-state .ico { font-size: 48px; margin-bottom: var(--s-md); }
.success-state h1 { font-size: 20px; margin-bottom: 8px; }
.resend-line { font-size: 13px; color: var(--text-muted); margin: 0 0 var(--s-md); }
.resend-line b { color: var(--text-secondary); }

/* ── Chân thẻ ── */
.auth-foot { text-align: center; font-size: 13.5px; color: var(--text-secondary); }
.auth-foot a { color: var(--primary-action); font-weight: 600; text-decoration: none; }

/* ── Skeleton loading ── */
.skeleton-card { display: none; }
body.st-loading .auth-card:not(.skeleton-card) { display: none; }
body.st-loading .skeleton-card { display: block; }
.sk {
    border-radius: 6px;
    background: linear-gradient(90deg, #ece9e6 25%, #f8f6f4 50%, #ece9e6 75%);
    background-size: 400% 100%; animation: sk-shimmer 1.3s ease infinite;
  }
.sk-field { margin-bottom: 18px; }
.sk-field .sk-label { width: 34%; height: 11px; margin-bottom: 8px; }
.sk-field .sk-input { height: 44px; }
@keyframes sk-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Biến thể bề rộng */
.auth-card.wide { max-width: 560px; }

/* Dải phân cách "hoặc" ở chân thẻ */
.auth-sep { display: flex; align-items: center; gap: 12px; margin: var(--s-lg) 0 var(--s-md);
  color: var(--text-muted); font-size: 12px; }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ── Danh sách quy tắc mật khẩu ── */.pw-rules { list-style:none; margin:8px 0 0; padding:0; font-size:12.5px; }.pw-rules li { display:flex; align-items:center; gap:7px; color:var(--text-muted); margin-bottom:4px; }.pw-rules li.ok { color:var(--success); }.pw-rules li .tick { width:14px; text-align:center; font-weight:700; }

/* ── Đầu thẻ căn giữa (icon + tiêu đề + mô tả) ── */
.auth-head { text-align: center; margin-bottom: var(--s-lg); }
.auth-head .key-ico { margin-left: auto; margin-right: auto; }
.auth-head h1 { margin: 0 0 4px; }
.auth-head p { color: var(--text-secondary); font-size: 14px; margin: 0; }

/* ── Hàng nút hành động cuối thẻ ── */
.auth-actions { display: flex; gap: var(--s-md); margin-top: var(--s-lg); }
.auth-actions .btn-secondary.danger { color: var(--error); border-color: var(--error); }

/* ── Ô chỉ đọc (email đăng nhập cố định) ── */
.input[readonly] { background: var(--surface-muted); color: var(--text-secondary); cursor: default; }
