@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+KR:wght@300;400;500;600;700&display=swap');

/* ─────────────────────────────────────────────────────────────
   KAAH EDI Modern UI — Design Tokens (BS_CRM_AI Reference Style)
   ───────────────────────────────────────────────────────────── */
:root {
  --color-brand-50: #f0f9ff;
  --color-brand-100: #e0f2fe;
  --color-brand-200: #bae6fd;
  --color-brand-300: #7dd3fc;
  --color-brand-400: #38bdf8;
  --color-brand-500: #0ea5e9;
  --color-brand-600: #0284c7;
  --color-brand-700: #0369a1;
  --color-brand-800: #075985;
  --color-brand-900: #0c4a6e;

  --color-canvas: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-muted: #f1f5f9;
  --color-ink: #0f172a;
  --color-ink-soft: #64748b;
  --color-line: #e2e8f0;

  --font-sans: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  --shadow-card: 0 1px 3px rgba(16, 24, 40, 0.04), 0 8px 24px -12px rgba(16, 24, 40, 0.08);
  --shadow-soft: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-pop: 0 12px 32px -8px rgba(16, 24, 40, 0.16);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-color: var(--color-line);
}

body, button, input, select, textarea, table, th, td, h1, h2, h3, h4, h5, h6, p, span, a, label {
  font-family: var(--font-sans);
  word-break: keep-all;
  overflow-wrap: break-word;
}

body {
  background-color: var(--color-canvas);
  color: var(--color-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  overflow-x: hidden;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* ──────────────── Scrollbars ──────────────── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ──────────────── Common Utilities ──────────────── */
.brand-gradient {
  background: linear-gradient(135deg, var(--color-brand-400), var(--color-brand-600));
}
.brand-gradient-hover:hover {
  background: linear-gradient(135deg, var(--color-brand-500), var(--color-brand-700));
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  background-clip: padding-box;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-pop);
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-body {
  padding: 1.5rem;
}

/* ──────────────── Layout ──────────────── */
.app-shell {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ─── 사이드바 (기본: 넓게 보기 250px / 축소: 72px) ─── */
.icon-rail {
  width: 250px;
  background: var(--color-surface);
  border-right: 1px solid var(--color-line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 0.85rem 1.75rem;
  flex-shrink: 0;
  z-index: 30;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), padding 0.22s ease;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* 사이드바 상단 로고 & 브랜딩 (상단 네비게이션 높이 80px와 완벽 일치) */
.rail-header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 -0.85rem 0.25rem -0.85rem;
  border-bottom: 1px solid var(--color-line);
  box-sizing: border-box;
}

.rail-header {
  height: 80px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.15rem;
  text-decoration: none;
  overflow: hidden;
  flex: 1;
}

.mobile-drawer-close-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-line);
  background: var(--color-surface-muted);
  align-items: center;
  justify-content: center;
  color: var(--color-ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-right: 0.85rem;
  flex-shrink: 0;
}
.mobile-drawer-close-btn:hover {
  background: var(--color-surface);
  color: var(--color-ink);
}

.icon-rail-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  border: 1px solid var(--color-line);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}
.icon-rail-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.rail-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: opacity 0.15s ease;
}
.rail-brand-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-ink);
  letter-spacing: -0.02em;
  line-height: 1.25;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.rail-brand-sub {
  font-size: 0.725rem;
  font-weight: 500;
  color: var(--color-brand-600);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* 네비게이션 섹션 라벨 */
.rail-section-label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.55rem 0.5rem 0.25rem;
  white-space: nowrap;
  user-select: none;
  transition: opacity 0.15s ease;
}
.rail-nav > .rail-section-label:first-child {
  padding-top: 0.15rem;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
}

/* 사이드바 링크 버튼 */
.rail-link {
  width: 100%;
  height: 40px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.75rem;
  color: var(--color-ink-soft);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: all 0.15s ease;
  position: relative;
  white-space: nowrap;
  box-sizing: border-box;
}
.rail-link .icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  stroke-width: 2;
}
.rail-link .nav-text {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.15s ease;
}

.rail-link:hover {
  background: var(--color-surface-muted);
  color: var(--color-ink);
}
.rail-link.active {
  background: linear-gradient(135deg, var(--color-brand-500), var(--color-brand-600));
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.28);
}
.rail-link.active .icon {
  color: #ffffff;
}

/* 축소 상태용 툴팁 (넓은 상태에선 비활성) */
.rail-link .tooltip {
  position: absolute;
  left: 56px;
  background: var(--color-ink);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-md);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.15s ease;
  box-shadow: var(--shadow-soft);
  z-index: 50;
  display: none;
}

/* 사이드바 하단 제어부 */
.rail-footer {
  margin-top: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.5rem;
  border-top: 1px solid var(--color-line);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.sidebar-toggle-btn {
  width: 100%;
  height: 38px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-line);
  background: var(--color-surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  box-sizing: border-box;
  margin-bottom: 0.25rem;
}
.sidebar-toggle-btn:hover {
  background: #e2e8f0;
  color: var(--color-ink);
}
.sidebar-toggle-btn .toggle-icon {
  transition: transform 0.22s ease;
}

/* ─── 작게 보기 (Collapsed) 상태 스타일 ─── */
.app-shell.sidebar-collapsed .icon-rail {
  width: 72px;
  padding: 0 0.5rem 1.75rem;
  align-items: center;
  overflow: visible !important; /* 툴팁이 사이드바 외부로 삐져나올 수 있도록 overflow 해제 */
  z-index: 60;
}

.app-shell.sidebar-collapsed .rail-header-container {
  margin: 0 -0.5rem 0.5rem -0.5rem;
}
.app-shell.sidebar-collapsed .rail-header {
  height: 80px;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  justify-content: center;
  width: 72px;
  flex-shrink: 0;
}
.app-shell.sidebar-collapsed .rail-brand-text {
  display: none;
}

.app-shell.sidebar-collapsed .rail-section-label {
  display: none;
}
.app-shell.sidebar-collapsed .rail-section-divider {
  display: block;
  width: 28px;
  height: 1px;
  background: var(--color-line);
  margin: 0.4rem auto;
}

.app-shell.sidebar-collapsed .rail-link {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-xl);
  padding: 0;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  overflow: visible !important;
}
.app-shell.sidebar-collapsed .rail-link:hover {
  z-index: 100;
}
.app-shell.sidebar-collapsed .rail-link .nav-text {
  display: none;
}
.app-shell.sidebar-collapsed .rail-link .tooltip {
  display: block;
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  background: #0f172a; /* Slate-900 다크 배경 */
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-lg);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35), 0 8px 10px -6px rgba(0, 0, 0, 0.25);
  z-index: 99999;
}
.app-shell.sidebar-collapsed .rail-link .tooltip::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent #0f172a transparent transparent;
}
.app-shell.sidebar-collapsed .rail-link:hover .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.app-shell.sidebar-collapsed .sidebar-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-xl);
  padding: 0;
  justify-content: center;
  margin: 0 auto;
}
.app-shell.sidebar-collapsed .sidebar-toggle-btn .toggle-text {
  display: none;
}
.app-shell.sidebar-collapsed .sidebar-toggle-btn .toggle-icon {
  transform: rotate(180deg);
}

/* ──────────────── 메인 칼럼 & 상단 네비게이션 ──────────────── */
.main-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.top-nav {
  height: 80px;
  box-sizing: border-box;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-canvas);
  border-bottom: 1px solid var(--color-line);
  flex-shrink: 0;
  gap: 1rem;
}

/* 모바일 사이드바 배경 오버레이 (기본 숨김) */
.sidebar-backdrop {
  display: none;
}

/* 상단 좌측 클러스터 (햄버거 버튼 + 모바일 로고) */
.top-nav-left-cluster {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.top-nav-brand-mobile {
  display: none;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  min-width: 0;
  flex: 1;
}
.top-nav-brand-mobile-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}
.top-nav-brand-mobile-title {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--color-ink);
  letter-spacing: -0.02em;
  line-height: 1.25;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* 상단 토글 햄버거 버튼 */
.top-nav-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-line);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.top-nav-toggle-btn:hover {
  background: var(--color-surface-muted);
  color: var(--color-ink);
}

/* 상단 중앙 네비게이션 알약 (Top Nav Pills) */
.top-nav-pill-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  padding: 0.2rem 0.3rem;
  border-radius: var(--radius-full);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow-x: auto;
  scrollbar-width: none;
}
.top-nav-pill-group::-webkit-scrollbar {
  display: none;
}

.top-nav-pill-item {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-ink-soft);
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.top-nav-pill-item:hover {
  color: var(--color-ink);
  background: var(--color-surface-muted);
}
.top-nav-pill-item.active {
  background: linear-gradient(135deg, var(--color-brand-500), var(--color-brand-600));
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.25);
}

.content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 2rem 2rem 3rem;
}
.content-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* ──────────────── Buttons ──────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-xl);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap !important;
  word-break: keep-all;
  flex-shrink: 0;
}
.btn svg,
.btn .icon,
.btn .icon-sm,
.btn .material-symbols-outlined {
  stroke: currentColor !important;
  color: inherit !important;
  flex-shrink: 0;
}
.btn svg[fill]:not([fill="none"]) {
  fill: currentColor !important;
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-brand-500), var(--color-brand-600));
  color: #fff;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-brand-600), var(--color-brand-700));
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}
.btn-secondary {
  background: var(--color-surface);
  color: var(--color-ink);
  border-color: var(--color-line);
}
.btn-secondary:hover {
  background: var(--color-surface-muted);
}
.btn-success {
  background: #10b981;
  color: #fff;
}
.btn-success:hover {
  background: #059669;
}
.btn-danger {
  background: #ef4444;
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
}
.btn-warning {
  background: #f59e0b;
  color: #fff;
}
.btn-warning:hover {
  background: #d97706;
}
.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-lg);
}

/* ──────────────── Badges ──────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.badge-blue {
  background: #f0f9ff;
  color: #0284c7;
  border-color: #bae6fd;
}
.badge-green {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}
.badge-red {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}
.badge-amber {
  background: #fffbeb;
  color: #d97706;
  border-color: #fde68a;
}
.badge-slate {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

/* ──────────────── Form Inputs ──────────────── */
.form-control, .form-select {
  width: 100%;
  padding: 0.6rem 0.9rem;
  font-size: 0.875rem;
  color: var(--color-ink);
  background: #ffffff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-xl);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}
.form-control:focus, .form-select:focus {
  border-color: var(--color-brand-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

/* ──────────────── Modern Table ──────────────── */
.table-container,
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: inherit;
  overflow: hidden;
  background-clip: padding-box;
}
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 0.875rem;
}
.table th {
  background: var(--color-surface-muted);
  color: var(--color-ink-soft);
  font-weight: 600;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--color-line);
  white-space: nowrap !important;
  word-break: keep-all !important;
  vertical-align: middle;
}
.table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-line);
  color: var(--color-ink);
  vertical-align: middle;
  white-space: nowrap;
}
.table tbody tr:last-child td {
  border-bottom: none;
}
/* 제목 열 및 텍스트 래핑이 필요한 셀 */
.table td.cell-title,
.table td.text-wrap,
.table td a {
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.table tbody tr:hover {
  background: #f8fafc;
}

/* ──────────────── Stats Card ──────────────── */
.stat-card {
  background: var(--color-surface);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--color-line);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-pop);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* ──────────────── Progress Bar ──────────────── */
.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.5rem;
}
.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* ──────────────── Modal ──────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}
.modal-overlay.active {
  display: flex;
}
.modal-content {
  background: #fff;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-pop);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ──────────────── Official Document Style ──────────────── */
.official-paper {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  padding: 40px 50px;
  margin: 0 auto;
  max-width: 860px;
  font-family: "Noto Sans KR", sans-serif;
  color: #1e293b;
  line-height: 1.7;
}
.approval-line-wrapper {
  margin-left: auto;
  flex-shrink: 0;
}
.approval-line-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: auto;
  margin-left: auto;
  margin-bottom: 0;
  text-align: center;
  font-size: 0.8rem;
  border: 1.5px solid #475569;
  background: #ffffff;
}
.approval-line-table th, .approval-line-table td {
  border: 1px solid #94a3b8;
  padding: 0;
  text-align: center;
  vertical-align: middle;
  box-sizing: border-box;
}
.approval-line-table th.line-header-title {
  width: 24px !important;
  min-width: 24px !important;
  max-width: 24px !important;
  background: #f1f5f9;
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
  writing-mode: vertical-rl;
  letter-spacing: 5px;
  padding: 6px 2px !important;
}
.approval-line-table th.line-step-header {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  height: 26px !important;
  background: #f8fafc;
  font-weight: 700;
  color: #1e293b;
  font-size: 0.775rem;
  padding: 4px 2px !important;
}
.approval-line-table td.line-stamp-cell {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  height: 64px !important;
  min-height: 64px !important;
  max-height: 64px !important;
  padding: 0 !important;
}
.approval-line-table td.line-name-cell {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  height: 24px !important;
  font-size: 0.75rem;
  color: #475569;
  padding: 2px 2px !important;
  background: #fafafa;
}
.approval-stamp {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0 auto;
}
.approval-stamp img {
  max-width: 46px;
  max-height: 46px;
  object-fit: contain;
}
.stamp-text {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #059669;
  color: #059669;
  font-size: 0.775rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
  background: rgba(16, 185, 129, 0.05);
  box-sizing: border-box;
}
.stamp-text.jeon-gyeol {
  border-color: #dc2626;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.05);
}
.stamp-name-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  max-width: 64px;
  min-height: 38px;
  padding: 2px 4px;
  border: 1.5px solid #059669;
  border-radius: 6px;
  color: #059669;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  background: rgba(16, 185, 129, 0.04);
  box-sizing: border-box;
  word-break: keep-all;
}
.stamp-name-text.jeon-gyeol {
  border-color: #dc2626;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.04);
}
/* ──────────────── Modern EDI Form Standard Sheet & Tables ──────────────── */
.edi-form-sheet {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  font-family: "Noto Sans KR", sans-serif;
  color: #1e293b;
  line-height: 1.7;
}

.edi-form-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
}

.edi-form-table th, .edi-form-table td {
  border: 1px solid #cbd5e1;
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  vertical-align: middle;
}

.edi-form-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #334155;
  text-align: center;
}

.edi-form-table .bg-sub {
  background: #f1f5f9;
  font-weight: 600;
}

.edi-form-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 1.25rem 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.edi-form-note {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────────
   모바일 & 반응형 최적화 (Mobile & Responsive Optimization)
   ───────────────────────────────────────────────────────────── */

/* 모바일 전용 토글 버튼 (기본 숨김) */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-ink);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
}
.mobile-nav-toggle:hover {
  background: var(--color-surface-muted);
}

/* 모바일 슬라이드 드로어 메뉴 */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}
.mobile-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 80vw;
  background: var(--color-surface);
  z-index: 160;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}
.mobile-drawer-overlay.active .mobile-drawer {
  transform: translateX(0);
}

.mobile-drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-drawer-body {
  padding: 1rem 0.75rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.mobile-drawer-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-xl);
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--color-ink);
  text-decoration: none;
  transition: all 0.15s ease;
}
.mobile-drawer-item:hover, .mobile-drawer-item.active {
  background: var(--color-brand-50);
  color: var(--color-brand-600);
  font-weight: 600;
}
.mobile-drawer-item.active svg {
  color: var(--color-brand-600);
}

/* 모바일 하단 네비게이션 바 (스마트폰 앱 UX) */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-line);
  z-index: 90;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}
.mobile-bottom-nav-inner {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-around;
  padding: 0 0.5rem;
}
.mobile-bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--color-ink-soft);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 500;
  flex: 1;
  padding: 0.25rem 0;
  transition: all 0.15s ease;
}
.mobile-bottom-item.active {
  color: var(--color-brand-600);
  font-weight: 700;
}
.mobile-bottom-item svg {
  width: 20px;
  height: 20px;
}

/* 수평 터치 스크롤 바 (칩, 탭용) */
.touch-scroll-x {
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.touch-scroll-x::-webkit-scrollbar {
  display: none;
}

/* 모바일 전용 카드 리스트 래퍼 (데스크톱 기본 숨김) */
.mobile-doc-list,
.mobile-notice-list {
  display: none !important;
}

/* 모바일 전용 카드 리스트 아이템 */
.mobile-doc-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-xl);
  padding: 1rem 1.15rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.mobile-doc-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}
.mobile-doc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}
.mobile-doc-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-ink);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}
.mobile-doc-card-title a {
  color: inherit;
  text-decoration: none;
}
.mobile-doc-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.775rem;
  color: var(--color-ink-soft);
  padding-top: 0.5rem;
  border-top: 1px dashed var(--color-line);
}

/* ─────────────────────────────────────────────────────────────
   반응형 미디어 쿼리 (Media Queries)
   ───────────────────────────────────────────────────────────── */

/* 태블릿 (1024px 이하) */
@media (max-width: 1024px) {
  .nav-pill-item {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
  }
  .content-scroll {
    padding: 1.5rem 1.25rem 2rem;
  }
}

/* 모바일 & 소형 태블릿 (768px 이하) */
@media (max-width: 768px) {
  /* 사이드바: 모바일 오프캔버스 슬라이드 드로어로 동작 */
  .icon-rail {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 280px !important;
    max-width: 82vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 200 !important;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 0 0.85rem max(2.5rem, calc(env(safe-area-inset-bottom, 0px) + 1.5rem)) !important;
    align-items: stretch !important;
  }

  /* 모바일 열림 상태 */
  .app-shell.mobile-sidebar-open .icon-rail {
    transform: translateX(0) !important;
  }

  /* 모바일 사이드바 안에서는 항상 메뉴명 텍스트 표시 */
  .app-shell.sidebar-collapsed .icon-rail {
    width: 280px !important;
    padding: 0 0.85rem 1.25rem !important;
  }
  .app-shell.sidebar-collapsed .rail-header {
    width: auto !important;
    justify-content: flex-start !important;
    padding: 0 1.15rem !important;
  }
  .app-shell.sidebar-collapsed .rail-brand-text {
    display: flex !important;
  }
  .app-shell.sidebar-collapsed .rail-section-label {
    display: block !important;
  }
  .app-shell.sidebar-collapsed .rail-link {
    width: 100% !important;
    height: auto !important;
    padding: 0.65rem 0.85rem !important;
    justify-content: flex-start !important;
  }
  .app-shell.sidebar-collapsed .rail-link .nav-text {
    display: inline !important;
  }
  .app-shell.sidebar-collapsed .rail-link .tooltip {
    display: none !important;
  }

  /* 사이드바 상단 닫기(X) 버튼 표시 */
  .mobile-drawer-close-btn {
    display: inline-flex !important;
  }

  /* 모바일 배경 어두운 오버레이 */
  .sidebar-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, 0.55) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 190 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.25s ease, visibility 0.25s ease !important;
  }
  .app-shell.mobile-sidebar-open .sidebar-backdrop {
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* 모바일 사이드바 내 데스크탑 토글 버튼 숨김 */
  .icon-rail .sidebar-toggle-btn {
    display: none !important;
  }

  /* 상단 탑바 최적화 */
  .top-nav {
    height: auto !important;
    min-height: 60px !important;
    padding: 0.4rem 0.75rem !important;
    gap: 0.4rem !important;
  }
  .top-nav-left-cluster {
    flex: 1 !important;
    min-width: 0 !important;
    gap: 0.45rem !important;
  }
  .top-nav-brand-mobile {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    flex: 1 !important;
  }
  .top-nav-brand-mobile-logo {
    width: 26px !important;
    height: 26px !important;
    flex-shrink: 0 !important;
  }
  .top-nav-brand-mobile-title {
    font-size: 0.8125rem !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
  }
  .rail-brand-title {
    font-size: 0.875rem !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
  }
  .top-nav-pill-group {
    display: none !important; /* 모바일에서는 하단 탭바 및 햄버거 메뉴로 대체 */
  }

  /* 우측 사용자 칩 및 버튼 모바일 최적화 */
  .top-nav .user-chip {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
  }
  .top-nav .user-chip .badge {
    display: none !important;
  }
  .top-nav .btn-secondary {
    padding: 0.4rem !important;
    font-size: 0.75rem !important;
  }
  .top-nav .btn-secondary .btn-text-portal {
    display: none !important;
  }
  .top-nav .btn-ghost {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.75rem !important;
  }

  /* 모바일 하단 네비게이션 바 표시 */
  .mobile-bottom-nav {
    display: block !important;
  }
  .mobile-bottom-item {
    border: none;
    background: transparent;
    cursor: pointer;
  }

  /* 메인 스크롤 패딩 (하단 네비 바 64px 고려) */
  .content-scroll {
    padding: 1rem 0.85rem 5.5rem !important;
  }

  /* 대시보드 웰컴 배너 */
  .welcome-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 1.5rem !important;
    gap: 1.25rem !important;
  }
  .welcome-banner .btn-group {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
  }
  .welcome-banner .btn-group .btn {
    text-align: center !important;
    justify-content: center !important;
    padding: 0.6rem 0.5rem !important;
    font-size: 0.825rem !important;
  }

  /* 대시보드 통계 카드 그리드 */
  .stat-grid-6 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }
  .stat-card {
    padding: 0.85rem 1rem !important;
  }
  .stat-card .stat-icon {
    width: 38px !important;
    height: 38px !important;
  }
  .stat-card .stat-value {
    font-size: 1.35rem !important;
  }

  /* 대시보드 2단 그리드 -> 1열 변환 */
  .dashboard-columns {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  /* 기안 작성 레이아웃 (320px 1fr -> 1fr) */
  .write-layout-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  /* 게시물 리스트: 테이블 숨김 및 모바일 카드 뷰 표시 */
  .desktop-table-view {
    display: none !important;
  }
  .mobile-doc-list,
  .mobile-notice-list {
    display: block !important;
  }
  .mobile-doc-card {
    display: block !important;
  }

  /* 양식 시트 및 공식 공문서 모바일 최적화 */
  .official-paper {
    padding: 18px 14px !important;
    box-shadow: none !important;
    border-radius: var(--radius-xl) !important;
  }
  .official-header-flex {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1.25rem !important;
  }
  .official-info-table {
    width: 100% !important;
  }
  .approval-line-wrapper {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 4px !important;
  }
  .approval-line-table {
    width: 100% !important;
    min-width: 320px !important;
    margin-left: 0 !important;
  }

  .edi-form-sheet {
    padding: 0 !important;
  }
  .edi-form-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 1rem;
  }
  .edi-form-table th, .edi-form-table td {
    padding: 0.45rem 0.5rem !important;
    font-size: 0.775rem !important;
  }

  /* 결재 액션 버튼 클러스터 모바일 최적화 */
  .action-cluster-mobile {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }
  .action-cluster-mobile .btn {
    width: 100% !important;
    padding: 0.65rem 0.5rem !important;
    font-size: 0.85rem !important;
    justify-content: center !important;
  }
}

/* 초소형 모바일 (480px 이하) */
@media (max-width: 480px) {
  .stat-grid-6 {
    grid-template-columns: 1fr 1fr !important;
  }
  .card-header {
    padding: 1rem 1.15rem !important;
  }
  .card-body {
    padding: 1.15rem 1rem !important;
  }
}

/* ─────────────────────────────────────────────────────────────
   모던 페이지네이션 스타일 (Modern Pagination Component)
   ───────────────────────────────────────────────────────────── */
.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding: 0.75rem 0.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.pagination-info {
  font-size: 0.825rem;
  color: var(--color-ink-soft);
}
.pagination-info strong {
  color: var(--color-ink);
}
.pagination-list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-line);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.pagination-btn:hover:not(.disabled):not(.active) {
  background: var(--color-surface-muted);
  border-color: var(--color-line-strong);
  color: var(--color-brand-600);
}
.pagination-btn.active {
  background: var(--color-brand-600);
  border-color: var(--color-brand-600);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.3);
}
.pagination-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f8fafc;
  border-color: #e2e8f0;
}

@media (max-width: 640px) {
  .pagination-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
  .pagination-btn {
    min-width: 2rem;
    height: 2rem;
    font-size: 0.8rem;
    padding: 0 0.4rem;
  }
}

/* ─────────────────────────────────────────────────────────────
   동적 결재단계 빌더 스타일 (Dynamic Approval Step Builder)
   ───────────────────────────────────────────────────────────── */
.step-builder-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  padding: 1rem;
  margin-top: 0.75rem;
}
.step-item-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #ffffff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.6rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.step-item-row:hover {
  border-color: var(--color-brand-400);
}
.step-badge-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 26px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: #e0f2fe;
  color: #0369a1;
}
.step-badge-fixed {
  background: #f1f5f9;
  color: #475569;
}
.step-arrow-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  padding: 0.25rem 0;
}

/* ─────────────────────────────────────────────────────────────
   11. 전자결재 공식 공문서 전용 A4 고해상도 인쇄(Print) 스타일
   - 브라우저 기본 머리글/바닥글(날짜, URL, 페이지제목 등) 완전 제거 (@page margin: 0)
   - 웹 UI(사이드바, 탑바, 버튼, 결재의견, 스크롤바, 외부 이미지) 완전 숨김
/* ─────────────────────────────────────────────────────────────
   정밀 공문서 인쇄 스타일 (Precision A4 Print Engine)
   - 뷰 화면의 모양과 색상, 결재라인, 배지를 1:1 그대로 보존하여 출력
   - A4 표준 규격(210mm x 297mm) 및 여백(12mm) 내에 결재라인이 벗어나지 않도록 최적화
   ───────────────────────────────────────────────────────────── */
@media print {
  /* 1. A4 용지 규격 및 표준 인쇄 여백 설정 */
  @page {
    size: A4 portrait;
    margin: 12mm 12mm 14mm 12mm; /* A4 상/좌/우 12mm, 하 14mm 안정적인 여백 */
  }

  /* 2. 전역 스크롤바 및 오버플로우 강제 해제 */
  *, *::before, *::after {
    box-sizing: border-box !important;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
    text-shadow: none !important;
  }

  *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  /* 3. 웹 UI 및 주변 컴포넌트(사이드바, 네비바, 버튼, 타임라인 등) 완전 숨김 */
  .no-print,
  .icon-rail,
  aside,
  .top-nav,
  header,
  nav,
  footer,
  .mobile-bottom-nav,
  .mobile-drawer,
  .mobile-drawer-overlay,
  .mobile-nav-toggle,
  .user-switcher-container,
  .btn,
  button,
  .action-cluster-mobile,
  .card:not(.official-paper),
  .alert,
  .swal2-container,
  .tooltip,
  .content-container > *:not(#printableArea) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
  }

  /* 4. 바디 및 레이아웃 컨테이너 리셋 (뷰 문서 화면 그대로 인쇄) */
  html, body {
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 10pt !important;
    line-height: 1.6 !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .app-shell,
  .main-column,
  .content-scroll,
  .content-container,
  main {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    box-shadow: none !important;
    border: none !important;
    background: #ffffff !important;
  }

  /* 5. 공식 결재 공문서 본체: A4 여백 내 100% 핏 배치 */
  .official-paper,
  #printableArea {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    page-break-before: auto !important;
    page-break-after: auto !important;
    page-break-inside: auto !important;
  }

  /* 6. 상단 헤더 & 결재선 날인 영역: 결재라인이 절대 A4 우측 밖으로 벗어나지 않도록 탄력 배치 */
  .official-header-flex {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 1.5rem !important;
    gap: 12px !important;
    box-sizing: border-box !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* 좌측 문서 기본 정보 테이블 */
  .official-info-table {
    flex: 0 1 240px !important;
    max-width: 250px !important;
    min-width: 180px !important;
  }

  .official-info-table table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 8.5pt !important;
    line-height: 1.55 !important;
  }

  .official-info-table td {
    padding: 2px 0 !important;
    color: #1e293b !important;
  }

  /* 우측 결재선 날인 래퍼: 우측 끝 정렬 및 영역 이탈 완전 차단 */
  .approval-line-wrapper {
    flex: 1 0 auto !important;
    max-width: calc(100% - 250px) !important;
    display: flex !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
    overflow: visible !important;
  }

  /* 결재선 테이블 (A4 너비에 맞게 최적화된 컴팩트 규격) */
  .approval-line-table {
    width: auto !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    border: 1.5px solid #475569 !important;
    margin-left: auto !important;
    margin-bottom: 0 !important;
    background: #ffffff !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .approval-line-table th,
  .approval-line-table td {
    border: 1px solid #94a3b8 !important;
    color: #1e293b !important;
    background: #ffffff !important;
    padding: 0 !important;
    text-align: center !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
  }

  /* 결재 타이틀 세로 헤더 */
  .approval-line-table th.line-header-title {
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    font-size: 8pt !important;
    background: #f1f5f9 !important;
    writing-mode: vertical-rl !important;
    letter-spacing: 5px !important;
    padding: 6px 2px !important;
    color: #334155 !important;
  }

  /* 결재 직급 헤더 칸 */
  .approval-line-table th.line-step-header {
    width: 60px !important;
    min-width: 50px !important;
    max-width: 66px !important;
    height: 24px !important;
    font-size: 8pt !important;
    font-weight: 700 !important;
    background: #f8fafc !important;
    padding: 2px 3px !important;
    color: #1e293b !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* 서명/직인 도장 칸 */
  .approval-line-table td.line-stamp-cell {
    width: 60px !important;
    min-width: 50px !important;
    max-width: 66px !important;
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    padding: 0 !important;
  }

  /* 결재자 성명 칸 */
  .approval-line-table td.line-name-cell {
    width: 60px !important;
    min-width: 50px !important;
    max-width: 66px !important;
    height: 22px !important;
    font-size: 7.5pt !important;
    padding: 2px !important;
    color: #475569 !important;
    background: #fafafa !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* 도장 이미지 */
  .approval-stamp {
    width: 44px !important;
    height: 44px !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .approval-stamp img {
    max-width: 42px !important;
    max-height: 42px !important;
    object-fit: contain !important;
    display: block !important;
  }

  /* 원형 직인 텍스트 */
  .stamp-text {
    width: 40px !important;
    height: 40px !important;
    border: 1.5px solid #0284c7 !important;
    color: #0284c7 !important;
    font-size: 8pt !important;
    font-weight: 800 !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
  }

  /* 전결 도장 (화면과 1:1 동일한 블루 컬러 도장) */
  .stamp-text.stamp-jeon {
    border: 2px solid #0284c7 !important;
    color: #0284c7 !important;
    background: #f0f9ff !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px !important;
  }

  /* 사각 성명 도장 */
  .stamp-name-text {
    min-width: 40px !important;
    max-width: 56px !important;
    height: 36px !important;
    border: 1.5px solid #475569 !important;
    color: #1e293b !important;
    font-size: 7.5pt !important;
    font-weight: 800 !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    text-align: center !important;
    line-height: 1.2 !important;
    padding: 2px !important;
  }

  /* 전결 상위 결재자 사선(빗금) 인쇄 시 선명도 보장 */
  .slash-cell {
    position: relative !important;
    background: #f8fafc !important;
    overflow: hidden !important;
  }
  .slash-cell::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    background: linear-gradient(to top right, transparent calc(50% - 1.5px), #94a3b8 calc(50% - 1px), #94a3b8 calc(50% + 1px), transparent calc(50% + 1.5px)) !important;
    opacity: 0.8 !important;
  }
  .slash-cell-text {
    position: relative !important;
    z-index: 2 !important;
    color: #64748b !important;
    font-size: 1rem !important;
    font-weight: 900 !important;
  }

  /* 7. 본문 영역 및 서식 테이블 인쇄 최적화 (화면 스타일 그대로 유지) */
  .edi-form-table-wrapper {
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .edi-form-table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
    border: 1.5px solid #334155 !important;
    margin-bottom: 20px !important;
    table-layout: auto !important;
    page-break-inside: auto;
  }

  .edi-form-table th,
  .edi-form-table td {
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    padding: 6px 8px !important;
    font-size: 9pt !important;
    line-height: 1.5 !important;
  }

  .edi-form-table th {
    background-color: #f8fafc !important;
    font-weight: 700 !important;
    color: #334155 !important;
  }

  /* 선택된 옵션 배지 하이라이트 (인쇄물에서도 화면처럼 부드러운 블루 배지 유지) */
  .edi-form-table-wrapper label:has(input:checked),
  .edi-form-table-wrapper .is-checked-option {
    color: #0369a1 !important;
    font-weight: 800 !important;
    background-color: #e0f2fe !important;
    border: 1.5px solid #0284c7 !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  .edi-form-table-wrapper label:has(input:not(:checked)),
  .edi-form-table-wrapper .is-unchecked-option {
    color: #94a3b8 !important;
    opacity: 0.65 !important;
  }

  .edi-form-table-wrapper input[type="radio"],
  .edi-form-table-wrapper input[type="checkbox"] {
    opacity: 1 !important;
    accent-color: #0284c7 !important;
    width: 14px !important;
    height: 14px !important;
    vertical-align: middle !important;
    margin-right: 4px !important;
  }

  /* 텍스트 인풋 밑줄 인쇄 자연스러움 유지 */
  .edi-form-table-wrapper input:not([type="radio"]):not([type="checkbox"]) {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid #0284c7 !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    padding: 1px 2px !important;
  }

  tr, .edi-form-table tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* 8. 하단 직인 및 발신명의 줄바꿈 방지 */
  .official-paper > div:last-child {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    margin-top: 2rem !important;
  }
}

/* ─────────────────────────────────────────────────────────────
   옥천군 옥외광고협회 통합 관리자 UI 전용 보강 스타일
   ───────────────────────────────────────────────────────────── */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) {
  .grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-cols-3 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .grid-cols-2 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid-cols-4 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
}

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.p-3 { padding: 0.75rem !important; }
.p-4 { padding: 1rem !important; }
.p-6 { padding: 1.5rem !important; }

.text-nowrap { white-space: nowrap !important; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
.text-muted { color: var(--color-ink-soft) !important; }
.font-bold { font-weight: 700 !important; }
.font-semibold { font-weight: 600 !important; }
.font-medium { font-weight: 500 !important; }
.text-xs { font-size: 0.75rem !important; }
.text-sm { font-size: 0.875rem !important; }
.text-base { font-size: 1rem !important; }
.text-lg { font-size: 1.125rem !important; }
.text-xl { font-size: 1.25rem !important; }
.text-2xl { font-size: 1.5rem !important; }

/* KPI 위젯 카드 */
.stat-widget {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stat-widget:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-pop);
}
.stat-widget .stat-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-ink-soft);
  margin-bottom: 0.35rem;
}
.stat-widget .stat-number {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.stat-widget .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* 테이블 리파인 */
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.admin-table th {
  background: var(--color-surface-muted);
  color: var(--color-ink-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-line);
  white-space: nowrap;
}
.admin-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-line);
  font-size: 0.875rem;
  color: var(--color-ink);
  vertical-align: middle;
}
.admin-table tr:hover td {
  background: #f8fafc;
}
.admin-table tr:last-child td {
  border-bottom: none;
}

/* 상태 배지 */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.status-badge.approved, .status-badge.success {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.status-badge.pending, .status-badge.warning {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}
.status-badge.rejected, .status-badge.danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.status-badge.secondary, .status-badge.neutral {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* 버튼 */
.btn-outline {
  background: transparent;
  border: 1px solid var(--color-line);
  color: var(--color-ink-soft);
}
.btn-outline:hover {
  background: var(--color-surface-muted);
  color: var(--color-ink);
}
.btn-xs {
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  border-radius: var(--radius-md);
}

.icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
  vertical-align: middle;
}
.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }

.btn-download-file:hover {
  background: var(--color-brand-600) !important;
  color: #ffffff !important;
  border-color: var(--color-brand-600) !important;
}

/* ──────────────── SweetAlert2 커스텀 스타일 ──────────────── */
.admin-swal-popup {
  font-family: 'Noto Sans KR', sans-serif !important;
  border-radius: var(--radius-2xl) !important;
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.18) !important;
  border: 1px solid var(--color-line) !important;
  padding: 1.75rem !important;
}
.admin-swal-popup .swal2-title {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: var(--color-ink) !important;
  letter-spacing: -0.02em !important;
}
.admin-swal-popup .swal2-html-container {
  font-size: 0.925rem !important;
  color: var(--color-ink-soft) !important;
  line-height: 1.6 !important;
  margin-top: 0.5rem !important;
}
.admin-swal-popup .swal2-actions {
  margin-top: 1.5rem !important;
  gap: 0.5rem !important;
}
.admin-swal-popup .swal2-actions button {
  font-weight: 700 !important;
  font-size: 0.875rem !important;
  padding: 0.6rem 1.25rem !important;
  border-radius: var(--radius-lg) !important;
}

/* ─────────────────────────────────────────────────────────────
   관리자 조직도 관리 (Organization Management) 공통 스타일
   ───────────────────────────────────────────────────────────── */
.admin-org-wrapper {
  overflow-x: auto;
  padding-bottom: 1rem;
  display: flex;
  justify-content: center;
  width: 100%;
}
.admin-org-canvas {
  width: 820px;
  min-width: 820px;
  margin: 0 auto;
  position: relative;
}
.admin-org-grid {
  display: grid;
  grid-template-columns: 230px 50px 260px 50px 230px;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
  width: 820px;
}
.admin-org-node {
  height: 48px;
  background: #ffffff;
  border: 2px solid #005bac;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 91, 172, 0.1);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  box-sizing: border-box;
  transition: all 0.15s ease;
}
.admin-org-node:focus-within {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25);
}
.admin-org-node .node-badge {
  background: #005bac;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 0.5rem;
  letter-spacing: 0.05em;
  user-select: none;
}
.admin-org-node .node-badge.badge-lg {
  width: 100px;
}
.admin-org-node .node-badge.badge-md {
  width: 88px;
  font-size: 0.775rem;
  letter-spacing: -0.01em;
  padding: 0 0.25rem;
}
.admin-org-node .node-badge.badge-sm {
  width: 80px;
  font-size: 0.8rem;
  padding: 0 0.25rem;
}
.admin-org-node input.node-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
  font-size: 0.925rem;
  text-align: center;
  padding: 0 0.25rem;
  letter-spacing: 0.05em;
  text-indent: 0.05em;
  box-sizing: border-box;
}
.admin-org-node input.node-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: normal;
  text-indent: 0;
}
.admin-org-line-h {
  height: 2px;
  background: #005bac;
}
.admin-org-line-v-box {
  display: flex;
  justify-content: center;
  height: 28px;
  align-items: center;
}
.admin-org-line-v {
  width: 2px;
  height: 100%;
  background: #005bac;
}
.admin-org-bus-container {
  width: 820px;
  height: 40px;
  margin-bottom: 0.75rem;
  position: relative;
}
.admin-org-members-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 820px;
}
.admin-members-grid {
  display: grid;
  grid-template-columns: repeat(3, 260px);
  gap: 20px;
  justify-content: center;
  width: 820px;
}
.admin-member-node {
  height: 48px;
  background: #ffffff;
  border: 1.5px solid #005bac;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 91, 172, 0.08);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
  transition: all 0.15s ease;
}
.admin-member-node:focus-within {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}
.admin-member-node input.company-input {
  width: 125px;
  background: #005bac;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8125rem;
  border: none;
  outline: none;
  text-align: center;
  padding: 0 0.4rem;
  flex-shrink: 0;
}
.admin-member-node input.company-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}
.admin-member-node input.ceo-input {
  flex: 1;
  min-width: 0;
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
  font-size: 0.875rem;
  border: none;
  outline: none;
  text-align: center;
  padding: 0 0.35rem;
  letter-spacing: 0.1em;
  text-indent: 0.1em;
}
.admin-member-node input.ceo-input::placeholder {
  color: #94a3b8;
  letter-spacing: normal;
  text-indent: 0;
}
.admin-member-node .btn-del-member {
  border: none;
  background: #fee2e2;
  color: #ef4444;
  width: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  padding: 0;
  flex-shrink: 0;
}
.admin-member-node .btn-del-member:hover {
  background: #fecaca;
}

/* ──────────────── Admin Search & Filter Bar Component ──────────────── */
.admin-search-card {
  padding: 1.25rem !important;
  margin-bottom: 1.5rem !important;
  background: #ffffff;
  border: 1px solid var(--color-line, #e2e8f0);
  border-radius: var(--radius-2xl, 1rem);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.03);
}

.admin-search-form {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
  align-items: center !important;
  width: 100%;
}

.admin-search-select-wrap {
  width: 180px;
  flex-shrink: 0;
}

.admin-search-input-wrap {
  flex: 1;
  min-width: 240px;
}

.admin-search-btn-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.admin-search-form .form-select,
.admin-search-form .form-control {
  height: 44px !important;
  padding: 0.6rem 0.95rem !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  border-radius: var(--radius-xl, 0.75rem) !important;
  border: 1px solid var(--color-line, #e2e8f0) !important;
  background-color: #ffffff !important;
  color: var(--color-ink, #0f172a) !important;
  box-sizing: border-box !important;
  width: 100%;
}

.admin-search-form .form-select:focus,
.admin-search-form .form-control:focus {
  border-color: var(--color-brand-500, #0284c7) !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

.admin-search-form .btn {
  height: 44px !important;
  padding: 0 1.25rem !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: var(--radius-xl, 0.75rem) !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}


