:root {
  --bg-page: #f3f5f9;
  --bg-card: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-tab: #f1f5f9;
  --border-color: #e5e9f0;
  --border-input: #dce2ec;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --blue-primary: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-soft: #eff6ff;
  --blue-border: #bfdbfe;
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;
  --amber-text: #b45309;
  --green-bg: #ecfdf5;
  --green-text: #047857;
  --red-bg: #fef2f2;
  --red-text: #dc2626;
  --radius-card: 16px;
  --radius-panel: 14px;
  --radius-input: 10px;
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.app-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 24px 48px;
}

/* ==================== HEADER CARD ==================== */
.header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 20px 24px;
  margin-bottom: 16px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.title-row h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #64748b;
}

.status-badge.status-active {
  background: var(--blue-soft);
  color: var(--blue-primary);
}

.subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
}

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

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 9px;
  padding: 8px 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(0.5px);
}

.btn-primary {
  background: var(--blue-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--blue-hover);
}

.btn-diag {
  background: var(--amber-bg);
  border-color: var(--amber-border);
  color: var(--amber-text);
}

.btn-diag:hover {
  background: #fef3c7;
}

.btn-list {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #334155;
}

.btn-list:hover {
  background: #e2e8f0;
}

.btn-outline-blue {
  background: #ffffff;
  border-color: var(--blue-border);
  color: var(--blue-primary);
}

.btn-outline-blue:hover {
  background: var(--blue-soft);
}

.btn-full {
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}

.btn-xs {
  padding: 4px 9px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}

.btn-xs-blue {
  background: var(--blue-soft);
  color: var(--blue-primary);
  border-color: var(--blue-border);
}

.btn-xs-danger {
  background: var(--red-bg);
  color: var(--red-text);
  border-color: #fecaca;
}

/* ==================== TAB BAR ==================== */
.tab-bar {
  margin-top: 18px;
  background: var(--bg-tab);
  border-radius: 12px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.tab-btn {
  border: none;
  background: transparent;
  padding: 9px 12px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.tab-btn.active {
  background: #ffffff;
  color: var(--blue-primary);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* ==================== MAIN CARD & PANELS ==================== */
.main-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

.card-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

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

.setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.panel-box {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-panel);
  padding: 20px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.panel-title {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

.panel-title-inline {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
}

.text-center {
  text-align: center;
}

.mb-0 { margin-bottom: 0 !important; }
.mt-16 { margin-top: 16px; }
.mt-18 { margin-top: 18px; }

/* ==================== FORM CONTROLS ==================== */
.form-group {
  margin-bottom: 14px;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  margin-bottom: 6px;
}

.field-label-bold {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.text-input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-input);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-primary);
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.text-input::placeholder {
  color: #94a3b8;
}

.text-input:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.textarea-input {
  height: auto;
  padding: 10px 14px;
  resize: vertical;
}

.compact-input {
  height: 38px;
  padding: 0 11px;
  font-size: 13px;
  border-radius: 8px;
}

.days-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.days-input-wrap {
  flex: 1;
  height: 42px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-input);
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
}

.days-input-wrap:focus-within {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.input-icon {
  color: #64748b;
  flex-shrink: 0;
}

.days-prefix,
.days-suffix {
  font-size: 13px;
  color: #475569;
}

.days-number-input {
  width: 44px;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  background: transparent;
}

.btn-apply {
  height: 42px;
  padding: 0 22px;
  border-radius: var(--radius-input);
}

.helper-note {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: #94a3b8;
}

.panel-divider {
  border: none;
  border-top: 1px solid #f1f5f9;
  margin: 18px 0;
}

.section-header-inline {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
}

.section-icon {
  color: #475569;
}

.auto-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #3b82f6;
  font-size: 11px;
  font-weight: 600;
}

/* ==================== CRITERIA GRID ==================== */
.criteria-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.criteria-card {
  border: 1px solid var(--border-input);
  border-radius: 10px;
  padding: 10px 12px;
  background: #ffffff;
}

.criteria-label {
  display: block;
  font-size: 11.5px;
  color: #64748b;
  margin-bottom: 6px;
}

.criteria-input-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.time-input {
  width: 100%;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  background: transparent;
  cursor: pointer;
}

.rate-wrap {
  gap: 4px;
}

.rate-input {
  width: 100%;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  background: transparent;
}

.rate-unit {
  font-size: 13px;
  color: #64748b;
  font-weight: 600;
}

/* ==================== GUIDE BUTTONS ==================== */
.guide-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-guide-view {
  background: var(--amber-bg);
  border-color: var(--amber-border);
  color: var(--amber-text);
  padding: 10px 12px;
  border-radius: 10px;
}

.btn-guide-view:hover {
  background: #fef3c7;
}

.btn-guide-replace {
  background: #ffffff;
  border-color: var(--border-input);
  color: #334155;
  padding: 10px 12px;
  border-radius: 10px;
}

.btn-guide-replace:hover {
  background: #f8fafc;
}

.guide-links-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.link-btn-muted,
.link-btn-blue {
  background: none;
  border: none;
  padding: 2px 0;
  font-family: inherit;
  font-size: 11.5px;
  text-decoration: underline;
  cursor: pointer;
}

.link-btn-muted {
  color: #94a3b8;
}

.link-btn-muted:hover {
  color: #64748b;
}

.link-btn-blue {
  color: #3b82f6;
}

.link-btn-blue:hover {
  color: var(--blue-primary);
}

/* ==================== RIGHT PANEL: DROPZONE & TRAINEES ==================== */
.dropzone {
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  padding: 26px 16px;
  text-align: center;
  background: #fafcff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--blue-primary);
  background: var(--blue-soft);
}

.dropzone-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: #3b82f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.dropzone-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

.dropzone-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #94a3b8;
}

.trainee-section {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.trainee-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.trainee-quick-actions {
  display: flex;
  gap: 6px;
}

.manual-add-row {
  display: grid;
  grid-template-columns: 1.05fr 0.85fr 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}

.btn-add {
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
}

.trainee-list-box {
  flex: 1;
  min-height: 205px;
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #ffffff;
}

.empty-trainee-state {
  height: 100%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.empty-trainee-state strong {
  font-size: 13.5px;
  color: #64748b;
  font-weight: 600;
}

.empty-trainee-state span {
  margin-top: 4px;
  font-size: 12px;
  color: #94a3b8;
}

.trainee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 1px solid #f1f5f9;
  gap: 10px;
  font-size: 13px;
}

.trainee-row:last-child {
  border-bottom: none;
}

.trainee-row:hover {
  background: #f8fafc;
}

.trainee-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.trainee-no {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trainee-name {
  font-weight: 700;
  color: var(--text-primary);
}

.trainee-meta {
  font-size: 12px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trainee-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ==================== TAB 2: QR SCANNER ==================== */
.scanner-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill-btn {
  border: 1px solid var(--border-input);
  background: #ffffff;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.pill-btn.active {
  background: var(--blue-primary);
  border-color: var(--blue-primary);
  color: #ffffff;
}

.clock-group {
  align-items: flex-end;
}

.live-clock {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.live-judge-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--green-bg);
  color: var(--green-text);
}

.live-judge-badge.late {
  background: var(--amber-bg);
  color: var(--amber-text);
}

.scanner-cam-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.camera-viewport {
  position: relative;
  width: 100%;
  height: 280px;
  border-radius: 12px;
  background: #0f172a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-viewport video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-placeholder {
  text-align: center;
  color: #cbd5e1;
  padding: 20px;
}

.camera-placeholder p {
  margin: 10px 0 4px;
  font-size: 13.5px;
}

.camera-placeholder span {
  font-size: 12px;
  color: #94a3b8;
}

.scan-overlay {
  position: absolute;
  width: 170px;
  height: 170px;
  border: 2px solid #38bdf8;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.35);
  pointer-events: none;
}

.scan-feedback {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}

.scan-feedback.success {
  background: var(--green-bg);
  color: var(--green-text);
  border: 1px solid #a7f3d0;
}

.scan-feedback.late {
  background: var(--amber-bg);
  color: var(--amber-text);
  border: 1px solid var(--amber-border);
}

.scan-feedback.error {
  background: var(--red-bg);
  color: var(--red-text);
  border: 1px solid #fecaca;
}

.manual-qr-form {
  display: flex;
  gap: 8px;
}

.quick-checkin-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
  padding: 4px 0;
}

.checkin-chip {
  border: 1px solid var(--border-input);
  background: #f8fafc;
  color: #334155;
  padding: 6px 10px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.checkin-chip:hover {
  border-color: var(--blue-primary);
  background: var(--blue-soft);
  color: var(--blue-primary);
}

.checkin-chip.done-present {
  background: var(--green-bg);
  border-color: #a7f3d0;
  color: var(--green-text);
}

.checkin-chip.done-late {
  background: var(--amber-bg);
  border-color: var(--amber-border);
  color: var(--amber-text);
}

.scan-logs-list {
  max-height: 190px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scan-log-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 12.5px;
}

/* ==================== TAB 3: ATTENDANCE MATRIX ==================== */
.attendance-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.kpi-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--bg-subtle);
}

.kpi-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.kpi-value {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.attendance-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.search-input {
  max-width: 280px;
  height: 36px;
  font-size: 13px;
}

.status-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: #64748b;
  flex-wrap: wrap;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.dot-present { background: #10b981; }
.dot-late { background: #f59e0b; }
.dot-absent { background: #ef4444; }
.dot-none { background: #cbd5e1; }

.table-scroll-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.attendance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 720px;
}

.attendance-table th,
.attendance-table td {
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f1f5f9;
  padding: 8px 10px;
  text-align: center;
  white-space: nowrap;
}

.attendance-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
}

.attendance-table td.text-left {
  text-align: left;
}

.att-cell-btn {
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  min-width: 44px;
}

.att-none { background: #f1f5f9; color: #94a3b8; }
.att-present { background: var(--green-bg); color: var(--green-text); }
.att-late { background: var(--amber-bg); color: var(--amber-text); }
.att-absent { background: var(--red-bg); color: var(--red-text); }

.pass-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}

.pass-yes { background: var(--green-bg); color: var(--green-text); }
.pass-no { background: var(--red-bg); color: var(--red-text); }

/* ==================== COURSE LIST VIEW ==================== */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.course-card {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.course-card:hover {
  border-color: var(--blue-border);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.course-card h3 {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.course-card-meta {
  font-size: 12.5px;
  color: #64748b;
}

.course-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* ==================== MODALS & TOAST ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-lg {
  max-width: 780px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  border: none;
  background: none;
  font-size: 22px;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
  flex-wrap: wrap;
}

.diag-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}

.guide-poster {
  border: 2px solid #1e293b;
  border-radius: 12px;
  padding: 28px;
  background: #ffffff;
  text-align: center;
}

.guide-poster h2 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #0f172a;
}

.guide-poster-course {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-primary);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

.guide-poster-list {
  text-align: left;
  max-width: 520px;
  margin: 0 auto 20px;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.8;
  color: #334155;
}

.guide-poster-footer {
  padding: 12px;
  border-radius: 8px;
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  color: var(--amber-text);
  font-weight: 700;
  font-size: 13.5px;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.qr-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  background: #ffffff;
}

.qr-card canvas,
.qr-card img {
  margin: 0 auto 8px;
  display: block;
}

.qr-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.qr-card-meta {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  animation: fadeInUp 0.2s ease;
}

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

@media (max-width: 960px) {
  .setup-grid {
    grid-template-columns: 1fr;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .app-container {
    padding: 12px;
  }
  .criteria-grid {
    grid-template-columns: 1fr;
  }
  .manual-add-row {
    grid-template-columns: 1fr 1fr;
  }
  .manual-add-row .btn-add {
    grid-column: span 2;
  }
}
