/* =====================================================================
   account.css — Module Account Management. Chỉ dùng CSS token sẵn có
   (style.css :root). KHÔNG tự chế màu/spacing mới.
   ===================================================================== */

/* ---------- Cổng đăng nhập (full-screen + video nền) ---------- */
.auth-gate { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; overflow: hidden;
  transition: opacity .5s ease, transform .55s ease, filter .5s ease; }
.auth-gate.hidden { display: none; }
/* chuyển cảnh khi login thành công: màn login mờ + zoom nhẹ + blur rồi biến mất */
.auth-gate.leaving { opacity: 0; transform: scale(1.06); filter: blur(5px); pointer-events: none; }
/* dashboard hiện lên: fade + nhô nhẹ */
@keyframes appEnter { from { opacity: 0; transform: translateY(10px) scale(.992); } to { opacity: 1; transform: none; } }
.app-enter { animation: appEnter .55s cubic-bezier(.2,.7,.2,1) both; }
.auth-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
/* background để SÁNG mặc định — không phủ tối (chữ trắng đã có text-shadow để đọc được) */
.auth-scrim { position: absolute; inset: 0; z-index: 1; background: transparent; }
.auth-center { position: relative; z-index: 2; width: 380px; max-width: 90vw;
  display: flex; flex-direction: column; align-items: center; padding: var(--sp-6); }

.auth-logo { width: 156px; height: 123px; background-color: #fff;
  -webkit-mask: url("assets/logo_ikame_256.png") no-repeat center / contain;
  mask: url("assets/logo_ikame_256.png") no-repeat center / contain;
  filter: drop-shadow(0 0 16px rgba(255,255,255,.5)); }
.auth-title { color: #fff; font-size: 26px; font-weight: var(--fw-black); letter-spacing: -.02em;
  margin: var(--sp-2) 0 var(--sp-6); text-align: center; text-shadow: 0 2px 16px rgba(0,0,0,.3); }

.auth-form { width: 100%; display: flex; flex-direction: column; gap: var(--sp-4); }
.auth-field { background: #fff; border-radius: var(--radius-md); padding: var(--sp-3) var(--sp-7);
  box-shadow: 0 6px 20px rgba(0,0,0,.15); text-align: left; }
.auth-field label { display: block; font-size: var(--fs-xs); color: var(--ink-soft); font-weight: var(--fw-medium); }
.auth-field input { width: 100%; border: none; outline: none; background: transparent;
  font: inherit; font-size: var(--fs-base); color: var(--ink); padding: 2px 0 0; }
.auth-forgot { align-self: flex-start; color: #fff; font-weight: var(--fw-bold); font-size: var(--fs-sm);
  cursor: pointer; text-shadow: 0 1px 8px rgba(0,0,0,.35); margin-top: calc(-1 * var(--sp-1)); }
.auth-forgot:hover { text-decoration: underline; }
.auth-err { color: #fff; background: rgba(0,0,0,.5); border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-6); font-size: var(--fs-sm); text-align: center; backdrop-filter: blur(4px); }
.auth-err:empty { display: none; }
.auth-btn { width: 100%; background: var(--tag-top); color: #5c4500; border: none; border-radius: var(--radius-md);
  padding: var(--sp-5); font: inherit; font-size: var(--fs-md); font-weight: var(--fw-black); cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.18); margin-top: var(--sp-2); }
.auth-btn:hover { filter: brightness(.97); }
.auth-btn:active { transform: translateY(1px); }

.auth-demo { margin-top: var(--sp-6); display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; justify-content: center; }
.auth-demo-lab { color: rgba(255,255,255,.85); font-size: var(--fs-xs); font-weight: var(--fw-medium); text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.auth-chip { font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold); cursor: pointer;
  color: #fff; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.4);
  border-radius: var(--radius-pill); padding: var(--sp-2) var(--sp-5); backdrop-filter: blur(4px); }
.auth-chip:hover { background: rgba(255,255,255,.32); }

/* ---------- Trường nhập dùng chung (login + modal) ---------- */
.fld { display: block; margin-bottom: var(--sp-5); }
.fld > span { display: block; font-size: var(--fs-xs); color: var(--text-mid); font-weight: var(--fw-medium); margin-bottom: var(--sp-2); }
.fld > span i { color: var(--text-faint); font-weight: var(--fw-medium); font-style: normal; }
.fld input, .fld select {
  width: 100%; font: inherit; font-size: var(--fs-sm); color: var(--ink);
  border: 1px solid var(--border-input); border-radius: var(--radius-sm);
  padding: var(--sp-4) var(--sp-5); background: var(--panel); }
.fld input:focus, .fld select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-10); }
.fld-row { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-sm); color: var(--text-mid); margin-bottom: var(--sp-5); cursor: pointer; }

/* ---------- Nút ---------- */
.btn-primary { font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold); cursor: pointer;
  border: none; background: var(--accent); color: #fff; border-radius: var(--radius-sm); padding: var(--sp-4) var(--sp-7); }
.btn-primary:hover { filter: brightness(.95); }
.btn-ghost { font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold); cursor: pointer;
  border: 1px solid var(--border-input); background: var(--panel); color: var(--text-mid); border-radius: var(--radius-sm); padding: var(--sp-4) var(--sp-7); }
.btn-ghost:hover { color: var(--ink); }

/* ---------- Chip user trong sidebar ---------- */
.user-chip { display: flex; align-items: center; gap: var(--sp-3); margin-top: auto;
  padding: var(--sp-3); border-top: 1px solid var(--line); }
.uc-av { width: 30px; height: 30px; flex: 0 0 30px; border-radius: var(--radius-pill);
  background: var(--brand-gradient); color: #fff; font-size: var(--fs-2xs); font-weight: var(--fw-bold);
  display: flex; align-items: center; justify-content: center; }
.uc-meta { min-width: 0; flex: 1; }
.uc-name { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uc-role { font-size: var(--fs-2xs); color: var(--ink-soft); }
.uc-out { font-size: var(--fs-md); line-height: 1; cursor: pointer; border: none; background: none; color: var(--ink-soft); padding: var(--sp-2); border-radius: var(--radius-sm); }
.uc-out:hover { color: var(--bad); background: var(--surface-hover); }

/* ---------- Module bị khoá trong sidebar (member) ---------- */
.navgroup.locked { opacity: .55; pointer-events: none; }
.lock-tag { margin-left: auto; font-size: 9px; text-transform: uppercase; letter-spacing: .03em;
  color: var(--text-faint); border: 1px solid var(--neutral-300); border-radius: var(--radius-pill); padding: 1px 6px; white-space: nowrap; }

/* ---------- Footer sidebar (Made by … · Version …) ---------- */
.sidebar-foot { display: flex; justify-content: space-between; gap: var(--sp-3); }

/* ---------- Member: thẻ game KHÔNG mở chi tiết (bỏ con trỏ + hover) ---------- */
body.no-game-detail .cardrow { cursor: default; }
body.no-game-detail .cardrow:hover { background: transparent; box-shadow: none; }

/* ---------- Trang khoá ---------- */
.locked-page { text-align: center; padding: 80px 0; }
.locked-ic { font-size: 44px; margin-bottom: var(--sp-5); }

/* ---------- Trang Quản lý tài khoản ---------- */
.acc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-7); margin-bottom: var(--sp-9); }
.acc-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.acc-table th { text-align: left; font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-soft); font-weight: var(--fw-semibold); padding: 0 var(--sp-5) var(--sp-4); border-bottom: 1px solid var(--line); }
.acc-table td { padding: var(--sp-5); border-bottom: 1px solid var(--line); vertical-align: middle; }
.acc-name { font-weight: var(--fw-semibold); color: var(--ink); }
.acc-email { color: var(--text-mid); }
.acc-you { font-size: 9px; text-transform: uppercase; letter-spacing: .03em; color: var(--accent);
  background: var(--accent-soft); border-radius: var(--radius-pill); padding: 1px 6px; margin-left: var(--sp-2); }
.acc-role { font: inherit; font-size: var(--fs-xs); color: var(--ink); border: 1px solid var(--border-input);
  border-radius: var(--radius-sm); padding: var(--sp-2) var(--sp-4); background: var(--panel); cursor: pointer; }
.acc-act { white-space: nowrap; text-align: right; }
.lnk { font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold); cursor: pointer;
  border: none; background: none; color: var(--accent); padding: var(--sp-2) var(--sp-3); }
.lnk:hover { text-decoration: underline; }
.lnk.danger { color: var(--bad); }
.lnk:disabled { color: var(--text-faint); cursor: not-allowed; text-decoration: none; }

/* ---------- Switch active ---------- */
.switch { position: relative; display: inline-block; width: 38px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; cursor: pointer; background: var(--neutral-300);
  border-radius: var(--radius-pill); transition: background .15s; }
.switch .slider::before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: var(--shadow); }
.switch input:checked + .slider { background: var(--good); }
.switch input:checked + .slider::before { transform: translateX(16px); }
.switch input:disabled + .slider { opacity: .5; cursor: not-allowed; }

/* ---------- Modal thêm/sửa ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.32); padding: var(--sp-7); }
.modal { width: 380px; max-width: 100%; background: var(--panel); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: var(--sp-9); }
.modal-title { font-size: var(--fs-lg); font-weight: var(--fw-bold); margin-bottom: var(--sp-7); }
.modal-err { color: var(--bad); font-size: var(--fs-xs); min-height: 16px; margin-bottom: var(--sp-3); }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--sp-3); margin-top: var(--sp-3); }
