/* Admin dashboard (admin.html). Base colours and scrollbars come from style.css. */
:root { --panel2: #18181d; --line2: #2c2c36; --faint: #6c6c76; --up: #31e3ac; --down: #ff5c5c; --blue: #7aa7ff; }
html:not(.in) body { visibility: hidden; }
body { font-size: 13.5px; height: auto; min-height: 100%; }
a { color: inherit; text-decoration: none; }
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 14px; height: 14px; }
.ic.xs { width: 12px; height: 12px; }
.faint { color: var(--faint); }
i.u { font-style: normal; color: var(--faint); font-size: .85em; margin-left: 4px; }

/* top bar */
.adm-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; height: 56px; padding: 0 24px; background: #0a0a0ce6; backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.adm-logo { display: flex; align-items: center; gap: 9px; font-family: "Geist", "Inter", system-ui, sans-serif; font-weight: 600; font-size: 16px; letter-spacing: -.02em; white-space: nowrap; }
.adm-logo svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.adm-logo span { font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif; font-size: 11px; font-weight: 500; letter-spacing: 0; color: var(--accent); border: 1px solid #c8ff3a55; border-radius: 4px; padding: 1px 6px; }
.adm-nav { display: flex; gap: 2px; }
.adm-nav a { padding: 6px 11px; border-radius: 6px; color: var(--dim); font-weight: 500; white-space: nowrap; transition: color .15s, background .15s; }
.adm-nav a:hover { color: var(--text); }
.adm-nav a.on { color: var(--text); background: var(--panel2); }
.adm-search { position: relative; flex: 1; max-width: 420px; margin-left: auto; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--faint); }
.adm-search:focus-within { border-color: var(--line2); }
.adm-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); }
.adm-results { position: absolute; top: 40px; left: 0; right: 0; max-height: 70vh; overflow: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: 8px; padding: 6px; box-shadow: 0 18px 40px #0009; color: var(--text); }
.rs-sec h4 { margin: 6px 8px 4px; font-size: 11px; font-weight: 500; color: var(--faint); }
.rs-sec a { display: flex; align-items: baseline; gap: 10px; padding: 7px 8px; border-radius: 5px; }
.rs-sec a:hover { background: var(--panel2); }
.rs-sec a b { font-weight: 500; }
.rs-sec a span { color: var(--faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-none { padding: 12px; color: var(--faint); text-align: center; }
.adm-exit { display: flex; align-items: center; gap: 6px; color: var(--dim); white-space: nowrap; font-weight: 500; }
.adm-exit:hover { color: var(--accent); }
button.adm-exit { background: none; border: 0; padding: 0; font: inherit; font-weight: 500; cursor: pointer; }

/* page */
.adm-view { max-width: 1400px; margin: 0 auto; padding: 26px 24px 80px; display: flex; flex-direction: column; gap: 18px; }
.pg-hd { display: flex; align-items: center; gap: 12px; }
.pg-hd h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.pg-hd h1 .tok b { font-weight: 600; }
.count { color: var(--faint); font-size: 14px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--dim); align-self: flex-start; margin-bottom: -8px; }
.back:hover { color: var(--accent); }
.btn-ghost { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; background: none; color: var(--dim); cursor: pointer; font-weight: 500; }
.btn-ghost:hover { color: var(--text); border-color: var(--line2); }
.loading { color: var(--faint); padding: 40px 0; text-align: center; }
.alert { padding: 11px 14px; border: 1px solid #ff5c5c55; background: #ff5c5c14; border-radius: 7px; color: #ffb3b3; }
.empty { padding: 22px; text-align: center; color: var(--faint); }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.tile span { color: var(--dim); font-size: 12px; }
.tile b { font-size: 22px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile em { font-style: normal; color: var(--faint); font-size: 12px; }

/* cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; min-width: 0; display: flex; flex-direction: column; }
.card-hd { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.card-hd h3 { margin: 0; font-size: 13.5px; font-weight: 600; }
.card-hd h3 .faint { font-weight: 400; margin-left: 4px; }
.more { margin-left: auto; color: var(--dim); font-size: 12.5px; }
.more:hover { color: var(--accent); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.grid-run { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; align-items: start; }
@media (max-width: 1100px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-run { grid-template-columns: 1fr; } .adm-nav a { padding: 6px 8px; } }
@media (max-width: 760px) { .grid2, .grid4 { grid-template-columns: 1fr; } .adm-top { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; } .adm-search { order: 9; max-width: none; flex-basis: 100%; } }

/* charts */
.chart { padding: 14px 16px 12px; }
.chart-total { font-size: 18px; font-weight: 600; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.chart-total i { font-style: normal; font-size: 12px; font-weight: 400; color: var(--faint); margin-left: 8px; }
.chart-total i.u { margin-left: 4px; font-size: .7em; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; border-bottom: 1px solid var(--line); }
.bar { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; }
.bar i { display: block; width: 100%; border-radius: 2px 2px 0 0; opacity: .85; }
.bar:hover i { opacity: 1; }
.bar:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; background: #000; border: 1px solid var(--line2); border-radius: 5px; padding: 3px 8px; font-size: 11.5px; color: var(--text); pointer-events: none; z-index: 2; }
.chart-x { display: flex; justify-content: space-between; margin-top: 6px; color: var(--faint); font-size: 11px; }

/* leaderboards and splits */
.board { list-style: none; margin: 0; padding: 6px 0; }
.board li { display: flex; align-items: center; gap: 10px; padding: 6px 16px; }
.board li b { margin-left: auto; font-weight: 500; font-variant-numeric: tabular-nums; }
.rk { width: 18px; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.split { padding: 12px 16px; display: flex; flex-direction: column; gap: 9px; }
.split-row { display: grid; grid-template-columns: 100px 1fr 44px; align-items: center; gap: 10px; }
.split-row span { color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.split-row b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.split-bar { height: 6px; border-radius: 3px; background: #ffffff0a; overflow: hidden; }
.split-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* tables */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-weight: 500; font-size: 12px; color: var(--faint); padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--panel); }
.tbl td { padding: 9px 14px; border-bottom: 1px solid #ffffff08; white-space: nowrap; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .n { text-align: right; }
.tbl tr[data-go] { cursor: pointer; }
.tbl tbody tr:hover td { background: #ffffff05; }
.adm-view > .tbl-wrap, .adm-view > #list > .tbl-wrap, .adm-view > #list > .empty { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.ulink { color: var(--text); font-weight: 500; }
.ulink:hover, .tok a:hover, a.addr:hover, .addr a:hover { color: var(--accent); }
.ucell { display: flex; flex-direction: column; line-height: 1.35; }
.ucell .faint { font-size: 12px; }
.tok { display: inline-flex; align-items: baseline; gap: 7px; }
.tok b { font-weight: 600; }
.tok .faint { font-size: 12px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.addr { display: inline-flex; align-items: center; gap: 5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.addr .ic { color: var(--faint); }
.cp { border: 0; background: none; padding: 0; color: var(--faint); cursor: pointer; display: inline-flex; }
.cp:hover, .addr a:hover .ic, a.addr:hover .ic { color: var(--accent); }
.err { color: var(--err); font-weight: 600; cursor: help; }

/* pills and chips */
.pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 500; background: #ffffff0d; color: var(--dim); }
.pill.k-buy, .pill.s-running { background: #31e3ac1a; color: var(--up); }
.pill.k-sell, .pill.s-failed { background: #ff5c5c1a; color: var(--down); }
.pill.k-launch, .pill.s-funding { background: #c8ff3a1a; color: var(--accent); }
.pill.k-mm_start, .pill.k-mm_stop, .pill.k-mm_sell, .pill.s-ending { background: #7aa7ff1a; color: var(--blue); }
.pill.k-claim, .pill.k-withdraw { background: #ffc85a1a; color: #ffc85a; }
.bar-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.field { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 11px; width: 280px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--faint); }
.field:focus-within { border-color: var(--line2); }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line); background: none; color: var(--dim); cursor: pointer; font-weight: 500; }
.chip:hover { color: var(--text); }
.chip.on { color: var(--text); border-color: var(--line2); background: var(--panel2); }

/* facts (user and run headers) */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.facts > div { background: var(--panel); padding: 12px 16px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.facts span { color: var(--faint); font-size: 12px; }
.facts b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.facts b .faint { font-weight: 400; }
@media (max-width: 900px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.makers { list-style: none; margin: 0; padding: 6px 0; max-height: 640px; overflow: auto; }
.makers li { display: flex; align-items: center; gap: 10px; padding: 5px 16px; }
.grid-run .card .tbl-wrap { max-height: 640px; overflow: auto; }

.adm-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--line2); border-radius: 7px; padding: 8px 16px; z-index: 50; }
