/* ===== 矿工工具 · PRL 矿池看板 / 钱包查收益 ===== */
.tools-breadcrumb { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; color: var(--muted-2); font-size: 11.5px; }
.tools-breadcrumb a { color: var(--muted); }
.tools-breadcrumb a:hover { color: var(--green); }
.tools-breadcrumb span { color: var(--line-strong); }
.tool-hero-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 8px; }
.tool-live { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: 11.5px; font-weight: 700; }
.tool-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22a35c; box-shadow: 0 0 0 4px rgba(34,163,92,.12); }
.tool-note { margin-top: 14px; padding: 11px 13px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 11.5px; line-height: 1.75; }
.tool-note strong { color: var(--ink-soft); }
.tool-note.warn { background: var(--gold-soft); border-color: #efdfbd; color: #785b24; }

/* 顶部概览 */
.tool-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.tool-stat { padding: 17px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.tool-stat span { display: block; color: var(--muted-2); font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.tool-stat strong { display: block; margin-top: 6px; font-size: 22px; letter-spacing: -.035em; line-height: 1.2; }
.tool-stat small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 10.5px; }
.tool-stat.accent strong { color: var(--green); }
.tool-stat-grid.compact .tool-stat { padding: 12px 13px; }
.tool-stat-grid.compact .tool-stat strong { font-size: 16px; }

/* 布局与面板 */
.tool-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr); gap: 16px; align-items: start; }
.tool-layout > *, .tool-stack, .tool-panel, .tool-panel-body, .tool-table-wrap { min-width: 0; }
.tool-layout.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tool-stack { display: flex; flex-direction: column; gap: 16px; }
.tool-panel { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.tool-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.tool-panel-head h2, .tool-panel-head h3 { font-size: 13.5px; letter-spacing: -.015em; }
.tool-panel-head p { color: var(--muted-2); font-size: 10.5px; margin-top: 3px; }
.tool-panel-body { padding: 18px; }
.tool-panel-body.flush { padding: 0; }
.tool-panel-tag { color: var(--muted-2); font-size: 10.5px; white-space: nowrap; }

/* 标签 */
.tool-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.tool-tabs button { border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; background: #fff; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.tool-tabs button:hover { border-color: var(--line-strong); color: var(--ink-soft); }
.tool-tabs button.active { background: var(--green-soft); border-color: #bcd9c7; color: var(--green); font-weight: 800; }

/* 连接地址 / 飞行表 */
.stratum-list { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.stratum-card { border: 1px solid var(--line); border-radius: 9px; background: var(--paper); padding: 11px 12px; }
.stratum-label { display: block; margin-bottom: 6px; color: var(--muted-2); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.stratum-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stratum-code { flex: 1 1 260px; min-width: 0; font-family: var(--mono); font-size: 11.5px; color: var(--ink-soft); overflow-wrap: anywhere; }
.copy-btn { border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; padding: 4px 10px; color: var(--green); font-size: 10.5px; font-weight: 800; }
.copy-btn:hover { border-color: var(--green); }
.copy-btn.copied { background: var(--green); border-color: var(--green); color: #fff; }
.flight-block { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); }
.flight-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.flight-head strong { font-size: 11.5px; color: var(--muted); }
.flight-pre { margin-top: 9px; max-height: 190px; overflow: auto; border-radius: 8px; background: #10281b; color: #b8d8c2; padding: 12px 13px; font-family: var(--mono); font-size: 10.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-all; }
.connection-note { margin-top: 13px; color: var(--muted-2); font-size: 11px; line-height: 1.7; }

/* 表格 */
.tool-table-wrap { overflow-x: auto; }
.tool-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.tool-table th { padding: 9px 13px; border-bottom: 1px solid var(--line); background: #f7faf7; color: var(--muted-2); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; text-align: left; white-space: nowrap; }
.tool-table td { padding: 10px 13px; border-bottom: 1px solid var(--line); color: var(--ink-soft); white-space: nowrap; }
.tool-table tr:last-child td { border-bottom: 0; }
.tool-table tbody tr:hover td { background: #fbfdfb; }
.tool-table a { font-weight: 700; }
.tool-table .num-green { color: var(--green); font-weight: 800; }
.tool-table .num-red { color: var(--red); }
.tool-table .num-accent { color: var(--green); font-weight: 700; }
.tool-table .mono { font-family: var(--mono); font-size: 10.5px; }
.tool-table .block-hash { font-family: var(--mono); font-size: 10.5px; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.table-actions { padding: 11px 13px; border-top: 1px solid var(--line); text-align: center; }
.table-toggle { border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 5px 12px; color: var(--muted); font-size: 10.5px; font-weight: 700; }
.table-toggle:hover { color: var(--green); border-color: var(--green); }

/* 空状态 / 骨架 */
.empty-state { padding: 36px 20px; text-align: center; color: var(--muted-2); font-size: 12px; }
.skeleton-line { height: 13px; margin: 12px 0; border-radius: 4px; background: linear-gradient(90deg, #eef3ef, #f8faf8, #eef3ef); background-size: 200% 100%; animation: tool-shimmer 1.4s linear infinite; }
.skeleton-line:nth-child(3n) { width: 78%; }
.skeleton-line:nth-child(2n) { width: 92%; }
@keyframes tool-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* 计算器 */
.calc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.calc-field label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10.5px; font-weight: 700; }
.calc-field input, .calc-field select { width: 100%; height: 38px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; padding: 0 10px; color: var(--ink); font-size: 12px; outline: none; }
.calc-field input:focus, .calc-field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(20,107,58,.1); }
.calc-hashrate-row { display: flex; gap: 7px; }
.calc-hashrate-row input { min-width: 0; }
.calc-hashrate-row select { width: 96px; flex: 0 0 auto; }
.calc-result { margin-top: 15px; }
.calc-primary { padding: 17px; border: 1px solid #cfe4d7; border-radius: 10px; background: linear-gradient(160deg, #f1f8f4, #fbfdfb); text-align: center; }
.calc-primary span { display: block; color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .03em; }
.calc-primary strong { display: block; margin: 4px 0 2px; color: var(--green); font-size: 27px; letter-spacing: -.04em; }
.calc-primary small { color: var(--muted); font-size: 11px; }
.calc-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 9px; }
.calc-summary div { padding: 10px; border: 1px solid var(--line); border-radius: 8px; text-align: center; }
.calc-summary span { display: block; color: var(--muted-2); font-size: 10px; }
.calc-summary strong { display: block; margin-top: 3px; font-size: 13px; color: var(--ink); }
.calc-summary em { display: block; margin-top: 2px; font-style: normal; color: var(--green); font-size: 10.5px; }
.calc-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; color: var(--muted-2); font-size: 10.5px; }
.calc-footer { margin-top: 11px; color: var(--muted-2); font-size: 10px; line-height: 1.7; text-align: center; }
.calc-profit { margin-top: 6px; font-size: 12px; font-weight: 800; }

/* 钱包查询 */
.wallet-search { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 20px; }
.wallet-search label { display: block; margin-bottom: 8px; color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.wallet-search-row { display: flex; gap: 8px; }
.wallet-search-row input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; padding: 0 13px; outline: none; font-size: 12.5px; font-family: var(--mono); }
.wallet-search-row input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(20,107,58,.1); }
.wallet-search-row button { height: 44px; border: 0; border-radius: 9px; background: var(--green); color: #fff; padding: 0 20px; font-size: 12.5px; font-weight: 800; }
.wallet-search-row button:hover { background: var(--green-strong); }
.wallet-search p { margin-top: 9px; color: var(--muted-2); font-size: 10.5px; line-height: 1.7; }
.wallet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.wallet-head h2 { font-size: 13.5px; }
.wallet-address { margin-top: 4px; font-family: var(--mono); font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.wallet-badge { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #cfe4d7; border-radius: 999px; background: var(--green-soft); color: var(--green); padding: 4px 9px; font-size: 10px; font-weight: 800; }
.wallet-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #22a35c; }
.status-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 999px; font-size: 9.5px; font-weight: 800; white-space: nowrap; }
.status-pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pill.online { background: var(--green-soft); color: var(--green); }
.status-pill.offline { background: var(--paper); color: var(--muted-2); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.metric-cell { padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.metric-cell span { display: block; color: var(--muted-2); font-size: 10px; font-weight: 700; }
.metric-cell strong { display: block; margin-top: 4px; font-size: 16px; letter-spacing: -.02em; }
.metric-cell small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 9.5px; }
.metric-cell.green strong { color: var(--green); }
.metric-cell.red strong { color: var(--red); }
.metric-cell.gold strong { color: var(--gold); }
.wallet-tip { margin: 13px 18px; padding: 10px 12px; border: 1px solid #e8e0c8; border-radius: 9px; background: #fdf9ed; color: #78632e; font-size: 10.5px; line-height: 1.7; }
.chart-box { height: 260px; padding: 10px 6px 0; }
.info-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.info-item { padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.info-item .k { display: block; color: var(--muted-2); font-size: 10px; }
.info-item .v { display: block; margin-top: 3px; font-size: 13px; font-weight: 800; color: var(--ink); }
.info-item .v.green { color: var(--green); }
.wallet-side { display: flex; flex-direction: column; gap: 14px; }
.price-main { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.price-main span { color: var(--muted); font-size: 11px; font-weight: 700; }
.price-main strong { font-size: 24px; letter-spacing: -.035em; }
.price-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 6px; color: var(--muted-2); font-size: 10.5px; }
.price-meta .up { color: var(--green); font-weight: 700; }
.price-meta .down { color: var(--red); font-weight: 700; }
.price-link { display: inline-block; margin-top: 13px; font-size: 11px; font-weight: 700; }
.notice-list { display: flex; flex-direction: column; }
.notice-item { padding: 12px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.notice-item:last-child { border-bottom: 0; }
.notice-item:hover { background: #fbfdfb; }
.notice-title { display: flex; align-items: center; gap: 5px; color: var(--ink); font-size: 11.5px; font-weight: 700; }
.notice-pin { font-size: 9px; }
.notice-content { margin-top: 3px; color: var(--muted); font-size: 10.5px; line-height: 1.65; }
.notice-time { margin-top: 5px; color: var(--muted-2); font-size: 9.5px; }
.notice-detail { padding: 16px 18px; }
.notice-detail h4 { margin: 8px 0; font-size: 13px; }
.notice-detail .content { color: var(--muted); font-size: 11.5px; line-height: 1.8; white-space: pre-wrap; }
.notice-detail .time { margin-top: 9px; color: var(--muted-2); font-size: 10px; }
.back-inline { border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 4px 9px; color: var(--muted); font-size: 10px; }

/* 支付阈值 */
.threshold-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .85fr); gap: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 16px 18px; margin-bottom: 16px; }
.threshold-title { font-size: 12.5px; font-weight: 800; }
.threshold-desc { margin-top: 3px; color: var(--muted-2); font-size: 10.5px; line-height: 1.65; }
.threshold-pools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.threshold-pool { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); padding: 4px 8px; font-size: 10px; color: var(--muted); }
.threshold-pool strong { color: var(--green); }
.threshold-controls-wrap { align-self: center; }
.threshold-control-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10.5px; }
.threshold-controls { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.threshold-controls input { width: 88px; height: 34px; border: 1px solid var(--line-strong); border-radius: 7px; padding: 0 8px; font-size: 12px; outline: none; }
.threshold-unit { color: var(--muted); font-size: 10.5px; font-weight: 800; }
.threshold-submit { height: 34px; border: 0; border-radius: 7px; background: var(--green); color: #fff; padding: 0 13px; font-size: 11px; font-weight: 800; }
.threshold-submit:disabled { opacity: .55; cursor: wait; }
.threshold-message { grid-column: 1 / -1; display: none; font-size: 10.5px; }

/* 弹窗 */
.modal { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(7, 22, 13, .56); backdrop-filter: blur(3px); }
.modal.open { display: flex; }
.modal-card { width: min(430px, 100%); max-height: 90vh; overflow-y: auto; border-radius: 14px; background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.28); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 19px 20px 0; }
.modal-head h2 { font-size: 16px; letter-spacing: -.02em; }
.modal-head p { margin-top: 4px; color: var(--muted); font-size: 10.5px; line-height: 1.7; }
.modal-close { border: 0; background: transparent; color: var(--muted-2); font-size: 22px; line-height: 1; padding: 0 3px; }
.modal-body { padding: 17px 20px 20px; }
.modal-field { margin-bottom: 13px; }
.modal-field label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10.5px; font-weight: 700; }
.modal-field input { width: 100%; height: 39px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 11px; font-size: 12px; outline: none; }
.modal-field input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(20,107,58,.1); }
.modal-field input[readonly] { background: var(--paper); color: var(--muted); font-family: var(--mono); font-size: 11px; }
.code-row { display: flex; gap: 7px; }
.code-row input { flex: 1; min-width: 0; }
.code-row button { height: 39px; border: 0; border-radius: 8px; background: var(--green); color: #fff; padding: 0 12px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.code-row button:disabled { opacity: .55; }
.modal-hint { color: var(--muted-2); font-size: 10px; line-height: 1.7; }
.modal-error { display: none; margin-top: 6px; color: var(--red); font-size: 10.5px; line-height: 1.6; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.modal-actions .btn { min-height: 38px; }
.wallet-empty { border: 1px dashed var(--line-strong); border-radius: 12px; background: #fff; padding: 50px 24px; text-align: center; }
.wallet-empty h2 { font-size: 16px; }
.wallet-empty p { max-width: 470px; margin: 8px auto 0; color: var(--muted); font-size: 11.5px; line-height: 1.8; }

@media (max-width: 980px) {
  .tool-layout { grid-template-columns: minmax(0, 1fr); }
  .tool-layout.even { grid-template-columns: minmax(0, 1fr); }
  .threshold-panel { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .tool-stat-grid, .tool-stat-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wallet-search-row { flex-direction: column; }
  .wallet-search-row button { width: 100%; }
  .tool-panel-body { padding: 15px; }
  .chart-box { height: 220px; }
}
@media (max-width: 470px) {
  .tool-stat strong { font-size: 19px; }
  .calc-summary { grid-template-columns: 1fr 1fr; }
}
