/* Topup game page — follows the navy/gold theme of styles.css */
#page-topup .topup-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:22px;align-items:start;padding-bottom:60px}
.topup-section{padding:18px;margin-bottom:16px}
.topup-step{font-size:10px;letter-spacing:2px;color:var(--gold);margin:0 0 12px;text-transform:uppercase}
.topup-muted{color:var(--muted);font-size:12px}
.topup-brands{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px}
.topup-brand{display:flex;flex-direction:column;align-items:center;gap:6px;padding:14px 8px;background:#0b1727;border:1px solid var(--line);border-radius:2px;color:var(--text);cursor:pointer;text-align:center}
.topup-brand b{font-size:12px}.topup-brand small{font-size:10px;color:var(--muted)}
.topup-brand-icon{width:46px;height:46px;display:grid;place-items:center;font:700 16px Georgia,serif;color:#110e09;background:linear-gradient(110deg,#9d753a,#f5dfaa 45%,#be985a)}
.topup-brand.active,.topup-item.active{border-color:#f1d49b;background:linear-gradient(0deg,#d5b78433,#0b1727);box-shadow:0 0 14px #e6bc6930}
.topup-fields{display:grid;gap:10px}
.topup-field{display:flex;flex-direction:column;gap:6px;font-size:10px;letter-spacing:1px;color:var(--muted)}
.topup-field input,.topup-field select{height:42px;background:#050c17;border:1px solid #a58a5680;border-radius:2px;color:var(--text);padding:0 12px;font-size:14px}
.topup-field input:focus,.topup-field select:focus{outline:none;border-color:#f1d49b}
.topup-account{margin-top:10px;padding:9px 12px;font-size:12px;border:1px solid var(--line);background:#0b1727}
.topup-account.ok{color:#58e695;border-color:#58e69566;background:#0f2a1f}
.topup-account.bad{color:#ef6a75;border-color:#ef6a7566;background:#2a0f14}
.topup-group+.topup-group{margin-top:14px}
.topup-group-title{font-size:11px;color:#ffe5b7;margin-bottom:8px}
.topup-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px}
.topup-item{display:flex;flex-direction:column;gap:4px;padding:11px 8px;background:#0b1727;border:1px solid var(--line);border-radius:2px;color:var(--text);cursor:pointer;text-align:center}
.topup-item b{font-size:12px;line-height:1.3}.topup-item span{font-size:12px;color:var(--gold)}
#page-topup aside{position:sticky;top:20px}
.topup-summary{padding:18px}
.topup-summary .topup-total{font:28px Georgia,serif;color:var(--gold);margin:4px 0 14px}
.topup-summary .button{width:100%}
.topup-summary .button[disabled]{opacity:.45;cursor:not-allowed}
.topup-pay{padding:18px;margin-top:16px}
.topup-pay-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px}
.topup-pay-head h3{margin:0;font:400 19px Georgia,serif;color:#f1e7d8}
.topup-rows div{display:flex;justify-content:space-between;gap:12px;padding:5px 0;font-size:12px;border-bottom:1px solid #a58a5633}
.topup-rows span{color:var(--muted)}.topup-rows b{font-weight:400;color:#e8d9b9;text-align:right;overflow-wrap:anywhere}
.topup-qr{text-align:center;margin-top:12px}
.topup-qr img{width:min(240px,100%);background:#fff;padding:8px}
.topup-qr p{font-size:11px;color:var(--muted)}
.topup-note{font-size:12px;padding:10px;border:1px solid var(--line);background:#0b1727;margin:12px 0 0}
.topup-note.ok{color:#58e695}.topup-note.bad{color:#ef6a75}.topup-note.warn{color:#ffd776}
.topup-badge{font-size:9px;font-weight:700;letter-spacing:1px;padding:4px 8px;border:1px solid currentColor;white-space:nowrap}
.topup-badge.ok{color:#58e695}.topup-badge.bad{color:#ef6a75}.topup-badge.proc{color:#7fb6ff}.topup-badge.wait{color:var(--gold)}.topup-badge.warn{color:#ffd776}.topup-badge.muted{color:var(--muted)}
.topup-history{display:flex;flex-direction:column;gap:8px}
.topup-history-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;background:#0b1727;border:1px solid var(--line);color:var(--text);text-align:left;cursor:pointer}
.topup-history-row b{display:block;font-size:12px}.topup-history-row small{font-size:10px;color:var(--muted)}
.topup-check{display:flex;align-items:center;gap:8px;font-size:12px;margin:8px 0}
.topup-owner-cols{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:16px 0}
.topup-owner-box{padding:18px}.topup-owner-box h3{margin:0;font:400 18px Georgia,serif}
.topup-owner-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:10px 0}
.topup-owner-brands{max-height:320px;overflow:auto}
.topup-owner-stats{grid-template-columns:repeat(5,minmax(0,1fr))}
@media (max-width:900px){
  #page-topup aside{position:static}
  #page-topup .topup-layout{grid-template-columns:1fr}
  .topup-summary{position:fixed;left:0;right:0;bottom:0;top:auto;z-index:50;display:flex;align-items:center;gap:12px;padding:12px 16px;background:#07101ef7}
  .topup-summary .button{width:auto;flex:1}
  #page-topup .topup-layout{padding-bottom:110px}
  .topup-summary .topup-step,.topup-summary .topup-muted{display:none}
  .topup-summary .topup-total{margin:0;font-size:22px}
  .topup-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .topup-owner-cols,.topup-owner-grid{grid-template-columns:1fr}
  .topup-owner-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
}

.topup-owner-search{width:100%;height:38px;margin:6px 0 10px;background:#050c17;border:1px solid #a58a5680;color:var(--text);padding:0 10px}
#owner-tab-topup .topup-check,#page-topup .topup-check{display:flex!important;flex-direction:row!important;align-items:center;justify-content:flex-start;text-align:left;gap:10px;width:100%;margin:6px 0}
#owner-tab-topup .topup-check input{width:16px!important;height:16px!important;min-height:0;flex:0 0 16px;margin:0;padding:0}
#owner-tab-topup .topup-owner-brands label{padding:6px 4px;border-bottom:1px solid #a58a5622}
#owner-tab-topup .topup-owner-search{display:block}
#owner-tab-topup .topup-resync{margin-left:auto;min-height:0;padding:4px 10px;font-size:10px}

.topup-tabs{display:flex;gap:6px;overflow-x:auto;padding-bottom:6px;margin-bottom:12px;scrollbar-width:thin}
.topup-tab{flex:0 0 auto;display:flex;align-items:center;gap:6px;padding:9px 14px;background:#0b1727;border:1px solid var(--line);color:var(--text);font-size:12px;cursor:pointer;white-space:nowrap}
.topup-tab small{font-size:9px;color:var(--muted);border:1px solid var(--line);padding:1px 6px;border-radius:99px}
.topup-tab.active{background:linear-gradient(110deg,#9d753a,#f5dfaa 45%,#be985a);color:#110e09;border-color:#f1d49b;font-weight:700}
.topup-tab.active small{color:#110e09;border-color:#110e0955}
.topup-item{position:relative;padding-top:10px}
.topup-item-icon{font-style:normal;font-size:20px;line-height:1}
.topup-notice{border:1px solid #ffd77655;background:#2a220f;color:#f6dcb0;padding:10px 14px;margin:0 0 12px;font-size:12px}
.topup-notice ul{margin:6px 0 0;padding-left:18px;line-height:1.7}

/* Mobile overflow fix: grid children must be allowed to shrink (tabs row is nowrap). */
#page-topup .topup-layout{width:min(1400px,calc(100% - 32px))}
#page-topup .topup-layout>*{min-width:0}
#page-topup .topup-section,#page-topup .topup-pay{max-width:100%;overflow:hidden}
@media (max-width:900px){
  #page-topup .topup-layout{width:calc(100% - 24px);gap:12px}
  #page-topup .topup-section{padding:14px}
  .topup-brands{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .topup-brand{padding:10px 4px}
  .topup-brand-icon{width:38px;height:38px;font-size:13px}
  .topup-brand b{font-size:11px;line-height:1.25;overflow-wrap:anywhere}
  .topup-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .topup-fields{grid-template-columns:1.4fr 1fr!important}
  .topup-notice{font-size:11px}
}

.topup-pay-page{max-width:560px;margin:0 auto;padding:24px 0 60px;width:calc(100% - 24px)}
.topup-back{display:inline-block;color:var(--gold);font-size:12px;margin-bottom:12px;text-decoration:none}
.topup-countdown{margin:0 0 8px;font-size:12px;color:#ffd776}
.topup-pay-actions{display:flex;gap:8px;margin-top:14px}
.topup-pay-actions .button{flex:1;text-align:center}
