/* ── Admin MPA — page-specific styles ─────────────────────────────────────── */

/* ── Staff list (admin/staff.html) ── */
.add-staff-form {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 32px;
}
@media (max-width: 520px) {
  .add-staff-form { grid-template-columns: 1fr 1fr; }
  .add-staff-form__btn { grid-column: span 2; }
}
/* .add-staff-select replaced by select.field-input atom (see components.css) */
.add-staff-btn {
  padding: 10px 18px;
  background: var(--teal);
  border: none;
  border-radius: 8px;
  color: var(--black);
  font: 600 0.78rem/1 var(--f-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 150ms;
  white-space: nowrap;
}
.add-staff-btn:active { opacity: 0.8; }

.staff-list { display: flex; flex-direction: column; gap: 2px; }
.staff-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--dim);
  border-radius: 10px;
  cursor: pointer;
  transition: background 120ms;
  text-decoration: none;
  color: inherit;
}
.staff-row:hover { background: var(--surface2); }
.staff-row__info { flex: 1; }
.staff-row__name { font: 600 0.9rem/1 var(--f-body); }
.staff-row__role {
  font: 500 0.72rem/1 var(--f-body);
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 3px;
}
.staff-row__role--manager { color: var(--teal); }
.staff-row__role--admin   { color: var(--wood); }
.staff-row__arrow { color: var(--muted); opacity: 0.45; flex-shrink: 0; }

/* ── Staff detail (admin/staff_detail.html) ── */
.page-header { margin-bottom: 32px; }
.page-title {
  font: 600 1.6rem/1 var(--f-disp);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.page-subtitle {
  font: 500 0.78rem/1 var(--f-body);
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}
.page-subtitle--manager { color: var(--teal); }
.page-subtitle--admin   { color: var(--wood); }

.input-row { display: flex; gap: 8px; align-items: center; }

.pin-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
@media (max-width: 400px) { .pin-row { grid-template-columns: 1fr; } }
.pin-submit {
  width: 100%;
  padding: 11px;
  background: var(--teal);
  border: none;
  border-radius: 8px;
  color: var(--black);
  font: 600 0.78rem/1 var(--f-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 150ms;
}
.pin-submit:active { opacity: 0.8; }

.pin-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 500 0.72rem/1 var(--f-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.pin-status--set   { color: oklch(0.72 0.14 145); }
.pin-status--unset { color: var(--muted); }

/* ── Multi-card tabs (admin/member_detail.html) ── */
.admin-card-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.admin-card-tab {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--dim2);
  background: transparent;
  color: var(--muted);
  font: 600 0.75rem/1 var(--f-body);
  letter-spacing: 0.04em;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  transition: background 120ms, color 120ms, border-color 120ms;
  cursor: pointer;
}
.admin-card-tab:hover {
  background: var(--dim);
  color: var(--white);
}
.admin-card-tab--active {
  background: var(--surface2);
  border-color: oklch(0.64 0.048 204 / 0.30);
  color: var(--white);
}
.admin-card-tab__dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}

/* ── Member detail (admin/member_detail.html) ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  margin-bottom: 20px;
  font: 500 0.8rem/1 var(--f-body);
  color: var(--muted);
  transition: color 120ms;
}
.back-link:hover { color: var(--white); }

.info-card {
  background: var(--surface);
  border: 1px solid var(--dim);
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 12px;
}
.info-card--edit { padding: 20px 24px; }
.info-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.info-card__name {
  font: 600 1.4rem/1 var(--f-disp);
  letter-spacing: 0.03em;
}
.btn-info-edit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--dim2);
  border-radius: 7px;
  color: var(--muted);
  font: 500 0.72rem/1 var(--f-body);
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 120ms, color 120ms;
  min-height: 32px;
}
.btn-info-edit:hover { border-color: var(--teal); color: var(--teal); }
.sec-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sec-label__opt {
  font: 400 0.65rem/1 var(--f-body);
  text-transform: none;
  letter-spacing: 0;
  color: oklch(0.72 0.009 75 / 0.50);
}
.info-card__edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.info-row { display: flex; flex-direction: column; gap: 8px; }
.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 400 0.82rem/1 var(--f-body);
  color: var(--muted);
}
.info-item svg { flex-shrink: 0; color: oklch(0.72 0.009 75 / 0.6); }
.info-item span { color: var(--white); }

.stamp-card {
  background: var(--surface2);
  border: 1px solid oklch(0.64 0.048 204 / 0.18);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 2px 20px oklch(0 0 0 / 0.40);
}

/* ── Shared scan card components (mirrors staff.css) ── */
.scan-stamp-card {
  background: var(--surface2);
  border: 1px solid oklch(0.64 0.048 204 / 0.18);
  border-radius: 16px;
  padding: 16px 18px 18px;
  margin-bottom: 10px;
  box-shadow: 0 2px 16px oklch(0 0 0 / 0.38);
}
.pending-reward-banner {
  background: oklch(0.64 0.048 204 / 0.09);
  border: 1px solid oklch(0.64 0.048 204 / 0.30);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pending-reward-banner__header { display: flex; align-items: center; gap: 10px; }
.pending-reward-banner__icon { color: var(--teal); flex-shrink: 0; }
.pending-reward-banner__title { font: 600 0.88rem/1.2 var(--f-body); color: var(--teal); flex: 1; }
.pending-reward-banner--mega { background: oklch(0.72 0.055 72 / 0.08); border-color: var(--wood); }
.pending-reward-banner--mega .pending-reward-banner__icon,
.pending-reward-banner--mega .pending-reward-banner__title { color: var(--wood); }
.pending-reward-banner__sub { font: 400 0.72rem/1 var(--f-body); color: var(--muted); margin-left: 28px; }
.pending-reward-banner__desc {
  font: 400 0.78rem/1.5 var(--f-body);
  color: var(--white);
  margin-left: 28px;
  padding-top: 6px;
  border-top: 1px solid oklch(0.64 0.048 204 / 0.15);
}
.scan-stamp-card--mega {
  border-color: var(--wood);
  box-shadow: 0 2px 16px oklch(0 0 0 / 0.38), 0 0 0 1px oklch(0.72 0.055 72 / 0.20);
}

/* Mega reward progress badge */
.mega-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 500 0.78rem/1 var(--f-body);
  color: var(--muted);
  padding: 9px 2px 2px;
  margin-bottom: 10px;
}
.mega-badge__icon { color: var(--muted); flex-shrink: 0; opacity: 0.7; }
.mega-badge__title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mega-badge__sep { opacity: 0.4; }
.mega-badge__progress { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.mega-badge--on { color: var(--wood); }
.mega-badge--on .mega-badge__icon { color: var(--wood); opacity: 1; }

.stamp-summary { display: flex; align-items: baseline; gap: 6px; }
.stamp-summary__count { font: 600 2.5rem/1 var(--f-disp); letter-spacing: -0.01em; }
.stamp-summary__of { font: 400 1.1rem/1 var(--f-disp); color: var(--muted); }
.stamp-summary__label { font: 500 0.75rem/1 var(--f-body); color: var(--muted); margin-left: 2px; }
.stamp-actions { display: flex; flex-direction: column; gap: 10px; }
.stamp-row { display: flex; gap: 10px; }
.sr-confirm {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 16px; border-radius: 10px;
  background: oklch(0.64 0.048 204 / 0.10); border: 1px solid oklch(0.64 0.048 204 / 0.28);
  color: var(--teal); font: 600 0.85rem/1 var(--f-body); letter-spacing: 0.02em;
}
.sr-confirm--reward { background: oklch(0.64 0.048 204 / 0.12); border-color: oklch(0.64 0.048 204 / 0.35); color: var(--teal); }
.sr-confirm--mega-reward { background: oklch(0.72 0.055 72 / 0.10); border-color: var(--wood); color: var(--wood); }
@keyframes stamp-pop {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.alert-banner { border-radius: 10px; padding: 12px 14px; font: 500 0.82rem/1.45 var(--f-body); }
.alert-banner--critical { background: var(--alert-bg); border: 1px solid var(--alert-bd); color: var(--alert-tx); margin-bottom: 10px; }
.alert-banner--mega { background: oklch(0.72 0.055 72 / 0.10); border: 1px solid var(--wood); color: var(--wood); margin-bottom: 10px; }
.alert-banner__title { font: 600 0.82rem/1 var(--f-body); margin-bottom: 4px; }
.correction-section {
  border-top: 1px solid var(--dim);
  padding-top: 16px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.correction-label {
  font: 600 0.62rem/1 var(--f-body);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
}
.admin-tx-list { display: flex; flex-direction: column; gap: 0; }
.tx-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--dim); }
.tx-row:last-child { border-bottom: none; }
.tx-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tx-icon--earned   { background: oklch(0.64 0.048 204 / 0.15); color: var(--teal); }
.tx-icon--redeem   { background: oklch(0.64 0.048 204 / 0.08); color: var(--teal); }
.tx-icon--referral { background: oklch(0.72 0.055 72 / 0.12); color: var(--wood); }
.tx-icon--welcome  { background: oklch(0.64 0.048 204 / 0.10); color: var(--teal); }
.tx-info { flex: 1; min-width: 0; }
.tx-title { font: 500 0.88rem/1.2 var(--f-body); }
.tx-sub { font: 400 0.72rem/1 var(--f-body); color: var(--muted); margin-top: 3px; }
.tx-delta { font: 600 1rem/1 var(--f-disp); letter-spacing: 0.02em; flex-shrink: 0; }
.tx-delta--earned   { color: var(--teal); }
.tx-delta--redeem   { color: var(--muted); }
.tx-delta--referral { color: var(--wood); }
.danger-section { border-top: 1px solid var(--dim); padding-top: 16px; margin-top: 4px; }
.card-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.card-tab {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--teal-bd);
  background: oklch(0.97 0.010 75 / 0.04);
  color: var(--muted);
  font: 600 0.72rem/1 var(--f-body);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 120ms, color 120ms, border-color 120ms;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}
.card-tab:hover { background: oklch(0.64 0.048 204 / 0.06); border-color: var(--teal); color: var(--white); }
.card-tab--active { background: oklch(0.64 0.048 204 / 0.12); border-color: var(--teal); color: var(--white); }
.card-tab:active { opacity: 0.75; }
.card-tab__dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }
/* Shared btn system (mirrors staff.css) */
.btn {
  flex: 1;
  min-height: 52px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 600 0.85rem/1 var(--f-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: opacity 120ms;
}
.btn:active { opacity: 0.8; }
.btn--primary { background: var(--teal); color: var(--black); }
.btn--secondary { background: color-mix(in oklch, var(--white) 5%, transparent); border: 1px solid color-mix(in oklch, var(--white) 40%, transparent); color: var(--white); }
.btn--full { width: 100%; }
.btn--outline { background: transparent; border: 1px solid var(--dim2); color: var(--muted); }
.btn--danger-action { background: transparent; border: 1px solid var(--alert-bd); color: var(--alert-tx); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn__count { font: 600 1.2rem/1 var(--f-disp); letter-spacing: 0; }

/* ── Admin nav ── */
.header__nav { display: flex; align-items: center; gap: 4px; }
.header__nav-link {
  font: 500 0.78rem/1 var(--f-body);
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 6px;
  transition: background 120ms, color 120ms;
}
.header__nav-link:hover { background: var(--dim); color: var(--white); }
.header__nav-link:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
button.header__nav-link { background: none; border: none; cursor: pointer; text-align: left; }

/* Nav submenu ("Setări") */
.nav-sub { position: relative; }
.nav-sub__trigger {
  display: flex;
  align-items: center;
  gap: 5px;
}
.nav-sub__trigger svg { transition: transform 150ms ease-out; flex-shrink: 0; }
.nav-sub--open .nav-sub__trigger svg { transform: rotate(180deg); }
.nav-sub__dropdown {
  display: none;
  flex-direction: column;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--surface2);
  border: 1px solid var(--dim2);
  border-radius: 10px;
  padding: 4px;
  min-width: 148px;
  z-index: 200;
  box-shadow: 0 8px 24px -4px oklch(0 0 0 / 0.45);
}
.nav-sub--open .nav-sub__dropdown { display: flex; }
.nav-sub__item {
  display: flex;
  align-items: center;
  font: 500 0.78rem/1 var(--f-body);
  color: var(--muted);
  padding: 7px 10px;
  border-radius: 7px;
  transition: background 100ms, color 100ms;
  white-space: nowrap;
}
.nav-sub__item:hover { background: var(--dim); color: var(--white); }
.nav-sub__item--active { background: var(--dim); color: var(--white); }

/* Nav container — pushed to the right */
.nav-hamburger {
  display: flex;
  align-items: center;
  margin-left: auto;
  position: relative;
}
.nav-toggle-check { display: none; }
.nav-toggle-btn   { display: none; }

/* ── Mobile hamburger (≤780px) ── */
@media (max-width: 780px) {
  .nav-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--muted);
    border: 1px solid var(--dim2);
    background: none;
    transition: background 120ms, color 120ms;
    flex-shrink: 0;
  }
  .nav-toggle-btn:hover { background: var(--dim); color: var(--white); }

  .nav-hamburger .header__nav { display: none; }

  .nav-toggle-check:checked ~ .header__nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--surface2);
    border: 1px solid var(--dim2);
    border-radius: 12px;
    padding: 6px;
    min-width: 148px;
    z-index: 200;
    box-shadow: 0 8px 24px -4px oklch(0 0 0 / 0.45);
  }
  .nav-hamburger .header__nav .header__nav-link {
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    width: 100%;
  }
  /* Mobile: hide submenu trigger, show all sub-items flat */
  .nav-sub__trigger { display: none; }
  .nav-sub__dropdown {
    display: flex !important;
    position: static;
    background: none;
    border: none;
    border-top: 1px solid var(--dim);
    border-radius: 0;
    padding: 2px 0 0;
    min-width: 0;
    box-shadow: none;
    margin-top: 2px;
  }
  .nav-sub__item {
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 7px;
    width: 100%;
  }
}

/* ── Dashboard / member list ── */
.member-count {
  font: 500 0.72rem/1 var(--f-body);
  color: var(--muted);
  letter-spacing: 0.04em;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 24px;
}
@media (min-width: 540px) { .stats { grid-template-columns: repeat(4, 1fr); } }

.member-list { display: flex; flex-direction: column; gap: 2px; }
.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--dim);
  border-radius: 10px;
  cursor: pointer;
  transition: background 120ms var(--ease-out);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.member-row:hover  { background: var(--surface2); }
.member-row:active { background: var(--surface3); }
.member-row--ready {
  background: oklch(0.64 0.048 204 / 0.06);
  border-color: oklch(0.64 0.048 204 / 0.18);
}
.member-row--ready::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--teal);
  border-radius: 2px 0 0 2px;
}
.member-row--ready:hover { background: oklch(0.64 0.048 204 / 0.10); }

.member-info { flex: 1; min-width: 0; }
.member-name {
  font: 600 0.9rem/1 var(--f-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.member-meta { font: 400 0.72rem/1 var(--f-body); color: var(--muted); margin-top: 3px; }
.member-last {
  font: 400 0.72rem/1 var(--f-body);
  color: var(--muted);
  flex-shrink: 0;
  white-space: nowrap;
  display: none;
}
@media (min-width: 560px) { .member-last { display: block; } }
.member-arrow { color: var(--muted); flex-shrink: 0; opacity: 0.45; }

.mini-stamps { display: flex; gap: 2px; flex-shrink: 0; align-items: center; }
.ms {
  width: 18px; height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
@media (min-width: 600px) { .mini-stamps { gap: 3px; } .ms { width: 20px; height: 20px; } }
.ms--earned { background: var(--teal); border: 1px solid var(--teal); }
.ms--empty  { background: transparent; border: 1px solid oklch(0.97 0.010 75 / 0.12); }
.ms--reward { background: transparent; border: 1px dashed oklch(0.97 0.010 75 / 0.18); border-radius: 4px; margin-left: 3px; }
.ms--reward-ready { background: oklch(0.64 0.048 204 / 0.15); border: 1px dashed var(--teal); border-radius: 4px; margin-left: 3px; }

.card-chip {
  font: 600 0.68rem/1 var(--f-body);
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--dim);
  border: 1px solid var(--dim2);
  border-radius: 5px;
  padding: 4px 8px;
  flex-shrink: 0;
  white-space: nowrap;
}
.member-row--ready .card-chip {
  color: var(--teal);
  background: oklch(0.64 0.048 204 / 0.10);
  border-color: oklch(0.64 0.048 204 / 0.22);
}

.reward-badge {
  font: 600 0.65rem/1 var(--f-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  background: oklch(0.64 0.048 204 / 0.12);
  border: 1px solid oklch(0.64 0.048 204 / 0.28);
  border-radius: 4px;
  padding: 3px 7px;
  flex-shrink: 0;
  white-space: nowrap;
}

.header__spacer { flex: 1; }
.header__date {
  font: 500 0.78rem/1 var(--f-body);
  color: var(--muted);
  letter-spacing: 0.02em;
  display: none;
}
@media (min-width: 520px) { .header__date { display: block; } }

.header__nav-link--active { background: var(--dim); color: var(--white); }

/* ── Brand settings (admin/brand.html) ── */
.brand-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font: 500 0.8rem/1 var(--f-body);
  margin-bottom: 4px;
}
.brand-notice--ok {
  background: oklch(0.62 0.14 145 / 0.10);
  color: oklch(0.72 0.14 145);
  border: 1px solid oklch(0.62 0.14 145 / 0.22);
}
.brand-form { display: flex; flex-direction: column; gap: 18px; }
.brand-field { display: flex; flex-direction: column; gap: 6px; }
.brand-label {
  font: 600 11px/1 var(--f-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.brand-hint {
  font: 400 0.72rem/1.4 var(--f-body);
  color: oklch(0.50 0.006 75);
}
.brand-row { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
@media (max-width: 520px) { .brand-row { grid-template-columns: 1fr; } }
.brand-color-row { display: flex; gap: 8px; align-items: center; }
.brand-color-picker {
  width: 44px;
  height: 40px;
  padding: 2px;
  border: 1px solid var(--dim2);
  border-radius: 7px;
  background: var(--surface2);
  cursor: pointer;
  flex-shrink: 0;
}
.brand-color-text { flex: 1; }
.brand-color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--dim2);
  flex-shrink: 0;
}
/* brand-actions after brand-fields: gap already handled by brand-form flex gap;
   when it follows a brand-field sibling the rule below adds a bit more air. */
.brand-actions { display: flex; justify-content: flex-end; }
.brand-field + .brand-actions,
.brand-section .brand-field + .brand-actions { margin-top: 4px; }
.brand-section + .brand-section { border-top: 1px solid var(--dim); padding-top: 20px; margin-top: 8px; }
/* Vertical rhythm between consecutive form fields within a section */
.brand-section .brand-field + .brand-field { margin-top: 12px; }
.brand-form-footer { border-top: 1px solid var(--dim); padding-top: 16px; margin-top: 12px; display: flex; justify-content: flex-end; }
.brand-logos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 520px) { .brand-logos { grid-template-columns: 1fr; } }
.brand-logo-slot { display: flex; flex-direction: column; gap: 10px; }
.brand-logo-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font: 600 12px/1.3 var(--f-body);
  color: var(--white);
}
.brand-logo-sub {
  font: 400 0.72rem/1 var(--f-body);
  color: var(--muted);
}
.brand-logo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  border-radius: 8px;
  border: 1px solid var(--dim2);
}
.brand-logo-preview--theme { background: var(--black); }
.brand-logo-img { max-height: 48px; max-width: 100%; object-fit: contain; }
.brand-logo-img--topbar { max-height: 30px; }
.brand-logo-optional { font-weight: 400; color: var(--muted); font-size: 0.78em; }
.brand-upload-form { display: flex; gap: 8px; align-items: center; }
.brand-upload-label { position: relative; flex: 1; }
.brand-upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}
.brand-upload-btn {
  display: block;
  background: var(--surface2);
  border: 1px solid var(--dim2);
  border-radius: 7px;
  padding: 9px 12px;
  font: 500 0.78rem/1 var(--f-body);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
  cursor: pointer;
  transition: border-color 120ms, color 120ms;
}
.brand-upload-label:hover .brand-upload-btn { border-color: var(--teal); color: var(--white); }

/* ── Theme preset tiles (admin/brand.html) ── */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}
.theme-grid__sep {
  grid-column: 1 / -1;
  height: 1px;
  background: var(--dim2);
  margin: 6px 0;
}

.theme-tile {
  cursor: pointer;
  border-radius: 10px;
  border: 2px solid var(--dim2);
  background: var(--surface2);
  overflow: hidden;
  transition: border-color 150ms;
  display: flex;
  flex-direction: column;
  user-select: none;
}
.theme-tile:hover { border-color: oklch(0.97 0.010 75 / 0.30); }
.theme-tile:has(.theme-tile__radio:checked) {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px oklch(0.64 0.048 204 / 0.25);
}
.theme-tile:has(.theme-tile__radio:checked) .theme-tile__preview::after {
  content: '';
  position: absolute;
  top: 5px; right: 5px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--teal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%230d0d0d' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.theme-tile__preview { position: relative; }

.theme-tile__radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.theme-tile__preview {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.theme-tile__mini {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  padding: 6px 7px 7px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.theme-tile__line {
  height: 3px;
  border-radius: 2px;
  opacity: 0.55;
  flex-shrink: 0;
}

.theme-tile__stamps {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  flex-shrink: 0;
}
.theme-tile__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  box-sizing: border-box;
  flex-shrink: 0;
}
.theme-tile__dot--on {
  border-color: transparent;
}

.theme-tile__cta {
  height: 7px;
  border-radius: 3px;
  width: 52%;
  margin-top: auto;
  flex-shrink: 0;
}

.theme-tile__footer {
  padding: 7px 8px 9px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.theme-tile__name {
  font: 600 0.68rem/1.2 var(--f-body);
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theme-tile__badge {
  font: 500 0.58rem/1 var(--f-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.theme-tile__badge--dark  { color: var(--muted); }
.theme-tile__badge--light { color: var(--wood); }

/* ── Stamp icon picker (admin/brand.html) ── */
.stamp-icon-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.stamp-icon-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.stamp-icon-tile__radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.stamp-icon-tile__circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid transparent;
  transition: border-color 120ms, box-shadow 120ms;
}
.stamp-icon-tile__radio:checked + .stamp-icon-tile__circle {
  border-color: var(--white);
  box-shadow: 0 0 0 2px var(--teal);
}
.stamp-icon-tile__img {
  width: 52%;
  height: 52%;
  object-fit: contain;
}
.stamp-icon-tile__name {
  font: 500 0.64rem/1 var(--f-body);
  color: var(--muted);
  text-align: center;
}
.brand-stamp-preview {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-stamp-img {
  width: 55%;
  height: 55%;
  object-fit: contain;
}
.stamp-upload-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--dim);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stamp-upload-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.stamp-upload-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.stamp-upload-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--white);
}

.hidden { display: none !important; }

/* ── Security & Accounts shared styles ────────────────────────────────────── */
.sec-section { margin-top: 20px; }
.sec-card {
  background: var(--surface);
  border: 1px solid var(--dim);
  border-radius: 12px;
  padding: 20px;
  margin-top: 8px;
}
.sec-card + .sec-card { margin-top: 10px; }
.sec-label {
  font: 600 0.72rem/1 var(--f-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 14px;
}
.sec-desc {
  font: 400 0.82rem/1.55 var(--f-body);
  color: var(--muted);
  margin-bottom: 16px;
}
.sec-form-row { display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.sec-input {
  width: 100%;
  padding: 9px 12px;
  background: var(--surface2);
  border: 1px solid var(--dim2);
  border-radius: 8px;
  font: 400 0.88rem/1 var(--f-body);
  color: var(--white);
  box-sizing: border-box;
  outline: none;
  transition: border-color 150ms;
}
.sec-input:focus { border-color: var(--teal); }
.field__phone-group {
  display: flex;
  align-items: stretch;
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--dim2);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 150ms;
  box-sizing: border-box;
}
.field__phone-group:focus-within { border-color: var(--teal); }
.field__phone-dial {
  position: relative;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--dim2);
  flex-shrink: 0;
}
.field__dial-select {
  background: transparent;
  border: none;
  color: var(--white);
  font: 400 0.88rem/1 var(--f-body);
  padding: 9px 28px 9px 10px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  outline: none;
}
.field__dial-arrow {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
  opacity: 0.6;
}
.field__input--phone {
  background: transparent;
  border: none;
  border-radius: 0;
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  color: var(--white);
  font: 400 0.88rem/1 var(--f-body);
  outline: none;
}
.sec-select {
  width: 100%;
  padding: 9px 12px;
  background: var(--surface2);
  border: 1px solid var(--dim2);
  border-radius: 8px;
  font: 400 0.88rem/1 var(--f-body);
  color: var(--white);
  box-sizing: border-box;
  outline: none;
  cursor: pointer;
}
.sec-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font: 600 0.82rem/1 var(--f-body);
  cursor: pointer;
  transition: opacity 120ms;
  width: fit-content;
  margin-top: 4px;
}
.sec-btn:hover { opacity: 0.85; }
.sec-btn--primary { background: var(--teal); color: oklch(0.13 0.005 204); }
.sec-btn--danger  { background: oklch(0.62 0.15 25); color: #fff; }
.sec-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font: 500 0.82rem/1.4 var(--f-body);
  margin-bottom: 14px;
}
.sec-notice--ok  { background: oklch(0.72 0.14 165 / 0.1); color: oklch(0.72 0.14 165); border: 1px solid oklch(0.72 0.14 165 / 0.2); }
.sec-notice--err { background: oklch(0.62 0.15 25 / 0.1); color: oklch(0.72 0.12 25); border: 1px solid oklch(0.62 0.15 25 / 0.2); }

/* Lock status chip (security page) */
.lock-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 0.78rem/1 var(--f-body);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.lock-status--ok   { background: oklch(0.72 0.14 165 / 0.1); color: oklch(0.72 0.14 165); }
.lock-status--warn { background: oklch(0.82 0.12 70 / 0.12); color: oklch(0.82 0.12 70); }

/* ── Accounts page ─────────────────────────────────────────────────────────── */

/* Role badges */
.acc-role {
  display: inline-block;
  font: 600 0.68rem/1 var(--f-body);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 20px;
}
.acc-role--owner { background: oklch(0.64 0.048 204 / 0.15); color: oklch(0.64 0.048 204); }
.acc-role--admin { background: oklch(0.72 0.009 75 / 0.12); color: var(--muted); }

/* "you" badge */
.acc-you {
  font: 500 0.66rem/1 var(--f-body);
  color: oklch(0.64 0.048 204);
  letter-spacing: 0.04em;
}

/* Status dot */
.acc-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.acc-dot--active   { background: oklch(0.72 0.14 165); }
.acc-dot--inactive { background: var(--dim2); }

/* Account list */
.acc-list { display: flex; flex-direction: column; }
.acc-item { border-top: 1px solid var(--dim); }
.acc-item:first-child { border-top: none; }
.acc-item__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.acc-item__info { flex: 1; min-width: 0; }
.acc-item__name {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 600 0.88rem/1 var(--f-body);
  color: var(--white);
}
.acc-item__email {
  font: 400 0.78rem/1 var(--f-body);
  color: var(--muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acc-item__badges { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

/* Kebab menu */
.acc-menu { position: relative; flex-shrink: 0; }
.acc-menu__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 120ms, background 120ms, border-color 120ms;
}
.acc-menu__btn:hover { background: var(--surface2); border-color: var(--dim); color: var(--white); }
.acc-menu__dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--surface2);
  border: 1px solid var(--dim2);
  border-radius: 8px;
  min-width: 168px;
  z-index: 50;
  overflow: hidden;
  box-shadow: 0 8px 24px oklch(0 0 0 / 0.35);
}
.acc-menu__dropdown[hidden] { display: none; }
.acc-menu__item {
  width: 100%;
  padding: 9px 14px;
  text-align: left;
  background: none;
  border: none;
  font: 400 0.84rem/1 var(--f-body);
  color: var(--white);
  cursor: pointer;
  display: block;
  transition: background 100ms;
}
.acc-menu__item:hover { background: var(--dim); }
.acc-menu__item--danger { color: oklch(0.72 0.12 25); }
.acc-menu__item--danger:hover { background: oklch(0.62 0.15 25 / 0.12); color: oklch(0.82 0.12 25); }

/* Inline edit / password panels */
.acc-edit-panel {
  border-top: 1px solid var(--dim);
  padding: 14px 16px;
  background: var(--surface2);
  border-radius: 0 0 11px 11px;
}
.acc-edit-panel[hidden] { display: none; }
.acc-pw-panel {
  border-top: 1px solid var(--dim);
  padding: 14px 16px;
  background: var(--surface2);
  border-radius: 0 0 11px 11px;
}
.acc-pw-panel[hidden] { display: none; }
.acc-panel-grid { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.acc-panel-field { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 6px; }
.acc-panel-label {
  font: 600 0.68rem/1 var(--f-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.acc-panel-actions { display: flex; gap: 8px; align-items: flex-end; padding-bottom: 1px; }

/* Button size and ghost modifiers */
.sec-btn--sm { padding: 7px 13px; font-size: 0.78rem; margin-top: 0; }
.sec-btn--ghost {
  background: transparent;
  border: 1px solid var(--dim2);
  color: var(--muted);
}
.sec-btn--ghost:hover { opacity: 1; color: var(--white); border-color: oklch(0.97 0.010 75 / 0.3); }

/* Add account form */
.acc-add-form { display: flex; flex-direction: column; gap: 12px; }
.acc-add-row { display: flex; gap: 10px; }
.acc-add-field { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.acc-add-field--narrow { flex: 0 0 140px; }
.acc-add-label {
  font: 600 0.68rem/1 var(--f-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
@media (max-width: 520px) {
  .acc-add-row { flex-direction: column; }
  .acc-add-field--narrow { flex: none; }
}

/* ── Shared dashboard / detail components ──────────────────────────────────── */

/* KPI colour modifiers (shared between dashboard and promotion detail) */
.kpi--teal .kpi__value { color: var(--teal); }
.kpi--wood .kpi__value { color: var(--wood); }
.kpi--warn .kpi__value { color: var(--warn); }

/* Chart card */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--dim);
  border-radius: 12px;
  padding: 18px 16px 14px;
  min-width: 0;
}
.chart-card__title {
  font: 600 0.72rem/1 var(--f-body);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 14px;
}
.chart-wrap { position: relative; height: 140px; overflow: hidden; width: 100%; }
.chart-wrap canvas { display: block; }

/* Section header */
.dash-section-hd {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.dash-section-hd h2 {
  font: 600 0.72rem/1 var(--f-body);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}

/* ── Alert banner: success variant ───────────────────────────────────────── */
.alert-banner--success {
  background: oklch(0.42 0.06 204 / 0.15);
  border: 1px solid oklch(0.64 0.048 204 / 0.35);
  color: oklch(0.80 0.04 204);
}

/* ── Member merge ─────────────────────────────────────────────────────────── */
.merge-section {
  border-top: 1px solid var(--dim);
  padding-top: 16px;
  margin-top: 4px;
}
.btn-history-admin {
  display: flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid var(--dim2);
  color: var(--muted);
  font: 500 0.80rem/1 var(--f-body);
  padding: 10px 14px;
  border-radius: 8px;
  width: 100%;
  justify-content: center;
  text-decoration: none;
  transition: border-color 120ms, color 120ms;
  min-height: 44px;
  margin-top: 4px;
}
.btn-history-admin:hover { border-color: var(--teal); color: var(--teal); }

.page > .page-title { font: 600 1.1rem/1 var(--f-disp); letter-spacing: 0.03em; margin-bottom: 16px; }
.admin-tx-empty { font: 400 0.84rem/1 var(--f-body); color: var(--muted); padding: 16px 0; }
.btn-load-more-admin {
  display: block;
  text-align: center;
  padding: 12px;
  margin-top: 8px;
  border: 1px solid var(--dim2);
  border-radius: 8px;
  color: var(--muted);
  font: 500 0.80rem/1 var(--f-body);
  text-decoration: none;
  transition: border-color 120ms, color 120ms;
}
.btn-load-more-admin:hover { border-color: var(--teal); color: var(--teal); }

.btn-merge {
  display: flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid var(--dim2);
  color: var(--muted);
  font: 500 0.80rem/1 var(--f-body);
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  transition: border-color 120ms, color 120ms;
  min-height: 44px;
}
.btn-merge:hover { border-color: var(--teal); color: var(--teal); }

.merge-section--open { display: flex; flex-direction: column; gap: 10px; }

.merge-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.merge-panel__title {
  font: 600 0.72rem/1 var(--f-body);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
}
.merge-section .btn-cancel {
  background: transparent;
  border: none;
  color: var(--muted);
  font: 500 0.78rem/1 var(--f-body);
  cursor: pointer;
  padding: 4px 0;
}
.merge-section .btn-cancel:hover { color: var(--white); }

.merge-search-input { width: 100%; }

.merge-results { margin-top: 2px; }
.merge-results ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
ul.merge-results { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.merge-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 100ms, border-color 100ms;
  min-height: 44px;
  justify-content: center;
}
.merge-result:hover { background: var(--dim); border-color: var(--dim); }
.merge-result__name { font: 500 0.84rem/1.2 var(--f-body); color: var(--white); }
.merge-result__sub  { font: 400 0.74rem/1 var(--f-body); color: var(--muted); }
.merge-empty { font: 400 0.80rem/1 var(--f-body); color: var(--muted); text-align: center; padding: 12px 0; }

.merge-preview {
  border: 1px solid var(--dim);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.merge-preview__who { display: flex; flex-direction: column; gap: 3px; }
.merge-preview__label {
  font: 600 0.62rem/1 var(--f-body);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
}
.merge-preview__name { font: 600 0.90rem/1.2 var(--f-body); color: var(--white); }
.merge-preview__detail { font: 400 0.78rem/1 var(--f-body); color: var(--muted); }
.merge-preview__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  border-top: 1px solid var(--dim);
  padding-top: 8px;
}
.merge-preview__key { font: 400 0.78rem/1 var(--f-body); color: var(--muted); }
.merge-preview__val { font: 600 0.82rem/1 var(--f-body); color: var(--white); }
.merge-preview__cards { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--dim); padding-top: 8px; }
.merge-preview__card {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.merge-preview__promo { font: 400 0.78rem/1 var(--f-body); color: var(--muted); }
.merge-preview__stamps { font: 600 0.78rem/1 var(--f-body); color: var(--white); }
.merge-preview__note {
  font: 400 0.74rem/1.4 var(--f-body);
  color: var(--muted);
  border-top: 1px solid var(--dim);
  padding-top: 8px;
  margin: 0;
}
.merge-preview__actions { margin-top: 2px; }
.acc-pw-input:focus { border-color: var(--teal); }
