:root{
  --bg:#eef3f8;
  --surface:#fff;
  --surface-soft:#f8fafc;
  --surface-hover:#f5f8ff;
  --text:#111827;
  --text-soft:#374151;
  --muted:#667085;
  --border:#dfe3ea;
  --border-soft:#edf0f4;
  --primary:#2563eb;
  --primary-strong:#1d4ed8;
  --primary-soft:#eff6ff;
  --on-primary:#fff;
  --success:#15803d;
  --success-strong:#166534;
  --danger:#b42318;
  --danger-soft:#fee4e2;
  --warning-bg:#fff7ed;
  --warning-text:#9a3412;
  --warning-border:#fed7aa;
  --ring:rgba(37,99,235,.28);
  --shadow:0 14px 36px rgba(16,24,40,.08),0 1px 2px rgba(16,24,40,.05);
  --shadow-soft:0 1px 3px rgba(16,24,40,.06);
  --radius:8px;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  min-height:100dvh;
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",Arial,sans-serif;
  font-size:15px;
  line-height:1.55;
}
body.admin-shell,body.agent-shell{
  padding-left:216px;
  background:
    linear-gradient(180deg,#f8fbff 0,#eef3f8 360px,#eef3f8 100%);
}
a{color:var(--primary);text-decoration:none}
a:hover{color:var(--primary-strong)}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible{
  outline:3px solid var(--ring);
  outline-offset:2px;
}
.top{
  position:sticky;
  top:0;
  z-index:10;
  display:flex;
  gap:6px;
  align-items:center;
  min-height:56px;
  background:rgba(255,255,255,.96);
  border-bottom:1px solid var(--border);
  padding:8px 24px;
  backdrop-filter:saturate(180%) blur(10px);
  overflow-x:auto;
}
.top a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  color:var(--text-soft);
  padding:0 12px;
  border-radius:7px;
  font-weight:600;
  white-space:nowrap;
  transition:background-color .18s ease,color .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.top a:first-child{
  color:var(--text);
  font-size:16px;
  font-weight:800;
  padding-left:2px;
  margin-right:8px;
}
.top a:hover{background:var(--surface-soft);color:var(--text)}
.top span{flex:1;min-width:16px}
body.admin-shell .top,body.agent-shell .top{
  position:fixed;
  left:0;
  top:0;
  bottom:0;
  width:216px;
  min-height:100dvh;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
  padding:18px 14px;
  overflow-y:auto;
  background:#0b1220;
  border-right:1px solid rgba(255,255,255,.08);
  border-bottom:0;
  box-shadow:10px 0 30px rgba(15,23,42,.12);
}
body.admin-shell .top a,body.agent-shell .top a{
  justify-content:flex-start;
  min-height:42px;
  color:#cbd5e1;
  padding:0 12px;
  position:relative;
}
body.admin-shell .top a:first-child,body.agent-shell .top a:first-child{
  min-height:48px;
  color:#fff;
  font-size:18px;
  padding:0 12px;
  margin:0 0 12px;
  border-bottom:1px solid rgba(255,255,255,.12);
  border-radius:0;
}
body.admin-shell .top a:not(:first-child):hover,body.agent-shell .top a:not(:first-child):hover{
  background:rgba(255,255,255,.1);
  color:#fff;
}
body.admin-shell .top a.active,body.agent-shell .top a.active{
  background:#fff;
  color:#0f172a;
  box-shadow:0 10px 24px rgba(0,0,0,.16);
}
body.admin-shell .top a.active::before,body.agent-shell .top a.active::before{
  content:"";
  position:absolute;
  left:-14px;
  top:10px;
  bottom:10px;
  width:3px;
  border-radius:999px;
  background:#60a5fa;
}
body.admin-shell .top span,body.agent-shell .top span{display:block;flex:1}
main{max-width:1180px;margin:22px auto 44px;padding:0 18px}
body.admin-shell main,body.agent-shell main{
  max-width:none;
  margin:0;
  padding:28px 30px 52px;
}
.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px;
  margin:16px 0;
  box-shadow:var(--shadow-soft);
}
body.admin-shell .card,body.agent-shell .card{
  border-color:#e2e8f0;
  box-shadow:var(--shadow-soft);
}
.card h2,.card h3{margin:0 0 14px;color:var(--text);line-height:1.25;font-weight:800}
.card h2{font-size:20px}
.card h3{font-size:17px}
.page-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin:0 0 18px;
}
.page-head h1{margin:0;color:#0f172a;font-size:26px;line-height:1.15;font-weight:850}
.page-head p{margin:6px 0 0;color:var(--muted)}
.kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:14px;margin:0 0 18px}
.kpi-card{
  background:linear-gradient(180deg,#fff 0,#fbfdff 100%);
  border:1px solid #dfe7f1;
  border-radius:10px;
  padding:16px;
  box-shadow:var(--shadow-soft);
}
.kpi-card .label{color:#64748b;font-size:13px;font-weight:700}
.kpi-card .value{margin-top:8px;color:#0f172a;font-size:28px;line-height:1;font-weight:900;font-variant-numeric:tabular-nums}
.kpi-card .hint{margin-top:8px;color:#64748b;font-size:13px}
.kpi-card.primary{border-color:#bfdbfe;background:linear-gradient(180deg,#eff6ff 0,#fff 100%)}
.kpi-card.success{border-color:#bbf7d0;background:linear-gradient(180deg,#f0fdf4 0,#fff 100%)}
.kpi-card.warning{border-color:#fed7aa;background:linear-gradient(180deg,#fff7ed 0,#fff 100%)}
.page-actions{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  margin:0 0 14px;
}
.page-actions h2{margin:0;font-size:22px;line-height:1.25}
.actions,.form-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.actions form{margin:0}
.form-actions input,.form-actions select{width:auto;min-width:160px;flex:1 1 180px;margin:0}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.grid .card{display:flex;flex-direction:column}
.grid .card .btn{margin-top:auto}
.btn,button,.link-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:40px;
  border:1px solid var(--primary);
  background:var(--primary);
  color:var(--on-primary);
  padding:0 14px;
  border-radius:7px;
  text-decoration:none;
  cursor:pointer;
  font-weight:700;
  font-size:14px;
  line-height:1.2;
  vertical-align:middle;
  touch-action:manipulation;
  transition:background-color .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.btn.ghost{background:transparent;color:#475467;border-color:transparent}
.btn.ghost:hover{background:#f1f5f9;color:#0f172a;border-color:#e2e8f0}
.btn:hover,button:hover,.link-btn:hover{background:var(--primary-strong);border-color:var(--primary-strong);color:var(--on-primary)}
.btn:active,button:active,.link-btn:active{transform:translateY(1px)}
.btn.small,button.small{min-height:34px;padding:0 10px;font-size:13px}
.btn.gray{background:#6b7280;border-color:#6b7280}
.btn.gray:hover{background:#4b5563;border-color:#4b5563}
.btn.green{background:var(--success);border-color:var(--success)}
.btn.green:hover{background:var(--success-strong);border-color:var(--success-strong)}
.btn.red{background:#fff;color:var(--danger);border-color:var(--danger-soft)}
.btn.red:hover{background:#fff5f5;color:#981b13;border-color:#fda29b}
.btn.light,.link-btn{background:#fff;color:var(--text);border-color:#cfd6e0}
.btn.light:hover,.link-btn:hover{background:var(--surface-soft);border-color:#98a2b3;color:var(--text)}
button:disabled,.btn.disabled{opacity:.5;cursor:not-allowed;transform:none}
label{display:block;margin:10px 0 6px;font-weight:700;color:var(--text-soft)}
input,select,textarea{
  width:100%;
  min-height:40px;
  padding:8px 11px;
  margin:0 0 12px;
  border:1px solid #cfd6e0;
  border-radius:7px;
  background:#fff;
  color:var(--text);
  font:inherit;
  transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease;
}
select{padding-right:34px}
textarea{min-height:120px;resize:vertical}
input::placeholder,textarea::placeholder{color:#98a2b3}
input[readonly],textarea[readonly]{background:var(--surface-soft);color:var(--text-soft)}
input:focus,select:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--ring);outline:0}
table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  font-variant-numeric:tabular-nums;
}
body.admin-shell .card>table,body.agent-shell .card>table{margin-top:10px}
th,td{
  padding:11px 12px;
  border-bottom:1px solid var(--border-soft);
  text-align:left;
  vertical-align:top;
}
th{
  background:#f1f5f9;
  color:#334155;
  font-size:13px;
  font-weight:800;
  white-space:nowrap;
}
td{color:#1f2937}
td.money,.money{font-variant-numeric:tabular-nums;font-weight:800;color:#0f172a}
td.actions-cell{min-width:130px}
.inline-check{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);white-space:nowrap}
.inline-check input{width:auto;margin:0}
tr:last-child td{border-bottom:0}
tr:hover td{background:var(--surface-hover)}
body.admin-shell table,body.agent-shell table{border-color:#d8dee8}
.flash{
  background:var(--warning-bg);
  color:var(--warning-text);
  border:1px solid var(--warning-border);
  padding:11px 12px;
  border-radius:var(--radius);
  margin-bottom:14px;
  font-weight:600;
}
.muted{color:var(--muted);font-size:13px}
.badge{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 9px;
  border-radius:999px;
  border:1px solid #d0d5dd;
  background:#f8fafc;
  color:#475467;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}
.badge.success{background:#ecfdf3;border-color:#abefc6;color:#067647}
.badge.warning{background:#fffaeb;border-color:#fedf89;color:#b54708}
.badge.danger{background:#fef3f2;border-color:#fecdca;color:#b42318}
.badge.info{background:#eff8ff;border-color:#b2ddff;color:#175cd3}
.badge.neutral{background:#f2f4f7;border-color:#d0d5dd;color:#344054}
.toolbar-card{padding:14px 16px}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:10px 14px}
.form-grid .full{grid-column:1/-1}
.price{
  font-size:22px;
  color:var(--text);
  font-weight:900;
  margin:8px 0;
  font-variant-numeric:tabular-nums;
}
.package-grid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
.package-card{gap:12px}
.package-title{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.package-title h3{margin:0}
.package-title .price{margin:0;white-space:nowrap}
.pay-prices{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.pay-prices>div{
  min-height:62px;
  padding:12px;
  border:1px solid #dbe4ef;
  border-radius:8px;
  background:#f8fafc;
}
.pay-prices span{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:800;
  margin-bottom:6px;
}
.pay-prices strong{
  display:block;
  color:#0f172a;
  font-size:18px;
  line-height:1.1;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
.recharge-card h3{margin:0 0 12px;font-size:17px}
.recharge-card h3:not(:first-child){margin-top:18px}
.choice-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:10px;
  margin:0 0 12px;
}
.choice-card{
  display:block;
  margin:0;
  cursor:pointer;
}
.choice-card>input[type=radio]{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.choice-body{
  display:block;
  min-height:74px;
  padding:13px;
  border:1px solid #dbe4ef;
  border-radius:8px;
  background:#fff;
  transition:border-color .18s ease,background-color .18s ease,box-shadow .18s ease;
}
.choice-card:hover .choice-body{border-color:#93c5fd;background:#f8fbff}
.choice-card>input[type=radio]:checked+.choice-body{
  border-color:var(--primary);
  background:var(--primary-soft);
  box-shadow:0 0 0 3px var(--ring);
}
.choice-title{
  display:block;
  color:#475467;
  font-size:13px;
  font-weight:800;
}
.choice-body strong{
  display:block;
  margin-top:6px;
  color:#0f172a;
  font-size:18px;
  line-height:1.15;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
.custom-choice{grid-column:span 2}
.custom-choice input[type=number]{margin:8px 0 0}
.section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin:0 0 14px;
}
.section-head h3{margin:0}
.section-head p{margin:4px 0 0;color:var(--muted);font-size:13px}
.delivery-verdict{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:0 0 14px;
  padding:18px;
  border:1px solid #dfe7f1;
  border-radius:10px;
  background:#fff;
  box-shadow:var(--shadow-soft);
}
.delivery-verdict h2{
  margin:10px 0 6px;
  color:#0f172a;
  font-size:22px;
  line-height:1.25;
}
.delivery-verdict p{margin:0;color:var(--muted)}
.delivery-verdict.success{border-color:#abefc6;background:linear-gradient(180deg,#f0fdf4 0,#fff 100%)}
.delivery-verdict.warning{border-color:#fedf89;background:linear-gradient(180deg,#fffaeb 0,#fff 100%)}
.delivery-verdict.danger{border-color:#fecdca;background:linear-gradient(180deg,#fef3f2 0,#fff 100%)}
.verdict-count{
  min-width:140px;
  text-align:right;
  font-variant-numeric:tabular-nums;
}
.verdict-count strong{display:block;color:#0f172a;font-size:28px;line-height:1;font-weight:900}
.verdict-count span{display:block;margin-top:8px;color:var(--muted);font-size:13px;font-weight:800}
.check-window{
  display:grid;
  grid-template-columns:150px minmax(260px,1fr) auto;
  gap:10px;
  align-items:end;
  margin:0 0 14px;
  padding:12px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#f8fafc;
}
.check-window label{margin:0 0 6px}
.check-window input{margin:0}
.check-window-range{
  min-height:40px;
  display:flex;
  align-items:center;
  color:#475467;
  font-weight:700;
}
.detail-grid{
  display:grid;
  grid-template-columns:minmax(320px,1.05fr) minmax(320px,.95fr);
  gap:14px;
}
.detail-list{
  display:grid;
  grid-template-columns:112px minmax(0,1fr);
  gap:10px 14px;
  margin:0;
}
.detail-list dt{color:#64748b;font-size:13px;font-weight:800}
.detail-list dd{margin:0;color:#111827;word-break:break-word}
.code-block{
  max-height:220px;
  overflow:auto;
  margin-bottom:0;
}
.log-card .section-head{margin-bottom:12px}
.log-list{display:grid;gap:10px}
.log-row{
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#fff;
  padding:10px;
}
.log-meta{
  display:flex;
  align-items:center;
  gap:8px;
  color:#64748b;
  font-size:13px;
  font-weight:700;
}
.log-row pre{
  max-height:220px;
  overflow:auto;
  margin:8px 0 0;
}
.reward-title{
  color:#475467;
  font-size:13px;
  font-weight:800;
  margin:2px 0 0;
}
.reward-list{
  display:grid;
  gap:8px;
  margin:0 0 14px;
}
.reward-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:42px;
  padding:10px 12px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:8px;
}
.reward-main{min-width:0}
.reward-main strong{
  display:block;
  color:#111827;
  font-size:14px;
  line-height:1.25;
  word-break:break-word;
}
.reward-num{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:58px;
  min-height:28px;
  padding:4px 10px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-weight:900;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.package-detail .reward-list{margin-bottom:18px}
.store-login-panel{
  max-width:640px;
  margin:44px auto;
  padding:26px;
  border:1px solid #dfe7f1;
  border-radius:10px;
  background:#fff;
  box-shadow:var(--shadow-soft);
}
.store-login-panel h1{
  margin:12px 0 8px;
  color:#0f172a;
  font-size:30px;
  line-height:1.15;
}
.store-login-panel p{margin:0;color:var(--muted)}
.store-login-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}
.store-dashboard{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  margin:0 0 18px;
}
.store-account-card,.store-actions-card,.store-function-card{
  border:1px solid #dfe7f1;
  border-radius:10px;
  background:#fff;
  box-shadow:var(--shadow-soft);
}
.store-account-card{padding:18px}
.store-account-card h1{
  margin:10px 0 14px;
  color:#0f172a;
  font-size:28px;
  line-height:1.15;
  word-break:break-word;
}
.store-balance{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  border:1px solid #bfdbfe;
  border-radius:8px;
  background:#eff6ff;
}
.store-balance span{color:#475467;font-size:13px;font-weight:800}
.store-balance strong{color:#0f172a;font-size:28px;line-height:1;font-weight:900;font-variant-numeric:tabular-nums}
.store-actions-card{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:16px;
  padding:18px;
}
.store-actions-card h2{
  margin:10px 0 6px;
  color:#0f172a;
  font-size:22px;
  line-height:1.2;
}
.store-actions-card p{margin:0;color:var(--muted)}
.store-function-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:14px;
  margin-bottom:18px;
}
.store-function-card{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:176px;
  padding:18px;
  color:inherit;
  text-decoration:none;
  transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.store-function-card:hover{
  border-color:#93c5fd;
  box-shadow:0 16px 36px rgba(15,23,42,.12);
  transform:translateY(-1px);
}
.store-function-card strong{
  color:#0f172a;
  font-size:22px;
  line-height:1.2;
}
.store-function-card p{
  flex:1;
  margin:0;
  color:var(--muted);
}
.store-function-card em{
  color:#2563eb;
  font-style:normal;
  font-weight:900;
}
.store-section-head{margin-top:4px}
.store-package-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(320px,1fr));
  gap:14px;
}
.store-package-card{
  display:flex;
  flex-direction:column;
  min-height:100%;
  border:1px solid #dfe7f1;
  border-radius:10px;
  background:#fff;
  padding:16px;
  box-shadow:var(--shadow-soft);
}
.store-package-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.store-package-head h4{
  margin:0;
  color:#0f172a;
  font-size:19px;
  line-height:1.25;
  word-break:break-word;
}
.store-price-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-bottom:12px;
}
.store-price-grid>div{
  min-height:76px;
  padding:12px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#f8fafc;
}
.store-price-grid span,.store-price-grid em{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:800;
  font-style:normal;
}
.store-price-grid strong{
  display:block;
  margin:6px 0 4px;
  color:#0f172a;
  font-size:20px;
  line-height:1;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
.store-package-card .reward-list{
  max-height:220px;
  overflow:auto;
}
.store-single-list,.admin-single-list{
  display:grid;
  gap:10px;
}
.store-single-row,.admin-single-row{
  display:grid;
  grid-template-columns:minmax(260px,1fr) minmax(240px,.7fr) auto;
  gap:14px;
  align-items:center;
  padding:14px 16px;
  border:1px solid #dfe7f1;
  border-radius:8px;
  background:#fff;
  box-shadow:var(--shadow-soft);
}
.store-single-main h4,.admin-single-main h4{
  margin:0 0 6px;
  color:#0f172a;
  font-size:18px;
  line-height:1.25;
  word-break:break-word;
}
.store-single-main p,.admin-single-main p{
  margin:0 0 8px;
  color:#475467;
  font-size:14px;
}
.store-single-main strong,.admin-single-main strong{
  color:#0f172a;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
.store-single-prices{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.store-single-prices>div{
  min-height:58px;
  padding:10px 11px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#f8fafc;
}
.store-single-prices span{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:800;
}
.store-single-prices strong{
  display:block;
  margin-top:5px;
  color:#0f172a;
  font-size:18px;
  line-height:1;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
.store-single-action{
  display:flex;
  justify-content:flex-end;
}
.package-list-section{margin:18px 0 0}
.admin-package-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(340px,1fr));
  gap:14px;
}
.admin-package-card{
  display:flex;
  flex-direction:column;
  min-height:100%;
  background:#fff;
  border:1px solid #dfe7f1;
  border-radius:8px;
  padding:16px;
  box-shadow:var(--shadow-soft);
}
.admin-package-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.admin-package-head h4{
  margin:4px 0 0;
  color:#0f172a;
  font-size:18px;
  line-height:1.25;
  word-break:break-word;
}
.admin-price-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-bottom:12px;
}
.admin-price-pill{
  min-height:66px;
  padding:11px 12px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#f8fafc;
}
.admin-price-pill span{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:800;
}
.admin-price-pill strong{
  display:block;
  margin-top:6px;
  color:#0f172a;
  font-size:20px;
  line-height:1;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
.admin-reward-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:2px 0 8px;
  color:#475467;
  font-size:13px;
  font-weight:800;
}
.admin-reward-head em{
  color:#64748b;
  font-style:normal;
  font-weight:700;
}
.admin-reward-list{
  display:grid;
  gap:8px;
  max-height:260px;
  overflow:auto;
  padding-right:2px;
}
.admin-reward-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:38px;
  padding:9px 10px;
  border:1px solid #edf0f4;
  border-radius:8px;
  background:#fbfcfe;
}
.admin-reward-row strong{
  min-width:0;
  color:#111827;
  font-size:14px;
  line-height:1.25;
  word-break:break-word;
}
.admin-reward-row span{
  flex:0 0 auto;
  min-width:52px;
  text-align:center;
  padding:4px 8px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
.admin-package-actions{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
  margin-top:auto;
  padding-top:14px;
}
.admin-single-meta{
  display:grid;
  grid-template-columns:repeat(2,minmax(100px,1fr));
  gap:8px;
  color:#475467;
  font-size:13px;
  font-weight:800;
}
.admin-single-meta .badge{
  justify-content:center;
}
.single-item-picker{
  display:grid;
  grid-template-columns:minmax(260px,1fr) 160px;
  gap:10px;
  align-items:end;
}
.selected-single-item{
  margin:0 0 12px;
}
pre{
  white-space:pre-wrap;
  word-break:break-word;
  background:var(--surface-soft);
  border:1px solid var(--border);
  border-radius:7px;
  padding:10px;
  color:var(--text-soft);
  margin:6px 0 12px;
  line-height:1.5;
  font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;
  font-size:13px;
}
.row{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}
.row>*{
  background:var(--surface-soft);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:12px;
}
.row b{display:block;margin-top:4px;font-size:20px;font-variant-numeric:tabular-nums}
.auth-card{max-width:460px;margin:36px auto}
body.admin-shell .auth-card,body.agent-shell .auth-card{
  margin:72px auto;
  max-width:430px;
  padding:24px;
  box-shadow:0 24px 80px rgba(15,23,42,.16);
}
.summary{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.balance{font-size:19px;font-weight:900;color:var(--text);font-variant-numeric:tabular-nums}
.empty{
  padding:14px;
  background:var(--surface-soft);
  border:1px dashed #cfd6e0;
  border-radius:var(--radius);
  color:var(--muted);
}
.record-pager{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  margin:12px 0 14px;
  padding:8px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:8px;
}
.record-pager form{display:flex;gap:8px;align-items:center;margin:0}
.record-pager select{width:auto;min-height:34px;margin:0;padding:5px 30px 5px 9px}
.record-pager .muted{margin-left:auto}
.item-tools{display:grid;grid-template-columns:minmax(240px,1fr) 150px auto;gap:10px;align-items:end;margin-bottom:12px}
.item-select{height:210px}
.item-help{margin:6px 0 12px}
.selected-items td{vertical-align:middle}
.selected-items input[type=number]{margin:0;min-width:96px}
.selected-items .btn{min-height:36px;padding:0 10px}
.cdk-forms{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
.player-data-search{
  display:grid;
  grid-template-columns:minmax(220px,1fr) 160px minmax(340px,1.4fr) auto;
  gap:12px;
  align-items:end;
}
.player-data-search label{margin-top:0}
.player-data-search input,.player-data-search select{margin-bottom:0}
.player-data-search-lite{
  grid-template-columns:180px minmax(260px,1fr) auto;
}
.player-data-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(180px,1fr));
  gap:12px;
  margin:0 0 14px;
}
.player-data-summary .card{margin:0}
.player-data-summary strong{
  display:block;
  margin:10px 0 4px;
  color:#0f172a;
  font-size:22px;
  line-height:1.15;
  font-weight:900;
  word-break:break-word;
}
.player-data-summary p{margin:0;color:var(--muted);font-size:13px}
.tabs{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  margin:0 0 14px;
  padding:8px;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:8px;
  box-shadow:var(--shadow-soft);
}
.tabs a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:0 13px;
  border-radius:7px;
  color:#475467;
  font-weight:800;
}
.tabs a:hover{background:#f1f5f9;color:#0f172a}
.tabs a.active{background:#0f172a;color:#fff}
.data-card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:12px;
}
.data-card{
  display:flex;
  flex-direction:column;
  gap:12px;
  min-height:100%;
  padding:14px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#fff;
  box-shadow:var(--shadow-soft);
}
.batch-action-form{margin:0 0 12px}
.batch-toolbar{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  min-height:46px;
  padding:10px 12px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#f8fafc;
}
.batch-toolbar span{color:#64748b;font-size:13px;font-weight:700}
.batch-check,.data-select{
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:#334155;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}
.batch-check input,.data-select input{
  width:16px;
  height:16px;
  margin:0;
  accent-color:#2563eb;
}
.data-select{
  align-self:flex-start;
  min-height:28px;
  padding:4px 9px;
  border:1px solid #dbe4ef;
  border-radius:999px;
  background:#f8fafc;
}
.data-card-main{display:grid;gap:5px;min-width:0}
.data-card-main strong{
  color:#0f172a;
  font-size:17px;
  line-height:1.25;
  word-break:break-word;
}
.data-card-main span{color:#64748b;font-size:13px;font-weight:700}
.data-count{
  align-self:flex-start;
  min-width:72px;
  padding:5px 10px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-weight:900;
  font-variant-numeric:tabular-nums;
  text-align:center;
}
.inline-danger{
  display:grid;
  grid-template-columns:minmax(90px,1fr) auto;
  gap:8px;
  align-items:center;
  margin-top:auto;
}
.inline-danger input{margin:0}
.fabao-card form{margin-top:auto}
.level-page{max-width:980px}
.level-hero{
  margin-top:0;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
}
.level-hero h3{
  margin:0;
  color:#0f172a;
  font-size:26px;
  line-height:1.15;
  font-weight:900;
}
.level-hero p{margin:8px 0 0;color:#475467}
.level-rules{
  margin:0 0 16px;
  padding:14px 16px;
  border:1px solid #bfdbfe;
  border-radius:8px;
  background:#eff6ff;
  color:#1d4ed8;
}
.level-rules strong{display:block;margin-bottom:8px}
.level-rules p{margin:3px 0;font-size:14px;font-weight:700}
.level-layout{
  display:grid;
  grid-template-columns:minmax(320px,1fr) minmax(320px,1fr);
  gap:18px;
  align-items:start;
}
.level-panel{min-height:360px}
.level-jump-form{
  display:grid;
  gap:18px;
}
.level-jump-form label{margin-top:0}
.level-jump-form select{margin-bottom:0}
.level-selected{
  min-height:42px;
  padding:10px 12px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#f8fafc;
  color:#334155;
  font-size:13px;
  font-weight:800;
}
.level-history-list{
  display:grid;
  gap:12px;
  max-height:430px;
  overflow:auto;
  padding-right:4px;
}
.level-history-item{
  display:grid;
  gap:6px;
  padding:13px 14px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#fff;
}
.level-history-item>div{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.level-history-item strong{color:#0f172a;font-size:15px}
.level-history-item time{color:#64748b;font-size:12px;font-weight:700}
.level-history-item p{margin:0;color:#475467;font-size:13px}
code{
  font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;
  font-size:13px;
  color:#0f172a;
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    scroll-behavior:auto!important;
    transition-duration:.01ms!important;
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
  }
}
@media(max-width:1000px){
  .cdk-forms{grid-template-columns:1fr}
  .kpi-grid{grid-template-columns:repeat(2,minmax(180px,1fr))}
  .player-data-search{grid-template-columns:1fr 1fr}
  .player-data-search-lite{grid-template-columns:1fr}
  .player-data-search .form-actions{grid-column:1/-1}
  .player-data-summary{grid-template-columns:repeat(2,minmax(180px,1fr))}
  .level-layout{grid-template-columns:1fr}
  .detail-grid{grid-template-columns:1fr}
  .store-dashboard{grid-template-columns:1fr}
}
@media(max-width:800px){
  body{font-size:16px}
  body.admin-shell,body.agent-shell{padding-left:0}
  .top{
    position:static;
    flex-wrap:wrap;
    align-items:stretch;
    gap:6px;
    padding:10px 12px;
    overflow-x:visible;
  }
  body.admin-shell .top,body.agent-shell .top{
    position:static;
    width:auto;
    min-height:0;
    flex-direction:row;
    background:#0f172a;
    box-shadow:none;
    border-right:0;
    border-bottom:1px solid rgba(255,255,255,.08);
    padding:10px 12px;
  }
  body.admin-shell .top a:first-child,body.agent-shell .top a:first-child{
    min-height:44px;
    border-bottom:0;
    margin:0;
  }
  body.admin-shell .top a.active::before,body.agent-shell .top a.active::before{display:none}
  .top a:first-child{width:100%;justify-content:flex-start;padding-left:0;margin-right:0}
  .top a:not(:first-child){flex:1 1 auto;min-height:44px}
  .top span{display:none}
  main{margin:16px auto 30px;padding:0 10px}
  body.admin-shell main,body.agent-shell main{padding:14px 10px 30px}
  .card{padding:14px;margin:12px 0}
  .card h2{font-size:19px}
  .page-head{display:block}
  .page-head h1{font-size:22px}
  .kpi-grid{grid-template-columns:1fr}
  .player-data-search{grid-template-columns:1fr}
  .player-data-summary{grid-template-columns:1fr}
  .level-page{max-width:none}
  .level-panel{min-height:0}
  .form-grid{grid-template-columns:1fr}
  .page-actions{display:block}
  .page-actions .actions{margin-top:10px}
  .grid,.item-tools{grid-template-columns:1fr}
  .pay-prices{grid-template-columns:1fr}
  .store-login-panel{margin:18px 0;padding:18px}
  .store-login-panel h1{font-size:24px}
  .store-login-actions,.store-actions-card{display:grid;grid-template-columns:1fr}
  .store-balance{display:block}
  .store-balance strong{display:block;margin-top:8px}
  .store-package-grid,.store-price-grid{grid-template-columns:1fr}
  .store-single-row,.admin-single-row,.store-single-prices,.single-item-picker{grid-template-columns:1fr}
  .store-single-action{justify-content:stretch}
  .admin-package-grid,.admin-price-row{grid-template-columns:1fr}
  .admin-package-actions{display:grid;grid-template-columns:1fr}
  .choice-grid{grid-template-columns:1fr}
  .delivery-verdict{display:block}
  .verdict-count{text-align:left;margin-top:14px}
  .check-window{grid-template-columns:1fr}
  .detail-list{grid-template-columns:1fr;gap:4px}
  .custom-choice{grid-column:auto}
  .item-select{height:180px}
  .btn,button,.link-btn,input,select,textarea{min-height:44px}
  .btn,button,.link-btn{width:100%;margin-top:4px}
  .btn.small,button.small{min-height:40px}
  .actions,.form-actions{align-items:stretch}
  .form-actions input,.form-actions select{width:100%;min-width:0;flex-basis:100%}
  table{display:block;max-width:100%;overflow-x:auto;white-space:nowrap;-webkit-overflow-scrolling:touch}
  th,td{padding:10px 12px}
  .auth-card{margin:18px 0}
  .summary{display:block}
  .summary .actions{margin-top:12px}
  .record-pager{align-items:stretch}
  .record-pager form{width:100%;display:grid;grid-template-columns:auto 1fr auto;gap:8px}
  .record-pager select{width:100%}
  .record-pager .muted{width:100%;margin-left:0}
}

/* Player storefront refresh */
body.player-shell{
  background:
    radial-gradient(circle at 16% -8%,rgba(37,99,235,.18),transparent 34%),
    radial-gradient(circle at 86% 4%,rgba(20,184,166,.16),transparent 30%),
    linear-gradient(180deg,#f8fbff 0,#eef3f8 42%,#f6f7fb 100%);
}
body.player-shell main{
  max-width:1220px;
  margin-top:28px;
}
.player-top{
  min-height:76px;
  padding:12px 28px;
  gap:14px;
  border-bottom:1px solid rgba(148,163,184,.28);
  background:rgba(255,255,255,.86);
  box-shadow:0 14px 40px rgba(15,23,42,.08);
}
.player-top .player-brand{
  min-height:46px;
  margin:0 2px 0 0;
  padding:0;
  color:#0f172a;
  font-size:20px;
  letter-spacing:0;
}
.player-brand::before{
  content:"";
  display:inline-block;
  width:28px;
  height:28px;
  margin-right:9px;
  border-radius:8px;
  background:linear-gradient(135deg,#2563eb 0%,#14b8a6 100%);
  box-shadow:0 10px 24px rgba(37,99,235,.22);
}
.player-nav{
  display:flex;
  align-items:center;
  gap:4px;
  padding:4px;
  border:1px solid rgba(203,213,225,.78);
  border-radius:8px;
  background:rgba(248,250,252,.78);
}
.top .player-nav a{
  min-height:36px;
  padding:0 11px;
  border-radius:7px;
  color:#475569;
  font-size:13px;
  font-weight:800;
}
.top .player-nav a:hover{
  background:#fff;
  color:#0f172a;
  box-shadow:0 6px 18px rgba(15,23,42,.08);
}
.player-top-info{
  display:flex;
  align-items:stretch;
  gap:8px;
  min-width:0;
  margin-left:auto;
}
.player-info-main,.player-info-chip{
  min-height:48px;
  border:1px solid rgba(203,213,225,.78);
  border-radius:8px;
  background:rgba(255,255,255,.72);
  box-shadow:0 1px 2px rgba(15,23,42,.05);
}
.player-info-main{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:170px;
  padding:7px 11px;
}
.player-avatar{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 34px;
  width:34px;
  height:34px;
  border-radius:8px;
  background:#0f172a;
  color:#fff;
  font-size:16px;
  font-weight:900;
  line-height:1;
}
.player-info-main strong,.player-info-main small{
  display:block;
  max-width:150px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.player-info-main strong{
  color:#0f172a;
  font-size:14px;
  line-height:1.2;
}
.player-info-main small{
  margin-top:3px;
  color:#64748b;
  font-size:12px;
  font-weight:800;
}
.player-info-chip{
  display:grid;
  align-content:center;
  gap:2px;
  min-width:112px;
  max-width:210px;
  padding:7px 11px;
}
.player-info-chip span{
  color:#64748b;
  font-size:11px;
  font-weight:900;
}
.player-info-chip strong{
  color:#111827;
  font-size:14px;
  line-height:1.2;
  font-weight:900;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.player-info-chip em{
  color:#64748b;
  font-size:11px;
  font-style:normal;
  font-weight:700;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.player-info-chip.is-vip{
  border-color:#f59e0b;
  background:linear-gradient(180deg,#fffbeb 0,#fff 100%);
}
.player-info-chip.is-vip strong{color:#92400e}
.top .player-logout{
  min-height:40px;
  padding:0 14px;
  border:1px solid #e2e8f0;
  background:#fff;
  color:#334155;
  box-shadow:0 1px 2px rgba(15,23,42,.05);
}
.top .player-logout:hover{
  border-color:#fecaca;
  background:#fff5f5;
  color:#b42318;
}
.store-login-panel{
  overflow:hidden;
  position:relative;
  max-width:760px;
  border:1px solid rgba(203,213,225,.72);
  background:
    linear-gradient(135deg,rgba(255,255,255,.96),rgba(255,255,255,.82)),
    linear-gradient(135deg,rgba(37,99,235,.15),rgba(20,184,166,.14));
  box-shadow:0 24px 80px rgba(15,23,42,.12);
}
.store-login-panel::after{
  content:"";
  position:absolute;
  right:-84px;
  top:-84px;
  width:220px;
  height:220px;
  border-radius:50%;
  background:conic-gradient(from 120deg,rgba(37,99,235,.2),rgba(20,184,166,.18),rgba(245,158,11,.16),rgba(37,99,235,.2));
  filter:blur(1px);
  pointer-events:none;
}
.store-login-panel>*{position:relative;z-index:1}
.store-account-card{
  overflow:hidden;
  position:relative;
  border-color:rgba(203,213,225,.72);
  background:
    linear-gradient(135deg,rgba(15,23,42,.94),rgba(30,41,59,.9) 54%,rgba(15,118,110,.9));
  color:#fff;
  box-shadow:0 24px 80px rgba(15,23,42,.18);
}
.store-account-card::after{
  content:"";
  position:absolute;
  right:22px;
  bottom:18px;
  width:118px;
  height:118px;
  border-radius:50%;
  border:22px solid rgba(255,255,255,.09);
  pointer-events:none;
}
.store-account-card h1,.store-account-card .badge{position:relative;z-index:1}
.store-account-card h1{color:#fff}
.store-account-card .badge.info{
  background:rgba(219,234,254,.16);
  border-color:rgba(191,219,254,.36);
  color:#dbeafe;
}
.store-balance{
  position:relative;
  z-index:1;
  border-color:rgba(255,255,255,.22);
  background:rgba(255,255,255,.12);
  backdrop-filter:blur(8px);
}
.store-balance span{color:#cbd5e1}
.store-balance strong{color:#fff}
.store-account-stats{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:repeat(3,minmax(180px,1fr));
  gap:12px;
}
.store-stat{
  min-height:102px;
  padding:14px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:8px;
  background:rgba(255,255,255,.11);
  backdrop-filter:blur(8px);
}
.store-stat span{
  display:block;
  color:#cbd5e1;
  font-size:12px;
  font-weight:900;
}
.store-stat strong{
  display:block;
  margin-top:8px;
  color:#fff;
  font-size:24px;
  line-height:1.12;
  font-weight:900;
  word-break:break-word;
}
.store-stat em{
  display:block;
  margin-top:7px;
  color:#cbd5e1;
  font-size:12px;
  font-style:normal;
  font-weight:700;
  word-break:break-word;
}
.store-stat.is-vip{
  border-color:rgba(251,191,36,.45);
  background:rgba(251,191,36,.16);
}
.store-function-card,.store-package-card,.store-single-row{
  border-color:rgba(203,213,225,.78);
  background:rgba(255,255,255,.9);
  box-shadow:0 16px 44px rgba(15,23,42,.08);
}
.store-function-card:hover,.store-package-card:hover,.store-single-row:hover{
  border-color:#93c5fd;
  box-shadow:0 22px 56px rgba(15,23,42,.13);
}
.store-function-card strong{font-size:20px}
.store-function-card em{
  display:inline-flex;
  align-items:center;
  align-self:flex-start;
  min-height:32px;
  padding:0 11px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
}
@media(max-width:1100px){
  .player-top{align-items:flex-start;flex-wrap:wrap}
  .player-top-info{order:3;width:100%;margin-left:0;overflow-x:auto;padding-bottom:2px}
  .player-nav{margin-left:auto}
}
@media(max-width:800px){
  .player-top{
    position:static;
    padding:12px;
    gap:10px;
  }
  .player-top .player-brand{width:100%}
  .player-nav{
    width:100%;
    margin:0;
    overflow-x:auto;
  }
  .top .player-nav a{flex:0 0 auto}
  .player-top-info{
    display:grid;
    grid-template-columns:1fr;
    overflow:visible;
  }
  .player-info-main,.player-info-chip{
    width:100%;
    max-width:none;
  }
  .player-info-main strong,.player-info-main small{max-width:none}
  .store-account-stats{grid-template-columns:1fr}
  .top .player-logout{width:100%;margin-top:0}
}
