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

:root {
  --bg:       #08080f;
  --bg2:      #0d0d1a;
  --bg3:      #12121e;
  --card:     #14141f;
  --border:   #ffffff12;
  --primary:  #6366f1;
  --primary2: #818cf8;
  --accent:   #22d3ee;
  --success:  #10b981;
  --danger:   #ef4444;
  --warn:     #f59e0b;
  --text:     #e2e8f0;
  --muted:    #94a3b8;
  --radius:   14px;
  --tr:       0.25s ease;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ===== HEADER ===== */
.header {
  background: rgba(8,8,15,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 24px;
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo-icon { color: var(--primary2); font-size: 20px; }
.brand-name { font-size: 18px; font-weight: 800; color: #fff; display: block; line-height: 1.2; }
.brand-sub  { font-size: 11px; font-weight: 600; color: var(--primary2); display: block; text-transform: uppercase; letter-spacing: 1px; }

.header-right { display: flex; align-items: center; gap: 20px; }

.stats-mini { display: flex; gap: 20px; }
.stat-mini { text-align: center; }
.stat-mini span { font-size: 20px; font-weight: 800; color: var(--muted); display: block; line-height: 1; }
.stat-mini p { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }
.stat-mini.valid span { color: var(--success); }
.stat-mini.used  span { color: var(--danger); }

.btn-back {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--tr);
  white-space: nowrap;
}
.btn-back:hover { color: #fff; border-color: var(--primary2); }

/* ===== LAYOUT ===== */
.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  align-items: start;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--tr);
  box-shadow: 0 4px 16px #6366f144;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px #6366f166; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--tr);
}
.btn-ghost:hover { border-color: var(--primary2); color: var(--primary2); }

.btn-sm-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--tr);
  white-space: nowrap;
}
.btn-sm-ghost:hover { color: #fff; border-color: var(--primary2); }

.btn-control {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--tr);
}
.btn-control.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-control:not(.active):hover { border-color: var(--primary2); color: var(--primary2); }

.btn-sm-mark {
  background: transparent;
  color: var(--danger);
  border: 1px solid #ef444433;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--tr);
}
.btn-sm-mark:hover { background: #ef444422; }

.btn-sm-restore {
  background: transparent;
  color: var(--success);
  border: 1px solid #10b98133;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--tr);
}
.btn-sm-restore:hover { background: #10b98122; }

/* ===== SCANNER PANEL ===== */
.scanner-panel { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 88px; }

.scanner-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.scanner-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.scanner-card-header h2 { font-size: 16px; font-weight: 700; }
.scanner-controls { display: flex; gap: 6px; }

/* ===== CAMERA ===== */
.camera-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #000;
  overflow: hidden;
}
#video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scan-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.scan-frame {
  position: relative;
  width: 200px;
  height: 200px;
}

.corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--primary2);
  border-style: solid;
}
.corner.tl { top: 0; left: 0; border-width: 3px 0 0 3px; border-radius: 4px 0 0 0; }
.corner.tr { top: 0; right: 0; border-width: 3px 3px 0 0; border-radius: 0 4px 0 0; }
.corner.bl { bottom: 0; left: 0; border-width: 0 0 3px 3px; border-radius: 0 0 0 4px; }
.corner.br { bottom: 0; right: 0; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0; }

.scan-line {
  position: absolute;
  left: 6px; right: 6px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary2), transparent);
  box-shadow: 0 0 8px var(--primary2);
  animation: scanMove 2s ease-in-out infinite;
}
@keyframes scanMove {
  0%   { top: 8px; }
  50%  { top: calc(100% - 10px); }
  100% { top: 8px; }
}

.scan-hint {
  margin-top: 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  background: rgba(0,0,0,0.5);
  padding: 6px 14px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.camera-off {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg2);
}
.camera-off-icon { font-size: 48px; opacity: 0.3; }
.camera-off p { color: var(--muted); font-size: 14px; }
.camera-off.hidden { display: none; }

.camera-actions {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

/* scanning pulse on frame */
.scan-frame.detected .corner { border-color: var(--success); }
.scan-frame.detected .scan-line { background: linear-gradient(90deg, transparent, var(--success), transparent); box-shadow: 0 0 8px var(--success); }

/* ===== MANUAL MODE ===== */
.manual-wrap { padding: 28px 20px; }
.manual-label { font-size: 13px; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.manual-input-row { display: flex; gap: 10px; }
.manual-input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-family: monospace;
  letter-spacing: 1px;
  outline: none;
  transition: var(--tr);
}
.manual-input:focus { border-color: var(--primary2); box-shadow: 0 0 0 3px #6366f120; }

/* ===== RESULT CARD ===== */
.result-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-idle {
  text-align: center;
  padding: 28px;
  color: var(--muted);
}
.result-idle-icon { font-size: 36px; margin-bottom: 8px; opacity: 0.4; }
.result-idle p { font-size: 14px; }

.result-content { width: 100%; }

.result-valid {
  padding: 24px;
  background: #10b98112;
  border-top: 3px solid var(--success);
}
.result-used {
  padding: 24px;
  background: #ef444412;
  border-top: 3px solid var(--danger);
}
.result-not-found {
  padding: 24px;
  background: #f59e0b12;
  border-top: 3px solid var(--warn);
}

.result-icon { font-size: 40px; margin-bottom: 10px; }
.result-title { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.result-valid   .result-title { color: var(--success); }
.result-used    .result-title { color: var(--danger); }
.result-not-found .result-title { color: var(--warn); }

.result-id { font-size: 13px; font-family: monospace; color: var(--muted); margin-bottom: 14px; letter-spacing: 1px; }

.result-details {
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
  padding: 14px;
  font-size: 13px;
}
.result-detail-row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid #ffffff08; gap: 12px; }
.result-detail-row:last-child { border-bottom: none; }
.rd-label { color: var(--muted); white-space: nowrap; }
.rd-value { font-weight: 600; text-align: right; word-break: break-all; }

/* ===== DATA PANEL ===== */
.data-panel { display: flex; flex-direction: column; gap: 20px; }

/* ===== LOG CARD ===== */
.log-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.log-header h3 { font-size: 15px; font-weight: 700; }

.log-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 8px 0;
}
.log-empty { text-align: center; padding: 24px; color: var(--muted); font-size: 13px; }

.log-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid #ffffff06;
  font-size: 13px;
  animation: slideIn 0.2s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
.log-item:last-child { border-bottom: none; }

.log-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.log-dot.valid { background: var(--success); box-shadow: 0 0 6px var(--success); }
.log-dot.used  { background: var(--danger);  box-shadow: 0 0 6px var(--danger); }
.log-dot.notfound { background: var(--warn); box-shadow: 0 0 6px var(--warn); }

.log-ticket-id { font-family: monospace; font-weight: 700; color: var(--primary2); }
.log-name { color: var(--muted); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.log-status {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}
.log-status.valid    { background: #10b98122; color: #6ee7b7; }
.log-status.used     { background: #ef444422; color: #fca5a5; }
.log-status.notfound { background: #f59e0b22; color: #fcd34d; }

/* ===== TABLE CARD ===== */
.table-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.table-card-header h3 { font-size: 15px; font-weight: 700; }

.search-input {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  transition: var(--tr);
  width: 180px;
}
.search-input:focus { border-color: var(--primary2); }

.table-scroll { overflow-x: auto; }
.tickets-table { width: 100%; border-collapse: collapse; }
.tickets-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  background: var(--bg2);
}
.tickets-table td {
  padding: 12px 16px;
  font-size: 13px;
  border-top: 1px solid var(--border);
  white-space: nowrap;
}
.tickets-table tr:hover td { background: #ffffff04; }

.status-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}
.status-badge.valid { background: #10b98122; color: #6ee7b7; border: 1px solid #10b98133; }
.status-badge.used  { background: #ef444422; color: #fca5a5; border: 1px solid #ef444433; }

.no-data { text-align: center; padding: 28px; color: var(--muted); font-size: 13px; display: none; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 28px; right: 28px;
  background: var(--card);
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  z-index: 3000;
  transform: translateY(80px);
  opacity: 0;
  transition: 0.3s ease;
  max-width: 320px;
}
.toast.valid-t { border: 1px solid var(--success); color: #6ee7b7; }
.toast.used-t  { border: 1px solid var(--danger);  color: #fca5a5; }
.toast.warn-t  { border: 1px solid var(--warn);    color: #fcd34d; }
.toast.info-t  { border: 1px solid var(--primary2); }
.toast.show    { transform: translateY(0); opacity: 1; }

/* ===== WHITELIST CARD ===== */
.whitelist-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.wl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.wl-header h3 { font-size: 15px; font-weight: 700; }
.wl-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: #22d3ee15;
  border: 1px solid #22d3ee33;
  padding: 4px 12px;
  border-radius: 20px;
}
.wl-body { padding: 20px; }
.wl-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
}
.wl-add-form { margin-bottom: 16px; }
.wl-add-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wl-select {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 10px;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: var(--tr);
}
.wl-select:focus { border-color: var(--primary2); }
.wl-input {
  flex: 1;
  min-width: 140px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: var(--tr);
}
.wl-input:focus { border-color: var(--primary2); box-shadow: 0 0 0 3px #6366f120; }
.wl-input.invalid { border-color: var(--danger); }

.wl-field-error {
  display: block;
  font-size: 12px;
  color: var(--danger);
  margin-top: 6px;
  min-height: 18px;
}

.wl-search-row { margin-bottom: 12px; }

.wl-table-scroll { max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; }
.wl-table th { position: sticky; top: 0; z-index: 1; }

.wl-registered {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}
.wl-registered.yes { background: #10b98122; color: #6ee7b7; border: 1px solid #10b98133; }
.wl-registered.no  { background: var(--bg2); color: var(--muted); border: 1px solid var(--border); }

.wl-bulk-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* ===== LOGOUT BUTTON ===== */
.btn-logout {
  background: transparent;
  color: var(--danger);
  border: 1px solid #ef444444;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--tr);
  white-space: nowrap;
}
.btn-logout:hover { background: #ef444422; border-color: var(--danger); }

/* ===== LOGIN GATE ===== */
.login-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-bg {
  position: absolute;
  inset: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 60% at 30% 40%, #6366f120 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 70%, #22d3ee15 0%, transparent 55%);
}

.login-box {
  position: relative;
  z-index: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 32px 80px #000000aa;
  animation: loginIn 0.35s ease;
}
@keyframes loginIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.login-logo-icon {
  font-size: 28px;
  color: var(--primary2);
  background: #6366f118;
  border: 1px solid #6366f133;
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.login-brand {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.login-brand-sub {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary2);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

.login-desc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
  line-height: 1.5;
}

.login-error {
  background: #ef444418;
  border: 1px solid #ef444455;
  color: #fca5a5;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 20px;
  display: none;
  animation: shake 0.35s ease;
}
.login-error.show { display: block; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60%  { transform: translateX(-6px); }
  40%,80%  { transform: translateX(6px); }
}

.login-field { margin-bottom: 18px; }
.login-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}
.login-field input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  transition: var(--tr);
}
.login-field input:focus { border-color: var(--primary2); box-shadow: 0 0 0 3px #6366f120; }
.login-field input.shake { animation: shake 0.35s ease; border-color: var(--danger); }

.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 44px; }
.pass-toggle {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  transition: var(--tr);
}
.pass-toggle:hover { color: var(--text); }

.login-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--tr);
  box-shadow: 0 4px 20px #6366f155;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px #6366f177; }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.login-loader {
  width: 18px; height: 18px;
  border: 2px solid #ffffff44;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.login-warn {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 20px;
  opacity: 0.7;
}

/* hide main content while gate is shown */
body.locked .header,
body.locked .main { visibility: hidden; pointer-events: none; }

/* ===== ADMIN / LOGIN LOGOS ===== */
.admin-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
}
.login-logo-img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: contain;
  flex-shrink: 0;
  background: #1a1a1a;
  border: 1px solid #6366f133;
}

/* ===== THEME BUTTON (admin) ===== */
.theme-btn {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary2);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}
.theme-btn:hover { background: var(--primary); color: #fff; }

/* ===================================================
   LIGHT MODE — ADMIN
   =================================================== */
[data-theme="light"] {
  --bg:     #f4f6fb;
  --bg2:    #eaecf5;
  --bg3:    #e0e4f0;
  --card:   #ffffff;
  --border: rgba(0,0,0,0.09);
  --text:   #1e2132;
  --muted:  #64748b;
}
[data-theme="light"] body { background: var(--bg); color: var(--text); }

[data-theme="light"] .header {
  background: rgba(244,246,251,0.96);
  box-shadow: 0 2px 12px rgba(99,102,241,0.08);
}

[data-theme="light"] .login-bg {
  background-image:
    radial-gradient(ellipse 70% 60% at 30% 40%, #6366f10e 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 70%, #22d3ee0a 0%, transparent 55%);
}
[data-theme="light"] .login-logo-img {
  background: #f0f0f0;
}

[data-theme="light"] .tickets-table tr:hover td { background: rgba(99,102,241,0.04); }

[data-theme="light"] .result-details { background: rgba(0,0,0,0.04); }
[data-theme="light"] .result-detail-row { border-bottom-color: rgba(0,0,0,0.07); }

[data-theme="light"] .log-item { border-bottom-color: rgba(0,0,0,0.05); }

[data-theme="light"] .toast { background: #fff; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .main { grid-template-columns: 1fr; }
  .scanner-panel { position: static; }
  .camera-wrap { aspect-ratio: 4/3; max-height: 360px; }
}

@media (max-width: 600px) {
  .header-inner { height: auto; padding: 12px 0; flex-wrap: wrap; gap: 12px; }
  .stats-mini { gap: 12px; }
  .main { padding: 16px; gap: 16px; }
}
