/* ==========================================================================
   SONICGIDS EMPIRE — App surfaces
   Client dashboard shell, boost panel, order cards, rate card, admin console.
   ========================================================================== */

/* ==========================================================================
   1. Dashboard shell
   ========================================================================== */
.dash-page { padding-block: clamp(22px, 3vw, 36px) clamp(40px, 5vw, 64px); background: var(--bg-soft); min-height: 70vh; }

.dash-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(16px, 2.2vw, 28px);
  align-items: start;
}

.dash-side {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  display: grid;
  gap: 12px;
}

.dash-profile {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
}
.dash-profile .avatar { width: 38px; height: 38px; font-size: 0.95rem; }
.dash-profile .dp-body { min-width: 0; }
.dash-profile .dp-name { font-weight: 650; font-size: 0.92rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-profile .dp-mail { font-size: 0.76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* side navigation — same hooks as the old tab bar */
.dash-tabs {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
}
.dash-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: 0.91rem;
  font-weight: 500;
  color: var(--text-soft);
  text-align: left;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}
.dash-tab:hover { background: var(--surface-2); color: var(--ink); }
.dash-tab.active { background: var(--ink); color: #fff; font-weight: 600; }
.dash-tab .dt-ico { width: 18px; text-align: center; font-size: 0.95rem; }

.dash-side-note {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
}
.dash-side-note strong { display: block; color: var(--ink); font-size: 0.86rem; margin-bottom: 4px; }

.dash-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.dash-topbar h1 { font-size: clamp(1.3rem, 2.3vw, 1.7rem); }
.dash-topbar .sub { font-size: 0.87rem; color: var(--muted); margin-top: 2px; }

.dash-view { display: grid; gap: 16px; }
.dash-view.hide { display: none; }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  padding: clamp(18px, 2.2vw, 24px);
}
.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.panel-head h2, .panel-head h3 { font-size: 1.08rem; }

.view-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.view-head h2 { font-size: 1.1rem; }
.view-head p { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
.panel-head p { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }

/* summary tiles */
.dash-grid-5 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.dash-stat .delta.warn { color: var(--warn); }
.dash-stat .delta.bad { color: var(--bad); }

@media (max-width: 900px) {
  .dash-layout { grid-template-columns: 1fr; }
  .dash-side { position: static; }
  .dash-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 6px;
    scrollbar-width: none;
  }
  .dash-tabs::-webkit-scrollbar { display: none; }
  .dash-tab { white-space: nowrap; width: auto; }
  .dash-side-note { display: none; }
}

/* ==========================================================================
   2. Status badges, priorities, order cards
   ========================================================================== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border: 1px solid;
}
.status-badge .sb-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pending { color: var(--warn); border-color: #f0dca8; background: var(--warn-soft); }
.status-approved { color: var(--info); border-color: #cfe0f8; background: var(--info-soft); }
.status-ongoing { color: #6b3fa0; border-color: #ddd0f1; background: #f5f0fd; }
.status-completed { color: var(--ok); border-color: #bfe5d2; background: var(--ok-soft); }
.status-rejected { color: var(--bad); border-color: #f3c7c3; background: var(--bad-soft); }

.priority-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-2);
  white-space: nowrap;
}
.priority-urgent { color: var(--bad); border-color: #f3c7c3; background: var(--bad-soft); }
.priority-high { color: #8a6a06; border-color: var(--gold-line); background: var(--gold-soft); }
.priority-normal { color: var(--info); border-color: #cfe0f8; background: var(--info-soft); }
.priority-low { color: var(--muted); }

.priority-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--surface-3); }
.priority-dot.priority-urgent { background: var(--bad); }
.priority-dot.priority-high { background: var(--gold-strong); }
.priority-dot.priority-normal { background: #6ea8f0; }
.priority-dot.priority-low { background: var(--surface-3); }

/* status track */
.status-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.status-track.rejected { grid-template-columns: repeat(2, 1fr); }
.st-step {
  position: relative;
  padding-top: 14px;
  font-size: 0.72rem;
  color: var(--faint);
  text-align: center;
}
.st-step::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: var(--surface-3);
}
.st-step.done { color: var(--text-soft); }
.st-step.done::before { background: #e4c86f; }
.st-step.current { color: var(--ink); font-weight: 600; }
.st-step.current::before { background: var(--gold-strong); }
.status-track.rejected .st-step.current { color: var(--bad); }
.status-track.rejected .st-step.current::before { background: var(--bad); }

/* order cards */
.order-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  padding: clamp(18px, 2.2vw, 22px);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.order-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.order-card + .order-card { margin-top: 14px; }

.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.order-ref { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.order-head h3 { font-size: 1.06rem; margin: 5px 0 6px; }
.order-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--muted); }
.order-flags { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.order-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.of-label { display: block; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; }
.order-facts strong { font-size: 0.88rem; word-break: break-word; color: var(--ink); font-weight: 600; }
.of-link { color: var(--gold); font-weight: 500; }

.order-notes {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--text-soft);
}
.order-notes.admin-note { border-color: var(--gold-line); background: var(--gold-soft); }

.order-actions { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.order-action-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.order-note-row { display: flex; gap: 8px; margin-top: 10px; }
.order-note-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 13px;
  border-radius: var(--r-sm);
  background: #fff;
  border: 1px solid var(--line-strong);
  font-size: 0.86rem;
}
.order-note-row input:focus { outline: none; border-color: var(--gold-strong); box-shadow: 0 0 0 3px rgba(217, 165, 27, 0.18); }

.btn-danger { border-color: #f0c4c0; color: var(--bad); background: #fff; }
.btn-danger:hover { background: var(--bad-soft); color: var(--bad); }

.priority-select { display: grid; gap: 4px; }
.priority-select span { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.priority-select select {
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: #fff;
  border: 1px solid var(--line-strong);
  font-size: 0.85rem;
  cursor: pointer;
  min-width: 150px;
}
.priority-select select:focus { outline: none; border-color: var(--gold-strong); }

/* empty state */
.empty-state {
  text-align: center;
  padding: clamp(30px, 4.5vw, 52px) 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--bg-soft);
}
.empty-state.small { padding: 20px; }
.empty-icon { font-size: 1.9rem; margin-bottom: 10px; }
.empty-state h3 { margin-bottom: 6px; }
.empty-state p { font-size: 0.9rem; max-width: 44ch; margin-inline: auto; }

/* legacy order form bits */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.service-pick {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.service-pick:hover { border-color: var(--line-strong); }
.service-pick.selected { border-color: var(--gold-strong); background: var(--gold-soft); }
.sp-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sp-platform { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.sp-fast { font-size: 0.7rem; color: var(--gold); font-weight: 700; }
.sp-name { font-family: var(--font-head); font-weight: 700; font-size: 0.98rem; color: var(--ink); }
.sp-desc { font-size: 0.83rem; color: var(--muted); line-height: 1.55; }
.sp-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sp-price { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 0.96rem; }
.sp-unit { font-size: 0.74rem; color: var(--faint); text-align: right; }
.sp-time { font-size: 0.74rem; color: var(--muted); border-top: 1px solid var(--line-soft); padding-top: 9px; }

.order-summary-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; padding: 20px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 0.88rem; color: var(--text-soft); border-bottom: 1px solid var(--line-soft); }
.summary-row strong { color: var(--ink); text-align: right; }
.summary-row.total { border-bottom: 0; padding-top: 14px; font-size: 1rem; }
.summary-row.total strong { font-family: var(--font-head); font-size: 1.3rem; color: var(--ink); }
.order-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }

/* ==========================================================================
   3. Boost panel
   ========================================================================== */
.bp { display: grid; gap: 16px; }

.bp-alert { display: none; }
.bp-alert.show {
  display: block;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 0.88rem;
}
.bp-alert-error { background: var(--bad-soft); border-color: #f3c7c3; color: #95241c; }
.bp-alert-success { background: var(--ok-soft); border-color: #bfe5d2; color: #10603a; }
.bp-alert-info { background: var(--info-soft); border-color: #cfe0f8; color: #174c8c; }

.bp-body {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
  align-items: start;
}
.bp-body.hide, .bp-success.hide { display: none; }

.bp-selectors,
.bp-form {
  display: grid;
  gap: 14px;
  padding: clamp(16px, 2vw, 22px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
}

.bp-field { display: grid; gap: 6px; }
.bp-field label { font-size: 0.84rem; font-weight: 600; color: var(--text); }
.bp-req { color: var(--bad); }
.bp-opt { color: var(--faint); font-weight: 500; }
.bp-hint { font-size: 0.78rem; color: var(--muted); line-height: 1.5; }

.bp-field input,
.bp-field select,
.bp-field textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  font-size: 0.92rem;
}
.bp-field input:focus,
.bp-field select:focus,
.bp-field textarea:focus {
  outline: none;
  border-color: var(--gold-strong);
  box-shadow: 0 0 0 3px rgba(217, 165, 27, 0.18);
}
.bp-field textarea { resize: vertical; min-height: 80px; }

.bp-service-list { padding: 6px; height: auto; min-height: 240px; }
.bp-service-list option {
  padding: 9px 10px;
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  color: var(--text);
}
.bp-service-list option:checked { background: var(--gold-soft); color: var(--ink); font-weight: 600; }
.bp-service-list optgroup {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding-top: 8px;
}

/* selected service card */
.bp-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-soft);
}
.bp-card-head { display: flex; gap: 12px; align-items: flex-start; }
.bp-icon {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 1.05rem;
}
.bp-card-head h3 { font-size: 1.02rem; line-height: 1.3; }
.bp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.bp-tag {
  padding: 3px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.72rem;
  color: var(--text-soft);
}
.bp-tag-gold { color: #8a6a06; border-color: var(--gold-line); background: var(--gold-soft); font-weight: 600; }
.bp-desc { font-size: 0.86rem; color: var(--text-soft); line-height: 1.6; }
.bp-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.bp-facts > div { display: grid; gap: 2px; }
.bp-facts span { font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.bp-facts strong { font-size: 0.86rem; color: var(--ink); font-weight: 600; }

.bp-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.bp-quick button {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.8rem;
  color: var(--text-soft);
}
.bp-quick button:hover { border-color: var(--gold-strong); color: var(--ink); }

.bp-amount {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  letter-spacing: -0.02em;
}
.bp-amount-live { color: #ffd77a; }
.bp-foot { font-size: 0.8rem; color: var(--muted); text-align: center; }

/* success */
.bp-success {
  text-align: center;
  padding: clamp(28px, 4vw, 48px) 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
}
.bp-success-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ok-soft);
  border: 1px solid #bfe5d2;
  color: var(--ok);
  font-size: 1.5rem;
}
.bp-success h3 { font-size: 1.35rem; margin-bottom: 8px; }
.bp-success p { color: var(--text-soft); font-size: 0.92rem; max-width: 52ch; margin-inline: auto; }
.bp-success strong { color: var(--ink); }
.bp-success-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }

/* signed-out gate */
.bp-gate {
  text-align: center;
  padding: clamp(28px, 4vw, 48px) 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--bg-soft);
}
.bp-gate-lock { font-size: 1.9rem; margin-bottom: 10px; }
.bp-gate h3 { font-size: 1.25rem; margin-bottom: 8px; }
.bp-gate p { color: var(--muted); font-size: 0.9rem; max-width: 48ch; margin-inline: auto; }
.bp-gate-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }

@media (max-width: 900px) {
  .bp-body { grid-template-columns: 1fr; }
  .order-layout { grid-template-columns: 1fr; }
}

/* ==========================================================================
   4. Rate card (pricing.html) + homepage teaser
   ========================================================================== */
.rate-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 16px; }
.rate-toolbar input, .rate-toolbar select {
  padding: 10px 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 0.9rem;
  min-width: 190px;
}
.rate-toolbar input:focus, .rate-toolbar select:focus { outline: none; border-color: var(--gold-strong); box-shadow: 0 0 0 3px rgba(217, 165, 27, 0.18); }
.rate-toolbar label { display: grid; gap: 5px; font-size: 0.78rem; font-weight: 600; color: var(--text-soft); }

.rate-table-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; overflow: hidden; }
.rate-table-scroll { overflow-x: auto; }
table.rate-table { width: 100%; border-collapse: collapse; min-width: 760px; }
table.rate-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.rate-table td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); font-size: 0.88rem; color: var(--text-soft); vertical-align: top; }
table.rate-table tbody tr:hover { background: var(--bg-soft); }
table.rate-table tr:last-child td { border-bottom: 0; }
.rt-id { color: var(--faint); font-weight: 600; white-space: nowrap; }
.rt-name { color: var(--ink); font-weight: 600; display: block; }
.rt-sub { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 3px; max-width: 46ch; line-height: 1.5; }
.rt-rate { font-family: var(--font-head); font-weight: 700; color: var(--ink); white-space: nowrap; }
.rt-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rt-chip {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 0.72rem;
  color: var(--text-soft);
  white-space: nowrap;
}
.rt-chip-gold { color: #8a6a06; border-color: var(--gold-line); background: var(--gold-soft); }
.rt-chip-paused { color: var(--bad); border-color: #f3c7c3; background: var(--bad-soft); }
.rt-buy { display: flex; justify-content: flex-end; }
.rate-count { font-size: 0.82rem; color: var(--muted); margin-bottom: 10px; }
.rate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }

.rate-teaser-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.rate-teaser-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.rtc-top { display: flex; align-items: center; gap: 10px; }
.rtc-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
}
.rtc-platform { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.rtc-name { font-family: var(--font-head); font-weight: 650; font-size: 1rem; color: var(--ink); }
.rtc-rate { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; color: var(--ink); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; letter-spacing: -0.02em; }
.rtc-rate em { font-family: var(--font-body); font-style: normal; font-size: 0.74rem; font-weight: 500; color: var(--muted); }
.rtc-foot { font-size: 0.76rem; color: var(--faint); border-top: 1px solid var(--line-soft); padding-top: 9px; }

.rt-skel {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #eef0f3 25%, #f6f7f9 50%, #eef0f3 75%);
  background-size: 240% 100%;
  animation: rt-shimmer 1.4s infinite linear;
}
.rt-skel.short { width: 55%; height: 24px; margin-top: 8px; }
@keyframes rt-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* ==========================================================================
   5. Admin console
   ========================================================================== */
.admin-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 80;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.admin-tabs::-webkit-scrollbar { height: 4px; }
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-soft);
  white-space: nowrap;
}
.admin-tab:hover { border-color: var(--line-strong); color: var(--ink); }
.admin-tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-soft);
}
.admin-tab.active .tab-count { background: rgba(255, 255, 255, 0.18); color: #fff; }

.queue-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.89rem;
  color: var(--text-soft);
}
.queue-row:last-child { border-bottom: 0; }
.queue-row .qr-main { flex: 1; min-width: 0; }
.queue-row .qr-ref { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

.service-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
}
.service-row + .service-row { margin-top: 10px; }
.service-row:hover { border-color: var(--line-strong); }
.service-row.paused { opacity: 0.6; }
.sr-main { flex: 1; min-width: 0; }
.sr-name { font-family: var(--font-head); font-weight: 650; color: var(--ink); font-size: 0.96rem; display: flex; align-items: center; gap: 10px; }
.sr-meta { font-size: 0.8rem; color: var(--muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 8px; }
.sr-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.lead-row { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
.lead-row + .lead-row { margin-top: 10px; }
.lead-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lead-top strong { color: var(--ink); }
.lead-top .task-when { margin-left: auto; font-size: 0.76rem; color: var(--faint); }
.lead-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.lead-msg { margin-top: 10px; font-size: 0.89rem; color: var(--text-soft); }
.lead-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.wallet-review { border-color: var(--gold-line); background: var(--gold-soft); }
.wallet-proof-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.wallet-proof-display {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
}
.wallet-proof-display img { display: block; max-width: 100%; max-height: 560px; margin-inline: auto; object-fit: contain; }
.wallet-proof-display a { display: block; }

.subs-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.subs-head strong { color: var(--ink); font-family: var(--font-head); font-size: 1.05rem; }
.subs-head .btn { margin-left: auto; }

.admin-gate-card {
  max-width: 520px;
  margin: clamp(30px, 6vw, 64px) auto;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.admin-gate-card .lock {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  font-size: 1.4rem;
}
.admin-gate-card .field { text-align: left; }

.admin-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-soft);
  text-align: left;
}
.admin-identity .ai-body { display: grid; gap: 1px; min-width: 0; }
.admin-identity .ai-label { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.admin-identity strong { color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.admin-identity .ai-avatar {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  font-weight: 700;
  color: #8a6a06;
}

.gate-steps { display: grid; gap: 10px; text-align: left; margin: 16px 0; counter-reset: gate; }
.gate-steps li {
  position: relative;
  padding-left: 32px;
  font-size: 0.9rem;
  color: var(--text-soft);
}
.gate-steps li::before {
  counter-increment: gate;
  content: counter(gate);
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.link-btn { font-weight: 600; color: var(--gold); text-decoration: underline; }
.link-btn:hover { color: var(--ink); }

@media (max-width: 620px) {
  .admin-bar { position: static; }
  .order-flags { align-items: flex-start; flex-direction: row; }
}
