/* =========================================================
   Deay Bypass — history page (ใช้แท็บและกล่องเข้าสู่ระบบร่วมกับ topup.css)
   ========================================================= */
#history [hidden] { display: none !important; }
.hist-panel { padding: 26px 30px 30px; }
.hist-tabs { margin-bottom: 14px; }
.hist-tabs button { padding: 10px 12px; }
.hist-gate-note { font-size: 13px; color: var(--muted); }

/* search */
.hist-search {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line-2); background: #0a0b0e; cursor: text;
  transition: border-color .2s, box-shadow .2s;
}
.hist-search:focus-within { border-color: rgba(129, 140, 248, .7); box-shadow: 0 0 0 4px rgba(99, 102, 241, .16); }
.hist-search svg { width: 17px; height: 17px; flex: none; color: var(--dim); }
.hist-search input { flex: 1; min-width: 0; padding: 11px 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 14.5px; }
.hist-search input::placeholder { color: var(--dim); }
.hist-search input::-webkit-search-cancel-button { filter: invert(1); opacity: .5; }

/* table */
.hist-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); background: #0b0c0f; scrollbar-width: thin; scrollbar-color: #2b2c31 transparent; }
.hist-table { min-width: 560px; font-size: 14.5px; }
.hist-table th {
  padding: 13px 16px; border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
  text-align: left; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.hist-table td { padding: 13px 16px; border-bottom: 1px solid rgba(255, 255, 255, .05); color: var(--text-2); vertical-align: middle; }
.hist-table tbody tr:last-child td { border-bottom: 0; }
.hist-table tbody tr:not(.hist-empty):hover td { background: rgba(255, 255, 255, .025); }
.hist-table .num { text-align: right; }
.hist-table code { font-family: var(--mono); font-size: 13px; color: var(--text); }
.hist-strong { font-weight: 600; color: var(--text) !important; }
.hist-money { font-weight: 600; white-space: nowrap; color: #4ade80 !important; }
.hist-date { white-space: nowrap; color: var(--muted) !important; }
.hist-empty td { padding: 56px 16px; text-align: center; color: var(--muted); }
.hist-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  font-size: 12.5px; font-weight: 600; color: var(--muted); background: rgba(161, 161, 170, .12);
}
.hist-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hist-status.pending { color: #fbbf24; background: rgba(251, 191, 36, .12); }
.hist-status.approved { color: #4ade80; background: rgba(34, 197, 94, .12); }
.hist-status.rejected { color: #f87171; background: rgba(239, 68, 68, .12); }
.hist-note { display: block; margin-top: 4px; font-size: 12.5px; color: var(--dim); }

/* pagination */
.hist-pager { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 14px; }
.hist-pg {
  min-width: 36px; height: 36px; padding: 0 8px;
  display: grid; place-items: center; border-radius: 9px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; color: var(--muted);
  transition: background .2s, color .2s, border-color .2s;
}
.hist-pg svg { width: 16px; height: 16px; }
.hist-pg:hover:not(:disabled) { background: rgba(255, 255, 255, .05); color: var(--text); }
.hist-pg.on { border-color: var(--line-2); background: #1c1d22; color: #fff; }
.hist-pg:disabled { opacity: .35; cursor: not-allowed; }

@media (max-width: 600px) {
  .hist-panel { padding: 18px; }
  .hist-table th, .hist-table td { padding: 11px 12px; }
  .hist-pager { justify-content: center; }
}
