/* ==========================================================================
   MUKERDA TDA PINRANG — Pendaftaran Peserta & E-Ticket Barcode Absensi
   Event Date: 1 Desember 2026
   Tema: Biru Konstelasi Bintang TDA Pinrang
   ========================================================================== */

:root {
  --bg-page: #0347a6;
  --bg-card: rgba(255, 255, 255, 0.97);
  --bg-subtle: #f0f7ff;
  --bg-input: #f8fafc;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --border-light: #e2e8f0;
  --border-blue: #bfdbfe;

  --brand-primary: #0353b8;
  --brand-primary-hover: #023e8a;
  --brand-light: #dbeafe;
  --brand-dark: #022c6b;

  --gold: #f59e0b;
  --gold-dark: #b45309;
  --gold-bg: #fffbeb;

  --success: #059669;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(2, 32, 85, 0.1);
  --shadow-md: 0 14px 34px -8px rgba(2, 26, 74, 0.3), 0 4px 12px -2px rgba(2, 26, 74, 0.14);
  --shadow-lg: 0 24px 52px -12px rgba(2, 22, 66, 0.44);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #0347a6;
  background-image:
    radial-gradient(ellipse 46% 36% at 18% 12%, rgba(163, 217, 119, 0.38) 0%, rgba(110, 195, 130, 0.14) 44%, rgba(3, 71, 166, 0) 76%),
    radial-gradient(ellipse 44% 38% at 88% 88%, rgba(245, 158, 11, 0.24) 0%, rgba(56, 152, 168, 0.12) 45%, rgba(3, 71, 166, 0) 76%),
    linear-gradient(165deg, #0b4ea2 0%, #0246a4 46%, #0044a8 74%, #0753ad 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

#constellationCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   TOP NAVIGATION BAR
   ========================================================================== */
.topbar {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 18px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffffff;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: #022c6b;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
  flex-shrink: 0;
}

.brand-text-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.brand-text-sub {
  font-size: 12px;
  color: rgba(219, 234, 254, 0.88);
  font-weight: 500;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.nav-pill:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  transform: translateY(-1px);
}

.nav-pill.active {
  background: #ffffff;
  color: var(--brand-primary);
  border-color: #ffffff;
}

/* ==========================================================================
   HERO HEADER (REGISTRATION PAGE)
   ========================================================================== */
.hero-header {
  text-align: center;
  max-width: 720px;
  margin: 10px auto 24px;
  padding: 0 20px;
  color: #ffffff;
}

.event-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fde68a;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  margin-bottom: 14px;
}

.event-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.25);
}

.hero-title {
  margin: 0 0 10px;
  font-size: clamp(26px, 4.8vw, 40px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-shadow: 0 4px 18px rgba(2, 26, 74, 0.35);
}

.hero-title span {
  color: #fde047;
}

.hero-subtitle {
  margin: 0 auto 18px;
  max-width: 580px;
  font-size: 15px;
  color: rgba(224, 242, 254, 0.92);
  font-weight: 400;
}

.event-meta-strip {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 12px;
  background: rgba(2, 30, 82, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.meta-chip svg {
  width: 16px;
  height: 16px;
  color: #fbbf24;
  flex-shrink: 0;
}

/* ==========================================================================
   MAIN CONTAINER & CARDS
   ========================================================================== */
.main-container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 48px;
  flex: 1;
}

.main-container.wide {
  max-width: 1120px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.85);
  overflow: hidden;
}

.card-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #eff6ff;
  border-bottom: 1px solid var(--border-blue);
  padding: 6px;
  gap: 6px;
}

.tab-btn {
  border: none;
  background: transparent;
  padding: 12px 14px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--brand-primary);
}

.tab-btn.active {
  background: #ffffff;
  color: var(--brand-primary);
  box-shadow: 0 3px 10px rgba(3, 83, 184, 0.14);
}

.card-body {
  padding: 28px 28px 32px;
}

.section-heading {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.section-desc {
  margin: 0 0 22px;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   FORM ELEMENTS
   ========================================================================== */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.form-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label .req {
  color: var(--danger);
  margin-left: 3px;
}

.form-control,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12.5px 14px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
  background: #ffffff;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(3, 83, 184, 0.14);
}

.form-control::placeholder,
.form-textarea::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.form-textarea {
  resize: vertical;
  min-height: 86px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 42px;
  cursor: pointer;
}

/* WhatsApp Prefix 62 Input Group */
.wa-input-group {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-input);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.wa-input-group:focus-within {
  background: #ffffff;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(3, 83, 184, 0.14);
}

.wa-prefix {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  background: #e0f2fe;
  color: #0353b8;
  font-weight: 800;
  font-size: 14.5px;
  border-right: 1.5px solid var(--border-blue);
  user-select: none;
  flex-shrink: 0;
}

.wa-input-group input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12.5px 14px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  min-width: 0;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.wa-preview-tag {
  font-family: "Consolas", "Courier New", monospace;
  font-weight: 700;
  color: var(--success);
  background: var(--success-bg);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
}

.field-error {
  font-size: 12px;
  font-weight: 600;
  color: var(--danger);
  display: none;
}

.form-group.has-error .form-control,
.form-group.has-error .form-select,
.form-group.has-error .form-textarea,
.form-group.has-error .wa-input-group {
  border-color: var(--danger);
  background: #fffafb;
}

.form-group.has-error .field-error {
  display: block;
}

/* Alerts */
.alert {
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert.hidden {
  display: none;
}

.alert-error {
  background: var(--danger-bg);
  color: #991b1b;
  border: 1px solid var(--danger-border);
}

.alert-success {
  background: var(--success-bg);
  color: #065f46;
  border: 1px solid var(--success-border);
}

.alert-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid var(--border-blue);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 13px;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #0353b8 0%, #023e8a 100%);
  color: #ffffff;
  box-shadow: 0 8px 22px -4px rgba(3, 83, 184, 0.45);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -4px rgba(3, 83, 184, 0.55);
}

.btn-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 8px 22px -4px rgba(245, 158, 11, 0.45);
}

.btn-gold:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -4px rgba(245, 158, 11, 0.55);
}

.btn-success {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  box-shadow: 0 8px 20px -4px rgba(5, 150, 105, 0.42);
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff;
  box-shadow: 0 8px 20px -4px rgba(220, 38, 38, 0.38);
}

.btn-danger:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -4px rgba(220, 38, 38, 0.48);
}

.export-panel {
  background: linear-gradient(135deg, #f0f7ff 0%, #eff6ff 100%);
  border: 1.5px solid var(--border-blue);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.export-panel-info {
  flex: 1;
  min-width: 220px;
}

.export-panel-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 7px;
}

.export-panel-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.export-panel-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.export-panel-controls .form-select {
  width: auto;
  min-width: 175px;
  padding: 8.5px 34px 8.5px 12px;
  font-size: 13px;
  background-color: #ffffff;
}

.btn-outline {
  background: #ffffff;
  color: var(--brand-primary);
  border: 1.5px solid var(--border-blue);
}

.btn-outline:hover:not(:disabled) {
  background: #eff6ff;
  border-color: var(--brand-primary);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.24);
}

.btn-sm {
  padding: 8px 13px;
  font-size: 13px;
  border-radius: 10px;
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   E-TICKET / BARCODE PASS PAGE (SCREENSHOT-READY)
   ========================================================================== */
.ticket-page-wrap {
  max-width: 470px;
  margin: 6px auto 44px;
  padding: 0 16px;
}

.ticket-banner-notice {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  color: #ffffff;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ticket-banner-notice strong {
  color: #fde047;
}

.ticket-card {
  background: #ffffff;
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

.ticket-header {
  background: linear-gradient(135deg, #023e8a 0%, #0353b8 60%, #0b66c3 100%);
  color: #ffffff;
  padding: 22px 22px 20px;
  text-align: center;
  border-bottom: 5px solid var(--gold);
  position: relative;
}

.ticket-pill {
  display: inline-block;
  padding: 4px 13px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fde68a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ticket-event-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ticket-event-date {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: #dbeafe;
  font-weight: 600;
}

.ticket-body {
  padding: 20px 22px 18px;
  text-align: center;
}

.ticket-badges-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cat-badge.member {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.cat-badge.non-member {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.cat-badge.gen-tda {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.status-badge.registered {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.status-badge.checked-in {
  background: var(--success-bg);
  color: #065f46;
  border: 1px solid var(--success-border);
}

.qr-frame {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 14px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  margin-bottom: 14px;
}

.qr-frame canvas {
  display: block;
  width: 224px;
  height: 224px;
  border-radius: 8px;
  background: #ffffff;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.ticket-participant-name {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  word-break: break-word;
}

.ticket-business-name {
  margin: 4px 0 2px;
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-primary);
}

.ticket-business-type {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Ticket Perforation Divider */
.ticket-divider {
  position: relative;
  height: 26px;
  display: flex;
  align-items: center;
  margin: 4px 0;
}

.ticket-divider::before {
  content: "";
  width: 100%;
  border-top: 2px dashed #cbd5e1;
  margin: 0 22px;
}

.ticket-notch {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0347a6;
  top: 50%;
  transform: translateY(-50%);
}

.ticket-notch.left {
  left: -12px;
}

.ticket-notch.right {
  right: -12px;
}

.ticket-barcode-section {
  padding: 6px 22px 18px;
  text-align: center;
}

.barcode-1d-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.barcode-1d-wrap canvas {
  max-width: 100%;
  height: auto;
  min-height: 62px;
  display: block;
  background: #ffffff;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.ticket-code-text {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-primary);
}

.ticket-mini-info {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.ticket-footer-strip {
  background: #f0f7ff;
  border-top: 1px solid var(--border-blue);
  padding: 12px 18px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #1e3a8a;
}

.ticket-actions {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ticket-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ==========================================================================
   PANITIA / ADMIN SCANNER DASHBOARD
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.stat-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 4px 0 2px;
  line-height: 1.1;
}

.stat-value.success { color: var(--success); }
.stat-value.warning { color: var(--warning); }
.stat-value.brand { color: var(--brand-primary); }

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

.admin-grid {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 20px;
  align-items: start;
}

.scanner-box {
  background: #0f172a;
  border-radius: 16px;
  overflow: hidden;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 14px;
}

#qrReader {
  width: 100%;
}

.scanner-placeholder {
  color: #94a3b8;
  text-align: center;
  padding: 28px 20px;
  font-size: 13.5px;
}

.scan-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 13px;
  margin-bottom: 14px;
}

.scan-mode-btn {
  border: none;
  background: transparent;
  padding: 10px 10px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.scan-mode-btn.active {
  background: #ffffff;
  color: var(--brand-primary);
  box-shadow: 0 2px 8px rgba(3, 83, 184, 0.14);
}

.usb-scanner-stage {
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: 16px;
  padding: 22px 18px;
  text-align: center;
  margin-bottom: 14px;
  transition: all 0.2s ease;
}

.usb-scanner-stage.active {
  border: 2px solid #10b981;
  background: linear-gradient(180deg, #ecfdf5 0%, #f0fdf4 100%);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.usb-pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #94a3b8;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}

.usb-scanner-stage.active .usb-pulse-dot {
  background: #10b981;
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.28);
}

.scan-result-card {
  border-radius: 14px;
  padding: 15px 16px;
  margin-top: 14px;
  display: none;
  animation: popIn 0.25s ease;
}

.scan-result-card.show {
  display: block;
}

.scan-result-card.success {
  background: var(--success-bg);
  border: 1.5px solid var(--success-border);
  color: #065f46;
}

.scan-result-card.warning {
  background: var(--warning-bg);
  border: 1.5px solid var(--warning-border);
  color: #92400e;
}

.scan-result-card.error {
  background: var(--danger-bg);
  border: 1.5px solid var(--danger-border);
  color: #991b1b;
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.filter-group .form-control {
  max-width: 240px;
  padding: 9px 12px;
  font-size: 13.5px;
}

.filter-group .form-select {
  width: auto;
  min-width: 135px;
  padding: 9px 34px 9px 12px;
  font-size: 13.5px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: 14px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.data-table thead {
  background: #f8fafc;
  border-bottom: 1px solid var(--border-light);
}

.data-table th {
  padding: 12px 14px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

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

.data-table tbody tr:hover {
  background: #f8fafc;
}

.code-chip {
  font-family: "Consolas", "Courier New", monospace;
  font-weight: 700;
  font-size: 12.5px;
  background: #f1f5f9;
  color: #0f172a;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
}

.action-btns {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

/* ==========================================================================
   FOOTER & TOAST
   ========================================================================== */
.site-footer {
  text-align: center;
  padding: 18px 20px 28px;
  color: rgba(219, 234, 254, 0.8);
  font-size: 12.5px;
}

.site-footer a {
  color: #fde68a;
  text-decoration: none;
  font-weight: 600;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(90px);
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
}

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

.hidden {
  display: none !important;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 960px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .topbar {
    padding: 14px 14px 6px;
  }
  .card-body {
    padding: 20px 18px 24px;
  }
  .ticket-actions-row {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat-card {
    padding: 14px;
  }
  .stat-value {
    font-size: 24px;
  }
}
