/*
 * profile.css — Profile page (route /profile, js/pages/profile.js).
 * 2026-09-10 redesign from a reference screenshot: a dark left identity
 * card (avatar + level badge, name, rank title, ID + copy, region, XP bar,
 * editable motto, quick links) + a right cream panel with two tabs —
 * "Informasi" (combat power, Outpost network, Personal Honor strip,
 * per-category leaderboard rank, location form) and "Dinding Lencana"
 * (achievement badge wall). Classes are all `pf2-*`.
 */

.pf2-wrap {
    position: relative; z-index: 2; flex: 1; min-height: 0;
    display: flex; align-items: stretch; gap: 14px; padding: 14px 18px;
}

/* ── Left identity card ────────────────────────────────────────────── */
.pf2-card {
    flex: 0 0 300px; align-self: flex-start; position: relative;
    background: linear-gradient(160deg, #3a2410, #241608 72%);
    border: 1px solid rgba(255,216,138,.22); border-radius: 16px;
    padding: 14px 16px 16px; color: #fff4e2;
    box-shadow: 0 12px 32px rgba(0,0,0,.28);
}
.pf2-card-top { position: absolute; top: 10px; right: 12px; display: flex; gap: 6px; }
.pf2-card-btn {
    width: 26px; height: 26px; border-radius: 8px; cursor: pointer;
    border: 1px solid rgba(255,216,138,.25); background: rgba(0,0,0,.25); color: #ffd88a;
    font-size: 12px; display: flex; align-items: center; justify-content: center;
    transition: background .12s;
}
.pf2-card-btn:hover { background: rgba(0,0,0,.5); }

.pf2-idrow { display: flex; gap: 12px; align-items: center; margin: 6px 0 12px; }
.pf2-avatar {
    position: relative; width: 74px; height: 74px; flex-shrink: 0; cursor: pointer;
    border-radius: 16px; border: 2px solid rgba(255,216,138,.4);
}
.pf2-avatar-img, .pf2-avatar-fallback {
    width: 100%; height: 100%; border-radius: 14px; object-fit: cover;
    display: flex; align-items: center; justify-content: center;
}
.pf2-avatar-fallback { background: rgba(240,136,62,.2); color: #ffd88a; font-size: 30px; font-weight: 800; }
.pf2-lvl {
    position: absolute; left: -6px; bottom: -6px; min-width: 22px; height: 20px; padding: 0 5px;
    border-radius: 999px; background: linear-gradient(180deg,#ffd54a,#f0883e); color: #3a2410;
    font-size: 11.5px; font-weight: 900; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.4); border: 1.5px solid #241608;
}
.pf2-idmain { flex: 1; min-width: 0; }
.pf2-name { font-size: 16px; font-weight: 800; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf2-title {
    display: inline-flex; align-items: center; gap: 4px; margin-top: 4px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .5px; color: #ffd88a;
    background: rgba(255,216,138,.12); border: 1px solid rgba(255,216,138,.25);
    border-radius: 999px; padding: 2px 8px; max-width: 100%;
}
.pf2-title-ic { font-size: 11.5px; }
.pf2-idline {
    margin-top: 7px; font-size: 11.5px; color: rgba(255,235,210,.55);
    font-family: var(--font-mono); display: flex; align-items: center; gap: 4px;
}
.pf2-idval { color: rgba(255,235,210,.85); }
.pf2-copy { border: none; background: transparent; color: rgba(255,235,210,.5); cursor: pointer; font-size: 12.5px; padding: 0 2px; }
.pf2-copy:hover { color: #ffd88a; }
.pf2-region { margin-top: 3px; font-size: 11.5px; color: rgba(255,235,210,.6); }

.pf2-xp { margin: 10px 0; }
.pf2-xp-head {
    display: flex; justify-content: space-between; margin-bottom: 4px;
    font-size: 10.5px; font-weight: 700; color: rgba(255,235,210,.7); font-family: var(--font-mono);
}
.pf2-xp-track { height: 7px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; }
.pf2-xp-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg,#f0883e,#ffd88a); }

.pf2-sig {
    margin: 12px 0; padding: 10px 12px; border-radius: 12px;
    background: rgba(0,0,0,.25); border: 1px solid rgba(255,216,138,.16);
}
.pf2-sig-lbl { font-size: 9px; letter-spacing: 2px; color: rgba(255,216,138,.6); font-weight: 800; text-align: center; margin-bottom: 6px; }
.pf2-sig-text { font-size: 12.5px; line-height: 1.5; color: rgba(255,235,210,.82); font-style: italic; text-align: center; word-break: break-word; }
.pf2-sig-text i { color: rgba(255,235,210,.4); font-style: italic; }
.pf2-sig-input {
    width: 100%; box-sizing: border-box; resize: none; border-radius: 8px;
    border: 1px solid rgba(255,216,138,.3); background: rgba(0,0,0,.3); color: #fff4e2;
    font: inherit; font-size: 12.5px; padding: 6px 8px;
}
.pf2-sig-actions { display: flex; gap: 6px; margin-top: 6px; }
.pf2-sig-save, .pf2-sig-cancel {
    flex: 1; border: none; border-radius: 7px; padding: 6px; cursor: pointer;
    font-size: 11px; font-weight: 800; letter-spacing: .5px;
}
.pf2-sig-save { background: linear-gradient(180deg,#ffd54a,#f0883e); color: #3a2410; }
.pf2-sig-cancel { background: rgba(255,255,255,.1); color: rgba(255,235,210,.7); }

.pf2-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pf2-qbtn {
    flex: 1 1 calc(33.333% - 4px); display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 9px 2px; border-radius: 10px; cursor: pointer;
    border: 1px solid rgba(255,216,138,.18); background: rgba(0,0,0,.22); color: rgba(255,235,210,.8);
    transition: background .12s;
}
.pf2-qbtn:hover { background: rgba(255,216,138,.14); color: #fff4e2; }
.pf2-qbtn-ic { font-size: 16px; }
.pf2-qbtn-lbl { font-size: 9px; font-weight: 700; letter-spacing: .2px; }

/* ── Right panel + tabs ────────────────────────────────────────────── */
.pf2-panel {
    flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column;
    background: rgba(255,248,236,.55); border: 1px solid rgba(58,36,16,.16);
    border-radius: 16px; overflow: hidden;
}
.pf2-tabs { display: flex; flex-shrink: 0; border-bottom: 1px solid rgba(58,36,16,.14); }
.pf2-tab {
    flex: 1; border: none; background: transparent; cursor: pointer; position: relative;
    padding: 13px; font-size: 12px; font-weight: 800; letter-spacing: .5px; color: #8a6a48;
}
.pf2-tab.active { color: #c8641a; }
.pf2-tab.active::after {
    content: ""; position: absolute; left: 22%; right: 22%; bottom: -1px; height: 3px;
    border-radius: 3px 3px 0 0; background: #c8641a;
}
.pf2-tabbody { flex: 1; overflow-y: auto; padding: 14px 16px; scrollbar-width: thin; }

.pf2-sec {
    background: #fffdf8; border: 1px solid rgba(58,36,16,.12); border-radius: 12px;
    padding: 12px 14px; margin-bottom: 12px;
}
.pf2-sec:last-child { margin-bottom: 0; }
.pf2-sec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pf2-sec-head > span { font-size: 10.5px; letter-spacing: 1.5px; font-weight: 800; color: #8a6a48; }
.pf2-sec-link { border: none; background: transparent; color: #c8641a; font-size: 11px; font-weight: 700; cursor: pointer; }
.pf2-sec-link:hover { text-decoration: underline; }
.pf2-empty { font-size: 11.5px; color: rgba(138,106,72,.7); padding: 8px 0; text-align: center; }
.pf2-hint { font-size: 11px; color: #8a6a48; line-height: 1.5; margin-bottom: 10px; }

/* Combat power */
.pf2-power-head {
    display: flex; align-items: center; gap: 10px; padding: 11px 14px; margin: -12px -14px 12px;
    border-radius: 12px 12px 0 0; background: linear-gradient(100deg,#2c1a08,#c8641a); color: #fff4e2;
}
.pf2-power-ic { font-size: 19px; }
.pf2-power-val { font-size: 22px; font-weight: 900; font-family: var(--font-mono); letter-spacing: .5px; }
.pf2-power-lbl { margin-left: auto; font-size: 9px; font-weight: 800; letter-spacing: 1.5px; line-height: 1.25; text-align: right; opacity: .85; }
.pf2-weapon {
    display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 10px; border-radius: 10px;
    background: color-mix(in srgb, var(--gc,#8a6a48) 10%, #fff8ec);
    border: 1.5px solid color-mix(in srgb, var(--gc,#8a6a48) 40%, transparent);
}
.pf2-weapon-empty { background: rgba(58,36,16,.05); border-color: rgba(58,36,16,.12); }
.pf2-weapon-ic { font-size: 24px; flex-shrink: 0; }
.pf2-weapon-info { min-width: 0; font-size: 12px; color: #8a6a48; }
.pf2-weapon-name { font-size: 12px; font-weight: 800; color: #2c1a08; }
.pf2-weapon-dmg { font-size: 11.5px; color: #c8641a; font-weight: 700; margin-top: 2px; }
.pf2-statgrid { display: flex; flex-direction: column; gap: 7px; }
.pf2-stat { display: flex; align-items: center; gap: 8px; }
.pf2-stat-ic { width: 16px; text-align: center; }
.pf2-stat-lbl { width: 30px; flex-shrink: 0; font-size: 10px; font-weight: 800; letter-spacing: .5px; color: #8a6a48; }
.pf2-stat .ui-pip-bar { flex: 1; }
.pf2-stat-val { width: 54px; flex-shrink: 0; text-align: right; font-family: var(--font-mono); font-weight: 800; color: #2c1a08; }

/* Outpost cells */
.pf2-cells { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pf2-cell { text-align: center; padding: 10px 4px; border-radius: 10px; background: rgba(200,100,26,.07); border: 1px solid rgba(200,100,26,.16); }
.pf2-cell-val { font-size: 15px; font-weight: 900; font-family: var(--font-mono); color: #c8641a; }
.pf2-cell-lbl { font-size: 9px; letter-spacing: .3px; color: #8a6a48; margin-top: 3px; font-weight: 700; }

/* Personal Honor */
.pf2-honor { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pf2-honor-card {
    text-align: center; padding: 12px 6px; border-radius: 12px;
    background: linear-gradient(180deg,#fffdf8,#fbf1e2); border: 1px solid rgba(58,36,16,.14);
}
.pf2-honor-card[data-act] { cursor: pointer; transition: transform .1s, box-shadow .1s; }
.pf2-honor-card[data-act]:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(58,36,16,.16); }
.pf2-honor-ic { font-size: 20px; }
.pf2-honor-val { font-size: 15px; font-weight: 900; font-family: var(--font-mono); color: #2c1a08; margin-top: 4px; }
.pf2-honor-lbl { font-size: 9px; letter-spacing: .2px; color: #8a6a48; margin-top: 3px; font-weight: 700; line-height: 1.3; }

/* Rank */
.pf2-rank-best {
    display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 10px; border-radius: 12px;
    background: linear-gradient(110deg,#2c1a08,#7a3f12); color: #fff4e2;
}
.pf2-rank-best-badge { font-size: 22px; font-weight: 900; font-family: var(--font-mono); color: #ffd88a; flex-shrink: 0; }
.pf2-rank-best-lbl { font-size: 9px; letter-spacing: 1.5px; opacity: .7; font-weight: 800; }
.pf2-rank-best-cat { font-size: 12px; font-weight: 800; margin-top: 2px; }
.pf2-rank-best-none { display: block; text-align: center; font-size: 11.5px; }
.pf2-rank-list { display: flex; flex-direction: column; gap: 4px; }
.pf2-rank-row {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer;
    background: rgba(58,36,16,.04); border: 1px solid rgba(58,36,16,.1); transition: background .1s;
}
.pf2-rank-row:hover { background: rgba(200,100,26,.1); }
.pf2-rank-cat { flex: 1; min-width: 0; font-size: 11.5px; font-weight: 700; color: #2c1a08; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf2-rank-pos { flex-shrink: 0; font-size: 12.5px; font-weight: 900; font-family: var(--font-mono); color: #c8641a; }
.pf2-rank-pos.unranked { color: rgba(138,106,72,.5); }
.pf2-rank-val { flex-shrink: 0; font-size: 10.5px; font-family: var(--font-mono); color: #8a6a48; }
.pf2-rank-val i { opacity: .7; font-style: normal; }

/* Location form */
.pf2-field { margin-bottom: 10px; }
.pf2-field label { display: block; font-size: 10px; letter-spacing: 1px; color: #8a6a48; margin-bottom: 4px; font-weight: 700; }
.pf2-input {
    width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 8px;
    border: 1px solid rgba(58,36,16,.2); background: #fff; font: inherit; font-size: 12.5px; color: #2c1a08;
}
.pf2-savebtn {
    width: 100%; padding: 10px; border: none; border-radius: 9px; cursor: pointer; margin-top: 4px;
    background: linear-gradient(180deg,#f0883e,#c8641a); color: #fff8ec;
    font-size: 12.5px; font-weight: 800; letter-spacing: 1px;
}
.pf2-savebtn:disabled { opacity: .55; cursor: default; }

/* Badge wall */
.pf2-bw-head { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: #8a6a48; margin-bottom: 12px; }
.pf2-bw-head b { color: #2c1a08; font-family: var(--font-mono); }
.pf2-badgewall { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; cursor: pointer; }
.pf2-bw {
    display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 8px;
    border-radius: 12px; transition: transform .1s, box-shadow .1s;
    background: linear-gradient(180deg,#fffdf8, color-mix(in srgb, var(--accent,#c8641a) 9%, #fffdf8));
    border: 2px solid color-mix(in srgb, var(--accent,#c8641a) 55%, transparent);
}
.pf2-bw:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(58,36,16,.16); }
.pf2-bw.maxed { border-color: #ffd54a; box-shadow: 0 0 12px rgba(255,213,74,.3); }
.pf2-bw-medal {
    width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 22px; border: 2px solid #fff8ec;
    background: radial-gradient(circle at 50% 35%, #ffe6c2, #f6c98a 70%, #e0a860);
    box-shadow: 0 2px 6px rgba(58,36,16,.2);
}
.pf2-bw-lv { font-size: 9px; font-weight: 800; font-family: var(--font-mono); color: color-mix(in srgb, var(--accent,#c8641a) 75%, #2c1a08); }
.pf2-bw-cat { font-size: 8.5px; color: #8a6a48; text-align: center; line-height: 1.2; }
.pf2-bw-empty { text-align: center; padding: 44px 20px; color: #8a6a48; }
.pf2-bw-empty-ic { font-size: 40px; margin-bottom: 10px; }
.pf2-bw-empty p { font-size: 12.5px; line-height: 1.6; margin: 0 0 14px; }
.pf2-bw-empty .pf2-savebtn { width: auto; padding: 10px 20px; }

/* ── Responsive ────────────────────────────────────────────────────── */
@container (max-width: 860px) {
    .pf2-wrap { flex-direction: column; padding: 10px 12px; }
    .pf2-card { flex: 0 0 auto; width: 100%; align-self: stretch; }
    .pf2-panel { flex: 1 1 auto; min-height: 420px; }
}
@container (max-width: 560px) {
    .pf2-cells, .pf2-honor { grid-template-columns: repeat(2, 1fr); }
    .pf2-badgewall { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
}
