/* =============================================================================
 * FWO Player Portal - Item Mall
 * Extends style.css; reuses its tokens (--bg, --panel, --gold, ...) so the
 * mall reads as part of the same site rather than a bolted-on page.
 * ========================================================================== */

/* --- Wallet bar ----------------------------------------------------------- */
.wallet-bar{
  display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;
  background:linear-gradient(135deg,rgba(201,162,75,.10),rgba(201,162,75,.02));
  border:1px solid var(--line);border-radius:12px;padding:.9rem 1.1rem;margin:0 0 1.5rem;
}
.wallet-purses{display:flex;gap:.7rem;flex-wrap:wrap}
.purse{
  display:flex;align-items:center;gap:.55rem;background:var(--panel2);
  border:1px solid var(--line);border-radius:999px;padding:.4rem .9rem;
}
.purse-badge{
  width:22px;height:22px;border-radius:50%;display:grid;place-items:center;
  font-size:.7rem;font-weight:800;color:#0f1115;background:var(--gold2);flex:none;
}
.purse-badge.is-hero{background:#8fb8e8}
.purse-amt{font-weight:800;font-size:1.05rem;letter-spacing:.01em}
.purse-label{color:var(--muted);font-size:.78rem;text-transform:uppercase;letter-spacing:.12em}
.wallet-actions{display:flex;gap:.5rem;flex-wrap:wrap}

/* --- Toolbar: search + category tabs -------------------------------------- */
.mall-toolbar{margin:0 0 1.25rem}
.mall-search{display:flex;gap:.5rem;margin:0 0 .9rem}
.mall-search input[type=search]{
  flex:1;background:var(--panel);border:1px solid var(--line);border-radius:8px;
  color:var(--ink);padding:.6rem .85rem;font:inherit;
}
.mall-search input[type=search]:focus{outline:2px solid var(--gold);outline-offset:1px}

.mall-tabs{display:flex;gap:.45rem;flex-wrap:wrap}
.mall-tab{
  display:inline-flex;align-items:center;gap:.45rem;padding:.4rem .85rem;border-radius:999px;
  border:1px solid var(--line);background:var(--panel);color:var(--muted);
  font-size:.88rem;font-weight:600;text-decoration:none;
}
.mall-tab:hover{color:var(--ink);border-color:var(--gold);text-decoration:none}
.mall-tab.is-active{background:var(--gold);border-color:var(--gold);color:#0f1115}
.mall-tab-icon{
  width:20px;height:20px;border-radius:5px;display:grid;place-items:center;flex:none;
  background:rgba(255,255,255,.06);font-size:.68rem;font-weight:800;
}
.mall-tab.is-active .mall-tab-icon{background:rgba(0,0,0,.18)}

.mall-count{color:var(--muted);font-size:.85rem;margin:.9rem 0 .4rem}

/* --- Item grid ------------------------------------------------------------ */
.mall-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:1rem;
}
.mall-card{
  display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line);
  border-radius:12px;padding:1rem;transition:border-color .18s ease,transform .18s ease;
}
.mall-card:hover{border-color:var(--gold);transform:translateY(-2px)}
.mall-card-top{display:flex;gap:.7rem;align-items:flex-start;margin:0 0 .65rem}
.mall-icon{
  flex:none;width:44px;height:44px;border-radius:8px;background:var(--panel2);
  border:1px solid var(--line);display:grid;place-items:center;overflow:hidden;
}
/* The sprite is authored at 32px; the tile is 44px, so centre it. */
.mall-icon .sprite{display:block;image-rendering:pixelated}
.mall-icon .initials{font-weight:800;color:var(--gold2);font-size:1rem}
.mall-name{font-weight:700;line-height:1.25;margin:0 0 .15rem}
.mall-sub{color:var(--muted);font-size:.78rem}
.mall-blurb{color:var(--muted);font-size:.85rem;margin:0 0 .8rem;flex:1}

.mall-prices{display:flex;gap:.4rem;flex-wrap:wrap;margin:0 0 .8rem}
.price-chip{
  display:inline-flex;align-items:center;gap:.35rem;background:var(--panel2);
  border:1px solid var(--line);border-radius:999px;padding:.25rem .65rem;
  font-weight:700;font-size:.9rem;
}
.price-chip .purse-badge{width:17px;height:17px;font-size:.6rem}
.price-chip.unaffordable{opacity:.45}

.mall-meta{display:flex;gap:.5rem;flex-wrap:wrap;margin:0 0 .8rem}
.meta-pill{
  font-size:.72rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);
  border:1px solid var(--line);border-radius:999px;padding:.15rem .55rem;
}
.meta-pill.warn{color:var(--red);border-color:rgba(229,83,75,.45)}

.mall-buy{display:flex;gap:.4rem;flex-wrap:wrap}
.mall-buy .btn{flex:1;min-width:96px;text-align:center}

/* --- Empty / notices ------------------------------------------------------ */
.mall-empty{
  text-align:center;color:var(--muted);border:1px dashed var(--line);border-radius:12px;
  padding:3rem 1.5rem;
}
.notice{border:1px solid var(--line);border-radius:10px;padding:.85rem 1rem;margin:0 0 1.25rem}
.notice.ok{border-color:rgba(63,178,127,.45);background:rgba(63,178,127,.08);color:#9be3c2}
.notice.warn{border-color:rgba(201,162,75,.45);background:rgba(201,162,75,.08);color:var(--gold2)}
.notice.err{border-color:rgba(229,83,75,.45);background:rgba(229,83,75,.08);color:#f2a29c}

/* --- Buy dialog (a plain form, no JS needed) ------------------------------ */
.buy-panel{
  background:var(--panel);border:1px solid var(--gold);border-radius:12px;
  padding:1.25rem;margin:0 0 1.5rem;
}
.buy-panel h2{margin:0 0 .3rem;font-size:1.15rem}
.buy-panel .row{display:flex;gap:.75rem;flex-wrap:wrap;align-items:flex-end;margin:.9rem 0 0}
.buy-panel label{display:flex;flex-direction:column;gap:.3rem;font-size:.85rem;color:var(--muted)}
.buy-panel select,.buy-panel input[type=number],.buy-panel input[type=text]{
  background:var(--panel2);border:1px solid var(--line);border-radius:8px;color:var(--ink);
  padding:.5rem .7rem;font:inherit;min-width:180px;
}

/* --- Tables (orders, ledger, admin) --------------------------------------- */
.mall-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px}
table.mall-table{border-collapse:collapse;width:100%;min-width:640px;font-size:.9rem}
table.mall-table th,table.mall-table td{
  text-align:left;padding:.6rem .8rem;border-bottom:1px solid var(--line);vertical-align:top;
}
table.mall-table th{
  background:var(--panel2);color:var(--muted);font-size:.75rem;text-transform:uppercase;
  letter-spacing:.1em;font-weight:700;white-space:nowrap;
}
table.mall-table tr:last-child td{border-bottom:none}
table.mall-table td.num{text-align:right;font-variant-numeric:tabular-nums}
.pos{color:var(--green);font-weight:700}
.neg{color:var(--red);font-weight:700}

.status-pill{
  display:inline-block;padding:.15rem .6rem;border-radius:999px;font-size:.72rem;
  font-weight:800;text-transform:uppercase;letter-spacing:.08em;white-space:nowrap;
}
.status-pill.delivered{background:rgba(63,178,127,.16);color:#7fd9b3}
.status-pill.pending{background:rgba(201,162,75,.16);color:var(--gold2)}
.status-pill.refunded{background:rgba(154,162,177,.16);color:var(--muted)}
.status-pill.failed{background:rgba(229,83,75,.16);color:#f2a29c}

/* --- Admin ---------------------------------------------------------------- */
.admin-tabs{display:flex;gap:.4rem;flex-wrap:wrap;margin:0 0 1.5rem}
.admin-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:1.25rem}
.admin-card{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:1.15rem}
.admin-card h2{margin:0 0 .9rem;font-size:1.05rem}
.admin-card label{display:block;font-size:.82rem;color:var(--muted);margin:0 0 .7rem}
.admin-card label span{display:block;margin:0 0 .25rem}
.admin-card input,.admin-card select,.admin-card textarea{
  width:100%;background:var(--panel2);border:1px solid var(--line);border-radius:8px;
  color:var(--ink);padding:.5rem .7rem;font:inherit;
}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:.7rem}

/* Icon picker: 16 sprites per row, straight off the client sheet. */
.icon-picker{max-height:220px;overflow-y:auto;border:1px solid var(--line);border-radius:8px;padding:.4rem;background:var(--panel2)}
.icon-row{display:flex;flex-wrap:wrap;gap:2px}
.icon-cell{
  width:32px;height:32px;border:2px solid transparent;border-radius:4px;cursor:pointer;
  padding:0;background-color:transparent;image-rendering:pixelated;
}
.icon-cell:hover{border-color:var(--gold2)}
.icon-cell.is-picked{border-color:var(--gold);box-shadow:0 0 0 1px var(--gold)}

.search-results{margin:.7rem 0 0;max-height:260px;overflow-y:auto;border:1px solid var(--line);border-radius:8px}
.search-hit{
  display:flex;justify-content:space-between;gap:.6rem;padding:.45rem .7rem;
  border-bottom:1px solid var(--line);font-size:.87rem;
}
.search-hit:last-child{border-bottom:none}
.search-hit .id{color:var(--muted);font-variant-numeric:tabular-nums}

.btn-sm{padding:.3rem .7rem;font-size:.82rem}
.btn-danger{background:transparent;border:1px solid rgba(229,83,75,.5);color:#f2a29c}
.btn-danger:hover{background:rgba(229,83,75,.12)}

@media (max-width:560px){
  .mall-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
  .field-row{grid-template-columns:1fr}
}

/* =============================================================================
 * Storefront v2: type tabs, cart, discounts, level and stat lines.
 * ========================================================================== */

.mall-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:0 0 1.1rem}
.mall-head .page-title{margin:0}

.btn-gold{background:linear-gradient(135deg,var(--gold),var(--gold2));color:#17130a;border:none;font-weight:800}
.btn-gold:hover{filter:brightness(1.08)}
.btn-cart{background:linear-gradient(135deg,#3aa6e8,#8b5cf6);color:#fff;border:none;font-weight:700}
.btn-cart:hover{filter:brightness(1.1)}
.btn-block{display:block;width:100%;text-align:center}
.cart-btn{position:relative}
.cart-badge{
  display:inline-block;min-width:19px;padding:0 5px;margin-left:.35rem;border-radius:999px;
  background:#17130a;color:var(--gold2);font-size:.76rem;font-weight:800;text-align:center;
}

/* --- Character box -------------------------------------------------------- */
.charbox{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:1rem 1.15rem;margin:0 0 1.3rem}
.charbox h2{margin:0 0 .6rem;font-size:1rem;color:var(--muted);font-weight:700}
.charbox select{
  width:100%;background:var(--panel2);border:1px solid var(--line);border-radius:8px;
  color:var(--ink);padding:.6rem .8rem;font:inherit;
}
.warnline{color:var(--gold2);margin:.6rem 0 0}

/* --- Tabs with real sprites ----------------------------------------------- */
.tab-sprite{display:inline-block;flex:none;transform:scale(.62);transform-origin:center;margin:-6px}

/* --- Search + sort row ---------------------------------------------------- */
.mall-search select{
  background:var(--panel);border:1px solid var(--line);border-radius:8px;color:var(--ink);
  padding:.6rem .7rem;font:inherit;
}

/* --- Card v2 -------------------------------------------------------------- */
.mall-card{position:relative;text-align:center;align-items:center}
.card-icon{display:flex;justify-content:center;margin:.2rem 0 .6rem}
.mall-card .mall-icon{width:52px;height:52px}
.mall-card .mall-name{margin:0 0 .2rem;font-size:.98rem}
.lvl-req{color:var(--gold2);font-size:.78rem;font-weight:700;margin:0 0 .45rem}
.item-stats{
  color:#5fd39b;font-size:.72rem;line-height:1.35;margin:0 0 .5rem;flex:1;
  word-break:break-word;
}
.mall-card .mall-blurb{font-size:.78rem;text-align:center}
.qty-line{color:var(--muted);font-size:.76rem;margin:0 0 .3rem}
.price-line{margin:0 0 .7rem;display:flex;gap:.5rem;justify-content:center;align-items:baseline;flex-wrap:wrap}
.price-now{color:var(--gold2);font-weight:800;font-size:1.05rem}
.price-now.is-hero{color:#8fb8e8}
.price-now.cant{opacity:.5}
.price-was{color:var(--muted);text-decoration:line-through;font-size:.85rem}
.disc-flag{
  position:absolute;top:.55rem;left:.55rem;background:var(--red);color:#fff;
  font-size:.7rem;font-weight:800;padding:.1rem .4rem;border-radius:4px;
}
/* Kad EXP: badge kadar emas di penjuru kanan atas kad. */
.exp-flag{
  position:absolute;top:.55rem;right:.55rem;
  background:linear-gradient(135deg,#ffe9a8 0%,#f5c542 45%,#c9920e 100%);
  color:#2a1e04;font-size:.85rem;font-weight:900;letter-spacing:.04em;
  padding:.18rem .55rem;border-radius:6px;border:1px solid #8a630a;
  box-shadow:0 0 12px rgba(245,197,66,.55);
}
.mall-card .mall-meta{justify-content:center}
.addcart-form{margin:0;width:100%}
/* Set bundle: badge emas di tengah atas kad + senarai kepingan pada kad. */
.set-flag{
  position:absolute;top:.55rem;left:50%;transform:translateX(-50%);
  background:linear-gradient(135deg,#ffe9a8 0%,#f5c542 45%,#c9920e 100%);
  color:#2a1e04;font-size:.68rem;font-weight:900;letter-spacing:.08em;
  padding:.16rem .55rem;border-radius:6px;border:1px solid #8a630a;
  box-shadow:0 0 12px rgba(245,197,66,.55);white-space:nowrap;
}
.set-list{
  list-style:none;margin:0 0 .5rem;padding:.45rem .6rem;text-align:left;
  background:rgba(245,197,66,.06);border:1px solid rgba(245,197,66,.25);
  border-radius:8px;font-size:.74rem;line-height:1.5;color:var(--muted);width:100%;
}
.set-list li::before{content:"◆ ";color:var(--gold2);font-size:.6rem}
/* Kiraan item setiap kategori (tab sidebar, gaya Lagenda Setiawan). */
.mall-tab .tab-count{color:var(--muted);font-size:.92em;font-weight:400}
.realm-shop-sidebar .mall-tab .tab-count{margin-left:auto}
.mall-tab.is-active .tab-count{color:inherit;opacity:.75}

/* --- Pagination ----------------------------------------------------------- */
.mall-pagination{display:flex;gap:.35rem;justify-content:center;align-items:center;flex-wrap:wrap;margin:1.6rem 0 0}
.page-num{
  min-width:34px;padding:.3rem .5rem;text-align:center;border-radius:7px;
  border:1px solid var(--line);background:var(--panel);color:var(--muted);
  font-size:.86rem;font-weight:700;text-decoration:none;
}
.page-num:hover{color:var(--ink);border-color:var(--gold);text-decoration:none}
.page-num.is-active{background:var(--gold);border-color:var(--gold);color:#17130a}

/* --- Cart / checkout ------------------------------------------------------ */
.qty-form{display:flex;gap:.3rem;justify-content:flex-end;margin:0}
.qty-form input[type=number]{
  width:62px;background:var(--panel2);border:1px solid var(--line);border-radius:7px;
  color:var(--ink);padding:.3rem .4rem;font:inherit;
}
.checkout-panel{background:var(--panel);border:1px solid var(--gold);border-radius:12px;padding:1.25rem;margin:1.4rem 0 0}
.checkout-panel h2{margin:0 0 .8rem;font-size:1.1rem}
.checkout-totals{display:flex;gap:2rem;flex-wrap:wrap;margin:0 0 1rem}
.checkout-totals strong{display:block;font-size:1.3rem;color:var(--gold2)}
.checkout-panel .row{display:flex;gap:.75rem;flex-wrap:wrap;align-items:flex-end}
.checkout-panel label{display:flex;flex-direction:column;gap:.3rem;font-size:.85rem;color:var(--muted)}
.checkout-panel select{
  background:var(--panel2);border:1px solid var(--line);border-radius:8px;color:var(--ink);
  padding:.5rem .7rem;font:inherit;min-width:200px;
}
.admin-card textarea{min-height:70px;resize:vertical}

/* --- Tabs, reference-server style ----------------------------------------- *
 * Underline + accent instead of a filled pill. With 14 categories the pills
 * read as a wall of buttons; the underline keeps the row quiet and makes the
 * active one obvious at a glance.
 * These rules come after the earlier .mall-tab block and deliberately override
 * it, so the pill styling above stays available for the admin's filter rows. */
.mall-tabs{
  display:flex;flex-wrap:wrap;gap:.15rem .35rem;align-items:center;
  border-bottom:1px solid var(--line);padding:0 0 .1rem;margin:0 0 1.25rem;
}
.mall-tabs .mall-tab{
  background:none;border:none;border-radius:0;color:var(--muted);
  padding:.5rem .7rem;font-size:.86rem;font-weight:600;
  border-bottom:2px solid transparent;margin-bottom:-1px;
}
.mall-tabs .mall-tab:hover{color:var(--ink);background:none;border-bottom-color:var(--line);text-decoration:none}
.mall-tabs .mall-tab.is-active{
  background:none;color:#4cc3ef;border-bottom-color:#4cc3ef;
}
.mall-tabs .mall-tab.is-active .tab-sprite{filter:none;opacity:1}
.mall-tabs .tab-sprite{opacity:.8}

/* The admin console's top nav keeps the old pill look; its order-status filter
 * uses .mall-tabs and picks up the underline treatment along with the shop. */
.admin-tabs .mall-tab{
  border:1px solid var(--line);border-radius:999px;background:var(--panel);
  padding:.4rem .85rem;margin-bottom:0;
}
.admin-tabs .mall-tab.is-active{background:var(--gold);border-color:var(--gold);color:#0f1115}

/* --- Undo `form .btn{width:100%}` where buttons sit inline ----------------- *
 * style.css:108 stretches every button inside a form to full width, which is
 * right for its stacked login/register forms but wrong for the mall's inline
 * rows -- it was pushing the search field down to 29px while the Cari button
 * took 710px. Restore natural width only where the button shares a line.     */
.mall-search .btn,
.checkout-panel .row .btn,
.qty-form .btn,
.charbox .btn,
.mall-table .btn{
  width:auto;margin-top:0;flex:none;
}
/* The add-to-cart button is the deliberate exception: it should fill its card. */
.addcart-form .btn-block{width:100%}

/* Search row: let the field take the slack, not the button. */
.mall-search{align-items:stretch}
.mall-search input[type=search]{flex:1 1 auto;min-width:0}

/* One height for the whole search row: the input, the sort select and the
 * button each pick a different intrinsic height otherwise (46/52/52). */
.mall-search{align-items:center}
.mall-search input[type=search],
.mall-search select,
.mall-search .btn{height:46px;padding-top:0;padding-bottom:0}

/* =============================================================================
 * RPG Hover Tooltip & Weapon Preview System (FWO Style)
 * ========================================================================== */

/* --- Rarity Colors & Borders --- */
.rarity-border-custom { border-color: rgba(236, 72, 153, 0.6) !important; box-shadow: 0 0 12px rgba(236, 72, 153, 0.15); }
.rarity-border-unique { border-color: rgba(255, 179, 0, 0.6) !important; box-shadow: 0 0 12px rgba(255, 179, 0, 0.15); }
.rarity-border-rare   { border-color: rgba(41, 182, 246, 0.5) !important; }
.rarity-border-magic  { border-color: rgba(102, 187, 106, 0.4) !important; }

.rarity-text-custom { color: #f472b6 !important; font-weight: 800; text-shadow: 0 0 8px rgba(244, 114, 182, 0.4); }
.rarity-text-unique { color: #ffb300 !important; font-weight: 800; text-shadow: 0 0 8px rgba(255, 179, 0, 0.4); }
.rarity-text-rare   { color: #38bdf8 !important; font-weight: 700; }
.rarity-text-magic  { color: #4ade80 !important; font-weight: 700; }

.type-pill {
  display: inline-block;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  color: var(--muted);
}

/* Aura Badges */
.aura-tag {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
}
/* Elemen Aura Badges */
.aura-tag.aura-fire { background: #dc2626; color: #ffffff; box-shadow: 0 0 10px rgba(239, 68, 68, 0.7); }
.aura-tag.aura-ice, .aura-tag.aura-cold { background: #0284c7; color: #ffffff; box-shadow: 0 0 10px rgba(56, 189, 248, 0.7); }
.aura-tag.aura-lightning { background: #eab308; color: #1e1b4b; font-weight: 900; box-shadow: 0 0 10px rgba(250, 204, 21, 0.8); }
.aura-tag.aura-poison { background: #16a34a; color: #ffffff; box-shadow: 0 0 10px rgba(34, 197, 94, 0.7); }
.aura-tag.aura-physical { background: #f8fafc; color: #0f172a; font-weight: 900; border: 1px solid #cbd5e1; box-shadow: 0 0 10px rgba(255, 255, 255, 0.85); }
.aura-tag.aura-holy { background: #d97706; color: #ffffff; box-shadow: 0 0 10px rgba(245, 158, 11, 0.7); }

/* Card Buttons Group */
.card-action-btns {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  margin-top: 0.4rem;
}
.btn-preview-item {
  width: 100%;
  border-color: rgba(201, 162, 75, 0.35);
  color: var(--gold2);
  font-size: 0.8rem;
  padding: 0.35rem 0.6rem;
  background: rgba(201, 162, 75, 0.05);
}
.btn-preview-item:hover {
  background: rgba(201, 162, 75, 0.15);
  border-color: var(--gold);
  color: #fff;
}

/* --- Floating RPG Tooltip --- */
.mall-card.has-tooltip { position: relative; }
.fwo-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 275px;
  background: linear-gradient(180deg, #151922 0%, #0c0e14 100%);
  border: 1px solid rgba(201, 162, 75, 0.6);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.95), 0 0 16px rgba(201, 162, 75, 0.25);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 1000;
  text-align: left;
}
.fwo-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: rgba(201, 162, 75, 0.6) transparent transparent transparent;
}
.mall-card:hover .fwo-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Tooltip Interior */
.tt-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}
.tt-name {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
}
.tt-rarity-pill {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.1rem 0.45rem;
  border-radius: 99px;
  white-space: nowrap;
}
.pill-custom { background: rgba(244, 114, 182, 0.2); color: #f472b6; border: 1px solid rgba(244, 114, 182, 0.4); }
.pill-unique { background: rgba(255, 179, 0, 0.2); color: #ffb300; border: 1px solid rgba(255, 179, 0, 0.4); }
.pill-rare   { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); }
.pill-magic  { background: rgba(74, 222, 128, 0.2); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.4); }

.tt-sub-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 0.3rem;
}
.tt-lvl-req { color: var(--gold2); font-weight: 700; }
.tt-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 75, 0.3), transparent);
  margin: 0.55rem 0;
}
.tt-stats { display: flex; flex-direction: column; gap: 0.2rem; }
.tt-stat-line {
  color: #a7f3d0;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.35;
}
.tt-aura {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  font-size: 0.75rem;
}
.tt-aura-icon { font-size: 1rem; }
.tt-aura-desc { font-size: 0.7rem; color: var(--muted); }
.aura-box-fire { background: rgba(185, 28, 28, 0.2); border: 1px solid rgba(239, 68, 68, 0.35); }
.aura-box-lightning { background: rgba(3, 105, 161, 0.2); border: 1px solid rgba(14, 165, 233, 0.35); }
.aura-box-cold { background: rgba(14, 116, 144, 0.2); border: 1px solid rgba(6, 182, 212, 0.35); }
.aura-box-holy { background: rgba(133, 77, 14, 0.2); border: 1px solid rgba(234, 179, 8, 0.35); }

.tt-blurb {
  font-size: 0.73rem;
  color: #cbd5e1;
  font-style: italic;
  line-height: 1.35;
}

/* --- Weapon / Item Preview Modal --- */
.fwo-modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(8, 10, 15, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.5rem;
}
.fwo-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 680px;
  background: #131720;
  border: 1px solid rgba(201, 162, 75, 0.5);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.9), 0 0 20px rgba(201, 162, 75, 0.2);
  padding: 1.8rem;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}
.fwo-modal-close {
  position: absolute;
  top: 0.9rem; right: 1.1rem;
  background: none; border: none;
  font-size: 1.6rem; color: var(--muted);
  cursor: pointer; line-height: 1;
}
.fwo-modal-close:hover { color: #fff; }

.fwo-modal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  align-items: center;
}
@media (max-width: 620px) {
  .fwo-modal-layout { grid-template-columns: 1fr; }
}

/* Preview Visual Showcase */
.fwo-preview-visual {
  text-align: center;
}
.wp-visual-stage {
  position: relative;
  width: 200px;
  height: 250px;
  margin: 0 auto;
  background: radial-gradient(circle, #1f2533 0%, #0d1017 75%);
  border: 1px solid #2a2f3a;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.wp-weapon-icon-wrap {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wp-real-image {
  max-height: 215px;
  max-width: 140px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.45));
  animation: weaponFloat 3s ease-in-out infinite;
}
@keyframes weaponFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(1.5deg); }
}
.wp-big-icon {
  font-size: 3.5rem;
  color: var(--gold2);
  filter: drop-shadow(0 0 10px rgba(201, 162, 75, 0.6));
}
.wp-aura-ring {
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  opacity: 0;
  transition: all 0.3s;
}
.wp-aura-ring.active {
  opacity: 0.85;
  animation: pulseAura 2.2s infinite ease-in-out;
}
@keyframes pulseAura {
  0% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 0.9; }
  100% { transform: scale(0.9); opacity: 0.5; }
}
.aura-glow-fire { box-shadow: inset 0 0 35px #ef4444, 0 0 45px #f97316; border: 2px solid #ef4444; }
.aura-glow-lightning { box-shadow: inset 0 0 35px #0ea5e9, 0 0 45px #38bdf8; border: 2px solid #0ea5e9; }
.aura-glow-cold { box-shadow: inset 0 0 35px #06b6d4, 0 0 45px #67e8f9; border: 2px solid #06b6d4; }
.aura-glow-poison { box-shadow: inset 0 0 35px #10b981, 0 0 45px #34d399; border: 2px solid #10b981; }
.aura-glow-holy { box-shadow: inset 0 0 35px #eab308, 0 0 45px #facc15; border: 2px solid #eab308; }

.stage-aura-fire { background: radial-gradient(circle, #381212 0%, #0d1017 75%); }
.stage-aura-lightning { background: radial-gradient(circle, #0e2738 0%, #0d1017 75%); }
.stage-aura-cold { background: radial-gradient(circle, #0c2b33 0%, #0d1017 75%); }
.stage-aura-poison { background: radial-gradient(circle, #0d331e 0%, #0d1017 75%); }
.stage-aura-holy { background: radial-gradient(circle, #382d0e 0%, #0d1017 75%); }

.wp-aura-status {
  font-size: 0.78rem;
  color: var(--gold2);
  margin-top: 0.75rem;
  font-weight: 700;
}

/* Modal Right Details */
.wp-badge-row { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.35rem; }
.wp-title { margin: 0 0 0.2rem; font-size: 1.35rem; font-weight: 800; }
.wp-lvl { color: var(--gold2); font-weight: 700; font-size: 0.88rem; margin-bottom: 0.8rem; }
.wp-sec-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0.75rem 0 0.35rem;
  font-weight: 700;
}
.wp-stats-box {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.wp-stat-line { color: #6ee7b7; font-size: 0.82rem; font-weight: 600; }
.wp-blurb-text { color: #cbd5e1; font-size: 0.82rem; font-style: italic; margin: 0; line-height: 1.4; }

.wp-purchase-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.wp-price-info .price-now { font-size: 1.25rem; }

/* =============================================================================
 * Close Beta (CBT) Feedback System Styles
 * ========================================================================== */

/* --- CBT Announcement Banner --- */
.cbt-banner {
  background: linear-gradient(135deg, rgba(229, 169, 60, 0.15) 0%, rgba(20, 24, 33, 0.95) 100%);
  border: 1px solid rgba(229, 169, 60, 0.4);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 0 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}
.cbt-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
  background: var(--gold);
}
.cbt-banner-content {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex: 1;
  min-width: 260px;
}
.cbt-banner-icon {
  font-size: 1.8rem;
  line-height: 1;
}
.cbt-banner-title {
  font-weight: 800;
  font-size: 1rem;
  color: var(--gold2);
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cbt-pill-badge {
  font-size: 0.68rem;
  background: rgba(229, 169, 60, 0.2);
  border: 1px solid var(--gold);
  color: var(--gold2);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.cbt-banner-text {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.35;
}

/* --- Floating Feedback Action Button (FAB) --- */
.cbt-fab-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 990;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #e5a93c 0%, #b3791a 100%);
  color: #0d1017 !important;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 16px rgba(229, 169, 60, 0.35);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none !important;
}
.cbt-fab-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 24px rgba(229, 169, 60, 0.6);
  color: #000 !important;
}
.cbt-fab-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: cbtPulse 1.8s infinite;
}
@keyframes cbtPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* --- Feedback Modal Dialog --- */
.feedback-modal-dialog {
  max-width: 660px;
  max-height: 90vh;
  overflow-y: auto;
  border-color: rgba(229, 169, 60, 0.6);
}
.feedback-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.85rem;
  margin-bottom: 1.15rem;
}
.feedback-head h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gold2);
  margin: 0 0 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.feedback-head p {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0;
}
.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.feedback-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.feedback-form label > span {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
}
.feedback-form label > span .req {
  color: var(--red);
  margin-left: 0.2rem;
}
.feedback-form input[type=text],
.feedback-form input[type=url],
.feedback-form select,
.feedback-form textarea {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  padding: 0.6rem 0.85rem;
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.15s ease;
}
.feedback-form input:focus,
.feedback-form select:focus,
.feedback-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(229, 169, 60, 0.2);
}
.feedback-form textarea {
  resize: vertical;
  min-height: 80px;
}
.feedback-hint {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.3;
}

/* Severity Radio Cards */
.severity-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}
.severity-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 8px;
  padding: 0.55rem 0.4rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.severity-card input[type=radio] {
  display: none;
}
.severity-card .sev-title {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}
.severity-card .sev-sub {
  font-size: 0.68rem;
  color: var(--muted);
}
.severity-card.sev-low:hover,
.severity-card.sev-low.is-checked {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}
.severity-card.sev-normal:hover,
.severity-card.sev-normal.is-checked {
  border-color: #e5a93c;
  background: rgba(229, 169, 60, 0.1);
}
.severity-card.sev-critical:hover,
.severity-card.sev-critical.is-checked {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}
.severity-card.is-checked {
  outline: 2px solid currentColor;
}
.severity-card.sev-low.is-checked { color: #38bdf8; }
.severity-card.sev-normal.is-checked { color: #e5a93c; }
.severity-card.sev-critical.is-checked { color: #ef4444; }

/* Star Rating Control */
.star-rating-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.star-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #4b5563;
  padding: 0;
  line-height: 1;
  transition: color 0.15s ease, transform 0.1s ease;
}
.star-btn:hover {
  transform: scale(1.2);
}
.star-btn.is-active {
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}
.star-label-text {
  font-size: 0.82rem;
  color: var(--gold2);
  font-weight: 600;
  margin-left: 0.4rem;
}


/* --- Mod Beta (2026-10-07) --- */
.beta-banner {
  margin: 0 0 1rem;
  padding: 0.8rem 1.2rem;
  border: 1px solid rgba(229,169,60,0.65);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(229,169,60,0.16), rgba(229,169,60,0.05));
  color: #f5d67b;
  text-align: center;
  font-size: 0.95rem;
}
.price-now.is-free {
  color: #f5d67b;
  font-weight: 700;
  border: 1px solid rgba(229,169,60,0.6);
  border-radius: 999px;
  padding: 0.1rem 0.7rem;
}
.admin-card.beta-card {
  border: 1px solid rgba(229,169,60,0.4);
}
.admin-card.beta-card.is-on {
  border-color: rgba(224,82,82,0.65);
  background: linear-gradient(135deg, rgba(224,82,82,0.10), transparent);
}

/* --- Top-up tiers (topup.php) ------------------------------------------------ */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}
.tier-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1.1rem 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tier-card:hover {
  border-color: rgba(229,169,60,0.7);
  box-shadow: 0 0 12px rgba(229,169,60,0.15);
}
.tier-card input[type="radio"] {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
}
/* "Paling Berbaloi": tanda halus sahaja (dashed malap) supaya tidak
 * dikelirukan dengan highlight pilihan. Badge kekal sebagai penanda utama. */
.tier-card.is-best {
  border-style: dashed;
  border-color: rgba(229,169,60,0.45);
  background: linear-gradient(135deg, rgba(229,169,60,0.06), transparent);
}
/* Pakej yang sedang dipilih: highlight emas terang ikut berpindah. */
.tier-card:has(input[type="radio"]:checked) {
  border-style: solid;
  border-color: #f5d67b;
  box-shadow: 0 0 16px rgba(245,214,123,0.35);
  background: linear-gradient(135deg, rgba(245,214,123,0.10), transparent);
}
.tier-best {
  font-size: 0.7rem;
  font-weight: 700;
  color: #1a1206;
  background: linear-gradient(135deg, #f5d67b, #e5a93c);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
}
.tier-label {
  font-size: 0.85rem;
  color: var(--muted);
}
.tier-rm {
  font-size: 1.5rem;
  font-weight: 800;
  color: #f5d67b;
}
.tier-pts {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.tier-hero {
  font-size: 0.8rem;
  color: var(--gold2);
}

/* --- Payer details (top-up) -------------------------------------------------
 * Collected once, saved per account, sent with every bill so ToyyibPay's
 * hosted form comes pre-filled on repeat purchases. */
.payer-grid{display:grid;gap:.6rem;margin:1.2rem 0;padding:1rem 1.1rem;
  border:1px solid var(--line);border-radius:12px;background:rgba(0,0,0,.3)}
.payer-grid h3{margin:0;color:var(--gold);font-size:1rem}
.payer-grid .mall-sub{margin:0}
.payer-grid label{display:flex;flex-direction:column;gap:.3rem;font-size:.85rem;color:var(--muted)}
.payer-grid input[type=text],.payer-grid input[type=email],.payer-grid input[type=tel]{
  background:var(--panel2);border:1px solid var(--line);border-radius:8px;color:var(--ink);
  padding:.55rem .7rem;font:inherit;max-width:420px}
.payer-grid input:focus{outline:2px solid var(--gold);outline-offset:1px}
