:root {
  --bg: #000000;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.14);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.62);
  --muted2: rgba(255, 255, 255, 0.45);

  --card-details-bg: #242424;

  --label: rgba(255, 255, 255, 0.72);
  --text-strong: rgba(255, 255, 255, 0.86);
  --text-mid: rgba(255, 255, 255, 0.78);
  --text-soft: rgba(255, 255, 255, 0.55);
  --amount-neg: rgba(255, 255, 255, 0.70);

  --surface: rgba(255, 255, 255, 0.06);
  --surface-2: rgba(255, 255, 255, 0.05);
  --surface-3: rgba(255, 255, 255, 0.07);
  --surface-4: rgba(255, 255, 255, 0.045);

  --border: rgba(255, 255, 255, 0.16);
  --border-2: rgba(255, 255, 255, 0.18);
  --border-soft: rgba(255, 255, 255, 0.10);
  --focus: rgba(255, 255, 255, 0.22);

  --sheen: linear-gradient(135deg,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.02) 24%,
      rgba(255, 255, 255, 0.08) 55%,
      rgba(255, 255, 255, 0) 75%);

  --metal: linear-gradient(180deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(210, 210, 210, 0.92) 24%,
      rgba(255, 255, 255, 0.85) 48%,
      rgba(165, 165, 165, 0.9) 70%,
      rgba(255, 255, 255, 0.9) 100%);
  --metal-shadow: 0 0 24px rgba(255, 255, 255, 0.12);

  --divider: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.22) 40%,
      rgba(255, 255, 255, 0) 100%);

  --chip-line: rgba(255, 255, 255, 0.18);
  --chip-inner: radial-gradient(120% 120% at 20% 20%,
      rgba(255, 255, 255, 0.16) 0%,
      rgba(255, 255, 255, 0) 55%),
    radial-gradient(90% 90% at 80% 80%,
      rgba(172, 96, 255, 0.12) 0%,
      rgba(0, 0, 0, 0) 60%);

  --qr-glow: radial-gradient(closest-side,
      rgba(64, 150, 255, 0.36) 0%,
      rgba(172, 96, 255, 0.26) 35%,
      rgba(0, 0, 0, 0) 70%);

  --e-blue: rgba(64, 150, 255, 0.55);
  --e-violet: rgba(172, 96, 255, 0.55);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7fb;
    --glass: rgba(255, 255, 255, 0.64);
    --glass-border: rgba(0, 0, 0, 0.10);
    --text: rgba(0, 0, 0, 0.88);
    --muted: rgba(0, 0, 0, 0.56);
    --muted2: rgba(0, 0, 0, 0.42);

    --label: rgba(0, 0, 0, 0.62);
    --text-strong: rgba(0, 0, 0, 0.86);
    --text-mid: rgba(0, 0, 0, 0.72);
    --text-soft: rgba(0, 0, 0, 0.54);
    --amount-neg: rgba(0, 0, 0, 0.62);

    --surface: rgba(255, 255, 255, 0.62);
    --surface-2: rgba(255, 255, 255, 0.55);
    --surface-3: rgba(255, 255, 255, 0.70);
    --surface-4: rgba(255, 255, 255, 0.58);

    --border: rgba(0, 0, 0, 0.12);
    --border-2: rgba(0, 0, 0, 0.14);
    --border-soft: rgba(0, 0, 0, 0.10);
    --focus: rgba(0, 0, 0, 0.20);

    --sheen: linear-gradient(135deg,
        rgba(0, 0, 0, 0.10) 0%,
        rgba(0, 0, 0, 0.02) 24%,
        rgba(255, 255, 255, 0.10) 55%,
        rgba(255, 255, 255, 0) 78%);

    --metal: linear-gradient(180deg,
        rgba(0, 0, 0, 0.88) 0%,
        rgba(70, 70, 70, 0.86) 28%,
        rgba(0, 0, 0, 0.82) 58%,
        rgba(110, 110, 110, 0.85) 100%);
    --metal-shadow: 0 0 18px rgba(0, 0, 0, 0.10);

    --divider: linear-gradient(90deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.16) 40%,
        rgba(0, 0, 0, 0) 100%);

    --chip-line: rgba(0, 0, 0, 0.16);
    --chip-inner: radial-gradient(120% 120% at 20% 20%,
        rgba(0, 0, 0, 0.10) 0%,
        rgba(0, 0, 0, 0) 55%),
      radial-gradient(90% 90% at 80% 80%,
        rgba(172, 96, 255, 0.14) 0%,
        rgba(0, 0, 0, 0) 60%);

    --qr-glow: radial-gradient(closest-side,
        rgba(64, 150, 255, 0.28) 0%,
        rgba(172, 96, 255, 0.18) 35%,
        rgba(0, 0, 0, 0) 72%);

    --card-details-bg: #b1b2b5;
  }

  .bg::before,
  .bg::after {
    background: radial-gradient(42% 34% at 18% 22%,
        rgba(64, 150, 255, 0.16) 0%,
        rgba(64, 150, 255, 0.06) 30%,
        rgba(0, 0, 0, 0) 62%),
      radial-gradient(40% 32% at 82% 18%,
        rgba(172, 96, 255, 0.14) 0%,
        rgba(172, 96, 255, 0.05) 32%,
        rgba(0, 0, 0, 0) 62%),
      radial-gradient(36% 30% at 86% 86%,
        rgba(64, 150, 255, 0.12) 0%,
        rgba(64, 150, 255, 0.04) 34%,
        rgba(0, 0, 0, 0) 64%);
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

/* Admin (email sending) */
.admin .content {
  gap: 14px;
}

@media (min-width: 980px) {
  .admin.app {
    max-width: 1100px;
  }

  .admin__content {
    display: grid;
    grid-template-columns: 420px 1fr;
    align-items: start;
    gap: 14px;
  }

  /* Put main forms on the right column */
  #createCardSection,
  #qrSection {
    grid-column: 2;
  }
}

.admin__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.2px;
}

.adminCard {
  background: linear-gradient(180deg, var(--surface-3), var(--surface-4));
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 16px;
  backdrop-filter: blur(10px);
}

.adminCard__title {
  font-weight: 700;
  letter-spacing: 0.2px;
  margin: 2px 0 10px;
  color: var(--text-strong);
}

.adminCard__hint {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.adminForm {
  display: grid;
  gap: 12px;
}

.adminGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 420px) {
  .adminGrid {
    grid-template-columns: 1fr;
  }
}

.adminField {
  display: grid;
  gap: 7px;
}

.adminField__label {
  font-size: 12px;
  color: var(--label);
  letter-spacing: 0.2px;
}

.adminField__input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.adminField__input:focus {
  border-color: var(--border-2);
  box-shadow: 0 0 0 4px var(--focus);
}

.adminActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.adminActions--stack {
  grid-template-columns: 1fr;
}

.adminButton--wide {
  grid-column: 1 / -1;
}

.adminButton {
  border: 1px solid var(--border-2);
  background: var(--surface-3);
  color: var(--text);
  border-radius: 18px;
  padding: 12px 12px;
  font-weight: 650;
  letter-spacing: 0.2px;
  cursor: pointer;
}

.adminButton:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.adminButton--ghost {
  background: transparent;
}

.adminLink {
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  width: fit-content;
}

.adminLoginPanel {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  background: var(--surface);
}

.authModal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
}

.authModal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(3px);
}

.authModal .adminLoginPanel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
}

.adminResult {
  min-height: 18px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
  word-break: break-word;
}

.adminResult--ok {
  color: var(--text);
}

.adminResult--err {
  color: var(--text);
}

.adminResult--info {
  color: var(--muted);
}

/* Root Admin dashboard (desktop mode) */
.mode-admin {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --label: #334155;
  --text-strong: #0b1220;
  --text-mid: #1e293b;
  --text-soft: #64748b;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #ffffff;
  --surface-4: #f8fafc;
  --border: #dbe4f0;
  --border-2: #c8d4e3;
  --border-soft: #dbe4f0;
  --focus: rgba(14, 116, 144, 0.22);
}

.mode-admin .bg {
  background: #ffffff;
}

.mode-admin .bg::before,
.mode-admin .bg::after {
  display: none;
}

.mode-admin .app {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.mode-admin .header__greeting {
  color: #0f172a;
  font-weight: 600;
}

.mode-admin .header__label {
  color: #334155;
}

.mode-admin .adminCard {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  backdrop-filter: none !important;
}

.mode-admin .adminLoginPanel {
  background: #ffffff;
  border-color: #dbe4f0;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
}

.mode-admin .adminCard__title {
  color: #0f172a;
}

.mode-admin .adminCard__hint,
.mode-admin .adminList {
  color: #475569;
}

.mode-admin .adminField__label {
  color: #334155;
  font-weight: 600;
}

.mode-admin .adminField__input {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

.mode-admin .adminField__input::placeholder {
  color: #94a3b8;
}

.mode-admin .adminField__input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.18);
}

.mode-admin .adminButton {
  border: 1px solid #0284c7;
  background: #0284c7;
  color: #ffffff;
}

.mode-admin .adminButton:hover {
  background: #0369a1;
  border-color: #0369a1;
}

.mode-admin .adminButton--ghost {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #0f172a;
}

.mode-admin .admin__back {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
}

.mode-admin .adminResult {
  color: #475569;
}

.mode-admin .adminResult--ok {
  color: #166534;
}

.mode-admin .adminResult--err {
  color: #b91c1c;
}

.mode-admin .adminResult--info {
  color: #0f766e;
}

.mode-admin .adminTable {
  gap: 6px;
}

.mode-admin .adminTableRow {
  background: #ffffff !important;
  border: 0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.mode-admin .adminTableRow--head {
  color: #475569;
}

.mode-admin .adminTableCell {
  color: #0f172a;
}

.mode-admin .adminTableCell--muted {
  color: #475569;
}

.mode-admin .adminTableCell--strong {
  color: #0b1220;
}

.mode-admin .content {
  display: grid;
  gap: 14px;
  grid-auto-rows: min-content;
  padding: 8px 24px 18px;
}

.mode-admin .header {
  padding-left: 24px;
  padding-right: 24px;
}

@media (min-width: 980px) {
  .mode-admin .content {
    grid-template-columns: 380px 1fr;
    align-items: start;
  }

  .mode-admin #adminRootClients {
    padding-bottom: 12px;
  }

  .mode-admin #adminClientsList {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .mode-admin #adminRootClients {
    grid-column: 1;
  }

  .mode-admin #adminRootCardTx,
  .mode-admin #adminRootAllTx {
    grid-column: 2;
  }

  .mode-admin #adminRootLogin {
    grid-column: 1 / -1;
    max-width: none;
    justify-self: stretch;
  }
}

.mode-admin .cta {
  display: none !important;
}

.adminClientList {
  display: grid;
  gap: 10px;
}

.adminClientButton {
  width: 100%;
  text-align: left;
  display: grid;
  gap: 4px;
  padding: 12px 12px;
}

.adminClientButton__name {
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--text-strong);
}

.adminClientButton__meta {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.2px;
}

.adminClientButton.is-active {
  background: var(--surface-3);
  border-color: var(--border-2);
  box-shadow: 0 0 0 4px var(--focus);
}

.adminTable {
  display: grid;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.adminTableRow {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
}

@media (min-width: 980px) {
  .adminTable--all .adminTableRow {
    min-width: 860px;
  }

  .adminTable--card .adminTableRow {
    min-width: 980px;
  }
}

.adminTableRow--head {
  padding: 0 12px;
  border: none;
  background: transparent;
  color: var(--label);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.adminTableCell {
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
  word-break: break-word;
}

.adminTableCell--muted {
  color: var(--muted);
}

.adminTableCell--strong {
  color: var(--text-strong);
  font-weight: 650;
}

.adminTable--all .adminTableRow {
  grid-template-columns: 140px 90px 88px 84px 120px 1fr;
}

.adminTable--card .adminTableRow {
  grid-template-columns: 140px 90px 88px 84px 84px 84px 1fr;
}

@media (max-width: 520px) {
  .adminTable--all .adminTableRow {
    grid-template-columns: 1fr;
  }

  .adminTable--card .adminTableRow {
    grid-template-columns: 1fr;
  }

  .adminTableRow--head {
    display: none;
  }
}

.adminList {
  margin: 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.bg {
  position: fixed;
  inset: 0;
  background: var(--bg);
  overflow: hidden;
}

.bg::before,
.bg::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(42% 34% at 18% 22%,
      rgba(64, 150, 255, 0.18) 0%,
      rgba(64, 150, 255, 0.06) 28%,
      rgba(0, 0, 0, 0) 62%),
    radial-gradient(40% 32% at 82% 18%,
      rgba(172, 96, 255, 0.16) 0%,
      rgba(172, 96, 255, 0.05) 30%,
      rgba(0, 0, 0, 0) 62%),
    radial-gradient(36% 30% at 86% 86%,
      rgba(64, 150, 255, 0.14) 0%,
      rgba(64, 150, 255, 0.04) 30%,
      rgba(0, 0, 0, 0) 62%);
  filter: blur(10px);
}

.bg::after {
  opacity: 0.55;
  filter: blur(22px);
}

.app {
  position: relative;
  height: var(--app-height, 100dvh);
  min-height: 100vh;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: 520px;
  margin: 0 auto;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
}

.header__greeting {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.2px;
  color: var(--muted);
}

.header__label {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.2px;
  color: var(--label);
}

.adminHeaderAction {
  display: none;
  border: 1px solid #0284c7;
  background: #0284c7;
  color: #ffffff;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.adminHeaderAction:hover {
  background: #0369a1;
  border-color: #0369a1;
}

.adminHeaderAction--danger {
  background: #dc2626;
  border-color: #dc2626;
}

.adminHeaderAction--danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.adminHeaderAction[hidden] {
  display: none !important;
}

.mode-admin .adminHeaderAction:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text-strong);
  display: grid;
  place-items: center;
  position: relative;
  padding: 0;
}

.avatar__ring {
  position: absolute;
  inset: -1px;
  border-radius: 999px;
  background: radial-gradient(80% 80% at 30% 20%,
      rgba(64, 150, 255, 0.28) 0%,
      rgba(0, 0, 0, 0) 60%),
    radial-gradient(80% 80% at 70% 80%,
      rgba(172, 96, 255, 0.22) 0%,
      rgba(0, 0, 0, 0) 60%);
  filter: blur(8px);
  opacity: 0.7;
  pointer-events: none;
}

.avatar__initials {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.4px;
}

.content {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 18px 24px;
  overscroll-behavior: contain;
}

.card {
  position: relative;
  border-radius: 26px;
  padding: 18px 18px 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  /* Fuerza la forma de tarjeta incluso antes de cargar la imagen */
  aspect-ratio: 1.58 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}

.card__floatingPoints {
  position: absolute;
  top: 50%;
  left: 32px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.card__floatingLabel {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffffff;
  opacity: 0.6;
}

#floatingPoints {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  opacity: 0.95;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  font-family: inherit;
  line-height: 1;
}

.card.is-details .card__floatingPoints {
  opacity: 0;
  transform: translateY(-50%) scale(0.9);
}

.card__art {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
  transition: opacity 220ms ease, transform 220ms ease;
}

.card__details {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 16px 16px 18px;
  background: var(--bg);
  background: var(--card-details-bg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.55);

  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease, visibility 0ms linear 220ms;
}

.card__detailsTitle {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mid);
}

.card__detailsGrid {
  margin: 10px 0 0;
  display: grid;
  gap: 8px;
}

.card__detailsRow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.card__detailsRow dt {
  font-size: 12px;
  font-weight: 300;
  color: var(--muted2);
}

.card__detailsRow dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: 0.2px;
}

.card.is-details {
  aspect-ratio: auto;
  overflow: visible;
}

.card.is-details .card__details {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity 220ms ease, transform 220ms ease, visibility 0ms linear 0ms;
}

.card.is-details .card__art {
  opacity: 0;
  transform: scale(1.01);
}

/* Client design: use PNG artwork instead of the glass card UI */
.card--client {
  padding: 0;
  background: transparent;
  border: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  aspect-ratio: auto;
  min-height: auto;
  overflow: visible !important;
  display: block;
}

.card--client .card__sheen,
.card--client .card__top,
.card--client .balance,
.card--client .card__bottom {
  display: none !important;
}

.card--client .card__art {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 26px;
  object-fit: contain;
}

.card--client {
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-y;
}

.card--client:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.card--client .card__art {
  -webkit-user-drag: none;
}

.card__sheen {
  position: absolute;
  inset: 0;
  background: var(--sheen);
  opacity: 0.42;
  pointer-events: none;
}

.card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.brand__word {
  font-weight: 600;
  letter-spacing: 0.18em;
  font-size: 13px;
  color: var(--text-mid);
  text-transform: uppercase;
}

.brand__sub {
  margin-top: 4px;
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.balance {
  margin-top: 18px;
}

.balance__label {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.25px;
  color: var(--muted2);
}

.balance__value {
  margin-top: 6px;
  font-size: 44px;
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: var(--metal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: var(--metal-shadow);
}

.balance__cash {
  font-size: 14px;
  font-weight: 650;
  color: var(--text-strong);
  margin-top: -1px;
}

.balance__rate {
  margin-top: 6px;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  opacity: 0.7;
}

.card__bottom {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card__divider {
  height: 1px;
  flex: 1;
  background: var(--divider);
}

.card__meta {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.2px;
  color: var(--text-soft);
  white-space: nowrap;
}

.chip {
  width: 54px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.chip__inner {
  position: absolute;
  inset: 0;
  background: var(--chip-inner);
  opacity: 0.95;
}

.chip__line {
  position: absolute;
  background: var(--chip-line);
  filter: blur(0.1px);
}

.chip__line--a {
  left: 8px;
  right: 8px;
  top: 13px;
  height: 1px;
  opacity: 0.85;
}

.chip__line--b {
  left: 18px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  opacity: 0.65;
}

.chip__line--c {
  right: 14px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  opacity: 0.45;
}

.activity {
  margin-top: 16px;
  padding-bottom: 18px;
}

.activity__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 10px;
  margin: 0 0 10px;
}

.activity__title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.activity__refresh {
  flex: 0 0 auto;
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  color: var(--text-mid);
  display: grid;
  place-items: center;
  padding: 0;
}

.activity__refresh:active {
  transform: translateY(0.5px);
}

.activity__refresh:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.activity__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.activity__item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 16px;
  background: var(--surface-4);
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.activity__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--text-mid);
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
}

.activity__icon::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(70% 70% at 20% 20%,
      rgba(64, 150, 255, 0.30) 0%,
      rgba(0, 0, 0, 0) 55%),
    radial-gradient(70% 70% at 80% 90%,
      rgba(172, 96, 255, 0.22) 0%,
      rgba(0, 0, 0, 0) 60%);
  filter: blur(12px);
  opacity: 0.65;
}

.activity__text {
  display: grid;
  gap: 2px;
}

.activity__name {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-strong);
}

.activity__time {
  font-size: 12px;
  font-weight: 300;
  color: var(--muted);
}

.activity__amount {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--text-strong);
}

.activity__amount--neg {
  color: var(--amount-neg);
}

.cta {
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
}

.qr {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--text);
  display: grid;
  place-items: center;
  position: relative;
  overflow: visible;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.qr__glow {
  position: absolute;
  inset: -24px;
  border-radius: 999px;
  background: var(--qr-glow);
  filter: blur(14px);
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}

.qr:active .qr__glow,
.qr.is-glowing .qr__glow {
  opacity: 1;
  transform: scale(1);
}

.qr:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .qr__glow {
    transition: none;
  }
}

/* QR Scanner Overlay */

.scanner {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
}

.scanner--active {
  display: block;
}

.scanner__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 0%, rgba(64, 150, 255, 0.4), transparent 55%),
    radial-gradient(circle at 90% 100%, rgba(172, 96, 255, 0.4), transparent 55%),
    rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.scanner__frame {
  position: relative;
  max-width: 520px;
  height: 100dvh;
  margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) 18px calc(14px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.scanner__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.scanner__title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.scanner__close {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text-strong);
  display: grid;
  place-items: center;
  padding: 0;
}

.scanner__body {
  position: relative;
  margin-top: 18px;
  border-radius: 26px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  overflow: hidden;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.7);
}

.scanner__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner__canvas {
  display: none;
}

.scanner__reticle {
  position: absolute;
  inset: 16%;
  border-radius: 24px;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6);
}

.scanner__footer {
  margin-top: 18px;
  display: grid;
  gap: 6px;
}

.scanner__hint {
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
}

.scanner__result {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-strong);
  word-break: break-word;
}

/* Profile Menu Modal */

.profileMenu {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}

.profileMenu--active {
  display: block;
}

.profileMenu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.profileMenu__frame {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) 18px;
}

.profileMenu__frame>* {
  pointer-events: auto;
}

.profileMenu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profileMenu__title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.profileMenu__close {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text-strong);
  display: grid;
  place-items: center;
  padding: 0;
}

.profileMenu__body {
  margin-top: 14px;
  border-radius: 22px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.55);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.profileMenu__item {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.profileMenu__item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

.profileMenu__item--install {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff !important;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  margin-bottom: 8px;
}

.profileMenu__item--install:hover {
  transform: translateY(-2px);
  opacity: 0.95;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.profileMenu__soon {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 10px;
  opacity: 0.6;
}

/* Temporary scan feedback (toast) */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  display: none;
  max-width: min(520px, calc(100vw - 36px));
}

.toast--show {
  display: block;
}

.toast__frame {
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 12px 14px;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.1px;
}

/* Large scan result popup */
.scanPopup {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.scanPopup--show {
  display: flex;
}

.scanPopup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.scanPopup__frame {
  position: relative;
  width: min(520px, calc(100vw - 36px));
  border-radius: 26px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.55);
  padding: 18px 18px 16px;
  text-align: center;
}

.scanPopup__icon {
  width: 74px;
  height: 74px;
  margin: 4px auto 10px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-3);
  display: grid;
  place-items: center;
  color: var(--text-strong);
}

.scanPopup__title {
  font-weight: 800;
  letter-spacing: 0.3px;
  font-size: 22px;
  color: var(--text-strong);
}

.scanPopup__subtitle {
  margin-top: 6px;
  font-size: 14px;
  letter-spacing: 0.2px;
  color: var(--muted);
  line-height: 1.35;
}

.profileMenu__item {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--surface-3);
  color: var(--text-strong);
  padding: 12px 12px;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  display: flex;
  align-items: center;
}

.profileMenu__item--danger {
  margin-top: 12px;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.15);
  color: #f87171 !important;
}

.aSidebar__logout--reset:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #f87171 !important;
  opacity: 1 !important;
}

.aSidebar__logout--credit:hover {
  background: rgba(165, 180, 252, 0.1) !important;
  opacity: 1 !important;
}

.profileMenu__item:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.profileMenu__hint {
  min-height: 16px;
  font-size: 12px;
  font-weight: 300;
  color: var(--muted);
}

.profileMenu__soon {
  text-align: center;
  font-size: 13px;
  color: var(--text-mid);
  opacity: 0.7;
  padding: 24px 0;
  font-style: italic;
}

.profileMenu__credits {
  text-align: center;
  font-size: 9px;
  color: var(--muted);
  opacity: 0.4;
  margin-top: 24px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* Auth Modal */
.authModal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1200;
}

.authModal__panel {
  width: min(92vw, 420px);
  background: #fff;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  padding: 18px;
}

.authModal [hidden] {
  display: none !important;
}

.activity__more {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--surface-3);
  color: var(--text-mid);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: background 150ms ease, opacity 150ms ease;
}

.activity__more:active {
  opacity: 0.7;
}

.activity__more[hidden] {
  display: none !important;
}

.historyModal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.historyModal--active {
  display: block;
}

.historyModal__frame {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) 18px calc(14px + env(safe-area-inset-bottom));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.historyModal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 14px;
}

.historyModal__title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: var(--text-strong);
}

.historyModal__close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text-strong);
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.historyModal__body {
  flex: 1;
}

.adminResultItem {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface-3);
  border: 1px solid var(--border-soft);
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
  color: var(--text-strong);
  font-family: inherit;
}

.adminResultItem:hover,
.adminResultItem:focus-visible {
  background: var(--surface-4);
  outline: none;
  border-color: var(--focus);
}

.adminResultItem__title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.adminResultItem__subtitle {
  font-size: 12px;
  color: var(--muted);
}

.adminResultItem--empty {
  cursor: default;
  color: var(--muted);
  text-align: center;
}

.adminResultItem--empty:hover {
  background: var(--surface-3);
  border-color: var(--border-soft);
}

/* --- ADVANCED ADMIN DESIGN SYSTEM (MODERN MATERIAL / GLASS) --- */

:root {
  --admin-primary: #4361ee;
  --admin-primary-rgb: 67, 97, 238;
  --admin-secondary: #3f37c9;
  --admin-accent: #4cc9f0;
  --admin-success: #4cc9f0;
  --admin-bg: #f8fafc;
  --admin-card-bg: #ffffff;
  --admin-text: #1e293b;
  --admin-text-muted: #64748b;
  --admin-border: #e2e8f0;
  --admin-radius: 16px;
  --font-plus: 'Plus Jakarta Sans', sans-serif;
  --font-outfit: 'Outfit', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --admin-bg: #0f172a;
    --admin-card-bg: #1e293b;
    --admin-text: #f8fafc;
    --admin-text-muted: #94a3b8;
    --admin-border: #334155;
  }
}

.mode-admin body {
  background-color: var(--admin-bg);
  font-family: var(--font-plus);
  color: var(--admin-text);
  background-image:
    radial-gradient(at 0% 0%, rgba(var(--admin-primary-rgb), 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(76, 201, 240, 0.05) 0px, transparent 50%);
}

/* Admin Auth Overlay */
.adminAuth {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.adminAuth__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
}

.adminAuth__card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: adminFadeIn 0.4s ease-out;
}

@keyframes adminFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.adminAuth__header {
  padding: 40px 40px 20px;
  text-align: center;
}

.adminAuth__logo {
  margin-bottom: 24px;
}

.adminAuth__title {
  font-family: var(--font-outfit);
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  color: var(--admin-text);
}

.adminAuth__hint {
  color: var(--admin-text-muted);
  font-size: 15px;
  margin-top: 8px;
}

.adminAuth__body {
  padding: 0 40px 40px;
}

/* Form Elements */
.adminForm__group {
  margin-bottom: 20px;
}

.adminLabel {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--admin-text-muted);
}

.adminInput {
  width: 100%;
  height: 52px;
  background: var(--admin-bg);
  border: 2px solid var(--admin-border);
  border-radius: 14px;
  padding: 0 18px;
  font-family: inherit;
  font-size: 16px;
  color: var(--admin-text);
  transition: all 0.2s;
}

.adminInput:focus {
  outline: none;
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 4px rgba(var(--admin-primary-rgb), 0.1);
}

.adminInput--center {
  text-align: center;
  letter-spacing: 0.5em;
  font-weight: 700;
  font-size: 20px;
}

.adminBtn {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.adminBtn--primary {
  background: var(--admin-primary);
  color: white;
  box-shadow: 0 10px 15px -3px rgba(var(--admin-primary-rgb), 0.3);
}

.adminBtn--primary:hover {
  background: var(--admin-secondary);
  transform: translateY(-2px);
}

.adminBtn--ghost {
  background: transparent;
  color: var(--admin-text-muted);
  border: 2px solid var(--admin-border);
}

.adminBtn--ghost:hover {
  background: var(--admin-bg);
  color: var(--admin-text);
}

/* Dashboard Layout */
.adminDashboard {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 0;
  animation: adminSlideUp 0.5s ease-out;
}

@keyframes adminSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.adminGrid {
  display: grid;
  gap: 24px;
}

.adminStats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.statCard {
  padding: 20px;
  border-radius: var(--admin-radius);
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  position: relative;
  overflow: hidden;
}

.statCard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.statCard--blue::before {
  background: var(--admin-primary);
}

.statCard--violet::before {
  background: var(--admin-secondary);
}

.statCard__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.statCard__value {
  font-family: var(--font-outfit);
  font-size: 32px;
  font-weight: 700;
  margin-top: 8px;
  color: var(--admin-text);
}

.adminPanelCard {
  background: var(--admin-card-bg);
  border-radius: var(--admin-radius);
  border: 1px solid var(--admin-border);
  overflow: hidden;
}

.adminPanelCard__header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.adminPanelCard__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(var(--admin-primary-rgb), 0.1);
  color: var(--admin-primary);
  display: grid;
  place-items: center;
}

.adminPanelCard__title {
  font-family: var(--font-outfit);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.adminSearchBox {
  padding: 16px 24px;
}

.adminSearchBox__input {
  width: 100%;
  background: var(--admin-bg);
  border: 2px solid var(--admin-border);
  border-radius: 14px;
  height: 52px;
  padding: 0 48px 0 18px;
  font-family: inherit;
  color: var(--admin-text);
  font-size: 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}

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

.adminTableWrapper {
  overflow-x: auto;
}

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

.adminTableRow--head {
  background: var(--admin-bg);
}

.adminTableCell {
  padding: 16px 24px;
  font-size: 14px;
  border-bottom: 1px solid var(--admin-border);
}

.adminTableCell--strong {
  font-weight: 600;
  color: var(--admin-primary);
}

.adminIconButton {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--admin-border);
  background: transparent;
  color: var(--admin-text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s;
}

.adminIconButton:hover {
  background: var(--admin-bg);
  color: var(--admin-primary);
  border-color: var(--admin-primary);
}

.adminResultItem {
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
  padding: 14px 18px;
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  color: inherit;
  font-family: inherit;
}

.adminResultItem:hover {
  border-color: var(--admin-primary);
  background: rgba(var(--admin-primary-rgb), 0.05);
  transform: translateX(4px);
}

/* -------------------------------------------------------
   NEW ADMIN PANEL REDESIGN  (a* prefix = admin namespace)
   ------------------------------------------------------- */

/* -- Login modal -- */
.aLogin {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.aLogin[hidden] {
  display: none !important;
}

.aLogin__backdrop {
  position: absolute;
  inset: 0;
  background: #09090b;
}

.aLogin__card {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 36px 32px 32px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.aLogin__logo {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  display: grid;
  place-items: center;
  color: #fff;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.45);
}

.aLogin__title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.aLogin__sub {
  margin: 0 0 28px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.42);
}

.aLogin__hint {
  margin: 0 0 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.45;
}

.aLogin__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* -- Shared field -- */
.aField {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aField__label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.aField__input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
  font-family: inherit;
}

.aField__input::placeholder {
  color: rgba(255, 255, 255, 0.22);
}

.aField__input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.aField__input[type="search"]::-webkit-search-cancel-button {
  display: none;
}

/* -- Buttons -- */
.aBtn {
  border: none;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.2px;
  font-family: inherit;
  transition: opacity 150ms, transform 100ms;
}

.aBtn:active {
  transform: scale(0.98);
}

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

.aBtn--primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.aBtn--primary:hover {
  opacity: 0.9;
}

.aBtn--ghost {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.aBtn--ghost:hover {
  background: rgba(255, 255, 255, 0.11);
}

.aBtn--link {
  background: none;
  color: rgba(255, 255, 255, 0.42);
  font-size: 13px;
  font-weight: 400;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* -- Result message -- */
.aResult {
  font-size: 13px;
  min-height: 16px;
  word-break: break-word;
  color: rgba(255, 255, 255, 0.45);
}

.aResult--ok {
  color: #4ade80;
}

.aResult--err {
  color: #f87171;
}

.aResult--info {
  color: #60a5fa;
}

/* -- Dashboard layout -- */
.aDash {
  display: flex;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  background: #09090b;
  color: #e4e4e7;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.aDash[hidden] {
  display: none !important;
}

/* -- Sidebar -- */
.aSidebar {
  width: 210px;
  flex-shrink: 0;
  background: #111113;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  padding: 20px 12px 16px;
  gap: 6px;
}

.aSidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 20px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.2px;
}

.aSidebar__brandName {
  white-space: nowrap;
}

.aSidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.aSidebar__navItem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 140ms, color 140ms;
}

.aSidebar__navItem:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.aSidebar__navItem.is-active {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
}

.aSidebar__navItem.is-active svg {
  opacity: 1;
}

.aSidebar__navItem svg {
  opacity: 0.6;
  flex-shrink: 0;
}

.aSidebar__bottom {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.aSidebar__goQr,
.aSidebar__logout {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 10px;
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 140ms;
}

.aSidebar__goQr {
  color: #a5b4fc;
}

.aSidebar__goQr:hover {
  background: rgba(99, 102, 241, 0.14);
}

.aSidebar__logout {
  color: rgba(255, 255, 255, 0.4);
}

.aSidebar__logout:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f87171;
}

/* -- Main content -- */
.aDash__main {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.aPanel {
  padding: 28px 28px 40px;
  max-width: 860px;
  min-height: 100%;
}

.aPanel[hidden] {
  display: none;
}

.aPanel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.aPanel__title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.aPanel__sub {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.38);
}

/* -- Search box -- */
.aSearch {
  position: relative;
  margin-bottom: 12px;
}

.aSearch__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.aSearch__input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 13px 14px 13px 42px;
  color: #fff;
  font-size: 15px;
  outline: none;
  font-family: inherit;
  transition: border-color 150ms, box-shadow 150ms;
}

.aSearch__input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.aSearch__input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* -- Dropdown -- */
.aDropdown {
  background: #1c1c1f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.aDropdown[hidden] {
  display: none !important;
}

.aDropdown__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  color: #e4e4e7;
  font-family: inherit;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 100ms;
}

.aDropdown__item:last-child {
  border-bottom: none;
}

.aDropdown__item:hover {
  background: rgba(99, 102, 241, 0.12);
}

.aDropdown__name {
  font-weight: 600;
  color: #fff;
}

.aDropdown__cedula {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
}

.aDropdown__pts {
  font-size: 13px;
  font-weight: 600;
  color: #a5b4fc;
  white-space: nowrap;
}

.aDropdown__empty {
  padding: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
}

/* -- Selected client card -- */
.aClientCard {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 16px;
  padding: 16px 16px;
  margin-bottom: 20px;
}

.aClientCard[hidden] {
  display: none !important;
}

.aClientCard__avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.aClientCard__info {
  flex: 1;
  min-width: 0;
}

.aClientCard__name {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aClientCard__meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.42);
  margin-top: 2px;
}

.aClientCard__balance {
  text-align: right;
  flex-shrink: 0;
}

.aClientCard__balanceVal {
  font-size: 22px;
  font-weight: 800;
  color: #a5b4fc;
  letter-spacing: -0.5px;
  line-height: 1;
}

.aClientCard__balanceLbl {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
  margin-top: 2px;
}

.aClientCard__clear {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  flex-shrink: 0;
  transition: background 120ms, color 120ms;
}

.aClientCard__clear:hover {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
}

/* -- Section label -- */
.aSection__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
  margin: 20px 0 12px;
}

/* -- Icon button -- */
.aIconBtn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 120ms, color 120ms;
  flex-shrink: 0;
  align-self: center;
}

.aIconBtn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* -- Transaction table (dark) -- */
.aTxTable {
  display: grid;
  gap: 4px;
  overflow-x: auto;
}

.aTxRow {
  display: grid;
  grid-template-columns: 140px 80px 80px 70px 150px 1fr;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  align-items: center;
  min-width: 620px;
}

.aTxRow--card {
  grid-template-columns: 140px 80px 80px 70px 70px 70px 1fr;
  min-width: 740px;
}

.aTxRow--head {
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  padding-bottom: 6px;
}

.aTxCell {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  word-break: break-word;
}

.aTxCell--strong {
  font-weight: 600;
  color: #e4e4e7;
}

.aTxCell--pts {
  font-weight: 700;
  color: #a5b4fc;
}

.aTxEmpty {
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.3);
}

/* -- mode-admin overrides: hide old header items, host aDash full height -- */
.mode-admin .header {
  display: none !important;
}

/* In admin mode, dismiss the bootSplash immediately — admin has its own loading state */
.mode-admin .bootSplash {
  display: none !important;
}

.mode-admin .content {
  display: block !important;
  padding: 0 !important;
  overflow: hidden !important;
  height: 100% !important;
}

.mode-admin .app {
  max-width: 100vw !important;
  width: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  height: 100vh !important;
  height: 100dvh !important;
  overflow: hidden !important;
}

.mode-admin body {
  overflow: hidden !important;
  background: #09090b !important;
}

.aDash {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* -- Admin QR Specific -- */
.aQrDisplay {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.aQrDisplay__frame {
  background: #fff;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
}

.aQrDisplay__frame img {
  display: block;
  width: 220px;
  height: 220px;
  border-radius: 8px;
}

/* -- Dashboard Statistics -- */
.aFilterGroups {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.aFilterBtn {
  background: transparent;
  border: none;
  font-size: 13px;
  color: var(--a-text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.aFilterBtn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.aFilterBtn.is-active {
  background: #fff;
  color: #000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.aStatCards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.aStatCard {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, background 0.2s ease;
}

.aStatCard:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
}

.aStatCard__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.aStatCard__val {
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 8px;
}

.aStatCard__lbl {
  font-size: 14px;
  font-weight: 600;
  color: var(--a-text-muted);
}

.aStatCard__sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 4px;
}

.aStatLoader {
  text-align: center;
  padding: 24px;
  font-size: 14px;
  color: var(--a-accent);
  animation: pulse 1.5s infinite ease-in-out;
}

/* ── Mobile Admin: Bottom Tab Bar (≤ 640px) ── */
@media (max-width: 640px) {

  /* Hide the desktop sidebar entirely */
  .aSidebar {
    display: none;
  }

  /* Stack layout: main fills all space except bottom bar */
  .aDash {
    flex-direction: column;
  }

  .aDash__main {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .aPanel {
    padding: 20px 16px 24px;
  }

  /* Bottom navigation bar */
  .aDash::after {
    content: '';
    display: none;
  }

  /* A fixed bottom bar injected via CSS on the aDash element */
  .aMobileNav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(17, 17, 19, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .aMobileNav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 0 8px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.38);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    font-family: inherit;
    transition: color 120ms;
    text-transform: uppercase;
  }

  .aMobileNav__item svg {
    flex-shrink: 0;
  }

  .aMobileNav__item.is-active {
    color: #a5b4fc;
  }

  /* Action buttons in bottom bar */
  .aMobileNav__qr {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 0 8px;
    background: none;
    border: none;
    color: #a5b4fc;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
  }

  .aMobileNav__logout {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 0 8px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.32);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
  }

  /* Panel title adjustments */
  .aPanel__title {
    font-size: 18px;
  }

  .aPanel__header {
    margin-bottom: 16px;
  }

  /* Stats cards: single column */
  .aStatCards {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .aStatCard {
    padding: 18px 16px;
  }

  .aStatCard__val {
    font-size: 28px;
  }

  /* Transactions: labeled-card layout on mobile */
  .aTxTable {
    overflow-x: visible;
    gap: 8px;
  }

  .aTxRow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-width: 0;
    gap: 10px 8px;
    padding: 14px 12px;
  }

  /* Date cell: full width at top */
  .aTxRow .aTxCell:nth-child(1) {
    grid-column: 1 / -1;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 500;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 2px;
  }

  /* Description: full width at bottom */
  .aTxRow .aTxCell:last-child {
    grid-column: 1 / -1;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 6px;
    margin-top: 2px;
  }

  /* Label above each cell value */
  .aTxCell[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.28);
    margin-bottom: 3px;
  }

  .aTxCell--pts {
    font-size: 18px;
    font-weight: 800;
    text-align: right;
  }

  .aTxRow--head {
    display: none;
  }

  .aTxRow--card {
    grid-template-columns: 1fr 1fr;
    min-width: 0;
  }

  .aDash__main {
    overflow-x: hidden;
  }

  /* Client card tweaks */
  .aClientCard {
    padding: 12px;
  }

  .aClientCard__balanceVal {
    font-size: 18px;
  }
}

/* ── Admin QR Page Layout ── */
.aQrPage {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background: #09090b;
  color: #e4e4e7;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}

.aQrPage__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 9, 11, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-shrink: 0;
}

.aQrPage__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms;
  min-width: 60px;
}

.aQrPage__back:hover {
  background: rgba(255, 255, 255, 0.12);
}

.aQrPage__title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}

.aQrPage__body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  gap: 16px;
}

.aQrPage__card {
  width: 100%;
  max-width: 420px;
}

/* ── Mobile Admin Bottom Nav: desktop override ── */
@media (min-width: 641px) {
  .aMobileNav {
    display: none !important;
  }
}

/* Splash Screen Loaders */
.bootSplash {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

body.is-ready .bootSplash {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.bootSplash__logo {
  color: var(--text-strong);
  animation: bootPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes bootPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.95);
  }
}

/* PWA Install Banner */
.installBanner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 16px;
  z-index: 9999;
  transform: translateY(150%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

.installBanner--show {
  transform: translateY(0);
  pointer-events: auto;
}

.installBanner__content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (min-width: 600px) {
  .installBanner {
    bottom: 24px;
    left: 50%;
    width: auto;
    min-width: 360px;
    transform: translate(-50%, 150%);
  }

  .installBanner--show {
    transform: translate(-50%, 0);
  }
}

.installBanner__text {
  flex: 1;
}

.installBanner__title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-strong);
}

.installBanner__desc {
  font-size: 12px;
  color: var(--text-mid);
  margin-top: 2px;
  line-height: 1.3;
}

.installBanner__btn {
  background: var(--focus);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.installBanner__close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 16px;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.installBanner__tutorial {
  padding: 0 16px 12px;
}

.installBanner__video {
  width: 100%;
  max-width: 240px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto;
}

.installBanner__content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  /* If video is present, content looks joined */
  border-radius: 0 0 16px 16px;
}

.installBanner--show {
  display: flex;
  flex-direction: column;
}

/* Adjust if NO video */
.installBanner:not(:has(.installBanner__tutorial:not([hidden]))) .installBanner__content {
  border-top: 1px solid var(--border);
  border-radius: 16px;
}