/* ============================================================
   Modern Console UI — 2026 trend refresh
   - Pretendard typography
   - Soft neutral palette (Slate + Indigo accent)
   - 8pt spacing grid, soft shadows, smooth motion
   ============================================================ */

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css");

:root {
  /* Neutral scale */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-150: #e8edf3;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Brand */
  --brand-50: #eef2ff;
  --brand-100: #e0e7ff;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;

  /* Semantic */
  --success-50: #ecfdf5;
  --success-500: #10b981;
  --success-700: #047857;
  --warning-50: #fffbeb;
  --warning-500: #f59e0b;
  --danger-50: #fef2f2;
  --danger-500: #ef4444;
  --danger-600: #dc2626;
  --info-50: #eff6ff;
  --info-500: #3b82f6;
  --info-700: #1d4ed8;

  /* Tokens */
  --header-bg: #0f172a;
  --header-border: #1e293b;
  --sidebar-bg: #ffffff;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --line: var(--gray-200);
  --line-soft: var(--gray-150);
  --text: var(--gray-800);
  --text-strong: var(--gray-900);
  --muted: var(--gray-500);

  /* Radius */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-full: 999px;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.04);
  --shadow-focus: 0 0 0 4px rgba(99, 102, 241, 0.15);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 120ms;
  --t-base: 200ms;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

button,
input,
select,
textarea {
  font-family: inherit;
  letter-spacing: -0.01em;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: var(--r-full);
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* ============================================================
   Global Header
   ============================================================ */
.global-header {
  height: 64px;
  background: var(--header-bg);
  color: #fff;
  display: grid;
  grid-template-columns: 260px minmax(360px, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  border-bottom: 1px solid var(--header-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ncp-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  border-radius: var(--r-sm);
  justify-content: center;
}

/* Task 3: 헤더 — 칼테크 심볼 로고 */
.header-logo-img {
  width: 38px; height: 38px;
  object-fit: contain;
  background: #fff;
  border-radius: var(--r-sm);
  padding: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Task 3: 대시보드 hero — 칼테크 좌우 조합 로고 */
.hero-card-left {
  display: flex; align-items: center; gap: 18px;
  flex: 1;
}
.hero-logo-img {
  height: 56px;
  max-width: 220px;
  object-fit: contain;
  flex-shrink: 0;
}

.ncp-logo span,
.ncp-logo strong {
  display: block;
  background: #fff;
}
.ncp-logo span {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.ncp-logo strong {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.brand-text b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.brand-text small {
  display: block;
  color: var(--gray-400);
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.global-search {
  max-width: 560px;
  height: 40px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  padding: 0 14px;
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.global-search:focus-within {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
.global-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #e2e8f0;
  font-size: 14px;
  height: 100%;
}
.global-search input::placeholder {
  color: var(--gray-500);
}
.global-search span {
  font-size: 18px;
  color: var(--gray-400);
  margin-right: 10px;
}

.header-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  white-space: nowrap;
}

.region-chip,
.mode-chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  padding: 5px 10px;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 12px;
  color: #e2e8f0;
}

.alarm,
.help {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
  color: var(--gray-300);
}
.alarm:hover,
.help:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.user-circle {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  font-weight: 700;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}

/* 사용자 정보 (이름 + 역할) */
.user-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.user-meta {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}
.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}
.user-role {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

/* 보기 모드 토글 (전체 / ISO만) */
.view-mode-toggle {
  margin: 0;
  padding: 0;
  display: inline-flex;
}
.view-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  white-space: nowrap;
}
.view-mode-btn:hover { transform: translateY(-1px); }
.view-mode-btn .mode-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}
.view-mode-btn.mode-all {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.45);
}
.view-mode-btn.mode-iso {
  background: rgba(220, 38, 38, 0.18);
  color: #fca5a5;
  border-color: rgba(220, 38, 38, 0.55);
}

/* ISO / B 모드 배지 (목록·상세 공용) — Task 14: 셀 크기에 맞춤 */
.cal-mode-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.4;
  border: 1px solid transparent;
}
.cal-mode-iso {
  background: #dbeafe;
  color: #1e40af;
  border-color: #bfdbfe;
}
.cal-mode-b {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.header-logout {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #e2e8f0;
  border-radius: var(--r-sm);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.header-logout:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
}

/* ============================================================
   Workspace Layout
   ============================================================ */
.workspace {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 64px);
}

.left-sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  padding: 20px 12px;
  overflow-y: auto;
}

.menu-label {
  padding: 8px 14px 16px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-strong);
  letter-spacing: -0.02em;
}

.side-menu {
  padding: 4px 0;
}

.side-section {
  margin-top: 16px;
}

.side-section-title {
  padding: 10px 14px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  margin: 2px 0;
  font-size: 14px;
  color: var(--gray-700);
  font-weight: 500;
  border-radius: var(--r-sm);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.side-link:hover {
  background: var(--gray-100);
  color: var(--text-strong);
}
.side-link.active {
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: 600;
}

.main-console {
  padding: 16px 20px 40px;
  min-width: 0;
  max-width: 1600px;
}

/* ============================================================
   Page Title / Breadcrumb
   ============================================================ */
.breadcrumb {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
  font-weight: 500;
}
.breadcrumb a:hover {
  color: var(--brand-600);
}

.console-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.console-title h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: 28px;
  letter-spacing: -0.03em;
  font-weight: 700;
  line-height: 1.25;
}
.console-title p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--r-full);
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 8px;
}

.title-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  box-shadow: var(--shadow-xs);
  letter-spacing: -0.01em;
}
.btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--text-strong);
}
.btn:active {
  transform: translateY(1px);
}
.btn:focus-visible {
  outline: 0;
  box-shadow: var(--shadow-focus);
}

.btn-primary {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-primary:hover {
  background: var(--brand-700);
  border-color: var(--brand-700);
  color: #fff;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-700);
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--gray-100);
}

.btn-danger {
  background: var(--danger-500);
  border-color: var(--danger-500);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-danger:hover {
  background: var(--danger-600);
  border-color: var(--danger-600);
  color: #fff;
}

.btn-full {
  width: 100%;
  margin-top: 12px;
  height: 44px;
}

/* ============================================================
   Stat Cards
   ============================================================ */
.console-stat-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  margin-bottom: 20px;
  overflow-x: auto;
}
.console-stat-row > .console-stat {
  flex: 1 1 0;
  min-width: 0;
}

.console-stat {
  background: #fff;
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.console-stat:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.console-stat span {
  display: block;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}
.console-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  color: var(--text-strong);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

/* ============================================================
   Panels
   ============================================================ */
.console-panel,
.form-panel,
.empty-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.console-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.filter-form {
  display: flex;
  gap: 8px;
  width: 100%;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.filter-form select {
  width: 160px;
  margin: 0;
}

.search-control {
  display: flex;
  width: min(540px, 100%);
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.search-control:focus-within {
  border-color: var(--brand-500);
  box-shadow: var(--shadow-focus);
}
.search-control input {
  border: 0;
  margin: 0;
  height: 38px;
  flex: 1;
}
.search-control input:focus {
  box-shadow: none;
}
.search-control button {
  width: 80px;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--gray-50);
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-700);
  transition: background var(--t-fast) var(--ease);
}
.search-control button:hover {
  background: var(--gray-100);
}

/* ============================================================
   Table
   ============================================================ */
.table-wrap {
  overflow-x: auto;
}

.console-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}
.console-table th {
  background: var(--gray-50);
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  font-size: 12px;
  color: var(--gray-600);
  font-weight: 600;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.console-table td {
  border-bottom: 1px solid var(--line-soft);
  padding: 14px;
  font-size: 13px;
  vertical-align: middle;
  color: var(--gray-700);
  transition: background var(--t-fast) var(--ease);
}
.console-table tbody tr:last-child td {
  border-bottom: 0;
}
.console-table tbody tr:hover td {
  background: var(--brand-50);
}

.strong-cell {
  font-weight: 600;
  color: var(--text-strong);
}
.strong-cell a:hover {
  color: var(--brand-600);
}

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.number-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.empty-cell {
  padding: 56px !important;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* Status pills / chips */
.status-pill,
.type-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-direction: row;
  word-break: keep-all;
}
.status-pill.on {
  background: var(--success-50);
  color: var(--success-700);
}
.status-pill.on::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success-500);
  margin-right: 6px;
}
.status-pill.off {
  background: var(--gray-100);
  color: var(--gray-500);
}
.status-pill.off::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray-400);
  margin-right: 6px;
}
.type-chip {
  background: var(--info-50);
  color: var(--info-700);
}

/* 업체 구분별 chip 색상 (Task 2) */
.type-chip.type-normal {
  background: #e5f1ff;
  color: #1d4ed8;
}
.type-chip.type-dealer {
  background: #ffedd5;
  color: #c2410c;
}
.type-chip.type-agency {
  background: #f3e8ff;
  color: #7e22ce;
}

/* 다중 type chip 가로 정렬 */
.type-chip-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

/* 회사 type 별 row 배경색 (Task 2) — 좌측 색상 막대 형식으로 강조 */
.row-type-normal td:first-child {
  border-left: 3px solid #3b82f6;
}
.row-type-dealer td:first-child {
  border-left: 3px solid #f97316;
}
.row-type-agency td:first-child {
  border-left: 3px solid #a855f7;
}
.row-type-dealer {
  background: #fff7ed;
}
.row-type-agency {
  background: #faf5ff;
}

/* form 의 업체구분/상태 라디오 가로 배치 (Task 1, 4) */
.type-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.type-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong);
  transition: all var(--t-fast) var(--ease);
  user-select: none;
}
.type-radio input { margin: 0; }
.type-radio:hover {
  border-color: var(--brand-400);
  background: var(--brand-50);
}
.type-radio.type-normal.active {
  background: #e5f1ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}
.type-radio.type-dealer.active {
  background: #ffedd5;
  border-color: #f97316;
  color: #c2410c;
}
.type-radio.type-agency.active {
  background: #f3e8ff;
  border-color: #a855f7;
  color: #7e22ce;
}
.type-radio.status-on.active {
  background: #ecfdf5;
  border-color: #10b981;
  color: #047857;
}
.type-radio.status-off.active {
  background: #fef2f2;
  border-color: #ef4444;
  color: #b91c1c;
}

/* 클릭 가능한 stat 카드 (Task 3) */
.console-stat.clickable {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.console-stat.clickable.active {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 2px var(--brand-200);
}
.console-stat.clickable.active.stat-dealer {
  border-color: #f97316;
  box-shadow: 0 0 0 2px #fed7aa;
}
.console-stat.clickable.active.stat-agency {
  border-color: #a855f7;
  box-shadow: 0 0 0 2px #e9d5ff;
}

.inactive-row {
  opacity: 0.55;
}

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

.mini-link {
  color: var(--brand-600);
  font-weight: 600;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: var(--r-xs);
  transition: background var(--t-fast) var(--ease);
  white-space: nowrap;
}
.mini-link:hover {
  background: var(--brand-50);
}

/* ============================================================
   Forms
   ============================================================ */
.form-section-title,
.panel-title {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--text-strong);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 18px;
  padding: 20px;
}
.form-field {
  min-width: 0;
}
.form-field.wide {
  grid-column: span 2;
}
.form-field.full {
  grid-column: 1 / -1;
}
.form-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 600;
}
.form-field label b {
  color: var(--danger-500);
  margin-left: 2px;
}

input,
select,
textarea {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0 12px;
  background: #fff;
  color: var(--text-strong);
  font-size: 14px;
  margin: 0;
  outline: 0;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
}
textarea {
  height: auto;
  min-height: 100px;
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
}
input:hover,
select:hover,
textarea:hover {
  border-color: var(--gray-300);
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-500);
  box-shadow: var(--shadow-focus);
}
input:disabled,
select:disabled,
textarea:disabled {
  background: var(--gray-50);
  color: var(--gray-400);
  cursor: not-allowed;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  background: var(--gray-50);
}

.alert-error {
  background: var(--danger-50);
  border: 1px solid #fecaca;
  border-left: 4px solid var(--danger-500);
  color: #991b1b;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 13px;
  border-radius: var(--r-sm);
}

/* ============================================================
   Detail View
   ============================================================ */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  gap: 0;
}
.detail-grid > div {
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 16px 20px;
}
.detail-grid > div:nth-child(2n) {
  border-right: 0;
}
.detail-grid > div.full {
  grid-column: 1 / -1;
  border-right: 0;
}
.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.detail-grid strong {
  color: var(--text-strong);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  font-weight: 500;
}

.mini-info-list {
  padding: 8px 20px;
}
.mini-info-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.mini-info-list div:last-child {
  border-bottom: 0;
}
.mini-info-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.mini-info-list b {
  text-align: right;
  font-size: 13px;
  color: var(--text-strong);
  font-weight: 600;
}

.danger-panel {
  padding-bottom: 16px;
  border-color: #fecaca;
}
.danger-panel .panel-title {
  background: var(--danger-50);
  color: #991b1b;
  border-bottom-color: #fecaca;
}
.danger-panel p {
  padding: 16px 20px 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}
.danger-panel form {
  padding: 0 20px;
}

/* ============================================================
   Login
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f6f8fb 0%, #eef2ff 100%);
  padding: 20px;
}

.login-card {
  width: 420px;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  padding: 40px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}

.login-logo {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}

/* Task 3: 로그인 카드 — 칼테크 상하 조합 로고 */
.login-logo-img {
  display: block;
  margin: 0 auto 18px;
  width: 200px;
  max-width: 70%;
  height: auto;
}

/* Task 4: 로그인 ID/비밀번호 필드 간격 */
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form .login-field { display: flex; flex-direction: column; gap: 8px; }
.login-form .login-field label {
  font-size: 14px; font-weight: 700; color: var(--gray-700);
}
.login-form .login-field input {
  padding: 12px 14px;
  font-size: 15px;
  border: 1.5px solid var(--gray-300);
  border-radius: 8px;
  transition: border-color .12s, box-shadow .12s;
}
.login-form .login-field input:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.login-form button[type=submit] { margin-top: 10px; }

.login-card h1 {
  text-align: center;
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-strong);
}
.login-card p {
  text-align: center;
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 14px;
}

.login-version {
  margin-top: 20px;
  text-align: center;
  color: var(--gray-400);
  font-size: 12px;
}

/* ============================================================
   Legacy / Dashboard compatibility
   ============================================================ */
.hero-card,
.section-card,
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 24px;
  margin-bottom: 16px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
}
.hero-card h1,
.section-card h2 {
  margin: 0 0 8px;
  color: var(--text-strong);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero-card p,
.section-card p {
  color: var(--muted);
  margin: 0;
}

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

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.menu-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: var(--r-md);
  transition: all var(--t-base) var(--ease);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
}
.menu-card:hover {
  border-color: var(--brand-500);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.menu-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.page-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.field-pill {
  background: var(--gray-50);
  border: 1px solid var(--line);
  padding: 12px 14px;
  font-weight: 600;
  border-radius: var(--r-sm);
  font-size: 13px;
}

.empty-panel {
  padding: 56px;
  text-align: center;
}
.empty-icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: 0.6;
}
.empty-panel h2 {
  margin: 0 0 10px;
  color: var(--text-strong);
  font-size: 18px;
  font-weight: 700;
}
.empty-panel p {
  margin: 0 0 20px;
  color: var(--muted);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1200px) {
  .global-header {
    grid-template-columns: 220px 1fr auto;
    gap: 16px;
  }
  .console-stat-row,
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .global-header {
    grid-template-columns: 1fr;
    height: auto;
    padding: 14px 16px;
    gap: 12px;
  }
  .global-search,
  .header-right {
    display: none;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .left-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px;
  }
  .main-console {
    padding: 20px 16px 40px;
  }
  .console-title {
    flex-direction: column;
  }
  .console-title h1 {
    font-size: 22px;
  }
  .console-stat-row,
  .stat-grid,
  .menu-grid,
  .field-grid,
  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .form-field.wide {
    grid-column: span 1;
  }
  .filter-form {
    flex-direction: column;
  }
  .filter-form select,
  .search-control {
    width: 100%;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* =========================================================
   직원관리 / 권한설정 화면 보정
========================================================= */

.console-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.console-title h1 {
  margin: 4px 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
}

.console-title p {
  margin: 0;
  font-size: 13px;
  color: #667085;
}

.breadcrumb {
  font-size: 12px;
  color: #8a94a6;
}

.title-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.console-stat-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-bottom: 14px;
  overflow-x: auto;
}

.console-stat {
  background: #fff;
  border: 1px solid #d9dee8;
  padding: 12px 14px;
}

.console-stat span {
  display: block;
  font-size: 12px;
  color: #667085;
  margin-bottom: 4px;
}

.console-stat strong {
  font-size: 20px;
  color: #111827;
}

.console-panel,
.form-panel {
  background: #fff;
  border: 1px solid #d9dee8;
  padding: 16px;
  margin-bottom: 14px;
}

.panel-title,
.form-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e9f0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field.wide {
  grid-column: span 2;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 13px;
  font-weight: 600;
  color: #344054;
}

.form-field label b {
  color: #d92d20;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cfd6e1;
  background: #fff;
  padding: 7px 9px;
  font-size: 13px;
  color: #111827;
  box-sizing: border-box;
}

.form-field textarea {
  resize: vertical;
}

.form-field small {
  font-size: 12px;
  color: #7a8497;
  line-height: 1.4;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 18px 0 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: #1f5eff;
  border-color: #1f5eff;
  color: #fff;
}

.btn-ghost {
  background: #fff;
  border-color: #cfd6e1;
  color: #344054;
}

.btn-danger {
  background: #d92d20;
  border-color: #d92d20;
  color: #fff;
}

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

.filter-form {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.filter-form select {
  width: 130px;
  height: 34px;
  border: 1px solid #cfd6e1;
  padding: 0 8px;
  font-size: 13px;
}

.search-control {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 440px;
}

.search-control input {
  flex: 1;
  height: 34px;
  border: 1px solid #cfd6e1;
  border-right: 0;
  padding: 0 9px;
  font-size: 13px;
}

.search-control button {
  height: 34px;
  border: 1px solid #344054;
  background: #344054;
  color: #fff;
  padding: 0 13px;
  font-size: 13px;
  cursor: pointer;
}

.table-wrap {
  overflow-x: auto;
}

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

.console-table th {
  background: #f3f5f8;
  border: 1px solid #d9dee8;
  padding: 8px 7px;
  font-weight: 700;
  color: #344054;
  text-align: center;
}

.console-table td {
  border: 1px solid #e1e6ef;
  padding: 8px 7px;
  color: #344054;
  vertical-align: middle;
}

.console-table tbody tr:hover {
  background: #f8fafc;
}

.strong-cell {
  font-weight: 700;
}

.strong-cell a,
.mini-link {
  color: #1f5eff;
  text-decoration: none;
}

.row-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 22px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
}

.status-pill.on {
  background: #e8f6ee;
  color: #087443;
}

.status-pill.off {
  background: #f2f4f7;
  color: #667085;
}

.type-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  background: #eef4ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 7px;
  background: #eef4ff;
  color: #1f5eff;
  border-radius: 999px;
  font-size: 13px;
}

/* 권한 설정 — 모던 리디자인 */
.permission-desc-text {
  margin: 0 0 4px;
  padding: 0 0 10px;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.permission-groups-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 4px;
}

.permission-group {
  border: 1px solid #dde3ed;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.permission-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(to right, #f6f8fb, #fafbfd);
  border-bottom: 1px solid #e5eaf3;
}

.permission-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.permission-group-title::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 14px;
  background: #6366f1;
  border-radius: 2px;
  flex-shrink: 0;
}

.permission-select-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  user-select: none;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #dde3ed;
  background: #fff;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
  line-height: 1;
}

.permission-select-all:hover {
  border-color: #6366f1;
  color: #4338ca;
  background: #eef2ff;
}

.permission-select-all input[type="checkbox"] {
  width: 13px;
  height: 13px;
  accent-color: #4f46e5;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

.permission-check-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 6px;
  padding: 10px 12px 12px;
}

.permission-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
  font-size: 13px;
  color: #475569;
  background: #fff;
  user-select: none;
  line-height: 1.3;
}

.permission-check:hover {
  border-color: #818cf8;
  background: #eef2ff;
  color: #3730a3;
}

.permission-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #4f46e5;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

.permission-summary {
  padding: 14px 16px;
}

.permission-summary p {
  margin: 8px 0 0;
  color: #667085;
  font-size: 13px;
}

.permission-summary-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* 교육이수현황 */
.training-section-header {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding-right: 0 !important;
}

.training-section-header span {
  flex: 1;
}

.training-table-wrap {
  overflow-x: auto;
}

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

.training-table th {
  background: #f6f8fb;
  border-bottom: 2px solid #e2e8f0;
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.training-table td {
  border-bottom: 1px solid #f1f5f9;
  padding: 7px 10px;
  vertical-align: middle;
  color: #374151;
}

.training-table tbody tr:last-child td {
  border-bottom: 0;
}

.training-table td input,
.training-table td select {
  height: 34px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #cfd6e1;
}

.training-table td input:focus,
.training-table td select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.training-empty {
  padding: 24px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  margin: 0;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  height: 22px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.result-badge.pass {
  background: #ecfdf5;
  color: #047857;
}

.result-badge.training {
  background: #eff6ff;
  color: #1d4ed8;
}

/* 버튼 사이즈 보조 */
.btn-sm {
  min-height: 30px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
}

.btn-xs {
  min-height: 26px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}

.detail-grid > div {
  border: 1px solid #e1e6ef;
  background: #fbfcfe;
  padding: 10px;
}

.detail-grid > div.full {
  grid-column: 1 / -1;
}

.detail-grid span {
  display: block;
  font-size: 12px;
  color: #7a8497;
  margin-bottom: 4px;
}

.detail-grid strong {
  font-size: 13px;
  color: #1f2937;
  font-weight: 600;
}

.detail-side {
  min-width: 0;
}

.mini-info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-info-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.mini-info-list span {
  color: #667085;
}

.mini-info-list b {
  color: #1f2937;
  text-align: right;
}

.danger-panel p {
  font-size: 13px;
  color: #667085;
  line-height: 1.5;
}

.empty-cell {
  text-align: center;
  padding: 30px 10px !important;
  color: #667085;
}

.alert-error {
  border: 1px solid #f0b4ae;
  background: #fff1f0;
  color: #b42318;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 13px;
}

/* 작은 화면 대응 */
@media (max-width: 1200px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .permission-check-grid {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .console-title {
    flex-direction: column;
  }

  .console-stat-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-field.wide,
  .form-field.full {
    grid-column: auto;
  }

  .permission-check-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .search-control {
    max-width: none;
  }
}
/* ============================================
   교정접수대장 전용 스타일
============================================ */

/* 상태 필 — Task 14, 16: 셀 가득 채우기 */
.receipt-status-pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.receipt-status-received  { background: #dbeafe; color: #1d4ed8; }
.receipt-status-in_progress { background: #fef3c7; color: #b45309; }
.receipt-status-completed { background: #d1fae5; color: #065f46; }
.receipt-status-issued    { background: #ede9fe; color: #5b21b6; }

/* 접수구분 칩 */
.receipt-type-chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.receipt-type-visit    { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.receipt-type-trip     { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.receipt-type-delivery { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }

/* 통계 강조 */
.receipt-stat-received  strong { color: #1d4ed8; }
.receipt-stat-in_progress strong { color: #b45309; }
.receipt-stat-completed strong { color: #065f46; }
.receipt-stat-issued    strong { color: #5b21b6; }

/* 접수번호 셀 */
.receipt-no-cell a { font-family: monospace; font-size: 13px; font-weight: 700; color: var(--brand-600); }
.receipt-no-badge {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  font-family: monospace;
  color: var(--brand-600);
  background: var(--brand-50, #f0f4ff);
  padding: 2px 10px;
  border-radius: 6px;
  margin-left: 8px;
  vertical-align: middle;
}

/* 기기 목록 테이블 공통 */
.receipt-items-wrap {
  margin-top: 4px;
}
.receipt-items-scroll {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--gray-200, #e5e7eb);
}
.receipt-items-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 13px;
}
.receipt-items-table th {
  background: var(--gray-50, #f9fafb);
  color: var(--gray-600, #4b5563);
  font-weight: 600;
  font-size: 12px;
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--gray-200, #e5e7eb);
}
.receipt-items-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--gray-100, #f3f4f6);
  vertical-align: middle;
}
.receipt-items-table tbody tr:last-child td { border-bottom: none; }
.receipt-items-table tbody tr:hover { background: var(--gray-50, #f9fafb); }

/* 인풋 스타일 (폼 내부) */
.item-input {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 5px;
  font-size: 12px;
  background: #fff;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.item-input:focus {
  outline: none;
  border-color: var(--brand-500, #4f46e5);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}
.item-input.item-qty { width: 50px; text-align: center; }

.item-select {
  width: 100%;
  padding: 5px 6px;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 5px;
  font-size: 12px;
  background: #fff;
}

/* 삭제 버튼 */
.btn-item-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  margin: 0 auto;
}
.btn-item-delete:hover { background: #fca5a5; }

/* 폼 힌트 텍스트 */
.receipt-items-hint {
  font-size: 12px;
  color: var(--gray-500, #6b7280);
  margin-top: 6px;
}

/* 상태 변경 버튼 그룹 */
.receipt-status-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.receipt-status-btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 2px solid transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--gray-100, #f3f4f6);
  color: var(--gray-600, #4b5563);
}
.receipt-status-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.receipt-status-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.receipt-status-btn-received.active   { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
.receipt-status-btn-in_progress.active { background: #fef3c7; color: #b45309; border-color: #fcd34d; }
.receipt-status-btn-completed.active  { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.receipt-status-btn-issued.active     { background: #ede9fe; color: #5b21b6; border-color: #c4b5fd; }

.receipt-status-btn-received:hover:not(:disabled)   { background: #dbeafe; color: #1d4ed8; }
.receipt-status-btn-in_progress:hover:not(:disabled) { background: #fef3c7; color: #b45309; }
.receipt-status-btn-completed:hover:not(:disabled)  { background: #d1fae5; color: #065f46; }
.receipt-status-btn-issued:hover:not(:disabled)     { background: #ede9fe; color: #5b21b6; }

/* 빈 기기 목록 */
.receipt-empty-items {
  color: var(--gray-500, #6b7280);
  font-size: 13px;
  text-align: center;
  padding: 24px 0;
}

/* 날짜 범위 필터 */
.date-range-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}
.date-range-wrap input[type="date"] {
  padding: 7px 10px;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
}
.date-range-wrap span { color: var(--gray-400, #9ca3af); font-size: 13px; }

/* 필터 폼 확장 */
.receipt-filter-form {
  flex-wrap: wrap;
  gap: 8px;
}

/* 목록 테이블 */
.receipt-ledger-table { table-layout: fixed; width: 100%; }
.receipt-ledger-table .number-cell { text-align: center; }
.receipt-ledger-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 업체명 셀은 줄바꿈 허용 (딜러 태그 표시) */
.receipt-ledger-table td.strong-cell { white-space: normal; }

/* 조회 전용 테이블 행 강조 없음 */
.receipt-items-view tbody tr:hover { background: transparent; }

@media (max-width: 768px) {
  .receipt-filter-form { flex-direction: column; }
  .date-range-wrap { flex-direction: column; align-items: stretch; }
  .receipt-status-actions { flex-direction: row; flex-wrap: wrap; }
  .receipt-status-btn { flex: 1; min-width: 70px; }
}

/* ============================================================
   교정접수대장 — 신규 필드 스타일
   ============================================================ */

/* 교정장소 칩 */
.loc-chip { display: inline-block; padding: 5px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; white-space: nowrap; letter-spacing: 0.02em; }
.loc-fixed { background: #e0e7ff; color: #3730a3; }
.loc-field { background: #fef3c7; color: #92400e; }

/* 딜러 태그 */
.cert-step-editable {
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
  border-radius: 4px;
  padding: 2px 4px;
}
.cert-step-editable:hover {
  background: var(--brand-50);
  outline: 1px dashed var(--brand-300);
}

.dealer-tag { color: #c2410c; font-size: 11px; }
.agency-tag { color: #7e22ce; font-size: 11px; }

/* 수량 셀 */
.qty-cell { font-size: 12px; color: var(--gray-600); letter-spacing: -0.3px; }

/* 승인단계 배지 */
.approval-badge { display: inline-block; padding: 5px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; }
.approval-none { background: var(--gray-100); color: var(--gray-500); }
.approval-uploaded { background: #dbeafe; color: #1e40af; }
.approval-practitioner { background: #d1fae5; color: #065f46; }
.approval-technical { background: #fef3c7; color: #92400e; }
.approval-final { background: #dcfce7; color: #14532d; }

/* ---- 업체 검색 자동완성 ---- */
.company-search-group { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 12px; }
.company-search-wrap { position: relative; }
.company-search-input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--gray-300);
  border-radius: 6px; font-size: 13px; box-sizing: border-box;
}
.company-search-input:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }
.company-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 200;
  background: #fff; border: 1px solid var(--gray-200); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 260px; overflow-y: auto;
}
.company-dropdown.hidden { display: none; }
.dropdown-item {
  padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--gray-100);
  font-size: 13px; transition: background .12s;
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: var(--brand-50); }
.dropdown-item strong { display: block; color: var(--gray-800); }
.dropdown-item small { color: var(--gray-500); font-size: 11px; }
.dropdown-empty { padding: 12px 14px; color: var(--gray-400); font-size: 13px; }

.selected-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
  padding: 4px 10px; background: var(--brand-50); border: 1px solid var(--brand-100);
  border-radius: 6px; font-size: 13px; color: var(--brand-700);
}
.selected-badge.hidden { display: none; }
.selected-badge button {
  background: none; border: none; cursor: pointer; color: var(--brand-500);
  font-size: 14px; line-height: 1; padding: 0; margin: 0;
}

/* ---- 라디오 그룹 ---- */
.radio-group { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; padding-top: 4px; }
.radio-label { display: flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; }
.radio-label.radio-inline { display: inline-flex; }
.radio-label input[type="radio"] { accent-color: var(--brand-500); }

/* ---- 서명 영역 ---- */
.signature-row { display: flex; gap: 20px; }
.sig-box {
  flex: 1; border: 1px solid var(--gray-200); border-radius: 8px;
  padding: 12px; text-align: center; background: var(--gray-50);
}
.sig-label { font-size: 12px; color: var(--gray-500); margin-bottom: 8px; }
.sig-img { max-width: 160px; max-height: 60px; object-fit: contain; }
.sig-placeholder { height: 50px; display: flex; align-items: center; justify-content: center; color: var(--gray-300); font-size: 12px; }

/* ---- 문서 승인 패널 ---- */
.approval-panel .approval-steps { display: flex; flex-direction: column; gap: 0; }
.approval-step {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--gray-100);
}
.approval-step:last-child { border-bottom: none; }
.step-icon { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; margin-top: 2px; }
.step-done .step-icon { background: var(--success-500); color: #fff; }
.step-ready .step-icon { background: var(--brand-500); color: #fff; }
.step-locked .step-icon { background: var(--gray-200); color: var(--gray-400); }
.step-body { flex: 1; }
.step-label { font-size: 13px; font-weight: 600; color: var(--gray-800); margin-bottom: 4px; }
.step-meta { font-size: 12px; color: var(--gray-500); }
.step-waiting { color: var(--gray-300); font-style: italic; }
.step-signature { max-width: 100px; max-height: 40px; object-fit: contain; margin-top: 6px; border: 1px solid var(--gray-200); border-radius: 4px; }
.approval-note { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--gray-100); }

/* btn-secondary, btn-outline */
.btn-secondary {
  background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-200);
  padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer;
  text-decoration: none; display: inline-block; transition: background .15s;
}
.btn-secondary:hover { background: var(--gray-200); }
.btn-outline {
  background: #fff; color: var(--brand-600); border: 1px solid var(--brand-300, #a5b4fc);
  padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 500;
  cursor: pointer; text-decoration: none; display: inline-block; transition: background .15s;
}
.btn-outline:hover { background: var(--brand-50); }

/* ---- 출장일정 캘린더 ---- */
.cal-nav { display: flex; align-items: center; justify-content: center; gap: 24px; padding: 12px 0 20px; }
.cal-month-title { margin: 0; font-size: 18px; font-weight: 700; color: var(--gray-800); }
.calendar-wrap { border: 1px solid var(--gray-200); border-radius: 8px; overflow: hidden; margin-bottom: 24px; }
.cal-header-row { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--gray-100); }
.cal-day-name { padding: 8px 0; text-align: center; font-size: 12px; font-weight: 600; color: var(--gray-500); border-right: 1px solid var(--gray-200); }
.cal-day-name:last-child { border-right: none; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell {
  min-height: 90px; padding: 6px; border-right: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200); vertical-align: top;
  position: relative; background: #fff;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell.cal-empty { background: var(--gray-50); }
.cal-cell.cal-today { background: var(--brand-50); }
.cal-date { font-size: 14px; font-weight: 700; color: var(--gray-700); margin-bottom: 6px; }
.cal-today .cal-date { color: var(--brand-600); }

/* Task 8: 캘린더 항목 글씨 키움 + 담당 직원 표시 */
.cal-trip-item {
  background: var(--brand-100, #e0e7ff); border-radius: 6px; padding: 6px 9px;
  margin-bottom: 5px; font-size: 13px; color: var(--brand-700);
  line-height: 1.45;
}
.cal-trip-item strong { display: block; font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.cal-qty { font-size: 12px; color: var(--brand-600); font-weight: 600; }
.cal-addr { font-size: 12px; color: var(--gray-600); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cal-link { display: inline-block; font-size: 12px; color: var(--brand-700); text-decoration: none; margin-top: 3px; font-weight: 700; background: rgba(255,255,255,0.7); padding: 2px 6px; border-radius: 4px; }
.cal-link:hover { text-decoration: underline; }

.cal-emp-row {
  display: flex; align-items: center; gap: 4px;
  margin-top: 4px; padding-top: 4px;
  border-top: 1px dashed rgba(67, 56, 202, 0.25);
  font-size: 12px;
}
.cal-emp-label {
  font-size: 11px; font-weight: 700; color: var(--brand-700);
  background: rgba(255,255,255,0.7); padding: 1px 6px; border-radius: 4px;
  flex-shrink: 0;
}
.cal-emp-names {
  flex: 1; min-width: 0;
  font-size: 12px; font-weight: 600; color: #1e3a8a;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-emp-empty { color: var(--gray-400); font-style: normal; font-weight: 500; }
.cal-emp-edit {
  font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 4px;
  background: var(--brand-600); color: #fff; border: none;
  cursor: pointer; flex-shrink: 0;
}
.cal-emp-edit:hover { background: var(--brand-700); }

/* 직원 선택 모달 항목 */
.emp-pick-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 7px;
  border: 1.5px solid var(--gray-200); background: #fff;
  margin-bottom: 6px; cursor: pointer;
  transition: all .12s;
}
.emp-pick-item:hover { background: #f1f5f9; }
.emp-pick-item input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }
.emp-pick-name { font-size: 14px; font-weight: 700; color: var(--gray-800); }
.emp-pick-pos { font-size: 12px; color: var(--gray-500); margin-left: auto; }

/* 대시보드 stat 클릭 가능 (Task 7) */
.stat-card.stat-link {
  text-decoration: none; color: inherit;
  transition: transform 0.12s, box-shadow 0.12s;
  display: block;
}
.stat-card.stat-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
}
.trip-list-section { margin-top: 8px; }

/* btn-sm 보완 */
.btn.btn-sm { padding: 5px 10px; font-size: 12px; }

/* 폼 textarea 전체 너비 */
.form-panel textarea[name="memo"] { width: 100%; box-sizing: border-box; resize: vertical; }

/* ============================================================
   성적서 관리 — 탭 & 카드
   ============================================================ */

/* 상세 페이지 탭 네비게이션 */
.detail-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 20px;
}
.detail-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.detail-tab:hover { color: var(--brand-600); }
.detail-tab.active { color: var(--brand-700); border-bottom-color: var(--brand-600); font-weight: 600; }
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--brand-100);
  color: var(--brand-700);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}

/* 성적서 카드 */
.cert-card {
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  margin-bottom: 16px;
  background: #fff;
  overflow: hidden;
}
.cert-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.cert-no-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  font-family: monospace;
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 5px;
}
.cert-card-body { padding: 14px 16px; }

/* 성적서 결재 상태 배지 — Task 16: 발급대장 셀에 맞춤 */
.cert-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-gray   { background: var(--gray-100); color: var(--gray-500); }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-orange { background: #fef3c7; color: #92400e; }
.badge-green  { background: #d1fae5; color: #065f46; }

/* 성적서 결재 패널 */
.cert-approval-panel { margin-top: 12px; }
.cert-approval-steps { display: flex; flex-direction: column; gap: 0; }
.cert-approval-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}
.cert-approval-step:last-child { border-bottom: none; }
.step-desc {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}
.done-meta {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 2px;
}

/* 다운로드 행 */
.cert-dl-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
  align-items: center;
}
.cert-dl-label {
  font-size: 12px;
  color: var(--gray-400);
}

/* 업로드 폼 */
.cert-upload-form {
  border: 1px dashed var(--gray-300);
  border-radius: 10px;
  padding: 16px;
  background: var(--gray-50);
  margin-bottom: 20px;
}
.cert-upload-form h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin: 0 0 12px;
}
.cert-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
@media (max-width: 640px) {
  .cert-upload-grid { grid-template-columns: 1fr; }
}
.cert-upload-grid label { display: block; font-size: 12px; color: var(--gray-500); margin-bottom: 4px; }
.cert-upload-grid input[type="text"],
.cert-upload-grid input[type="file"] {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
}
.cert-upload-grid input:focus { outline: none; border-color: var(--brand-400); }

/* 삭제 행 */
.cert-delete-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-100);
}

/* xs 버튼 */
.btn-xs {
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 5px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity .15s;
}
.btn-xs:hover { opacity: .85; }
.btn-xs.btn-primary { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.btn-xs.btn-secondary { background: var(--gray-100); color: var(--gray-700); border-color: var(--gray-300); }
.btn-xs.btn-ghost { background: transparent; color: var(--gray-600); border-color: var(--gray-300); }
.btn-xs.btn-danger { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }

/* PDF 출력 액션 */
.pdf-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

/* 일괄 액션 바 */
.bulk-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 8px;
}

/* 텍스트 보조 */
.text-muted { color: var(--gray-400); font-size: 12px; }

/* 교정접수발급대장 테이블 */
.cert-ledger-table th,
.cert-ledger-table td { vertical-align: middle; }
.cert-ledger-table .strong-cell { font-weight: 600; }
.cert-ledger-company { max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* hidden 유틸 */
.hidden { display: none !important; }

/* ============================================================
   성적서 관리 테이블 (수평 레이아웃)
   ============================================================ */

/* 업로드 바 */
.cert-upload-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cert-upload-label { font-size: 13px; font-weight: 600; color: var(--gray-700); white-space: nowrap; }
.cert-upload-inline-form { display: flex; align-items: center; gap: 8px; }
.cert-upload-inline-form input[type="file"] { display: none; }
.cert-file-label {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 600;
  background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-300);
  cursor: pointer; white-space: nowrap; transition: background .15s;
}
.cert-file-label:hover { background: var(--gray-200); }
.cert-file-count { font-size: 12px; color: var(--brand-600); font-weight: 600; white-space: nowrap; }

/* 성적서 관리 테이블 툴바 */
.cert-table-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  flex-wrap: wrap;
}
.cert-chk-all-label { font-size: 15px; font-weight: 600; color: var(--gray-700); cursor: pointer; display: flex; align-items: center; gap: 6px; }
.cert-chk-all-label input[type=checkbox] { width: 17px; height: 17px; cursor: pointer; }
.cert-count-info { margin-left: auto; font-size: 14px; color: var(--gray-600); font-weight: 600; }

/* 툴바용 큰 액션 버튼 */
.btn-cert-toolbar {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 4px;
  font-size: 14px; font-weight: 700; line-height: 1.2;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .08s, box-shadow .12s, opacity .12s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
  white-space: nowrap;
}
.btn-cert-toolbar:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(15, 23, 42, .14); opacity: .92; }
.btn-cert-toolbar:active { transform: translateY(0); }
/* 그룹 A — 번호 추가 / 필증 출력 (연한 파스텔 블루) */
.btn-cert-tb-group-a { background: #dbeafe; color: #1e3a8a; border-color: #93c5fd; }
.btn-cert-tb-group-a:hover { background: #bfdbfe; }
/* 그룹 B — 일괄확인 / 선택 출력 (연한 그린) */
.btn-cert-tb-group-b { background: #dcfce7; color: #14532d; border-color: #86efac; }
.btn-cert-tb-group-b:hover { background: #bbf7d0; }
/* 위험 — 선택 삭제 */
.btn-cert-toolbar-danger { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.btn-cert-toolbar-danger:hover { background: #fecaca; }
/* 레거시 호환 */
.btn-cert-toolbar-add      { background: #dbeafe; color: #1e3a8a; border-color: #93c5fd; }
.btn-cert-toolbar-primary  { background: #dcfce7; color: #14532d; border-color: #86efac; }
.btn-cert-toolbar-secondary{ background: #dbeafe; color: #1e3a8a; border-color: #93c5fd; }
.btn-cert-toolbar-print    { background: #dcfce7; color: #14532d; border-color: #86efac; }

/* 드롭다운 메뉴 폰트 키움 */
.bulk-dropdown-menu button { font-size: 14px !important; padding: 9px 14px !important; }

/* 성적서 관리 테이블 */
.cert-mgmt-table { table-layout: fixed; width: 100%; }
.cert-mgmt-table th, .cert-mgmt-table td {
  vertical-align: middle; padding: 10px 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 15px;
}
.cert-mgmt-table th {
  text-align: center; background: var(--gray-50);
  font-weight: 700; color: var(--gray-700);
  font-size: 14px;
}
.cert-chk-cell { text-align: center; padding: 10px 4px !important; }
.cert-chk-cell input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }
/* Task 4: 성적서번호 / 국문·영문 배지 글씨체를 교정일자(셀 기본 sans-serif)와 동일 */
.cert-no-cell {
  font-family: inherit; font-size: 15px;
  text-align: center; line-height: 1.5;
}
.cert-no-label {
  font-weight: 700; display: block; font-size: 16px; letter-spacing: 0.2px;
  font-family: inherit;
}
.cert-type-badge {
  display: inline-block; margin-top: 4px;
  padding: 2px 8px; border-radius: 5px;
  background: var(--brand-50); color: var(--brand-700);
  font-size: 13px; font-weight: 700; font-family: inherit;
}
.cert-name-cell { text-align: left; font-size: 15px; font-weight: 600; color: var(--gray-800); }
.cert-range-cell-full {
  font-size: 13px; color: var(--gray-700);
  white-space: normal; word-break: break-word; overflow: visible;
  min-width: 200px;
}
.cert-serial-cell, .cert-range-cell {
  font-size: 15px; font-weight: 600; color: var(--gray-700); text-align: center;
}
/* 형식 컬럼: 짤림 없이 wrap 허용 (Task 2 — 0이 포함된 전체 텍스트 모두 표시) */
.cert-mgmt-table .cert-range-cell {
  white-space: normal !important; word-break: break-word !important;
  overflow: visible !important; text-overflow: clip !important;
  line-height: 1.35;
}

/* 결재+관리 통합 셀 */
.cert-combo-cell {
  overflow: visible !important; white-space: normal;
  vertical-align: middle !important; padding: 6px 8px !important;
}
.cert-steps-row {
  display: flex; flex-wrap: nowrap; gap: 4px;
  align-items: stretch; justify-content: center;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--gray-200);
  margin-bottom: 6px;
}
.cert-actions-row {
  display: flex; flex-wrap: nowrap; gap: 4px;
  align-items: stretch; justify-content: center;
}

/* form 래퍼도 flex item으로 균등 폭 분배 */
.cert-steps-row .cert-step-form,
.cert-actions-row .cert-action-form {
  flex: 1 1 0; min-width: 0;
  display: flex; margin: 0; padding: 0;
}
.cert-steps-row .cert-step-form .btn-cert-step,
.cert-actions-row .cert-action-form .btn-cert-action {
  width: 100%;
}

/* 결재 단계 버튼 / 완료 표시 — 균등한 폭 */
.cert-step-done,
.btn-cert-step {
  flex: 1 1 0; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  padding: 7px 5px; border-radius: 7px;
  white-space: nowrap; line-height: 1.35;
  border: 1px solid transparent;
  text-align: center;
  box-sizing: border-box;
}
.cert-step-done {
  flex-direction: column; gap: 3px;
  color: #166534; background: #dcfce7;
  border-color: #bbf7d0;
  padding: 6px 5px;
}
.cert-step-meta {
  font-size: 12px; font-weight: 600; color: #15803d;
  line-height: 1.3;
}
.btn-cert-step { cursor: pointer; transition: opacity .15s; }
.btn-cert-ready {
  background: var(--brand-600); color: #fff; border-color: var(--brand-600);
}
.btn-cert-ready:hover { opacity: .85; }
.btn-cert-locked {
  background: var(--gray-100); color: var(--gray-400);
  border-color: var(--gray-200); cursor: not-allowed;
}

/* 관리 버튼 — 균등한 폭 */
.btn-cert-action {
  flex: 1 1 0; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  padding: 7px 6px; border-radius: 6px;
  text-decoration: none; cursor: pointer;
  border: none; line-height: 1.3; white-space: nowrap;
  transition: opacity .15s;
}
.btn-cert-excel   { background: #16a34a; color: #fff; }
.btn-cert-pdf     { background: #2563eb; color: #fff; }
.btn-cert-pdf-na  { background: var(--gray-100); color: var(--gray-400); cursor: default; }
.btn-cert-print   { background: #7c3aed; color: #fff; }
.btn-cert-preview { background: #0891b2; color: #fff; }
.btn-cert-del     { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.btn-cert-action:hover:not(.btn-cert-pdf-na):not(.btn-cert-del) { opacity: .85; }
.btn-cert-del:hover { background: #fecaca; }

/* 발급대장 PDF 버튼 동일 스타일 적용 */
.cert-ledger-table .btn-cert-pdf { font-size: 12px; padding: 5px 14px; }

/* ============================================================
   EA규격 관리
   ============================================================ */
.ea-upload-zone {
  border: 2px dashed var(--gray-300); border-radius: 10px;
  padding: 24px; text-align: center; background: var(--gray-50);
  margin-bottom: 20px; cursor: pointer; transition: border-color .2s;
}
.ea-upload-zone:hover { border-color: var(--brand-400); background: var(--brand-50); }
.ea-upload-zone input[type="file"] { display: none; }
.ea-upload-zone-text { font-size: 14px; color: var(--gray-500); margin-top: 8px; }
.ea-category-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.ea-category-pill {
  padding: 5px 14px; border-radius: 99px; font-size: 12px; font-weight: 600;
  border: 1.5px solid var(--gray-300); color: var(--gray-600); cursor: pointer; background: #fff;
  transition: all .15s;
}
.ea-category-pill.active, .ea-category-pill:hover {
  background: var(--brand-600); color: #fff; border-color: var(--brand-600);
}
.ea-file-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.ea-file-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: #fff; border: 1px solid var(--gray-200);
  border-radius: 8px; font-size: 13px;
}
.ea-file-name { flex: 1; color: var(--gray-700); }
.ea-file-remove { color: var(--gray-400); cursor: pointer; font-size: 16px; }
.ea-file-remove:hover { color: #ef4444; }

/* ============================================================
   업로드 진행 오버레이
   ============================================================ */
.upload-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.45); align-items: center; justify-content: center;
}
.upload-overlay.show { display: flex; }
.upload-overlay-card {
  background: #fff; border-radius: 16px; padding: 32px 40px;
  box-shadow: 0 8px 40px rgba(0,0,0,.18); min-width: 280px; text-align: center;
}
.upload-overlay-title { font-size: 15px; font-weight: 700; color: var(--gray-800); margin-bottom: 16px; }
.upload-progress-bar {
  width: 100%; height: 8px; background: var(--gray-200); border-radius: 99px;
  overflow: hidden; margin-bottom: 10px;
}
.upload-progress-fill {
  height: 100%; background: var(--brand-600); border-radius: 99px;
  width: 0%; transition: width .3s ease; animation: progress-anim 1.5s ease-in-out infinite;
}
@keyframes progress-anim {
  0%   { width: 15%; }
  50%  { width: 80%; }
  100% { width: 95%; }
}
.upload-overlay-sub { font-size: 12px; color: var(--gray-500); }

/* 성적서 모달 공통 */
.cert-modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.45); display: none;
  align-items: center; justify-content: center;
}
.cert-modal-overlay[style*="flex"] { display: flex !important; }
.cert-modal-card {
  background: #fff; border-radius: 14px; padding: 28px 32px;
  box-shadow: 0 8px 40px rgba(0,0,0,.18); min-width: 320px; max-width: 440px; width: 90%;
}
.cert-modal-title { font-size: 16px; font-weight: 700; color: var(--gray-800); margin-bottom: 12px; }

/* 성적서 유형 라디오 그룹 */
.cert-type-radio-group {
  display: flex; flex-wrap: wrap; gap: 10px 20px;
}
.cert-type-radio-group label {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  padding: 7px 14px; border: 1.5px solid var(--gray-200); border-radius: 8px;
  transition: border-color .15s, background .15s;
}
.cert-type-radio-group input[type="radio"] { display: none; }
.cert-type-radio-group label:has(input:checked) {
  border-color: var(--brand-600); background: var(--brand-50); color: var(--brand-700);
}

/* 성적서 유형 배지 (행 내) */
.cert-type-badge {
  display: inline-block; font-size: 10px; font-weight: 600;
  padding: 2px 6px; border-radius: 4px; margin-top: 2px;
  background: #e0e7ff; color: #3730a3;
}

/* 일괄확인 드롭다운 */
.bulk-dropdown { position: relative; display: inline-block; }
.bulk-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 200;
  background: #fff; border: 1px solid var(--gray-200); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12); min-width: 170px; overflow: hidden;
}
.bulk-dropdown-menu.show { display: block; }
.bulk-dropdown-menu button {
  display: block; width: 100%; padding: 10px 16px; text-align: left;
  font-size: 13px; font-weight: 500; background: none; border: none; cursor: pointer;
  color: var(--gray-700);
}
.bulk-dropdown-menu button:hover { background: var(--gray-50); }

/* ============================================================
   추가 버튼 색상 (기술책임자 일괄확인 등)
   ============================================================ */
.btn-warning {
  background: #f59e0b; color: #fff; border: none;
  padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: opacity .15s; white-space: nowrap;
}
.btn-warning:hover { opacity: .85; }
.btn.btn-warning { background: #f59e0b; color: #fff; }
.btn.btn-warning:hover { background: #d97706; }

/* ============================================================
   성적서 서명 완료 세부정보 (이름·날짜)
   ============================================================ */
.cert-step-meta {
  display: block; font-size: 9px; font-weight: 400;
  color: #166534; opacity: .85; line-height: 1.4;
  white-space: normal; word-break: keep-all;
}

/* ============================================================
   교정장소/주기/적합성 가로(수평) 버튼 그룹
   ============================================================ */
.cal-options-row {
  display: flex; gap: 24px; flex-wrap: wrap;
  margin-top: 12px; padding: 12px 0 4px;
  border-top: 1px solid var(--gray-200);
}
.cal-option-group { display: flex; flex-direction: column; gap: 6px; }
.cal-option-label {
  font-size: 12px; font-weight: 600; color: var(--gray-600);
  white-space: nowrap;
}
.cal-option-btns { display: flex; gap: 6px; }
.cal-opt-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 14px; border-radius: 6px; font-size: 12px; font-weight: 500;
  border: 1.5px solid var(--gray-300); background: #fff; color: var(--gray-600);
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.cal-opt-btn input[type="radio"] { display: none; }
.cal-opt-btn.active, .cal-opt-btn:hover {
  background: var(--brand-600); color: #fff; border-color: var(--brand-600);
}

/* ============================================================
   접수 기본정보 헤더 + 인라인 교정 모드 토글
   ============================================================ */
.form-section-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 12px;
  padding-bottom: 8px; border-bottom: 1px solid #e5e9f0; flex-wrap: wrap;
}
.form-section-header > .form-section-title {
  margin: 0; padding: 0; border: none; flex: 0 0 auto;
}
.cal-mode-inline {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px; border-radius: 8px;
  background: var(--gray-50); border: 1px solid var(--gray-200);
}
.cal-mode-inline-label {
  font-size: 13px; font-weight: 700; color: var(--gray-700);
  letter-spacing: 0.2px;
}
.cal-mode-inline-opt {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 14px; border-radius: 6px; font-size: 14px; font-weight: 700;
  border: 1.5px solid var(--gray-300); background: #fff; color: var(--gray-600);
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.cal-mode-inline-opt input[type="radio"] { display: none; }
.cal-mode-inline-opt.cal-mode-opt-iso.active { background: #2563eb; color: #fff; border-color: #1d4ed8; }
.cal-mode-inline-opt.cal-mode-opt-b.active   { background: #f59e0b; color: #fff; border-color: #d97706; }
.cal-mode-inline-opt:hover { background: var(--gray-100); }
.cal-mode-inline-opt.active:hover { opacity: .92; }

/* Task F + Task 3 — 입력 트리거 모달 검색 + 선택 후 필드 크기 고정 */
.search-input-wrap {
  position: relative;
  width: 100%;
  /* 입력 필드와 칩이 동일한 박스 크기를 가지도록 컨테이너에 최소 높이 고정 */
  min-height: 42px;
}
.search-input {
  width: 100%;
  height: 42px;          /* 칩과 동일 높이 */
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300); border-radius: 8px;
  font-size: 14px; font-weight: 500;
  background: #fff; transition: all .12s;
  box-sizing: border-box;
}
.search-input:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.search-input::placeholder { color: var(--gray-400); }

.search-selected-chip {
  /* 입력 필드와 동일한 폭/높이 — 선택 전후 크기 변경 없음 (Task 3) */
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  height: 42px;
  padding: 9px 14px;
  background: #ecfdf5; border: 1.5px solid #6ee7b7; border-radius: 8px;
  font-size: 14px; font-weight: 700; color: #064e3b;
  box-sizing: border-box;
}
.search-selected-chip .chip-text {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.search-selected-chip .chip-clear {
  width: 24px; height: 24px;
  background: rgba(220, 38, 38, 0.1); color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 6px; cursor: pointer;
  font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.search-selected-chip .chip-clear:hover { background: rgba(220, 38, 38, 0.2); }

/* 레거시 호환 (사용중인 곳이 있다면) */
.company-picker-row { display: flex; align-items: center; gap: 8px; }

.picker-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.5); align-items: center; justify-content: center;
}
.picker-card {
  background: #fff; border-radius: 14px;
  width: 92vw; max-width: 600px; max-height: 80vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden;
}
.picker-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--gray-200);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}
.picker-title { font-size: 16px; font-weight: 800; color: var(--gray-800); }
.picker-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: var(--gray-100); cursor: pointer;
  font-size: 16px; font-weight: 700;
}
.picker-close:hover { background: var(--gray-200); }
.picker-search-row {
  display: flex; gap: 10px; align-items: center;
  padding: 14px 20px; border-bottom: 1px solid var(--gray-200);
}
.picker-search-row input {
  flex: 1; padding: 10px 14px;
  font-size: 14px; border: 1.5px solid var(--gray-300); border-radius: 8px;
}
.picker-search-row input:focus { outline: none; border-color: var(--brand-600); }
.picker-count { font-size: 13px; color: var(--gray-500); font-weight: 600; white-space: nowrap; }

.picker-list {
  flex: 1; overflow-y: auto; padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
}
.picker-empty { padding: 30px; text-align: center; color: var(--gray-400); font-size: 14px; }
.picker-item {
  text-align: left; padding: 12px 14px; border-radius: 8px;
  border: 1.5px solid var(--gray-200); background: #fff; cursor: pointer;
  transition: all 0.12s;
}
.picker-item:hover { background: #eff6ff; border-color: #93c5fd; transform: translateX(2px); }
.picker-item-name { font-size: 15px; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
.picker-item-meta { font-size: 12px; color: var(--gray-500); line-height: 1.5; }

/* Task 8 + 10: 결재 라인 분리 + 교정일자 컬럼 */
.cert-mgmt-table-v2 .cert-step-cell {
  text-align: center; padding: 8px 6px !important;
  vertical-align: middle;
  font-size: 13px;
}
.cert-mgmt-table-v2 .cert-step-cell .btn-cert-step {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  padding: 7px 10px; border-radius: 6px;
  border: 1px solid transparent;
  white-space: nowrap; cursor: pointer;
  width: 100%;
}
.cert-mgmt-table-v2 .cert-step-cell form { margin: 0; }
.cert-mgmt-table-v2 .cert-step-done-v2 {
  display: flex; flex-direction: column; gap: 2px;
  align-items: center; justify-content: center;
  padding: 6px 8px; border-radius: 7px;
  background: #dcfce7; color: #166534;
  border: 1px solid #bbf7d0;
}
.cert-mgmt-table-v2 .cert-step-done-v2 b {
  font-size: 14px; font-weight: 800; color: #14532d;
  letter-spacing: 0.02em;
}
.cert-mgmt-table-v2 .cert-step-done-v2 span {
  font-size: 13px; font-weight: 600; color: #15803d;
  line-height: 1.3;
}
.cert-mgmt-table-v2 .cert-caldate-cell {
  text-align: center; font-size: 14px; font-weight: 600;
  color: var(--gray-700); white-space: nowrap;
}
.cert-mgmt-table-v2 .cert-actions-cell { padding: 6px 6px; }

/* ============================================================
   대행성적서관리
   ============================================================ */
.agency-table { table-layout: fixed; width: 100%; font-size: 13px; }
.agency-table th, .agency-table td {
  vertical-align: middle; padding: 8px 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.agency-table th { background: var(--gray-50); font-weight: 700; color: var(--gray-700); font-size: 13px; }
.agency-table td small { font-size: 11px; color: var(--gray-500); }
.agency-cert-no { font-family: monospace; font-weight: 700; color: var(--brand-700); }

.agency-status-pill {
  display: inline-block; padding: 3px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 700;
}
.agency-status-received    { background: #dbeafe; color: #1e40af; }
.agency-status-in_progress { background: #fef3c7; color: #92400e; }
.agency-status-completed   { background: #dcfce7; color: #14532d; }

.agency-method-chip {
  display: inline-block; padding: 3px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 700;
}
.agency-method-trip   { background: #ede9fe; color: #6d28d9; }
.agency-method-parcel { background: #e0f2fe; color: #075985; }
.agency-method-pickup { background: #fef9c3; color: #854d0e; }

.alert-info {
  background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7;
  padding: 12px 16px; border-radius: 8px; margin-bottom: 14px;
  font-size: 14px; font-weight: 600;
}

/* 대행접수 폼 — 일자 3개 가로 정렬 (Task E) */
.agency-date-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 16px;
}

/* ============================================================
   EA규격 관리 — 글씨/너비/중앙정렬 (Task 5)
   ============================================================ */
.ea-items-table { table-layout: fixed; width: 100%; }
.ea-items-table th, .ea-items-table td {
  vertical-align: middle; padding: 12px 14px;
  font-size: 15px;
  text-align: center;
  overflow: visible; white-space: normal; word-break: keep-all; line-height: 1.4;
}
.ea-items-table th {
  font-size: 14px; font-weight: 700;
  background: var(--gray-50); color: var(--gray-700);
  text-align: center;
}
.ea-cat-cell { text-align: center; }
.ea-cat-badge {
  display: inline-block;
  background: #e0e7ff; color: #3730a3;
  padding: 6px 16px; border-radius: 99px;
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.02em;
  min-width: 90px;
}
.ea-name-cell { font-size: 15px; font-weight: 700; color: var(--gray-800); text-align: center; }
.ea-std-cell  { font-size: 15px; font-weight: 600; color: var(--gray-700); text-align: center; }
.ea-file-cell { font-size: 13px; color: var(--gray-500); text-align: center; }
.ea-date-cell { font-size: 14px; color: var(--gray-600); text-align: center; }
.ea-actions-cell {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px !important;
}
.ea-action-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 16px; border-radius: 7px;
  font-size: 13px; font-weight: 700;
  border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: opacity .12s;
  white-space: nowrap;
}
.ea-action-btn:hover { opacity: .85; }
.ea-action-edit { background: #dbeafe; color: #1e3a8a; border-color: #93c5fd; }
.ea-action-del  { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.ea-action-dl   { background: #dcfce7; color: #14532d; border-color: #86efac; }
.ea-action-dl:hover { opacity: 1; background: #bbf7d0; }

/* EA 카테고리 pills 키움 */
.ea-category-pill {
  padding: 7px 18px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}
.ea-upload-zone-text { font-size: 15px !important; }
.ea-file-name { font-size: 14px !important; }

/* ============================================================
   전체 글씨 가독성 향상 — 작은 글씨 일괄 보정
   ============================================================ */
.detail-grid > div span {
  font-size: 13px !important; font-weight: 600;
}
.detail-grid > div strong {
  font-size: 15px !important;
}
.cal-option-label { font-size: 13px; }
.cal-opt-btn { font-size: 13px; padding: 6px 14px; }
.sig-label { font-size: 14px !important; font-weight: 700; }
.step-label { font-size: 14px !important; font-weight: 700; }
.step-meta { font-size: 13px !important; }
.cert-upload-label { font-size: 14px !important; font-weight: 700; }
.text-muted { font-size: 13px; }
.cert-file-count { font-size: 13px !important; }
.tab-count { font-size: 12px; }

/* ============================================================
   EA규격 기기명 칼럼 — 길면 줄바꿈, 짤림 없이 전체 표시
   ============================================================ */
.ea-items-table td:nth-child(2) {
  white-space: normal; word-break: keep-all; line-height: 1.35;
}

/* ============================================================
   Agent 다운로드 버튼 (헤더 우측 — 종 아이콘 자리 대체)
   ============================================================ */
.agent-download-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: #2563eb; color: #fff;
  border: 0; border-radius: 6px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.agent-download-btn:hover { background: #1d4ed8; }
.agent-download-icon { font-size: 14px; }

/* Agent 다운로드 모달 */
.agent-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center; justify-content: center;
}
.agent-modal {
  background: #fff;
  padding: 28px 32px;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 480px; width: 90%;
}
.agent-modal h3 { margin: 0 0 16px; font-size: 18px; color: #1f2937; }
.agent-modal-line { margin: 8px 0; font-size: 14px; color: #4b5563; line-height: 1.6; }
.agent-modal-line code {
  background: #f3f4f6; padding: 2px 6px; border-radius: 4px;
  font-family: 'Courier New', monospace; color: #2563eb;
}
.agent-modal-actions {
  margin-top: 20px;
  display: flex; gap: 10px; justify-content: flex-end;
}
.agent-modal-btn {
  padding: 8px 18px;
  background: #f3f4f6; color: #374151;
  border: 1px solid #d1d5db; border-radius: 6px;
  font-size: 13px; cursor: pointer;
  text-decoration: none; display: inline-block;
}
.agent-modal-btn:hover { background: #e5e7eb; }
.agent-modal-btn-primary {
  background: #2563eb; color: #fff; border-color: #2563eb;
}
.agent-modal-btn-primary:hover { background: #1d4ed8; }

/* ============================================================
   출장일정 캘린더 — 메모 셀 (PR-9 항목 2 + 보완 — 접수와 동일 박스)
   메모는 cal-trip-item 스타일 + 노란 배경으로 구분
   ============================================================ */
.cal-trip-item-memo {
  background: #fffbeb !important;
  border-color: #fcd34d !important;
}
.cal-memo-tag {
  display: inline-block;
  background: #f59e0b; color: #fff;
  padding: 1px 6px; border-radius: 4px;
  font-size: 11px; font-weight: 600;
  margin-right: 4px;
}
.cal-memo-del {
  flex-shrink: 0;
  background: none; border: 0;
  color: #b45309; font-size: 12px;
  cursor: pointer; padding: 0 2px;
  margin-left: 4px;
}
.cal-memo-del:hover { color: #dc2626; }
