/* Admin panel. Tokens and buttons come from assets/site.css. */
body { min-height: 100dvh; }
.nav { flex-wrap: wrap; gap: 12px; }
.brand small { font: 500 11px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--violet-hi); margin-left: 4px; }
main.wrap { padding-bottom: 64px; }
.btn { min-height: 40px; padding: 9px 16px; font-size: 14px; cursor: pointer; }
.btn.sm { min-height: 32px; padding: 5px 11px; font-size: 13px; }
.btn.danger { color: var(--down); }
.err { color: var(--down); font-size: 14px; margin: 8px 0; min-height: 0; }
.err:empty { display: none; }

label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input, select, textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text); font: 400 15px/1.35 var(--font-ui); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--violet-hi); outline-offset: 1px; }
select option { background: #171222; }

.login { max-width: 380px; margin: 9vh auto 0; padding: 30px; border-radius: 22px; }
.login h1 { margin: 0 0 8px; font-size: 26px; }
.login .btn { width: 100%; justify-content: center; margin-top: 18px; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.bar input { max-width: 260px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; }
.tabs button { flex: none; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 500 14px/1 var(--font-ui); cursor: pointer; }
.tabs button[aria-current="page"] { background: var(--violet); border-color: transparent; color: #fff; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 26px; }
.kpi { padding: 18px 20px; border-radius: 18px; }
.kpi b { display: block; font: 600 28px/1.1 var(--font-display); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: 13px; }

.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 24px 0 12px; }
.head:first-child { margin-top: 0; }
.head h2 { margin: 0; font-size: 20px; }
.head .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.back { background: none; border: 0; padding: 0; margin-bottom: 14px; color: var(--violet-hi); font: 500 14px/1 var(--font-ui); cursor: pointer; }

.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: rgba(14, 11, 22, .6); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font: 500 11px/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td { max-width: 280px; overflow-wrap: break-word; }
td:nth-child(2) { min-width: 120px; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
td.acts { white-space: nowrap; text-align: right; }
td.acts .btn + .btn { margin-left: 6px; }
td.acts a.btn { color: var(--text); text-decoration: none; }
tbody tr[data-open] { cursor: pointer; }
tbody tr[data-open]:hover { background: rgba(255, 255, 255, .03); }
td a { color: var(--violet-hi); }
.empty { padding: 26px; text-align: center; color: var(--muted); font-size: 14px; }

.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid var(--line); color: var(--muted); }
.tag.good { color: var(--up); border-color: rgba(94, 227, 139, .35); }
.tag.warn { color: #ffc56e; border-color: rgba(255, 197, 110, .4); }
.tag.bad { color: var(--down); border-color: rgba(255, 125, 142, .4); }

.info { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 22px; padding: 20px 22px; border-radius: 18px; margin-bottom: 8px; }
.info div { min-width: 0; overflow-wrap: anywhere; }
.info span { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 3px; }

dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 26px; border-radius: 20px; border: 1px solid var(--line); background: #151020; color: var(--text); }
dialog::backdrop { background: rgba(5, 3, 10, .72); }
dialog h3 { margin: 0 0 6px; font-size: 20px; }
.dacts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.creditbar { position: sticky; top: 10px; z-index: 5; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; padding: 16px 22px; margin-bottom: 22px; border-radius: 18px; }
.creditbar .btn { margin-left: auto; }
.creditbar span { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 2px; }
.creditbar b { font: 600 24px/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.swap { margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.swap button { background: none; border: 0; padding: 0; color: var(--violet-hi); font: inherit; cursor: pointer; }
.swap button:disabled { color: var(--muted); cursor: default; }
.login p { color: var(--muted); }
#otp { font: 600 24px/1.2 var(--font-mono); letter-spacing: .3em; text-align: center; }

.adminbadge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 999px; border: 1px solid rgba(182, 156, 255, .5); font-size: 13px; color: var(--muted); }
.adminbadge b { color: var(--violet-hi); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; }
@media (max-width: 640px) { .adminbadge span { display: none; } }
