/* =========================================================
   08 / 09 / 10 – Hồ sơ cá nhân (Thông tin / Thứ hạng / Lịch sử cộng điểm)
   ========================================================= */
.page-bg { position: relative; flex: 1; display: flex; flex-direction: column; }
.page-bg::before {
  content: ''; position: absolute; left: 0; right: 0; top: -1.5rem; height: 49.5rem; z-index: -1; pointer-events: none; opacity: .75;
  background: url('../images/bg-game.jpg') right top / 96rem 49.5rem no-repeat;
}
.main { position: relative; z-index: 0; }

.profile { width: 100%; max-width: 77.15rem; padding: 2.6rem 3.6rem 0 1.65rem; }

/* ----- Cover ----- */
.cover { position: relative; height: 10.6rem; border-radius: 0.8rem; overflow: hidden; background: #002d80 url('../images/profile-cover.jpg') center / cover no-repeat; color: #fff; }
.cover__eyebrow { position: absolute; left: 1.4rem; top: 1.3rem; font-size: max(0.6rem, var(--fs-min, 0px)); font-weight: 700; line-height: 0.8rem; }
.cover__avatar { position: absolute; left: 1.55rem; top: 3.4rem; width: 4.8rem; height: 4.8rem; border-radius: 50%; background: #eaf2fb; box-shadow: 0 0 0 0 #fff; display: grid; place-items: center; font-size: 1.5rem; font-weight: 700; line-height: 2rem; color: var(--navy); }
.cover__name { position: absolute; left: 7.25rem; top: 3.9rem; font-size: 1.35rem; font-weight: 700; line-height: 1.8rem; }
.cover__meta { position: absolute; left: 7.25rem; top: 6.05rem; font-size: max(0.7rem, var(--fs-min2, 0px)); line-height: 0.95rem; white-space: pre; }

/* ----- KPI ----- */
.kpis { margin-top: 1.05rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.kpi { position: relative; height: 6.6rem; background: #fff; border: 1px solid #e2e9f2; border-radius: 0.7rem; overflow: hidden; }
.kpi__icon { position: absolute; left: 0.9rem; top: 0.85rem; width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; }
.kpi__icon img { width: 1.1rem; height: 1.1rem; }
.kpi__label { position: absolute; left: 3.95rem; top: 0.75rem; font-size: max(0.7rem, var(--fs-min2, 0px)); font-weight: 500; line-height: 0.95rem; color: var(--muted-2); }
.kpi__value { position: absolute; left: 3.95rem; top: 1.65rem; font-size: 1.4rem; font-weight: 700; line-height: 1.9rem; }
.kpi__sub { position: absolute; left: 0.95rem; top: 4.8rem; font-size: max(0.6rem, var(--fs-min, 0px)); line-height: 0.8rem; color: var(--muted-2); }
.kpi__art { position: absolute; pointer-events: none; }
.kpi--points .kpi__icon { background: #fff3ed; }
.kpi--points .kpi__value { color: var(--orange); }
.kpi--points .kpi__art { right: 1px; top: 0.45rem; width: 6.9rem; height: 5.65rem; }
.kpi--news .kpi__icon { background: #e5f7ea; }
.kpi--news .kpi__value { color: var(--green); top: 1.45rem; }
.kpi--news .kpi__art { right: 0; top: 0.3rem; width: 6.6rem; height: 6.6rem; }
.kpi--game .kpi__icon { background: #eaf2fb; }
.kpi--game .kpi__value { color: #2c69d8; top: 1.5rem; }
.kpi--game .kpi__art { right: 0.65rem; top: 0.5rem; width: 5.5rem; height: 5.5rem; }

/* ----- Tabs ----- */
.ptabs { margin-top: 0.95rem; height: 2.65rem; display: flex; align-items: center; gap: 2.3rem; padding: 0 0.3rem; background: #fff; border: 1px solid #e2e9f2; border-radius: 0.7rem; overflow-x: auto; }
.ptab { flex: none; min-width: 8.7rem; height: 1.95rem; padding: 0 0.8rem; border-radius: 0.45rem; font-size: max(0.7rem, var(--fs-min2, 0px)); font-weight: 500; line-height: 0.95rem; color: var(--muted-2); transition: background-color .2s, color .2s; }
.ptab:hover { color: var(--navy); background: #f2f7fc; }
.ptab.is-active { background: var(--navy); color: #fff; font-weight: 600; }
.ppanel { display: none; }
.ppanel.is-active { display: block; animation: fadeUp .3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(0.3rem); } to { opacity: 1; transform: none; } }

/* ----- 08: Thông tin nhân viên ----- */
.info-grid { margin-top: 1.15rem; display: grid; grid-template-columns: minmax(0, 44.55rem) minmax(0, 27.6rem); gap: 1.35rem; }
.pcard { position: relative; background: #fff; border: 1px solid #e2e9f2; border-radius: 0.7rem; }
.details { min-height: 13.4rem; padding: 1rem 1.05rem; }
.details__title { font-size: 1rem; font-weight: 600; line-height: 1.35rem; color: var(--navy); }
.details__list { margin: 0.85rem 0 0; padding-top: 0.6rem; max-width: 31.8rem; border-top: 1px solid #e2e9f2; display: grid; grid-template-columns: 10.15rem 1fr; row-gap: 0.7rem; }
.details__list dt { font-size: max(0.65rem, var(--fs-min, 0px)); font-weight: 500; line-height: 1.05rem; color: var(--muted-2); }
.details__list dd { margin: 0; font-size: max(0.7rem, var(--fs-min2, 0px)); font-weight: 600; line-height: 1.05rem; color: #172b48; }
.details__list dd.is-ok { color: var(--green); }
.weekly { min-height: 13.4rem; padding: 0.95rem 0.9rem 0; }
.weekly__title { font-size: 0.95rem; font-weight: 600; line-height: 1.25rem; color: var(--navy); }
.weekly__sub { margin-top: 0.3rem; font-size: max(0.65rem, var(--fs-min, 0px)); line-height: 0.85rem; color: var(--muted-2); }
.weekly__pct { margin-top: 0.5rem; font-size: 1.8rem; font-weight: 700; line-height: 2.4rem; color: var(--green); }
.weekly__track { height: 0.6rem; margin-top: 0.4rem; border-radius: 0.3rem; background: #e2e9f2; overflow: hidden; }
.weekly__bar { height: 100%; border-radius: 0.3rem; background: var(--green); transition: width .8s ease; }
.weekly__note { margin-top: 0.75rem; font-size: max(0.65rem, var(--fs-min, 0px)); font-weight: 500; line-height: 0.85rem; color: var(--muted-2); }
.weekly__rank { margin-top: 0.85rem; padding-top: 1.05rem; border-top: 1px solid #e2e9f2; display: flex; align-items: center; gap: 0.6rem; font-size: 1rem; font-weight: 500; line-height: 1.2rem; color: var(--navy); }
.weekly__rank img { width: 1.2rem; height: 1.2rem; }

/* ----- 09: Lịch sử thứ hạng ----- */
.rank-history { padding: 1.3rem 0.85rem 0; max-width: 56.95rem; }
.sec-eyebrow { font-size: max(0.6rem, var(--fs-min, 0px)); line-height: 0.8rem; color: var(--muted-2); }
.sec-title { margin-top: 0.15rem; font-size: 1.15rem; font-weight: 600; line-height: 1.55rem; color: var(--navy); }
.sec-sub { margin-top: 0.15rem; font-size: max(0.7rem, var(--fs-min2, 0px)); line-height: 0.95rem; color: var(--muted-2); }
.period { position: relative; margin-top: 1.1rem; height: 5.9rem; padding: 0.8rem 1.15rem; border-radius: 0.75rem; background: var(--navy); color: #fff; overflow: hidden; }
.period__status { display: inline-grid; place-items: center; height: 1.2rem; padding: 0 0.15rem; width: 6.8rem; border-radius: 0.6rem; background: #002b49; font-size: max(0.6rem, var(--fs-min, 0px)); line-height: 0.8rem; color: #bbd3ff; }
.period__title { margin-top: 0.4rem; font-size: 1.25rem; font-weight: 700; line-height: 1.65rem; }
.period__desc { margin-top: 0.3rem; font-size: max(0.65rem, var(--fs-min, 0px)); line-height: 0.85rem; }
.period__max { position: absolute; right: 1.2rem; top: 1.2rem; text-align: right; }
.period__max span { display: block; font-size: max(0.6rem, var(--fs-min, 0px)); font-weight: 500; line-height: 0.8rem; }
.period__max b { display: block; margin-top: 0.55rem; font-size: 1.25rem; font-weight: 700; line-height: 1.65rem; color: var(--orange); }
.snapshots { margin-top: 0.7rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 0.8rem; }
.snap { position: relative; height: 5.15rem; padding: 0.7rem 1rem; transition: box-shadow .2s, transform .2s; }
.snap:hover { box-shadow: 0 0.5rem 1.2rem rgba(0, 55, 93, .08); transform: translateY(-2px); }
.snap__label { font-size: max(0.6rem, var(--fs-min, 0px)); font-weight: 600; line-height: 0.8rem; color: var(--muted-2); }
.snap__title { margin-top: 0.2rem; font-size: 0.85rem; font-weight: 700; line-height: 1.15rem; color: var(--navy); }
.snap__detail { margin-top: 0.5rem; font-size: max(0.65rem, var(--fs-min, 0px)); line-height: 0.85rem; color: var(--muted-2); white-space: pre; }
.snap__badge { position: absolute; right: 0.95rem; top: 1.3rem; width: 2.5rem; height: 2.5rem; border-radius: 0.5rem; background: #fff0e8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; font-size: max(0.6rem, var(--fs-min, 0px)); font-weight: 500; line-height: 0.8rem; color: var(--orange); }
.snap__badge img { width: 0.85rem; height: 0.85rem; }

/* ----- 10: Lịch sử cộng điểm ----- */
.history { margin-top: 1.15rem; display: flex; flex-direction: column; gap: 1.2rem; }
.history__title { font-size: 0.9rem; font-weight: 500; line-height: 1.4rem; letter-spacing: -.45px; color: var(--ink-3); }
.history__sub { font-size: max(0.6rem, var(--fs-min, 0px)); line-height: 0.8rem; color: #62748e; }
.current { display: flex; flex-direction: column; gap: 0.8rem; padding: 1.2rem; background: #fff; border: 2px solid #00bc7d; border-radius: 0.8rem; box-shadow: 0 1px 0.15rem rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1); }
.current__head { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding-bottom: 0.6rem; border-bottom: 1px solid #f1f5f9; }
.current__title { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; font-weight: 600; line-height: 1.2rem; letter-spacing: -.32px; color: var(--ink-3); text-transform: uppercase; }
.current__title i { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #00bc7d; }
.current__total { padding: 0.2rem 0.6rem; border: 1px solid #a4f4cf; border-radius: 0.4rem; background: #ecfdf5; font-size: max(0.7rem, var(--fs-min2, 0px)); font-weight: 600; line-height: 1rem; letter-spacing: -.154px; color: #006045; white-space: nowrap; }
.current__items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
.citem { min-height: 4.2rem; padding: 0.8rem; background: #f8fafc; border: 1px solid var(--line); border-radius: 0.6rem; }
.citem__head { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; }
.citem__name { display: flex; align-items: center; gap: 0.2rem; font-size: max(0.7rem, var(--fs-min2, 0px)); font-weight: 500; line-height: 0.8rem; color: #314158; }
.citem__name img { width: 0.9rem; height: 0.9rem; }
.citem__pt { font-size: max(0.6rem, var(--fs-min, 0px)); font-weight: 600; line-height: 0.8rem; }
.citem__desc { margin-top: 0.3rem; font-size: max(0.6rem, var(--fs-min, 0px)); line-height: 0.7335rem; letter-spacing: .066px; color: #62748e; }

.prev__label { font-size: max(0.6rem, var(--fs-min, 0px)); font-weight: 500; line-height: 0.8rem; letter-spacing: .6px; color: #62748e; text-transform: uppercase; }
.prev-list { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 0.8rem; }
.prev { display: flex; flex-direction: column; gap: 0.6rem; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 0.6rem; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .05)); }
.prev__head { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding-bottom: 0.5rem; border-bottom: 1px solid #f1f5f9; }
.prev__title { font-size: max(0.7rem, var(--fs-min2, 0px)); font-weight: 500; line-height: 1rem; letter-spacing: -.154px; color: var(--ink-3); text-transform: uppercase; }
.prev__total { padding: 0.2rem 0.5rem; border-radius: 0.2rem; background: #f1f5f9; font-size: max(0.6rem, var(--fs-min, 0px)); font-weight: 600; line-height: 0.8rem; color: var(--ink-3); white-space: nowrap; }
.prev__items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.prev__item { min-height: 2.6rem; padding: 0.5rem; border-radius: 0.2rem; background: #f8fafc; font-size: max(0.6rem, var(--fs-min, 0px)); font-weight: 500; line-height: 0.8rem; color: #314158; }
.prev__item b { font-weight: 500; color: #45556c; }
.prev__item small { font-weight: 400; color: #45556c; font-size: max(0.6rem, var(--fs-min, 0px)); }
.prev__item p { margin-top: 0.2rem; font-size: max(0.55rem, var(--fs-min, 0px)); font-weight: 400; line-height: 0.7335rem; letter-spacing: .066px; color: #62748e; }

.footer--profile { padding: 1.3rem 3.6rem 2rem 1.85rem; margin: 0; max-width: 77.15rem; }

.page-bg::before, .game-main::before { -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent); }
