/* ─────────────────────────────────────────────────────────────
   TG Buyer Admin Panel — Dark Theme CSS v4
   ───────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css');

:root {
  --bg:          #0d1117;
  --bg2:         #161b27;
  --bg3:         #1e2535;
  --bg4:         #252d40;
  --border:      #2a3148;
  --border-h:    #3a4565;
  --text:        #e2e8f0;
  --text-muted:  #8892a4;
  --text-dim:    #5a6478;
  --accent:      #4f7fff;
  --accent-h:    #6b96ff;
  --green:       #22c55e;
  --yellow:      #f59e0b;
  --red:         #ef4444;
  --orange:      #f97316;
  --purple:      #a855f7;
  --teal:        #14b8a6;
  --text-ok:     #22c55e;
  --text-danger: #ef4444;
  --sidebar-w:   240px;
  --topbar-h:    60px;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 4px 24px rgba(0,0,0,.5);
  --shadow-sm:   0 2px 8px rgba(0,0,0,.3);
  --content-pad: 1.5rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-h); }

code {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: .82em;
  font-family: 'Consolas', 'Courier New', monospace;
  word-break: break-all;
}

/* ── Login Page ─────────────────────────────────────────────── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, #1a2a4a 0%, var(--bg) 70%);
  padding: 1rem;
}

.login-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow);
}

.login-logo { font-size: 2.8rem; text-align: center; margin-bottom: .5rem; color: var(--accent); }
.login-card h2 { text-align: center; margin-bottom: 1.5rem; font-size: 1.4rem; }

/* ── Admin Layout ────────────────────────────────────────────── */
.admin-page { display: flex; min-height: 100vh; }

/* ── Sidebar Overlay ─────────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 99;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.visible { display: block; }

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}

.sidebar-brand {
  padding: 1.2rem 1.1rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .6rem;
  letter-spacing: .02em;
  flex-shrink: 0;
}
.brand-icon { font-size: 1.2rem; color: var(--accent); }

.sidebar-menu {
  list-style: none;
  flex: 1;
  padding: .6rem 0;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar-menu::-webkit-scrollbar { display: none; }

.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .65rem 1.1rem;
  color: var(--text-muted);
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  margin: 1px .5rem 1px 0;
  transition: background .15s, color .15s, border-color .15s;
  font-size: .9rem;
}
.sidebar-menu li .icon { font-size: 1rem; min-width: 20px; text-align: center; }
.sidebar-menu li.active a { background: rgba(79,127,255,.12); color: var(--text); border-left-color: var(--accent); }
.sidebar-menu li a:hover { background: rgba(255,255,255,.05); color: var(--text); border-left-color: var(--border-h); }

.sidebar-footer { padding: 1rem; border-top: 1px solid var(--border); flex-shrink: 0; }

.btn-logout {
  width: 100%;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: .55rem;
  cursor: pointer;
  font-size: .88rem;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-logout:hover { background: rgba(239,68,68,.1); border-color: var(--red); color: var(--red); }

/* ── Main content ────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* ── Topbar ──────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 var(--content-pad);
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}

.sidebar-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: none;
  padding: .3rem .5rem;
  line-height: 1;
  transition: background .15s, color .15s;
}
.sidebar-toggle:hover { background: var(--bg3); color: var(--text); }

.topbar-title { font-size: 1rem; font-weight: 600; flex: 1; }

.topbar-right { display: flex; align-items: center; gap: .75rem; }

.admin-badge {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .25rem .8rem;
  font-size: .8rem;
  color: var(--text-muted);
}

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
  padding: .8rem var(--content-pad);
  font-size: .88rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.alert i { font-size: 1rem; flex-shrink: 0; }
.alert-success { background: rgba(34,197,94,.12); border-left: 4px solid var(--green); color: #86efac; }
.alert-error   { background: rgba(239,68,68,.12);  border-left: 4px solid var(--red);   color: #fca5a5; }

/* ── Page sections ───────────────────────────────────────────── */
.section-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 1.25rem var(--content-pad) .4rem;
}

/* ── Page header (detail pages) ──────────────────────────────── */
.page-hdr {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem var(--content-pad) 0;
  flex-wrap: wrap;
}

.page-hdr-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: .35rem .75rem;
  font-size: .82rem;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.page-hdr-back:hover { background: var(--bg4); color: var(--text); }

.page-hdr-title {
  font-size: 1.15rem;
  font-weight: 700;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hdr-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

/* ── Content wrap ────────────────────────────────────────────── */
.content-wrap {
  padding: var(--content-pad);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ── Two-column layout ───────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.two-col > .card { margin-bottom: 0; }

.col-6-4 { grid-template-columns: 3fr 2fr; }
.col-4-6 { grid-template-columns: 2fr 3fr; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.card-header h3 { font-size: .95rem; font-weight: 600; }

.card-body { padding: 1.25rem; }

/* ── Key-value rows ──────────────────────────────────────────── */
.kv-list {}

.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: .6rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  gap: 1rem;
}
.kv-row:last-child { border-bottom: none; }

.kv-label {
  color: var(--text-muted);
  font-size: .8rem;
  min-width: 120px;
  flex-shrink: 0;
  padding-top: .05rem;
}

.kv-value {
  text-align: right;
  word-break: break-word;
  font-size: .88rem;
}

.kv-value strong { font-weight: 600; }

/* ── Card action footer ──────────────────────────────────────── */
.card-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

/* ── Stats Grid ──────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 1rem;
  padding: 0;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-left: 4px solid transparent;
  transition: transform .15s, box-shadow .15s;
  cursor: default;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.stat-blue   { border-left-color: var(--accent);  background: linear-gradient(135deg, rgba(79,127,255,.06) 0%, var(--bg2) 60%); }
.stat-yellow { border-left-color: var(--yellow);  background: linear-gradient(135deg, rgba(245,158,11,.06) 0%, var(--bg2) 60%); }
.stat-green  { border-left-color: var(--green);   background: linear-gradient(135deg, rgba(34,197,94,.06) 0%, var(--bg2) 60%); }
.stat-red    { border-left-color: var(--red);     background: linear-gradient(135deg, rgba(239,68,68,.06) 0%, var(--bg2) 60%); }
.stat-purple { border-left-color: var(--purple);  background: linear-gradient(135deg, rgba(168,85,247,.06) 0%, var(--bg2) 60%); }
.stat-orange { border-left-color: var(--orange);  background: linear-gradient(135deg, rgba(249,115,22,.06) 0%, var(--bg2) 60%); }
.stat-teal   { border-left-color: var(--teal);    background: linear-gradient(135deg, rgba(20,184,166,.06) 0%, var(--bg2) 60%); }

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.stat-blue   .stat-icon { background: rgba(79,127,255,.18);  color: var(--accent); }
.stat-yellow .stat-icon { background: rgba(245,158,11,.18);  color: var(--yellow); }
.stat-green  .stat-icon { background: rgba(34,197,94,.18);   color: var(--green); }
.stat-red    .stat-icon { background: rgba(239,68,68,.18);   color: var(--red); }
.stat-purple .stat-icon { background: rgba(168,85,247,.18);  color: var(--purple); }
.stat-orange .stat-icon { background: rgba(249,115,22,.18);  color: var(--orange); }
.stat-teal   .stat-icon { background: rgba(20,184,166,.18);  color: var(--teal); }
.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-top: .2rem; }

/* ── Progress bar ─────────────────────────────────────────────── */
.progress-bar {
  display: inline-block;
  width: 60px;
  height: 6px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
  vertical-align: middle;
  margin-right: .35rem;
}
.progress-fill { height: 100%; background: var(--green); border-radius: 3px; transition: width .4s; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: .73rem;
  color: var(--text-muted);
}
.badge-info    { background: rgba(79,127,255,.2);  border-color: rgba(79,127,255,.4);  color: #93c5fd; }
.badge-green,
.badge-success { background: rgba(34,197,94,.2);   border-color: rgba(34,197,94,.4);   color: #86efac; }
.badge-warn    { background: rgba(245,158,11,.2);  border-color: rgba(245,158,11,.4);  color: #fcd34d; }
.badge-red,
.badge-error   { background: rgba(239,68,68,.2);   border-color: rgba(239,68,68,.4);   color: #fca5a5; }

/* ── Status badges ───────────────────────────────────────────── */
.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.status-ok        { background: rgba(34,197,94,.15);   color: var(--green); }
.status-wait      { background: rgba(245,158,11,.15);  color: var(--yellow); }
.status-checking  { background: rgba(79,127,255,.15);  color: var(--accent); }
.status-rejected  { background: rgba(239,68,68,.15);   color: var(--red); }
.status-frozen    { background: rgba(148,163,184,.15); color: #94a3b8; }
.status-del       { background: rgba(239,68,68,.08);   color: #9ca3af; }
.status-pending   { background: rgba(245,158,11,.15);  color: var(--yellow); }
.status-approved  { background: rgba(34,197,94,.15);   color: var(--green); }
.status-sent      { background: rgba(20,184,166,.15);  color: var(--teal); }
.status-active    { background: rgba(34,197,94,.15);   color: var(--green); }
.status-paused    { background: rgba(148,163,184,.15); color: #94a3b8; }
.status-banned    { background: rgba(239,68,68,.15);   color: var(--red); }

.method-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 700;
  background: rgba(79,127,255,.15);
  color: var(--accent);
}

/* ── Tables ──────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table { width: 100%; border-collapse: collapse; }

.table th {
  background: var(--bg3);
  padding: .65rem 1rem;
  text-align: left;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: .7rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255,255,255,.03); }
.table-sm td, .table-sm th { padding: .45rem .85rem; }
.row-banned td { opacity: .45; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  cursor: pointer;
  font-size: .84rem;
  transition: background .15s, border-color .15s, transform .1s;
  white-space: nowrap;
  line-height: 1.4;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn:hover  { background: var(--bg4); border-color: var(--border-h); color: var(--text); }
.btn-primary       { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); border-color: var(--accent-h); color: #fff; }
.btn-success       { background: rgba(34,197,94,.15);  border-color: rgba(34,197,94,.35);  color: var(--green); }
.btn-success:hover { background: rgba(34,197,94,.28); }
.btn-danger        { background: rgba(239,68,68,.15);  border-color: rgba(239,68,68,.35);  color: var(--red); }
.btn-danger:hover  { background: rgba(239,68,68,.28); }
.btn-info          { background: rgba(79,127,255,.15); border-color: rgba(79,127,255,.35); color: var(--accent); }
.btn-info:hover    { background: rgba(79,127,255,.28); color: var(--accent); }
.btn-sm            { padding: .25rem .6rem; font-size: .77rem; border-radius: 6px; }
.btn-lg            { padding: .65rem 1.4rem; font-size: .95rem; }
.btn-block         { width: 100%; justify-content: center; }

.action-cell { display: flex; gap: .35rem; flex-wrap: wrap; }
.btn-group   { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group:last-child { margin-bottom: 0; }

.form-group label {
  display: block;
  margin-bottom: .35rem;
  font-size: .82rem;
  color: var(--text-muted);
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
select,
textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .55rem .85rem;
  color: var(--text);
  font-size: .88rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,127,255,.12);
}
textarea { resize: vertical; font-family: inherit; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  padding: 1rem 1.25rem;
  align-items: center;
}
.filter-bar input,
.filter-bar select {
  width: auto;
  min-width: 140px;
  flex: 1;
  max-width: 260px;
}

.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: flex-end;
}
.form-inline input,
.form-inline select {
  width: auto;
  min-width: 130px;
}

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: .4rem;
  padding: .85rem 1rem;
  justify-content: center;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 .5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text-muted);
  font-size: .82rem;
  transition: background .15s;
  text-decoration: none;
}
.page-btn:hover, .page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Session box ─────────────────────────────────────────────── */
.session-box {
  padding: .85rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg3);
}
.session-box label {
  display: block;
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: .35rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.session-preview {
  display: block;
  word-break: break-all;
  font-size: .73rem;
  color: var(--text-muted);
  font-family: 'Consolas', monospace;
}

/* ── Action bar (sticky CTAs on detail pages) ────────────────── */
.action-bar {
  display: flex;
  gap: .75rem;
  padding: 1rem var(--content-pad);
  flex-wrap: wrap;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ── Check row (quality checks) ──────────────────────────────── */
.check-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .6rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  gap: 1rem;
}
.check-row:last-child { border-bottom: none; }
.check-label { color: var(--text-muted); font-size: .82rem; }
.check-pass  { color: var(--green); font-weight: 600; }
.check-fail  { color: var(--red); font-weight: 600; }
.check-warn  { color: var(--yellow); font-weight: 600; }

/* ── Modal ───────────────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal.open { display: flex; }

.modal-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
  animation: modal-in .2s ease;
}
@keyframes modal-in {
  from { transform: scale(.95) translateY(-10px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-box h3 { margin-bottom: 1rem; font-size: 1rem; }
.modal-desc { font-size: .84rem; color: var(--text-muted); margin-bottom: 1rem; line-height: 1.5; }
.modal-actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1.25rem; }

/* ── Pay info block (withdrawals modal) ──────────────────────── */
.pay-info {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  margin-bottom: 1rem;
}
.pay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .3rem 0;
  gap: 1rem;
  font-size: .84rem;
}
.pay-row span:first-child { color: var(--text-muted); min-width: 60px; }

/* ── Wallet cell ─────────────────────────────────────────────── */
.wallet-cell  { display: flex; align-items: center; gap: .4rem; }
.wallet-addr  { font-size: .72rem; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Proxy / Country cards ───────────────────────────────────── */
.country-card { overflow: hidden; }

.proxy-empty {
  padding: .75rem 1.25rem;
  color: var(--text-dim);
  font-size: .82rem;
}

/* ── Downloads ───────────────────────────────────────────────── */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: .75rem;
  padding: 1.25rem;
}

.download-country-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  transition: border-color .15s;
}
.download-country-card:hover { border-color: var(--border-h); }
.download-code { font-size: 1.4rem; font-weight: 700; margin-bottom: .75rem; }
.download-actions { display: flex; flex-direction: column; gap: .35rem; }

.zip-list {
  list-style: none;
  padding: 0 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.zip-list li {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  color: var(--text-muted);
}
.zip-list li::before { content: '→'; color: var(--accent); font-weight: 700; }

/* ── Utility ─────────────────────────────────────────────────── */
.text-ok      { color: var(--green); }
.text-warn    { color: var(--yellow); }
.text-danger  { color: var(--red); }
.text-muted   { color: var(--text-muted); }
.text-dim     { color: var(--text-dim); }
.font-mono    { font-family: 'Consolas', monospace; }
.nowrap       { white-space: nowrap; }
.fw-600       { font-weight: 600; }

.empty-state {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
}

/* ── Responsive — Tablet (≤ 1024px) ─────────────────────────── */
@media (max-width: 1024px) {
  .two-col     { grid-template-columns: 1fr; }
  .col-6-4     { grid-template-columns: 1fr; }
  .col-4-6     { grid-template-columns: 1fr; }
}

/* ── Responsive — Mobile (≤ 768px) ──────────────────────────── */
@media (max-width: 768px) {
  :root {
    --topbar-h:    54px;
    --content-pad: 1rem;
  }

  .sidebar { transform: translateX(-100%); box-shadow: none; }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,.5); }
  .sidebar-toggle { display: flex; }
  .main-content { margin-left: 0; }
  .admin-badge { display: none; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .stat-card { padding: 1rem; gap: .75rem; }
  .stat-icon { width: 40px; height: 40px; font-size: 1rem; }
  .stat-value { font-size: 1.25rem; }

  .page-hdr { padding: 1rem var(--content-pad) 0; }
  .page-hdr-title { font-size: 1rem; }

  .content-wrap { padding: var(--content-pad); gap: 1rem; }

  .table th, .table td { padding: .55rem .75rem; }

  .kv-label { min-width: 100px; }

  .filter-bar { padding: .75rem 1rem; }
  .filter-bar input, .filter-bar select { max-width: none; flex: 1 1 140px; }

  .action-bar { padding: .75rem var(--content-pad); }
  .card-header { padding: .75rem 1rem; }
  .card-body { padding: 1rem; }
  .kv-row { padding: .55rem 1rem; }
  .check-row { padding: .55rem 1rem; }

  .wallet-addr { max-width: 110px; }
  .wallet-cell { flex-wrap: nowrap; min-width: 0; }

  /* action cells wrap buttons vertically on narrow rows */
  .action-cell { flex-direction: column; align-items: flex-start; gap: .3rem; }
  .action-cell .btn { width: 100%; justify-content: center; }

  /* modal pay-row stacks label + value */
  .pay-row { flex-wrap: wrap; gap: .35rem; }
  .pay-row span:first-child { min-width: auto; }

  .download-grid { grid-template-columns: repeat(2, 1fr); }

  /* progress bar narrower on mobile */
  .progress-bar { width: 44px; }
}

/* ── Responsive — Small Mobile (≤ 480px) ────────────────────── */
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .stat-card { padding: .85rem .9rem; gap: .6rem; }
  .stat-icon { width: 36px; height: 36px; font-size: .9rem; }
  .stat-value { font-size: 1.1rem; }
  .stat-label { font-size: .65rem; }

  .btn-group { gap: .35rem; }
  .btn { font-size: .8rem; padding: .4rem .7rem; }
  .btn-sm { padding: .3rem .55rem; font-size: .74rem; }
  .pagination { gap: .25rem; }
  .page-btn { min-width: 28px; height: 28px; font-size: .75rem; }
  .download-grid { grid-template-columns: repeat(2, 1fr); }

  .wallet-addr { max-width: 80px; }

  /* modal fits small screens */
  .modal-box { padding: 1.1rem; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; justify-content: center; }

  /* kv-row stacks on very small screens */
  .kv-row { flex-direction: column; gap: .25rem; }
  .kv-value { text-align: left; }
  .kv-label { min-width: auto; }
}

/* ── Responsive — Extra Small (≤ 360px) ─────────────────────── */
@media (max-width: 360px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .stat-card { padding: .75rem; gap: .5rem; }
  .stat-icon { width: 32px; height: 32px; font-size: .82rem; border-radius: 8px; }
  .stat-value { font-size: 1rem; }
  .content-wrap { padding: .75rem; gap: .75rem; }
}
