/* Tài khoản (#/account) và chip tài khoản ở cuối menu bên. Màu chỉ lấy từ biến của bảng màu. */

/* ---------- chip ở menu bên (src/app/account-ui.js) ---------- */
.account-chip { margin-top: auto; margin-bottom: 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: .8rem; }
.account-chip[hidden] { display: none; }
.account-chip:not([hidden]) + .theme-chip { margin-top: 0; }
.account-chip a { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; color: var(--text); text-decoration: none; }
.account-chip a:hover span { text-decoration: underline; }
.account-chip .ac-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ac-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.ac-dot.busy { background: var(--warn); }
.ac-dot.bad { background: var(--bad); }

/* ---------- form ---------- */
.acc-grid { align-items: start; }
.acc-narrow { max-width: 520px; margin-inline: auto; }
.acc-form h2 { margin-top: 0; }
.acc-form .field { margin-top: 12px; }
.acc-form .field:first-of-type { margin-top: 0; }
.acc-pass { display: flex; gap: 6px; align-items: center; }
.acc-pass input { flex: 1; min-width: 0; }
.acc-pass .btn { flex: 0 0 auto; min-height: 40px; }
.acc-hint { display: block; margin-top: 6px; font-size: .82rem; }
.acc-err { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; font-size: .9rem; color: var(--text);
  background: color-mix(in srgb, var(--bad) 12%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 45%, transparent); }
.acc-err[hidden] { display: none; }
.acc-links { margin: 14px 0 0; font-size: .9rem; }
.acc-note { margin: 10px 0 0; font-size: .85rem; }
.acc-inline { gap: 8px; flex-wrap: nowrap; }
.acc-inline input { flex: 1; min-width: 0; }
.acc-check { display: flex; flex-wrap: nowrap; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.acc-check input { flex: 0 0 auto; margin-top: 3px; }

/* ---------- nội dung ---------- */
.acc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.acc-list li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.acc-list .ic { flex: 0 0 auto; margin-top: 3px; color: var(--accent-2); }
.acc-sync { font-weight: 600; }
.acc-ask { border-color: color-mix(in srgb, var(--warn) 55%, var(--border)); margin-bottom: 14px; }
.acc-ask h2 { margin-top: 0; }
.acc-danger summary { cursor: pointer; color: var(--bad); font-weight: 600; }
.acc-danger[open] summary { margin-bottom: 8px; }
.acc-del { border-color: var(--bad); color: var(--bad); }

/* ---------- Google / Facebook ----------
 * Ngoại lệ duy nhất của quy ước "màu lấy từ biến": nút đăng nhập phải đúng màu thương hiệu theo hướng dẫn của
 * Google (nền trắng, chữ xám đậm, logo 4 màu) và Meta (nền xanh #1877F2, chữ và logo trắng), ở mọi bảng màu. */
.acc-social[hidden] { display: none; }
.acc-sso { display: grid; gap: 10px; }
.acc-sso-btn { width: 100%; min-height: 46px; justify-content: center; gap: 10px; font-weight: 600; border-radius: 10px; box-shadow: none; }
.acc-sso-btn .sso-logo { width: 20px; height: 20px; flex: 0 0 auto; }
.acc-sso-btn.sso-google { background: #fff; color: #1f1f1f; border: 1px solid #747775; }
.acc-sso-btn.sso-google:hover { background: #f2f2f2; }
.acc-sso-btn.sso-facebook { background: #1877f2; color: #fff; border: 1px solid #1877f2; }
.acc-sso-btn.sso-facebook:hover { background: #166fe5; }
.acc-sso-btn:disabled { opacity: .5; cursor: not-allowed; }
.acc-sso-note { margin: 10px 0 0; font-size: .85rem; }
.acc-sso-note .btn { display: flex; width: fit-content; margin-top: 8px; }
.acc-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: var(--muted, var(--text)); font-size: .85rem; }
.acc-or::before, .acc-or::after { content: ''; flex: 1; border-top: 1px solid var(--border); }

/* danh sách cách đăng nhập (trang tài khoản) */
.acc-methods { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.acc-methods li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.acc-m-ic { flex: 0 0 auto; display: inline-flex; }
.acc-m-ic .sso-logo { width: 20px; height: 20px; }
.acc-m-ic .sso-logo path[fill="currentColor"] { color: #1877f2; }
.acc-m-name { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 600; }
.acc-m-name small { font-weight: 400; overflow-wrap: anywhere; }

/* đầu màn tài khoản: Tiểu Cường + bong bóng; mọi màn một cột hẹp */
.acc-host { display: flex; align-items: center; gap: 12px; max-width: 520px; margin: 4px auto 14px; }
.acc-host .tc { width: 76px; }
.acc-say { font-size: 1.05rem; text-align: left; align-items: flex-start; cursor: default; }
.acc-say small { font-size: .85rem; }
.acc-say .zh { font-family: var(--font-zh); color: var(--muted); }
.acc-form .acc-social { margin-bottom: 4px; }
/* ba lợi ích ngắn dưới form */
.acc-perks { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.acc-perks li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 10px 6px; border-radius: 12px; background: var(--surface-2); font-size: .8rem; font-weight: 600; color: var(--muted); }
.acc-perks .ic { width: 22px; height: 22px; color: var(--accent-2); }
