/* Admin Panel Styling */
.admin-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #1a4d2e;
  margin-bottom: 20px;
}

.admin-tab-btn {
  padding: 10px 20px;
  background: #092816;
  border: 1px solid #1a4d2e;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  color: #cfd8dc;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-tab-btn.active {
  background: #113822;
  color: #D4AF37;
  border-color: #5B9C6B;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Manual Trigger Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  max-height: 520px;
  overflow-y: auto;
  padding: 8px 4px;
}

.gallery-card {
  background: #072213;
  border: 1px solid #205c36;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.gallery-card:hover {
  border-color: #D4AF37;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.gallery-card.placed {
  opacity: 0.65;
  border-color: rgba(255, 255, 255, 0.2);
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  object-fit: cover;
}

.gallery-id {
  font-size: 12px;
  font-weight: bold;
  margin-top: 6px;
  color: #fff;
}

.gallery-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
}

.gallery-badge.avail {
  background: #19522d;
  color: #a3e6be;
}

.gallery-badge.used {
  background: #5c4308;
  color: #ffe082;
}

/* Mapping Table */
.mapping-table-container {
  max-height: 520px;
  overflow-y: auto;
  border: 1px solid #1a4d2e;
  border-radius: 8px;
}

.mapping-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.mapping-table th {
  background: #092816;
  padding: 12px 14px;
  text-align: left;
  color: #D4AF37;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 2px solid #1a4d2e;
}

.mapping-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #113822;
  color: #eceff1;
}

.mapping-table tr:hover {
  background: rgba(91, 156, 107, 0.1);
}

.mapping-thumb {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  object-fit: cover;
}

/* Scanner UI */
.scanner-box {
  background: #072213;
  border: 1px solid #205c36;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.scanner-video {
  width: 100%;
  max-width: 440px;
  height: 280px;
  background: #000;
  border-radius: 8px;
  object-fit: cover;
}

/* Scanner Source Selector & Cooldown (Phases 4 & 5) */
.scanner-source-nav {
  display: flex;
  gap: 10px;
  background: #092816;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid #1c5230;
  width: 100%;
  max-width: 500px;
}

.scanner-source-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #a0c4ab;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.scanner-source-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.scanner-source-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(11, 45, 26, 0.8) 100%);
  border-color: #D4AF37;
  color: #f3e5ab;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.scanner-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 500px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(56, 176, 0, 0.12);
  border: 1px solid rgba(56, 176, 0, 0.35);
  color: #70e000;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.scanner-status-banner.cooldown {
  background: rgba(255, 183, 3, 0.15);
  border-color: rgba(255, 183, 3, 0.4);
  color: #ffb703;
}

.scanner-status-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  margin-right: 8px;
}

