/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
:root {
  --brand-orange: #F47920;
  --brand-orange-dark: #d96610;
  --brand-black: #1a1a1a;
  --brand-gray: #f4f4f4;
  --brand-border: #e2e2e2;
  --brand-text: #1a1a1a;
  --brand-muted: #6b7280;
  /* Shared page background — customer scan, admin shell, and login share this
     so the app feels like one product rather than three. */
  --brand-bg: #f5f7fb;
  color-scheme: light;
  font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--brand-bg);
  color: var(--brand-text);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 40px;
}

/* ── Brand header bar ── */
.brand-header {
  width: 100%;
  background: #fff;
  border-bottom: 2px solid var(--brand-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  margin-bottom: 24px;
}

.brand-header img {
  height: 44px;
  width: auto;
}

/* ── Main card ── */
.card {
  width: 100%;
  max-width: 620px;
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 16px;
  padding: 24px;
  display: grid;
  grid-gap: 20px;
  gap: 20px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

.title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--brand-black);
}

.stack,
.stack-sm {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
}

.stack-sm {
  gap: 6px;
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  color: var(--brand-orange);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.muted {
  color: var(--brand-muted);
}

.small {
  font-size: 0.9rem;
}

/* ── Printer context panel ── */
.panel {
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--brand-gray);
}

.panel.valid {
  border-left: 4px solid var(--brand-orange);
  background: #fff8f2;
}

.panel.warning {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
}

.printer-title {
  margin: 4px 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-black);
}

/* ── Step progress ── */
.progress-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1;
}

.progress-step {
  flex: 1 1;
  height: 4px;
  border-radius: 4px;
  background: var(--brand-border);
  transition: background 0.25s;
}

.progress-step.active {
  background: var(--brand-orange);
}

.progress-label {
  margin: 0;
  font-size: 0.82rem;
  color: var(--brand-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Request type cards ── */
.option-card {
  width: 100%;
  text-align: left;
  border: 1.5px solid var(--brand-border);
  background: white;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

@media (hover: hover) {
  .option-card:hover {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(244,121,32,0.15);
  }
}

.option-card:focus-visible {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(244,121,32,0.15);
  outline: none;
}

.option-card.selected {
  border-color: var(--brand-orange);
  background: #fff8f2;
  box-shadow: 0 0 0 3px rgba(244,121,32,0.15);
}

.option-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.option-text {
  display: grid;
  grid-gap: 3px;
  gap: 3px;
}

.option-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--brand-black);
}

/* ── Chip grid (tap-to-select) ── */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1.5px solid var(--brand-border);
  background: #fff;
  border-radius: 999px;
  padding: 9px 16px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--brand-black);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

@media (hover: hover) {
  .chip:hover {
    border-color: var(--brand-orange);
  }
}

.chip:focus-visible {
  outline: none;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(244,121,32,0.15);
}

.chip.selected {
  border-color: var(--brand-orange);
  background: #fff8f2;
  box-shadow: 0 0 0 2px rgba(244,121,32,0.15);
}

/* Inline text-button for low-emphasis actions like "+ Add a note" */
.link-button {
  align-self: flex-start;
  background: none;
  border: 0;
  color: var(--brand-orange);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

.link-button:hover {
  text-decoration: underline;
}

/* ── Form fields ── */
.field {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
}

.field span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-black);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1.5px solid var(--brand-border);
  border-radius: 10px;
  padding: 11px 13px;
  font: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--brand-black);
  transition: border-color 0.15s;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(244,121,32,0.15);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #b0b7c3;
  opacity: 1;
}

/* ── Buttons ── */
.button {
  border: 0;
  border-radius: 10px;
  padding: 13px 20px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, opacity 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.button.primary {
  background: var(--brand-orange);
  color: #fff;
}

.button.primary:hover:not(:disabled) {
  background: var(--brand-orange-dark);
}

.button.secondary {
  background: #e8e8e8;
  color: var(--brand-black);
}

.button.secondary:hover:not(:disabled) {
  background: #d8d8d8;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.actions .button {
  flex: 1 1;
}

.actions .button.secondary {
  flex: 0 0 auto;
  min-width: 100px;
}

/* ── Error ── */
.error {
  margin: 0;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 0.95rem;
}

/* Inline field-level error message */
.field-error {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: #991b1b;
  font-weight: 500;
}

input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: #f87171 !important;
  outline-color: #f87171;
  background-color: #fff8f8;
}

/* ── Confirmation ── */
.confirmation {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  text-align: center;
  padding: 10px 0;
}

.confirm-icon {
  font-size: 3rem;
  line-height: 1;
}

.confirm-ref {
  display: inline-block;
  background: var(--brand-gray);
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-black);
  letter-spacing: 0.02em;
}

.confirm-phone {
  background: #fff8f2;
  border: 1.5px solid var(--brand-orange);
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  color: var(--brand-black);
}

/* ── Footer ── */
.footer-note {
  color: var(--brand-muted);
  font-size: 0.82rem;
  text-align: center;
  padding-top: 4px;
}

/* ── Honeypot ── */
.honeypot {
  position: absolute;
  left: -9999px;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

@media (max-width: 640px) {
  .brand-header {
    margin-bottom: 0;
  }

  .page {
    padding: 0 0 30px;
  }

  .card {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding: 18px 16px;
  }
}

/* ── QR Scanner ── */
.qrscanner {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 16px;
  padding: 24px;
  display: grid;
  grid-gap: 18px;
  gap: 18px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

.qrs-header {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
}

.qrs-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 0;
}

.qrs-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--brand-border);
  border-top-color: var(--brand-orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes loading-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

.qrs-viewport {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 1 / 1;
}

.qrs-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qrs-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
}

.qrs-frame {
  position: relative;
  width: 62%;
  aspect-ratio: 1 / 1;
}

.qrs-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--brand-orange);
  border-style: solid;
}

.qrs-corner.tl { top: 0; left: 0; border-width: 3px 0 0 3px; border-radius: 4px 0 0 0; }
.qrs-corner.tr { top: 0; right: 0; border-width: 3px 3px 0 0; border-radius: 0 4px 0 0; }
.qrs-corner.bl { bottom: 0; left: 0; border-width: 0 0 3px 3px; border-radius: 0 0 0 4px; }
.qrs-corner.br { bottom: 0; right: 0; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0; }

@media (max-width: 640px) {
  .qrscanner {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    max-width: 100%;
  }
}

/* ── Admin dashboard ──────────────────────────────────────────────────────── */
.admin-root {
  min-height: 100vh;
  background: var(--brand-bg);
}

.admin-nav {
  background: #fff;
  border-bottom: 1px solid var(--brand-border);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--brand-text);
  text-decoration: none;
  font-size: 0.95rem;
}

.admin-brand-logo {
  height: 32px;
  width: auto;
  display: block;
}

.admin-brand-name {
  line-height: 1;
}

.admin-nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
}

.admin-nav-links a {
  color: var(--brand-muted);
  text-decoration: none;
}

.admin-nav-links a:hover {
  color: var(--brand-orange);
}

.admin-user {
  color: var(--brand-muted);
  font-size: 0.8rem;
}

.admin-link-btn {
  background: none;
  border: 1px solid var(--brand-border);
  color: var(--brand-muted);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 0.8rem;
}

.admin-link-btn:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
}

.admin-content {
  max-width: 1200px;
  margin: 0 auto;
}

.admin-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.admin-login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Admin login page (ported reference design + caps-lock detection) ── */
.admin-login-shell {
  min-height: 100vh;
  background: var(--brand-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* Stack wraps the card so the toast can position relative to it. */
.admin-login-stack {
  width: 100%;
  max-width: 380px;
  position: relative;
}

.admin-login-shell .admin-login-card {
  max-width: 100%;
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: 16px;
  padding: 26px 26px 22px;
  box-shadow: 0 1px 2px rgba(2,6,23,0.06);
  gap: 12px;
}

.admin-login-logo-wrap {
  width: 260px;
  height: 56px;
  max-width: 100%;
  margin: 0 auto 14px;
  position: relative;
  line-height: 0;
  overflow: hidden;
}

.admin-login-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.admin-login-title {
  margin: 0;
  text-align: center;
  font-size: 18px;
  letter-spacing: -0.2px;
  color: var(--brand-black);
}

.admin-login-subtitle {
  margin: 0 0 8px;
  text-align: center;
  font-size: 12.5px;
  color: var(--brand-muted);
}

.admin-login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-login-field label {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 12.5px;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.admin-login-field input {
  width: 100%;
  padding: 0.72rem 0.85rem;
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: 12px;
  font: inherit;
  font-size: 13px;
  background: #fff;
  color: var(--brand-black);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-login-field input:focus {
  border-color: rgba(244,121,32,0.45);
  box-shadow: 0 0 0 3px rgba(244,121,32,0.12);
}

.admin-login-input-wrap {
  position: relative;
}

/* Caps Lock pill: hovers above the password input, no layout impact. */
.caps-tooltip {
  position: absolute;
  right: 8px;
  top: -38px;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.1px;
  color: #a16207;
  background: #fffbeb;
  border: 1px solid rgba(245,158,11,0.35);
  box-shadow: 0 6px 18px rgba(2,6,23,0.10);
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(2px);
  transition:
    opacity 0.12s ease,
    transform 0.12s ease,
    visibility 0s linear 0.12s;
}

.caps-tooltip.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 0.12s ease,
    transform 0.12s ease,
    visibility 0s;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.admin-login-btn {
  width: 100%;
  height: 40px;
  margin-top: 8px;
  background: #fff;
  color: rgba(15,23,42,0.85);
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.02s ease;
  box-shadow: 0 1px 2px rgba(2,6,23,0.06);
}

.admin-login-btn:hover:not(:disabled) {
  background: #f7fafc;
  border-color: rgba(15,23,42,0.10);
}

.admin-login-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.admin-login-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Error toast: positioned below the card, doesn't shift form layout. */
.admin-login-warning {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.35;
  background: #fef2f2;
  border: 1px solid rgba(192,57,43,0.25);
  color: #c0392b;
  box-shadow: 0 10px 30px rgba(2,6,23,0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0s linear 0.15s;
}

.admin-login-warning.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0s;
}

@media (max-width: 340px) {
  .admin-login-logo-wrap { width: 220px; height: 47px; }
}

.admin-page {
  padding: 24px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.admin-title {
  margin: 0;
  font-size: 1.5rem;
  color: var(--brand-text);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--brand-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--brand-text);
}

.admin-section {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  padding: 18px 20px;
}

.admin-section-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--brand-text);
}

.admin-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table thead {
  background: #fafafa;
}

.admin-table th,
.admin-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--brand-border);
  vertical-align: top;
}

.admin-table th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--brand-muted);
}

.admin-table tbody tr:hover {
  background: #fafafa;
}

.admin-table a {
  color: var(--brand-orange);
  text-decoration: none;
}

.admin-table a:hover {
  text-decoration: underline;
}

.admin-cell-contact {
  font-size: 0.8rem;
  line-height: 1.4;
}

.admin-cell-error {
  color: #b45309;
  font-size: 0.78rem;
  max-width: 280px;
  word-break: break-word;
}

.admin-link {
  color: var(--brand-orange);
  text-decoration: none;
  font-weight: 500;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.72rem;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  text-transform: capitalize;
  font-weight: 500;
}

.badge.urgent  { background: #fee2e2; color: #991b1b; }
.badge.high    { background: #fef3c7; color: #92400e; }
.badge.normal  { background: #dbeafe; color: #1e40af; }
.badge.low     { background: #f3f4f6; color: #4b5563; }
.badge.synced  { background: #dcfce7; color: #166534; }
.badge.pending { background: #fef3c7; color: #92400e; }
.badge.draft   { background: #f3f4f6; color: #4b5563; }
.badge.submitted { background: #dbeafe; color: #1e40af; }
.badge.sent      { background: #dcfce7; color: #166534; }
.badge.failed    { background: #fee2e2; color: #991b1b; }
.badge.cancelled { background: #f3f4f6; color: #6b7280; }

.admin-breadcrumb {
  margin: 0;
  font-size: 0.85rem;
}

.admin-breadcrumb a {
  color: var(--brand-muted);
  text-decoration: none;
}

.admin-breadcrumb a:hover {
  color: var(--brand-orange);
}

.admin-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-detail-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-crm-retry {
  border-color: #fbbf24;
  background: #fffbeb;
}

.kv-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  grid-gap: 12px;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.88rem;
}

.kv-row:last-child {
  border-bottom: none;
}

.kv-label {
  color: var(--brand-muted);
  font-weight: 500;
}

.kv-value {
  word-break: break-word;
}

.kv-value a {
  color: var(--brand-orange);
  text-decoration: none;
}

.admin-desc {
  background: #f9fafb;
  border-radius: 6px;
  padding: 10px 12px;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.85rem;
  margin: 0;
}

.admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  grid-gap: 8px;
  gap: 8px;
  margin-top: 8px;
}

.admin-photo-grid a {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--brand-border);
}

.admin-photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 640px) {
  .kv-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .admin-nav-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-nav-links {
    justify-content: flex-end;
  }
}

/* ── Admin: toolbar, tabs, search, pagination ───────────────────────────── */
.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.admin-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.admin-tabs .tab {
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: 6px;
  color: var(--brand-muted);
  text-decoration: none;
  border: 1px solid transparent;
}

.admin-tabs .tab:hover {
  background: #f5f5f5;
  color: var(--brand-text);
}

.admin-tabs .tab.active {
  background: var(--brand-orange);
  color: #fff;
  font-weight: 500;
}

.admin-search {
  display: flex;
  gap: 6px;
  align-items: center;
}

.admin-search input[type="search"] {
  padding: 6px 10px;
  border: 1px solid var(--brand-border);
  border-radius: 6px;
  font: inherit;
  font-size: 0.85rem;
  min-width: 200px;
}

.admin-table th.num,
.admin-table td.num {
  text-align: right;
}

.admin-table td.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.admin-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-pager-buttons {
  display: flex;
  gap: 6px;
}

/* Radio rows for the create-tokens / sticker controls forms */
.admin-radio-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid var(--brand-border);
}

.admin-radio-row label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.88rem;
  cursor: pointer;
}

.admin-radio-row input[type="radio"] {
  margin-top: 2px;
  flex-shrink: 0;
}

.admin-code-list {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  padding: 10px 12px;
  border: 1px solid var(--brand-border);
  border-radius: 6px;
  background: #f9fafb;
  resize: vertical;
}

/* ── Stickers: 3 × 11 grid, A4 fixed layout ─────────────────────────────
   A4 = 210mm × 297mm. Sticker = 68.333mm wide × 25mm tall (3 × 68.333 = 205).
   Horizontal: 1.5mm side margin × 2 + 1mm column gap × 2 + 205 = 210 ✓
   Vertical:   6mm top/bottom margin × 2 + 1mm row gap × 10 + 275 = 297 ✓
   On screen the sticker-sheet adds these margins as padding to preview the
   real printable area; @media print delegates them to the @page rule so
   every page (33 stickers) gets the same margins. */
/* ── Sticker design ported from qr-label-generator.html ──
   3 columns × 11 rows = 33 stickers on A4. No column gap (stickers butt up
   horizontally), 1.4mm row gap. Cut at 69.02 × 24.92mm inside each 70 × 25.2mm
   slot. Dark QR plate (#1D1D1D) on the right, label content on the left,
   Montserrat throughout. */
.sticker-sheet {
  display: grid;
  grid-template-columns: repeat(3, 70mm);
  grid-auto-rows: 25.2mm;
  grid-column-gap: 0;
  column-gap: 0;
  grid-row-gap: 1.4mm;
  row-gap: 1.4mm;
  align-content: start;
  justify-content: start;
  padding: 0;
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  margin-top: 16px;
  width: 210mm;
  max-width: 100%;
  overflow: hidden;
}

.sticker {
  width: 70mm;
  height: 25.2mm;
  background: #fff;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  font-family: var(--font-montserrat), 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  border: 1px dashed #e5e5e5; /* on-screen guide only — stripped in @media print below */
}

/* ── Left content area: label-title + label-text + small logo ── */
.sticker-text {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 2.5mm 3mm;
  gap: 1.5mm;
  min-width: 0;
  position: relative;
}

.sticker-help {
  font-family: var(--font-montserrat), 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  font-size: 6pt;
  font-weight: 600;
  color: #363636;
  letter-spacing: 0.5px;
  line-height: 1;
  margin: 0;
  text-transform: uppercase;
}

.sticker-scan {
  font-family: var(--font-montserrat), 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  font-size: 5pt;
  font-weight: 500;
  color: #363636;
  line-height: 1.2;
  margin: 0;
  max-width: 100%;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.sticker-logo {
  height: 3mm;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

/* ── Right side: dark plate framing the QR, ID below in white ── */
.sticker-qr-block {
  width: 23.3mm;
  height: 23.3mm;
  background: #1D1D1D;
  align-self: center;
  margin-right: 0.95mm; /* keeps the plate inside the 70mm slot with a small right margin */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  padding: 0.7mm;
  box-sizing: border-box;
}

.sticker-qr {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sticker-qr svg {
  width: 95%;
  height: 95%;
  display: block;
  background: #fff; /* QR stays black-on-white inside the dark frame */
}

.sticker-id {
  position: absolute;
  bottom: 0.4mm;
  right: 0.8mm;
  font-family: var(--font-montserrat), 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  font-size: 3.5pt;
  letter-spacing: 0.05em;
  font-weight: 500;
  color: #ffffff;
  line-height: 1;
  white-space: nowrap;
}

/* ── Print media ────────────────────────────────────────────────────────── */
@media print {
  body {
    background: #fff !important;
  }
  .no-print {
    display: none !important;
  }
  .admin-root,
  .admin-content,
  .admin-page {
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .admin-breadcrumb,
  .admin-detail-header {
    display: none !important;
  }
  .sticker-sheet {
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    max-width: none !important;
    /* Keep the inter-sticker gaps; outer margins move to @page below. */
    page-break-inside: auto;
  }
  .sticker {
    border: 1px dashed transparent !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  /* Break every 33 stickers (3×11) so each sheet starts on a fresh page. */
  .sticker:nth-child(33n+1) {
    break-before: page;
    page-break-before: always;
  }
  .sticker:first-child {
    break-before: auto;
    page-break-before: auto;
  }
  /* New design fills the full A4 width (3 × 70mm = 210mm), so no page margins.
     Rows fit naturally with their 1.4mm gaps and leave ~5.8mm at the bottom. */
  @page {
    size: 210mm 297mm;
    margin: 0;
  }
}

/* ── Admin: destructive actions ─────────────────────────────────────────── */
.button.danger {
  background: #fff;
  color: #b91c1c;
  border: 1.5px solid #fecaca;
}

.button.danger:hover {
  background: #fef2f2;
  border-color: #f87171;
}

.button.danger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.admin-danger-zone {
  border-color: #fecaca;
  background: #fffaf9;
}

.row-actions {
  display: flex;
  gap: 4px;
  white-space: nowrap;
}

.row-action {
  font-size: 0.75rem;
  padding: 3px 8px;
  border: 1px solid var(--brand-border);
  background: #fff;
  border-radius: 5px;
  color: var(--brand-muted);
  cursor: pointer;
}

.row-action:hover {
  color: var(--brand-text);
  border-color: #9ca3af;
}

.row-action.danger {
  color: #b91c1c;
  border-color: #fecaca;
}

.row-action.danger:hover {
  background: #fef2f2;
  border-color: #f87171;
}

.row-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Photo card with per-photo delete overlay ───────────────────────────── */
.photo-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--brand-border);
}

.photo-card a {
  display: block;
  width: 100%;
  height: 100%;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}

.photo-card:hover .photo-delete,
.photo-delete:focus {
  opacity: 1;
}

.photo-delete:hover {
  background: #b91c1c;
}

.photo-delete:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Admin: token detail page ───────────────────────────────────────────── */
.token-detail-grid {
  display: grid;
  grid-template-columns: minmax(240px, 280px) 1fr;
  grid-gap: 14px;
  gap: 14px;
}

@media (max-width: 720px) {
  .token-detail-grid {
    grid-template-columns: 1fr;
  }
}

.qr-preview {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-preview svg {
  width: 100%;
  max-width: 220px;
  height: auto;
  display: block;
}

.admin-title.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.04em;
}

/* ── Admin: bulk token selection ────────────────────────────────────────── */
.admin-table th.select-cell,
.admin-table td.select-cell {
  width: 32px;
  text-align: center;
  padding-left: 12px;
  padding-right: 4px;
}

.admin-table tr.row-selected td {
  background: #fff7ed;
}

.admin-table tr.row-selected:hover td {
  background: #ffedd5;
}

.bulk-action-bar {
  position: -webkit-sticky;
  position: sticky;
  bottom: 16px;
  z-index: 5;
  margin: 16px auto 0;
  padding: 10px 14px;
  background: #1a1a1a;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 12px;
  width: -moz-fit-content;
  width: fit-content;
  max-width: calc(100% - 40px);
  flex-wrap: wrap;
}

.bulk-action-bar .bulk-count {
  font-size: 0.85rem;
  font-weight: 600;
  padding-right: 6px;
  border-right: 1px solid #444;
}

.bulk-action-bar .button {
  border: none;
}

.bulk-action-bar .button.primary {
  background: var(--brand-orange);
  color: #fff;
}

.bulk-action-bar .button.primary:hover {
  background: var(--brand-orange-dark);
}

.bulk-action-bar .button.secondary {
  background: transparent;
  color: #fff;
  border: 1px solid #555;
}

.bulk-action-bar .button.secondary:hover {
  background: #333;
  color: #fff;
}

/* ── Admin: edit-details form ───────────────────────────────────────────── */
.admin-edit-subhead {
  margin: 8px 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-muted);
}

.admin-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 12px;
  gap: 12px;
}

@media (max-width: 640px) {
  .admin-edit-grid {
    grid-template-columns: 1fr;
  }
}

/* Slightly tighter form fields inside admin sections */
.admin-section .field input,
.admin-section .field select,
.admin-section .field textarea {
  padding: 8px 10px;
  font-size: 0.9rem;
  border-radius: 6px;
}

.admin-section .field span {
  font-size: 0.82rem;
}

/* ── Admin: bulk subcount (off-page selection indicator) ───────────────── */
.bulk-subcount {
  font-size: 0.78rem;
  font-weight: 400;
  color: #d1d5db;
  margin-left: 6px;
}

/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[2].use[1]!./node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[2].use[2]!./node_modules/next/font/google/target.css?{"path":"app\\layout.tsx","import":"Montserrat","arguments":[{"subsets":["latin"],"weight":["400","500","600","700"],"variable":"--font-montserrat","display":"swap"}],"variableName":"montserrat"} ***!
  \**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* cyrillic-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/b1f344208eb4edfe-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/48e2044251ef3125-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/bf24a9759715e608-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/1f173e5e25f3efee-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/904be59b21bd51cb-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/b1f344208eb4edfe-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/48e2044251ef3125-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/bf24a9759715e608-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/1f173e5e25f3efee-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/904be59b21bd51cb-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/b1f344208eb4edfe-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/48e2044251ef3125-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/bf24a9759715e608-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/1f173e5e25f3efee-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/904be59b21bd51cb-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/b1f344208eb4edfe-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/48e2044251ef3125-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/bf24a9759715e608-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/1f173e5e25f3efee-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/904be59b21bd51cb-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: 'Montserrat Fallback';src: local("Arial");ascent-override: 85.79%;descent-override: 22.25%;line-gap-override: 0.00%;size-adjust: 112.83%
}.__className_fca8ee {font-family: 'Montserrat', 'Montserrat Fallback';font-style: normal
}.__variable_fca8ee {--font-montserrat: 'Montserrat', 'Montserrat Fallback'
}

