@property --lg-x{syntax:"<percentage>";inherits:true;initial-value:50%}
@property --lg-y{syntax:"<percentage>";inherits:true;initial-value:0%}
/* Operations UX layer: recharge form blocks, status pills, dirty state. */
.stack-form{display:flex;flex-direction:column;gap:14px}
.form-block{border:1px solid #e8eaee;border-radius:7px;padding:12px 13px;margin:0;background:#ffffff}
.form-block legend{padding:0 6px;font-size:12.5px;font-weight:600;color:#1d2129}
.block-note{font-size:11.5px;color:#86909c;margin:0 0 10px}
.channel-row{display:grid;grid-template-columns:minmax(120px,1fr) auto auto;grid-template-areas:"name status switch" "token token token";align-items:center;gap:7px 12px;padding:10px 0;border-bottom:1px solid #e8eaee}
.channel-row:last-child{border-bottom:0;padding-bottom:0}
.channel-name{grid-area:name;display:flex;flex-direction:column;min-width:0}
.channel-name b{font-size:12.5px}
.channel-name small{font-size:11px;color:#86909c}
.status-pill{grid-area:status;font-size:11px;padding:2px 8px;border-radius:999px;border:1px solid #4a4030;background:#2a2418;color:#d8b884;white-space:nowrap}
.status-pill.on{border-color:#3f6f57;background:#193024;color:#8fe0b4}
.switch{grid-area:switch;display:inline-flex;align-items:center;gap:6px;font-size:11.5px;color:#4e5969;white-space:nowrap;cursor:pointer}
.switch input{width:15px;height:15px;accent-color:#7fd6ac}
.channel-row>input[type="password"]{grid-area:token;width:100%;min-width:0}
.order-tools{display:flex;gap:8px;align-items:center}
.order-tools select{background:#ffffff;border:1px solid #dcdfe5;border-radius:5px;color:#1d2129;font-size:12px;padding:6px 8px}
.save-bar{display:flex;align-items:center;justify-content:flex-end;gap:12px;position:sticky;bottom:0;padding:10px 0;background:linear-gradient(180deg,#11161300,#111613 55%);z-index:2}
.dirty-hint{font-size:11.5px;color:#86909c}
.dirty-hint.changed{color:#e3c07f}
.sub-head{margin-top:18px;padding-top:14px;border-top:1px solid #2c342e}
.sub-head h3{font-size:14px;margin:0}
.order-status{font-size:11px;padding:2px 8px;border-radius:999px;white-space:nowrap;border:1px solid #3b453d;color:#4e5969}
.order-status.pending{border-color:#7a6134;background:#2b2314;color:#ecc98a}
.order-status.credited{border-color:#3f6f57;background:#193024;color:#8fe0b4}
.order-status.failed{border-color:#70403f;background:#2b1a1a;color:#eba6a6}
.order-id{display:block;font-family:ui-monospace,Menlo,monospace;font-size:10.5px;color:#86909c;max-width:190px;overflow:hidden;text-overflow:ellipsis}
#ledger .positive,.ops .positive{color:#8fe0b4}
.ops :is(table) td{vertical-align:middle}
@media (max-width:700px){
  .channel-row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name status" "switch switch" "token token"}
  .order-tools{width:100%;justify-content:space-between}
  .save-bar{justify-content:space-between}
}

/* 平台数据 / 用户详情 */
.rep-cards{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.rep-card{flex:1;min-width:120px;border:1px solid #e8eaee;border-radius:8px;background:#ffffff;padding:10px 12px;display:flex;flex-direction:column;gap:3px}
.rep-card small{font-size:11px;color:#86909c}
.rep-card b{font-size:19px;font-variant-numeric:tabular-nums}
.panel-foot{padding:9px 2px;font-size:11.5px;color:#86909c}
.order-tools input[type="date"],.order-tools input[type="text"]{background:#ffffff;border:1px solid #dcdfe5;border-radius:5px;color:#1d2129;font-size:12px;padding:6px 8px;min-width:120px}
.ops-modal{position:fixed;inset:0;z-index:60;display:none;place-items:center;background:#070a08c4;backdrop-filter:blur(3px);padding:16px;overflow:auto}
.ops-modal.open{display:grid}
.ops-modal-card{width:min(460px,100%);border:1px solid #3b473d;border-radius:12px;background:#ffffff;padding:20px;position:relative}
.ops-modal-card h3{font-size:16px;margin:0 0 6px}
.ops-modal-card p{font-size:12.5px;color:#86909c;line-height:1.6;margin:0 0 14px}
.ops-modal-close{position:absolute;right:10px;top:8px;border:0;background:none;color:#86909c;font-size:20px}
.pay-row{display:flex;justify-content:space-between;gap:10px;border-bottom:1px solid #2a322d;padding:7px 0;font-size:12px}
.pay-row b{color:#8fe0b4}
.modal-row{display:flex;gap:8px;margin-top:12px}
.modal-row input{flex:1;min-width:0;height:36px;border-radius:6px;border:1px solid #39443c;background:#111714;color:#edf2ed;padding:0 9px;font-size:12.5px}
.modal-row button.min-height{min-height:36px}
.gift-icon{font-size:18px}
.gift-icon img{width:24px;height:24px;object-fit:cover;border-radius:5px;vertical-align:middle}
#gift-file{font-size:11px;color:#aab5ab}
#gift-file::file-selector-button{margin-right:8px;border:1px solid #39443c;background:#252d27;color:#d8e1d7;border-radius:4px;padding:5px 9px;font-size:11px;cursor:pointer}
td.gift-icon{cursor:pointer}

/* 左侧导航布局 */
#app{display:grid;grid-template-columns:172px minmax(0,1fr);width:min(1420px,calc(100% - 32px));margin:18px auto 60px;gap:0;align-items:start}
.ops-nav{position:sticky;top:14px;display:flex;flex-direction:column;gap:2px;border-right:1px solid #e8eaee;padding-right:10px;max-height:calc(100vh - 40px);overflow:auto}
.ops-tab{text-align:left;border:0;background:none;color:#86909c;font-size:13px;padding:9px 11px;border-radius:6px;white-space:nowrap}
.ops-tab:hover{background:#221420;color:#3b82f6}
.ops-tab.active{background:#7c5cff24;color:#3b82f6;font-weight:600}
.ops-tab.hidden{display:none}
.ops-main{min-width:0;padding-left:18px}
.ops-main>.page-head{position:relative}
@media(max-width:820px){
  #app{display:block;width:calc(100% - 20px)}
  .ops-nav{position:static;flex-direction:row;flex-wrap:nowrap;overflow-x:auto;border-right:0;border-bottom:1px solid #e8eaee;padding:0 0 8px;margin-bottom:14px;max-height:none}
  .ops-tab{padding:7px 10px;font-size:12px}
  .ops-main{padding-left:0}
}
/* 数据总栏去掉实时卡片后，平台数据紧贴标题 */
#report{margin-top:14px}
/* Production operations polish */
.ops-header{position:sticky;top:0;z-index:40;height:64px;padding-left:max(calc((100vw - 1480px)/2),20px);padding-right:max(calc((100vw - 1480px)/2),20px);background:#fffffff2;border-bottom-color:#e8eaee;backdrop-filter:blur(14px)}
.ops-header .brand{font-size:14px;letter-spacing:0;gap:10px}
.ops-header .brand img.brand-icon{width:34px;height:34px;border:1px solid #ffffff16;border-radius:9px}
#app{width:min(1480px,calc(100% - 40px));margin:22px auto 64px;grid-template-columns:190px minmax(0,1fr)}
.ops-nav{top:80px;padding-right:12px;border-right-color:#e8eaee}
.ops-tab{min-height:38px;border-radius:7px;font-size:12.5px}
.ops-main{padding-left:22px}
.ops-main>.page-head{margin-bottom:20px;padding-bottom:14px;border-bottom:1px solid #e8eaee}
.ops-main>.page-head h1{font-size:24px;letter-spacing:0;font-weight:650}
.ops-main>.page-head small{font-size:9px;letter-spacing:.14em;color:#3b82f6}
.ops-main .table-panel{border-radius:9px;border-color:#e8eaee;background:#ffffff;padding:16px;margin-bottom:16px}
.ops-main .panel-head{gap:14px;flex-wrap:wrap}
.ops-main .panel-head h2{font-size:14px}
.ops-main .panel-head p{font-size:11.5px;line-height:1.5}
.ops-main th{position:sticky;top:0;z-index:2;background:#f7f8fa;color:#86909c;font-weight:600}
.ops-main td,.ops-main th{padding:10px 11px}
.ops-main tr:hover td{background:#1c1119}
.ops-main input,.ops-main select{min-height:36px;border-radius:7px;background:#0c080d;border-color:#37373e;color:#eeeef1}
.ops-main button{min-height:34px;border-radius:7px;transition:background-color .15s,border-color .15s,color .15s}
.ops-main button:focus-visible,.ops-nav button:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}
.ops-main .primary{background:#f4778d;color:#2a0f17}
.ops-main .primary:hover{background:#ff91a1}
.ops-main .empty{padding:24px 12px;color:#85858f;text-align:center}
.ops-main .sub{display:block;margin-top:3px;color:#85858f;font-size:10.5px}
@media(max-width:820px){
  .ops-header{height:56px;padding:0 14px}
  #app{width:calc(100% - 24px);margin:14px auto 44px}
  .ops-nav{gap:4px;padding-bottom:9px;margin-bottom:12px}
  .ops-tab{min-height:36px;flex:none;padding:0 12px;font-size:12px}
  .ops-main>.page-head{margin-bottom:14px}
  .ops-main>.page-head h1{font-size:21px}
  .ops-main .table-panel{padding:12px;border-radius:8px}
  .ops-main .panel-head{align-items:flex-start}
  .ops-main .order-tools{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto auto}
  .ops-main .order-tools input{min-width:0;width:100%}
  .ops-main .wallet-form{grid-template-columns:1fr}
  .ops-main .wallet-form .note,.ops-main .wallet-form button{grid-column:auto}
  .ops-main th,.ops-main td{padding:8px 9px;font-size:11px}
}
.login-mark img{display:block;width:54px;height:54px;object-fit:cover;border-radius:12px}
@media(prefers-reduced-motion:reduce){.ops-main *, .ops-main *::before,.ops-main *::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* FStream operations console */
body.ops{background:#f7f8fa;color:#1d2129}
.ops-header{height:62px;padding-inline:max(calc((100vw - 1480px)/2),20px);background:#0b0d14f5;border-bottom:1px solid #e8eaee}
.ops-header .brand{font-size:14px;letter-spacing:0}
.ops-header .brand img.brand-icon{width:34px;height:34px;object-fit:cover;border-radius:9px}
#app{width:min(1480px,calc(100% - 40px));grid-template-columns:184px minmax(0,1fr);margin:22px auto 64px}
.ops-nav{top:78px;padding-right:12px}
.ops-tab{min-height:38px;border-radius:7px;font-size:12.5px}
.ops-main{padding-left:22px}
.ops-main>.page-head{margin-bottom:20px;padding-bottom:14px;border-bottom:1px solid #e8eaee}
.ops-main>.page-head h1{font-size:23px;font-weight:650}
.ops-main>.page-head small{color:#3b82f6;letter-spacing:.14em}
.ops-main .table-panel{border-radius:9px;border-color:#e8eaee;background:#ffffff;padding:16px;margin-bottom:16px}
.ops-main .panel-head{gap:14px;flex-wrap:wrap}
.ops-main .panel-head h2{font-size:14px}
.ops-main th{position:sticky;top:0;z-index:2;background:#f7f8fa;color:#86909c;font-weight:600}
.ops-main td,.ops-main th{padding:10px 11px}
.ops-main tr:hover td{background:#1c1119}
.ops-main input,.ops-main select{min-height:36px;border-radius:7px;background:#0c080d;border-color:#37373e;color:#eeeef1}
.ops-main button{min-height:34px;border-radius:7px;transition:background-color .15s,border-color .15s,color .15s}
.ops-main button:focus-visible,.ops-nav button:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}
.ops-main .primary{background:#f4778d;color:#2a0f17}
.ops-main .empty{padding:24px 12px;color:#85858f;text-align:center}
.ops-main .sub{display:block;margin-top:3px;color:#85858f;font-size:10.5px}
#wallet-panel{margin-top:18px;padding-top:16px;border-top:1px solid #e8eaee}
@media(max-width:820px){
 .ops-header{height:56px;padding-inline:14px}
 #app{display:block;width:calc(100% - 24px);margin:13px auto 40px}
 .ops-nav{position:sticky;top:56px;z-index:25;flex-direction:row;flex-wrap:nowrap;overflow-x:auto;border-right:0;border-bottom:1px solid #e8eaee;background:#fffffff5;padding:8px 0;margin:0 0 12px;max-height:none}
 .ops-tab{min-height:36px;flex:none;padding-inline:12px;font-size:12px}
 .ops-main{padding-left:0}
 .ops-main>.page-head{margin-bottom:14px}
 .ops-main>.page-head h1{font-size:21px}
 .ops-main .table-panel{padding:12px;border-radius:8px}
 .ops-main .panel-head{align-items:flex-start}
 .ops-main .order-tools{width:100%;display:flex;flex-wrap:wrap}
 .ops-main .order-tools input{min-width:0;flex:1}
 .ops-main .wallet-form{grid-template-columns:1fr}
 .ops-main .wallet-form .note,.ops-main .wallet-form button{grid-column:auto}
 .ops-main .table-wrap{overscroll-behavior-x:contain}
 .ops-main th,.ops-main td{padding:8px 9px;font-size:11px}
}


/* neon finish */
.ops-main .table-panel{border-color:#e8eaee}
.ops-main .primary{background:linear-gradient(180deg,#7c5cff,#5b46d6);color:#fff}
.ops-main .primary:hover{filter:brightness(1.08)}
.ops-main input:focus,.ops-main select:focus{border-color:#7c5cff;box-shadow:0 0 0 3px #7c5cff24;outline:none}

/* Liquid glass chrome */
.ops-header.lg,.ops-nav.lg{position:relative;
  background:radial-gradient(120% 160% at var(--lg-x,20%) var(--lg-y,0%), #ffffffef 0%, #ffffffc9 44%, #ffffffa8 100%);
  -webkit-backdrop-filter:blur(22px) saturate(185%);backdrop-filter:blur(22px) saturate(185%)}
.ops-header.lg{box-shadow:inset 0 1px 0 #ffffffd9, 0 10px 30px -24px #1d212930}
.ops-nav.lg{border-right:1px solid #e8eaee}
.ops-header.lg::before{content:"";position:absolute;inset:0;pointer-events:none;background-image:radial-gradient(#ffffff5c 1px,transparent 1px);background-size:7px 7px;opacity:.45}
.lg::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(105deg,#ffffff00 34%,#ffffff9e 48%,#ffffff00 62%);
  background-size:240% 100%;animation:lg-sheen 8s ease-in-out infinite;opacity:.65}
.ops-main .table-panel{box-shadow:inset 0 1px 0 #ffffffd9, 0 8px 22px -18px #1d212926}

@keyframes lg-sheen{0%{background-position:130% 0}60%{background-position:-45% 0}100%{background-position:130% 0}}
@media(prefers-reduced-motion:reduce){.lg::after{animation:none}}

/* ── Light pass: strip remaining dark surfaces ─────────── */
.ops.live-surface{background:#f7f8fa;color:#1d2129;color-scheme:light}
.ops-modal{background:#0d152640}
.ops-header.lg{background:radial-gradient(120% 160% at var(--lg-x,20%) var(--lg-y,0%),#fffffff2 0%,#ffffffd6 44%,#ffffffb8 100%)}
.ops-tab{color:#6b7381}
.ops-tab:hover{background:#eef1f5;color:#3b82f6}
.ops-tab.active{background:#eff5ff;color:#2f6fdc}
.ops-main :is(input,select,textarea){background:#ffffff;border:1px solid #dcdfe5;color:#1d2129}
.ops-main :is(input,select,textarea)::placeholder{color:#a9b0bb}
.ops-main :is(input,select):focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f624}
.ops.live-surface :is(.ops-main,.login-view) .primary{background:#3b82f6;color:#fff;box-shadow:0 8px 20px -12px #3b82f680}
.ops.live-surface :is(.ops-main,.login-view) .primary:hover{background:#2f6fdc;filter:none}
.ops.live-surface .ops-main :is(.secondary,.icon-btn){background:#ffffff;border:1px solid #dcdfe5;color:#1d2129}
.ops.live-surface .ops-main :is(.secondary,.icon-btn):hover{background:#f2f3f5;border-color:#c9ced6}
.ops-main .row-actions button{border:1px solid #dcdfe5;background:#ffffff;color:#2f5fa8;font-size:11.5px;padding:5px 10px}
.ops-main .row-actions button:hover{background:#eff5ff;border-color:#b8cfef}
.ops-main .row-actions button[data-end]{background:#fff6f5;border-color:#f2cfcb;color:#d9463c}
.ops.live-surface dialog,.ops-modal-card{background:#ffffff;border:1px solid #e8eaee;box-shadow:0 24px 60px -30px #1d212940;color:#1d2129}
.ops-modal-card :is(input,select,textarea){background:#ffffff;border:1px solid #dcdfe5;color:#1d2129}
.ops-modal-card p,.ops-main .empty,.ops-main .sub,.panel-foot,.block-note{color:#86909c}
.ops-main .empty{color:#a9b0bb}
td,.ops-main td{color:#4e5969}
.ops-main tbody tr:nth-child(even){background:#fafbfc}
.ops-main tr:hover td{background:#f4f6f9}
.ops .status,.ops-main .status{color:#0f9c6f}
.ops .positive,.ops-main .positive{color:#0f9c6f}
.ops .negative{color:#e0483f}
.status-pill{border:1px solid #f0d6b0;background:#fdf6ea;color:#c07a12}
.status-pill.on{border:1px solid #bfe6d4;background:#eefaf4;color:#0f9c6f}
.order-status{border:1px solid #dcdfe5;color:#6b7381;background:#f7f8fa}
.order-status.pending{border-color:#f0d6b0;background:#fdf6ea;color:#c07a12}
.order-status.credited{border-color:#bfe6d4;background:#eefaf4;color:#0f9c6f}
.order-status.failed{border-color:#f2cfcb;background:#fdf3f2;color:#d9463c}
.sub-head{border-top:1px solid #e8eaee}
.pay-row{border-bottom:1px solid #eef0f4}
.pay-row b{color:#0f9c6f}
#gift-file{color:#6b7381}
#gift-file::file-selector-button{border:1px solid #dcdfe5;background:#f7f8fa;color:#4e5969}
.save-bar{background:linear-gradient(180deg,#f7f8fa00,#f7f8fa 58%)}
.dirty-hint.changed{color:#c07a12}
.toast{background:#1d2129;color:#ffffff}
.login-view #login-error,.login-view small{color:#d9463c}
.metrics b{color:#1d2129}
.ops-main th{background:#f7f8fa;color:#86909c;border-bottom:1px solid #e8eaee}
.ops-main .table-wrap{border:1px solid #eef0f4;border-radius:8px}

.admin-pages { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:10px; padding:12px 4px 0; color:#425168; font-size:13px; }
.ops .admin-pages .secondary { background:#eef3fb; color:#243451; border-color:#d5dfed; }
#home-room-form textarea { padding:8px; border:1px solid #d5dfed; border-radius:6px; color:#243451; background:white; font:inherit; }
