/* ═══════════════════════════════════════════════════════════════
   PASSMANAGER — MASTER STYLESHEET
   Design: Dark enterprise admin + clean mobile-first public UI
   ═══════════════════════════════════════════════════════════════ */

/* ── FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=JetBrains+Mono:wght@400;700&display=swap');

/* ── CSS VARIABLES ── */
:root {
  /* Admin palette */
  --bg-base: #0d0e17;
  --bg-surface: #13141f;
  --bg-card: #1a1b2e;
  --bg-hover: #21223a;
  --border: rgba(255, 255, 255, 0.07);
  --border-light: rgba(255, 255, 255, 0.12);

  /* Brand */
  --accent: #7c4dff;
  --accent-light: #9d74ff;
  --accent-glow: rgba(124, 77, 255, 0.35);
  --accent-2: #00e5ff;
  --accent-3: #ff4081;

  /* Text */
  --text-primary: #f0f0fa;
  --text-secondary: #9a9bc0;
  --text-muted: #5a5b80;

  /* Status */
  --green: #00c853;
  --green-bg: rgba(0, 200, 83, 0.12);
  --red: #ff1744;
  --red-bg: rgba(255, 23, 68, 0.12);
  --orange: #ff9100;
  --orange-bg: rgba(255, 145, 0, 0.12);
  --blue: #2979ff;
  --blue-bg: rgba(41, 121, 255, 0.12);

  /* Layout */
  --sidebar-w: 260px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.6);

  /* Fonts */
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Public */
  --pub-bg: #f4f1fe;
  --pub-card: #ffffff;
  --pub-text: #1a1a2e;
  --pub-muted: #6b6b8a;
  --pub-accent: #7c4dff;
  --pub-accent-2: #00c9a7;
}

/* ── RESET ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

input,
select,
textarea,
button {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ══════════════════════════════════════════════
   ADMIN LAYOUT
══════════════════════════════════════════════ */
.admin-body {
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  background: var(--accent);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 17px;
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.brand-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-item i {
  width: 18px;
  text-align: center;
  font-size: 15px;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(124, 77, 255, 0.15);
  color: var(--accent-light);
  border-left: 3px solid var(--accent);
  padding-left: 11px;
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.sidebar-footer {
  padding: 12px 16px;
  background: rgba(124, 77, 255, 0.05);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0;
}

.user-meta {
  flex: 1;
  min-width: 0;
}

.user-name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.user-role {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 1px;
}

.logout-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-hover);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: var(--red-bg);
  color: var(--red);
}

/* ── MAIN CONTENT ── */
.admin-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  height: 54px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.sidebar-toggle {
  display: none;
  color: var(--text-secondary);
  font-size: 18px;
  padding: 6px;
}

.header-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.admin-content {
  flex: 1;
  padding: 28px;
  max-width: 1400px;
  width: 100%;
}

.admin-content.p-0 {
  padding: 0;
  max-width: none;
}

/* ── MESSAGES ── */
.messages-container {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  animation: slideDown 0.3s ease;
}

.alert-success {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(0, 200, 83, 0.25);
}

.alert-error {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(255, 23, 68, 0.25);
}

.alert-warning {
  background: var(--orange-bg);
  color: var(--orange);
  border: 1px solid rgba(255, 145, 0, 0.25);
}

.alert-close {
  margin-left: auto;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.7;
  background: none;
  border: none;
  color: inherit;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

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

/* ── STATS GRID ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 16px;
}

.stat-total .stat-icon {
  background: rgba(124, 77, 255, 0.15);
  color: var(--accent-light);
}

.stat-active .stat-icon {
  background: var(--green-bg);
  color: var(--green);
}

.stat-used .stat-icon {
  background: var(--blue-bg);
  color: var(--blue);
}

.stat-expired .stat-icon {
  background: var(--red-bg);
  color: var(--red);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.stat-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── SECTION HEADERS ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ── LOCATIONS GRID ── */
.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.location-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.location-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.location-img {
  height: 160px;
  background-size: cover;
  background-position: center;
}

.location-img-placeholder {
  display: grid;
  place-items: center;
  background: var(--bg-hover);
  color: var(--text-muted);
  font-size: 32px;
}

.location-body {
  padding: 14px;
}

.location-prefix {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.location-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.location-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.location-stats {
  font-size: 12px;
  color: var(--text-secondary);
}

.location-stats i {
  color: var(--accent);
  margin-right: 4px;
}

.location-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ── TABLE ── */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: var(--bg-hover);
  padding: 10px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  white-space: nowrap;
}

.data-table td {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.empty-row {
  text-align: center;
  color: var(--text-muted);
  padding: 32px !important;
}

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
}

.badge-active {
  background: var(--green-bg);
  color: var(--green);
}

.badge-expired {
  background: var(--red-bg);
  color: var(--red);
}

.badge-used {
  background: var(--blue-bg);
  color: var(--blue);
}

.badge-loc {
  background: rgba(124, 77, 255, 0.15);
  color: var(--accent-light);
}

/* ── BUTTONS ── */
.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary.full-width {
  width: 100%;
  justify-content: center;
}

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.btn-primary-sm {
  background: var(--accent);
  color: #fff;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-primary-sm:hover {
  background: var(--accent-light);
}

.btn-secondary-sm {
  background: var(--bg-hover);
  color: var(--text-primary);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-light);
  transition: all 0.2s;
}

.btn-secondary-sm:hover {
  background: var(--bg-card);
  border-color: var(--text-muted);
}

.btn-ghost-sm {
  background: transparent;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-light);
  transition: all 0.2s;
}

.btn-ghost-sm:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-danger-sm {
  background: var(--red-bg);
  color: var(--red);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 23, 68, 0.2);
  transition: all 0.2s;
  font-weight: 600;
}

.btn-danger-sm:hover {
  background: var(--red);
  color: #fff;
}

.btn-success {
  background: var(--green-bg);
  color: var(--green);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(0, 200, 83, 0.3);
  transition: all 0.2s;
}

.btn-success:hover {
  background: var(--green);
  color: #fff;
}

.btn-success-sm {
  background: var(--green-bg);
  color: var(--green);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(0, 200, 83, 0.2);
  transition: all 0.2s;
}

.btn-success-sm:hover {
  background: var(--green);
  color: #fff;
}

.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 23, 68, 0.3);
  transition: all 0.2s;
}

.btn-danger:hover {
  background: var(--red);
  color: #fff;
}

.btn-download-all {
  background: linear-gradient(135deg, #7c4dff 0%, #00e5ff 100%);
  color: #fff;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(124, 77, 255, 0.3);
}

.btn-download-all:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(124, 77, 255, 0.4);
}

.btn-deactivate-light {
  background: rgba(255, 23, 68, 0.1);
  color: #ff1744;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 23, 68, 0.2);
  transition: all 0.2s;
}

.btn-deactivate-light:hover {
  background: rgba(255, 23, 68, 0.2);
  border-color: #ff1744;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-hover);
  color: var(--text-secondary);
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--accent);
  color: #fff;
}

.icon-btn.danger:hover {
  background: var(--red);
  color: #fff;
}

/* ── FORMS ── */
.form-page {
  max-width: 720px;
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.form-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.form-card-header>i {
  width: 48px;
  height: 48px;
  background: rgba(124, 77, 255, 0.15);
  color: var(--accent-light);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.form-card-header h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.form-card-header p {
  font-size: 14px;
  color: var(--text-muted);
}

.styled-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-hover);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group select option {
  background: var(--bg-card);
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.req {
  color: var(--red);
}

.payment-note-preview {
  background: rgba(0, 200, 83, 0.08);
  border: 1px solid rgba(0, 200, 83, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 8px;
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-hover);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.checkbox-item:hover {
  border-color: var(--accent);
}

.checkbox-item input {
  accent-color: var(--accent);
}

/* ── TEMPLATE CARDS ── */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.template-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s;
}

.template-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border-light);
}

.template-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.template-loc-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  background: rgba(124, 77, 255, 0.15);
  color: var(--accent-light);
  padding: 3px 10px;
  border-radius: 6px;
}

.template-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.template-loc-name {
  font-size: 13px;
  color: var(--text-muted);
}

.template-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.template-price {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--accent-light);
}

.template-discount {
  background: rgba(0, 200, 83, 0.12);
  color: var(--green);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.template-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.template-meta i {
  color: var(--accent);
  margin-right: 4px;
}

.template-actions {
  margin-top: 4px;
}

/* ── TEMPLATE DETAIL ── */
.detail-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.qr-card,
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.qr-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.qr-card-header h3,
.info-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.qr-display {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  margin-bottom: 12px;
}

.qr-image {
  width: 180px;
  height: 180px;
  margin: 0 auto;
}

.qr-placeholder {
  width: 180px;
  height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 40px;
  gap: 8px;
  margin: 0 auto;
}

.qr-placeholder p {
  font-size: 13px;
}

.qr-url {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.qr-url code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-2);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  color: var(--text-muted);
  transition: color 0.2s;
  padding: 4px;
}

.copy-btn:hover {
  color: var(--accent-light);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.info-row span {
  color: var(--text-muted);
}

.info-row strong {
  color: var(--text-primary);
}

.internal-notes {
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 14px;
}

.internal-notes label {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.internal-notes p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ── VALIDATE PAGE ── */
.validate-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 640px;
}

.validate-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.validate-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.vtab {
  flex: 1;
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.vtab.active {
  color: var(--accent-light);
  border-bottom-color: var(--accent);
  background: rgba(124, 77, 255, 0.05);
}

.vtab:hover:not(.active) {
  color: var(--text-secondary);
  background: var(--bg-hover);
}

.vtab-content {
  padding: 24px;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-hover);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0 16px;
  transition: border-color 0.2s;
}

.search-input-wrap:focus-within {
  border-color: var(--accent);
}

.search-input-wrap i {
  color: var(--text-muted);
}

.search-input-wrap input {
  flex: 1;
  background: none;
  border: none;
  padding: 12px 0;
  color: var(--text-primary);
  font-size: 16px;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  outline: none;
}

.search-input-wrap.sm .search-input-wrap input {
  font-size: 14px;
}

.filters-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-form select {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 14px;
}

/* ── SCANNER ── */
.scanner-area {
  text-align: center;
}

#scanner-video {
  width: 100%;
  max-width: 320px;
  border-radius: var(--radius-sm);
  display: none;
  margin: 0 auto 12px;
}

.scanner-hint {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.scanner-overlay {
  position: relative;
  display: none;
}

.scanner-frame {
  position: absolute;
  inset: 10%;
  border: 2px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.5);
}

/* ── RESULT PANEL ── */
.result-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  flex-direction: column;
  gap: 20px;
}

.result-empty {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  font-size: 14px;
}

.result-empty i {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
  opacity: 0.4;
}

.status-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
}

.status-active {
  background: var(--green-bg);
  color: var(--green);
}

.status-expired {
  background: var(--red-bg);
  color: var(--red);
}

.status-used {
  background: var(--blue-bg);
  color: var(--blue);
}

.status-error {
  background: var(--orange-bg);
  color: var(--orange);
}

.pass-result-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prc-id {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-light);
  text-align: center;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.prc-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.prc-row span {
  color: var(--text-muted);
}

.prc-row strong {
  color: var(--text-primary);
}

.result-actions {
  display: flex;
  gap: 10px;
}

.action-btn {
  flex: 1;
  justify-content: center;
}

.action-note {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 12px;
}

.error-msg {
  color: var(--red);
  text-align: center;
  padding: 16px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── ANALYTICS ── */
.analytics-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.chart-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
}

.progress-bar {
  display: inline-block;
  width: 80px;
  height: 6px;
  background: var(--bg-hover);
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}

/* ── EMPTY STATES ── */
.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  grid-column: 1/-1;
}

.empty-state i {
  font-size: 40px;
  margin-bottom: 12px;
  display: block;
}

.empty-full {
  grid-column: 1/-1;
  text-align: center;
  padding: 60px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-full i {
  font-size: 56px;
  opacity: 0.3;
}

.empty-full h3 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text-primary);
}

.empty-full p {
  font-size: 14px;
}

/* ── PASS ID CODE ── */
.pass-id {
  font-family: var(--font-mono);
  font-size: 13px;
  background: rgba(124, 77, 255, 0.12);
  color: var(--accent-light);
  padding: 3px 8px;
  border-radius: 4px;
}

.actions-cell {
  white-space: nowrap;
  display: flex;
  gap: 6px;
  align-items: center;
}

.current-image {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.current-image img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.current-image span {
  font-size: 12px;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════════════ */
.login-body {
  background: var(--bg-base);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  width: 100%;
}

.login-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.2;
}

.login-orb-1 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  top: -100px;
  left: -100px;
}

.login-orb-2 {
  width: 300px;
  height: 300px;
  background: var(--accent-2);
  bottom: -80px;
  right: -80px;
}

.login-orb-3 {
  width: 200px;
  height: 200px;
  background: var(--accent-3);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.4s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.login-brand {
  text-align: center;
  margin-bottom: 32px;
}

.login-icon {
  width: 64px;
  height: 64px;
  background: var(--accent);
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 28px;
  color: #fff;
  margin: 0 auto 16px;
  box-shadow: 0 8px 32px var(--accent-glow);
}

.login-brand h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.login-brand p {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.login-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 13px;
}

.login-alert-error {
  background: var(--red-bg);
  color: var(--red);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-form .form-group label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.login-form .form-group input {
  width: 100%;
  background: var(--bg-hover);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form .form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  width: 100%;
  padding-right: 44px;
}

.pwd-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
}

.login-submit {
  width: 100%;
  background: var(--accent);
  color: #fff;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}

.login-submit:hover {
  background: var(--accent-light);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.login-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 24px;
}

/* ══════════════════════════════════════════════
   PUBLIC PAGES (Pass Generation + View)
══════════════════════════════════════════════ */
.public-body {
  background: var(--pub-bg);
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--pub-text);
}

.public-page {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px 16px 48px;
  min-height: 100vh;
  transition: max-width 0.3s ease;
}

.public-page.landscape {
  max-width: 900px;
}

.public-card {
  background: var(--pub-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

/* ── PUBLIC HEADER ── */
.public-header {
  position: relative;
  height: 180px;
}

.pub-location-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.pub-img-gradient {
  background: linear-gradient(135deg, #7c4dff, #00c9a7);
}

.pub-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.65));
}

.pub-header-content {
  position: absolute;
  inset: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.pub-location-name {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.pub-template-name {
  color: #fff;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
}

.pub-badges {
  display: flex;
  gap: 8px;
}

.pub-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.pub-badge-discount {
  background: #00c853;
  color: #fff;
}

.pub-badge-price {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  backdrop-filter: blur(4px);
}

.pub-description {
  padding: 14px 20px;
  background: rgba(124, 77, 255, 0.05);
  border-bottom: 1px solid rgba(124, 77, 255, 0.1);
  font-size: 13px;
  color: var(--pub-muted);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.pub-description i {
  color: var(--pub-accent);
  margin-top: 2px;
  flex-shrink: 0;
}

.pub-payment-note {
  padding: 12px 20px;
  background: rgba(0, 200, 83, 0.07);
  border-bottom: 1px solid rgba(0, 200, 83, 0.15);
  font-size: 13px;
  color: #00a846;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.pub-errors {
  padding: 0 20px;
}

.pub-error {
  background: rgba(255, 23, 68, 0.07);
  border: 1px solid rgba(255, 23, 68, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

/* ── PUBLIC FORM ── */
.pub-form {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pub-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pub-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--pub-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pub-form-group label i {
  color: var(--pub-accent);
  font-size: 12px;
}

.pub-form-group input,
.pub-form-group textarea {
  width: 100%;
  border: 1.5px solid #e2e0f0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--pub-text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fafafa;
  font-family: var(--font-body);
}

.pub-form-group input:focus,
.pub-form-group textarea:focus {
  border-color: var(--pub-accent);
  box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.12);
  background: #fff;
}

.pub-form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.pub-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #7c4dff, #9d74ff);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 15px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
  box-shadow: 0 4px 20px rgba(124, 77, 255, 0.35);
}

.pub-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(124, 77, 255, 0.45);
}

.pub-submit-btn:active {
  transform: translateY(0);
}

.pub-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.pub-footer-note {
  padding: 12px 20px;
  background: #f8f7ff;
  border-top: 1px solid #ece9ff;
  font-size: 12px;
  color: var(--pub-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ══════════════════════════════════════════════
   PASS VIEW CARD
══════════════════════════════════════════════ */
.pass-card {
  background: var(--pub-card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.15);
  margin-bottom: 16px;
  position: relative;
}

.pass-card-header {
  position: relative;
  height: 160px;
}

.pass-loc-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.pass-loc-gradient {
  background: linear-gradient(135deg, #7c4dff 0%, #00c9a7 100%);
}

.pass-loc-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.7));
}

.pass-header-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
}

.pass-location-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.pass-location-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.pass-location-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 2px;
}

/* Status row */
.pass-status-row {
  padding: 12px 20px;
}

.pass-status-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.pass-status-active {
  background: rgba(0, 200, 83, 0.12);
  color: #00a846;
  border: 1.5px solid rgba(0, 200, 83, 0.25);
}

.pass-status-expired {
  background: rgba(255, 23, 68, 0.08);
  color: #d32f2f;
  border: 1.5px solid rgba(255, 23, 68, 0.2);
}

.pass-status-used {
  background: rgba(41, 121, 255, 0.08);
  color: #1565c0;
  border: 1.5px solid rgba(41, 121, 255, 0.2);
}

/* Pass ID hero */
.pass-id-section {
  text-align: center;
  padding: 12px 20px 20px;
}

.pass-id-label {
  font-size: 11px;
  color: var(--pub-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.pass-id-value {
  font-family: var(--font-mono);
  font-size: 42px;
  font-weight: 700;
  color: var(--pub-accent);
  letter-spacing: 4px;
  line-height: 1;
}

.pass-card.landscape-layout .pass-id-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--pub-accent);
  letter-spacing: 2px;
}

/* Divider */
.pass-divider {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 -1px;
}

.pass-divider-line {
  flex: 1;
  border-top: 2px dashed #e0ddf5;
}

.pass-divider-circle {
  width: 22px;
  height: 22px;
  background: var(--pub-bg);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1.5px #d5d0ef;
}

/* Details grid */
.pass-details-grid {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pass-detail-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pass-detail-item.full-width {
  grid-column: 1/-1;
}

.pd-label {
  font-size: 11px;
  color: var(--pub-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pd-label i {
  font-size: 10px;
}

.pd-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--pub-text);
}

.pd-highlight {
  color: var(--pub-accent);
  font-family: var(--font-display);
  font-size: 17px;
}

/* Payment note */
.pass-payment-note {
  margin: 0 20px 20px;
  background: rgba(0, 200, 83, 0.07);
  border: 1px solid rgba(0, 200, 83, 0.18);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #00a846;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

/* Pass QR */
.pass-qr-section {
  text-align: center;
  padding: 0 20px 20px;
}

.pass-qr-label {
  font-size: 11px;
  color: var(--pub-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.pass-qr-img {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  border-radius: 10px;
}

/* ── PASS ACTIONS ── */
.pass-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.pass-action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-dl {
  background: rgba(124, 77, 255, 0.1);
  color: var(--pub-accent);
}

.btn-wa {
  background: rgba(37, 211, 102, 0.1);
  color: #075e54;
}

.btn-copy {
  background: rgba(0, 0, 0, 0.05);
  color: var(--pub-muted);
}

.pass-action-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.pass-action-btn i {
  font-size: 20px;
}

.pass-disclaimer {
  text-align: center;
  font-size: 12px;
  color: var(--pub-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ── LIMIT REACHED ── */
.limit-icon {
  font-size: 60px;
  color: var(--red);
  margin: 32px auto 16px;
  text-align: center;
}

.limit-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  padding: 0 20px;
}

.limit-desc {
  font-size: 14px;
  color: var(--pub-muted);
  text-align: center;
  padding: 0 24px;
  margin-bottom: 16px;
}

.limit-meta {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 13px;
  color: var(--pub-muted);
  margin-bottom: 16px;
}

.limit-contact {
  text-align: center;
  font-size: 13px;
  color: var(--pub-muted);
  padding: 0 24px 32px;
}

.text-center {
  text-align: center;
}

/* ── TOAST ── */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a1a2e;
  color: #fff;
  padding: 12px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s;
  z-index: 9999;
  white-space: nowrap;
  box-shadow: var(--shadow);
}

.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: block;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .admin-content {
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .data-table {
    font-size: 13px;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
  }

  .public-page {
    padding: 12px 12px 40px;
  }

  .pass-id-value {
    font-size: 34px;
  }

  .pass-details-grid {
    grid-template-columns: 1fr;
  }

  .pass-actions {
    flex-wrap: wrap;
  }

  .pass-action-btn {
    min-width: 30%;
  }
}

/* ── OVERLAY (mobile sidebar) ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
}

.sidebar-overlay.show {
  display: block;
}




/* ═══════════════════════════════════════════════════════
   NEW STYLES FOR COMBO PASS + LOCATION ADMIN
═══════════════════════════════════════════════════════ */

/* Location badge bar (shown to location admins) */
.location-badge-bar {
  background: rgba(124, 77, 255, 0.08);
  border: 1px solid rgba(124, 77, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--accent-light);
}

.location-badge-bar i {
  font-size: 16px;
}

/* "What's included" block on generate form */
.pub-included {
  padding: 16px 20px;
  background: rgba(124, 77, 255, 0.04);
  border-bottom: 1px solid rgba(124, 77, 255, 0.1);
}

.pub-included-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--pub-accent);
  margin-bottom: 10px;
}

.pub-included-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pub-loc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #e2e0f0;
  border-radius: 20px;
  padding: 4px 10px 4px 4px;
  font-size: 12px;
  color: var(--pub-text);
}

.pub-loc-chip-prefix {
  background: var(--pub-accent);
  color: #fff;
  padding: 2px 7px;
  border-radius: 14px;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
}

/* Progress on pass view */
.pass-progress-section {
  padding: 0 20px 16px;
}

.pass-progress-bar {
  height: 10px;
  background: #f0ecff;
  border-radius: 5px;
  overflow: hidden;
}

.pass-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c4dff, #00c9a7);
  border-radius: 5px;
  transition: width 0.5s;
}

.pass-progress-text {
  text-align: center;
  font-size: 12px;
  color: var(--pub-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 6 QR codes grid on pass */
.pass-locations-section {
  padding: 0 20px 20px;
  border-top: 2px dashed #e0ddf5;
  padding-top: 20px;
}

.pass-locations-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--pub-accent);
  text-align: center;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

.pass-location-qr {
  background: #faf9ff;
  border: 1.5px solid #e8e5ff;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s;
}

.pass-location-qr.loc-done {
  background: rgba(0, 200, 83, 0.05);
  border-color: rgba(0, 200, 83, 0.3);
}

.loc-qr-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.loc-qr-prefix {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  background: var(--pub-accent);
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.loc-qr-status {
  font-size: 10px;
  font-weight: 700;
  color: var(--pub-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.loc-qr-status.done {
  color: #00a846;
}

.loc-qr-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--pub-text);
  line-height: 1.3;
  min-height: 31px;
}

.loc-qr-image-wrap {
  position: relative;
  background: #fff;
  border-radius: 8px;
  padding: 6px;
}

.loc-qr-img {
  width: 100%;
  display: block;
}

.loc-qr-missing {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: #c5c0e0;
  font-size: 36px;
}

.loc-qr-overlay {
  position: absolute;
  inset: 6px;
  background: rgba(0, 200, 83, 0.9);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 40px;
}

.loc-qr-overlay-text {
  font-size: 11px;
  margin-top: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
}

.loc-qr-footer {
  font-size: 10px;
  color: var(--pub-muted);
  text-align: center;
}

/* Scan result page */
.scan-result-page {
  max-width: 640px;
}

.scan-result-card,
.scan-error-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.scan-error-card {
  text-align: center;
}

.scan-error-icon {
  font-size: 48px;
  color: var(--red);
  margin-bottom: 16px;
}

.scan-error-card h2 {
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 8px;
}

.scan-error-card p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.scan-pass-header {
  text-align: center;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.scan-pass-id {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-light);
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.scan-pass-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.scan-pass-phone {
  font-size: 13px;
  color: var(--text-muted);
}

.scan-location-bar {
  background: rgba(124, 77, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 14px;
}

.scan-location-bar strong {
  flex: 1;
  color: var(--text-primary);
}

.scan-prefix-badge {
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
}

.scan-progress {
  margin: 18px 0;
}

.scan-progress-label {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.scan-progress-bar {
  height: 8px;
  background: var(--bg-hover);
  border-radius: 4px;
  overflow: hidden;
}

.scan-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 4px;
  transition: width 0.5s;
}

.scan-action-form {
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.scan-action-form .form-row {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-success.big {
  padding: 14px;
  font-size: 15px;
  width: 100%;
  justify-content: center;
}

.scan-visit-info {
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 14px;
}

.scan-all-visits {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.scan-all-visits h4 {
  font-family: var(--font-display);
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.scan-visits-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scan-visit-row {
  display: grid;
  grid-template-columns: 36px 1fr 30px;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.scan-visit-row.done {
  background: rgba(0, 200, 83, 0.08);
  color: var(--green);
}

.scan-visit-row.current {
  border-left: 3px solid var(--accent);
  padding-left: 9px;
}

.svr-prefix {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  text-align: center;
}

.scan-visit-row.done .svr-prefix {
  background: var(--green);
}

.svr-status {
  text-align: right;
}

/* Visit rows in validate results */
.visits-breakdown {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.visits-breakdown h4 {
  font-family: var(--font-display);
  font-size: 13px;
  margin-bottom: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.visit-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 13px;
}

.visit-row.done {
  background: rgba(0, 200, 83, 0.08);
}

.visit-row.locked {
  opacity: 0.5;
}

.vr-prefix {
  font-family: var(--font-mono);
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  text-align: center;
}

.vr-name {
  color: var(--text-primary);
}


/* ── LANDSCAPE PASS VIEW ── */
.pass-card.landscape-layout {
  display: flex;
  flex-direction: row;
  width: 850px;
  height: 420px;
  min-height: auto;
  max-height: none;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.18);
  background: #fff;
  transform-origin: top left;
  margin: 0 auto;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.pass-card.landscape-layout::before,
.pass-card.landscape-layout::after {
  content: '';
  position: absolute;
  left: 212px;
  width: 36px;
  height: 36px;
  background: var(--pub-bg);
  border-radius: 50%;
  z-index: 10;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.pass-card.landscape-layout::before {
  top: -18px;
}

.pass-card.landscape-layout::after {
  bottom: -18px;
}

/* Scaler container to handle mobile */
.public-page.landscape {
  max-width: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  padding: 20px 10px;
}

.pass-card.landscape-layout .pass-card-header {
  width: 230px;
  height: 420px;
  flex-shrink: 0;
  position: relative;
  background: linear-gradient(160deg, #1a1b2e 0%, #2a2c4e 100%);
  border-right: 2px dashed #e0ddf5;
}

.pass-card.landscape-layout .pass-header-text {
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  text-align: center;
  align-items: center;
}

.pass-sidebar-top {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

.pass-sidebar-middle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;


}

.pass-template-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pass-discount-ad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ad-badge {
  font-size: 9px;
  font-weight: 800;
  color: var(--accent-light);
  letter-spacing: 1px;
}

.ad-value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--green);
}

.pass-sidebar-bottom {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  backdrop-filter: blur(4px);
  width: 100%;
}

.pass-discount-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #00c853;
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  margin-top: 10px;
  width: fit-content;
  box-shadow: 0 4px 12px rgba(0, 200, 83, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.pass-card.landscape-layout .pass-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

.pass-card.landscape-layout .pass-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  background: #fafaff;
  border-bottom: 1px solid #f0ecff;
}

.pass-card.landscape-layout .pass-id-section {
  padding: 0;
  text-align: left;
}

.pass-card.landscape-layout .pass-id-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--pub-accent);
  letter-spacing: 2px;
}

.pass-card.landscape-layout .pass-status-row {
  padding: 0;
}

.pass-card.landscape-layout .pass-status-badge {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 100px;
}

.pass-card.landscape-layout .pass-body-split {
  display: grid;
  grid-template-columns: 240px 1fr;
  flex: 1;
  min-height: 0;
}

.pass-card.landscape-layout .pass-details-side {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  border-right: 1px solid #f0f0fa;
}

.pass-card.landscape-layout .pass-qr-side {
  padding: 12px 25px 30px 25px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  box-sizing: border-box;
}

.pass-card.landscape-layout .pass-locations-title {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  color: var(--pub-accent);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  opacity: 0.6;
}

.pass-card.landscape-layout .pass-locations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 8px;
  width: 100%;
  margin: 0 auto;
  align-content: center;
}

.pass-card.landscape-layout .pass-location-qr {
  background: #fff;
  border: 1px solid #f0f0fa;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pass-card.landscape-layout .pass-location-qr:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(124, 77, 255, 0.1);
}

.pass-card.landscape-layout .loc-qr-image-wrap {
  padding: 4px;
  background: #fff;
  border-radius: 8px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.pass-card.landscape-layout .loc-qr-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  max-width: 75px;
  object-fit: contain;
}

.pass-card.landscape-layout .loc-qr-name {
  font-size: 8px;
  font-weight: 700;
  color: var(--pub-muted);
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 22px;
  line-height: 1.2;
}

.pass-card.landscape-layout .loc-qr-header {
  width: 100%;
  display: flex;
  justify-content: center;
}

.pass-card.landscape-layout .loc-qr-overlay {
  font-size: 24px;
}

.pass-card.landscape-layout .pass-progress-section {
  padding: 0;
  margin-top: auto;
}

.pass-card.landscape-layout .pass-payment-note {
  margin-top: auto;
  padding: 10px;
  background: rgba(0, 200, 83, 0.05);
  border-radius: 8px;
  font-size: 10px;
}

/* Mobile Responsive Landscape */
@media (max-width: 860px) {
  .public-page.landscape {
    padding: 10px;
    align-items: center;
  }

  .pass-card.landscape-layout {
    /* Auto-scale the fixed-size card to fit screen width */
    --scale: calc((100vw - 20px) / 850);
    transform: scale(var(--scale));
    margin-bottom: calc(420px * (var(--scale) - 1) + 20px);
    margin-left: calc(850px * (var(--scale) - 1) / 2);
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .pass-card.landscape-layout {
    --scale-h: calc((100vh - 80px) / 420);
    transform: scale(var(--scale-h));
    margin-bottom: calc(420px * (var(--scale-h) - 1) + 10px);
  }
}

/* Print Landscape */
@media print {
  @page {
    size: landscape;
  }

  .public-page {
    padding: 0;
    max-width: 100% !important;
  }

  .pass-actions,
  .pass-disclaimer {
    display: none;
  }

  .pass-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

.vr-status {
  color: var(--text-muted);
  font-size: 12px;
}

/* Combo pass status colors */
.pass-combo {
  border-top: 4px solid var(--accent);
}