*,
*::before,
*::after{
  box-sizing:border-box;
}

:root{
  --bg:#101318;
  --panel:#1b2028;
  --text:#e8e9ed;
  --muted:#a0a6b2;
  --accent:#d6a95a;
  --accent-2:#f0c77a;
  --border:#2b313a;
  --shadow:0 12px 30px rgba(0,0,0,.35);
  --input-bg:#111827;
  --input-border:#374151;
}

html[data-theme="dark"]{
  --bg:#101318;
  --panel:#1b2028;
  --text:#e8e9ed;
  --muted:#a0a6b2;
  --accent:#d6a95a;
  --accent-2:#f0c77a;
  --border:#2b313a;
  --shadow:0 12px 30px rgba(0,0,0,.35);
  --input-bg:#111827;
  --input-border:#374151;
}

html[data-theme="light"]{
  --bg:#f6f7fb;
  --panel:#ffffff;
  --text:#0b1220;
  --muted:#475569;
  --accent:#f59e0b;
  --accent-2:#f97316;
  --border:#e2e8f0;
  --shadow:0 10px 30px rgba(15,23,42,.08);
  --input-bg:#ffffff;
  --input-border:#cbd5e1;
}

body.dark{
  --bg:#101318;
  --panel:#1b2028;
  --text:#e8e9ed;
  --muted:#a0a6b2;
  --accent:#d6a95a;
  --accent-2:#f0c77a;
  --border:#2b313a;
  --shadow:0 12px 30px rgba(0,0,0,.35);
  --input-bg:#111827;
  --input-border:#374151;
}

body.light{
  --bg:#f6f7fb;
  --panel:#ffffff;
  --text:#0b1220;
  --muted:#475569;
  --accent:#f59e0b;
  --accent-2:#f97316;
  --border:#e2e8f0;
  --shadow:0 10px 30px rgba(15,23,42,.08);
  --input-bg:#ffffff;
  --input-border:#cbd5e1;
}

body.table-mobile-ref{
  margin:0;
  padding:0;
  font-family:"Segoe UI", system-ui, sans-serif;
  background:var(--bg);
  color:var(--text);
}

body.table-mobile-ref > .container{
  width:100%;
  max-width:1200px;
  margin:18px auto 0;
  padding:0 16px 18px;
}

body.table-mobile-ref h2{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:18px;
  font-size:22px;
  font-weight:600;
  color:var(--text);
}

body.table-mobile-ref .update-timer{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(240, 199, 122, 0.35);
  background:rgba(240, 199, 122, 0.12);
  font-size:12px;
  font-weight:600;
  color:var(--text);
  letter-spacing:0.02em;
}

body.table-mobile-ref .update-timer .update-label{
  font-size:11px;
  font-weight:700;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:var(--accent-2);
}

body.table-mobile-ref .update-timer .update-value{
  font-variant-numeric:tabular-nums;
  font-family:"SFMono-Regular", "Consolas", "Liberation Mono", monospace;
}

body.table-mobile-ref .page-subtitle{
  font-size:13px;
  color:var(--muted);
  line-height:1.4;
  margin-bottom:14px;
}

body.table-mobile-ref .toolbar{
  display:flex;
  gap:10px;
  margin-bottom:10px;
  flex-wrap:wrap;
  align-items:center;
  position:relative;
  z-index:10;
}

body.table-mobile-ref .toolbar .update-timer{
  margin-left:auto;
  margin-right:12px;
}

body.table-mobile-ref .toolbar .form-control,
body.table-mobile-ref .toolbar .btn{
  border-radius:10px;
  border:1px solid var(--input-border);
  background:var(--input-bg);
  color:var(--text);
}

body.table-mobile-ref .toolbar .btn,
body.table-mobile-ref .toolbar .dropdown-toggle{
  white-space:nowrap;
}

body.table-mobile-ref .toolbar .dropdown-menu{
  background:var(--panel);
  border:1px solid var(--border);
  z-index:1060;
  color:var(--text);
}

body.table-mobile-ref .toolbar .form-control::placeholder{
  color:var(--muted);
}

body.table-mobile-ref .toolbar .btn-outline-primary{
  border-color:var(--input-border);
  color:var(--text);
}

body.table-mobile-ref .toolbar .btn-outline-primary:hover{
  background:var(--panel);
}

body.table-mobile-ref .token-search{
  width:180px;
}

body.table-mobile-ref .view-switch .btn-group{
  display:inline-flex;
  align-items:stretch;
  flex-wrap:nowrap;
  gap:0;
  border:1px solid var(--input-border);
  border-radius:12px;
  overflow:hidden;
  background:var(--input-bg);
}

body.table-mobile-ref .view-switch .btn-group > .btn,
body.table-mobile-ref .view-switch .btn-group > .btn-group > .btn{
  margin:0 !important;
  border-radius:0;
  border-width:0 1px 0 0;
  border-color:var(--input-border);
  box-shadow:none;
}

body.table-mobile-ref .view-switch .btn-group > .btn:last-child{
  border-right-width:0;
}

body.table-mobile-ref .view-switch .btn-group > .btn-group{
  display:inline-flex;
  margin:0;
}

body.table-mobile-ref .view-switch .btn{
  border-radius:0;
  padding:6px 12px;
  font-weight:600;
  font-size:13px;
}

body.table-mobile-ref .view-switch .btn.active{
  pointer-events:none;
}

body.table-mobile-ref .view-switch .btn.btn-primary.active{
  color:#1f2937 !important;
  background:rgba(59,130,246,.16) !important;
  border-color:rgba(59,130,246,.48) !important;
}

body.table-mobile-ref .view-switch .vip-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  height:16px;
  padding:0 5px;
  border-radius:999px;
  font-size:9px;
  font-weight:700;
  letter-spacing:.05em;
  line-height:1;
  text-transform:uppercase;
  color:#5b3b00;
  background:#ffd76a;
  border:1px solid rgba(0,0,0,.08);
  vertical-align:middle;
}

body.table-mobile-ref .table-wrapper{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  border-radius:8px;
  display:block;
  padding:0 12px 0;
  position:relative;
  min-height:0;
}

body.table-mobile-ref .table-wrapper.is-loading{
  padding-bottom:12px;
  min-height:220px;
}

body.table-mobile-ref .table-loading{
  position:absolute;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px;
  border-radius:12px;
  background:rgba(16, 19, 24, 0.65);
  color:var(--text);
  font-weight:600;
  z-index:5;
}

body.table-mobile-ref .table-loading .loading-text{
  font-size:13px;
}

body.table-mobile-ref .table-loading .spinner{
  width:18px;
  height:18px;
  border-radius:50%;
  border:2px solid rgba(240, 199, 122, 0.35);
  border-top-color:var(--accent-2);
  animation:wuahArbTableSpin 0.9s linear infinite;
}

body.table-mobile-ref .table-wrapper.is-loading .table-loading{
  display:flex;
}

body.table-mobile-ref .table-wrapper.is-loading table,
body.table-mobile-ref .table-wrapper.is-loading #funding-mobile-list{
  opacity:0.4;
  pointer-events:none;
}

body.table-mobile-ref:not(.dark) .table-loading{
  background:rgba(255, 255, 255, 0.85);
  color:#2b313a;
}

body.table-mobile-ref:not(.dark) .table-loading .spinner{
  border-color:rgba(43, 49, 58, 0.2);
  border-top-color:rgba(181, 132, 31, 0.85);
}

@keyframes wuahArbTableSpin{
  to { transform:rotate(360deg); }
}

body.table-mobile-ref table{
  border-collapse:collapse;
  background:rgba(27, 32, 40, 0.94);
  border-radius:12px;
  overflow:hidden;
  box-shadow:var(--shadow);
}

body.table-mobile-ref.light table,
body.table-mobile-ref[data-theme="light"] table,
html[data-theme="light"] body.table-mobile-ref table{
  background:rgba(255, 255, 255, 0.96);
}

body.table-mobile-ref thead{
  background:rgba(21, 24, 33, 0.96);
}

body.table-mobile-ref thead th{
  position:sticky;
  top:0;
  z-index:4;
  background:rgba(21, 24, 33, 0.96);
  font-weight:700;
  color:#cfd8dc;
  text-transform:uppercase;
  font-size:11px;
  letter-spacing:.4px;
  padding:8px 6px;
  text-align:center;
  white-space:nowrap;
}

body.table-mobile-ref th,
body.table-mobile-ref td{
  padding:6px 6px;
  text-align:center;
  font-size:13px;
  border-bottom:1px solid var(--border);
  white-space:nowrap;
  color:var(--text);
  vertical-align:middle;
}

body.table-mobile-ref table tbody tr:hover{
  background:rgba(255,255,255,.05);
}

body.table-mobile-ref.dark table{
  background:rgba(24, 24, 24, 0.92);
  color:#e0e0e0;
}

body.table-mobile-ref.dark thead{
  background:rgba(32, 32, 32, 0.92);
}

body.table-mobile-ref.dark thead th{
  background:rgba(26, 26, 26, 0.96);
  color:#ddd;
  border-bottom:1px solid #2b2b2b;
}

body.table-mobile-ref.dark th{
  color:#bbb;
}

body.table-mobile-ref.dark td{
  color:#ccc;
  border-bottom:1px solid #2a2a2a;
}

body.table-mobile-ref.dark table tbody tr:nth-child(even){
  background:rgba(19, 19, 19, 0.92);
}

body.table-mobile-ref.dark table tbody tr:nth-child(odd){
  background:rgba(19, 19, 19, 0.92);
}

.table-freshness-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:8px 12px 10px;
  padding:7px 10px;
  border:1px solid rgba(245, 158, 11, 0.24);
  border-radius:8px;
  background:rgba(245, 158, 11, 0.08);
  color:var(--text);
  box-shadow:none;
}

.table-freshness-bar[hidden]{
  display:none !important;
}

.table-freshness-main{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.table-freshness-dot{
  width:9px;
  height:9px;
  border-radius:999px;
  background:#94a3b8;
  box-shadow:0 0 0 4px rgba(148, 163, 184, 0.12);
  flex:0 0 auto;
}

.table-freshness-label{
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
}

.table-freshness-state{
  color:var(--text);
  font-size:12px;
  font-weight:900;
}

.table-freshness-meta{
  min-width:0;
  color:var(--muted);
  font-size:11px;
  font-weight:700;
  text-align:right;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.table-freshness-bar.is-ok .table-freshness-dot{
  background:#22c55e;
  box-shadow:0 0 0 4px rgba(34, 197, 94, 0.14);
}

.table-freshness-bar.is-warn .table-freshness-dot{
  background:#f59e0b;
  box-shadow:0 0 0 4px rgba(245, 158, 11, 0.16);
}

.table-freshness-bar.is-stale .table-freshness-dot,
.table-freshness-bar.is-error .table-freshness-dot{
  background:#ef4444;
  box-shadow:0 0 0 4px rgba(239, 68, 68, 0.16);
}

.table-freshness-bar.is-warn .table-freshness-state{
  color:#fbbf24;
}

.table-freshness-bar.is-stale .table-freshness-state,
.table-freshness-bar.is-error .table-freshness-state{
  color:#f87171;
}

body.table-mobile-ref.light .table-freshness-bar,
body.table-mobile-ref[data-theme="light"] .table-freshness-bar,
html[data-theme="light"] body.table-mobile-ref .table-freshness-bar{
  border-color:rgba(217, 119, 6, 0.24);
  background:rgba(245, 158, 11, 0.08);
  box-shadow:none;
}

@media (max-width:700px){
  .table-freshness-bar{
    align-items:flex-start;
    flex-direction:column;
    gap:5px;
    margin:8px 4px 10px;
  }

  .table-freshness-meta{
    width:100%;
    text-align:left;
    white-space:normal;
  }
}

.volume-col .vol-line.is-low-volume,
#sf-table .volume-col .vol-line.is-low-volume{
  display:block;
  min-width:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:#d6a84a !important;
  opacity:1 !important;
}

.volume-col .vol-line.is-very-low-volume,
#sf-table .volume-col .vol-line.is-very-low-volume{
  border:0;
  background:transparent;
  color:#df6f6f !important;
}

body.table-mobile-ref.light .volume-col .vol-line.is-low-volume,
body.table-mobile-ref[data-theme="light"] .volume-col .vol-line.is-low-volume,
html[data-theme="light"] body.table-mobile-ref .volume-col .vol-line.is-low-volume{
  color:#92400e !important;
}

body.table-mobile-ref.light .volume-col .vol-line.is-very-low-volume,
body.table-mobile-ref[data-theme="light"] .volume-col .vol-line.is-very-low-volume,
html[data-theme="light"] body.table-mobile-ref .volume-col .vol-line.is-very-low-volume{
  color:#991b1b !important;
}

body.table-mobile-ref .token-cell,
#sf-table .token-cell{
  grid-template-columns:32px minmax(0, 1fr) !important;
  column-gap:5px !important;
}

body.table-mobile-ref .group-toggle,
#sf-table .group-toggle{
  min-width:34px !important;
  min-height:24px !important;
  padding:0 4px !important;
  gap:2px !important;
  font-size:11px !important;
  line-height:1;
  border:0 !important;
  border-radius:6px !important;
  background:transparent !important;
  box-shadow:none !important;
  color:#91a0b2 !important;
}

body.table-mobile-ref .group-toggle .caret,
#sf-table .group-toggle .caret{
  border-left-width:4px;
  border-right-width:4px;
  border-top-width:6px;
}

body.table-mobile-ref .group-toggle .group-count,
#sf-table .group-toggle .group-count{
  font-size:12px !important;
  font-weight:800;
  line-height:1;
}

body.table-mobile-ref .group-toggle.empty,
#sf-table .group-toggle.empty{
  min-width:24px !important;
  width:24px;
  padding:0 !important;
  opacity:.38;
}

body.table-mobile-ref .group-toggle.empty .group-count,
#sf-table .group-toggle.empty .group-count{
  display:none;
}

body.table-mobile-ref .group-toggle.empty .caret,
#sf-table .group-toggle.empty .caret{
  opacity:.72;
}

body.table-mobile-ref .group-child-arrow,
#sf-table .group-child-arrow{
  min-width:34px !important;
}

@media (max-width:640px){
  body.table-mobile-ref .token-cell,
  #sf-table .token-cell{
    grid-template-columns:28px minmax(0, 1fr) !important;
    column-gap:4px !important;
  }

  body.table-mobile-ref .group-toggle,
  #sf-table .group-toggle{
    min-width:32px !important;
    min-height:24px !important;
    padding:0 3px !important;
  }

  body.table-mobile-ref .group-toggle.empty,
  #sf-table .group-toggle.empty{
    min-width:22px !important;
    width:22px;
  }

  body.table-mobile-ref .group-child-arrow,
  #sf-table .group-child-arrow{
    min-width:32px !important;
  }
}
