.control-room-body {
  margin: 0;
  min-height: 100vh;
  color: #0d1b2a;
  background: #f5f1eb;
  font-family: Inter, Manrope, Arial, sans-serif;
}

.control-room-body *,
.control-room-body *::before,
.control-room-body *::after { box-sizing: border-box; }

.control-shell { width: min(100% - 32px, 1280px); margin: 0 auto; padding: 24px 0 56px; }
.control-panel { border: 1px solid rgba(13, 27, 42, .08); background: rgba(255, 255, 255, .9); box-shadow: 0 18px 42px rgba(13, 27, 42, .09); }

@media (min-width: 769px) {
  .mobile-only-upc-field {
    display: none !important;
  }
}

.control-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border-radius: 28px;
}
.control-brand { display: flex; align-items: center; gap: 18px; min-width: 0; }
.control-logo { display: grid; place-items: center; width: 228px; height: 72px; padding: 10px 16px; border: 1px solid #e8e4df; border-radius: 20px; background: #fff; }
.control-logo img { display: block; max-width: 100%; max-height: 52px; object-fit: contain; }
.control-kicker { margin: 0 0 4px; color: #b62f49; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.control-title { margin: 0; font-size: 27px; line-height: 1.05; letter-spacing: 0; }
.control-subtitle { max-width: 440px; margin: 4px 0 0; color: #536176; font-size: 13px; line-height: 1.35; }
.control-actions { display: flex; align-items: center; gap: 10px; }
.connection-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid #dce2e8; border-radius: 999px; color: #44566c; background: #f4f5f6; font-size: 12px; font-weight: 750; }
.connection-chip.is-connected { color: #087455; border-color: #b8e4d4; background: #ecfaf5; }

.control-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border: 1px solid transparent; border-radius: 14px; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.control-button:hover { transform: translateY(-1px); }
.control-button:disabled { opacity: .6; cursor: wait; transform: none; }
.control-button-primary { color: #fff; background: #102b40; box-shadow: 0 12px 24px rgba(16, 43, 64, .16); }
.control-button-secondary { color: #0d1b2a; border-color: #dce2e8; background: #fff; }
.control-button-danger { width: 100%; color: #b42318; border-color: #f1bab5; background: #fff5f4; box-shadow: none; }

.mode-toggle {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(13, 27, 42, .08);
}
.mode-button {
  flex: 1;
  min-height: 48px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: #536176;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}
.mode-button.is-active {
  background: #102b40;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(16, 43, 64, 0.18);
}

.workspace-panel {
  padding: 24px;
  border-radius: 24px;
  margin-top: 16px;
}
.panel-heading { margin-bottom: 20px; }
.panel-heading h2 { margin: 0 0 6px; font-size: 22px; font-weight: 900; letter-spacing: -0.01em; color: #0d1b2a; }
.panel-intro { margin: 0; color: #536176; font-size: 13px; line-height: 1.45; }

.upc-action-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.control-button-camera {
  color: #0d1b2a;
  background: #f0f4f8;
  border: 1.5px solid #cbd5e1;
  white-space: nowrap;
}
.control-button-camera:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}
.upc-input {
  flex: 1;
  min-width: 200px;
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid #dce2e8;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  outline: none;
  background: #ffffff;
  color: #0d1b2a;
}
.upc-input:focus {
  border-color: #102b40;
  box-shadow: 0 0 0 3px rgba(16, 43, 64, 0.12);
}
.upc-btn {
  height: 48px;
  padding: 0 22px;
  background: #102b40;
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.batch-toggle-row { margin-top: 14px; }
.batch-btn {
  font-size: 13px;
  font-weight: 800;
  color: #b62f49;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.batch-input-wrap textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #dce2e8;
  border-radius: 14px;
  font-family: monospace;
  font-size: 13px;
  outline: none;
}

.mobile-camera-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.camera-picker-card {
  position: relative;
  display: block;
  padding: 18px 14px;
  border: 2px dashed #cbd5e1;
  border-radius: 18px;
  background: #faf9f7;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}
.camera-picker-card:hover {
  border-color: #102b40;
  background: #f1f5f9;
}
.camera-picker-card.wide {
  margin-top: 12px;
  text-align: left;
}
.camera-picker-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.picker-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.picker-card-content.horizontal {
  flex-direction: row;
  align-items: center;
  gap: 14px;
}
.picker-icon { font-size: 26px; }
.picker-card-content strong { display: block; font-size: 14px; color: #0d1b2a; }
.picker-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #102b40;
  background: #e2e8f0;
}
.picker-badge.optional { color: #64748b; background: #f1f5f9; }
.picker-badge.ready { color: #087455; background: #ecfaf5; }

.full-width { width: 100%; margin-top: 16px; }

.scanner-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(7, 16, 27, .85);
}
.scanner-modal[hidden] { display: none !important; }
.scanner-dialog {
  width: min(100%, 460px);
  padding: 20px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
#scanner-video {
  display: block;
  width: 100%;
  min-height: 260px;
  border-radius: 16px;
  background: #000;
  overflow: hidden;
  position: relative;
}
#scanner-video video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 16px;
}

/* Edit Draft Overlay Modal */
.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(7, 16, 27, 0.85);
  overflow-y: auto;
  backdrop-filter: blur(4px);
}
.detail-overlay[hidden] { display: none !important; }
.detail-dialog {
  position: relative;
  width: min(96vw, 1180px);
  max-height: 92vh;
  overflow-y: auto;
  padding: 32px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 25px 60px rgba(0,0,0,0.35);
}
.modal-right {
  flex: 1;
  min-width: 320px;
}
.modal-right .listing-review-form {
  width: 100%;
}
.modal-right input[type="text"],
.modal-right input[type="number"],
.modal-right input[type="search"],
.modal-right select,
.modal-right textarea {
  width: 100%;
  box-sizing: border-box;
  font-size: 15px;
}
.modal-right #review-title {
  font-size: 16px;
  font-weight: 700;
  padding: 12px 14px;
}
.modal-right #review-department {
  font-size: 15px;
  font-weight: 600;
}
.detail-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0d1b2a;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.detail-close-btn:hover { background: #e2e8f0; }

@media (max-width: 768px) {
  #open-qr-modal-btn,
  .desktop-qr-card { display: none !important; }
}

@media (max-width: 600px) {
  .control-shell { width: 100%; padding: 12px 10px 40px; }
  .control-header { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; border-radius: 20px; }
  .control-logo { width: 140px; height: 50px; }
  .control-title { font-size: 22px; }
  .workspace-panel { padding: 16px; border-radius: 20px; }
  .upc-action-bar { flex-direction: column; align-items: stretch; }
  .upc-input { min-width: 100%; }
}

/* Result Grid & Product Cards (Grid Layout in Rows) */
.session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.result-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(13, 27, 42, 0.08);
  box-shadow: 0 12px 32px rgba(13, 27, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(13, 27, 42, 0.1);
}
.result-media {
  width: 100%;
  height: 200px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(13, 27, 42, 0.06);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  margin: 0 0 14px 0;
}
.result-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.result-media span {
  padding: 14px;
  text-align: center;
  font-size: 12px;
  color: #536176;
  font-weight: 600;
  line-height: 1.4;
}
.result-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.result-kicker {
  font-size: 10px;
  font-weight: 800;
  color: #b62f49;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.result-copy strong {
  font-size: 16px;
  font-weight: 800;
  color: #0d1b2a;
  line-height: 1.35;
}
.result-meta {
  font-size: 14px;
  font-weight: 700;
  color: #087455;
}

@media (max-width: 600px) {
  .session-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }
  .result-card {
    padding: 12px;
    border-radius: 18px;
  }
  .result-media {
    height: 140px;
    border-radius: 12px;
  }
  .result-copy strong {
    font-size: 13px;
    line-height: 1.25;
  }
  .result-meta {
    font-size: 12px;
  }
  .card-edit-button, .card-publish-button {
    font-size: 12px !important;
    min-height: 38px !important;
    padding: 0 8px !important;
  }
}
