* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #090a1a;
  --bg-card: rgba(18, 20, 50, 0.85);
  --bg-card-hover: rgba(25, 28, 65, 0.9);
  --bg-input: rgba(30, 33, 70, 0.7);
  --primary: #7c6ff7;
  --primary-glow: #a78bfa;
  --primary-hover: #6d5fee;
  --accent: #c8a96e;
  --accent-glow: #e8d5a3;
  --success: #34d399;
  --danger: #f87171;
  --text: #e8e6f0;
  --text-muted: #8e8ca0;
  --border: rgba(124, 111, 247, 0.25);
  --border-accent: rgba(200, 169, 110, 0.3);
  --radius: 16px;
  --radius-sm: 10px;
  --glow: 0 0 30px rgba(124, 111, 247, 0.25);
  --glow-accent: 0 0 25px rgba(200, 169, 110, 0.2);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(124, 111, 247, 0.2); }
  50% { box-shadow: 0 0 40px rgba(124, 111, 247, 0.4), 0 0 60px rgba(167, 139, 250, 0.2); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes star-twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(124, 111, 247, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(200, 169, 110, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(124, 111, 247, 0.04) 0%, transparent 70%);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 25% 30%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.5px 1.5px at 40% 10%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 55% 75%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.5px 1.5px at 70% 20%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 85% 55%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 15% 80%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.5px 1.5px at 60% 60%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 90% 85%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 35% 45%, rgba(255,255,255,0.25), transparent),
    radial-gradient(1.5px 1.5px at 5% 50%, rgba(255,255,255,0.3), transparent);
  animation: star-twinkle 3s ease-in-out infinite;
}

.hidden {
  display: none !important;
}

.role-badge {
  display: inline-block !important;
  padding: 3px 12px !important;
  border-radius: 50px !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  margin-left: 8px !important;
  letter-spacing: 0.5px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.role-badge--ticket {
  background: #7c6ff7 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.role-badge--merch {
  background: #c8a96e !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  z-index: 1;
}

/* ========== FORM ELEMENTS ========== */
.form-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 15px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--primary-glow);
  box-shadow: 0 0 20px rgba(124, 111, 247, 0.2), inset 0 0 8px rgba(124, 111, 247, 0.08);
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  width: 100%;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #9b8afb 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(124, 111, 247, 0.35);
  border: 1px solid rgba(167, 139, 250, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(124, 111, 247, 0.5);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 12px rgba(124, 111, 247, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  width: auto;
}

.btn-outline:hover {
  border-color: var(--primary-glow);
  background: rgba(124, 111, 247, 0.08);
}

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

.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.error-msg {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 14px;
}

/* ========== LOGIN VIEW ========== */
.login-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.login-wrapper::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(124, 111, 247, 0.15) 0%, transparent 70%);
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
}

.login-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--glow);
  animation: fadeInUp 0.5s ease;
}

.login-logo {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  margin-bottom: 20px;
  box-shadow: 0 0 40px rgba(124, 111, 247, 0.4), 0 0 80px rgba(124, 111, 247, 0.15);
  background-color: rgba(124, 111, 247, 0.2);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid rgba(167, 139, 250, 0.4);
  animation: pulse-glow 3s ease-in-out infinite;
}

.login-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
  background: linear-gradient(135deg, var(--primary-glow) 0%, var(--accent-glow) 50%, var(--primary-glow) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.login-footer {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: fadeInUp 0.5s ease;
}

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

.login-server strong {
  color: var(--primary-glow);
}

/* ========== HOME VIEW ========== */
#view-home {
  animation: fadeInUp 0.35s ease;
}

.home-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px 0 16px;
  gap: 8px;
}

.home-header-left h1 {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent-glow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-header-left span {
  font-size: 13px;
  color: var(--text-muted);
}

.home-proxy-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.home-proxy-label strong {
  color: var(--primary-glow);
}

.online-status {
  font-weight: 600;
  font-size: 11px;
}

.online-status--online {
  color: var(--success);
}

.online-status--offline {
  color: var(--danger);
}

/* ========== SYNC BANNER ========== */
.sync-banner {
  background: linear-gradient(135deg, rgba(124, 111, 247, 0.15) 0%, rgba(200, 169, 110, 0.1) 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sync-banner-text {
  font-size: 13px;
  color: var(--text);
}

.sync-banner .btn-sm {
  flex-shrink: 0;
  width: auto;
}

/* ========== EVENT ACTIONS ========== */
.event-info-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.event-badge-offline {
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
  background: rgba(52, 211, 153, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

.event-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(71, 85, 105, 0.3);
}

.event-actions .btn {
  width: 100%;
}

.ios-install-btn {
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon {
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  margin-bottom: 6px;
  background-color: rgba(124, 111, 247, 0.2);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border: 1.5px solid rgba(167, 139, 250, 0.3);
  box-shadow: 0 0 16px rgba(124, 111, 247, 0.2);
}

.search-box {
  position: relative;
  margin-bottom: 12px;
}

.search-box .form-input {
  padding-left: 42px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  z-index: 1;
}

/* ========== HOME TABS ========== */
.home-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tab-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.tab-btn:hover {
  border-color: var(--primary-glow);
  color: var(--text);
}

.tab-btn--active {
  background: linear-gradient(135deg, rgba(124, 111, 247, 0.25) 0%, rgba(155, 138, 251, 0.15) 100%);
  border-color: rgba(167, 139, 250, 0.5);
  color: var(--primary-glow);
  box-shadow: 0 0 20px rgba(124, 111, 247, 0.15);
}

/* ========== EVENT LIST ========== */
.event-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.event-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.event-card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 6px 24px rgba(200, 169, 110, 0.12), var(--glow);
  transform: translateY(-2px);
}

.event-card:active {
  transform: scale(0.98);
}

.event-img {
  width: 100%;
  height: 170px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-input);
  position: relative;
}

.event-img::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to top, rgba(18, 20, 50, 0.95), transparent);
  pointer-events: none;
}

.event-info {
  padding: 14px 18px;
}

.event-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
  color: var(--text);
}

.event-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ========== SETTINGS PANEL ========== */
.settings-panel {
  margin-bottom: 16px;
  animation: fadeInUp 0.25s ease;
}

.settings-panel-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--glow);
}

.settings-panel-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--primary-glow);
}

.settings-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.settings-radio {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--bg-input);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.settings-radio:hover {
  background: rgba(124, 111, 247, 0.08);
  border-color: var(--border);
}

.settings-radio input[type="radio"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.settings-radio-label {
  font-size: 14px;
  color: var(--text);
}

.settings-radio-label small {
  color: var(--text-muted);
  font-size: 12px;
}

.settings-panel-actions {
  display: flex;
  gap: 8px;
}

.settings-panel-actions .btn {
  flex: 1;
}

/* ========== HISTORY LIST ========== */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.history-card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 4px 18px rgba(200, 169, 110, 0.08);
}

.history-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.history-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.history-scan-ke {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-glow);
  background: rgba(124, 111, 247, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
}

.history-qr {
  font-size: 13px;
  font-weight: 600;
  word-break: break-all;
  color: var(--text);
  line-height: 1.4;
}

.history-time {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  text-align: right;
  line-height: 1.5;
}

.history-card-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.history-meta-item {
  font-size: 12px;
  color: var(--text-muted);
}

.history-meta-item strong {
  color: var(--primary-glow);
}

/* ========== LOADING ========== */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 0;
  color: var(--text-muted);
  gap: 14px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(124, 111, 247, 0.15);
  border-top-color: var(--primary-glow);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  box-shadow: 0 0 20px rgba(124, 111, 247, 0.2);
}

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

/* ========== PAGINATION ========== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 8px;
  gap: 8px;
}

.pagination .page-info {
  font-size: 13px;
  color: var(--text-muted);
}

/* ========== EMPTY / ERROR ========== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.error-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--danger);
  font-size: 14px;
  background: rgba(248, 113, 113, 0.06);
  border-radius: var(--radius);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

/* ========== SCANNER VIEW ========== */
#view-scanner {
  animation: fadeInUp 0.3s ease;
}

.scanner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 16px;
}

.scanner-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-glow);
}

.scanner-container {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  min-height: 320px;
  border: 2px solid var(--border);
  box-shadow: 0 0 30px rgba(124, 111, 247, 0.15);
}

.scanner-container video {
  width: 100%;
  border-radius: var(--radius);
}

.camera-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  min-height: 320px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.camera-placeholder-icon {
  font-size: 52px;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

.camera-placeholder-text {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  margin-bottom: 4px;
}

.scanner-footer {
  text-align: center;
  padding: 16px 0;
}

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

/* ========== MANUAL INPUT ========== */
.manual-input {
  padding: 0;
}

.manual-input-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1px solid var(--border);
  text-align: center;
  box-shadow: var(--glow);
}

.manual-input-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--primary-glow);
}

.manual-input-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.manual-input .form-input {
  text-align: center;
  font-size: 18px;
  letter-spacing: 3px;
  margin-bottom: 18px;
  font-weight: 600;
}

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

.manual-input-actions .btn {
  flex: 1;
}

/* ========== RESULT VIEW ========== */
#view-result {
  animation: fadeInUp 0.3s ease;
}

.result-wrapper {
  padding-top: 16px;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 16px;
}

.result-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 22px;
  letter-spacing: 0.3px;
}

.result-badge.success {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.15) 0%, rgba(52, 211, 153, 0.06) 100%);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.3);
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.15);
}

.result-badge.error {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.15) 0%, rgba(248, 113, 113, 0.06) 100%);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.result-highlight {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.highlight-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.highlight-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  text-align: center;
}

.highlight-tag {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 24px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  width: 100%;
}

.highlight-tag--regular {
  background: linear-gradient(135deg, #ff914d, #ff7a29);
  color: white;
}

.highlight-tag--vip {
  background: linear-gradient(135deg, #5170ff, #3d58e0);
  color: white;
}

.highlight-tag--vvip {
  background: linear-gradient(135deg, #8c52ff, #753ae0);
  color: white;
}

.highlight-tag--default {
  background: linear-gradient(135deg, var(--primary), #9b8afb);
  color: white;
}

.highlight-ticket-type {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #090a1a;
  border-radius: 16px;
  padding: 14px 24px;
  width: 100%;
  background: white;
}

.highlight-label-inside {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  opacity: 0.8;
}

.highlight-value-inside {
  font-size: 18px;
  font-weight: 700;
}

.highlight-scan-count {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: 16px;
  background: #34d399;
  color: white;
  width: 100%;
}

.highlight-scan-count--scanned {
  background: #ef4444;
  color: white;
}

.result-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
  padding: 6px 0;
  border: 1px solid var(--border);
  box-shadow: var(--glow);
  overflow: hidden;
  margin-bottom: 24px;
}

.result-item {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.result-item:last-child {
  border-bottom: none;
}

.result-item--highlight {
  background: linear-gradient(135deg, rgba(124, 111, 247, 0.08) 0%, rgba(200, 169, 110, 0.06) 100%);
}

.result-item--highlight .result-value {
  color: var(--primary-glow);
  font-size: 18px;
}

.result-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.result-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}

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

.result-actions .btn {
  flex: 1;
}

/* ========== HTML5 QR OVERRIDES ========== */
#qr-reader {
  border: none !important;
}

#qr-reader__scan_region {
  min-height: 300px;
}

#qr-reader__scan_region img {
  display: none;
}

#qr-reader__dashboard {
  padding: 12px !important;
  background: rgba(18, 20, 50, 0.95) !important;
  border: none !important;
}

#qr-reader__dashboard button {
  background: linear-gradient(135deg, var(--primary) 0%, #9b8afb 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 10px 20px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  box-shadow: 0 4px 16px rgba(124, 111, 247, 0.3) !important;
}

/* ========== PWA INSTALL BANNER ========== */
.pwa-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.pwa-banner--hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.pwa-banner--visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.pwa-banner-content {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.5), var(--glow);
  margin: 0 14px 14px;
  border-radius: var(--radius);
}

.pwa-banner-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
  background-color: rgba(124, 111, 247, 0.2);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border: 1.5px solid rgba(167, 139, 250, 0.3);
  box-shadow: 0 0 16px rgba(124, 111, 247, 0.2);
}

.pwa-banner-body {
  flex: 1;
  min-width: 0;
}

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

.pwa-banner-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.pwa-banner-action {
  flex-shrink: 0;
}

.pwa-banner-action .btn-sm {
  width: auto;
}

.pwa-banner-action svg {
  display: none;
}

.pwa-banner.is-ios .btn-sm {
  display: none;
}

.pwa-banner.is-ios .pwa-banner-action svg {
  display: block;
}

.pwa-banner .btn-sm {
  flex-shrink: 0;
  width: auto;
}

.btn-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.btn-dismiss:hover {
  background: rgba(124, 111, 247, 0.08);
  color: var(--text);
}

/* ========== TOAST ========== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 24px;
  border-radius: 24px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  z-index: 1000;
  animation: toastIn 0.3s ease;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.toast.success { border-color: rgba(52, 211, 153, 0.4); color: var(--success); }
.toast.error { border-color: rgba(248, 113, 113, 0.4); color: var(--danger); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
