/* public/shared/common.css */
/* index.html / quote.html 共用样式 */
/* 生成日期：2026-10-08 */
/* 说明：390 条完全重复规则（按 index.css 原始顺序）+ 2 条同名不同统一版 */

/* ===== 完全重复规则（390 条，按 index.css 原始顺序）===== */

* { box-sizing: border-box; margin: 0; padding: 0; }

.chat-group-item:hover { background-color: #e8e8e8 !important; }

#chatKehuList:focus, #chatDuijieList:focus { outline: none; }

.hide-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }

.hide-scrollbar::-webkit-scrollbar { display: none; }

@keyframes balanceGreenFlash {
    0% { background-color: #dcfce7; color: #15803d; }
    30% { background-color: #bbf7d0; color: #166534; }
    100% { background-color: #fffbeb; color: inherit; }
  }

@keyframes balanceRedFlash {
    0% { background-color: #fee2e2; color: #b91c1c; }
    30% { background-color: #fecaca; color: #991b1b; }
    100% { background-color: #fffbeb; color: inherit; }
  }

input.balance-flash-green { animation: balanceGreenFlash 10s ease-out forwards; border-radius: 4px; }

input.balance-flash-red { animation: balanceRedFlash 10s ease-out forwards; border-radius: 4px; }

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    padding: 6px 5px;
    background: #f0f2f5;
  }

.wrap {
    max-width: 100%; margin: 0 auto; background: #fff;
    padding: 10px 12px; box-shadow: 0 2px 12px rgba(0,0,0,.08); border-radius: 10px;
  }

input.cell, input.info-input {
    border: none; outline: none; background: transparent;
    font-family: inherit; text-align: center;
  }

input:disabled { cursor: not-allowed; opacity: 0.6; }

input[readonly] { cursor: text; user-select: text; -webkit-user-select: text; }

input[readonly]:focus { background: transparent; outline: none; }

input:focus { background: transparent; border-radius: 0; outline: none; }

.editable { color: #111827; }

.formula  { color: #2563eb; font-weight: 600; }

.start-balance-yellow { color: #f59e0b !important; font-weight: 700; }

.total-shift-green { color: #16a34a !important; font-weight: 700; }

.coin-rate.rate-blue { color: #2563eb !important; font-weight: 600; }

.rate-refresh-btn { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); border: none; background: transparent; cursor: pointer; font-size: 14px; padding: 0; line-height: 1; }

.rate-refresh-btn:hover { opacity: 0.7; }

.rate-refresh-btn.loading { pointer-events: none; opacity: 0.5; animation: spin 1s linear infinite; }

@keyframes spin { from { transform: translateY(-50%) rotate(0deg); } to { transform: translateY(-50%) rotate(360deg); } }

.coin-sub.subtotal-dark { color: #111827 !important; font-size: 15px !important; font-weight: 400 !important; }

.info-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: nowrap; }

.info-group { display: flex; gap: 0; flex-wrap: nowrap; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 0; overflow: hidden; }

.info-item { display: flex; align-items: center; gap: 4px; background: transparent; padding: 5px 8px; border-radius: 0; border: none; border-right: 1px solid #e2e8f0; }

.info-item:last-child { border-right: none; }

.info-label { font-size: 14px; color: #6b7280; font-weight: 600; white-space: nowrap; position: relative; padding-right: 8px; }

.info-label::after { content: '|'; position: absolute; right: 0; top: 50%; transform: translateY(-50%) scaleY(0.75); color: #d1d5db; font-weight: normal; }

.info-input { width: 100px; font-size: 14px; padding: 2px 4px; color: #111827; }

.info-input.formula { color: #2563eb; font-weight: 600; }

.info-group-left .info-item { padding: 3px 5px; gap: 3px; }

.info-group-left .info-label { font-size: 14px; }

.info-group-left .info-input { width: 55px; font-size: 14px; text-align: center; }

.info-group-left .date-input { width: 78px; }

.info-group:not(.info-group-left) .info-input { width: 65px; font-size: 14px; text-align: center; }

#personSelect { width: 78px; appearance: none; -webkit-appearance: none; -moz-appearance: none; background-image: none; padding-right: 4px; }

.date-input { width: 78px !important; min-width: 78px; max-width: 78px; }

.app-icon { width: 26px; height: 26px; flex-shrink: 0; vertical-align: middle; }

.app-icon-sm { width: 22px; height: 22px; flex-shrink: 0; }

.coin-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 700; flex-shrink: 0; }

.coin-icon-sm { width: 22px; height: 22px; font-size: 11px; }

.icon-empty { background: #e5e7eb !important; color: #9ca3af !important; }

.icon-btc  { background: linear-gradient(135deg,#f7931a,#ffb347); }

.icon-usdt { background: linear-gradient(135deg,#26a17b,#4cd4a0); }

.icon-trx  { background: linear-gradient(135deg,#ef0000,#ff4d4d); }

.icon-usdc { background: linear-gradient(135deg,#2775ca,#3d8bfd) !important; color: #fff !important; }

.ledger-container { border: 1px solid #d1d5db; border-radius: 6px; overflow: hidden; margin-bottom: 6px; background: #fff; }

.coin-summary-bar { display: grid; grid-template-columns: repeat(10, 1fr); grid-auto-rows: 42px; }

.csb-block { display: flex; align-items: center; padding: 5px 8px; position: relative; height: 42px; box-sizing: border-box; }

.csb-rmb  { grid-column: 1 / 5; background: linear-gradient(90deg,#5cdbd3,#13c2c2 50%,#5cdbd3); }

.csb-coin { grid-column: 5 / 11; background: linear-gradient(90deg,#5cdbd3,#13c2c2 50%,#5cdbd3); border-left: 1px solid transparent; position: relative; }

.csb-coin::before {
    content: '';
    position: absolute;
    top: 0;
    left: -0.5px;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
    background-size: 1px 200%;
    animation: marquee-line-flow 2.5s linear infinite;
    z-index: 10;
    pointer-events: none;
  }

.csb-arrow { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); font-size: 12px; cursor: pointer; user-select: none; color: #fff; z-index: 2; }

.csb-content { display: flex; align-items: center; gap: 7px; margin: 0 auto; border-radius: 999px; background: rgba(13,148,136,.45); padding: 1px 12px 1px 8px; }
.ledger-container:has(.detail-section:not(.collapsed)) .csb-content { margin-top: 3px; }

.csb-icons { display: flex; gap: 3px; align-items: center; }

.csb-value { font-size: 16px; font-weight: 700; }

.csb-rmb  .csb-value { color: #fff; }

.csb-coin .csb-value { color: #fff; }

.detail-section { background: #fff; border-top: 0; }

.detail-section.collapsed { display: none; }
/* 折叠状态：人民币 / 数字币各占 50%，中线落在正中 */
.ledger-container:has(.detail-section.collapsed) .csb-rmb { grid-column: 1 / 6 !important; }
.ledger-container:has(.detail-section.collapsed) .csb-coin { grid-column: 6 / 11 !important; }

/* 三折叠（余额明细 + 内部/综合都折叠）：内部折叠条并入胶囊行，整行 42px 四等分 */
.coin-summary-bar:has(.internal-section) { grid-template-rows: 42px; }
.coin-summary-bar:has(.internal-section) .csb-block { height: 42px; }
.coin-summary-bar .internal-section .internal-grid { grid-template-rows: 42px !important; }
.coin-summary-bar .internal-section .internal-label-left,
.coin-summary-bar .internal-section .internal-label-right { height: 42px !important; }

.detail-header-card { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); background-image: linear-gradient(90deg,#5cdbd3,#13c2c2 50%,#5cdbd3), linear-gradient(90deg,#5cdbd3,#13c2c2 50%,#5cdbd3); background-size: 40% 100%, 60% 100%; background-position: left top, right top; background-repeat: no-repeat; border-bottom: 1px solid #0d9488; }

.detail-row-card { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); grid-auto-rows: 36px; border-bottom: 1px solid #d1d5db; }

.dhc-cell { padding: 4px 2px; text-align: center; font-size: 15px; font-weight: 600; color: #fff; border-right: 1px solid transparent; height: 36px; display: flex; align-items: center; justify-content: center; background: transparent; }

.drc-cell { padding: 0 2px; text-align: center; border-right: 1px solid #d1d5db; font-size: 14px; height: 36px; display: flex; align-items: center; justify-content: center; min-height: 36px; }

.icon-cell { gap: 0 !important; padding-left: 4px !important; }

.custom-select { position: relative; flex: 1; min-width: 0; cursor: pointer; }

.custom-select-value { display: flex; align-items: center; justify-content: center; gap: 8px; height: 28px; font-size: 13px; }

.custom-select-options { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #d1d5db; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.15); z-index: 9999; display: none; margin-top: 2px; }

.custom-select-options.open { display: block; }

.custom-select-option { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 4px; font-size: 13px; cursor: pointer; }

.custom-select-option:hover { background: #ffe58f; color: #333; }

.coin-icon-wrap { position: relative; display: inline-block; width: 22px; height: 22px; flex-shrink: 0; }

.coin-icon-wrap img { width: 22px; height: 22px; border-radius: 50%; position: absolute; top: 0; left: 0; z-index: 1; }

.coin-icon-wrap .coin-icon { position: absolute; top: 0; left: 0; z-index: 0; }

.platform-icon { width: 22px; height: 22px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }

.icon-btc { background: linear-gradient(135deg,#f7931a,#ffb347); }

.icon-usdt { background: linear-gradient(135deg,#26a17b,#4cd4a0); }

.icon-eth { background: linear-gradient(135deg,#627eea,#8aa9ff); }

.icon-trx { background: linear-gradient(135deg,#ef0000,#ff4d4d); }

.dhc-cell:last-child { border-right: none; }

.drc-cell:last-child { border-right: none; }

.detail-row-card:last-child { border-bottom: none; }

.dhc-cell:nth-child(4), .detail-row-card > div:nth-child(4) { border-right: none !important; }

.dhc-cell:nth-child(5), .detail-row-card > div:nth-child(5) { position: relative; border-left: 1px solid transparent !important; }

.dhc-cell:nth-child(5)::before, .detail-row-card > div:nth-child(5)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -0.5px;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
    background-size: 1px 200%;
    animation: marquee-line-flow 2.5s linear infinite;
    z-index: 10;
    pointer-events: none;
  }

.rate-header-cell { position: relative; }

.rate-settings-icon { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); cursor: pointer; font-size: 14px; opacity: 0.7; }

.rate-settings-icon:hover { opacity: 1; }

.internal-section { margin-top: 9px; border: 1px solid #d1d5db; border-radius: 6px; overflow: hidden; }
/* 余额明细折叠：表头行隐藏，内部账目行替代表头行的高度与位置（紧贴胶囊行） */
.internal-grid div { line-height: 1; padding-top: 1px !important; }

.internal-grid > .internal-label-left,
  .internal-grid > .internal-label-right {
    padding-top: 0 !important;
  }

.dk-table-container div { line-height: 1; }

.dk-table-container { margin-top: 9px; border-radius: 6px; overflow: hidden; border: 1px solid #d1d5db; }

@keyframes marquee-line-flow {
    0% { background-position: 0% -100%; }
    100% { background-position: 0% 100%; }
  }

.marquee-divider {
    position: relative;
  }

.marquee-divider::before,
  .marquee-divider-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: -0.5px;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
    background-size: 1px 200%;
    animation: marquee-line-flow 2.5s linear infinite;
    z-index: 10;
    pointer-events: none;
  }

.marquee-divider-left {
    border-left-color: transparent !important;
    position: relative;
  }

.marquee-divider-right {
    border-right-color: transparent !important;
    position: relative;
  }

.marquee-divider-right::after {
    content: '';
    position: absolute;
    top: 0;
    right: -0.5px;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
    background-size: 1px 200%;
    animation: marquee-line-flow 2.5s linear infinite;
    z-index: 10;
    pointer-events: none;
  }

.toolbar { margin-top: 11px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }

.toolbar button { padding: 4px 11px; font-size: 14px; border: 1px solid #d1d5db; background: #fff; color: #374151; border-radius: 6px; cursor: pointer; font-family: inherit; }

.toolbar button:hover { background: #f3f4f6; border-color: #9ca3af; }

.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 999999; align-items: center; justify-content: center; }

.modal-overlay.show { display: flex; }

.modal-overlay.hidden { display: none; }

.modal-box { background: #fff; border-radius: 12px; width: 1100px; max-width: 95%; max-height: 85vh; overflow: hidden; box-shadow: 0 10px 32px rgba(30,60,120,.16); }

.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid #0d9488; background: linear-gradient(90deg,#5cdbd3,#13c2c2 50%,#5cdbd3); }

.modal-title { font-size: 17px; font-weight: 700; color: #fff; }

.modal-close { background: none; border: none; font-size: 20px; color: #fff; cursor: pointer; line-height: 1; padding: 0 4px; opacity: .85; }

.modal-close:hover { color: #fff; opacity: 1; }

.modal-body { padding: 16px 20px; max-height: calc(85vh - 60px); overflow-y: auto; }

.modal-footer { padding: 16px; border-top: 1px solid #eee; display: flex; gap: 12px; justify-content: flex-end; }

.login-mask { position: fixed; inset: 0; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; justify-content: center; align-items: center; z-index: 99999; }

.login-box { background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.2); width: 360px; max-width: calc(100vw - 32px); }

.login-box h2 { text-align: center; margin-bottom: 30px; color: #333; font-size: 24px; }

.login-form-group { margin-bottom: 20px; }

.login-form-group label { display: block; margin-bottom: 8px; color: #666; font-size: 14px; }

.login-form-group input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; outline: none; }

.login-btn { width: 100%; padding: 12px; background: #667eea; color: #fff; border: none; border-radius: 6px; font-size: 16px; cursor: pointer; }

.top-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

.top-user-info-inline { font-size: 14px; color: #666; }

.top-user-btns-inline { display: flex; gap: 8px; justify-content: flex-end; }

.company-title-row { text-align: center; margin-bottom: 12px; }

.top-user-btn { padding: 6px 14px; border: 1px solid #ddd; background: #fff; border-radius: 6px; cursor: pointer; font-size: 14px; font-family: inherit; }

.top-user-btn:hover { background: #f0f0f0; }

.top-user-btn.pending { background: #fffbe6; border-color: #ffe58f; color: #d48806; }

.top-user-btn.admin { background: #f0f5ff; border-color: #adc6ff; color: #2f54eb; }

.pending-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 99998; justify-content: center; align-items: center; }

.pending-modal.show { display: flex; }

.pending-box { background: #fff; padding: 24px; border-radius: 10px; max-width: 95vw; max-height: 95vh; overflow: hidden; display: flex; flex-direction: column; }

.pending-title { font-size: 15px; font-weight: bold; padding: 8px 2px; color: #1f2937; background: transparent; display: inline-block; }

.pending-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f0f0f0; flex-shrink: 0; padding-bottom: 8px; margin-bottom: 0; }

.pending-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f0f0f0; flex-shrink: 0; padding-top: 16px; margin-top: 0; }

.footer-actions { display: flex; gap: 8px; }

.ledger-table-wrap { padding: 0; overflow-y: auto; overflow-x: hidden; min-height: 200px; scroll-behavior: auto; flex: 1; }

/* 记账历史弹窗：屏幕90%高度后出现滚动条 */
#pendingModal .pending-box { max-height: 90vh; }

.ledger-table-wrap.no-scroll { overflow-y: hidden; height: auto !important; max-height: none !important; }

#pendingModal .pending-box.auto-height { max-height: 95vh; }

.ledger-table tbody tr { height: 34px; }

.ledger-table tbody td { height: 34px; box-sizing: border-box; }

/* 记账历史「备注」：最多 10 个字，超出截断；span 限宽，长备注不会把表格撑开 */
.ledger-remark-text { display: inline-block; max-width: 140px; overflow: hidden; white-space: nowrap; text-overflow: clip; vertical-align: middle; }

.ledger-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }

/* 表头整行一条渐变：渐变放在 tr 上（th 透明），thead 整体 sticky 保证滚动时仍遮住内容 */
.ledger-table thead { position: sticky; top: 0; z-index: 30; }

.ledger-table thead tr { background: linear-gradient(90deg,#5cdbd3,#13c2c2 50%,#5cdbd3); }

.ledger-table thead th { background: transparent; color: #fff; font-weight: 600; padding: 8px; text-align: center; border-bottom: 1px solid #0d9488; }

.ledger-table td { padding: 8px; text-align: center; border-bottom: 1px solid #d1d5db; }

/* 记账历史斑马纹 */
#pendingModal .ledger-table tbody tr:nth-child(even) { background: #f1f3f5; }

.bill-unread { background: #fffbeb !important; }


.bill-revoked td { color: #9ca3af !important; }

.bill-revoked .ledger-amount-text { color: #9ca3af !important; text-decoration: line-through; }

.bill-revoked .ledger-cat-text { color: #9ca3af !important; }

.bill-revoked-stamp { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-15deg); border: 1px solid #8c8c8c; color: #8c8c8c; padding: 1px 6px; font-size: 11px; font-weight: 700; border-radius: 3px; opacity: 0.7; pointer-events: none; white-space: nowrap; background: rgba(255,255,255,0.8); z-index: 6; }

.bill-revoke-btn { position: absolute; top: 50%; right: -7px; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 11px; padding: 0; margin: 0; opacity: 0.4; transition: opacity 0.2s; color: #dc2626; line-height: 1; z-index: 10; }

.bill-revoke-btn:hover { opacity: 1; }

.ledger-chain-connector { position: absolute; left: 50%; top: 100%; transform: translate(-50%, -50%); width: 20px; height: 24px; z-index: 5; pointer-events: none; }

.ledger-chain-connector::before { content: ''; position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 2px; height: 6px; background: #91d5ff; }

.ledger-chain-connector::after { content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 2px; height: 6px; background: #91d5ff; }

.ledger-chain-connector .chain-icon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 12px; line-height: 1; }

.ledger-profit-stamp { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-15deg); font-size: 11px; font-weight: bold; border: 1px solid; border-radius: 3px; padding: 1px 6px; opacity: 0.45; z-index: 20; letter-spacing: 1px; white-space: nowrap; pointer-events: none; user-select: none; }

.ledger-profit-stamp.stamp-red { color: #ff4d4f; border-color: #ff4d4f; background: rgba(255, 77, 79, 0.08); }

.ledger-profit-stamp.stamp-blue { color: #1890ff; border-color: #1890ff; background: rgba(24, 144, 255, 0.08); }

.ledger-profit-stamp.stamp-green { color: #52c41a; border-color: #52c41a; background: rgba(82, 196, 26, 0.08); }

.clearance-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 9999998; display: none; align-items: center; justify-content: center; }

.clearance-box { background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); border-radius: 20px; width: 900px; max-width: 95vw; overflow: hidden; position: relative; max-height: 92vh; display: flex; flex-direction: column; }

.clearance-close { position: absolute; top: 14px; right: 18px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; z-index: 10; transition: all 0.2s; }

.clearance-close:hover { background: rgba(255,255,255,0.2); color: #fff; }

.clearance-header { padding: 16px 24px 10px; text-align: center; }

.clearance-title { font-size: 18px; font-weight: 700; background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: 2px; margin-bottom: 2px; }

.clearance-subtitle { font-size: 10px; color: rgba(255, 255, 255, 0.4); letter-spacing: 1px; }

.clearance-body { padding: 0 24px 20px; overflow-y: auto; min-height: 0; }

.clearance-info-card { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; }

.clearance-info-row-inline { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.clearance-info-item { flex: 1; text-align: center; display: flex; flex-direction: column; gap: 4px; }

.clearance-info-divider { width: 1px; height: 36px; background: rgba(255, 255, 255, 0.1); }

.clearance-info-label { color: rgba(255, 255, 255, 0.5); font-size: 13px; }

.clearance-info-value { color: #fff; font-weight: 600; font-size: 14px; }

.clearance-info-value.amount { font-size: 20px; font-weight: 700; background: linear-gradient(135deg, #00d4ff, #7c3aed); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.clearance-info-value.positive { color: #4ade80; }

.clearance-steps { display: flex; justify-content: center; align-items: flex-start; margin-bottom: 16px; position: relative; }

.clearance-steps::before { content: ''; position: absolute; top: 18px; left: 20%; right: 20%; height: 2px; background: rgba(255, 255, 255, 0.1); }

.clearance-step { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; z-index: 1; flex: 1; max-width: 140px; opacity: 0.4; }

.clearance-step.active { opacity: 1; transform: scale(1.05); }

.clearance-step.completed { opacity: 1; }

.clearance-step .step-circle { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.5); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; border: 2px solid rgba(255, 255, 255, 0.2); }

.clearance-step.active .step-circle { background: linear-gradient(135deg, #00d4ff, #7c3aed); color: #fff; border-color: transparent; }

.clearance-step.completed .step-circle { background: linear-gradient(135deg, #4ade80, #22c55e); color: #fff; border-color: transparent; }

.clearance-step .step-text { font-size: 12px; color: rgba(255, 255, 255, 0.5); font-weight: 500; text-align: center; }

.clearance-step.active .step-text { color: #00d4ff; font-weight: 600; }

.clearance-step.completed .step-text { color: #4ade80; }

.clearance-step-content { animation: none; }

.clearance-confirm-section { text-align: center; margin-bottom: 12px; }

.clearance-confirm-icon { font-size: 36px; margin-bottom: 8px; }

.clearance-confirm-title { font-size: 17px; font-weight: 600; color: #fff; margin-bottom: 10px; line-height: 1.6; }

.clearance-confirm-title .highlight { background: linear-gradient(135deg, #00d4ff, #7c3aed); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 700; }

.clearance-confirm-title .amount-highlight { color: #fbbf24; font-weight: 700; font-size: 20px; }

.clearance-position-list { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }

.clearance-position-cards { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.clearance-position-card { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 12px 16px; min-width: 100px; text-align: center; }

.clearance-position-card-name { font-size: 12px; color: rgba(255, 255, 255, 0.7); font-weight: 500; margin-bottom: 8px; white-space: nowrap; }

.clearance-position-card-icon { font-size: 28px; margin-bottom: 8px; }

.clearance-position-card-balance { font-size: 15px; font-weight: 700; }

.clearance-position-card-balance.positive { color: #4ade80; }

.clearance-position-card-balance.negative { color: #f87171; }

.clearance-position-card-me { background: linear-gradient(145deg, rgba(0, 212, 255, 0.15), rgba(124, 58, 237, 0.15)); border: 1px solid rgba(0, 212, 255, 0.5); }

.clearance-btn { padding: 10px 40px; font-size: 14px; font-weight: 600; border: none; border-radius: 10px; cursor: pointer; letter-spacing: 1px; }

.clearance-btn-primary { background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%); color: #fff; }

.clearance-btn-success { background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%); color: #fff; }

.clearance-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.clearance-form-group { max-width: 380px; margin: 0 auto 16px; text-align: left; }

.clearance-form-label { display: block; margin-bottom: 8px; color: rgba(255, 255, 255, 0.6); font-size: 13px; font-weight: 500; }

.clearance-form-label .required { color: #f87171; margin-left: 4px; }

.clearance-form-select, .clearance-form-input { width: 100%; padding: 12px 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 10px; color: #fff; font-size: 14px; outline: none; box-sizing: border-box; }

.clearance-form-select option { background: #1a1a2e; color: #fff; }

.clearance-payment-row { display: flex; gap: 14px; }

.clearance-payment-row .clearance-form-group { flex: 1; }

.clearance-executing { text-align: center; margin-bottom: 20px; }

.clearance-executing-icon { font-size: 48px; margin-bottom: 12px; }

.clearance-executing-title { font-size: 18px; font-weight: 600; background: linear-gradient(135deg, #00d4ff, #7c3aed); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 8px; }

.clearance-executing-hint { color: rgba(255, 255, 255, 0.4); font-size: 13px; }

.transfer-select-room { }

.transfer-tabs { display: flex; gap: 0; margin-bottom: 12px; border-bottom: 2px solid rgba(255,255,255,0.1); }

.transfer-tab { flex: 1; text-align: center; padding: 10px 0; cursor: pointer; color: rgba(255,255,255,0.5); font-size: 14px; font-weight: 500; transition: all 0.2s; border-bottom: 2px solid transparent; margin-bottom: -2px; }

.transfer-tab.active { color: #00d4ff; border-bottom-color: #00d4ff; }

.transfer-tab.active[data-type="kehu"] { color: #1677ff; border-bottom-color: #1677ff; }
.transfer-tab.active[data-type="duijie"] { color: #52c41a; border-bottom-color: #52c41a; }

.transfer-room-list { margin-bottom: 12px; }

.transfer-room-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }

.transfer-room-card { padding: 10px 8px; border-radius: 8px; cursor: pointer; transition: all 0.15s; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.02); text-align: center; }

.transfer-room-card:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); }

.transfer-room-card.selected { background: rgba(0,212,255,0.12); border-color: rgba(0,212,255,0.5); }
/* 「显示总余额不为零的群」时：本机有余额的群高亮（绿色系），与其它群区分 */
.transfer-room-card.has-mine { background: rgba(82,196,26,0.14); border-color: rgba(82,196,26,0.45); }
.transfer-room-card.has-mine:hover { background: rgba(82,196,26,0.22); border-color: rgba(82,196,26,0.6); }
.transfer-room-card.has-mine.selected { background: rgba(0,212,255,0.18); border-color: rgba(0,212,255,0.65); }

.transfer-room-card .card-name { color: rgba(255,255,255,0.9); font-size: 13px; font-weight: 500; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.transfer-room-card .card-balance { font-size: 14px; font-weight: 600; }

.transfer-room-card .card-balance.pos { color: #52c41a; }

.transfer-room-card .card-balance.neg { color: #ff4d4f; }

.transfer-room-card .card-balance.zero { color: rgba(255,255,255,0.3); }

.transfer-room-detail { background: rgba(255,255,255,0.03); border-radius: 8px; padding: 12px; margin-top: 8px; }

.transfer-detail-title { color: rgba(255,255,255,0.6); font-size: 12px; margin-bottom: 8px; }

.transfer-balance-list { display: flex; flex-wrap: wrap; gap: 8px; }

.transfer-balance-item { display: flex; align-items: center; gap: 5px; background: rgba(255,255,255,0.05); padding: 5px 10px; border-radius: 6px; }

.transfer-balance-icon { font-size: 14px; }

.transfer-balance-name { color: rgba(255,255,255,0.8); font-size: 12px; }

.transfer-balance-amount { font-size: 12px; font-weight: 600; }

.transfer-balance-amount.pos { color: #52c41a; }

.transfer-balance-amount.neg { color: #ff4d4f; }

.transfer-balance-item-me { background: rgba(0,212,255,0.15) !important; border: 1px solid rgba(0,212,255,0.4) !important; }

.transfer-empty { text-align: center; color: rgba(255,255,255,0.4); padding: 40px 0; font-size: 13px; }

.top-notify { position: fixed; top: 0; left: 0; right: 0; z-index: 1000000; background: linear-gradient(135deg, #00d4ff, #7c3aed); color: #fff; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 12px rgba(0,0,0,0.3); animation: topNotifySlide 0.3s ease-out; }

.top-notify-text { font-size: 14px; font-weight: 500; }

.top-notify-close { cursor: pointer; opacity: 0.8; font-size: 14px; padding: 2px 6px; }

.top-notify-close:hover { opacity: 1; }

@keyframes topNotifySlide { from { transform: translateY(-100%); } to { transform: translateY(0); } }

.clearance-completed { text-align: center; margin-bottom: 20px; }

.clearance-completed-icon { font-size: 56px; margin-bottom: 12px; }

.clearance-completed-title { font-size: 19px; font-weight: 700; color: #4ade80; margin-bottom: 12px; }

.clearance-completed-info { color: rgba(255, 255, 255, 0.6); font-size: 14px; display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; }

.clearance-completed-info .value { color: #fff; font-weight: 600; }

.clearance-result-item { white-space: nowrap; }

.clearance-result-divider { width: 1px; height: 16px; background: rgba(255, 255, 255, 0.2); }

.clearance-logs { background: #000; border: 1px solid #00ff41; border-radius: 8px; padding: 14px 16px; margin-top: 12px; max-height: 220px; overflow-y: auto; overflow-x: hidden; font-family: 'Courier New', 'Consolas', monospace; font-size: 12px; line-height: 1.9; color: #00ff41; text-shadow: 0 0 5px rgba(0,255,65,0.5), 0 0 10px rgba(0,255,65,0.3); position: relative; scrollbar-width: none; -ms-overflow-style: none; }

.clearance-logs::-webkit-scrollbar { display: none; }

.log-bg-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.15; pointer-events: none; z-index: 0; border-radius: 8px; }

.clearance-logs > div { position: relative; z-index: 1; }

.clearance-logs::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, #00ff41, transparent); animation: logScan 2s linear infinite; opacity: 0.6; }

@keyframes logScan { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.log-sep { color: #00ff41; animation: logSepBlink 1s ease-in-out infinite; margin: 0 3px; text-shadow: 0 0 5px rgba(0,255,65,0.8); }

@keyframes logSepBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.2; } }

.log-amt-pos { color: #00ff88; font-weight: 700; text-shadow: 0 0 8px rgba(0,255,136,0.6); }

.log-amt-neg { color: #ff4444; font-weight: 700; text-shadow: 0 0 8px rgba(255,68,68,0.6); }

.log-cursor { display: inline-block; width: 8px; height: 14px; background: #00ff41; animation: logCursorBlink 0.8s step-end infinite; vertical-align: middle; margin-left: 2px; box-shadow: 0 0 8px rgba(0,255,65,0.8); }

@keyframes logCursorBlink { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }

.clearance-waiting { text-align: center; margin-top: 14px; color: rgba(255, 255, 255, 0.4); font-size: 13px; }

.custom-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9999999; display: flex; align-items: center; justify-content: center; }

.custom-modal-box { background: #fff; border-radius: 16px; min-width: min(360px, calc(100vw - 32px)); max-width: 480px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.15); }

.custom-modal-title { font-size: 16px; font-weight: 600; color: #fff; padding: 12px 24px; text-align: center; border-bottom: 1px solid #0d9488; background: linear-gradient(90deg,#5cdbd3,#13c2c2 50%,#5cdbd3); }

.custom-modal-content { font-size: 14px; color: #4b5563; line-height: 1.8; padding: 20px 24px; white-space: pre-wrap; }

.custom-modal-actions { display: flex; justify-content: center; gap: 12px; padding: 16px 24px 20px; border-top: 1px solid #f0f0f0; background: #fafafa; }

.custom-modal-btn { padding: 10px 28px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; min-width: 100px; }

.custom-modal-btn.confirm { background: linear-gradient(135deg, #13c2c2 0%, #08979c 100%); color: #fff; border: none; }

.custom-modal-btn.cancel { background: #fff; color: #6b7280; border: 1px solid #d1d5db; }

.settings-section { display: flex; flex-direction: column; gap: 18px; }

.settings-row { display: flex; align-items: flex-start; gap: 16px; }

.settings-label { width: 90px; flex-shrink: 0; font-size: 14px; font-weight: 700; color: #111827; padding-top: 8px; }

.settings-input { flex: 1; min-width: 0; width: 100%; padding: 8px 12px; font-size: 14px; border: 1px solid #d1d5db; border-radius: 6px; outline: none; font-family: inherit; background: #fff; box-sizing: border-box; }

.settings-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.1); }

.settings-input[type=number]::-webkit-inner-spin-button,
  .settings-input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.settings-input[type=number] { -moz-appearance: textfield; appearance: textfield; }

.settings-radio-group { display: flex; gap: 20px; flex-wrap: wrap; padding-top: 6px; }

.settings-radio { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #374151; cursor: pointer; }

.settings-btn { padding: 8px 16px; font-size: 14px; border: 1px solid #d1d5db; background: #fff; color: #374151; border-radius: 6px; cursor: pointer; font-family: inherit; }

.settings-btn:hover { background: #f3f4f6; border-color: #9ca3af; }

.settings-btn-sm { padding: 4px 10px; font-size: 12px; }

.col-count-btn-circle { width: 24px; height: 24px; border-radius: 50%; border: 1px solid #d1d5db; background: #fff; color: #374151; font-size: 15px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; line-height: 1; vertical-align: middle; }

.col-count-btn-circle:hover { background: #f3f4f6; border-color: #9ca3af; }

.amount-flash-pos { animation: amountFlashPos 5s ease-out; }

.amount-flash-neg { animation: amountFlashNeg 5s ease-out; }

@keyframes amountFlashPos {
    0% { background-color: #dcfce7; color: #15803d; }
    20% { background-color: #bbf7d0; color: #166534; }
    60% { background-color: #fffbeb; color: inherit; }
    100% { background-color: transparent; color: inherit; }
  }

@keyframes amountFlashNeg {
    0% { background-color: #fee2e2; color: #b91c1c; }
    20% { background-color: #fecaca; color: #991b1b; }
    60% { background-color: #fffbeb; color: inherit; }
    100% { background-color: transparent; color: inherit; }
  }

.settings-btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; }

.settings-row-dual { display: flex; gap: 16px; }

.settings-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }

.settings-col .settings-label { width: auto; }

.settings-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; padding-top: 16px; border-top: 1px solid #e5e7eb; }

.dual-title-row { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.tip-modal-box { background: #fff; border-radius: 12px; width: 420px; max-width: 90vw; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 10px 32px rgba(30,60,120,.16); }

.tip-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: linear-gradient(90deg,#5cdbd3,#13c2c2 50%,#5cdbd3); color: #fff; }

.tip-modal-title { font-size: 17px; font-weight: 700; }

.tip-modal-close { background: none; border: none; color: #fff; font-size: 19px; cursor: pointer; }

.tip-modal-body { padding: 20px; font-size: 14px; color: #374151; line-height: 1.8; white-space: pre-wrap; }

.tip-modal-footer { padding: 12px 20px; border-top: 1px solid #e5e7eb; display: flex; justify-content: flex-end; gap: 10px; }

.tip-modal-ok, .tip-modal-cancel { padding: 8px 24px; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; }

.tip-modal-ok { background: linear-gradient(135deg, #13c2c2 0%, #08979c 100%); color: #fff; border: none; }

.tip-modal-cancel { background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }

.date-picker-box { background: #fff; border-radius: 12px; width: 320px; max-width: calc(100vw - 24px); box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden; }

.dp-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: linear-gradient(90deg,#5cdbd3,#13c2c2 50%,#5cdbd3); border-bottom: 1px solid #0d9488; }

.dp-nav { width: 32px; height: 32px; border: none; background: transparent; font-size: 20px; color: #fff; cursor: pointer; border-radius: 6px; opacity: .85; }

.dp-nav:hover { background: rgba(255,255,255,.2); }

.dp-title { font-size: 16px; font-weight: 700; color: #fff; }

.dp-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); padding: 8px 12px 4px; background: #f9fafb; }

.dp-weekdays span { text-align: center; font-size: 12px; color: #9ca3af; font-weight: 600; padding: 4px 0; }

.dp-days { display: grid; grid-template-columns: repeat(7, 1fr); padding: 4px 12px 12px; gap: 2px; }

.dp-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #374151; cursor: pointer; border-radius: 6px; }

.dp-day:hover { background: #e6fffb; color: #08979c; }

.dp-day.other-month { color: #d1d5db; }

.dp-day.today { border: 1px solid #13c2c2; color: #08979c; font-weight: 600; }

.dp-day.selected { background: #13c2c2; color: #fff; font-weight: 700; }

.dp-footer { display: flex; justify-content: space-between; padding: 12px 16px; border-top: 1px solid #e5e7eb; background: #f9fafb; }

.dp-today, .dp-cancel { padding: 6px 16px; font-size: 13px; border-radius: 6px; cursor: pointer; border: 1px solid #d1d5db; background: #fff; color: #374151; }

.dp-today { border-color: #13c2c2; color: #08979c; }

/* 日期弹窗：不再居中+遮罩，改成悬浮在「日期」输入框旁边的气泡卡片；
   透明全屏层只负责「点外部关闭」，不压暗页面 */
#datePickerModal { background: transparent; }
#datePickerModal.show { display: block; }
#datePickerModal .date-picker-box { position: absolute; left: 0; top: 0; width: 320px; box-shadow: 0 10px 30px rgba(15,42,80,.18), 0 0 0 1px rgba(15,42,80,.06); }

.record-cat-tabs { display: flex; gap: 8px; margin-bottom: 20px; }

.record-cat-btn { flex: 1; min-width: 100px; padding: 10px 12px; border: 1px solid #d1d5db; background: #fff; border-radius: 8px; font-size: 14px; cursor: pointer; color: #374151; font-family: inherit; }

.record-cat-btn.active { background: #2563eb; color: #fff; border-color: #2563eb; }

.record-form { margin-bottom: 20px; }

.record-field { margin-bottom: 16px; }

.record-label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; }

.record-select, .record-input { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; outline: none; background: #fff; font-family: inherit; }

.record-select:focus, .record-input:focus { border-color: #2563eb; box-shadow: none; }

.record-row { display: flex; gap: 8px; margin-bottom: 16px; }  /* 行内两列间距 = 顶部三个切换按钮的间距(8px) */

.record-row .record-field { flex: 1; min-width: 0; margin-bottom: 0; }

.record-label.required { color: #dc2626; }

.record-sub-tabs { display: flex; gap: 8px; }

.record-sub-btn { flex: 1; padding: 8px 12px; border: 1px solid #d1d5db; background: #fff; border-radius: 6px; font-size: 13px; cursor: pointer; color: #374151; font-family: inherit; }

.record-sub-btn.active { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }

.record-sub-btn.active[data-biz-type="kehu"] { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.record-sub-btn.active[data-biz-type="duijie"] { background: #f6ffed; color: #389e0d; border-color: #b7eb8f; }

.record-footer { display: flex; justify-content: flex-end; gap: 10px; padding-top: 16px; border-top: 1px solid #e5e7eb; }

.record-cancel-btn, .record-confirm-btn { padding: 10px 24px; border-radius: 8px; font-size: 14px; cursor: pointer; font-family: inherit; }

.record-cancel-btn { border: 1px solid #d1d5db; background: #fff; color: #374151; }

.record-confirm-btn { border: none; background: #2563eb; color: #fff; font-weight: 600; }

.toast.show { opacity: 1; }

.image-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 10000000; justify-content: center; align-items: center; cursor: zoom-out; }

.image-modal.show { display: flex; }

.image-modal img { max-width: 90%; max-height: 90%; border-radius: 8px; }

.modal-delete-btn { position: absolute; top: 20px; right: 20px; width: 44px; height: 44px; border-radius: 50%; background: rgba(239,68,68,.9); color: #fff; border: none; font-size: 20px; cursor: pointer; }

.title-fancy {
    font-size: 32px; font-weight: 800; letter-spacing: 4px;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 30%, #0891b2 60%, #0d9488 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin: 0;
  }

.header-select { width: 53px; font-size: 16px; padding: 2px 4px; text-align: center; border: none; background: transparent; outline: none; font-family: inherit; color: #111827; cursor: pointer; }

#errorAnalysisModal .modal-box { width:auto; max-width:98%; min-width:0; }

#errorAnalysisModal table.ledger-table { width:535px; min-width:535px; border-collapse:collapse; table-layout:fixed; margin:0; }

#errorAnalysisModal table.ledger-table th,
  #errorAnalysisModal table.ledger-table td {
    padding:3px 8px; font-size:12px; line-height:18px;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    height:30px; box-sizing:border-box; text-align:center;
  }

#errorAnalysisModal table.ledger-table th:nth-child(1),
  #errorAnalysisModal table.ledger-table td:nth-child(1) { width:50px; }

#errorAnalysisModal table.ledger-table th:nth-child(2),
  #errorAnalysisModal table.ledger-table td:nth-child(2) { width:75px; }

#errorAnalysisModal table.ledger-table th:nth-child(3),
  #errorAnalysisModal table.ledger-table td:nth-child(3) { width:80px; }

#errorAnalysisModal table.ledger-table th:nth-child(4),
  #errorAnalysisModal table.ledger-table td:nth-child(4) { width:140px; }

#errorAnalysisModal table.ledger-table th:nth-child(5),
  #errorAnalysisModal table.ledger-table td:nth-child(5) { width:100px; }

#errorAnalysisModal table.ledger-table th:nth-child(6),
  #errorAnalysisModal table.ledger-table td:nth-child(6) { width:90px; text-align:right; }

#errorAnalysisModal table.ledger-table th { font-weight:600; background:#e8f0fe !important; }

#errorAnalysisModal .ea-row { cursor:pointer; }

#errorAnalysisModal .ea-row-pos td { background:transparent; }

#errorAnalysisModal .ea-row-neg td { background:transparent; }

#errorAnalysisModal .ea-row.ea-selected td { background:#fff3cd !important; }

#errorAnalysisModal .ea-row:not(.ea-selected):hover td { background:#eef6ff !important; }

#errorAnalysisModal .ea-row.ea-locked { cursor:default; }

#errorAnalysisModal .ea-row.ea-locked td { color:#888; }

#errorAnalysisModal tbody tr.ea-sug-active td { background:#ede9fe !important; }

#errorAnalysisModal .ea-sug-badge { margin-left:4px; font-size:10px; opacity:.8; }

#errorAnalysisModal .ea-row-empty td { background:transparent; color:#e5e5e5; }

#errorAnalysisModal #eaLinkedArea { display: contents; }

#errorAnalysisModal .ea-linked-header {
    display:flex; justify-content:space-between; align-items:center;
    padding:0 10px; background:#e8f0fe !important;
    border-left:1px solid #9ca3af; border-right:1px solid #9ca3af; border-bottom:1px solid #9ca3af;
    border-radius:0; font-size:12px; cursor:pointer; user-select:none;
    height:30px; box-sizing:border-box; position:sticky; z-index:8;
  }

#errorAnalysisModal .ea-linked-header:first-of-type {
    border-top:1px solid #9ca3af;
  }

#errorAnalysisModal .ea-linked-header.ea-header-expanded {
    border-radius:0; border-bottom:none;
  }

#errorAnalysisModal .ea-linked-header > span:first-child { width:140px; text-align:left; }

#errorAnalysisModal .ea-linked-header > span:last-child { flex:1; text-align:right; }

#errorAnalysisModal .ea-linked-groups { border-left:1px solid #9ca3af; border-right:1px solid #9ca3af; border-bottom:1px solid #9ca3af; border-top:none; border-radius:0; background:#f0f7ff; display:block; overflow:hidden; }

/* 折叠态：隐藏明细，但表头保留 */
#errorAnalysisModal .ea-linked-groups.ea-collapsed { display:none; }

#errorAnalysisModal #eaUnlinkedArea { display:flex; align-items:stretch; border-left:1px solid #9ca3af; border-right:1px solid #9ca3af; border-bottom:none; border-top:none; border-radius:0; background:transparent; }
#errorAnalysisModal #eaUnlinkedArea > table { flex:1 1 50%; width:50%; border-collapse:collapse; table-layout:fixed; }
#errorAnalysisModal #eaUnlinkedArea > table:first-child { border-right:1px solid #d1d5db; }
#errorAnalysisModal #eaUnlinkedArea th { position:sticky; z-index:6; background:#e8f0fe !important; border-bottom:1px solid #d1d5db; height:30px; padding:0 8px; box-sizing:border-box; line-height:30px; white-space:nowrap; }
#errorAnalysisModal #eaUnlinkedArea td { height:30px; padding:0 8px; box-sizing:border-box; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:30px; }
#errorAnalysisModal #eaUnlinkedArea tbody tr.ea-seq-odd td { background:#f8f9fa; }
#errorAnalysisModal #eaUnlinkedArea tbody tr.ea-seq-even td { background:transparent; }
#errorAnalysisModal #eaUnlinkedArea tbody tr:last-child td { border-bottom:none; }

#errorAnalysisModal .ea-group-flat { padding:0; }

#errorAnalysisModal .ea-group-divider { border-bottom:1px solid #9ca3af; }

#errorAnalysisModal .ea-group-info {
    display:flex; justify-content:center; align-items:center;
    padding:3px 10px; font-size:12px; font-weight:600; background:#fff;
    border-bottom:1px solid #9ca3af; height:30px; box-sizing:border-box;
  }

#errorAnalysisModal .ea-group-body { display:flex; gap:0; width:fit-content; }

#errorAnalysisModal .ea-group-body .ea-pos-table { border-right:1px solid #9ca3af; }

#errorAnalysisModal .ea-group-body table { flex:none; }

#errorAnalysisModal .ea-group-body table tr { height:30px; }

#errorAnalysisModal .ea-group-body .ea-row td { background:#f0f7ff; border-bottom:1px solid #9ca3af; height:30px; }

#errorAnalysisModal .ea-group-body .ea-row:last-child td { border-bottom:none; }

#errorAnalysisModal .ea-stamp {
    display:inline-block; padding:1px 8px; border-radius:10px;
    font-size:11px; font-weight:600; line-height:16px;
  }

#errorAnalysisModal .ea-stamp-profit { background:#f6ffed; color:#16a34a; border:1px solid #b7eb8f; }

#errorAnalysisModal .ea-stamp-loss   { background:#fff1f0; color:#dc2626; border:1px solid #ffa39e; }

#errorAnalysisModal .ea-stamp-even   { background:#f0f0f0; color:#666;    border:1px solid #d9d9d9; }

#errorAnalysisModal .ea-stamp-system { background:#f0f0f0; color:#888;    border:1px solid #d9d9d9; }

/* ===== 同名不同：统一版本（2 条）===== */

.toast { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); background: rgba(31,41,55,.9); color: #fff; padding: 10px 28px; border-radius: 8px; font-size: 14px; z-index: 9999999; opacity: 0; transition: opacity .25s; pointer-events: none; }

.ledger-table-group { background: #f0f7ff !important; }

/* 行悬停：黄色高亮（优先级高于斑马纹/关联组底色） */
#pendingModal .ledger-table tbody tr:hover { background: #fff3bf !important; }

/* 预选（勾选）行：更实的黄色，hover 时保持 */
#pendingModal .ledger-table tbody tr.bill-selected,
#pendingModal .ledger-table tbody tr.bill-selected:hover { background: #fde68a !important; }

#pendingModal .ledger-table tbody tr.bill-selected > td { background: #fde68a !important; }

.status-tag { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: 500; }
.status-normal { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.status-yang { background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }
.status-leng { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
.status-block { background: #fff1f0; color: #ff4d4f; border: 1px solid #ffa39e; }
.status-kadao { background: #f9f0ff; color: #722ed1; border: 1px solid #d3adf7; }

/* 交班自检弹窗表格：自适应宽度，不撑满 */
.handover-ledger { width: auto; }
.handover-ledger thead th { border-top: 1px solid #999; border-bottom: 1px solid #999; }
.handover-ledger td { border-bottom: 1px solid #bbb; }
.handover-ledger tbody tr:last-child td { border-bottom: none; }

/* ===== 键盘可见焦点：上面多处统一去掉了 outline，这里为键盘操作补回可见焦点 ===== */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
input[readonly]:focus-visible { outline: 2px solid #1890ff; outline-offset: 1px; }

#chatKehuList:focus-visible,
#chatDuijieList:focus-visible { outline: 2px solid #1890ff; outline-offset: 2px; }

/* ===== 减少动态效果：关闭跑马灯分隔线的无限动画，避免整页持续重绘 ===== */
@media (prefers-reduced-motion: reduce) {
  .csb-coin::before,
  .dhc-cell:nth-child(5)::before,
  .detail-row-card > div:nth-child(5)::before,
  .marquee-divider::before,
  .marquee-divider-left::before,
  .marquee-divider-right::after { animation: none; }
}

/* 余额明细空态/末行：最后一行不再画底线，避免与容器或下一区块的线重合 */
#detailRows > div:last-child,
#internalDetail > div:last-child,
#dkDetail > div:last-child {
  border-bottom: none !important;
}
/* 空态占位行也不画底线 */
#detailRows > .detail-empty {
  border-bottom: none !important;
}

/* 明细为空时：标题行不画底线，避免与下一区块顶线贴合成双线 */
.detail-section.detail-empty .detail-header-card {
  border-bottom: none;
}
#detailRows:empty {
  display: none;
}

/* 首屏加载中：数据未到齐前不渲染表格，避免只看到一条边线 */
html.app-loading #detailSection,
html.app-loading #internalSection,
html.app-loading #dkTableContainer,
html.app-loading #coinSummaryBar {
  display: none !important;
}

/* 记账弹窗：聚焦只高亮边框线，不要任何外圈（前面 input:focus-visible 规则在这里被覆盖） */
/* 聚焦：只改边框颜色，圆角/白底保持与未聚焦一致（全局 input:focus 会把圆角清零，这里显式补回） */
.record-input:focus-visible,
.record-select:focus-visible,
.record-input:focus,
.record-select:focus {
  outline: none !important;
  box-shadow: none !important;
  border-radius: 8px !important;
  background: #fff !important;
  border-color: #2563eb;
}

/* 记账弹窗：尺寸自适应屏幕，内容区滚动、底部按钮始终可见 */
#recordModal .modal-box {
  display: flex;
  flex-direction: column;
  /* 宽度交给内容决定：内容窄就窄、内容宽就宽，只在超出屏幕时才收 */
  width: auto;
  min-width: min(420px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: 92vh;
  box-sizing: border-box;
}
#recordModal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}

/* 下班自检：当班合计行固定在底部，不随明细滚动 */
/* ==================== 下班自检弹窗：样式统一定义（合并重复规则） ====================
   原则：每个选择器只出现一次；只保留最终生效的值。
   修改时改这里，不要在文件其它位置追加覆盖规则。 */

/* 明细滚动容器 */
#handoverContent {
  overflow-anchor: none;   /* 禁止浏览器滚动锚定，避免高度变化时位置跳动 */
}

/* ===== 自绘浮层滚动条（overlay）：不占布局、不撑开弹窗，滚动时半透明出现 ===== */
#handoverContent::-webkit-scrollbar,
.ledger-table-wrap::-webkit-scrollbar { width: 0; height: 0; display: none; }
.osb { position: fixed; width: 6px; opacity: 0; pointer-events: none; z-index: 2147483000; transition: opacity .2s ease; }
.osb-thumb { width: 100%; border-radius: 3px; background: rgba(15, 23, 42, .28); }

/* 表格基础：整数行高、固定布局 */
#handoverContent table.handover-ledger {
  --hh-row: 32px;          /* 统一行高，改这一个值即可 */
  border-collapse: separate;   /* 不用 collapse：半边框会让行高变成 32.5，产生 0.5px 错位 */
  border-spacing: 0;
  table-layout: fixed;
}
/* 表头与明细单元格的共同尺寸 */
#handoverContent table.handover-ledger thead th,
#handoverContent table.handover-ledger tbody td {
  height: var(--hh-row) !important;
  line-height: var(--hh-row) !important;
  padding: 0 6px !important;
  box-sizing: border-box;
  vertical-align: middle !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 表头：吸顶 + 上下各一条 1px 线（伪元素绘制，唯一来源） */
#handoverContent table.handover-ledger thead th {
  /* 表头整行一条渐变：吸顶交给 thead，th 只负责伪元素（上下 1px 线）定位 */
  position: relative;
  top: auto;
  z-index: auto;
  background: transparent !important;
  color: #fff;
  border: 0;
  box-shadow: none;
}
#handoverContent table.handover-ledger thead th::before,
#handoverContent table.handover-ledger thead th::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: #999;
  pointer-events: none;
}
#handoverContent table.handover-ledger thead th::before { top: 0; }
#handoverContent table.handover-ledger thead th::after { bottom: 0; }
/* 合计行：吸底固定 */
#handoverContent .handover-total-row > td {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: #e8f5e9 !important;
  border-top: 1px solid #999;
  box-shadow: none;
  height: var(--hh-row) !important;
  line-height: var(--hh-row) !important;
  padding: 0 8px !important;
}
/* 底部按钮区 */
#handoverModal .pending-footer {
  border-top: 1px solid #999;
  margin-top: -1px;
  position: relative;
  z-index: 4;
  background: #fff;
}
/* 弹窗容器不设高度上限（否则内容区被压小，行数计算失真） */
#handoverModal .pending-box {
  max-height: none !important;
}
/* 明细斑马纹：合并单元格（类别/平台）保持白底 */
#handoverContent table.handover-ledger tbody tr:nth-child(even) > td {
  background: #f5f5f5;
}
/* 预选（勾选）行：黄色高亮，类别/平台列（rowspan）保持白底 */
#handoverContent table.handover-ledger tbody tr.hh-checked:not(.handover-total-row) > td:not([rowspan]),
#handoverContent table.handover-ledger tbody tr.hh-checked:not(.handover-total-row):hover > td:not([rowspan]) {
  background: #fde68a !important;
}

/* 指针停在类别/平台列上时：整行悬停让位，只保留该列自己的高亮（已勾选行仍保持黄色） */
@supports selector(:has(*)) {
  #handoverContent table.handover-ledger tbody tr:not(.handover-total-row):not(.hh-checked):has(td[rowspan]:hover) > td:not([rowspan]) {
    background: #fff !important;
  }
}

/* 类别/平台列（rowspan）：单独悬停高亮 */
#handoverContent table.handover-ledger tbody td[rowspan]:hover {
  background: #fde68a !important;
}

/* 行悬停：黄色高亮（合计行、类别/平台列除外） */
#handoverContent table.handover-ledger tbody tr:not(.handover-total-row):hover > td:not([rowspan]) {
  background: #fff3bf !important;
}

#handoverContent table.handover-ledger tbody td[rowspan] {
  background: #fff !important;
}
/* 边界行隐藏下边框（由 JS 按像素位置动态加类） */
#handoverContent table.handover-ledger tr.hh-no-bottom > td,
#handoverContent table.handover-ledger td.hh-no-bottom {
  border-bottom: none !important;
}
/* 竖排文本（账户数/组内行数 > 5）：平台名、类别名 */
#handoverContent table.handover-ledger td.hh-plat-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  text-align: center;
  vertical-align: middle;
  overflow: visible;
  padding: 0 !important;
}
#handoverContent table.handover-ledger td.hh-plat-vertical > span {
  display: inline-block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}
/* 单元格内的小标签与复选框不改变行高 */
#handoverContent .status-tag {
  display: inline-block;
  line-height: 20px !important;
  vertical-align: middle;
}
#handoverContent table.handover-ledger input[type="checkbox"] {
  vertical-align: middle;
  margin: 0;
}
/* 类别/平台列：名称跟随可见行（sticky），行数再多也不会滚出视野 */
#handoverContent table.handover-ledger td.hh-group {
  overflow: visible !important;
  padding: 0 !important;
  vertical-align: top !important;   /* 名称从单元格顶端开始，由 JS 平移 */
}
#handoverContent table.handover-ledger td.hh-group > .hh-group-inner {
  /* 位置由 JS 计算 translateY：让名称落在「该组可见剩余行」的垂直中间 */
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--hh-row, 32px);
  width: 100%;
  will-change: transform;
}
/* 竖排变体：writing-mode 放在内层，sticky 才生效 */
#handoverContent table.handover-ledger td.hh-plat-vertical > .hh-group-inner {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* 平台列（拉丁+中文混排）：整体旋转 90°（= 逆时针 270°），中文也一起转 */
#handoverContent table.handover-ledger td.hh-plat-vertical.hh-plat-sideways,
#handoverContent table.handover-ledger td.hh-plat-vertical.hh-plat-sideways > .hh-group-inner {
  text-orientation: sideways;
}
#handoverContent table.handover-ledger td.hh-plat-vertical > .hh-group-inner > span {
  overflow: visible !important;
  max-width: none !important;
  display: inline-block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}
/* 类别/平台字体统一：横排也 15px/700（此前是继承 13px/600，与竖排 20px/700 不一致） */
#handoverContent table.handover-ledger td.hh-group:not(.hh-plat-vertical) > .hh-group-inner > span {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
}


/* 日期/班次选择框：点击聚焦不显示任何高亮边框 */
input.date-input:focus, input.date-input:focus-visible { outline: none !important; box-shadow: none !important; border: none !important; background: transparent; }

/* 班次/人员选择框：点击聚焦不显示蓝色边框 */
select.header-select:focus, select.header-select:focus-visible { outline: none !important; box-shadow: none !important; border: none !important; background: transparent; }

/* 主页设置弹窗：右上角X与标题视觉匹配 */
#settingsModal .modal-close { font-size: 26px; font-weight: 700; line-height: 1; }

/* 下拉列表：统一黄色高亮（原生 select 的已选项） */
select option:checked,
select option:hover { background: #ffe58f !important; color: #333; }

/* 汇总条：表达图标 + 文字标签 */
.csb-label-icon { font-size: 18px; font-weight: 700; color: #fff; line-height: 1; }
.csb-label { font-size: 16px; font-weight: 700; color: #fff; white-space: nowrap; }
