/* ===== 钱多多 SunnyUI 简约紫主题（UIClientQDD，对齐 ManageBingo.Designer-M） =====
 * 主色：     #9C27B0  - 按钮 / 边框 / 表头
 * 浅色:      #F8F0FC  - DataGrid 背景
 * 网格线:    #CE93D8
 * 选中:      #7B1FA2  - DataGrid 选中行
 * 标题底:    #4A148C
 * 标题字:    #E1BEE7
 * 摘要底:    #EDE7F6  - LabelSummary
 * 强调色:    #6A1B9A  - ui-label-strong / 大数字
 */

/* 简约版主程序不显示的控件（DOM 保留，仅隐藏） */
body.qdd-lite .lite-hidden {
    display: none !important;
}

body.qdd-lite .btn-chatroom-lite {
    background: linear-gradient(180deg, #BA68C8 0%, #9C27B0 55%, #7B1FA2 100%) !important;
    border-color: #6A1B9A !important;
}

body.qdd-lite .chatroom-titlebar {
    background: linear-gradient(180deg, #BA68C8 0%, #7B1FA2 100%);
}

body.qdd-lite .chatroom-panel {
    border-color: #7B1FA2;
}

/* 右侧竖排按钮列：Designer 各控件宽 86~89、left 1141/1142 不一，网页端统一对齐 */
body.qdd-lite .uiform-body #uiButton12,
body.qdd-lite .uiform-body #uiButton11,
body.qdd-lite .uiform-body #uiButton7,
body.qdd-lite .uiform-body #uiButton1,
body.qdd-lite .uiform-body #uiButton10,
body.qdd-lite .uiform-body #uiInviteItNow,
body.qdd-lite .uiform-body #uiSymbolButton7,
body.qdd-lite .uiform-body #uiSymbolButton1,
body.qdd-lite .uiform-body #uiSymbolButton2,
body.qdd-lite .uiform-body #btnLHC,
body.qdd-lite .uiform-body #uiButton13,
body.qdd-lite .uiform-body #btnChatRoom,
body.qdd-lite .uiform-body #uiButton9,
body.qdd-lite .uiform-body #uiButton8,
body.qdd-lite .uiform-body #uiCheckwxidBTN {
    left: 1141px !important;
    width: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
    height: 28px !important;
    line-height: 26px !important;
    padding: 0 4px !important;
    box-sizing: border-box;
}
body.qdd-lite .uiform-body #uiClientToInvite {
    left: 1141px !important;
    width: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
    height: 28px !important;
    padding: 2px 6px !important;
    box-sizing: border-box;
}
/* 主邀/邀请框盖过报表区，避免简约版点选后昵称丢失 */
body.qdd-lite .uiform-body #uiInviteItNow,
body.qdd-lite .uiform-body #uiClientToInvite {
    z-index: 20 !important;
}

/* 右侧竖排：等距 34px（28 高 + 6 隙），覆盖 Designer 不规则 top */
body.qdd-lite .uiform-body #uiButton12   { top: 232px !important; }
body.qdd-lite .uiform-body #uiButton11   { top: 266px !important; }
body.qdd-lite .uiform-body #uiInviteItNow { top: 300px !important; }
body.qdd-lite .uiform-body #uiClientToInvite { top: 334px !important; }
body.qdd-lite .uiform-body #uiSymbolButton7 { top: 368px !important; }
body.qdd-lite .uiform-body #uiButton1    { top: 402px !important; }
body.qdd-lite .uiform-body #uiButton10   { top: 436px !important; }
body.qdd-lite .uiform-body #uiSymbolButton1 { top: 470px !important; }
body.qdd-lite .uiform-body #uiSymbolButton2 { top: 504px !important; }
body.qdd-lite .uiform-body #btnLHC       { top: 538px !important; }
body.qdd-lite .uiform-body #btnChatRoom   { top: 572px !important; }
/* 网页不展示的右侧/微信类按钮：勿用 top:auto（会漂进左侧 gridview） */
body.qdd-lite .uiform-body #uiButton9,
body.qdd-lite .uiform-body #uiButton8,
body.qdd-lite .uiform-body #uiButton7,
body.qdd-lite .uiform-body #uiSymbolButton8,
body.qdd-lite .uiform-body #uiCheckwxidBTN,
body.qdd-lite .uiform-body #uiButton13 {
    display: none !important;
}

/* 五盏状态灯：Designer-B 为 14×35 竖条易裁切，网页横排 16×15 完整显示绿/灰/红 */
body.qdd-lite .uiform-body .status-light {
    display: inline-block !important;
    width: 16px !important;
    height: 15px !important;
    min-width: 16px !important;
    min-height: 15px !important;
    box-sizing: border-box !important;
    z-index: 6;
    overflow: visible;
}
body.qdd-lite .uiform-body #btnStatusReceive { left: 1141px !important; top: 198px !important; }
body.qdd-lite .uiform-body #btnStatusSend    { left: 1159px !important; top: 198px !important; }
body.qdd-lite .uiform-body #btnStatusWechat  { left: 1177px !important; top: 198px !important; }
body.qdd-lite .uiform-body #btnStatusMonitor { left: 1195px !important; top: 198px !important; }
body.qdd-lite .uiform-body #btnStatusNet      { left: 1213px !important; top: 198px !important; }
body.qdd-lite .status-light.green {
    background: #90ee90 !important;
    border-color: #67c167 !important;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: #d9d9d9;
    font-family: "Microsoft YaHei UI", "微软雅黑", "Segoe UI", Tahoma, sans-serif;
    color: #303030;
    overflow: auto;
}

/* ============= UIForm（窗体） ============= */
.uiform {
    position: relative;
    width: 1240px;
    height: 818px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #4A148C;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.qdd-lite .uiform-title {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 8px;
}

.uiform-titlebar {
    position: absolute;
    left: 0; top: 0;
    width: 100%; height: 36px;     /* 与主程序 UIForm.Padding.Top=36 对齐 */
    background: #4A148C;           /* DarkBlue —— 与主程序 TitleColor 一致 */
    color: #E1BEE7;                /* Gold  —— 与主程序 TitleForeColor 一致 */
    line-height: 36px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: bold;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.uiform-conn {
    font-size: 12px;
    font-weight: normal;
    color: #ffffff;
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 3px;
}

.uiform-conn.connected { background: #2e7d32; }
.uiform-conn.disconnected { background: #b71c1c; }
.uiform-conn.connecting { background: #1565c0; }

/* 标题栏右侧的功能按钮（密码设置 / 退出） */
.uiform-titlebar { gap: 8px; }
.uiform-pwd-btn {
    appearance: none;
    border: 1px solid rgba(255,215,0,0.45);
    background: rgba(255, 255, 255, 0.10);
    color: #E1BEE7;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    height: 24px;
    line-height: 18px;
    border-radius: 3px;
    cursor: pointer;
    transition: background .15s, transform .12s;
    margin-left: 4px;
}
.uiform-pwd-btn:hover {
    background: rgba(255,215,0,0.18);
    color: #fff;
}
.uiform-pwd-btn:active {
    transform: translateY(1px);
}
.uiform-pwd-btn-ghost {
    color: #ffd9d9;
    border-color: rgba(255,200,200,0.45);
}
.uiform-pwd-btn-ghost:hover {
    background: rgba(229, 57, 53, 0.30);
}
.uiform-pwd-btn-warn {
    color: #ffe0b2;
    border-color: rgba(255, 167, 38, 0.55);
}
.uiform-pwd-btn-warn:hover {
    background: rgba(255, 152, 0, 0.30);
    color: #fff;
}
.uiform-pwd-btn-ok {
    color: #b9f6ca;
    border-color: rgba(102, 187, 106, 0.55);
}
.uiform-pwd-btn-ok:hover {
    background: rgba(56, 142, 60, 0.32);
    color: #fff;
}
.uiform-pwd-btn[disabled],
.uiform-pwd-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* ============= 自动托（AutoBetForm）—— 独立弹窗（非遮罩层），可最大化 ============= */
.autobet-popup-shell {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    pointer-events: none;
    background: transparent;
}
.autobet-popup-shell.is-open {
    display: block;
}
.autobet-popup-shell .autobet-window {
    pointer-events: auto;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(0, 190, 172, 0.45);
}
.autobet-window {
    width: 1180px;
    max-width: calc(100vw - 24px);
    height: 820px;
    max-height: calc(100vh - 24px);
}
.autobet-window.autobet-maximized {
    left: 0 !important;
    top: 0 !important;
    transform: none !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0;
    margin: 0 !important;
}
.modal-winbtn {
    margin-left: 6px;
    font-size: 14px;
    line-height: 1;
    color: #fff;
    opacity: 0.92;
    cursor: pointer;
    user-select: none;
    padding: 0 4px;
}
.modal-winbtn:hover { opacity: 1; }
.autobet-titlebar {
    background: #00BEAC;
    gap: 8px;
    flex-wrap: nowrap;
}
.autobet-title-label {
    flex-shrink: 0;
    font-weight: 600;
}
.autobet-title-btns {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}
.autobet-bar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 26px;
    padding: 0 10px;
    font-size: 12px;
    color: #007a70;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 3px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.92);
    transition: background .12s, border-color .12s;
    user-select: none;
}
.autobet-bar-btn:hover  { background: #fff; }
.autobet-bar-btn:active { background: #e8f8f6; }
.autobet-bar-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.autobet-bar-btn.autobet-btn-stop {
    color: #fff;
    background: #DC3545;
    border-color: #DC3545;
}
.autobet-bar-btn.autobet-btn-stop:hover  { background: #EF4444; border-color: #EF4444; }
.autobet-bar-btn.autobet-btn-stop:active { background: #B91C1C; border-color: #B91C1C; }
.autobet-bar-btn.autobet-btn-stop:disabled {
    background: rgba(255, 255, 255, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: rgba(255, 255, 255, 0.85) !important;
}
.autobet-global-hidden {
    display: none !important;
}
.autobet-state {
    margin-left: auto;
    font-size: 12px;
    font-weight: normal;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
}
.autobet-state.running { background: #2e7d32; }
.autobet-state.stopped { background: #b71c1c; }
.autobet-body {
    padding: 6px 8px 8px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    background: #ffffff;
}
.autobet-top {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin: 4px 0 8px;
    flex-shrink: 0;
}
.autobet-toolbar {
    flex: 1;
    min-width: 0;
    background: #EEFBFA;
    border: 1px solid #00BEAC;
    border-radius: 6px;
    padding: 6px 14px 12px;
    margin: 0;
}
.autobet-legend {
    padding: 0 8px;
    font-weight: 600;
    color: #007a70;
    font-size: 13px;
    background: transparent;
}
.autobet-grid2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 24px;
    align-items: center;
}
.autobet-field {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.autobet-field-full {
    margin-top: 8px;
}
.autobet-pattern-panel {
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px dashed #c5e8e4;
}
.autobet-pattern-inactive {
    opacity: 0.55;
}
.autobet-checkgroup {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    flex: 1;
    min-width: 0;
    padding: 4px 0;
}
.autobet-chk {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #303030;
    cursor: pointer;
    user-select: none;
}
.autobet-pattern-inactive .autobet-chk {
    cursor: default;
}
.autobet-field-full > .autobet-txt {
    flex: 1;
    min-width: 0;
}
.autobet-lbl {
    font-size: 13px;
    color: #303030;
    width: 80px;
    text-align: right;
    flex-shrink: 0;
}
.autobet-txt {
    flex: 1;
    height: 28px;
    line-height: 26px;
    border: 1px solid #00988A;
    border-radius: 3px;
    padding: 0 8px;
    font-size: 13px;
    background: #fff;
    color: #303030;
    box-sizing: border-box;
    min-width: 0;
}
/* 主界面 .ui-textbox 为 position:absolute（WinForm 坐标布局）；弹窗内必须回流式，否则会盖住前面的 label */
.autobet-window .ui-textbox.autobet-txt {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
}
.autobet-window .ui-textbox.autobet-txt:focus {
    box-shadow: none;
    border-color: #00988A;
}
/* —— 桌面端 UIIntegerUpDown 风格的「机器人数量」 —— */
.autobet-spinner {
    display: inline-flex;
    align-items: stretch;
    flex: 0 0 112px;
    width: 112px;
    height: 28px;
    border: 1px solid #00988A;
    border-radius: 3px;
    overflow: hidden;
    background: #fff;
    box-sizing: border-box;
}
.autobet-spinner .spin-input {
    flex: 1 1 auto;
    width: 56px;
    min-width: 0;
    border: 0;
    outline: 0;
    background: #fff;
    color: #303030;
    font-size: 13px;
    text-align: center;
    height: 100%;
    padding: 0;
    box-sizing: border-box;
}
.autobet-spinner .spin-input:focus { outline: none; }
.autobet-spin-btn {
    width: 28px;
    border: none;
    background: #00BEAC;
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    padding: 0;
}
.autobet-spin-btn:hover  { background: #33CBBD; }
.autobet-spin-btn:active { background: #00988A; }
.autobet-mini-btn {
    height: 28px !important;
    line-height: 26px !important;
    padding: 0 10px !important;
    background: #00BEAC !important;
    border-color: #00988A !important;
    color: #fff !important;
    font-size: 12px !important;
    margin-left: 4px;
}
.autobet-mini-btn:hover  { background: #33CBBD !important; }
.autobet-mini-btn:active { background: #00988A !important; }

.autobet-grid-wrap {
    flex: 1;
    min-height: 0;
    border: 1px solid #00BEAC;
    border-radius: 3px;
    overflow: auto;
    background: #EEFBFA;
}
.autobet-grid {
    width: 100%;
    min-width: 1180px;
    border-collapse: collapse;
    font-size: 12px;
    color: #303030;
    background: #EEFBFA;
}
.autobet-grid thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #00BEAC;
    color: #fff;
    border: 1px solid #00988A;
    padding: 6px 6px;
    font-weight: 600;
    text-align: center;
}
.autobet-grid tbody td {
    border: 1px solid #22C7B7;
    padding: 2px 4px;
    text-align: center;
    background: #fff;
}
.autobet-grid tbody tr:nth-child(even) td { background: #EEFBFA; }
.autobet-grid tbody tr:hover td           { background: #CCF2EE; }
.autobet-grid input[type="text"] {
    width: 100%;
    height: 24px;
    line-height: 22px;
    border: 1px solid #00988A;
    border-radius: 2px;
    padding: 0 4px;
    font-size: 12px;
    box-sizing: border-box;
    background: #fff;
}
.autobet-grid input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.autobet-grid .col-active { width: 50px; }
.autobet-grid .col-index  { width: 56px; }
.autobet-grid .col-nick   { width: 130px; }
.autobet-grid .col-num    { width: 78px; }
.autobet-grid .col-items  { min-width: 220px; }
.autobet-grid td.cell-readonly {
    color: #555;
    background: #f5fbfa;
}

/* —— 顶部右侧按钮列：保存 / 刷新 / 启动 / 停止（垂直排列，对标 SunnyUI 实心按钮） —— */
.autobet-side-btns {
    flex-shrink: 0;
    width: 110px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 6px 0;
}
.autobet-side-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    padding: 0 14px;
    font-size: 13px;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    background: #00BEAC;
    transition: background .12s;
    user-select: none;
}
.autobet-side-btn:hover  { background: #33CBBD; }
.autobet-side-btn:active { background: #00988A; }
.autobet-side-btn:disabled {
    background: #BFD7D4 !important;
    color: #fff !important;
    cursor: not-allowed;
}
.autobet-side-btn.autobet-btn-stop {
    background: #DC3545;
}
.autobet-side-btn.autobet-btn-stop:hover  { background: #EF4444; }
.autobet-side-btn.autobet-btn-stop:active { background: #B91C1C; }
.autobet-side-btn.autobet-btn-stop:disabled {
    background: #BFC0C0 !important;
}
/* —— 按钮内置图标（纯 CSS，不依赖字体库） —— */
.autobet-btn-ico {
    display: inline-block;
    width: 14px;
    height: 14px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 14px 14px;
}
.ico-save {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V7l-4-4zm-5 16a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm3-10H5V5h10v4z'/></svg>");
}
.ico-refresh {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M17.65 6.35A8 8 0 1 0 19.73 14h-2.08a6 6 0 1 1-1.41-6.36L13 11h7V4l-2.35 2.35z'/></svg>");
}
.ico-start {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M8 5v14l11-7z'/></svg>");
}
.ico-stop {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M6 5h4v14H6zM14 5h4v14h-4z'/></svg>");
}

/* ============= 重启机器人 · 确认框（对标 Windows / SunnyUI MessageBox：蓝标题 + 底栏双键） ============= */
/* 当机器人离线时 auth-mask(z-index:100000) 已经在弹出，必须比它更高，否则点不到「确定/取消」 */
#dialogRestartConfirmMask {
    z-index: 200000;
}
.winconfirm-window {
    width: 420px;
    max-width: calc(100vw - 32px);
    border-radius: 0;
    border: 1px solid #7E57C2 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}
.winconfirm-titlebar {
    background: #8E24AA;
    color: #ffffff;
    height: 32px;
    line-height: 32px;
    padding: 0 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: default;
}
.winconfirm-titlebar .modal-close {
    color: #ffffff;
    line-height: 22px;
}
.winconfirm-body {
    background: #F3E5F5;
    padding: 20px 18px 18px;
    font-size: 14px;
    color: #303030;
    line-height: 1.55;
    min-height: 72px;
}
.winconfirm-main {
    margin: 0 0 10px;
    font-weight: normal;
}
.winconfirm-sub {
    margin: 0;
    font-size: 12px;
    color: #555;
    line-height: 1.5;
}
.winconfirm-footer {
    display: flex;
    border-top: 1px solid #D1C4E9;
    background: #f5f8fc;
}
.winconfirm-btn {
    flex: 1;
    height: 36px;
    margin: 0;
    padding: 0;
    border: none;
    background: #f5f8fc;
    font-size: 14px;
    font-family: inherit;
    color: #303030;
    cursor: pointer;
    user-select: none;
}
.winconfirm-btn:hover {
    background: #EDE7F6;
}
.winconfirm-btn:active {
    background: #E1BEE7;
}
.winconfirm-btn + .winconfirm-btn {
    border-left: 1px solid #D1C4E9;
}

/* ============= 登录遮罩 ============= */
.auth-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 25, 50, 0.55);
    backdrop-filter: blur(2px);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
}
.auth-window {
    width: 360px;
    background: #fff;
    border: 1px solid #9C27B0;
    border-radius: 6px;
    box-shadow: 0 12px 36px rgba(0,0,0,0.45);
    overflow: hidden;
    animation: auth-pop .18s ease-out;
}
@keyframes auth-pop {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-titlebar {
    height: 38px;
    line-height: 38px;
    padding: 0 14px;
    background: linear-gradient(180deg, #6A1B9A 0%, #6A1B9A 100%);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.auth-conn-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d3d3d3;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
}
.auth-conn-dot.connected    { background: #4caf50; }
.auth-conn-dot.connecting   { background: #ffb300; }
.auth-conn-dot.disconnected { background: #e53935; }
.auth-body {
    padding: 18px 22px 22px;
}
.auth-tip {
    font-size: 12.5px;
    color: #555;
    margin-bottom: 12px;
    line-height: 1.5;
}
.auth-tip.locked {
    color: #c62828;
    background: #ffebee;
    border: 1px solid #ef9a9a;
    padding: 8px 10px;
    border-radius: 4px;
}
.auth-lbl {
    display: block;
    font-size: 12.5px;
    color: #303030;
    margin-bottom: 4px;
}
.auth-window .auth-input {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: 32px;
    box-sizing: border-box;
    font-size: 14px;
}
.auth-error {
    color: #c62828;
    font-size: 12.5px;
    margin: 8px 0 0;
    min-height: 18px;
}
.auth-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
}
.auth-window .auth-submit-btn {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    min-width: 110px;
    height: 34px !important;
    line-height: 32px !important;
    padding: 0 26px !important;
    font-size: 14px !important;
}
.auth-window .auth-submit-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}
.auth-foot {
    margin-top: 12px;
    color: #909399;
    font-size: 12px;
    text-align: center;
}

/* ============= 修改密码弹窗 ============= */
.pwd-window {
    width: 380px;
    border-color: #6A1B9A;
    background: #fff;
}
.pwd-titlebar {
    background: #6A1B9A;
}
.pwd-body { padding: 16px 18px 18px; }
.pwd-row {
    display: grid;
    grid-template-columns: 96px 1fr;
    align-items: center;
    column-gap: 10px;
    margin-bottom: 10px;
}
.pwd-lbl {
    text-align: right;
    font-size: 13px;
    color: #303030;
}
.pwd-window .pwd-input {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: 30px;
    box-sizing: border-box;
}
.pwd-error {
    color: #c62828;
    font-size: 12.5px;
    margin: 4px 0 6px;
    min-height: 16px;
}
.pwd-tip {
    color: #909399;
    font-size: 12px;
    margin-bottom: 10px;
}
.pwd-footer {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #e0e6f5;
    padding-top: 10px;
}
.pwd-window .pwd-save-btn {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    min-width: 120px;
    height: 32px !important;
    line-height: 30px !important;
    padding: 0 22px !important;
}

.uiform-body {
    /* 与主窗体 1240×818 完全重合：所有子控件 top/left 直接沿用
       ManageBingo.Designer.cs 中的 Location 数值，不再附加 35/36px 偏移。
       标题栏靠 z-index 覆盖在上方。 */
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    height: 818px;
    background: transparent;
    z-index: 1;
}

/* ============= panelBet 顶部参数面板 ============= */
.panelBet {
    position: absolute;
    left: 212px; top: 36px;
    width: 1026px; height: 158px;
    background: #ffffff;
    border: 1px solid #E1BEE7;
}

/* ============= 标签 ============= */
.ui-label,
.ui-label-strong {
    position: absolute;
    color: #303030;
    font-size: 13px;
    line-height: 24px;
    padding: 0 2px;
    user-select: none;
}
.ui-label-strong {
    color: #6A1B9A;     /* 大字号期号 / 剩余时间，主程序里也是深蓝色 */
    font-weight: bold;
    font-size: 14px;
}

/* ============= 文本框 ============= */
.ui-textbox {
    position: absolute;
    height: 27px;
    background: #ffffff;
    border: 1px solid #9C27B0;
    color: #303030;
    font-size: 13px;
    padding: 0 6px;
    outline: none;
}
.ui-textbox:focus {
    border-color: #7B1FA2;
    box-shadow: 0 0 0 1px rgba(30,144,255,0.4);
}
.ui-textbox[readonly], .ui-textbox:disabled {
    color: #888;
    background: #F8F0FC;
}

/* ============= 下拉框 ============= */
.ui-combobox {
    position: absolute;
    height: 27px;
    background: #ffffff;
    border: 1px solid #9C27B0;
    color: #303030;
    font-size: 13px;
    padding: 0 4px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #9C27B0 50%),
                      linear-gradient(135deg, #9C27B0 50%, transparent 50%);
    background-position: calc(100% - 14px) 12px, calc(100% - 9px) 12px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 22px;
}

/* ============= 按钮（UISymbolButton/UIButton） ============= */
/* 弹触感：
 *   - 默认状态有一层"凸出"阴影 + 高光，按起来更立体
 *   - hover 微抬 1px、加深阴影
 *   - active 按下回压 (translateY+scale)，并切换成 inset 阴影模拟凹陷
 *   - cubic-bezier 出现轻微"过冲"回弹，给硬邦邦的状态机感加点呼吸
 *   - 点击瞬间 ::after 涂一层径向高光做 ripple
 */
.ui-symbolbutton {
    position: absolute;
    height: 28px;
    background: linear-gradient(180deg, #BA68C8 0%, #9C27B0 55%, #7B1FA2 100%);
    color: #ffffff;
    border: 1px solid #7B1FA2;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    padding: 0 4px;
    text-align: center;
    line-height: 26px;
    overflow: hidden;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.45) inset,
        0 -1px 0 rgba(0, 0, 0, 0.10) inset,
        0 2px 4px rgba(74, 20, 140, 0.30);
    transition:
        transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.18s ease,
        background 0.15s ease,
        filter 0.15s ease;
    will-change: transform, box-shadow;
}
.ui-symbolbutton::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 60%);
    opacity: 0;
    transform: scale(0.3);
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.ui-symbolbutton:hover {
    background: linear-gradient(180deg, #CE93D8 0%, #AB47BC 55%, #8E24AA 100%);
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.55) inset,
        0 -1px 0 rgba(0, 0, 0, 0.12) inset,
        0 4px 8px rgba(74, 20, 140, 0.35);
    filter: brightness(1.04);
}
.ui-symbolbutton:active {
    background: linear-gradient(180deg, #7B1FA2 0%, #6A1B9A 100%);
    transform: translateY(1px) scale(0.97);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.25) inset,
        0 0 0 rgba(0, 0, 0, 0) ;
    transition:
        transform 0.06s ease-out,
        box-shadow 0.06s ease-out,
        background 0.06s ease-out;
}
.ui-symbolbutton:active::after {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0s, transform 0s;
}
.ui-symbolbutton:focus {
    outline: none;
}
.ui-symbolbutton:focus-visible {
    box-shadow:
        0 0 0 2px rgba(156, 39, 176, 0.45),
        0 1px 0 rgba(255, 255, 255, 0.45) inset,
        0 -1px 0 rgba(0, 0, 0, 0.10) inset,
        0 2px 4px rgba(74, 20, 140, 0.30);
}
.ui-symbolbutton[disabled],
.ui-symbolbutton.disabled {
    background: #b8c8db;
    border-color: #889bbb;
    cursor: not-allowed;
    opacity: 0.85;
    box-shadow: none;
    transform: none;
    filter: none;
}
.ui-symbolbutton[disabled]:hover,
.ui-symbolbutton.disabled:hover,
.ui-symbolbutton[disabled]:active,
.ui-symbolbutton.disabled:active {
    background: #b8c8db;
    transform: none;
    box-shadow: none;
}
.ui-symbolbutton[data-local="true"] {
    /* 仅在主程序本机有效的按钮：远程态视觉灰一点（仍保留弹触感的阴影） */
    cursor: not-allowed;
    background: linear-gradient(180deg, #9aaecb 0%, #889bbb 100%);
    border-color: #5d7396;
    color: #f0f0f0;
}
.ui-symbolbutton[data-local="true"]:hover {
    background: linear-gradient(180deg, #aebbd0 0%, #97aac9 100%);
    transform: translateY(-1px);
}

/* 上方期号小球（N1..N8） */
.ui-prizenum {
    position: absolute;
    width: 25px; height: 25px;
    border-radius: 50%;
    border: 1px solid #9C27B0;
    background: #F8F0FC;
    color: #6A1B9A;
    font-weight: bold;
    font-size: 13px;
    cursor: default;
    text-align: center;
    line-height: 23px;
}

/* ============= 开关（UISwitch）—— 弹触感 ============= */
.ui-switch {
    position: absolute;
    height: 28px;
    border: 1px solid #9C27B0;
    border-radius: 4px;
    background: #F8F0FC;
    color: #6A1B9A;
    text-align: center;
    line-height: 26px;
    font-size: 13px;
    user-select: none;
    cursor: pointer;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.50) inset,
        0 -1px 0 rgba(0, 0, 0, 0.06) inset,
        0 2px 3px rgba(74, 20, 140, 0.15);
    transition:
        transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.18s ease,
        background 0.2s,
        color 0.2s;
}
.ui-switch:hover {
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.55) inset,
        0 -1px 0 rgba(0, 0, 0, 0.08) inset,
        0 4px 7px rgba(74, 20, 140, 0.22);
    filter: brightness(1.03);
}
.ui-switch:active {
    transform: translateY(1px) scale(0.97);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.20) inset;
    transition:
        transform 0.06s ease-out,
        box-shadow 0.06s ease-out;
}
.ui-switch.on {
    /* SunnyUI ActiveColor 默认 Green，主程序在“非麦水版”里改成了 OrangeRed；
       两套都常见，这里用绿色与截图一致 */
    background: linear-gradient(180deg, #43A047 0%, #2e7d32 55%, #1b5e20 100%);
    border-color: #1b5e20;
    color: #ffffff;
}
.ui-switch.off {
    background: #F8F0FC;
    border-color: #9C27B0;
    color: #6A1B9A;
}
/* 私彩三态：官网 / 通杀 / 放水 */
.ui-switch.cheat-official {
    background: linear-gradient(180deg, #43A047 0%, #2e7d32 55%, #1b5e20 100%);
    border-color: #1b5e20;
    color: #ffffff;
}
.ui-switch.cheat-kill {
    background: linear-gradient(180deg, #7E57C2 0%, #5E35B1 55%, #4527A0 100%);
    border-color: #4527A0;
    color: #ffffff;
}
.ui-switch.cheat-water {
    background: rgb(0, 0, 255);
    border-color: rgb(0, 0, 200);
    color: #ffffff;
}
.ui-switch.cheat-manual {
    background: linear-gradient(180deg, #E53935 0%, #C62828 55%, #B71C1C 100%);
    border-color: #B71C1C;
    color: #ffffff;
}
.ui-switch.disabled {
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
    transform: none;
    filter: none;
}
.ui-switch.disabled:hover,
.ui-switch.disabled:active {
    transform: none;
    box-shadow: none;
}

/* ============= 分组框 ============= */
.ui-groupbox {
    position: absolute;
    border: 1px solid #9C27B0;
    background: rgba(244, 242, 251, 0.92);
    pointer-events: none;
}
.ui-groupbox-title {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 28px;
    line-height: 28px;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    color: #4A148C;
    pointer-events: none;
}

/* ============= 数据网格 ============= */
.ui-datagrid {
    position: absolute;
    background: #F8F0FC;          /* dvSummarized.BackgroundColor 一致 */
    border: 1px solid #9C27B0;
    overflow: auto;
    font-size: 12px;
}
.ui-datagrid table {
    width: 100%;
    border-collapse: collapse;
    background: #F8F0FC;
}
.ui-datagrid thead th {
    position: sticky;
    top: 0;
    background: #9C27B0;          /* 表头主色 */
    color: #ffffff;
    text-align: center;
    border: 1px solid #7B1FA2;
    padding: 4px 6px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.ui-datagrid thead th .sort-arrow {
    font-size: 10px;
    margin-left: 2px;
    opacity: 0.85;
}
.ui-datagrid tbody td {
    border: 1px solid #CE93D8;    /* dvSummarized.GridColor 一致 */
    padding: 3px 6px;
    text-align: center;
    color: #303030;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}
.ui-datagrid tbody tr:nth-child(odd)  { background: #ffffff; }
.ui-datagrid tbody tr:nth-child(even) { background: #F8F0FC; }
.ui-datagrid tbody tr:hover           { background: #EDE7F6; }
.ui-datagrid tbody tr.selected,
.ui-datagrid tbody tr.selected:hover {
    background: #7B1FA2;          /* DodgerBlue —— 与主程序选中色对齐 */
    color: #ffffff;
}
.ui-datagrid tbody tr.selected td { color: #ffffff; }
.ui-datagrid tbody td.num-positive { color: #2e7d32; font-weight: bold; }
.ui-datagrid tbody td.num-negative { color: #b71c1c; font-weight: bold; }
.ui-datagrid tbody tr.order-load-hint td {
    background: #f3e5f5;
    color: #6a1b9a;
    font-size: 11px;
    padding: 6px;
    border-top: 1px dashed #9C27B0;
}

.contacts-grid thead th { font-size: 11px; }
.contacts-grid tbody td { font-size: 11px; }

/* ============= LabelSummary 顶部摘要带 ============= */
.label-summary {
    position: absolute;
    background: #EDE7F6;          /* Moccasin —— 主程序 BackColor */
    color: #303030;
    font-size: 14px;
    font-weight: bold;
    padding: 2px 8px;
    line-height: 23px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    border: 1px solid #CE93D8;
}

/* ============= 状态指示灯 ============= */
.status-light {
    position: absolute;
    width: 16px; height: 15px;
    border-radius: 2px;
    background: #d3d3d3;
    border: 1px solid #b0b0b0;
    cursor: help;
}
.status-light.green  { background: #90ee90; border-color: #67c167; }
.status-light.gray   { background: #d3d3d3; border-color: #b0b0b0; }
.status-light.red    { background: #ff7d7d; border-color: #d94c4c; }

/* ============= LabelOpening：开盘/关盘 状态色块（与机器人风格一致） ============= */
.ui-label.opening-tag {
    text-align: center;
    font-weight: 700;
    color: #fff !important;
    border-radius: 3px;
    padding: 0 4px;
    line-height: 22px;
    height: 22px;
    border: 1px solid transparent;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
    transition: background-color .15s, border-color .15s;
}
.ui-label.opening-tag.opening-on {
    background: #2EBB55;
    border-color: #1F9544;
}
.ui-label.opening-tag.opening-off {
    background: #E53935;
    border-color: #B71C1C;
}

/* ============= SplitContainer ============= */
.ui-splitcontainer {
    position: absolute;
    border: 1px solid #9C27B0;
    background: #F8F0FC;
    overflow: hidden;
}
.ui-splitpanel {
    position: relative;
    overflow: hidden;
    background: #F8F0FC;
}
.ui-splitter {
    height: 6px;
    background: #E1BEE7;
    border-top: 1px solid #9C27B0;
    border-bottom: 1px solid #9C27B0;
    cursor: ns-resize;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    touch-action: none;
    user-select: none;
}
.ui-splitter:hover {
    background: #D1C4E9;
}
.ui-splitter.dragging {
    background: #B39DDB;
    box-shadow: inset 0 0 0 1px #2d7fdb;
}

/* ============= Toast ============= */
.toast-host {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    pointer-events: none;
}
.toast {
    background: #303030;
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .25s, transform .25s;
    pointer-events: auto;
    max-width: 320px;
    word-break: break-all;
}
.toast.show {
    opacity: 1;
    transform: translateY(0);
}
.toast.info  { background: #1565c0; }
.toast.ok    { background: #2e7d32; }
.toast.warn  { background: #e07a00; }
.toast.error { background: #b71c1c; }

/* ============= 上下分管理弹窗（对标 UpDown.cs，青绿主题 #00BEAC） ============= */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}
.modal-window {
    background: #ffffff;
    border: 1px solid #00BEAC;
    border-radius: 4px;
    box-shadow: 0 6px 24px rgba(0,0,0,.35);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.modal-titlebar {
    height: 36px;
    line-height: 36px;
    padding: 0 12px;
    color: #ffffff;
    font-weight: bold;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
}
.modal-titlebar.dragging { cursor: grabbing; }
.modal-close {
    width: 24px; height: 24px;
    line-height: 22px; text-align: center;
    border-radius: 3px;
    cursor: pointer;
    font-size: 18px;
}
.modal-close:hover { background: rgba(255,255,255,.25); }

/* 主邀请：手机端需在用户点击手势内复制，用浮层 + 大按钮（完整版 UIClient + 简约版 QDD 共用逻辑） */
#inviteLinkSheetMask { z-index: 200010; }
@media (hover: none) {
    #inviteLinkSheetMask { z-index: 200010 !important; }
    .invite-link-sheet .invite-link-btn { min-height: 44px; }
}
.invite-link-sheet {
    width: min(440px, calc(100vw - 24px));
    max-width: 96vw;
}
.invite-link-sheet-body { padding: 12px 14px 14px; }
.invite-link-sheet .invite-link-input {
    font-size: 16px; /* iOS 避免聚焦时整页缩放 */
    width: 100%;
    box-sizing: border-box;
    padding: 10px 8px;
    margin: 0 0 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
/* 重开奖下拉：勿写死 height，否则字被裁切 */
.invite-link-sheet select.reopen-issue-select {
    height: auto;
    min-height: 44px;
    line-height: 1.45;
    padding: 10px 36px 10px 12px;
    margin: 0 0 8px;
    vertical-align: middle;
}
.invite-link-sheet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}
.invite-link-btn {
    min-height: 44px;
    padding: 0 18px;
    font-size: 15px;
    border-radius: 6px;
    border: 1px solid #00988A;
    background: #00BEAC;
    color: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.invite-link-btn.secondary {
    background: #f5f5f5;
    color: #333;
    border-color: #ccc;
}
.invite-link-btn:active { opacity: 0.9; }

/* 私彩·手工开录入弹窗（完整版 + 简约版共用 app.js） */
.manual-draw-slots { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.manual-draw-slot-row { display: flex; align-items: center; gap: 10px; }
.manual-draw-slot-label { width: 52px; font-size: 13px; color: #444; flex-shrink: 0; }
.manual-draw-slot-input {
  flex: 1; max-width: 120px; height: 36px; padding: 0 10px;
  border: 1px solid #ccc; border-radius: 6px; font-size: 15px; text-align: center;
}
.manual-draw-slot-input:focus { border-color: #b71c1c; outline: none; box-shadow: 0 0 0 2px rgba(183,28,28,.15); }

.manual-draw-titlebar { background: #b71c1c; }
.manual-draw-sheet { border-color: #b71c1c; }
.manual-draw-submit-btn { background: #b71c1c; border-color: #9a1616; }
.manual-draw-submit-btn:hover { background: #9a1616; }

.ui-label-strong.manual-draw-locked-issue {
    color: #b71c1c !important;
    font-weight: bold;
}

.manual-draw-more-btn {
    position: absolute;
    padding: 0;
    min-width: 0;
    box-sizing: border-box;
    line-height: 1;
    font-size: 16px;
    font-weight: bold;
    border: 1px solid #b71c1c;
    background: #fff;
    color: #b71c1c;
    border-radius: 3px;
    cursor: pointer;
    z-index: 2;
}
.manual-draw-more-btn:hover {
    background: #b71c1c;
    color: #fff;
}

/* —— 上下分窗口本体 —— */
.updown-window {
    width: 920px; height: 480px;
}
.updown-titlebar { background: #00BEAC; }
.updown-toolbar {
    background: #EEFBFA;
    border-bottom: 1px solid #00BEAC;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.updown-refresh {
    position: relative !important;
    height: 30px;
    background: #00BEAC !important;
    border-color: #00988A !important;
    padding: 0 16px !important;
    line-height: 28px !important;
}
.updown-refresh:hover  { background: #33CBBD !important; }
.updown-refresh:active { background: #00988A !important; }
.updown-tip { color: #555; font-size: 12px; }

.updown-grid {
    position: relative;
    flex: 1;
    border: none;
    border-top: 1px solid #00BEAC;
    background: #EEFBFA;
}
.updown-grid table { background: #EEFBFA; }
.updown-grid thead th {
    background: #00BEAC;
    border-color: #00988A;
}
.updown-grid tbody td { border-color: #22C7B7; }
.updown-grid tbody tr:nth-child(odd)  { background: #ffffff; }
.updown-grid tbody tr:nth-child(even) { background: #EEFBFA; }
.updown-grid tbody tr:hover           { background: #CCF2EE; }
.updown-grid tbody tr.selected,
.updown-grid tbody tr.selected:hover {
    background: #009E91;
    color: #fff;
}

/* 状态列染色（对标 dgvUpDown_CellFormatting） */
.updown-status-pending  { background: #c62828 !important; color: #fff !important; }
.updown-status-agree    { background: #2e7d32 !important; color: #fff !important; }
.updown-status-ignore   { background: #757575 !important; color: #fff !important; }

/* 行内同意/忽略按钮（弹触感同 .ui-symbolbutton） */
.updown-act-btn {
    display: inline-block;
    height: 22px;
    line-height: 20px;
    padding: 0 10px;
    border: 1px solid #00988A;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    color: #fff;
    background: linear-gradient(180deg, #1FD1BE 0%, #00BEAC 55%, #00A89A 100%);
    font-size: 12px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.50) inset,
        0 -1px 0 rgba(0, 0, 0, 0.10) inset,
        0 2px 3px rgba(0, 90, 80, 0.25);
    transition:
        transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.18s ease,
        background 0.15s ease,
        filter 0.15s ease;
}
.updown-act-btn:hover {
    background: linear-gradient(180deg, #3DD9C8 0%, #1FD1BE 55%, #08C5B5 100%);
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.55) inset,
        0 -1px 0 rgba(0, 0, 0, 0.12) inset,
        0 4px 7px rgba(0, 90, 80, 0.30);
    filter: brightness(1.04);
}
.updown-act-btn:active {
    transform: translateY(1px) scale(0.97);
    background: linear-gradient(180deg, #00A89A 0%, #00897C 100%);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.20) inset;
    transition:
        transform 0.06s ease-out,
        box-shadow 0.06s ease-out,
        background 0.06s ease-out;
}
.updown-act-btn.disabled,
.updown-act-btn[disabled] {
    background: #cccccc !important;
    border-color: #aaa !important;
    color: #888 !important;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
}
.updown-act-ignore {
    background: linear-gradient(180deg, #8A8A8A 0%, #757575 55%, #5C5C5C 100%);
    border-color: #555;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.30) inset,
        0 -1px 0 rgba(0, 0, 0, 0.18) inset,
        0 2px 3px rgba(0, 0, 0, 0.20);
}
.updown-act-ignore:hover {
    background: linear-gradient(180deg, #A0A0A0 0%, #909090 55%, #6F6F6F 100%);
}
.updown-act-ignore:active {
    background: linear-gradient(180deg, #5C5C5C 0%, #4A4A4A 100%);
}

/* 备注列可编辑 */
.updown-remark-input {
    width: 100%;
    height: 24px;
    border: 1px solid #00BEAC;
    background: #ffffff;
    padding: 0 4px;
    box-sizing: border-box;
    outline: none;
    font-size: 12px;
}
.updown-remark-input:focus { box-shadow: 0 0 0 1px rgba(0,190,172,.5); }

/* ============= 高级设置弹窗（对标 AdvanceBet.cs，橙色标题 #7B1FA2） ============= */
.advance-window {
    width: min(960px, 98vw);
    max-width: 98vw;
    max-height: 92vh;
    border-color: #7B1FA2;
    background: #F8F0FC;
}
/* 主界面 .ui-textbox / .ui-combobox 为 position:absolute；弹窗内必须回流式布局，否则会叠在一起 */
.advance-window .ui-textbox {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: auto;
    min-height: 30px;
    height: auto;
    box-sizing: border-box;
}
.advance-window select.ui-combobox,
.advance-window .advance-select {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: auto;
    max-width: 100%;
    min-height: 30px;
    height: auto;
    box-sizing: border-box;
}
.advance-titlebar {
    background: #7B1FA2;
    cursor: grab;
}
.advance-titlebar.dragging { cursor: grabbing; }
.advance-body {
    padding: 14px 18px 16px;
    max-height: calc(92vh - 44px);
    overflow-y: auto;
    background: #F8F0FC;
    box-sizing: border-box;
}
.advance-note {
    font-size: 12px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.45;
}
.advance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 28px;
    align-items: start;
}
@media (max-width: 900px) {
    .advance-grid { grid-template-columns: 1fr; }
}
.advance-col {
    min-width: 0;
}
.advance-group-title {
    font-size: 13px;
    font-weight: bold;
    color: #6A1B9A;
    margin: 12px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 87, 34, 0.35);
}
.advance-col .advance-group-title:first-child { margin-top: 0; }
/* 每行用 grid：[标签 110px] [输入区 自适应]，杜绝 flex 挤掉标签 */
.advance-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: center;
    column-gap: 10px;
    row-gap: 6px;
    margin-bottom: 10px;
}
/* 含一个 input + 后续 hint/sep/checkbox 的「输入区」也是 flex */
.advance-row > .advance-lbl {
    grid-column: 1 / 2;
    align-self: center;
    text-align: right;
    padding-right: 4px;
}
.advance-row > :not(.advance-lbl) {
    /* 让输入控件落到第二列，多个控件并排时再用一个内部 flex 容器 */
    grid-column: 2 / 3;
}
.advance-row > .advance-lbl + :not(.advance-lbl) {
    /* 第一个非 label 元素直接铺第二列 */
    justify-self: stretch;
}
/* 多控件并排（input + chk + chk 等）：用 row-fields 包起来更稳；
   但兼容旧标记，没有包裹时仍按二列网格放第二个之后的元素 */
.advance-row > :not(.advance-lbl) ~ :not(.advance-lbl) {
    grid-column: 2 / 3;
}
/* 整行只有 checkbox：横向 flex（多个 checkbox 同行）；
   配合 .advance-stack 时再切回纵向单列 */
.advance-row-chk {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 16px;
    row-gap: 6px;
}
.advance-row-chk.advance-stack {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 6px;
}
.advance-row-chk.advance-stack > * { grid-column: 1 / 2; }
/* 内部多控件并排容器（标签右边一组：input+chk+chk 等） */
.advance-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    min-width: 0;
}
.advance-fields > .ui-textbox,
.advance-fields > select.ui-combobox {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    height: 28px;
    min-height: 28px;
    flex: 1 1 140px;
    min-width: 80px;
    max-width: 100%;
}
.advance-fields > .ui-textbox.narrow {
    flex: 0 0 84px;
    min-width: 70px;
    max-width: 90px;
}
.advance-fields > .advance-chk {
    flex: 0 0 auto;
}
.advance-fields > .advance-sep {
    flex: 0 0 auto;
    color: #4D4D4D;
    font-size: 13px;
    padding: 0 2px;
}
.advance-fields > .advance-hint {
    flex: 0 0 auto;
    color: #909399;
    font-size: 12px;
}
.advance-stack {
    grid-template-columns: 1fr;
    row-gap: 6px;
}
.advance-stack > * { grid-column: 1 / 2; }
.advance-lbl {
    font-size: 13px;
    color: #303030;
    white-space: nowrap;
}
.advance-chk {
    font-size: 13px;
    color: #303030;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    flex: 1 1 auto;
    min-width: 120px;
}
.advance-chk.advance-span {
    width: 100%;
    flex-basis: 100%;
    max-width: none;
}
.advance-chk input { cursor: pointer; flex-shrink: 0; }
/* 弹窗内文本框宽度：窄数字框 / 通栏输入 */
.advance-window .advance-txt.narrow {
    width: 88px !important;
    min-width: 72px;
    flex: 0 0 auto;
}
.advance-window .advance-txt.wide {
    flex: 1 1 200px;
    min-width: 180px;
    max-width: 100%;
}
.advance-window .advance-row > .ui-textbox.advance-txt:not(.narrow):not(.wide) {
    flex: 1 1 200px;
    min-width: 160px;
    max-width: 100%;
}
.advance-sep { color: #888; padding: 0 4px; flex-shrink: 0; }
.advance-hint { font-size: 12px; color: #888; flex: 0 0 auto; white-space: nowrap; }
.advance-select {
    flex: 1 1 220px;
    min-width: 180px;
    height: 32px;
    font-size: 13px;
    border: 1px solid #7B1FA2;
    border-radius: 3px;
    background: #fff;
    padding: 0 8px;
}
.advance-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 87, 34, 0.35);
    display: flex;
    justify-content: flex-end;
}
.advance-save-btn {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    min-width: 140px;
    height: 36px !important;
    line-height: 34px !important;
    padding: 0 26px !important;
    background: linear-gradient(180deg, #AB47BC 0%, #7B1FA2 55%, #6A1B9A 100%) !important;
    border-color: #6A1B9A !important;
}

/* ============= 滚动条：灰色（与主程序系统滚动条一致） ============= */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border: 2px solid #f0f0f0;     /* 给滚动块留一点空白边，更接近 Windows 原生 */
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover  { background: #a8a8a8; }
::-webkit-scrollbar-thumb:active { background: #787878; }
::-webkit-scrollbar-track   { background: #f0f0f0; }
::-webkit-scrollbar-corner  { background: #f0f0f0; }

/* Firefox */
* { scrollbar-color: #c1c1c1 #f0f0f0; scrollbar-width: thin; }

/* —— dvSummarized 行右键"设置状态"菜单 —— */
.qdd-ctx-menu {
    position: fixed;
    z-index: 11000;
    min-width: 140px;
    background: #ffffff;
    border: 1px solid #c5c5c5;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
    font-size: 13px;
    user-select: none;
    padding: 4px 0;
}
/* 手机/平板：长按弹"设置状态"菜单时，关掉系统 callout / 选择高亮，避免冲突 */
#dvSummarized tbody, #dvSummarized tbody tr, #dvSummarized tbody td {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
/* 触屏设备上菜单项加大点，方便手指点击 */
@media (pointer: coarse) {
    .qdd-ctx-menu { min-width: 180px; font-size: 15px; }
    .qdd-ctx-item { padding: 12px 18px; }
    .qdd-ctx-title { padding: 8px 16px; font-size: 13px; }
}
.qdd-ctx-title {
    padding: 4px 12px;
    color: #888;
    font-size: 12px;
    border-bottom: 1px solid #eee;
    margin-bottom: 4px;
    cursor: default;
}
.qdd-ctx-item {
    padding: 6px 14px;
    cursor: pointer;
    white-space: nowrap;
    color: #222;
}
.qdd-ctx-item:hover { background: #9C27B0; color: #ffffff; }

/* ============= 群主聊天室 · 主窗体 #uiform 正下方（须在 uiform 外，避免叠在 818px 主窗体顶部） ============= */
body > .chatroom-panel,
body > .netdisk-panel {
    clear: both;
}
.chatroom-panel {
    position: relative;
    width: min(1240px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    height: 820px;
    margin: 12px auto 28px;
    background: #ffffff;
    border: 1px solid #6A1B9A;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    resize: vertical;
    min-height: 260px;
    max-height: 92vh;
    box-sizing: border-box;
}
.chatroom-panel.minimized {
    height: 36px !important;
    min-height: 36px;
    resize: none;
}
.chatroom-panel.minimized .chatroom-body { display: none; }
.chatroom-titlebar {
    flex: 0 0 auto;
    height: 36px;
    background: linear-gradient(180deg, #AB47BC 0%, #7B1FA2 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    padding: 0 6px 0 14px;
    font-size: 13px;
    user-select: none;
    gap: 8px;
}
.chatroom-title-text {
    font-weight: 600;
    flex-shrink: 0;
}
.chatroom-url {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: #FFE0B2;
    cursor: pointer;
}
.chatroom-url:hover { color: #fff; text-decoration: underline; }
.chatroom-actions {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}
.chatroom-btn {
    width: 28px;
    height: 24px;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    border-radius: 2px;
}
.chatroom-btn:hover { background: rgba(255,255,255,.18); }
.chatroom-btn:active { background: rgba(0,0,0,.18); }
.chatroom-btn.chatroom-close:hover { background: #d32f2f; }
.chatroom-body {
    flex: 1;
    min-height: 0;
    background: #f4f4f4;
}
.chatroom-body iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #fff;
}

/* ============= 网盘 · 接在主窗体下方的内嵌面板（绿色主题） ============= */
/*
 *  注：通宝 PC SPA 是面向桌面浏览器的，整套布局（左账户/中盘口/右"两面长龙排行"列）
 *  最少要 1480~1520px 才能完整显示；之前用了 1240px，"两面长龙排行"会被裁掉一半。
 *  这里：
 *    - 默认宽度抬到 1520px，保证常见 1920×1080 显示器一次就能看全；
 *    - max-width 用 calc(100vw - 24px) 保护小屏幕（防止溢出窗口）；
 *    - 浏览器原生 resize:both 在 iframe 容器里没法用（mousedown 被 iframe 吃掉），
 *      改为自实现拖角（.netdisk-resize-handle + JS）。
 */
.netdisk-panel {
    position: relative;
    width: 1520px;
    height: 900px;
    margin: 12px auto 28px;
    background: #ffffff;
    border: 1px solid #2E7D32;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 1100px;
    min-height: 320px;
    max-width: calc(100vw - 24px);
    max-height: 96vh;
    box-sizing: border-box;
}
/* 右下角拖角（覆盖在 iframe 之上），样式类似浏览器原生 resize 三角 */
.netdisk-resize-handle {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 18px;
    height: 18px;
    cursor: nwse-resize;
    z-index: 10;
    /* 用渐变画两道斜线，模拟浏览器原生右下角 resize 三角 */
    background:
        linear-gradient(135deg, transparent 0 55%, #2E7D32 55% 65%, transparent 65% 75%, #2E7D32 75% 85%, transparent 85%);
    border-bottom-right-radius: 4px;
    opacity: .75;
    user-select: none;
}
.netdisk-resize-handle:hover { opacity: 1; }
/* 拖拽时盖在 iframe 上的透明遮罩：默认 pointer-events:none 不挡用户；拖拽中加 .active 切到 auto 拦截事件 */
.netdisk-drag-mask {
    position: absolute;
    inset: 0;
    z-index: 9;
    pointer-events: none;
    background: transparent;
}
.netdisk-drag-mask.active { pointer-events: auto; cursor: nwse-resize; }
.netdisk-panel.minimized {
    height: 36px !important;
    min-height: 36px;
    resize: none;
}
.netdisk-panel.minimized .netdisk-body { display: none; }
.netdisk-titlebar {
    flex: 0 0 auto;
    height: 36px;
    background: linear-gradient(180deg, #66BB6A 0%, #2E7D32 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    padding: 0 6px 0 14px;
    font-size: 13px;
    user-select: none;
    gap: 8px;
}
.netdisk-title-text {
    font-weight: 600;
    flex-shrink: 0;
}
.netdisk-meta {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: #DCEDC8;
    cursor: pointer;
    font-family: Consolas, "Courier New", monospace;
}
.netdisk-meta:hover { color: #fff; text-decoration: underline; }
.netdisk-actions {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}
.netdisk-btn {
    width: 28px;
    height: 24px;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    border-radius: 2px;
}
.netdisk-btn:hover { background: rgba(255,255,255,.18); }
.netdisk-btn:active { background: rgba(0,0,0,.18); }
.netdisk-btn.netdisk-close:hover { background: #c62828; }
.netdisk-body {
    flex: 1;
    min-height: 0;
    background: #f4f4f4;
    position: relative;
}
.netdisk-body iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #fff;
}
.netdisk-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.92);
    color: #2E7D32;
    font-size: 14px;
    z-index: 2;
}
