:root{
  --ink:#172033;
  --muted:#667085;
  --line:#e4e7ec;
  --paper:#fff;
  --canvas:#f7f8fa;
  --primary:#2563eb;
  --primary-dark:#1d4ed8;
  --accent:#eff6ff;
  --danger:#d92d20;
  --warning:#b54708;
  --sidebar:#101828;
  --radius:6px;
  --shadow:0 1px 2px rgba(16,24,40,.05),0 1px 3px rgba(16,24,40,.08)
}

html{font-size:14px}
body{background:var(--canvas);color:var(--ink);-webkit-font-smoothing:antialiased}
.app-shell{grid-template-columns:248px minmax(0,1fr)}
.sidebar{width:248px;padding:20px 12px;background:var(--sidebar);border-right:1px solid #1d2939}
.brand{min-height:52px;padding:0 10px 20px;gap:12px;border-bottom:1px solid #263244;margin-bottom:15px}
.brand-mark{width:38px;height:34px;border-radius:6px;background:#fff;color:#101828;font-size:13px;font-weight:800;letter-spacing:0}
.brand strong{font-size:15px;font-weight:700;letter-spacing:0}
.brand small{font-size:11px;color:#98a2b3;margin-top:3px}
.sidebar nav{gap:3px}
.sidebar nav a{min-height:42px;padding:10px 12px;border-radius:6px;color:#98a2b3;font-size:13px;font-weight:500;transition:background .15s,color .15s}
.sidebar nav a svg{width:18px;height:18px;flex:0 0 18px}
.sidebar nav a:hover{background:#1d2939;color:#f2f4f7}
.sidebar nav a.active{background:#344054;color:#fff;box-shadow:none}
.sidebar nav a.active svg{color:#84adff}
.sidebar-foot{padding:16px 10px 0;border-color:#263244;color:#d0d5dd}
.main{background:var(--canvas)}
.topbar{height:64px;padding:0 32px;background:rgba(255,255,255,.96);backdrop-filter:blur(8px);gap:16px}
.balance-chip{height:36px;padding:0 14px;border:1px solid var(--line);border-radius:6px;gap:8px;background:#fff}
.balance-chip>span{color:#667085}
.balance-chip strong{font-size:13px}
.balance-chip .icon-btn{margin-right:-7px}
.icon-btn{width:34px;height:34px;display:inline-grid;place-items:center;border-radius:6px;color:#667085;padding:0;transition:background .15s,color .15s}
.icon-btn:hover{background:#f2f4f7;color:#344054}
.icon-btn svg{width:17px;height:17px}
.user-chip{padding-left:2px;gap:10px}
.user-chip strong{font-size:13px;font-weight:600}
.avatar{width:34px;height:34px;background:#eaf0ff;color:#2457bd;border:1px solid #d4e1ff;font-size:12px}
.content{max-width:1520px;padding:28px 32px 44px}
.page-head{align-items:center;margin-bottom:22px}
.page-head h1{margin:0 0 5px;font-size:24px;line-height:1.3;font-weight:700}
.page-head p,.panel-head p{font-size:13px;color:#667085}
.eyebrow{display:none}
.btn{min-height:36px;padding:8px 14px;border-radius:6px;font-size:13px;font-weight:600;line-height:1.2;box-shadow:0 1px 1px rgba(16,24,40,.03);transition:background .15s,border-color .15s,box-shadow .15s}
.btn.primary{background:var(--primary);border-color:var(--primary)}
.btn.primary:hover{background:var(--primary-dark);border-color:var(--primary-dark)}
.btn.secondary{border-color:#d0d5dd;color:#344054;background:#fff}
.btn.secondary:hover{background:#f9fafb;border-color:#98a2b3}
.btn.big{min-height:46px;font-size:14px}
.btn.small,.btn.tiny,.tiny{min-height:30px;padding:6px 9px!important;font-size:12px}
.notice{min-height:44px;padding:11px 14px;border:1px solid #b2ddff;border-left-width:3px;border-radius:6px;background:#eff8ff;color:#175cd3;gap:12px}
.notice strong{color:#1849a9}
.stat-grid{gap:14px;margin-bottom:18px}
.stat-card{min-height:120px;padding:18px 20px;border-color:var(--line);box-shadow:var(--shadow)}
.stat-card>span{font-size:12px;font-weight:500}
.stat-card strong{font-size:26px;line-height:1.15;margin:15px 0 7px;font-variant-numeric:tabular-nums}
.stat-card small{color:#98a2b3}
.stat-card.accent{background:#101828;border-color:#101828}
.stat-card.accent>span,.stat-card.accent small{color:#98a2b3}
.panel,.table-panel,.product-admin-card{border-color:var(--line);box-shadow:var(--shadow)}
.panel{padding:20px}
.panel-head{margin-bottom:16px}
.panel-head h2,.product-card-head h2{font-size:15px;font-weight:650}
.bar-chart{height:260px;background:linear-gradient(to bottom,transparent 24%,#f2f4f7 25%,transparent 26%,transparent 49%,#f2f4f7 50%,transparent 51%,transparent 74%,#f2f4f7 75%,transparent 76%)}
.bar{background:#528bff;border-radius:3px 3px 0 0}
.filterbar,.range-tabs{min-height:58px;padding:10px 12px;margin-bottom:14px;border-color:var(--line);box-shadow:var(--shadow);align-items:center}
.filterbar input,.filterbar select{height:36px}
input,select,textarea{border-color:#d0d5dd;border-radius:6px;padding:8px 10px;font-size:13px;min-height:36px}
input[type="checkbox"]{width:16px;height:16px;min-height:16px;padding:0;margin:0;accent-color:#2563eb;border-radius:4px;cursor:pointer;vertical-align:middle}
input[type="checkbox"]:focus-visible{outline:2px solid #84adff;outline-offset:2px;box-shadow:none}
input[type="checkbox"]:disabled{cursor:not-allowed;opacity:.45}
input::placeholder,textarea::placeholder{color:#98a2b3}
input:focus,select:focus,textarea:focus{border-color:#84adff;box-shadow:0 0 0 3px rgba(46,112,255,.12)}
.table-panel{border-radius:6px}
table{font-variant-numeric:tabular-nums}
th{height:42px;padding:10px 14px;background:#f9fafb;color:#667085;font-size:11px;font-weight:600;text-transform:none}
td{height:54px;padding:11px 14px;font-size:12px;color:#344054}
td.actions{display:table-cell;white-space:nowrap;vertical-align:middle}
td.actions>*{display:inline-flex;vertical-align:middle;margin-right:6px}
td.actions>*:last-child{margin-right:0}
tbody tr:hover td{background:#fcfcfd}
td strong{color:#101828;font-weight:600}
.badge{padding:4px 7px;border-radius:4px;font-size:11px;font-weight:600}
.badge.success,.badge.active{background:#ecfdf3;color:#027a48}
.badge.pending{background:#fffaeb;color:#b54708}
.badge.failed,.badge.refunded,.badge.disabled{background:#fef3f2;color:#b42318}
.link-button{color:#175cd3;font-size:12px;font-weight:600}
.btn.danger-btn{background:#d92d20!important;border-color:#d92d20!important;color:#fff!important}
.btn.danger-btn:hover{background:#b42318!important;border-color:#b42318!important;color:#fff!important}
.btn.success-btn{background:#039855!important;border-color:#039855!important;color:#fff!important}
.btn.success-btn:hover{background:#027a48!important;border-color:#027a48!important;color:#fff!important}
.order-monitor-table{table-layout:fixed;min-width:1160px}
.order-monitor-table .col-index{width:50px}
.order-monitor-table .col-order{width:auto}
.order-monitor-table .col-agent{width:100px}
.order-monitor-table .col-product{width:130px}
.order-monitor-table .col-amount{width:120px}
.order-monitor-table .col-status{width:100px}
.order-monitor-table .col-message{width:150px}
.order-monitor-table .col-actions{width:170px}
.cell-ellipsis{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#475467;cursor:help}
.cell-ellipsis:focus-visible{outline:2px solid #84adff;outline-offset:3px;border-radius:2px}
.error-popover{position:fixed;z-index:300;width:min(480px,calc(100vw - 32px));padding:14px;background:#fff;border:1px solid #d0d5dd;border-radius:6px;box-shadow:0 16px 36px rgba(16,24,40,.18)}
.error-popover[hidden]{display:none}
.error-popover-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;color:#344054;font-size:12px;font-weight:600}
.error-popover pre{max-height:220px;margin:0;padding:11px 12px;overflow:auto;border:1px solid #eaecf0;border-radius:5px;background:#f9fafb;color:#344054;font:12px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere;user-select:text}
.stock-value{border-radius:4px;background:#ecfdf3;color:#027a48}
.pagination{margin-top:14px}
.page-btn{border-radius:5px}
.page-btn.active{background:#eff4ff;border-color:#b2ccff;color:#3538cd}

.checkout-layout{grid-template-columns:minmax(0,1.35fr) minmax(310px,.65fr);gap:16px;align-items:stretch}
.checkout-panel{padding:24px}
.checkout-panel>.form-row{max-width:720px}
.form-row label,.stack-form label,.checkout-controls label{font-size:12px;color:#344054}
.product-picker input{height:42px;font-size:14px}
.product-options{border-radius:6px;border-color:#d0d5dd;box-shadow:0 12px 24px rgba(16,24,40,.12)}
.product-option{border-radius:5px;font-size:13px}
.product-option:hover{background:#eff4ff;color:#1849a9}
.sku-area{min-height:174px;padding:25px 0}
.sku-area>label{font-weight:600;color:#344054}
.sku-options{gap:10px}
.sku-option{min-height:88px;padding:14px 16px;border-color:#d0d5dd;background:#fff}
.sku-option:hover:not(:disabled){border-color:#84adff;background:#f9fbff}
.sku-option.active{border-color:#528bff;background:#eff4ff;box-shadow:0 0 0 1px #528bff}
.sku-option strong{font-size:14px;color:#101828}
.sku-facts{margin-top:10px;gap:16px}
.sku-label{font-size:12px;color:#667085}
.sku-price{color:#101828}
.sku-stock{color:#027a48}
.sku-stock.low{color:#b54708}
.checkout-controls{min-height:96px;padding:18px 0;border-color:var(--line)}
.stepper{grid-template-columns:36px 58px 36px}
.stepper button{background:#f9fafb;color:#344054}
.total>span{margin-bottom:5px}
.total strong,.total strong small,.total strong>#totalPrice{font-size:30px!important;color:#101828;font-weight:700}
.game-preview{min-height:438px;border:1px solid #344054;background:#101828}
.game-preview:after{inset:35% 0 0;background:linear-gradient(transparent,rgba(16,24,40,.98))}
.game-meta{left:22px;right:22px;bottom:22px}
.game-meta span{color:#84adff;letter-spacing:0;font-weight:600}
.game-meta h2{font-size:20px}
.preview-empty span{font-size:20px;color:#d0d5dd}
.product-showcase{margin-top:28px;padding-top:24px;border-top:1px solid #e4e7ec}
.showcase-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:16px}
.showcase-head h2{margin:0 0 4px;font-size:17px;color:#101828}
.showcase-head p{margin:0;color:#667085;font-size:12px}
.showcase-head>span{color:#98a2b3;font-size:12px}
.product-showcase-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px}
.product-showcase-card{min-width:0;overflow:hidden;border:1px solid #e4e7ec;border-radius:7px;background:#fff;box-shadow:var(--shadow);transition:transform .15s,border-color .15s,box-shadow .15s}
.product-showcase-card:hover{transform:translateY(-2px);border-color:#b2ccff;box-shadow:0 8px 20px rgba(16,24,40,.1)}
.product-showcase-card img{display:block;width:100%;aspect-ratio:460/215;object-fit:cover;background:#eaecf0}
.product-showcase-body{display:grid;gap:12px;padding:12px}
.product-showcase-body h3{height:38px;margin:0;overflow:hidden;color:#101828;font-size:13px;line-height:19px;font-weight:600}
.product-showcase-body .btn{width:100%;min-height:32px;padding:7px 10px;font-size:12px}
.modal-backdrop{background:rgba(16,24,40,.6);backdrop-filter:blur(2px)}
.modal{width:min(560px,calc(100vw - 48px));border-radius:8px;padding:32px 34px 34px;box-shadow:0 24px 48px rgba(16,24,40,.24)}
.modal h2{font-size:18px}
.modal>p{margin-bottom:24px;line-height:1.65}
.modal .stack-form{gap:18px}
.modal .stack-form label{gap:8px}
.modal .stack-form .btn{margin-top:4px}
.modal .close{right:18px;top:16px}
.modal-actions{margin-top:24px;gap:12px}
.page-admin-products .modal{width:min(760px,calc(100vw - 64px));padding:38px 42px 40px}
.page-admin-products .modal:has(.search-select){min-height:720px}
.page-admin-products .modal .search-select-options{max-height:340px}
.sku-row-inactive{background:#f9fafb;opacity:.72}
.sku-row-inactive .badge{display:inline-block;margin-left:8px;vertical-align:1px}
.sku-drag-list>[data-sku-id]{transition:background .15s,opacity .15s;cursor:grab}
.sku-drag-list>[data-sku-id]:active{cursor:grabbing}
.sku-drag-list>[data-sku-id].dragging{opacity:.45;background:#eff4ff}
.sku-drag-handle{display:flex;align-items:center;gap:6px}
.sku-drag-handle svg{width:14px;height:14px;color:#98a2b3;flex:none}
.announcement-trigger{position:relative;margin-right:2px}
.announcement-trigger svg{width:18px;height:18px}
.announcement-dot{position:absolute;top:6px;right:6px;width:6px;height:6px;border-radius:50%;background:#f04438;border:1px solid #fff}
.announcement-modal{padding:8px 4px 0}
.announcement-kicker{display:flex;align-items:center;gap:7px;color:#175cd3;font-size:12px;font-weight:700;margin-bottom:10px}
.announcement-kicker svg{width:16px;height:16px}
.announcement-body{white-space:pre-wrap;min-height:110px;padding:16px;border:1px solid #e4e7ec;border-radius:6px;background:#f9fafb;color:#344054;font-size:14px;line-height:1.8}
.announcement-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}
.announcement-admin-layout{display:grid;grid-template-columns:minmax(320px,.9fr) minmax(440px,1.1fr);gap:16px}
.announcement-editor textarea{min-height:260px;resize:vertical}
.announcement-history{display:grid;gap:12px}
.announcement-history-item{display:flex;justify-content:space-between;gap:18px;padding:15px 0;border-bottom:1px solid #edf0f3}
.announcement-history-item p{margin:10px 0 0;color:#344054;font-size:13px;line-height:1.7;white-space:pre-wrap}
.announcement-history-meta{display:flex;align-items:center;gap:10px;color:#98a2b3;font-size:11px}
.announcement-history-item form{flex:none}
.announcement-history-actions{display:flex;align-items:flex-start;gap:8px;flex:none}
.trend-chart{position:relative;height:290px;min-width:0}
.chart-legend{display:flex;align-items:center;gap:16px;color:#667085;font-size:11px}
.chart-legend span{display:inline-flex;align-items:center;gap:6px}
.chart-legend span:before{content:"";width:9px;height:9px;border-radius:2px;background:#2563eb}
.chart-legend .cards:before{border-radius:50%;background:#039855}
.search-select{position:relative}
.search-select-input{padding-right:36px;background:#fff}
.search-select:after{content:"";position:absolute;right:14px;top:15px;width:7px;height:7px;border-right:1.5px solid #667085;border-bottom:1.5px solid #667085;transform:rotate(45deg);pointer-events:none}
.search-select-options{position:absolute;z-index:120;top:calc(100% + 6px);left:0;right:0;max-height:240px;overflow:auto;padding:6px;background:#fff;border:1px solid #d0d5dd;border-radius:6px;box-shadow:0 12px 24px rgba(16,24,40,.14)}
.search-select-options[hidden]{display:none}
.search-select-option{display:block;width:100%;padding:10px 11px;border:0;border-radius:5px;background:#fff;color:#344054;text-align:left;font-size:12px;line-height:1.45}
.search-select-option:hover,.search-select-option:focus{background:#eff4ff;color:#1849a9;outline:0}
.search-select-empty{padding:14px 10px;color:#98a2b3;text-align:center;font-size:12px}
.toast{border-radius:6px;background:#101828;box-shadow:0 10px 30px rgba(16,24,40,.2)}
.range-picker-trigger:before{content:""}
.range-picker-trigger{border-radius:6px;border-color:#d0d5dd;color:#344054}
.range-picker-trigger.active,.range-tabs button.active{background:#eff4ff;border-color:#b2ccff;color:#3538cd}
.range-tabs button:hover,.range-preset:hover{background:#f9fafb;border-color:#98a2b3;color:#344054}
.sales-range-tabs label{display:flex;align-items:center;gap:8px;margin-left:auto;color:#667085;font-size:12px;font-weight:600}
.sales-range-tabs label select{width:150px}
.date-dialog{border-radius:8px}
.calendar-day.selected{background:#2563eb}
.calendar-day.between{background:#eff4ff;color:#1849a9}
.login-visual{background:#101828}
.login-visual:after{content:"678";color:rgba(255,255,255,.025)}
.visual-copy .eyebrow{display:inline;color:#84adff;letter-spacing:0}
.visual-copy h1{font-size:clamp(34px,4.2vw,58px);font-weight:700}
.visual-brand .brand-mark{background:#fff;color:#101828}
.login-form .eyebrow{display:inline;color:#175cd3;letter-spacing:0}
.login-form h2{font-size:26px}

@media(max-width:1100px){.stat-grid.five{grid-template-columns:repeat(3,1fr)}.checkout-layout{grid-template-columns:1fr}.game-preview{min-height:280px;order:-1}.product-showcase-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:900px){.announcement-admin-layout{grid-template-columns:1fr}.page-admin-products .modal:has(.search-select){min-height:0}.product-showcase-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){
  .topbar{height:58px;padding:0 12px}.content{padding:20px 14px 34px}.page-head{align-items:flex-start}.sidebar{width:248px}
  .stat-grid,.stat-grid.four,.stat-grid.five,.stat-grid.three,.stat-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stat-card{min-height:105px;padding:14px}.stat-card strong{font-size:21px}
  .filterbar{align-items:stretch;flex-wrap:wrap}.filterbar input{min-width:0;flex:1 1 190px}.filterbar select{flex:1 1 140px}
  .table-panel{margin-inline:-14px;border-left:0;border-right:0;border-radius:0}
  .product-showcase-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  th,td{padding-inline:12px}.checkout-panel{padding:18px}.game-preview{min-height:220px}
}
@media(max-width:460px){
  .stat-grid,.stat-grid.four,.stat-grid.five,.stat-grid.three,.stat-grid.two{grid-template-columns:1fr}
  .page-head h1{font-size:22px}.balance-chip{padding:0 8px}.user-chip{display:none}.checkout-controls{gap:16px}.total{text-align:left}.total strong{justify-content:flex-start}
  .modal{width:calc(100vw - 24px);padding:28px 22px 24px}
  .product-showcase-grid{grid-template-columns:1fr}
  .page-admin-products .modal{width:calc(100vw - 24px);padding:28px 22px 24px}
}
