:root {
  --bg: #f3f6f4;
  --bg-elevated: #ffffff;
  --bg-soft: #e8f0eb;
  --ink: #14201a;
  --ink-muted: #5c6f64;
  --line: #d5e0d9;
  --accent: #0f6b4c;
  --accent-soft: #d8f0e5;
  --accent-strong: #0a4f38;
  --warn: #b86a12;
  --warn-soft: #fff1dc;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --info: #1d4f91;
  --info-soft: #e8f0fb;
  --shadow: 0 12px 40px rgba(20, 32, 26, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar: 280px;
  --font: "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  --display: "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  --panel-title-size: 1.15rem;
  --card-gap: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { overflow-y: auto; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 107, 76, 0.08), transparent 32%),
    linear-gradient(180deg, #f7faf8 0%, var(--bg) 100%);
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

#app {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  align-items: start;
  min-height: 100vh;
  min-width: 0;
  max-width: 100%;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  padding: 24px 18px;
  background: linear-gradient(180deg, #0f2f24 0%, #174536 100%);
  color: #edf7f1;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px; }
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #fff;
  overflow: hidden;
}
.brand-mark img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.brand-title { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.brand-sub { font-size: 0.78rem; opacity: 0.72; margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 8px; }
.nav-item {
  border: 0; text-align: left; padding: 12px 14px; border-radius: 12px;
  background: transparent; color: inherit; transition: 0.18s ease;
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}
a.nav-item {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.nav-item:hover { background: rgba(255,255,255,0.08); }
.nav-item.active { background: rgba(255,255,255,0.14); font-weight: 600; }
.nav-external-icon {
  font-size: 0.85rem;
  opacity: 0.65;
  flex-shrink: 0;
  margin-left: auto;
}
.nav-dev-badge {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  opacity: 0.62;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-group { display: flex; flex-direction: column; gap: 4px; }
.nav-group-toggle {
  border: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: 0.18s ease;
}
.nav-group-toggle:hover { background: rgba(255,255,255,0.08); }
.nav-group.open .nav-group-toggle,
.nav-group.has-active .nav-group-toggle {
  background: rgba(255,255,255,0.08);
  font-weight: 600;
}
.nav-group-chevron {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(237, 247, 241, 0.75);
  transition: transform 0.18s ease;
}
.nav-group.open .nav-group-chevron { transform: rotate(180deg); }
.nav-group-items {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 0 0 2px 8px;
}
.nav-group.open .nav-group-items {
  display: flex;
}
.nav-group-items[hidden] {
  display: none !important;
}
.nav-item.nav-sub {
  padding: 10px 12px 10px 16px;
  font-size: 0.92rem;
  opacity: 0.92;
}

.sidebar-footer {
  margin-top: auto; display: flex; align-items: center; gap: 8px;
  padding: 12px; border-radius: 12px; background: rgba(0,0,0,0.18);
  font-size: 0.86rem;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #9aaea3;
}
.sidebar-footer.ready .status-dot { background: #49d18d; }

.main {
  padding: 28px 32px 48px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}
.topbar {
  display: flex; justify-content: space-between; gap: 16px;
  align-items: flex-start; margin-bottom: 22px;
  flex-wrap: wrap;
  min-width: 0;
}
.topbar > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}
.topbar h1 {
  margin: 0; font-family: var(--display); font-size: 1.7rem; letter-spacing: -0.02em;
}
.muted { color: var(--ink-muted); margin: 6px 0 0; overflow-wrap: anywhere; word-break: keep-all; }
.company-repeat-note { margin-top: 14px; font-size: 0.92rem; line-height: 1.55; }
.company-repeat-note b { color: var(--ink); font-weight: 700; }
#pageDesc,
.topbar .muted {
  font-size: 0.85rem;
  line-height: 1.45;
  white-space: pre-line;
}
.panel-hint {
  margin: 0 0 12px;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--ink-muted);
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
}
.college-stats-caption {
  margin: 6px 0 10px;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--ink-muted);
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
}
.college-stats-caption + .college-stats-caption {
  margin-top: 2px;
}
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.topbar-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.account-area { display: flex; align-items: center; gap: 8px; }
.admin-lock-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.admin-lock-btn:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}
.admin-lock-btn.is-unlocked {
  color: var(--accent-strong);
  border-color: rgba(15, 107, 76, 0.35);
  background: var(--accent-soft);
}
.admin-lock-svg {
  width: 20px;
  height: 20px;
  display: block;
}
.account-name { font-weight: 600; white-space: nowrap; }

.login-root {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at top left, rgba(15, 107, 76, 0.16), transparent 38%), #eef4f0;
}
.login-root.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  min-height: 0;
  background: rgba(12, 24, 18, 0.45);
  backdrop-filter: blur(2px);
}
.login-card {
  width: min(100%, 420px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 32px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.login-card.login-card-compact {
  width: min(100%, 320px);
  gap: 12px;
  padding: 20px 22px;
  border-radius: 16px;
}
.login-card h1 { margin: 0; font-size: 1.5rem; }
.login-card.login-card-compact h1 { font-size: 1.15rem; }
.login-card.login-card-compact .login-brand { font-size: 0.85rem; }
.login-card.login-card-compact .muted { font-size: 0.84rem; line-height: 1.4; margin: 0; }
.login-card.login-card-compact label { gap: 6px; font-size: 0.9rem; }
.login-card.login-card-compact input { padding: 10px 12px; }
.login-brand { color: var(--accent); font-weight: 700; }
.login-card label { display: flex; flex-direction: column; gap: 8px; font-weight: 600; }
.login-card input { padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.login-card input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.login-error { padding: 10px 12px; border-radius: 10px; color: var(--danger); background: var(--danger-soft); }
.login-card.login-card-compact .login-error { padding: 8px 10px; font-size: 0.84rem; }
.login-actions { display: flex; gap: 8px; justify-content: flex-end; }
.user-form { display: grid; grid-template-columns: 1fr 1fr 1fr 1.4fr auto; gap: 12px; align-items: end; }
.user-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.user-form input, .user-form select, table input, table select { width: 100%; min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.inline-check { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.inline-check input { width: auto; min-width: 0; }

.btn {
  border: 1px solid var(--line); background: var(--bg-elevated); color: var(--ink);
  padding: 10px 14px; border-radius: 999px; font-weight: 500;
}
.btn:hover { border-color: #b7c9bf; }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: white;
}
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--danger-soft); border-color: #f2c4c0; color: var(--danger); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.view-root {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
  min-height: auto;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}
.view-cache-panel {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
  min-width: 0;
  max-width: 100%;
}
#empBody {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
  min-width: 0;
}
#empBody > [data-emp-section] {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
  min-width: 0;
}

.panel {
  background: var(--bg-elevated); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
  min-width: 0;
  max-width: 100%;
}
.panel h2, .panel h3 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: var(--panel-title-size);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.panel-header {
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  margin-bottom: 14px;
  flex-wrap: wrap;
  min-width: 0;
}
.panel-header > :first-child {
  min-width: 0;
  flex: 1 1 auto;
}
.panel-header h2, .panel-header h3 { margin: 0; font-size: var(--panel-title-size); }
.panel-header p,
.panel-header .panel-note,
.panel-header .panel-hint {
  margin: 6px 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--ink-muted);
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
  hyphens: none;
}
.panel-header .title-cross {
  white-space: nowrap;
  letter-spacing: -0.03em;
  font-size: var(--panel-title-size);
}
.panel-header .times {
  margin: 0 0.04em;
  font-weight: inherit;
}
.panel-title-note {
  font-size: 0.82rem;
  font-weight: 400;
  margin-left: 6px;
  white-space: nowrap;
}

.grid { display: grid; gap: var(--card-gap); align-items: stretch; }
.grid > * { min-width: 0; }
.grid-1 { grid-template-columns: minmax(0, 1fr); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.trend-dup-split {
  align-items: stretch;
  gap: var(--card-gap);
}
.trend-dup-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
}
.trend-dup-col > .panel-header {
  flex: 0 0 auto;
}
.trend-dup-col > .table-wrap {
  flex: 0 0 auto;
}
.trend-dup-col > .chart-box {
  flex: 1 1 auto;
  min-height: 200px;
  height: auto !important;
  margin-bottom: 12px;
}
.trend-dup-panel {
  padding: 20px;
}
.summary-dash-stack {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
}
.dash-slot {
  position: relative;
  min-width: 0;
}
.dash-slot-body {
  min-width: 0;
}
.summary-dash-reorder > .dash-slot {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}
.dash-drag-handle {
  display: none;
  align-items: flex-start;
  justify-content: center;
  width: 28px;
  margin: 0;
  padding: 18px 0 0;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.summary-dash-reorder .dash-drag-handle {
  display: inline-flex;
}
.dash-drag-handle:active {
  cursor: grabbing;
}
.dash-drag-grip {
  display: block;
  width: 10px;
  height: 16px;
  background-image: radial-gradient(currentColor 1.2px, transparent 1.3px);
  background-size: 5px 5px;
  background-position: 0 0;
  opacity: 0.55;
}
.dash-slot.is-dragging {
  opacity: 0.55;
}
.dash-slot.is-drop-target > .dash-slot-body > .panel,
.dash-slot.is-drop-target > .dash-slot-body {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent-strong, #0f6b4c) 45%, transparent);
}
table.table-trend-compact {
  table-layout: fixed;
  width: 100%;
}
table.table-trend-compact th,
table.table-trend-compact td {
  text-align: center;
  vertical-align: middle;
  padding: 8px 10px;
}
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi-stack { display: flex; flex-direction: column; gap: 12px; }

.kpi-card {
  display: grid;
  grid-template-rows: 2.6em 2.8em 1.35em;
  row-gap: 8px;
  align-content: stretch;
  min-height: 118px;
  background: linear-gradient(180deg, #ffffff, #f7fbf8);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 14px;
}
/* 주요 수치 KPI: 박스는 낮게, 숫자는 크게 */
.kpi-card.kpi-compact {
  min-height: 0;
  grid-template-rows: auto auto auto;
  row-gap: 2px;
  padding: 10px 14px;
  border-radius: 14px;
}
.kpi-card.kpi-compact .kpi-label {
  font-size: 0.74rem;
  -webkit-line-clamp: 1;
}
.kpi-card.kpi-compact .kpi-value {
  font-size: clamp(1.7rem, 2.1vw + 1rem, 2.35rem);
  line-height: 1.08;
  -webkit-line-clamp: 1;
  letter-spacing: -0.04em;
}
.kpi-card.kpi-compact .kpi-sub {
  font-size: 0.72rem;
}
/* 동일 기업 재상담: 패널 너비에 맞춘 중간 크기 */
.dup-kpi-caption {
  margin: 14px 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}
.dup-kpi-row + .dup-kpi-caption {
  margin-top: 16px;
}
.dup-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.dup-kpi-row .kpi-card {
  width: auto;
  max-width: none;
  min-height: 92px;
  grid-template-rows: auto auto auto;
  row-gap: 4px;
  align-content: center;
  padding: 12px 14px;
  border-radius: 14px;
}
.dup-kpi-row .kpi-label {
  display: -webkit-box;
  font-size: 0.8rem;
  line-height: 1.3;
  white-space: normal;
  -webkit-line-clamp: 2;
}
.dup-kpi-row .kpi-value {
  font-size: clamp(1.35rem, 1.2vw + 0.9rem, 1.7rem);
  line-height: 1.1;
}
.dup-kpi-row .kpi-sub {
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--ink-muted);
}
/* 최다 희망기업·관심직무: 박스는 낮게, 결과 텍스트는 크게 */
.kpi-card.kpi-top {
  min-height: 0;
  grid-template-rows: auto minmax(1.4em, auto) auto;
  row-gap: 4px;
  padding: 10px 14px;
  border-radius: 14px;
}
.kpi-card.kpi-top .kpi-label {
  font-size: 0.74rem;
  -webkit-line-clamp: 1;
}
.kpi-card.kpi-top .kpi-value {
  font-size: clamp(1.28rem, 1.5vw + 0.95rem, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  -webkit-line-clamp: 2;
}
.kpi-card.kpi-top .kpi-sub {
  font-size: 0.78rem;
}
.kpi-next {
  font-weight: 600;
  font-size: 0.78em;
  color: var(--ink-muted);
  letter-spacing: -0.02em;
}
.kpi-label {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.3;
  color: var(--ink-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
}
.kpi-value {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.1vw + 0.7rem, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
  overflow-wrap: anywhere;
  align-self: start;
}
.kpi-sub {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  align-self: end;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.filters > * { min-width: 0; }
.emp-filter-panel .filters {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.emp-data-criteria {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  min-height: 32px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.emp-data-criteria-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label,
.career-filter-label {
  font-family: var(--font);
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-weight: 500;
  letter-spacing: 0;
}
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  background: #fff; color: var(--ink);
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.field textarea { min-height: 90px; resize: vertical; }
.field-period {
  min-width: 0;
}
.field-period-controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.field-period-controls > select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 42px;
  padding: 10px 12px;
  line-height: 1.4;
}
.field-period-controls .period-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.field-period-controls .period-extra select,
.field-period-controls .period-extra input[type="date"] {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  min-height: 42px;
  padding: 10px 12px;
  line-height: 1.4;
}
.field-period-controls .period-sep {
  color: var(--ink-muted);
  font-size: 0.85rem;
}
.field-consult-type {
  position: relative;
  z-index: 2;
}
.field-consult-type .multi-dd {
  position: relative;
  min-width: 0;
}
.field-consult-type .multi-dd.is-open {
  z-index: 40;
}
.multi-dd-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.multi-dd-trigger-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.multi-dd-caret {
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--ink-muted);
}
.multi-dd.is-open .multi-dd-caret {
  transform: rotate(180deg);
}
.multi-dd-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 220px;
  max-height: min(320px, 55vh);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(20, 24, 32, 0.12);
  overflow: hidden;
}
.multi-dd-panel[hidden] {
  display: none !important;
}
.multi-dd-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.multi-dd-actions .btn {
  padding: 4px 8px;
  font-size: 0.78rem;
  border-radius: 8px;
}
.multi-dd-list {
  overflow: auto;
  padding: 4px 0;
}
.multi-dd-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 4px 10px;
  min-height: 0;
  font-size: 0.86rem;
  line-height: 1.25;
  color: var(--ink);
  cursor: pointer;
}
.multi-dd-option:hover {
  background: rgba(20, 24, 32, 0.04);
}
/* .field input { width:100% } 때문에 체크박스가 한 줄을 독점하지 않도록 덮어씀 */
.field .multi-dd-option input[type="checkbox"],
.multi-dd-option input[type="checkbox"] {
  box-sizing: border-box;
  width: 14px;
  height: 14px;
  min-width: 14px;
  max-width: 14px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  flex: 0 0 14px;
  align-self: center;
  appearance: auto;
}
.multi-dd-option > span {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.multi-dd-empty {
  margin: 8px 10px;
  font-size: 0.85rem;
}

.period-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}
.period-bar .period-label {
  font-size: 0.86rem;
  color: var(--ink-muted);
  font-weight: 600;
  white-space: nowrap;
}
.period-bar select,
.period-bar input[type="date"] {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
  min-width: 0;
  max-width: 100%;
}
.period-bar .period-sep {
  color: var(--ink-muted);
  font-size: 0.85rem;
}
.period-bar .period-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.career-filter-panel {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
}
.career-view-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 0 0 8px;
}
.career-q-result-head {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
  flex: 0 1 auto;
}
.panel-header > .career-q-result-head {
  flex: 0 1 auto;
}
.career-q-result-head h3 {
  margin: 0;
}
.career-q-result-head #downloadCareerSelections,
.career-q-excel-dl {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  min-height: 0;
}
.career-filter-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.career-view-toggle {
  margin-left: 0;
  flex: 0 0 auto;
  box-sizing: border-box;
  height: 38px;
}
.career-filter-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  flex: 0 1 auto;
}
.career-filter-label {
  white-space: nowrap;
  line-height: 1.2;
  min-height: 1.2em;
}
.career-filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}
.career-filter-group select,
.career-filter-group input[type="date"] {
  box-sizing: border-box;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 12px;
  background: #fff;
  color: var(--ink);
  min-width: 0;
  max-width: 100%;
}
.career-filter-college { flex: 0 1 220px; min-width: 140px; max-width: 260px; }
.career-filter-college select { min-width: 0; width: 100%; }
.career-data-criteria {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  min-height: 38px;
  padding: 0 10px;
  border-left: 1px solid var(--line);
}
.career-filter-group .period-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}
.career-filter-group .period-extra:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
}
.career-filter-group .period-sep {
  color: var(--ink-muted);
  font-size: 0.85rem;
}
.career-filter-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.career-view-toggle label {
  gap: 5px;
  padding: 4px 10px;
  font-size: 0.76rem;
}
.career-view-icon {
  width: 14px;
  height: 14px;
  display: block;
  flex: 0 0 auto;
}
.career-panel-radios {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  align-self: flex-start;
  margin: 12px 0 14px;
  padding: 2px 0;
}
.career-panel-radio {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  cursor: pointer;
  user-select: none;
  font-size: 0.88rem;
  color: var(--ink-muted);
  font-weight: 500;
}
.career-panel-radio input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.career-panel-dot {
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: #fff;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  transition: border-color 0.12s ease;
}
.career-panel-dot::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.12s ease;
}
.career-panel-radio:hover {
  color: var(--ink);
}
.career-panel-radio:hover .career-panel-dot {
  border-color: var(--accent);
}
.career-panel-radio input:checked + .career-panel-dot {
  border-color: var(--accent);
}
.career-panel-radio input:checked + .career-panel-dot::after {
  transform: scale(1);
}
.career-panel-radio input:checked ~ span:last-child {
  color: var(--accent-strong);
  font-weight: 700;
}
.career-section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 2px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}
.career-section-label span {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef5f1;
  color: var(--accent-strong);
  border: 1px solid #d7e8df;
}
.career-section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* 진로개발 공통 KPI: 박스 축소 · 숫자 강조 */
.career-common-kpi {
  padding: 10px 14px !important;
}
.career-common-kpi .kpi-card.kpi-compact {
  min-height: 0;
  grid-template-rows: auto auto auto;
  row-gap: 2px;
  padding: 10px 14px;
  border-radius: 14px;
}
.career-common-kpi .kpi-card.kpi-compact .kpi-label {
  font-size: 0.74rem;
  -webkit-line-clamp: 1;
}
.career-common-kpi .kpi-card.kpi-compact .kpi-value {
  font-size: clamp(1.65rem, 2vw + 1rem, 2.25rem);
  line-height: 1.1;
  -webkit-line-clamp: 1;
}
.career-common-kpi .kpi-card.kpi-compact .kpi-sub {
  font-size: 0.72rem;
}

.career-insight-summary {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.career-insight-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.career-insight-summary ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.career-insight-summary li {
  position: relative;
  padding-left: 14px;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink);
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
}
.career-insight-summary li strong {
  font-weight: 700;
  color: var(--ink);
}
.career-insight-summary li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.college-top-period-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.college-top-period-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7faf8;
  padding: 12px 14px;
}
.college-top-period-card .ctp-college {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 8px;
}
.college-top-period-card .ctp-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 4.5ch;
  align-items: center;
  column-gap: 8px;
  font-size: 0.82rem;
  margin-top: 4px;
}
.college-top-period-card .ctp-rank {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: #dfece6;
  color: var(--accent-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex: 0 0 auto;
}
.college-top-period-card .ctp-rank.top { background: var(--accent); color: #fff; }
.college-top-period-card .ctp-period {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.college-top-period-card .ctp-count {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-size: 0.86rem;
}
.chip input { accent-color: var(--accent); }

.emp-company-toggle label {
  gap: 5px;
  padding: 4px 10px;
  font-size: 0.76rem;
}
.emp-mode-icon {
  width: 14px;
  height: 14px;
  display: block;
  flex: 0 0 auto;
}

/* 취업희망정보 노출 옵션 — 헤드형 밑줄 탭 */
.emp-section-nav {
  display: block;
  margin: 0;
  padding: 4px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  /* none이면 탭이 제스처로 잡혀 클릭이 늦거나 먹히지 않는다 */
  touch-action: manipulation;
  overscroll-behavior-x: contain;
}
.emp-section-nav-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  width: max-content;
  min-width: 100%;
  box-sizing: border-box;
}
.emp-section-opt {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  border-radius: 0;
  padding: 8px 4px 12px;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
  flex: 1 1 0;
  text-align: center;
  min-width: 0;
}
.emp-section-opt::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -1px;
  height: 2.5px;
  border-radius: 1px;
  background: transparent;
}
.emp-section-opt:hover {
  color: var(--ink);
  background: transparent;
}
.emp-section-opt.active {
  background: transparent;
  color: var(--accent-strong);
  font-weight: 800;
  box-shadow: none;
}
.emp-section-opt.active::after {
  background: var(--accent);
}

.emp-filter-panel {
  padding-top: 14px;
}
.emp-view-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 0;
}
.emp-company-toggle {
  flex: 0 0 auto;
  box-sizing: border-box;
  height: 38px;
}

/* 화면 구성: 체크리스트형 (타원 칩 대신) */
.widget-compose {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 14px;
  padding-left: 0;
}
.widget-compose-hint {
  margin: 0;
  width: 100%;
  text-align: right;
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.4;
  word-break: keep-all;
}
.widget-check-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px 18px;
  width: 100%;
  overflow: visible;
}
.widget-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  cursor: pointer;
  user-select: none;
  font-size: 0.78rem;
  color: var(--ink);
  white-space: nowrap;
  flex: 0 0 auto;
}
.widget-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.widget-check-box {
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--line);
  border-radius: 3px;
  background: #fff;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.widget-check-box::after {
  content: "";
  width: 8px;
  height: 5px;
  border-left: 1.7px solid #fff;
  border-bottom: 1.7px solid #fff;
  transform: rotate(-45deg) translateY(-1px) scale(0);
  transition: transform 0.12s ease;
}
.widget-check:hover .widget-check-box {
  border-color: var(--accent);
}
.widget-check input:checked + .widget-check-box {
  background: var(--accent);
  border-color: var(--accent);
}
.widget-check input:checked + .widget-check-box::after {
  transform: rotate(-45deg) translateY(-1px) scale(1);
}
.widget-check input:checked ~ .widget-check-label {
  color: var(--accent-strong);
  font-weight: 600;
}

/* 목록형/그래프형 등 보기 전환 — 작고 심플 */
.panel-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 12px;
  min-width: 0;
}
.panel-title-row h2 {
  margin: 0;
}
.college-scheme-checks {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
}
.college-grad-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.college-grad-check input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--accent-strong, #0f6b4c);
  cursor: pointer;
}

.college-panel-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.panel-note {
  margin: 6px 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
  hyphens: none;
}

.viz-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
  flex: 0 0 auto;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f6f4;
}
.viz-toggle label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 3px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.viz-toggle label:has(input:checked) {
  background: #fff;
  color: var(--accent-strong);
  box-shadow: 0 1px 2px rgba(20, 40, 30, 0.08);
}
.viz-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 100%;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  cursor: grab;
}
.table-wrap:active { cursor: grabbing; }
th.th-has-tip {
  position: relative;
  cursor: help;
}
th.th-has-tip .th-tip {
  display: none;
  position: absolute;
  left: 50%;
  top: calc(100% + 3px);
  transform: translateX(-50%);
  z-index: 8;
  padding: 2px 6px;
  border-radius: 4px;
  background: #14201a;
  color: #edf7f1;
  font-size: 0.62rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--shadow);
}
th.th-has-tip:hover .th-tip,
th.th-has-tip:focus-within .th-tip {
  display: block;
}
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.table-wrap:has(.table-stage-change) {
  width: max-content;
  max-width: 100%;
}
.table-stage-change {
  width: auto;
}
.table-stage-change th,
.table-stage-change td {
  padding-left: 10px;
  padding-right: 10px;
}
.table-stage-change th:nth-child(1),
.table-stage-change td:nth-child(1) {
  text-align: right;
  padding-right: 6px;
}
.table-stage-change th:nth-child(2),
.table-stage-change td:nth-child(2) {
  text-align: center;
  padding-left: 0;
  padding-right: 0;
  color: var(--ink-muted);
}
.table-stage-change th:nth-child(3),
.table-stage-change td:nth-child(3) {
  padding-left: 6px;
  padding-right: 16px;
}
.table-stage-change th:nth-child(4),
.table-stage-change td:nth-child(4) {
  padding-left: 16px;
  text-align: right;
}
.stage-arrow {
  font-size: 0.95rem;
  line-height: 1;
}
.prep-change-body {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 22px;
  align-items: stretch;
  margin-top: 16px;
}
.prep-month-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.prep-month-side h3 {
  margin: 0;
  font-size: var(--panel-title-size);
}
.prep-month-side .chart-box {
  flex: 1 1 auto;
  height: auto;
  min-height: 420px;
}
.dash-reorder-hint {
  margin: -4px 0 10px;
  text-align: right;
}
@media (max-width: 1100px) {
  .summary-dash-reorder > .dash-slot {
    grid-template-columns: 22px minmax(0, 1fr);
  }
  .dash-drag-handle {
    width: 22px;
    padding-top: 16px;
  }
  .emp-data-criteria {
    gap: 8px 12px;
  }
  .dash-reorder-hint {
    text-align: left;
    font-size: 0.72rem;
  }
}
@media (max-width: 700px) {
  .prep-change-body {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .prep-month-side .chart-box {
    height: 300px;
    min-height: 300px;
  }
  .table-wrap:has(.table-stage-change) {
    width: 100%;
  }
  .table-stage-change {
    width: 100%;
    table-layout: fixed;
  }
  /* 이전↔다음 간격 확보, 학생 수는 오른쪽 열 안에서 가운데 */
  .table-stage-change th:nth-child(1),
  .table-stage-change td:nth-child(1) {
    width: 28%;
    text-align: right;
    padding-left: 6px;
    padding-right: 12px;
  }
  .table-stage-change th:nth-child(2),
  .table-stage-change td:nth-child(2) {
    width: 12%;
    text-align: center;
    padding-left: 8px;
    padding-right: 8px;
  }
  .table-stage-change th:nth-child(3),
  .table-stage-change td:nth-child(3) {
    width: 28%;
    text-align: left;
    padding-left: 12px;
    padding-right: 6px;
  }
  .table-stage-change th:nth-child(4),
  .table-stage-change td:nth-child(4) {
    width: 32%;
    text-align: center;
    padding-left: 4px;
    padding-right: 4px;
  }
}
/* sticky 헤더는 기본으로 본문·버튼 위에 둔다 (스크롤 침범 방지) */
th {
  background: #f4f8f5;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 3;
}
/* 열린 드롭다운 행만 올려서 아래 리스트가 메뉴를 가리지 않게 함 (헤더 z-index:3 미만) */
tr:has(details[open]),
tr:has(.cat-job-actions[open]) {
  position: relative;
  z-index: 2;
}
tr:hover td { background: #f8fbf9; }
/* 직무·패턴명처럼 긴 텍스트 열은 줄바꿈 허용 */
table.table-text-wrap th,
table.table-text-wrap td {
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  vertical-align: top;
}
table.table-text-wrap th:last-child,
table.table-text-wrap td:last-child {
  white-space: nowrap;
  width: 1%;
  vertical-align: middle;
}
/* 비중 열이 있는 패턴 표: 끝에서 두 번째도 수치 */
table.table-text-wrap.table-text-wrap-share th:nth-last-child(2),
table.table-text-wrap.table-text-wrap-share td:nth-last-child(2) {
  white-space: nowrap;
  width: 1%;
  vertical-align: middle;
}

/* 단과대별 참여현황: 수치 열 너비·간격을 균등하게 */
table.table-college-stats {
  table-layout: fixed;
  width: 100%;
}
table.table-college-stats th,
table.table-college-stats td {
  box-sizing: border-box;
  text-align: center;
  padding: 10px 8px;
  vertical-align: middle;
}
table.table-college-stats th:first-child,
table.table-college-stats td:first-child {
  width: 16%;
  text-align: left;
  white-space: normal;
  word-break: keep-all;
}
table.table-college-stats th:not(:first-child) {
  white-space: normal;
  word-break: keep-all;
  line-height: 1.3;
  vertical-align: middle;
}
table.table-college-stats td:not(:first-child) {
  white-space: nowrap;
}

table.table-college-grouped thead th.th-group {
  text-align: center;
  background: #e7f1eb;
  border-bottom: 1px solid #c5d9cc;
}
table.table-college-grouped thead th.th-group-under { background: #eef4fb; }
table.table-college-grouped thead th.th-group-grad { background: #f4eee8; }
/* 2단 헤더(rowspan)는 sticky면 첫 데이터 행과 칼럼이 겹친다 */
table.table-college-grouped thead th {
  position: static;
  top: auto;
  z-index: auto;
}
table.table-college-grouped thead tr:nth-child(2) th {
  font-weight: 500;
  font-size: 0.82rem;
  background: #f7faf8;
}

/* 단과대×기간: 열 너비 고정으로 행사/월 헤더 길이 차이 흡수 */
table.table-period-matrix {
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
}
table.table-period-matrix th,
table.table-period-matrix td {
  box-sizing: border-box;
}
table.table-period-matrix th:first-child,
table.table-period-matrix td:first-child {
  width: 132px;
  min-width: 132px;
  max-width: 132px;
  position: sticky;
  left: 0;
  z-index: 2;
  background: #f4f8f5;
  white-space: normal;
  word-break: keep-all;
}
table.table-period-matrix td:first-child { background: #fff; }
table.table-period-matrix tr:hover td:first-child { background: #f8fbf9; }
table.table-period-matrix th:first-child { z-index: 3; }
table.table-period-matrix th:not(:first-child),
table.table-period-matrix td:not(:first-child) {
  width: 92px;
  min-width: 92px;
  max-width: 92px;
  text-align: center;
  padding: 8px 6px;
}
table.table-period-matrix th:not(:first-child) {
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-height: 1.25;
  font-size: 0.78rem;
  vertical-align: bottom;
}
table.table-period-matrix th:last-child,
table.table-period-matrix td:last-child {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
}

.chart-box {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 340px;
  overflow: hidden;
  box-sizing: border-box;
}
.chart-axis-tip {
  position: fixed;
  z-index: 10050;
  max-width: min(280px, 86vw);
  padding: 8px 10px;
  border-radius: 8px;
  background: #14201a;
  color: #edf7f1;
  font-size: 0.82rem;
  line-height: 1.4;
  word-break: keep-all;
  pointer-events: none;
  box-shadow: var(--shadow);
}
.chart-box.tall { height: 420px; }
.chart-box.short { height: 260px; }
.chart-box.chart-donut { height: 280px; }

.upload-drop {
  border: 2px dashed #9fbfb0; border-radius: 20px; padding: 42px 24px;
  text-align: center; background:
    linear-gradient(180deg, rgba(216, 240, 229, 0.55), rgba(255,255,255,0.9));
}
.upload-drop.dragover { border-color: var(--accent); background: var(--accent-soft); }
.upload-drop h2,
.upload-drop h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: var(--panel-title-size);
  font-weight: 700;
  line-height: 1.3;
}
.upload-drop p { margin: 0 0 18px; color: var(--ink-muted); }
.match-tool .panel-hint { margin-top: 0; }
.match-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.match-file-btn { cursor: pointer; }
.match-file-btn input { display: none; }
.match-empty { margin: 0; }
.match-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: var(--ink-muted);
}
.match-page-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 0.88rem;
  color: var(--ink-muted);
}
.match-page-size select,
.match-standard select {
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.match-standard {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--ink-muted);
}
.match-result-wrap { position: relative; }
.match-split {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 6;
  width: 14px;
  transform: translateX(-50%);
  cursor: col-resize;
  touch-action: none;
}
.match-split::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 50%;
  width: 8px;
  height: 22px;
  transform: translateX(-50%);
  border: 1px solid #8aa396;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 20, 0.12);
}
.match-split:hover::after,
html.match-split-dragging .match-split::after {
  border-color: #0a4f38;
  background: #e7f5ee;
}
html.match-split-dragging,
html.match-split-dragging * {
  cursor: col-resize !important;
  user-select: none !important;
}
.match-result-table {
  width: 100%;
  table-layout: fixed;
  font-size: 0.82rem;
}
.match-result-table th,
.match-result-table td {
  text-align: center;
  vertical-align: middle;
  padding: 8px 4px;
}
.match-result-table thead {
  position: sticky;
  top: 0;
  z-index: 4;
}
.match-result-table thead th {
  position: static;
  top: auto;
  white-space: nowrap;
}
.match-result-table th.match-band { font-weight: 700; }
.match-result-table thead tr:first-child th:nth-child(2),
.match-result-table thead tr:nth-child(2) th:nth-child(5),
.match-result-table td:nth-child(5),
.match-result-table thead tr:first-child th:nth-child(3),
.match-result-table td:nth-child(8) {
  border-left: 2px solid #c5d5cc;
}
.match-result-table td {
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.match-result-table th.match-col-raw,
.match-result-table td.match-col-raw {
  background: #f4f5f6;
  color: #9aa1a8;
  font-weight: 400;
}
.match-result-table th.match-col-raw {
  background: #e9ebed;
  color: #8b939a;
  font-weight: 600;
}
.match-result-table th.match-band.match-col-raw {
  background: #e3e5e8;
  color: #7d868d;
}
.match-result-table th.match-col-std,
.match-result-table td.match-col-std {
  background: #e7f5ee;
}
.match-result-table th.match-col-std {
  background: #d3eddf;
  color: #0a4f38;
}
.match-result-table td.match-col-std {
  color: #0a4f38;
  font-weight: 700;
}
.match-result-table th.match-band.match-col-std { background: #c5e6d4; }
.match-result-table tr:hover td.match-col-raw { background: #eceef0; }
.match-result-table tr:hover td.match-col-std { background: #d7f0e4; }
.match-result-table tr.match-partial td.match-col-status {
  background: var(--warn-soft);
  color: #8a4e08;
  font-weight: 700;
}
.match-result-table tr.match-none td.match-col-status {
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 700;
}
.match-th {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  max-width: 100%;
}
.match-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  opacity: 0.72;
}
.match-filter-btn:hover,
.match-filter-btn.is-on {
  opacity: 1;
  background: rgba(255, 255, 255, 0.82);
  color: #0a4f38;
}
.match-filter-reset {
  border: 0;
  padding: 0;
  background: transparent;
  color: #0a4f38;
  font-weight: 700;
  text-decoration: underline;
}
.match-filter-pop {
  position: fixed;
  z-index: 80;
  width: 240px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.match-filter-pop input[type="search"] {
  width: 100%;
  margin-bottom: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.match-filter-all,
.match-filter-list label {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  padding: 3px 2px;
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
}
.match-filter-list {
  max-height: 220px;
  margin: 6px 0;
  overflow: auto;
}
.match-filter-note {
  margin: 0 0 8px;
  color: var(--ink-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}
.match-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.match-result-table td.match-filter-empty {
  padding: 28px 12px;
  background: #fff;
  color: var(--ink-muted);
  font-weight: 400;
}

.upload-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--card-gap);
  align-items: stretch;
}

.mapping-grid {
  display: grid; grid-template-columns: 220px 1fr 180px; gap: 10px; align-items: center;
}
.mapping-grid .head { font-size: 0.8rem; color: var(--ink-muted); font-weight: 600; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
}
.badge-req { background: var(--danger-soft); color: var(--danger); }
.badge-opt { background: var(--info-soft); color: var(--info); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-ok { background: var(--accent-soft); color: var(--accent-strong); }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tab {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 14px;
}
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.insight-list { display: flex; flex-direction: column; gap: 10px; }
.insight-item {
  padding: 12px 14px; border-radius: 14px; background: #f7faf8; border: 1px solid var(--line);
}
.insight-item strong { display: block; margin-bottom: 4px; }

.pattern-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.72);
  max-width: 100%;
  min-width: 0;
}
.pattern-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7faf8;
  border: 1px solid transparent;
  min-width: 0;
}
.pattern-item:hover { border-color: var(--line); }
.pattern-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  min-width: 0;
}
.pattern-from,
.pattern-to {
  font-size: 0.86rem;
  line-height: 1.35;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.pattern-arrow {
  color: var(--ink-muted);
  font-weight: 700;
  padding-top: 1px;
  flex: 0 0 auto;
}
.pattern-meta {
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.pattern-meta strong {
  color: var(--accent-strong);
  font-size: 0.95rem;
}

/* 데이터 교차검증 리포트형 레이아웃 (취업희망/설문 대시보드 panel 은 유지) */
.view-report {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  min-height: auto;
  overflow: visible;
}
.view-report .report-toolbar {
  margin: 0 0 28px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
/* Desktop: period · 학번/버튼 · 기준체크를 같은 flex 행에 나란히 (좁으면 wrap) */
.view-report .report-toolbar-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.view-report .report-toolbar-row > .period-bar,
.view-report .report-toolbar-row > .student-lookup-form,
.view-report .report-toolbar-row > .career-data-criteria {
  flex: 0 0 auto;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.view-report .report-toolbar-row > .period-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}
.view-report .report-toolbar-row .period-bar .period-extra {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  width: auto;
  min-width: 0;
}
.view-report .report-toolbar-row .period-bar .period-extra:empty {
  display: none;
}
.view-report .report-toolbar-row .period-bar select,
.view-report .report-toolbar-row .period-bar input[type="date"] {
  flex: 0 0 auto;
  width: auto;
  height: 38px;
  padding: 6px 12px;
  border-radius: 10px;
  box-sizing: border-box;
}
.view-report .report-toolbar-row > .student-lookup-form {
  display: flex;
  flex-wrap: nowrap;
  margin-top: 0;
  gap: 8px;
  align-items: center;
}
.view-report .report-toolbar-row .student-lookup-label {
  font-size: 0.86rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--ink-muted);
  margin-right: 0;
}
.view-report .report-toolbar-row .student-lookup-form input {
  width: 140px;
  min-width: 0;
  flex: 0 0 auto;
  height: 38px;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.86rem;
  box-sizing: border-box;
}
.view-report .report-toolbar-row .student-lookup-form .btn {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 12px;
  font-size: 0.84rem;
  box-sizing: border-box;
}
.view-report .report-toolbar-row > .career-data-criteria {
  border-left: 1px solid var(--line);
  margin-left: 4px;
  padding-left: 12px;
  min-height: 38px;
}
.view-report .report-lead {
  margin: 10px 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
}
.view-report .report-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  min-height: auto;
  overflow: visible;
}
.view-report .report-section {
  margin: 0;
  padding: 0 0 40px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-width: 0;
}
.view-report .report-body > .report-section:not(:first-child),
.view-report .report-body > .report-split {
  border-top: 1px solid #cfd8d3;
  padding-top: 40px;
}
.view-report .report-body > .report-split {
  margin: 0;
  padding-bottom: 0;
}
.view-report .report-head {
  display: block;
  margin: 0 0 16px;
  padding: 0;
  background: transparent;
  border: 0;
}
.view-report .report-rail {
  display: none;
}
.view-report .report-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: var(--panel-title-size);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent-strong);
}
.view-report .report-head h2::before {
  content: "";
  width: 3px;
  height: 0.92em;
  border-radius: 2px;
  background: var(--accent);
  flex: 0 0 auto;
}
.view-report .report-desc {
  margin: 0;
  padding-left: 13px;
  color: var(--ink-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
.view-report .report-content {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.view-report .report-inline-note {
  margin: 8px 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
}
.view-report .report-subhead {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  font-family: var(--font);
}
.view-report .report-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 40px;
  margin-top: 18px;
  align-items: start;
}
.view-report .report-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 40px;
  align-items: start;
  margin-top: 10px;
  padding-top: 6px;
}
.view-report .report-compare > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.view-report .report-compare .report-subhead {
  margin: 0 0 12px;
  min-height: 1.2em;
}
.view-report .report-compare .metric-block {
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 10px 24px;
}
.view-report .report-pattern-split {
  display: grid;
  grid-template-columns: minmax(300px, 1.15fr) minmax(240px, 0.85fr);
  gap: 20px 36px;
  align-items: start;
}
.view-report .report-job-split .metric-block {
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 10px 20px;
  margin-bottom: 0;
}
.view-report .report-job-split .metric-hero-wrap {
  width: 148px;
}
.view-report .report-job-split .metric-hero {
  width: 148px;
  height: 88px;
}
.view-report .report-job-split .report-subhead {
  margin: 0 0 10px;
  flex: 0 0 auto;
}
.view-report .report-job-patterns {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 0;
  min-height: 100%;
  overflow: hidden;
}
.view-report .report-job-patterns .pattern-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.view-report .report-soft-split > .report-soft-examples,
.view-report .report-soft-split > .report-soft-patterns {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.view-report .report-soft-split > .report-soft-examples {
  /* Match adjacent 불일치 패턴 column height; scroll table body when taller */
  height: 0;
  min-height: 100%;
  overflow: hidden;
}
.view-report .report-soft-split .report-subhead {
  margin: 0 0 10px;
  flex: 0 0 auto;
}
.view-report .report-soft-split .table-wrap {
  width: 100%;
  max-width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.view-report .report-soft-split .pattern-list {
  flex: 1 1 auto;
  min-height: 0;
}
.view-report table.table-compact {
  width: max-content;
  max-width: 100%;
}
.view-report table.table-compact th,
.view-report table.table-compact td {
  padding: 6px 10px 6px 0;
  white-space: nowrap;
}
.view-report table.table-compact th:nth-child(2),
.view-report table.table-compact td:nth-child(2),
.view-report table.table-compact th:nth-child(3),
.view-report table.table-compact td:nth-child(3) {
  white-space: normal;
  max-width: 8.5em;
}
/* 일치 예시: fill panel width evenly (override shrink-to-fit compact) */
.view-report .report-soft-examples table.table-compact {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}
.view-report .report-soft-examples table.table-compact th:nth-child(1),
.view-report .report-soft-examples table.table-compact td:nth-child(1) {
  width: 18%;
}
.view-report .report-soft-examples table.table-compact th:nth-child(2),
.view-report .report-soft-examples table.table-compact td:nth-child(2) {
  width: 34%;
  max-width: none;
}
.view-report .report-soft-examples table.table-compact th:nth-child(3),
.view-report .report-soft-examples table.table-compact td:nth-child(3) {
  width: 28%;
  max-width: none;
}
.view-report .report-soft-examples table.table-compact th:nth-child(4),
.view-report .report-soft-examples table.table-compact td:nth-child(4) {
  width: 20%;
}
.view-report .report-soft-examples table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 0 1px 0 var(--line);
}
/* 교차검증 표: 가벼운 세로 구분선 (일치 예시 · 미연결 설문) */
.view-report table.table-col-grid th,
.view-report table.table-col-grid td {
  padding-left: 10px;
  padding-right: 10px;
}
.view-report table.table-col-grid th:first-child,
.view-report table.table-col-grid td:first-child {
  padding-left: 0;
}
.view-report table.table-col-grid th:not(:first-child),
.view-report table.table-col-grid td:not(:first-child) {
  border-left: 1px solid #e4ece7;
}
.view-report .report-body > .report-split {
  margin-top: 0;
  gap: 40px;
}
.view-report .chart-box.short,
.view-report .chart-box.chart-donut {
  height: 200px;
}
.view-report .report-follow {
  margin-top: 22px;
}
.view-report .metric-block + .report-follow {
  margin-top: 40px;
}
.view-report .report-follow .report-subhead {
  display: block;
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  font-family: var(--font);
}
.view-report .report-subhead-accent,
.view-report .report-follow .report-subhead-accent,
.view-report .report-job-split .report-subhead-accent {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent-strong);
  font-family: var(--display);
}
.view-report .report-follow p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink-muted);
}
.view-report .report-follow-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}
.view-report .report-follow-inline .report-subhead {
  margin: 0;
  flex: 0 1 auto;
  white-space: nowrap;
}
.view-report .report-follow-inline p {
  flex: 1 1 280px;
  min-width: 0;
}
.view-report .report-note {
  margin-top: 16px;
  padding: 0 0 0 13px;
  border: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink-muted);
}
.view-report .report-note strong {
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
}
.view-report .metric-block {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  align-items: center;
  gap: 12px 40px;
  margin-bottom: 4px;
}
.view-report .metric-hero-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 168px;
}
.view-report .metric-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 168px;
  height: 96px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: rgba(15, 107, 76, 0.08);
  box-shadow: none;
  box-sizing: border-box;
}
.view-report .metric-hero .metric-value {
  font-size: clamp(1.85rem, 1.6vw + 1.1rem, 2.35rem);
  margin: 0;
  line-height: 1;
  text-align: center;
  color: var(--accent-strong);
}
.view-report .metric-hero-caption {
  text-align: center;
}
.view-report .metric-hero-caption .metric-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}
.view-report .metric-hero-caption .metric-sub {
  margin-top: 2px;
}
.view-report .metric-aux {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  flex: 1 1 280px;
  min-width: 0;
}
.view-report .metric-aux .metric {
  min-width: 88px;
}
.view-report .metric-aux .metric-value {
  font-size: 1.2rem;
  margin: 2px 0;
}
.view-report .report-compact-note {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-muted);
  line-height: 1.45;
}
.view-report .metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 28px;
}
.view-report .metric-strip-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.view-report .metric-strip-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.view-report .metric-strip + .metric-strip {
  margin-top: 18px;
  padding-top: 0;
  border: 0;
}
.view-report .metric {
  padding: 0;
  border: 0;
  min-width: 0;
}
.view-report .metric:last-child { border: 0; padding-right: 0; }
.view-report .metric-label {
  font-size: 0.72rem;
  color: var(--ink-muted);
  line-height: 1.3;
}
.view-report .metric-value {
  font-size: clamp(1.5rem, 1.9vw + 0.85rem, 2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 4px 0 2px;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.view-report .metric-sub {
  font-size: 0.7rem;
  color: var(--ink-muted);
  line-height: 1.35;
}
.view-report .pattern-list {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  gap: 8px;
  max-width: 100%;
}
.view-report .pattern-item {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 2px 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  width: fit-content;
  max-width: 100%;
}
.view-report .pattern-item:hover { border-color: transparent; }
.view-report .pattern-flow {
  flex: 0 1 auto;
}
.view-report .pattern-from,
.view-report .pattern-to {
  flex: 0 1 auto;
}
.view-report .pattern-meta {
  flex: 0 0 auto;
  margin-left: 0;
}
.view-report .pattern-arrow {
  color: var(--accent);
}
.view-report .table-wrap {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
}
.view-report .table-wrap:has(> table.table-college-stats) {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.view-report table th,
.view-report table td {
  border-bottom: 0;
  padding: 7px 12px 7px 0;
  background: transparent;
  white-space: normal;
  word-break: keep-all;
}
.view-report table th {
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding-top: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.view-report table tr:hover td {
  background: transparent;
}
.view-report table.table-college-stats {
  table-layout: auto;
  width: max-content;
  min-width: 100%;
  font-size: 0.9rem;
}
.view-report table.table-college-stats th,
.view-report table.table-college-stats td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  background: #fff;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 400;
  white-space: nowrap;
  word-break: normal;
}
.view-report table.table-college-stats th {
  background: #f4f8f5;
  font-weight: 600;
  color: var(--ink);
  padding-top: 10px;
  padding-bottom: 10px;
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
  word-break: normal;
  line-height: 1.25;
  vertical-align: middle;
}
.view-report table.table-college-stats th:first-child,
.view-report table.table-college-stats td:first-child {
  width: auto;
  min-width: 7.5em;
  text-align: left;
  white-space: nowrap;
  word-break: normal;
  vertical-align: middle;
}
.view-report table.table-college-stats th:not(:first-child) {
  text-align: center;
  white-space: nowrap;
  word-break: normal;
  line-height: 1.25;
  vertical-align: middle;
  min-width: 4.8em;
}
.view-report table.table-college-stats td:not(:first-child) {
  text-align: center;
  white-space: nowrap;
  min-width: 4.8em;
}
.view-report table.table-college-stats tr:hover td {
  background: #f8fbf9;
}
.view-report table.table-college-grouped thead th.th-group {
  text-align: center;
  background: #e7f1eb;
  border-bottom: 1px solid #c5d9cc;
  color: var(--ink);
  white-space: nowrap;
}
.view-report table.table-college-grouped thead th.th-group-under { background: #eef4fb; }
.view-report table.table-college-grouped thead th.th-group-grad { background: #f4eee8; }
.view-report table.table-college-grouped thead th {
  position: static;
  top: auto;
}
.view-report table.table-college-grouped thead tr:nth-child(2) th {
  font-weight: 500;
  font-size: 0.82rem;
  background: #f7faf8;
  white-space: nowrap;
}
.view-report .chart-box {
  background: transparent;
}
.view-report .student-lookup-result:not([hidden]) {
  border-top: 0;
  padding-top: 14px;
}

.student-lookup-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.view-report .student-lookup-form {
  margin-top: 0;
}
.student-lookup-label {
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--display);
  color: var(--ink);
  white-space: nowrap;
  margin-right: 2px;
}
.student-lookup-form input {
  width: min(220px, 100%);
  min-width: 0;
  flex: 1 1 140px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
  font-size: 0.9rem;
}
.student-lookup-form input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}
.student-lookup-form .btn {
  padding: 7px 12px;
  font-size: 0.86rem;
}
.student-lookup-result:not([hidden]) {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.student-lookup-profile {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
  font-size: 0.88rem;
  margin-bottom: 10px;
}
.student-lookup-profile .muted {
  margin-right: 6px;
  font-size: 0.78rem;
}
.student-lookup-profile strong {
  font-weight: 700;
  letter-spacing: -0.02em;
}
.student-lookup-h3 {
  margin: 0 0 6px;
  font-size: 0.92rem;
}
.student-lookup-empty {
  margin: 0;
  padding: 8px 0;
  font-size: 0.86rem;
}
.student-lookup-histories {
  margin-top: 4px;
}
.student-lookup-notes {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.student-lookup-detail {
  margin-top: 8px;
}
.student-lookup-detail summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-strong);
}
.student-q-label {
  display: inline-block;
  min-width: 2.2em;
  font-weight: 600;
  color: var(--ink-muted);
  margin-right: 6px;
}

/* 진로개발: 기간 건수 + Q1~Q4 한 화면 */
.period-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
  gap: var(--card-gap);
  align-items: stretch;
}
.period-count-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.period-count-card {
  position: relative;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7faf8;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.period-count-card.pc-top {
  background: #fdf2f4;
  border-color: #f3cdd6;
}
.period-count-card.has-tip {
  cursor: help;
}
.period-count-card.has-tip:hover,
.period-count-card.has-tip:focus-within {
  border-color: rgba(15, 107, 76, 0.35);
  box-shadow: 0 2px 10px rgba(20, 40, 30, 0.08);
  z-index: 5;
}
.period-count-card .pc-label {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-bottom: 6px;
  line-height: 1.3;
}
.period-count-card .pc-value {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.period-count-card .pc-sub {
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--ink-muted);
}
.period-count-card .pc-tip {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: min(260px, 72vw);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 40, 30, 0.12);
  text-align: left;
  pointer-events: none;
}
.period-count-card.has-tip:hover .pc-tip,
.period-count-card.has-tip:focus-within .pc-tip {
  display: block;
}
.period-count-card .pc-tip-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.period-count-card .pc-tip ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow: auto;
}
.period-count-card .pc-tip li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5ch 4.75ch;
  column-gap: 8px;
  align-items: baseline;
  font-size: 0.78rem;
  line-height: 1.3;
}
.period-count-card .pc-tip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.period-count-card .pc-tip-count {
  font-weight: 700;
  color: var(--accent-strong);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.period-count-card .pc-tip-share {
  color: var(--ink-muted);
  white-space: nowrap;
  min-width: 2.4em;
  text-align: right;
}
.period-count-card .pc-tip-more {
  color: var(--ink-muted);
  font-size: 0.72rem;
}

.q-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--card-gap);
  align-items: start;
}
.q-panel {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  min-width: 0;
}
.q-panel.q-wide { grid-column: 1 / -1; }
.q-overview-items {
  align-items: stretch;
  grid-template-rows: 1fr 1fr;
}
.q-overview-items .q-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.q-overview-items .q-panel .rank-compact,
.q-overview-items .q-panel .rank-compact-stack,
.q-overview-items .q-panel .q-chart {
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
}
.q-overview-items .q-panel-head {
  flex: 0 0 auto;
}
.q-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.q-panel-head h3 {
  margin: 0;
  font-size: var(--panel-title-size);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.q-panel-head .muted { font-size: 0.75rem; word-break: keep-all; overflow-wrap: break-word; line-break: strict; }
.q-chart,
.q-chart-sm {
  width: 100%;
  min-height: 112px;
  background: transparent;
}
.q-group .q-chart-sm {
  margin-top: 4px;
}

.rank-compact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rank-compact li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 5ch 6.5ch;
  column-gap: 8px;
  align-items: center;
  font-size: 0.86rem;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f7faf8;
  min-width: 0;
}
.rank-compact .rk {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 700;
}
.rank-compact .rk-1 { background: var(--accent); color: #fff; }
.rank-compact-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  flex: 1 1 auto;
}
.rank-top-block {
  background: #fdf2f4;
  border: 1px solid #f3cdd6;
  border-radius: 10px;
  padding: 4px;
  box-sizing: border-box;
}
.rank-top-block .rank-compact {
  gap: 2px;
}
.rank-top-block .rank-compact li {
  background: transparent;
  padding-top: 5px;
  padding-bottom: 5px;
}
.rank-compact .nm {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  overflow: hidden;
}
.rank-compact .nm-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-compact .rk-cat {
  flex: 0 1 auto;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-muted);
  line-height: 1.2;
}
.rank-compact .ct,
.rank-compact .sh {
  justify-self: end;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rank-compact .ct { font-weight: 700; }
.rank-compact .sh { color: var(--ink-muted); font-size: 0.78rem; }
.rank-compact.rank-college li {
  grid-template-columns: 22px minmax(0, 1fr) auto auto;
}
.rank-compact.rank-college .ct,
.rank-compact.rank-college .sh {
  justify-self: end;
  text-align: right;
}
.rank-compact.rank-college .sh {
  color: var(--ink-muted);
  font-size: 0.78rem;
}

.q-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 280px));
  gap: 10px;
  align-items: stretch;
  justify-content: start;
}
.q-group-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 280px));
  grid-auto-rows: 1fr;
  max-width: calc(4 * 280px + 3 * 10px);
}
.q-group-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 280px));
  grid-auto-rows: 1fr;
  max-width: calc(2 * 280px + 10px);
}
.q-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #fafcfb;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.q-group-top {
  background: #fdf2f4;
  border-color: #f3cdd6;
}
.q-group-title {
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 2px;
  line-height: 1.35;
}
.q-group-meta {
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.q-group-top .q-group-meta {
  color: #9b3a52;
}
.q-group .rank-compact li {
  grid-template-columns: 18px minmax(0, 1fr) 4.75ch 6.25ch;
  padding: 4px 6px;
  font-size: 0.8rem;
  background: #fff;
}
.q-group .rank-compact .rk { width: 18px; height: 18px; font-size: 0.68rem; border-radius: 4px; }
.q-split-note {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.q-split-note .label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.q-trend-insights {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.q-trend-insights li {
  position: relative;
  padding-left: 14px;
  font-size: 0.95rem;
  line-height: 1.55;
  word-break: keep-all;
}
.q-trend-insights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.q-trend-insights strong {
  font-weight: 700;
}
.q-trend-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.q-trend-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: inherit;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
}
.q-trend-tab.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  font-weight: 600;
}
.q-trend-stack {
  display: block;
}
.q-trend-block {
  display: none;
}
.q-trend-block.is-active {
  display: block;
}
.q-trend-block h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}
.q-trend-table th:nth-child(n+2),
.q-trend-table td:nth-child(n+2) {
  text-align: right;
  white-space: nowrap;
  width: 18%;
}
.q-trend-delta.is-up { color: #0f6b4c; font-weight: 600; }
.q-trend-delta.is-down { color: #9b2c2c; font-weight: 600; }

@media (max-width: 1200px) {
  .q-overview { grid-template-columns: 1fr; }
  .q-overview-items { grid-template-rows: none; }
  .q-group-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 280px));
    max-width: calc(2 * 280px + 10px);
  }
}

.empty-state {
  padding: 48px 24px; text-align: center; color: var(--ink-muted);
  border: 1px dashed var(--line); border-radius: var(--radius); background: rgba(255,255,255,0.6);
}

.modal-root {
  position: fixed; inset: 0; background: rgba(12, 24, 18, 0.45);
  display: grid; place-items: center; z-index: 50; padding: 24px;
}
.modal {
  width: min(920px, 100%); max-height: 90vh; overflow: auto;
  background: #fff; border-radius: 20px; padding: 22px; box-shadow: var(--shadow);
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.modal-header h2 { margin: 0; font-family: var(--display); }

.toast-root {
  position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column;
  gap: 8px; z-index: 60;
  max-width: calc(100vw - 24px);
}
.toast {
  background: #14201a; color: #fff; padding: 12px 16px; border-radius: 12px;
  box-shadow: var(--shadow); min-width: 0; max-width: 100%;
}

.flag-btn {
  border: 0; background: var(--warn-soft); color: var(--warn);
  width: 28px; height: 28px; border-radius: 50%; font-weight: 700;
}
.split {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--card-gap);
}

.coming-soon {
  min-height: 420px; display: grid; place-items: center; text-align: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(15,107,76,0.12), transparent 40%),
    var(--bg-elevated);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.coming-soon h2 { margin: 0 0 8px; font-family: var(--display); font-size: 2rem; }

.cat-company-layout {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
}
.cat-btn-short {
  display: none;
}
.cat-custom-hint {
  margin: 4px 0 10px;
  font-size: 0.86rem;
  line-height: 1.4;
}
.cat-link-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}
.cat-raw-row.is-selected td {
  background: rgba(15, 107, 76, 0.08);
}
.cat-raw-row:hover td {
  background: rgba(15, 107, 76, 0.04);
}
.cat-master-panel,
.cat-review-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
}
.cat-master-panel .panel-header,
.cat-review-box .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.cat-master-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}
.cat-standard-dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
.cat-standard-dl:hover {
  color: var(--ink);
  border-color: #9bb5a8;
  background: rgba(15, 107, 76, 0.04);
}
.cat-job-criteria-ver {
  font-size: 0.72rem;
  white-space: nowrap;
}
.cat-job-criteria-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(15, 107, 76, 0.03);
}
.cat-job-criteria-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink);
  white-space: pre-wrap;
}
.cat-std-review-block {
  margin: 0 0 14px;
}
.cat-std-review-block h4 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cat-std-review-empty {
  margin: 0;
  font-size: 0.84rem;
}
.cat-std-review-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 160px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.cat-std-review-list li {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
  line-height: 1.35;
}
.cat-std-review-list li:last-child {
  border-bottom: 0;
}
.cat-std-remap-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}
.cat-std-remap-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 10px 14px;
  align-items: end;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.cat-std-remap-from {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.cat-std-remap-to {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  font-size: 0.82rem;
}
.cat-std-remap-to select {
  width: 100%;
}
.cat-review-box {
  background: rgba(255, 248, 230, 0.45);
}
.cat-map-fold {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}
.cat-map-fold > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  font-weight: 700;
}
.cat-map-fold > summary::-webkit-details-marker {
  display: none;
}
.cat-map-fold-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.cat-map-fold-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink-muted);
  border-bottom: 2px solid var(--ink-muted);
  transform: rotate(45deg);
  margin-top: -3px;
}
.cat-map-fold[open] > summary .cat-map-fold-chevron {
  transform: rotate(-135deg);
  margin-top: 3px;
}
.cat-map-fold-body {
  padding: 0 16px 16px;
}

#catBody .table-cat {
  table-layout: fixed;
  width: 100%;
}
#catBody .table-cat th,
#catBody .table-cat td {
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}
#catBody .table-cat td:has(.btn),
#catBody .table-cat td:has(.chip-row),
#catBody .table-cat td:has(select),
#catBody .table-cat td:has(.cat-job-actions-row),
#catBody .table-cat td.col-actions {
  overflow: visible;
  white-space: normal;
}
#catBody .table-cat .chip-row {
  flex-wrap: nowrap;
  align-items: center;
}
#catBody .table-cat .chip-row select {
  min-width: 0;
  width: auto;
  flex: 1 1 auto;
}

/* 표준 그룹·기업: 그룹 / 기업 / 건수 / 별칭 / 관리 */
#catBody .table-company-master {
  table-layout: fixed;
  width: 100%;
}
#catBody .table-company-master th,
#catBody .table-company-master td {
  text-align: center;
  vertical-align: middle;
  box-sizing: border-box;
  padding: 10px 8px;
  overflow-wrap: anywhere;
}
#catBody .table-company-master th:nth-child(1),
#catBody .table-company-master td:nth-child(1) { width: 20%; }
#catBody .table-company-master th:nth-child(2),
#catBody .table-company-master td:nth-child(2) { width: 20%; }
#catBody .table-company-master th:nth-child(3),
#catBody .table-company-master td:nth-child(3) { width: 20%; }
#catBody .table-company-master th:nth-child(4),
#catBody .table-company-master td:nth-child(4) { width: 20%; }
#catBody .table-company-master th:nth-child(5),
#catBody .table-company-master td:nth-child(5) { width: 20%; }
#catBody .table-company-master td.col-actions .chip-row,
#catBody .table-company-master td.col-actions .cat-job-actions-row {
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}
.cat-company-master-wrap {
  /* 헤더 40px + 행 약 52px × 50 */
  max-height: calc(40px + 52px * 50);
}
.cat-alias-count {
  border: 0;
  background: transparent;
  padding: 2px 8px;
  color: var(--accent);
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  border-radius: 6px;
}
.cat-alias-count:hover,
.cat-alias-count[aria-expanded="true"] {
  background: var(--accent-soft);
}
.cat-alias-pop {
  position: fixed;
  z-index: 30;
  width: min(240px, calc(100vw - 16px));
  max-height: 220px;
  overflow: auto;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: left;
}
.cat-alias-pop[hidden] {
  display: none;
}
.cat-alias-pop-title {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 700;
}
.cat-alias-pop ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.84rem;
  line-height: 1.5;
}
.cat-alias-pop-empty {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.82rem;
}
#catBody .table-company-master tr.cat-company-group-head td {
  width: auto;
  padding: 0;
  text-align: left;
  background: color-mix(in srgb, var(--accent-soft, #e8f3ee) 70%, #fff);
  overflow: visible;
}
#catBody .table-company-master tr.cat-company-group-item.is-folded {
  display: none;
}
.cat-company-group-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.cat-company-group-toggle:hover,
.cat-company-group-toggle:focus-visible {
  background: color-mix(in srgb, var(--accent, #0f6b4c) 8%, transparent);
  outline: none;
}
.cat-company-group-arrow {
  width: 1em;
  flex: 0 0 auto;
  color: var(--ink-muted);
  font-size: 0.72rem;
  line-height: 1;
  text-align: center;
}
.cat-company-group-count {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
}
.cat-company-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 12px;
}
.cat-company-pager .btn[disabled] {
  opacity: 0.45;
}
.cat-company-page {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.cat-company-page.is-current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}
.cat-company-pager-meta {
  margin-left: 4px;
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.modal.modal-tall {
  width: min(440px, 100%);
  height: min(92vh, 960px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 16px;
}
.modal.modal-tall .modal-header {
  flex: 0 0 auto;
}
.modal.modal-tall .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 그룹/기업 추가 등 짧은 입력 모달 */
.modal.modal-simple {
  width: min(420px, 100%);
}
.modal.modal-simple .modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal.modal-simple .modal-add-hint {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}
.modal.modal-simple .field input,
.modal.modal-simple .field select {
  min-height: 44px;
  font-size: 16px; /* iOS 자동 확대 방지 */
  box-sizing: border-box;
}
.modal-add-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.modal-add-actions .btn {
  width: 100%;
  min-height: 44px;
  justify-content: center;
}
.cat-group-order-actions {
  flex: 0 0 auto;
  margin-top: 12px;
}

/* 그룹 순서: 세로 긴 모달 전용 목록 */
.cat-group-order-hint {
  margin: 0 0 12px;
  flex: 0 0 auto;
}
.cat-group-order.cat-group-order-modal {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.cat-group-order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.cat-group-order-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  background: #fff;
}
.cat-group-order-item .drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted, #6b7280);
  cursor: grab;
  letter-spacing: -2px;
  font-size: 0.95rem;
  line-height: 1;
  user-select: none;
  touch-action: none;
}
.cat-group-order-item .drag-handle:hover,
.cat-group-order-item .drag-handle:focus-visible {
  background: var(--accent-soft, #eef2ff);
  color: var(--ink);
  outline: none;
}
.cat-group-order-item .drag-handle:active {
  cursor: grabbing;
}
.cat-group-order-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-group-order-meta {
  font-size: 0.85rem;
  white-space: nowrap;
}
.cat-group-order-list.is-sorting .cat-group-order-item.is-dragging {
  opacity: 0.45;
  background: var(--accent-soft, #eef2ff);
}
.cat-group-order-list.is-sorting .cat-group-order-item.drag-over {
  box-shadow: inset 0 2px 0 var(--accent, #2563eb);
}

/* 그룹/기업·직무 확인 필요 공통: 원본 / 건수 / 지정 / 확정 */
#catBody .table-cat-review th,
#catBody .table-cat-review td,
#catBody .table-cat-amb-job th,
#catBody .table-cat-amb-job td {
  text-align: center;
  vertical-align: middle;
}
#catBody .table-cat-review th:nth-child(1),
#catBody .table-cat-review td:nth-child(1),
#catBody .table-cat-amb-job th:nth-child(1),
#catBody .table-cat-amb-job td:nth-child(1) { width: 22%; }
#catBody .table-cat-review th:nth-child(2),
#catBody .table-cat-review td:nth-child(2),
#catBody .table-cat-amb-job th:nth-child(2),
#catBody .table-cat-amb-job td:nth-child(2) { width: 14%; }
#catBody .table-cat-review th:nth-child(3),
#catBody .table-cat-review td:nth-child(3),
#catBody .table-cat-amb-job th:nth-child(3),
#catBody .table-cat-amb-job td:nth-child(3) { width: 44%; }
#catBody .table-cat-review th:nth-child(4),
#catBody .table-cat-review td:nth-child(4),
#catBody .table-cat-amb-job th:nth-child(4),
#catBody .table-cat-amb-job td:nth-child(4) { width: 20%; }
#catBody .table-cat-review td:nth-child(3),
#catBody .table-cat-review td:nth-child(4),
#catBody .table-cat-amb-job td:nth-child(3),
#catBody .table-cat-amb-job td:nth-child(4) {
  overflow: visible;
  white-space: normal;
}
#catBody .table-cat-review td:nth-child(3),
#catBody .table-cat-amb-job td:nth-child(3) {
  padding-left: 12px;
  padding-right: 12px;
}
#catBody .table-cat-review th,
#catBody .table-cat-review td,
#catBody .table-cat-amb-job th,
#catBody .table-cat-amb-job td {
  padding: 8px 6px;
  box-sizing: border-box;
}
#catBody .table-cat-review th:nth-child(2),
#catBody .table-cat-review td:nth-child(2),
#catBody .table-cat-amb-job th:nth-child(2),
#catBody .table-cat-amb-job td:nth-child(2) {
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}
#catBody .table-cat-review td:nth-child(4),
#catBody .table-cat-amb-job td:nth-child(4) {
  padding-left: 4px;
  padding-right: 4px;
  overflow: hidden;
}
#catBody .table-cat-review td:nth-child(4) .btn,
#catBody .table-cat-amb-job td:nth-child(4) .btn {
  display: inline-flex;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 6px 8px;
  font-size: 0.8rem;
  justify-content: center;
}
#catBody .table-cat-review th,
#catBody .table-cat-amb-job th {
  height: 40px;
}
#catBody .table-cat-review td,
#catBody .table-cat-amb-job td {
  height: auto;
  min-height: 48px;
  box-sizing: border-box;
}
#catBody .table-cat-review td:nth-child(1),
#catBody .table-cat-amb-job td:nth-child(1) {
  overflow: hidden;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.35;
  text-overflow: clip;
}

.cat-confirm-assign {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(100%, 360px);
  margin: 0 auto;
  min-width: 0;
  align-items: center;
  text-align: center;
}
#catBody tr.cat-row-confirmed td {
  background: color-mix(in srgb, #1f8a4c 14%, var(--panel, #fff)) !important;
  transition: background 0.08s ease;
}
#catBody tr.cat-row-dismiss {
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  pointer-events: none;
}
#catBody tr.cat-row-dismiss td {
  border-color: transparent !important;
  background: transparent !important;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.cat-confirm-assign > select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font-size: 0.86rem;
  text-align: center;
  text-align-last: center;
}
.cat-confirm-assign > select:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}
#catBody .table-cat-review .cat-confirm-assign,
#catBody .table-cat-amb-job .cat-confirm-assign {
  width: 100%;
  max-width: none;
}
#catBody .table-cat-review .cat-confirm-assign > select,
#catBody .table-cat-amb-job .cat-confirm-assign > select {
  text-align: left;
  text-align-last: left;
  padding: 8px 28px 8px 10px;
}
.cat-confirm-create {
  width: 100%;
}
.cat-confirm-create[hidden] {
  display: none !important;
}
.cat-confirm-create-fields {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 6px;
  width: 100%;
}
.cat-confirm-create-fields:has(> :only-child) {
  grid-template-columns: 1fr;
}
.cat-job-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.cat-job-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, 0.85fr);
  column-gap: var(--card-gap);
  row-gap: 12px;
  align-items: start;
}
.cat-job-master {
  display: contents;
}
.cat-job-master-head {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 0;
}
.cat-job-master-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}
.cat-job-hint {
  margin: 6px 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 42rem;
}
.cat-job-master-head .cat-job-add-row {
  flex: 0 1 auto;
  width: min(340px, 100%);
  max-width: 340px;
  margin-left: 0;
}
.cat-job-map {
  grid-column: 2;
  grid-row: 2;
  padding: 16px 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel, #fff) 92%, var(--accent-soft, #eef2ff));
  position: sticky;
  top: 10px;
}
.cat-job-map .field {
  margin-bottom: 10px;
}
.cat-job-map .field:last-of-type {
  margin-bottom: 14px;
}
.cat-job-master-table {
  grid-column: 1;
  grid-row: 2;
  max-height: none;
  overflow: visible;
}
#catBody .table-cat-job-sortable td.col-name {
  overflow: visible;
}
.cat-job-name {
  cursor: help;
  border-bottom: 1px dotted color-mix(in srgb, var(--ink) 35%, transparent);
  font-size: 1rem;
  line-height: 1.35;
}
.cat-job-hover {
  position: fixed;
  z-index: 40;
  width: min(280px, calc(100vw - 16px));
  max-height: 240px;
  overflow: auto;
  padding: 8px 10px;
  border-radius: 10px;
  background: #14201a;
  color: #edf7f1;
  font-size: 0.78rem;
  line-height: 1.4;
  box-shadow: var(--shadow);
  pointer-events: none;
}
.cat-job-hover[hidden] {
  display: none;
}
.cat-job-hover-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.cat-job-hover-row em {
  font-style: normal;
  color: #b7d4c6;
  font-variant-numeric: tabular-nums;
}
.cat-job-hover-empty {
  color: #b7d4c6;
}
.cat-job-add-row input {
  flex: 1 1 160px;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font-size: 0.86rem;
}
#catBody .table-cat-job-sortable {
  width: 100%;
  table-layout: fixed;
}
#catBody .table-cat-job-sortable th,
#catBody .table-cat-job-sortable td {
  padding: 1px 8px;
  font-size: 0.84rem;
  line-height: 1.2;
  vertical-align: middle;
}
#catBody .table-cat-job-sortable th {
  padding-top: 11px;
  padding-bottom: 11px;
}
#catBody .table-cat-job-sortable .col-no {
  width: 7%;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  font-weight: 600;
}
#catBody .table-cat-job-sortable .col-drag {
  width: 8%;
  text-align: center;
}
#catBody .table-cat-job-sortable .col-name {
  width: 30%;
  text-align: center;
}
#catBody .table-cat-job-sortable .col-count {
  width: 28%;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#catBody .table-cat-job-sortable .col-actions {
  width: 22%;
  text-align: center;
}
#catBody .table-cat-job-sortable .col-actions .chip-row {
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}
#catBody .table-cat-job-sortable .btn-sm,
#catBody .table-company-master .btn-sm,
#catBody .table-cat-job-sortable .cat-job-actions > summary.btn,
#catBody .table-company-master .cat-job-actions > summary.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0;
  min-height: 30px;
  min-width: 3.4em;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1;
  border-radius: 8px;
  vertical-align: middle;
  text-align: center;
}
#catBody .table-cat-job-sortable .btn-sm,
#catBody .table-cat-job-sortable .cat-job-actions > summary.btn {
  min-height: 24px;
  padding: 1px 8px;
}
#catBody .cat-job-actions-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: nowrap;
}
#catBody .cat-job-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  text-align: left;
}
#catBody .cat-job-actions > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  appearance: none;
  -webkit-appearance: none;
}
#catBody .cat-job-actions > summary::-webkit-details-marker {
  display: none;
}
#catBody .cat-job-actions-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 1;
  min-width: 124px;
  padding: 4px;
  border: 1px solid var(--border, #d7dee8);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
#catBody .cat-job-actions-menu button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.86rem;
  text-align: left;
  cursor: pointer;
}
#catBody .cat-job-actions-menu button:hover,
#catBody .cat-job-actions-menu button:focus-visible {
  background: rgba(15, 23, 42, 0.06);
  outline: none;
}
#catBody .cat-job-actions-menu button.is-danger {
  color: var(--danger, #b42318);
}
.cat-job-move-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}
.cat-job-move-checkall {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  cursor: pointer;
}
.cat-job-move-list label {
  cursor: pointer;
}
#catBody .table-cat-job-sortable .drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted, #6b7280);
  cursor: grab;
  letter-spacing: -2px;
  font-size: 0.95rem;
  line-height: 1;
  user-select: none;
  touch-action: none;
}
#catBody .table-cat-job-sortable .drag-handle:hover,
#catBody .table-cat-job-sortable .drag-handle:focus-visible {
  background: var(--accent-soft, #eef2ff);
  color: var(--ink);
  outline: none;
}
#catBody .table-cat-job-sortable .drag-handle:active {
  cursor: grabbing;
}
#catBody .table-cat-job-sortable tr.is-dragging {
  opacity: 0.45;
  background: var(--accent-soft, #eef2ff);
}
#catBody .table-cat-job-sortable.is-sorting tr.drag-over td {
  box-shadow: inset 0 2px 0 var(--accent, #2563eb);
}
.cat-confirm-create-fields input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font-size: 0.86rem;
  text-align: center;
}
.cat-confirm-create-fields input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}
.cat-ambiguous-layout {
  align-items: stretch;
  gap: var(--card-gap);
}
.cat-ambiguous-layout > .cat-review-box {
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.cat-ambiguous-layout > .cat-review-box > h3,
.cat-ambiguous-layout > .cat-review-box > .cat-review-head {
  margin: 0 0 8px;
  min-height: 1.4em;
}
.cat-ambiguous-layout > .cat-review-box > .cat-review-head {
  padding: 0;
  border: 0;
  align-items: center;
}
.cat-ambiguous-layout > .cat-review-box > .cat-review-head h3 {
  margin: 0;
  font-size: var(--panel-title-size);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.cat-ambiguous-layout > .cat-review-box > h3 {
  font-size: var(--panel-title-size);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.cat-ambiguous-layout > .cat-review-box > .panel-hint {
  margin: 0 0 8px;
  min-height: 2.7em; /* 안내 1~2줄 차이로 표 시작점이 어긋나지 않게 */
  line-height: 1.35;
}
.cat-ambiguous-layout > .cat-review-box > .cat-review-extra {
  min-height: 2rem;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
}
.cat-review-job-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
}
.cat-review-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  cursor: pointer;
  user-select: none;
}
.cat-review-filter input[type="checkbox"] {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
}
.cat-review-raw-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
.cat-review-raw {
  margin-right: 0;
}
.cat-review-via {
  vertical-align: middle;
  font-weight: 600;
  font-size: 0.75rem;
}
.cat-review-count-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2em;
  margin: 0;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--accent-strong);
  font-size: inherit;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-decoration: underline;
  text-decoration-color: rgba(15, 107, 76, 0.35);
  text-underline-offset: 3px;
  cursor: pointer;
}
.cat-review-count-btn:hover {
  background: var(--accent-soft);
  text-decoration-color: var(--accent);
}
.badge-muted {
  background: var(--bg-soft);
  color: var(--ink-muted);
}
.cat-job-context {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.cat-job-context-head {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.cat-job-context-kicker {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}
.cat-job-context-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.03em;
  color: var(--ink);
  word-break: keep-all;
}
.cat-job-context-meta {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.cat-job-context-section h3 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.cat-job-context-section h3 .muted {
  font-size: 0.82rem;
  font-weight: 600;
}
.cat-job-context-empty {
  margin: 0;
}
.cat-job-context-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cat-job-context-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}
.cat-job-context-chip em {
  font-style: normal;
  font-weight: 800;
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
}
.cat-job-context-quotes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(42vh, 360px);
  overflow: auto;
  padding-right: 4px;
}
.cat-job-context-quote {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: linear-gradient(180deg, #f7faf8 0%, #f3f6f4 100%);
  border-radius: 0 12px 12px 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: keep-all;
}
.cat-ambiguous-layout > .cat-review-box > .table-wrap {
  flex: 1 1 auto;
  max-height: 420px;
  min-height: 280px;
}

/* 수동 분류 완료: 원본 / 기업 / 그룹 / 세부 / 관리 */
#catBody .table-cat-custom th:nth-child(1),
#catBody .table-cat-custom td:nth-child(1) { width: 24%; }
#catBody .table-cat-custom th:nth-child(2),
#catBody .table-cat-custom td:nth-child(2) { width: 20%; }
#catBody .table-cat-custom th:nth-child(3),
#catBody .table-cat-custom td:nth-child(3) { width: 16%; }
#catBody .table-cat-custom th:nth-child(4),
#catBody .table-cat-custom td:nth-child(4) { width: 14%; }
#catBody .table-cat-custom th:nth-child(5),
#catBody .table-cat-custom td:nth-child(5) { width: 26%; }
#catBody .table-cat-custom th:nth-child(5) { text-align: center; }
#catBody .table-cat-custom td:nth-child(5) .chip-row {
  justify-content: center;
}

/* 직무 카테고리: 카테고리명 좌측, 건수·관리 중앙 */
#catBody .table-cat-job:not(.table-cat-job-sortable) th,
#catBody .table-cat-job:not(.table-cat-job-sortable) td {
  text-align: center;
  vertical-align: middle;
}
#catBody .table-cat-job:not(.table-cat-job-sortable) th:nth-child(1),
#catBody .table-cat-job:not(.table-cat-job-sortable) td:nth-child(1),
#catBody .table-cat-job:not(.table-cat-job-sortable) th:nth-child(2),
#catBody .table-cat-job:not(.table-cat-job-sortable) td:nth-child(2),
#catBody .table-cat-job:not(.table-cat-job-sortable) th:nth-child(3),
#catBody .table-cat-job:not(.table-cat-job-sortable) td:nth-child(3) {
  width: 33.333%;
}
#catBody .table-cat-job:not(.table-cat-job-sortable) td:nth-child(3) .chip-row {
  justify-content: center;
}

/* 확인 필요 직무 열 비율은 table-cat-review와 공통 규칙 사용 */

@media (max-width: 1200px) {
  .filters, .emp-filter-panel .filters, .grid-4, .grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3, .split { grid-template-columns: 1fr; }
  .kpi-stack .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .period-overview-grid { grid-template-columns: 1fr; }
  .upload-split { grid-template-columns: 1fr; }
  .user-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-ambiguous-layout { grid-template-columns: 1fr; }
  .cat-company-layout { grid-template-columns: 1fr; }
  .cat-job-layout { grid-template-columns: 1fr; }
  .cat-job-master-head,
  .cat-job-master-table,
  .cat-job-map { grid-column: 1; }
  .cat-job-master-head { grid-row: 1; }
  .cat-job-master-table { grid-row: 2; }
  .cat-job-map { grid-row: 3; position: static; }
  .college-top-period-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
  .emp-section-nav {
    justify-content: flex-start;
    gap: 4px;
  }
  .emp-section-nav-track {
    justify-content: flex-start;
    gap: 4px;
  }
  .emp-section-opt {
    flex: 0 0 auto;
    min-width: max-content;
  }
  .view-report .metric-strip,
  .view-report .metric-strip-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  table.table-college-stats,
  table.table-college-grouped {
    table-layout: auto;
    width: max-content;
    min-width: 100%;
  }
  table.table-college-stats th:first-child,
  table.table-college-stats td:first-child {
    width: auto;
    min-width: 7.5em;
  }
  table.table-college-stats th:not(:first-child),
  table.table-college-stats td:not(:first-child) {
    min-width: 4.8em;
    white-space: nowrap;
  }
  table.table-college-grouped thead th.th-group {
    white-space: nowrap;
  }
}
@media (max-width: 900px) {
  :root {
    --panel-title-size: 1.05rem;
    --card-gap: 16px;
  }
  .main {
    overflow-x: visible;
  }
  #app { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    max-height: none;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px 12px;
  }
  .brand { padding: 0 4px; }
  .nav {
    flex-direction: column;
    flex-wrap: nowrap;
    width: 100%;
    gap: 6px;
  }
  .nav-item,
  .nav-group-toggle {
    width: 100%;
    flex: 0 0 auto;
    min-width: 0;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 400;
    letter-spacing: inherit;
    line-height: 1.35;
  }
  .nav-item.active,
  .nav-group.open .nav-group-toggle,
  .nav-group.has-active .nav-group-toggle {
    font-weight: 600;
  }
  .nav-group { width: 100%; }
  .nav-group-items {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
  }
  .nav-item.nav-sub {
    width: 100%;
    font-size: 0.86rem;
    font-weight: 400;
    padding: 10px 12px 10px 16px;
  }
  .sidebar-footer { margin-top: 0; width: 100%; }
  .main { padding: 14px 12px 28px; }
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .topbar h1 { font-size: 1.35rem; }
  .panel { padding: 14px; }
  .panel-header {
    flex-direction: column;
    align-items: stretch;
  }
  .panel-title-note {
    font-size: 0.68rem;
    margin-left: 4px;
  }
  .panel-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .college-scheme-checks {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    justify-content: flex-start;
    gap: 10px 14px;
  }
  .college-panel-controls {
    width: 100%;
    justify-content: flex-end;
    margin-top: 2px;
  }
  .viz-toggle {
    width: fit-content;
    max-width: 100%;
    flex: 0 0 auto;
    align-self: flex-end;
  }
  .panel-header > .viz-toggle {
    align-self: flex-end;
  }
  .emp-view-bar,
  .career-filter-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-left: 0;
  }
  .career-view-toggle,
  .emp-company-toggle {
    margin-left: 0;
    align-self: flex-end;
  }
  .mapping-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .kpi-stack .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-stack .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-form { grid-template-columns: 1fr; }
  .filters {
    grid-template-columns: 1fr;
  }
  .emp-filter-panel .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .period-bar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
  }
  .period-bar select,
  .period-bar input[type="date"] {
    width: auto;
    min-width: 0;
    max-width: 100%;
    height: 38px;
    padding: 6px 12px;
    line-height: 1.35;
    box-sizing: border-box;
  }
  .field-period-controls select,
  .field-period-controls input[type="date"] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto;
    min-height: 42px;
    padding: 10px 12px;
    line-height: 1.4;
    box-sizing: border-box;
  }
  .career-view-bar,
  .emp-view-bar {
    margin: 0 0 6px;
  }
  .career-filter-fields {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .career-filter-group {
    width: 100%;
    gap: 4px;
    justify-content: flex-start;
  }
  .career-filter-college {
    flex: 0 0 auto;
    max-width: none;
    min-width: 0;
    width: 100%;
  }
  .career-filter-controls {
    width: 100%;
  }
  .career-filter-group select,
  .career-filter-group input[type="date"] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  /* career 필터 패널만 full-width — summary 툴바 교차검증 기준은 인라인 유지 */
  .career-filter-fields > .career-data-criteria {
    border-left: 0;
    padding-left: 0;
    margin-left: 0;
    width: 100%;
  }
  .career-view-toggle {
    margin-left: 0;
    width: fit-content;
    max-width: 100%;
  }
  .career-filter-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }
  /* view-report 툴바: period-bar width:100%를 덮고, grow로 한 줄 독점하지 않게 */
  .view-report .report-toolbar-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
  }
  .view-report .report-toolbar-row > .period-bar,
  .view-report .report-toolbar-row > .student-lookup-form,
  .view-report .report-toolbar-row > .career-data-criteria {
    flex: 0 0 auto;
    width: fit-content;
    max-width: 100%;
    min-width: 0;
  }
  .view-report .report-toolbar-row > .career-data-criteria {
    border-left: 0;
    margin-left: 0;
    padding-left: 0;
  }
  .view-report .report-toolbar-row > .period-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
  }
  .view-report .report-toolbar-row .period-bar .period-extra {
    flex: 0 0 auto;
    width: auto;
  }
  .view-report .report-toolbar-row .period-bar select,
  .view-report .report-toolbar-row .period-bar input[type="date"] {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    height: 38px;
    padding: 6px 12px;
    border-radius: 10px;
    box-sizing: border-box;
  }
  .view-report .report-toolbar-row > .student-lookup-form {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
  }
  .view-report .report-toolbar-row .student-lookup-form input {
    flex: 0 0 auto;
    width: 140px;
    min-width: 96px;
    height: 38px;
    padding: 6px 12px;
    border-radius: 10px;
    box-sizing: border-box;
  }
  .view-report .report-toolbar-row .student-lookup-form .btn {
    flex: 0 0 auto;
    height: 38px;
    padding: 0 12px;
    box-sizing: border-box;
  }
  .kpi-card {
    min-height: 0;
    grid-template-rows: auto auto auto;
    row-gap: 4px;
    padding: 12px;
  }
  .kpi-label {
    -webkit-line-clamp: 2;
  }
  .kpi-sub {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
  .chart-box { height: 280px; }
  .chart-box.tall { height: 340px; }
  .chart-box.short { height: 240px; }
  .chart-box.chart-donut { height: 260px; }
  .chart-box.chart-hbar { height: min(360px, 52vh); min-height: 260px; }
  .table-wrap {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    overflow-x: auto;
    touch-action: pan-x pan-y;
  }
  /* 기본 표는 폭에 맞추되, 다열 표는 가로 스크롤로 깨짐 방지 */
  .table-wrap > table:not(.table-college-stats):not(.table-period-matrix):not(.table-scroll):not(.table-text-wrap) {
    min-width: 0;
  }
  .table-wrap > table.table-text-wrap {
    min-width: 0;
    width: 100%;
  }
  .table-wrap > table.table-college-stats,
  .table-wrap > table.table-period-matrix,
  .table-wrap > table.table-scroll {
    width: max-content;
    min-width: max(100%, 640px);
    max-width: none;
  }
  #catBody .table-cat-review,
  #catBody .table-cat-amb-job {
    min-width: 0;
  }
  #catBody .table-company-master,
  #catBody .table-cat-custom,
  #catBody .table-cat-job-sortable {
    min-width: 520px;
  }
  .cat-master-panel .table-wrap,
  .cat-review-box .table-wrap {
    border-radius: 12px;
  }
  .period-count-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  }
  .period-count-card .pc-tip {
    left: 0;
    right: 0;
    bottom: auto;
    top: calc(100% + 6px);
    transform: none;
    width: auto;
    z-index: 8;
  }
  .q-group-grid,
  .q-group-grid-4,
  .q-group-grid-2 {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    max-width: none;
  }
  .widget-compose {
    align-items: flex-end;
    gap: 8px;
  }
  .widget-compose-hint {
    width: 100%;
    text-align: right;
  }
  .widget-check-row {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px 18px;
  }
  .emp-section-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* 세로는 페이지 스크롤, 가로는 탭 밀기 */
    touch-action: pan-y;
    overscroll-behavior-x: contain;
    padding-bottom: 10px;
  }
  .emp-section-nav-track {
    justify-content: flex-start;
    gap: 4px;
    min-width: max-content;
  }
  .emp-section-opt {
    flex: 0 0 auto;
    min-width: max-content;
    padding: 8px 10px 12px;
    font-size: 0.86rem;
  }
  .modal {
    width: min(100%, 100vw) !important;
    max-height: 92vh;
    margin: 8px;
    border-radius: 14px;
  }
  .student-lookup-form {
    align-items: center;
  }
  .student-lookup-form input {
    width: min(160px, 100%);
    flex: 1 1 auto;
  }
  .student-lookup-form .btn {
    flex: 0 0 auto;
  }
  .view-report .report-toolbar-row {
    gap: 10px;
  }
  .view-report .report-head {
    margin: 0 0 14px;
    padding: 0;
  }
  .view-report .metric-block {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .view-report .metric-strip,
  .view-report .metric-strip-4,
  .view-report .metric-strip-3,
  .view-report .report-split,
  .view-report .report-compare,
  .view-report .report-pattern-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .view-report .report-compare .metric-block,
  .view-report .report-job-split .metric-block {
    grid-template-columns: 1fr;
  }
  .view-report .metric {
    border: 0;
    padding: 0;
  }
  .view-report .metric:nth-child(odd) {
    padding-right: 0;
  }
}
@media (max-width: 640px) {
  .nav {
    flex-direction: column;
    flex-wrap: nowrap;
  }
  .nav-item {
    width: 100%;
    flex: 0 0 auto;
    min-width: 0;
  }
  .nav-group-items {
    flex-direction: column;
  }
  .filters,
  .grid-4 { grid-template-columns: 1fr; }
  .dup-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dup-kpi-row .kpi-card:first-child:nth-last-child(3) {
    grid-column: 1 / -1;
  }
  .emp-filter-panel .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi-stack .grid-3,
  .kpi-stack .grid-2 { grid-template-columns: 1fr; }
  .kpi-card .kpi-value { font-size: 1.35rem; }
  .chart-box { height: 250px; }
  .chart-box.tall { height: 300px; }
  .chart-box.short { height: 220px; }
  .chart-box.chart-donut { height: 250px; }
  .chart-box.chart-hbar {
    height: auto;
    min-height: 280px;
    max-height: none;
  }
  .viz-toggle {
    flex-wrap: nowrap;
    width: fit-content;
    align-self: flex-end;
  }
  .view-report .report-toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }
  .view-report .report-toolbar-row > .period-bar,
  .view-report .report-toolbar-row > .student-lookup-form,
  .view-report .report-toolbar-row > .career-data-criteria {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
  }
  .view-report .report-toolbar-row > .career-data-criteria {
    border-left: 0;
    margin-left: 0;
    padding-left: 0;
    justify-content: flex-start;
  }
  .view-report .report-toolbar-row .period-bar {
    display: grid;
    grid-template-columns: 2.5em minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }
  .view-report .report-toolbar-row .period-bar select,
  .view-report .report-toolbar-row .period-bar input[type="date"] {
    width: 100%;
    flex: none;
  }
  .view-report .report-toolbar-row .period-bar .period-extra {
    grid-column: 1 / -1;
  }
  .view-report .report-toolbar-row .student-lookup-form {
    display: grid;
    grid-template-columns: 2.5em minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
  }
  .view-report .report-toolbar-row .student-lookup-form input {
    width: 100%;
    min-width: 0;
  }
  .view-report .report-toolbar-row .student-lookup-form .btn {
    width: auto;
    min-width: 4.5em;
  }
  .cat-confirm-assign {
    width: 100%;
  }
  .cat-confirm-create-fields {
    grid-template-columns: 1fr;
  }
  /* 카테고리 관리: 헤더·추가 버튼·모달 */
  .cat-master-panel .panel-header,
  .cat-review-box .panel-header,
  .cat-job-master-head {
    flex-direction: column;
    align-items: stretch;
  }
  .cat-master-panel .panel-header .chip-row,
  .cat-review-box .panel-header .chip-row {
    width: 100%;
    flex-wrap: nowrap;
    gap: 6px;
  }
  .cat-master-panel .panel-header .chip-row.cat-master-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .cat-master-panel .panel-header .chip-row.cat-master-actions:not(:has(#openGroupOrderBtn)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cat-standard-dl {
    padding: 2px 7px;
    font-size: 0.68rem;
  }
  .cat-std-remap-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .cat-master-panel .panel-header .chip-row .btn,
  .cat-master-panel .panel-header .cat-master-btn {
    flex: 1 1 0;
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 6px 4px;
    font-size: 0.78rem;
    line-height: 1.2;
    justify-content: center;
  }
  .cat-btn-full { display: none; }
  .cat-btn-short { display: inline; }
  .cat-custom-hint {
    margin: 2px 0 8px;
    font-size: 0.74rem;
    line-height: 1.35;
  }
  .cat-job-master-head .cat-job-add-row {
    flex: 1 1 auto;
    max-width: none;
    margin-left: 0;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .cat-job-add-row input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    font-size: 16px;
    box-sizing: border-box;
  }
  .cat-job-add-row .btn {
    width: 100%;
    min-height: 44px;
  }
  .cat-job-move-toolbar {
    flex-wrap: wrap;
  }
  .modal-root {
    padding: 10px;
    align-items: end;
  }
  .modal {
    width: 100%;
    max-height: min(92vh, 100%);
    border-radius: 16px 16px 12px 12px;
    padding: 16px;
  }
  .modal.modal-simple {
    width: 100%;
    margin: 0;
  }
  .modal.modal-simple .modal-header h2 {
    font-size: 1.15rem;
  }
  .modal.modal-simple .modal-add-hint {
    font-size: 0.84rem;
  }
  .modal.modal-tall {
    width: 100%;
    height: min(92vh, 100%);
    max-height: 92vh;
  }
  #catBody .table-cat .chip-row {
    flex-wrap: wrap;
  }
  #catBody .cat-job-actions-row {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .college-top-period-grid {
    grid-template-columns: 1fr;
  }
  .view-report .report-split,
  .view-report .report-compare,
  .view-report .report-pattern-split {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .view-report .report-job-patterns {
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  .view-report .report-job-patterns .pattern-list {
    overflow: visible;
  }
  .view-report .report-soft-split > .report-soft-examples {
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  .view-report .report-soft-split .table-wrap {
    overflow-y: visible;
  }
  .view-report .metric-strip-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .view-report .metric-aux {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
  }
  .toast-root {
    left: 12px;
    right: 12px;
  }
  .period-count-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .insight-item {
    padding: 10px 12px;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }
  .pattern-flow {
    gap: 4px;
  }
  .pattern-arrow {
    display: none;
  }
  .pattern-to::before {
    content: "→ ";
    color: var(--ink-muted);
    font-weight: 700;
  }
  /* 확인 필요 표: 카드형으로 펼쳐 지정/확정이 잘리지 않게 */
  #catBody .table-cat-review,
  #catBody .table-cat-amb-job {
    min-width: 0 !important;
    width: 100%;
  }
  #catBody .table-cat-review thead,
  #catBody .table-cat-amb-job thead {
    display: none;
  }
  #catBody .table-cat-review tbody,
  #catBody .table-cat-amb-job tbody {
    display: block;
  }
  #catBody .table-cat-review tr,
  #catBody .table-cat-amb-job tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 4px 6px;
    padding: 8px 6px;
    border-bottom: 1px solid var(--line);
    align-items: center;
  }
  #catBody .table-cat-review td,
  #catBody .table-cat-amb-job td {
    display: block;
    width: auto !important;
    height: auto !important;
    padding: 0;
    border: 0;
    text-align: left !important;
    overflow: visible;
    white-space: normal;
    word-break: keep-all;
  }
  #catBody .table-cat-review td:nth-child(1),
  #catBody .table-cat-amb-job td:nth-child(1) {
    grid-column: 1;
    font-weight: 700;
    font-size: 0.88rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #catBody .table-cat-review td:nth-child(2),
  #catBody .table-cat-amb-job td:nth-child(2) {
    grid-column: 2 / 4;
    text-align: right !important;
    color: var(--ink-muted);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
  }
  #catBody .table-cat-review td:nth-child(3),
  #catBody .table-cat-amb-job td:nth-child(3) {
    grid-column: 1 / 3;
    padding-top: 0;
    min-width: 0;
  }
  #catBody .table-cat-review td:nth-child(4),
  #catBody .table-cat-amb-job td:nth-child(4) {
    grid-column: 3;
    align-self: center;
  }
  #catBody .table-cat-review td:nth-child(3) .cat-confirm-assign,
  #catBody .table-cat-amb-job td:nth-child(3) .cat-confirm-assign {
    width: 100%;
    margin: 0;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    text-align: left;
  }
  #catBody .table-cat-review .cat-confirm-assign > select,
  #catBody .table-cat-amb-job .cat-confirm-assign > select {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    padding: 6px 8px;
    font-size: 0.78rem;
    text-align: left;
    text-align-last: left;
  }
  #catBody .table-cat-review .cat-confirm-create,
  #catBody .table-cat-amb-job .cat-confirm-create {
    flex: 1 1 100%;
  }
  #catBody .table-cat-review td:nth-child(4) .btn,
  #catBody .table-cat-amb-job td:nth-child(4) .btn {
    display: inline-flex;
    min-width: 0;
    min-height: 32px;
    padding: 5px 10px;
    font-size: 0.78rem;
    justify-content: center;
  }

  /* 표준 그룹/기업 · 매핑 완료 · 직무 표준: 카드형 (가로 강제 스크롤 제거) */
  #catBody .table-company-master,
  #catBody .table-cat-custom,
  #catBody .table-cat-job,
  #catBody .table-cat-job-sortable {
    min-width: 0 !important;
    width: 100%;
  }
  #catBody .table-company-master thead,
  #catBody .table-cat-custom thead,
  #catBody .table-cat-job-sortable thead {
    display: none;
  }
  #catBody .table-company-master tbody,
  #catBody .table-cat-custom tbody,
  #catBody .table-cat-job-sortable tbody {
    display: block;
  }
  #catBody .table-company-master tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 6px;
    padding: 8px 6px;
    border-bottom: 1px solid var(--line);
  }
  #catBody .table-cat-custom tr {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px 6px;
    padding: 6px 4px;
    border-bottom: 1px solid var(--line);
  }
  #catBody .table-cat-job-sortable tr {
    display: grid;
    gap: 4px 8px;
    padding: 8px 6px;
    border-bottom: 1px solid var(--line);
    align-items: center;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-areas:
      "no drag name count"
      "actions actions actions actions";
  }
  #catBody .table-company-master td,
  #catBody .table-cat-custom td,
  #catBody .table-cat-job-sortable td {
    display: block;
    width: auto !important;
    height: auto !important;
    padding: 0;
    border: 0;
    text-align: left !important;
    overflow: visible;
    white-space: normal;
    word-break: keep-all;
  }
  #catBody .table-company-master td[colspan],
  #catBody .table-cat-custom td[colspan],
  #catBody .table-cat-job-sortable td[colspan] {
    flex: 1 1 100%;
    grid-column: 1 / -1;
    grid-area: auto;
  }
  /* 1줄: 그룹 · 기업 … 건수 / 2줄: 관리 */
  #catBody .table-company-master td:nth-child(1) {
    order: 1;
    max-width: 34%;
    font-size: 0.75rem;
    color: var(--ink-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #catBody .table-company-master td:nth-child(1)::after {
    content: " ·";
  }
  #catBody .table-company-master td:nth-child(2) {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 700;
    font-size: 0.86rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #catBody .table-company-master td:nth-child(3) {
    order: 3;
    margin-left: auto;
    font-size: 0.78rem;
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  #catBody .table-company-master td:nth-child(4) {
    display: none; /* 별칭은 모바일에서 숨김 */
  }
  #catBody .table-company-master td:nth-child(5) {
    order: 4;
    flex: 1 1 100%;
    padding-top: 2px;
  }
  #catBody .table-company-master td.col-actions .chip-row,
  #catBody .table-company-master td.col-actions .cat-job-actions-row {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 4px;
  }
  #catBody .table-company-master .btn-sm,
  #catBody .table-company-master .cat-job-actions > summary.btn {
    min-height: 28px;
    min-width: 3.2em;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
  }
  #catBody .table-company-master tr.cat-company-group-head td {
    flex: 1 1 100%;
    max-width: none;
    font-size: 0.9rem;
    color: inherit;
    white-space: normal;
  }
  #catBody .table-company-master tr.cat-company-group-head td::after {
    content: none;
  }
  #catBody .table-cat-custom td:nth-child(1) {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 700;
    font-size: 0.84rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #catBody .table-cat-custom td:nth-child(2) {
    display: block;
    flex: 0 1 30%;
    min-width: 0;
    max-width: 36%;
    font-size: 0.74rem;
    color: var(--ink-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #catBody .table-cat-custom td:nth-child(2)::before {
    content: "→ ";
  }
  #catBody .table-cat-custom td:nth-child(3),
  #catBody .table-cat-custom td:nth-child(4) {
    display: none;
  }
  #catBody .table-cat-custom td:nth-child(5) {
    flex: 0 0 auto;
    padding-top: 0;
  }
  #catBody .table-cat-custom .chip-row {
    flex-wrap: nowrap;
    gap: 4px;
    justify-content: flex-end;
  }
  #catBody .table-cat-custom .btn-sm {
    min-height: 28px;
    padding: 3px 8px;
    font-size: 0.72rem;
  }
  #catBody .table-cat-job-sortable td:nth-child(1) {
    grid-area: no;
    font-size: 0.78rem;
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
  }
  #catBody .table-cat-job-sortable td:nth-child(2) {
    grid-area: drag;
  }
  #catBody .table-cat-job-sortable td:nth-child(3) {
    grid-area: name;
    font-weight: 700;
    font-size: 0.86rem;
    line-height: 1.3;
  }
  #catBody .table-cat-job-sortable td:nth-child(4) {
    grid-area: count;
    text-align: right !important;
    color: var(--ink-muted);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
  }
  #catBody .table-cat-job-sortable td:nth-child(5) {
    grid-area: actions;
    padding-top: 2px;
  }
  #catBody .table-cat-job-sortable .col-actions .chip-row,
  #catBody .table-cat-job-sortable .cat-job-actions-row {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 4px;
  }
  .cat-group-order-item {
    padding: 10px 8px;
  }
  .cat-group-order-name {
    font-size: 0.92rem;
  }
}

.manual-student-picker { position: relative; margin-bottom: 12px; }
.manual-student-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-muted);
}
.manual-student-picker input[type="search"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
}
.manual-student-search { position: relative; width: min(420px, 100%); }
.manual-date-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(420px, 100%);
  margin-top: 8px;
}
.manual-date-row[hidden],
.manual-student-profile[hidden] { display: none !important; }
.manual-date-row label {
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-muted);
}
.manual-date-row select {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
}
.manual-student-results {
  position: absolute;
  z-index: 6;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  max-height: 280px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.manual-student-results button {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 8px 12px;
}
.manual-student-results button:last-child { border-bottom: 0; }
.manual-student-results button:hover { background: var(--bg-soft); }
.manual-student-results strong { color: var(--ink); }
.manual-student-results span,
.manual-student-results em {
  color: var(--ink-muted);
  font-style: normal;
  font-size: 0.82rem;
}
.manual-student-results em { grid-column: 1 / -1; }
.manual-student-empty {
  margin: 0;
  padding: 10px 12px;
  color: var(--ink-muted);
  font-size: 0.88rem;
}
.manual-student-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.manual-student-chips:empty { display: none; }
.manual-student-chips button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  color: var(--ink);
}
.manual-student-chips button span {
  margin-left: 6px;
  color: var(--ink-muted);
}
.manual-student-chips button.on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.manual-student-profile {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}
.manual-student-profile .ms-item {
  min-width: 0;
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 8px 10px;
}
.manual-student-profile .ms-k {
  font-size: 0.75rem;
  color: var(--ink-muted);
}
.manual-student-profile .ms-v {
  margin-top: 2px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.manual-student-hint { margin: 0 0 12px; }
.manual-legacy { margin-top: 16px; }
.manual-legacy summary { cursor: pointer; color: var(--ink-muted); margin-bottom: 10px; }
@media (max-width: 720px) {
  .manual-student-profile { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
