/* R2E app shell — mobile-first */
:root {
  --app-bg: #080a0d;
  --app-surface: #12161b;
  --app-card: #161b21;
  --app-border: rgba(255, 255, 255, 0.1);
  --app-text: #f4f4f5;
  --app-muted: #9ca3af;
  --app-accent: #22c55e;
  --app-accent-dim: #166534;
  --app-teal: #14b8a6;
  --app-danger: #ef4444;
  --app-radius: 16px;
  --app-radius-sm: 12px;
  --app-max: 460px;
  --app-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

html.app,
html.app body {
  margin: 0;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(20, 184, 166, 0.1) 0%, rgba(8, 10, 13, 0) 28%),
    linear-gradient(135deg, #080a0d 0%, #0b1116 44%, #080a0d 100%);
  color: var(--app-text);
  font-family: var(--app-font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}

html.app {
  scrollbar-color: rgba(34, 197, 94, 0.55) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

html.app * {
  scrollbar-color: rgba(34, 197, 94, 0.5) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
}

html.app *::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html.app *::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

html.app *::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.72), rgba(20, 184, 166, 0.62));
  border: 2px solid rgba(20, 20, 24, 0.9);
  border-radius: 999px;
}

html.app *::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.95), rgba(20, 184, 166, 0.82));
}

.app-frame {
  max-width: var(--app-max);
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 0 88px;
  box-sizing: border-box;
  position: relative;
}

.app-main {
  padding: 78px 18px 24px;
}

@keyframes app-rise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes app-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(0, -7px, 0) rotate(0.6deg);
  }
}

@keyframes app-sheen {
  from {
    transform: translateX(-130%) skewX(-18deg);
  }
  to {
    transform: translateX(190%) skewX(-18deg);
  }
}

@keyframes app-soft-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(34, 197, 94, 0);
  }
  50% {
    box-shadow: 0 0 26px rgba(34, 197, 94, 0.16);
  }
}

@keyframes app-orbit-dot {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.48;
  }
  50% {
    transform: translate3d(8px, -10px, 0) scale(1.18);
    opacity: 1;
  }
}

@keyframes app-progress-glow {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(34, 197, 94, 0));
  }
  50% {
    filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.55));
  }
}

/* App artwork */
.app-media {
  position: relative;
  width: 100%;
  border-radius: var(--app-radius);
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--app-border);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.app-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    185deg,
    rgba(11, 11, 13, 0) 0%,
    rgba(11, 11, 13, 0.25) 50%,
    rgba(11, 11, 13, 0.62) 100%
  );
}

.app-media img {
  width: 100%;
  height: min(200px, 38vw);
  object-fit: cover;
  object-position: center 42%;
  display: block;
  filter: saturate(0.88) contrast(1.06) brightness(0.97);
}

/* Home hero artwork */
.app-media:not(.app-media--compact) img {
  height: min(220px, 44vw);
  object-position: center 48%;
}

.app-media--compact img {
  height: min(140px, 32vw);
}

/* Compact artwork framing */
.app-media--machine img {
  object-position: center 38%;
}

.app-media--tight img {
  object-position: center 35%;
}

.app-card .app-card-thumb {
  margin: -12px -12px 14px -12px;
  border-radius: var(--app-radius) var(--app-radius) 0 0;
  overflow: hidden;
  border-bottom: 1px solid var(--app-border);
}

.app-card .app-card-thumb img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.app-card {
  position: relative;
  background: rgba(22, 27, 33, 0.86);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(14px);
}

.app-card h1,
.app-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: 0;
}

.app-card p,
.app-card li {
  color: var(--app-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 10px;
}

.app-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--app-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.app-input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border-radius: var(--app-radius-sm);
  border: 1px solid var(--app-border);
  background: rgba(18, 22, 27, 0.92);
  color: var(--app-text);
  font-size: 1rem;
  margin-bottom: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.app-input:focus {
  border-color: var(--app-accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.app-input::placeholder {
  color: #52525b;
}

.client-auth-form {
  padding: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(34, 197, 94, 0.08), transparent 34%),
    rgba(22, 27, 33, 0.88);
}

.client-auth-form::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.06) 46%, transparent 64%);
  transform: translateX(-115%);
}

.client-field {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  background: rgba(8, 14, 20, 0.48);
  padding: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transform: translateZ(0);
  cursor: text;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.client-field::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), transparent 46%);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.client-field::after {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 999px;
  background: var(--app-accent);
  opacity: 0;
  transform: scaleY(0.35);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.client-field > * {
  position: relative;
  z-index: 1;
}

.client-field > i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  color: #86efac;
  font-size: 1rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.client-field .app-label {
  margin-bottom: 4px;
  transition: color 0.18s ease;
}

.client-field .app-input {
  margin: 0;
  padding: 3px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.client-field .app-input:focus {
  border-color: transparent;
  box-shadow: none;
}

.client-field:focus-within {
  transform: translateY(-2px);
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(10, 20, 27, 0.72);
  box-shadow: 0 14px 34px rgba(34, 197, 94, 0.12);
}

.client-field:focus-within::before,
.client-field.has-value::before {
  opacity: 1;
}

.client-field:focus-within::after,
.client-field.is-complete::after,
.client-field.is-success::after,
.client-field.is-warning::after {
  opacity: 1;
  transform: scaleY(1);
}

.client-field:focus-within > i,
.client-field.has-value > i {
  transform: scale(1.06) rotate(-2deg);
  background: rgba(34, 197, 94, 0.14);
  color: #dcfce7;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.3), 0 8px 18px rgba(34, 197, 94, 0.12);
}

.client-field:focus-within .app-label,
.client-field.has-value .app-label {
  color: #bbf7d0;
}

.client-field.is-complete {
  border-color: rgba(34, 197, 94, 0.26);
}

.client-field.is-success {
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 14px 34px rgba(34, 197, 94, 0.12);
}

.client-field.is-warning {
  border-color: rgba(248, 113, 113, 0.54);
}

.client-field.is-warning::after {
  background: #f87171;
}

.client-field.is-warning > i {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.12);
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.28);
}

.client-pin-meter {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.client-pin-meter span {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  transform: scaleY(0.75);
  transform-origin: center;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.client-pin-meter span.is-filled {
  background: linear-gradient(90deg, #22c55e, #14b8a6);
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.28);
  transform: scaleY(1.15);
}

.client-auth-form .app-btn {
  margin-top: 14px;
}

.app-btn {
  display: block;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  padding: 15px 20px;
  border: none;
  border-radius: var(--app-radius-sm);
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 12px 26px rgba(34, 197, 94, 0.24);
  overflow: hidden;
  transform: translateZ(0);
  transition: transform 0.18s ease, opacity 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.app-btn::before {
  content: "";
  position: absolute;
  inset: -40% auto -40% -45%;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  pointer-events: none;
  transform: translateX(-130%) skewX(-18deg);
}

.app-btn > * {
  position: relative;
}

.app-btn:hover {
  filter: brightness(1.05);
  box-shadow: 0 16px 32px rgba(34, 197, 94, 0.28);
}

.app-btn:active {
  transform: translateY(1px) scale(0.975);
  filter: brightness(0.98);
}

.app-btn.secondary {
  background: rgba(18, 22, 27, 0.74);
  color: var(--app-text);
  border: 1px solid var(--app-border);
  box-shadow: none;
}

.app-btn.secondary:hover {
  border-color: rgba(34, 197, 94, 0.32);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.app-btn.danger {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}

.app-link {
  color: var(--app-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.app-link:hover {
  text-decoration: underline;
}

.app-hero-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0 0 10px;
}

.app-hero-sub {
  color: var(--app-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 22px;
}

.app-points {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--app-accent);
  margin: 4px 0 0;
}

.app-webhook-box {
  background: var(--app-surface);
  border: 1px dashed var(--app-border);
  border-radius: var(--app-radius-sm);
  padding: 12px;
  font-size: 0.75rem;
  word-break: break-all;
  color: #d4d4d8;
  margin-top: 8px;
  user-select: all;
}

.app-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
  border-radius: var(--app-radius-sm);
  border: 1px solid var(--app-border);
}

.app-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.app-table th,
.app-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--app-border);
}

.app-table th {
  background: var(--app-surface);
  color: var(--app-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0;
}

.app-table tr:last-child td {
  border-bottom: none;
}

.app-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.14);
  color: var(--app-accent);
  border: 1px solid rgba(34, 197, 94, 0.28);
  margin-bottom: 12px;
}

.app-error {
  color: var(--app-danger);
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.app-success {
  color: #86efac;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

footer.app-footer {
  margin-top: 32px;
  padding: 20px 18px 100px;
  text-align: center;
  color: #71717a;
  font-size: 0.75rem;
}

footer.app-footer strong {
  color: #a1a1aa;
}

/* Client app */
.client-hero {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(22, 27, 33, 0.78), rgba(13, 17, 23, 0.94));
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.34);
  padding: 16px;
  margin-bottom: 16px;
  overflow: hidden;
  transform: translateZ(0);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.client-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.055) 46%, transparent 62%);
  pointer-events: none;
  transform: translateX(-110%);
}

.client-hero:active {
  transform: scale(0.992);
  border-color: rgba(34, 197, 94, 0.28);
}

.client-hero-simple {
  padding: 20px;
}

.client-hero .app-media {
  width: calc(100% + 32px);
  margin: -16px -16px 18px;
  border: 0;
  border-radius: 20px 20px 0 0;
}

.client-hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 190px;
  margin: -4px 0 12px;
}

.client-hero-art img,
.client-auth-hero img,
.client-flow-card img,
.client-token-compact > img,
.client-tab-panel img,
.client-point-card img,
.client-mini-guide img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

.client-hero-art img {
  max-width: 230px;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.42));
  transform: translateZ(0);
  transition: transform 0.22s ease, filter 0.22s ease;
  position: relative;
  z-index: 2;
}

.client-hero-art:active img {
  transform: scale(0.975) rotate(-0.8deg);
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.36));
}

.client-guide-hero .client-hero-art::before,
.client-guide-hero .client-hero-art::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  z-index: 1;
}

.client-guide-hero .client-hero-art::before {
  width: 178px;
  height: 178px;
  border: 1px solid rgba(34, 197, 94, 0.18);
  box-shadow: inset 0 0 26px rgba(34, 197, 94, 0.08), 0 0 34px rgba(20, 184, 166, 0.12);
}

.client-guide-hero .client-hero-art::after {
  width: 236px;
  height: 236px;
  border: 1px dashed rgba(167, 139, 250, 0.18);
}

.client-orbit-dot {
  position: absolute;
  z-index: 3;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #86efac;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.64);
  pointer-events: none;
}

.client-orbit-dot.dot-a {
  right: 25%;
  top: 18%;
}

.client-orbit-dot.dot-b {
  left: 23%;
  bottom: 28%;
  width: 7px;
  height: 7px;
  background: #a78bfa;
  box-shadow: 0 0 18px rgba(167, 139, 250, 0.62);
}

.client-orbit-dot.dot-c {
  right: 21%;
  bottom: 24%;
  width: 6px;
  height: 6px;
  background: #14b8a6;
}

.client-auth-hero {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.client-auth-hero img {
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  transform: translateZ(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.client-auth-hero:active img {
  transform: scale(0.975) rotate(-0.7deg);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.client-auth-hero .app-hero-sub {
  margin-bottom: 0;
}

.client-actions {
  display: grid;
  gap: 10px;
}

.client-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.client-flow-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  padding: 10px;
  min-width: 0;
  overflow: hidden;
  transform: translateZ(0);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.client-flow-card::after,
.client-status::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 44%);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.client-flow-card:hover,
.client-flow-card:active {
  transform: translateY(-3px);
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.075);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.2);
}

.client-flow-card:hover::after,
.client-flow-card:active::after,
.client-status:hover::after,
.client-status:active::after {
  opacity: 1;
}

.client-flow-card img {
  margin-bottom: 8px;
  transition: transform 0.2s ease;
}

.client-flow-card:hover img,
.client-flow-card:active img {
  transform: translateY(-2px) scale(1.035);
}

.client-flow-card strong,
.client-flow-card span {
  display: block;
}

.client-flow-card strong {
  color: var(--app-text);
  font-size: 0.86rem;
  line-height: 1.2;
}

.client-flow-card span {
  color: var(--app-muted);
  font-size: 0.74rem;
  margin-top: 4px;
}

.client-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.client-status {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  padding: 13px;
  min-height: 78px;
  box-sizing: border-box;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.client-status:hover,
.client-status:active {
  transform: translateY(-2px);
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(255, 255, 255, 0.065);
}

.client-status span,
.client-point-card span,
.client-wallet-box span,
.client-list-row span,
.client-note,
.client-empty {
  color: var(--app-muted);
  font-size: 0.8rem;
}

.client-status strong {
  display: block;
  margin-top: 5px;
  font-size: 0.92rem;
  line-height: 1.25;
}

.client-steps ol {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
}

.client-steps li {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.client-steps li strong {
  color: #86efac;
}

.client-token-head,
.client-account-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.client-token-head h2,
.client-token-head p {
  margin: 0;
}

.client-token-compact {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.client-token-compact:active {
  transform: scale(0.992);
  border-color: rgba(34, 197, 94, 0.26);
}

.client-token-compact .app-btn {
  grid-column: 1 / -1;
}

.client-referral-pill {
  border: 1px solid rgba(34, 197, 94, 0.34);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 6px 10px;
}

.client-point-card {
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: var(--app-radius);
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(20, 184, 166, 0.1)),
    rgba(22, 27, 33, 0.94);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 14px;
  align-items: center;
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.client-point-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.08) 48%, transparent 64%);
  transform: translateX(-115%);
}

.client-point-card:active {
  transform: scale(0.992);
  border-color: rgba(34, 197, 94, 0.42);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
}

.client-point-card strong {
  display: block;
  color: #86efac;
  font-size: 2.45rem;
  line-height: 1;
  margin: 10px 0;
}

.client-point-card img {
  border-radius: 20px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease;
}

.client-point-card:active img {
  transform: scale(0.97) rotate(0.8deg);
}

.client-point-card small {
  color: var(--app-muted);
  font-size: 1rem;
}

.client-point-card p,
.client-wallet-box {
  margin: 0;
}

.client-wallet-box {
  display: grid;
  gap: 6px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: var(--app-surface);
  padding: 12px;
  margin: 12px 0;
}

.client-wallet-box strong {
  color: #a7f3d0;
  font-size: 0.75rem;
  word-break: break-all;
}

.client-wallet-relink {
  margin-bottom: 14px;
}

.client-convert-meta,
.client-policy-list,
.client-mini-guide {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.client-convert-meta span,
.client-policy-list span {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--app-muted);
  font-size: 0.8rem;
  padding: 9px 10px;
}

.client-convert-meta strong,
.client-policy-list strong {
  color: var(--app-text);
}

.client-convert-preview {
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.1);
  color: #d4d4d8;
  padding: 10px 12px;
  margin: -4px 0 12px;
  font-size: 0.9rem;
}

.client-convert-preview strong {
  color: #86efac;
}

.client-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.client-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: rgba(18, 22, 27, 0.9);
  padding: 12px;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.client-list-row:active {
  transform: scale(0.992);
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(255, 255, 255, 0.055);
}

.client-list-row div {
  display: grid;
  gap: 4px;
}

.client-list-row div:last-child {
  justify-items: end;
  text-align: right;
}

.client-status-badge {
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.14);
  color: #fde68a;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 8px;
}

.client-status-badge.completed {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

.client-status-badge.failed {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
}

.client-invite-card {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.08);
}

.client-invite-card p {
  margin: 0;
  color: #e5e5e5;
}

.client-invite-card span {
  color: #22c55e;
  font-weight: 800;
}

.client-mini-guide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.client-mini-guide div {
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: rgba(22, 27, 33, 0.86);
  padding: 12px 8px;
  text-align: center;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.client-mini-guide div:active {
  transform: translateY(-2px) scale(0.985);
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(34, 197, 94, 0.07);
}

.client-mini-guide img {
  max-width: 56px;
  margin: 0 auto 8px;
}

.client-mini-guide strong {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  margin-bottom: 6px;
}

.client-mini-guide span {
  display: block;
  color: var(--app-muted);
  font-size: 0.76rem;
}

.client-guide-tabs {
  position: relative;
  padding: 14px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.client-guide-tabs::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 10%, rgba(34, 197, 94, 0.14), transparent 30%),
    radial-gradient(circle at 82% 26%, rgba(167, 139, 250, 0.12), transparent 28%);
  opacity: 0.8;
}

.client-guide-tabs > * {
  position: relative;
  z-index: 1;
}

.client-guide-tabs:active {
  transform: scale(0.994);
  border-color: rgba(34, 197, 94, 0.26);
}

.client-guide-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.client-tabbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  padding: 5px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.client-tab {
  position: relative;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--app-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 10px 6px;
  cursor: pointer;
  text-align: center;
  user-select: none;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.client-tab::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: #22c55e;
  opacity: 0;
  transform: translateX(-50%) scaleX(0.35);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.client-tab:active {
  transform: scale(0.96);
}

#guide-network:checked ~ .client-tabbar [for="guide-network"],
#guide-token:checked ~ .client-tabbar [for="guide-token"],
#guide-import:checked ~ .client-tabbar [for="guide-import"] {
  background: rgba(34, 197, 94, 0.18);
  color: #dcfce7;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.3);
  transform: translateY(-1px);
}

#guide-network:checked ~ .client-tabbar [for="guide-network"]::after,
#guide-token:checked ~ .client-tabbar [for="guide-token"]::after,
#guide-import:checked ~ .client-tabbar [for="guide-import"]::after {
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
}

.client-guide-progress {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  margin: -4px 2px 16px;
}

.client-guide-progress span {
  display: block;
  height: 100%;
  width: 33.333%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #14b8a6, #a78bfa);
  transition: width 0.32s cubic-bezier(0.2, 0.75, 0.25, 1);
}

#guide-token:checked ~ .client-guide-progress span {
  width: 66.666%;
}

#guide-import:checked ~ .client-guide-progress span {
  width: 100%;
}

.client-tab-panel {
  display: none;
  min-height: 292px;
}

#guide-network:checked ~ [data-guide-panel="network"],
#guide-token:checked ~ [data-guide-panel="token"],
#guide-import:checked ~ [data-guide-panel="import"] {
  display: grid;
  align-content: start;
  justify-items: center;
  text-align: center;
  gap: 10px;
  animation: app-rise 0.28s ease both;
}

.client-guide-panel-card {
  width: 100%;
  min-height: 270px;
  box-sizing: border-box;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.client-guide-panel-card:active {
  transform: scale(0.99);
  background: rgba(34, 197, 94, 0.055);
  border-color: rgba(34, 197, 94, 0.24);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.client-guide-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  margin-top: 2px;
}

.client-guide-visual::before,
.client-guide-visual::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.client-guide-visual::before {
  inset: 16px;
  border: 1px solid rgba(34, 197, 94, 0.16);
  box-shadow: 0 0 28px rgba(34, 197, 94, 0.08);
}

.client-guide-visual::after {
  inset: 0;
  border: 1px dashed rgba(167, 139, 250, 0.16);
}

.client-tab-panel img {
  max-width: 128px;
  margin: 0;
  position: relative;
  z-index: 1;
  transition: transform 0.22s ease, filter 0.22s ease;
}

.client-guide-panel-card:active img {
  transform: scale(0.96) rotate(0.8deg);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.28));
}

.client-tab-panel h2,
.client-tab-panel p {
  margin: 0;
}

.client-guide-list {
  display: grid;
  gap: 8px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.client-guide-list li {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--app-text);
  font-size: 0.88rem;
  padding: 10px 12px;
  transition: transform 0.16s ease, background 0.16s ease;
}

.client-guide-list li:active {
  transform: scale(0.99);
  background: rgba(34, 197, 94, 0.075);
}

@media (prefers-reduced-motion: no-preference) {
  .app-main > * {
    animation: app-rise 0.46s cubic-bezier(0.2, 0.75, 0.25, 1) both;
  }

  .app-main > *:nth-child(2) {
    animation-delay: 0.05s;
  }

  .app-main > *:nth-child(3) {
    animation-delay: 0.1s;
  }

  .app-main > *:nth-child(4) {
    animation-delay: 0.15s;
  }

  .client-hero-art img {
    animation: app-float 4.8s ease-in-out infinite;
  }

  .client-auth-hero img,
  .client-token-compact > img,
  .client-point-card img {
    animation: app-float 5.4s ease-in-out infinite;
  }

  .client-guide-visual img {
    animation: app-float 5.2s ease-in-out infinite;
  }

  .client-guide-hero .client-hero-art::after,
  .client-guide-visual::after {
    animation: app-soft-pulse 4.8s ease-in-out infinite;
  }

  .client-orbit-dot {
    animation: app-orbit-dot 3.2s ease-in-out infinite;
  }

  .client-orbit-dot.dot-b {
    animation-delay: 0.5s;
  }

  .client-orbit-dot.dot-c {
    animation-delay: 1s;
  }

  .client-guide-progress span {
    animation: app-progress-glow 2.6s ease-in-out infinite;
  }

  .client-hero::before,
  .client-point-card::before {
    animation: app-sheen 5.2s ease-in-out infinite;
  }

  .app-btn::before {
    animation: app-sheen 3.8s ease-in-out infinite;
  }

  .client-auth-form::before {
    animation: app-sheen 6s ease-in-out infinite;
  }

  .client-status,
  .client-flow-card {
    animation: app-soft-pulse 5.8s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 360px) {
  .client-status-grid {
    grid-template-columns: 1fr;
  }

  .client-flow {
    grid-template-columns: 1fr;
  }

  .client-auth-hero,
  .client-point-card,
  .client-token-compact {
    grid-template-columns: 1fr;
  }

  .client-auth-hero img,
  .client-token-compact > img,
  .client-point-card img {
    max-width: 136px;
    margin: 0 auto;
  }

  .app-main {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* Admin operations */
.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  box-sizing: border-box;
  padding: 22px 16px;
  border-right: 1px solid var(--app-border);
  background: #101013;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 8px 16px;
  border-bottom: 1px solid var(--app-border);
  color: var(--app-text);
  text-decoration: none;
}

.admin-brand-logo {
  width: 78px;
  height: auto;
  flex: 0 0 auto;
  display: block;
}

.admin-kicker,
.admin-muted {
  color: var(--app-muted);
  font-size: 0.75rem;
}

.admin-nav {
  display: grid;
  gap: 16px;
}

.admin-nav-section {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-nav-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.admin-nav-title {
  display: block;
  color: #71717a;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  padding: 0 12px 4px;
  text-transform: uppercase;
}

.admin-nav a,
.admin-sidebar-foot a {
  color: #d4d4d8;
  text-decoration: none;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: #1c1c22;
  color: var(--app-text);
}

.admin-nav a.active {
  box-shadow: inset 3px 0 0 var(--app-accent);
}

.admin-sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--app-border);
  padding-top: 12px;
}

.admin-content {
  min-width: 0;
  padding: 28px;
}

.admin-topbar,
.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-topbar {
  margin-bottom: 20px;
}

.admin-topbar h1 {
  margin: 0;
  font-size: 1.45rem;
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-action-btn {
  border: 1px solid rgba(34, 197, 94, 0.5);
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 9px 13px;
}

.admin-action-btn:hover {
  background: rgba(34, 197, 94, 0.2);
}

.admin-action-btn-danger {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

.admin-action-btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.admin-kicker {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.admin-stat {
  background: var(--app-card);
  border: 1px solid var(--app-border);
  border-radius: 8px;
  padding: 16px;
}

.admin-stat span {
  display: block;
  color: var(--app-muted);
  font-size: 0.78rem;
  margin-bottom: 8px;
}

.admin-stat strong {
  font-size: 1.35rem;
}

.admin-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-kv {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 14px 0 0;
  font-size: 0.88rem;
}

.admin-kv dt {
  color: var(--app-muted);
}

.admin-kv dd {
  margin: 0;
  word-break: break-word;
}

.admin-pill,
.admin-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  background: #26262d;
  color: #d4d4d8;
  font-size: 0.75rem;
  font-weight: 700;
}

.admin-pill.ok,
.admin-status.completed {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

.admin-pill.danger,
.admin-status.failed {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
}

.admin-status.pending,
.admin-status.processing {
  background: rgba(250, 204, 21, 0.14);
  color: #fde68a;
}

.admin-time {
  color: var(--app-muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.admin-wallet,
.admin-url,
.admin-tx {
  max-width: 220px;
  word-break: break-all;
  font-size: 0.72rem;
}

.admin-form {
  max-width: 620px;
}

.admin-stats-compact {
  margin-bottom: 16px;
}

.admin-staff-layout {
  display: block;
}

.admin-staff-create-panel {
  margin-bottom: 16px;
}

.admin-staff-create-panel[hidden] {
  display: none;
}

.admin-staff-create-panel .admin-form,
.admin-staff-table-card {
  max-width: none;
}

.admin-staff-create-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 180px;
  gap: 12px;
  align-items: end;
}

.admin-field {
  display: block;
  min-width: 0;
}

.admin-field .app-input,
.admin-staff-create-grid .app-btn {
  margin-bottom: 0;
}

.admin-staff-create-grid .app-btn {
  height: 49px;
  margin-top: 0;
}

.admin-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.admin-list-head h2,
.admin-list-head p {
  margin: 0;
}

.admin-list-head p {
  color: var(--app-muted);
  font-size: 0.82rem;
  margin-top: 4px;
}

.admin-search-input {
  max-width: 320px;
  margin-bottom: 0;
  padding: 11px 13px;
  font-size: 0.9rem;
}

.admin-list-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-segment {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: var(--app-surface);
}

.admin-segment label {
  cursor: pointer;
}

.admin-segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.admin-segment span {
  display: block;
  padding: 10px 12px;
  color: var(--app-muted);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.admin-segment label + label span {
  border-left: 1px solid var(--app-border);
}

.admin-segment input:checked + span {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

.admin-page-size {
  width: auto;
  min-width: 118px;
  margin-bottom: 0;
  padding: 11px 12px;
  font-size: 0.86rem;
}

.admin-scroll-table {
  max-height: calc(100vh - 300px);
  min-height: 360px;
  overflow: auto;
  scrollbar-gutter: stable;
}

.admin-staff-table {
  min-width: 1040px;
}

.admin-signups-table {
  min-width: 960px;
}

.admin-users-table {
  min-width: 1540px;
}

.admin-staff-table th,
.admin-signups-table th,
.admin-users-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.admin-staff-table td,
.admin-signups-table td,
.admin-users-table td {
  vertical-align: middle;
}

.admin-staff-table th,
.admin-staff-table td,
.admin-users-table th,
.admin-users-table td {
  white-space: nowrap;
}

.admin-users-table .admin-wallet {
  max-width: 280px;
  min-width: 220px;
  white-space: normal;
}

.admin-point-tools {
  min-width: 430px;
}

.admin-point-form {
  display: grid;
  grid-template-columns: 88px 110px minmax(120px, 1fr) 72px;
  gap: 8px;
  align-items: center;
}

.admin-point-form .app-input,
.admin-point-form .admin-action-btn {
  margin: 0;
  padding: 9px 10px;
  min-height: 39px;
  font-size: 0.82rem;
}

.admin-point-form .admin-action-btn {
  width: 100%;
}

.admin-pin-tools {
  min-width: 128px;
}

.admin-pin-tools form {
  margin: 0;
}

.admin-pin-tools .admin-action-btn {
  width: 100%;
  margin: 0;
  padding: 9px 10px;
  min-height: 39px;
  font-size: 0.82rem;
}

.admin-phone {
  font-weight: 800;
  white-space: nowrap;
}

.admin-code {
  display: inline-flex;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: #e4e4e7;
  padding: 4px 7px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
}

.admin-num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.admin-row-note {
  display: inline-flex;
  margin-left: 7px;
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  font-size: 0.65rem;
  font-weight: 800;
  vertical-align: middle;
}

.admin-progress {
  display: inline-flex;
  width: 68px;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  vertical-align: middle;
}

.admin-progress span {
  display: block;
  min-width: 0;
  border-radius: inherit;
  background: var(--app-accent);
}

.admin-rate {
  display: inline-block;
  min-width: 34px;
  margin-left: 8px;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.admin-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 16px;
  color: var(--app-text);
  font-weight: 700;
}

.admin-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--app-accent);
}

.admin-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--app-text);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.admin-switch.compact {
  margin: 8px 0 16px;
}

.admin-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.admin-switch-track {
  position: relative;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #3f3f46;
  border: 1px solid var(--app-border);
  transition: background 0.18s, border-color 0.18s;
}

.admin-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f4f4f5;
  transition: transform 0.18s;
}

.admin-switch input:checked + .admin-switch-track {
  background: rgba(239, 68, 68, 0.72);
  border-color: rgba(239, 68, 68, 0.88);
}

.admin-switch input:checked + .admin-switch-track::after {
  transform: translateX(20px);
}

.admin-inline-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.admin-inline-input span {
  color: var(--app-muted);
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.admin-field-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.75fr;
  gap: 10px;
}

.admin-field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-copy {
  border: 1px solid var(--app-border);
  border-radius: 7px;
  background: var(--app-surface);
  color: var(--app-text);
  padding: 5px 8px;
  margin-left: 6px;
  cursor: pointer;
}

.admin-copy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--app-muted);
  font-size: 0.85rem;
}

.admin-pagination .admin-copy {
  margin-left: 0;
}

.admin-success {
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.admin-error {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .admin-shell {
    grid-template-columns: 1fr;
    overflow-x: hidden;
  }

  .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--app-border);
    background: rgba(16, 16, 19, 0.98);
    gap: 10px;
  }

  .admin-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .admin-brand {
    border-bottom: 0;
    padding: 0;
  }

  .admin-brand-logo {
    width: 68px;
  }

  .admin-nav-section {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: max-content;
    padding-bottom: 0;
    border-bottom: 0;
    scroll-snap-align: start;
  }

  .admin-nav-title {
    padding: 8px 6px 8px 0;
    white-space: nowrap;
  }

  .admin-nav a,
  .admin-sidebar-foot a {
    padding: 8px 10px;
    white-space: nowrap;
    font-size: 0.84rem;
  }

  .admin-sidebar-foot {
    margin-top: 0;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 8px;
  }

  .admin-content {
    box-sizing: border-box;
    max-width: 100vw;
    min-width: 0;
    padding: 18px 14px 40px;
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-two-col,
  .admin-staff-layout {
    grid-template-columns: 1fr;
  }

  .admin-topbar {
    align-items: flex-start;
  }

  .admin-topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-scroll-table {
    max-height: none;
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .admin-content {
    padding: 14px 10px 32px;
  }

  .admin-stat {
    padding: 12px;
  }

  .admin-stat strong {
    font-size: 1.15rem;
  }

  .admin-kv {
    grid-template-columns: 1fr;
  }

  .admin-field-grid,
  .admin-field-grid.two,
  .admin-inline-input,
  .admin-staff-create-grid {
    grid-template-columns: 1fr;
  }

  .admin-list-head {
    display: grid;
  }

  .admin-list-tools {
    justify-content: stretch;
  }

  .admin-search-input {
    max-width: none;
  }

  .admin-page-size,
  .admin-segment {
    width: 100%;
  }

  .admin-segment label {
    flex: 1;
    text-align: center;
  }

  .admin-pagination {
    justify-content: space-between;
  }
}
