:root {
  --bg-app: #f1f5f9;
  --bg-card: #ffffff;
  --bg-header: #0f172a;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-color: #cbd5e1;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --purple: #7c3aed;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Pretendard", "Malgun Gothic", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-app);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.45;
}

/* =========================================================
   LOGIN MODAL / SCREEN (`/login` - Korean ID Support)
   ========================================================= */
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-overlay.active {
  display: flex;
}

body.logged-out-mode #login-overlay {
  display: flex !important;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

body.logged-out-mode #main-top-header,
body.logged-out-mode #main-module-nav,
body.logged-out-mode #monitor-readonly-banner,
body.logged-out-mode .module-section {
  display: none !important;
}

.login-card {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 14px;
  padding: 28px 26px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  border: 1px solid #e2e8f0;
}

/* =========================================================
   TOP GLOBAL NAVIGATION & SESSION HEADER (GNB)
   ========================================================= */
.top-header {
  background: var(--bg-header);
  color: #ffffff;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 2px solid #1e293b;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-badge {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.brand-title {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.session-selector-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1e293b;
  border: 1.5px solid #3b82f6;
  padding: 4px 8px;
  border-radius: 8px;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
}

.status-pill.timer-warn {
  background: #78350f;
  border-color: #f59e0b;
  color: #fef3c7;
  animation: pulse-warn 1.2s infinite;
}

.status-pill.timer-over {
  background: #7f1d1d;
  border-color: #ef4444;
  color: #fee2e2;
  animation: pulse-warn 0.7s infinite;
}

@keyframes pulse-warn {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

/* Sub-navigation Module Tabs */
.module-nav {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.module-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  align-items: flex-end;
}

.module-tab {
  border: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  border-radius: 6px 6px 0 0;
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.module-tab .tab-icon {
  font-size: 14px;
}

.module-tab .tab-badge {
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 10px;
  line-height: 1.2;
}

.module-tab:hover {
  color: var(--primary);
  background: #f1f5f9;
}

.module-tab.active {
  color: #1d4ed8;
  border-bottom-color: #2563eb;
  background: #eff6ff;
  font-weight: 800;
}

.module-tab.active .tab-badge {
  background: #dbeafe;
  color: #1d4ed8;
}

/* Buttons & Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-primary { background: var(--primary); color: #ffffff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: #ffffff; color: #1e293b; border-color: #cbd5e1; }
.btn-secondary:hover { background: #f8fafc; }
.btn-success { background: var(--success); color: #ffffff; }
.btn-warning { background: var(--warning); color: #ffffff; }
.btn-danger { background: var(--danger); color: #ffffff; }
.btn-purple { background: var(--purple); color: #ffffff; }

.btn-xs {
  padding: 3px 8px;
  font-size: 11.5px;
  border-radius: 4px;
}

.input, .select {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  background: #ffffff;
  color: #0f172a;
}

.module-section {
  display: none;
  padding: 14px 18px;
}

.module-section.active {
  display: block !important;
}

/* =========================================================
   MODULE C: Core Interviewer Split Screen (400px + Flex-1)
   ========================================================= */
.interviewer-workspace {
  display: flex;
  gap: 14px;
  height: calc(100vh - 122px);
  min-height: 620px;
}

.roster-panel {
  width: 410px;
  min-width: 390px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.roster-header {
  padding: 11px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.roster-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.applicant-card {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
  transition: all 0.15s;
  position: relative;
}

.applicant-card:hover {
  border-color: #93c5fd;
}

.applicant-card.selected-slot {
  border-color: var(--primary);
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.applicant-card.dragging {
  opacity: 0.45;
  border-style: dashed;
}

.applicant-card.absent-card {
  background: #f1f5f9;
  border-color: #cbd5e1;
  opacity: 0.72;
}

.applicant-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.drag-handle {
  cursor: grab;
  color: #64748b;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  background: #f1f5f9;
  user-select: none;
  font-size: 12px;
}

.drag-handle:active {
  cursor: grabbing;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.badge-present { background: #dcfce7; color: #15803d; }
.badge-absent { background: #fee2e2; color: #b91c1c; }
.badge-pending { background: #fef3c7; color: #b45309; }
.badge-checked { background: #dbeafe; color: #1d4ed8; }

.eval-drawer {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed #cbd5e1;
  display: none;
}

.eval-drawer.open {
  display: block;
}

.rubric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.rubric-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 5px 6px;
  text-align: center;
}

.rubric-box label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 3px;
}

.rubric-box input {
  width: 100%;
  text-align: center;
  font-weight: 800;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  padding: 3px;
  font-size: 13px;
}

/* Right Panel: Dynamic 1 / 2 / 3 Split FIFO Viewer */
.viewer-panel {
  flex: 1;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.viewer-toolbar {
  padding: 9px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.fifo-slots-container {
  flex: 1;
  display: grid;
  gap: 10px;
  padding: 10px;
  background: #e2e8f0;
  overflow: hidden;
}

.fifo-slots-container.slots-0 { grid-template-columns: 1fr; }
.fifo-slots-container.slots-1 { grid-template-columns: 1fr; }
.fifo-slots-container.slots-2 { grid-template-columns: repeat(2, 1fr); }
.fifo-slots-container.slots-3 { grid-template-columns: repeat(3, 1fr); }

.transcript-slot {
  background: #ffffff;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.slot-header {
  padding: 8px 10px;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.slot-metrics {
  padding: 6px 10px;
  background: #eff6ff;
  border-bottom: 1px solid #bfdbfe;
  font-size: 12px;
  font-weight: 700;
  color: #1e3a8a;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
}

.slot-page-control {
  padding: 6px 10px;
  background: #f5f3ff;
  border-bottom: 1px solid #ddd6fe;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.slot-canvas-stage {
  flex: 1;
  position: relative;
  overflow: auto;
  background: #334155;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 8px;
}

.canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 760px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.canvas-wrapper img.transcript-bg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.canvas-wrapper canvas.ink-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.slot-footer {
  padding: 7px 10px;
  background: #f8fafc;
  border-top: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

/* Dashboard Cards & Tables */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.card h3 {
  margin: 0 0 12px 0;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.data-table th, .data-table td {
  border: 1px solid #e2e8f0;
  padding: 8px 10px;
  text-align: center;
}

.data-table th {
  background: #f8fafc;
  font-weight: 800;
  color: #334155;
}

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

/* =========================================================
   Formtec Multi-Template QR Label Specifications (v7.1)
   - FORMTEC_3108: 38mm x 21.2mm (5x13 = 65 cells)
   - FORMTEC_3107: 63.5mm x 38.1mm (3x7 = 21 cells, Medium)
   - FORMTEC_3105: 70mm x 33.9mm (3x8 = 24 cells, Medium)
   ========================================================= */
.label-sheet-preview-wrap {
  background: #64748b;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  display: flex;
  justify-content: center;
}

.formtec-multi-page-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: auto;
  background: transparent;
  box-shadow: none;
}

.formtec-page-sheet {
  width: 210mm;
  height: 297mm;
  min-height: 297mm;
  max-height: 297mm;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  display: grid;
  box-sizing: border-box;
  page-break-after: always;
  break-after: page;
  overflow: hidden;
}

.formtec-page-sheet:last-child {
  page-break-after: auto;
  break-after: auto;
}

.label-sheet {
  width: 210mm;
  min-height: 297mm;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  display: grid;
  box-sizing: border-box;
}

/* Template 1: Formtec 3108 (Small A4 65 cells: 38mm x 21.2mm) */
.label-sheet.template-FORMTEC_3108 {
  grid-template-columns: repeat(5, 38mm);
  grid-template-rows: repeat(13, 21.2mm);
  grid-column-gap: 2.5mm;
  grid-row-gap: 0mm;
  padding-left: 4.5mm;
  padding-top: 10.7mm;
}

.label-sheet.template-FORMTEC_3108 .label-item {
  width: 38mm;
  height: 21.2mm;
  padding: 1.4mm 1.8mm;
}

/* Template 2: Formtec 3107 (Medium A4 21 cells: 63.5mm x 38.1mm) */
.label-sheet.template-FORMTEC_3107 {
  grid-template-columns: repeat(3, 63.5mm);
  grid-template-rows: repeat(7, 38.1mm);
  grid-column-gap: 2.5mm;
  grid-row-gap: 0mm;
  padding-left: 7.2mm;
  padding-top: 15.1mm;
}

.label-sheet.template-FORMTEC_3107 .label-item {
  width: 63.5mm;
  height: 38.1mm;
  padding: 3.2mm 3.8mm;
}

/* Template 3: Formtec 3105 (Medium A4 24 cells: 70mm x 33.9mm) */
.label-sheet.template-FORMTEC_3105 {
  grid-template-columns: repeat(3, 70mm);
  grid-template-rows: repeat(8, 33.9mm);
  grid-column-gap: 0mm;
  grid-row-gap: 0mm;
  padding-left: 0mm;
  padding-top: 12.9mm;
}

.label-sheet.template-FORMTEC_3105 .label-item {
  width: 70mm;
  height: 33.9mm;
  padding: 2.8mm 4.2mm;
}

.label-item {
  box-sizing: border-box;
  overflow: hidden;
  border: 0.2mm dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2.2mm;
}

.label-item-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  flex: 1;
}

.label-ex-no {
  font-family: monospace;
  font-size: 9.5pt;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
}

.label-name {
  font-size: 8.5pt;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.15;
  white-space: nowrap;
}

.label-dept {
  font-size: 6.5pt;
  color: #475569;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Larger typography for Medium Formtec 3107 / 3105 */
.label-sheet.template-FORMTEC_3107 .label-ex-no,
.label-sheet.template-FORMTEC_3105 .label-ex-no {
  font-size: 13.5pt;
  color: #1d4ed8;
}

.label-sheet.template-FORMTEC_3107 .label-name,
.label-sheet.template-FORMTEC_3105 .label-name {
  font-size: 11.5pt;
  margin-top: 1mm;
}

.label-sheet.template-FORMTEC_3107 .label-dept,
.label-sheet.template-FORMTEC_3105 .label-dept {
  font-size: 8.5pt;
  margin-top: 0.8mm;
}

/* A4 1-Page Report Preview & Print */
.a4-report-sheet {
  width: 210mm;
  min-height: 290mm;
  margin: 0 auto;
  background: #ffffff;
  padding: 12mm 14mm;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.report-title {
  text-align: center;
  font-size: 19pt;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4mm;
  letter-spacing: -0.3px;
}

.report-stats-box {
  background: #f8fafc;
  border: 1.5px solid #0f172a;
  padding: 3.5mm 5mm;
  font-size: 10.5pt;
  font-weight: 800;
  display: flex;
  justify-content: space-around;
  margin-bottom: 5mm;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8.8pt;
}

.report-table th, .report-table td {
  border: 1px solid #334155;
  padding: 1.8mm 2mm;
  text-align: center;
}

.report-table th {
  background: #e2e8f0;
  font-weight: 800;
}

.report-sign-box {
  margin-top: 8mm;
  display: flex;
  justify-content: flex-end;
  gap: 6mm;
}

.sign-cell {
  border: 1px solid #0f172a;
  width: 48mm;
  height: 18mm;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2mm 3mm;
  font-size: 9.5pt;
  font-weight: 700;
}

/* =========================================================
   @media print Specification (Formtec 3108/3107/3105 & A4 1-Page Report)
   ========================================================= */
@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }
  body {
    margin: 0;
    padding: 0;
    background: #ffffff;
  }
  .no-print, .top-header, .module-nav, .login-overlay {
    display: none !important;
  }
  .module-section {
    padding: 0 !important;
  }

  /* When printing Formtec QR labels */
  body.print-mode-labels .module-section {
    display: none !important;
  }
  body.print-mode-labels #module-b {
    display: block !important;
  }
  body.print-mode-labels .b-non-label-area {
    display: none !important;
  }
  body.print-mode-labels .label-sheet-preview-wrap {
    padding: 0 !important;
    background: none !important;
    display: block !important;
  }
  body.print-mode-labels .label-sheet {
    box-shadow: none !important;
    width: 210mm;
    height: 297mm;
  }
  body.print-mode-labels .formtec-multi-page-container {
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  body.print-mode-labels .formtec-page-sheet {
    box-shadow: none !important;
    width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    max-height: 297mm !important;
    margin: 0 auto !important;
    page-break-after: always !important;
    break-after: page !important;
  }
  body.print-mode-labels .formtec-page-sheet:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }
  body.print-mode-labels .label-item {
    border: none !important;
  }

  /* When printing Vertical 105mm x 150mm Lanyard Badges (A4 4-Up Default) */
  body.print-mode-labels .label-sheet.template-LANYARD_105X150 {
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  body.print-mode-labels .lanyard-page-a4-4up {
    width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    max-height: 297mm !important;
    margin: 0 auto !important;
    box-shadow: none !important;
    page-break-after: always !important;
    break-after: page !important;
    display: grid !important;
    grid-template-columns: 105mm 105mm !important;
    grid-template-rows: 148.5mm 148.5mm !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  body.print-mode-labels .lanyard-page-a4-4up:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }
  body.print-mode-labels .lanyard-page-single {
    width: 105mm !important;
    height: 148.5mm !important;
    margin: 0 auto !important;
    page-break-after: always !important;
    break-after: page !important;
  }
  body.print-mode-labels .lanyard-page-single:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }
  body.print-mode-labels .lanyard-page-a4-2up {
    width: 210mm !important;
    height: 148.5mm !important;
    margin: 0 auto !important;
    page-break-after: always !important;
    break-after: page !important;
  }
  body.print-mode-labels .lanyard-page-a4-2up:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }
  body.print-mode-labels .lanyard-badge-card {
    box-shadow: none !important;
    border: 0.3mm dashed #64748b !important;
  }
  body.print-mode-labels .lanyard-badge-card.lanyard-badge-empty {
    border: 0.25mm dashed #cbd5e1 !important;
    background: transparent !important;
  }
  body.print-mode-labels .lanyard-empty-hint {
    color: #94a3b8 !important;
    font-size: 8.5pt !important;
  }

  /* When printing A4 1-Page Report */
  body.print-mode-report .module-section {
    display: none !important;
  }
  body.print-mode-report #module-d {
    display: block !important;
  }
  body.print-mode-report .d-controls-bar {
    display: none !important;
  }
  body.print-mode-report .a4-report-sheet {
    box-shadow: none !important;
    width: 210mm;
    height: 297mm;
    max-height: 297mm;
    padding: 10mm 12mm;
    page-break-after: avoid;
    page-break-inside: avoid;
  }
  body.print-mode-report .a4-report-sheet.a4-multi-page {
    height: auto !important;
    min-height: 285mm;
    max-height: none !important;
    padding: 12mm 12mm;
    display: block !important;
    page-break-after: auto !important;
    page-break-inside: auto !important;
  }
  body.print-mode-report .a4-report-sheet.a4-multi-page .report-table thead {
    display: table-header-group;
  }
  body.print-mode-report .a4-report-sheet.a4-multi-page .report-table tr {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  body.print-mode-report .a4-report-sheet.a4-multi-page .report-sign-box {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}

.univ-clickable-row:hover {
  background: #eff6ff !important;
  cursor: pointer;
}

/* =========================================================
   Vertical 105mm x 150mm Lanyard Badge (A4 1장에 4매 출력 · 학과명 + 다음줄 수험번호 전용)
   ========================================================= */
.label-sheet.template-LANYARD_105X150 {
  width: auto;
  min-height: auto;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.lanyard-page-a4-4up {
  width: 210mm;
  height: 297mm;
  min-height: 297mm;
  max-height: 297mm;
  background: #ffffff;
  display: grid;
  grid-template-columns: 105mm 105mm;
  grid-template-rows: 148.5mm 148.5mm;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  box-sizing: border-box;
  page-break-after: always;
  break-after: page;
  overflow: hidden;
}

.lanyard-page-a4-4up .lanyard-badge-card {
  box-shadow: none;
}

.lanyard-page-single {
  display: flex;
  justify-content: center;
  align-items: center;
}

.lanyard-page-a4-2up {
  width: 210mm;
  height: 148.5mm;
  background: #ffffff;
  display: grid;
  grid-template-columns: repeat(2, 105mm);
  justify-content: center;
  align-items: start;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.lanyard-badge-card {
  width: 105mm;
  height: 148.5mm;
  max-width: 105mm;
  max-height: 148.5mm;
  background: #ffffff;
  border: 0.3mm dashed #64748b;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8mm 6mm;
  gap: 8mm;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
  page-break-inside: avoid;
  break-inside: avoid;
  overflow: hidden;
  position: relative;
}

.lanyard-badge-card.lanyard-badge-empty {
  border: 0.3mm dashed #cbd5e1;
  background: #f8fafc;
  color: #94a3b8;
  box-shadow: none;
}

.lanyard-empty-hint {
  font-size: 10.5pt;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: -0.3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lanyard-dept-line {
  font-size: 22pt;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.25;
  letter-spacing: -0.5px;
  word-break: keep-all;
  max-width: 92mm;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lanyard-exno-line {
  font-family: "Arial Black", "Malgun Gothic", monospace, sans-serif;
  font-size: 40pt;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: 2px;
}

/* =========================================================
   Interviewer Drag & Drop Department Assignment Board
   ========================================================= */
.interviewer-dnd-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
}

.interviewer-pool-box,
.dept-drop-zones-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px;
  transition: border-color 0.15s, background 0.15s;
}

.interviewer-pool-box.drag-over {
  border: 2px dashed #dc2626;
  background: #fef2f2;
}

.dnd-box-header {
  font-size: 11.5px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid #e2e8f0;
}

.interviewer-drag-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 210px;
  overflow-y: auto;
}

.interviewer-drag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #ffffff;
  border: 1.5px solid #2563eb;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #1e3a8a;
  cursor: grab;
  user-select: none;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.12);
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}

.interviewer-drag-chip:hover {
  background: #eff6ff;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(37, 99, 235, 0.2);
}

.interviewer-drag-chip:active {
  cursor: grabbing;
}

.dept-drop-zones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 8px;
  max-height: 210px;
  overflow-y: auto;
}

.dept-drop-zone {
  background: #ffffff;
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  padding: 8px;
  min-height: 68px;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}

.dept-drop-zone.drag-over {
  border-color: #2563eb;
  background: #dbeafe;
  transform: scale(1.01);
}

.dept-drop-zone-title {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dept-assigned-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.assigned-interviewer-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  cursor: grab;
}

.mismatch-row-highlight {
  background: #fff1f2 !important;
}

.mon-dept-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.mon-dept-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.16);
}

