/* =========================================
   tools.css — ZN Tools Web UI
   ZNex Lab — 내부 업무 도구 전용 스타일
   다크 사이드바(#0d0d0d) + 라이트 콘텐츠(#f4f5f7)
   ========================================= */

/* =========================================
   CSS 변수 — tools 전용 (base.css 변수 재정의 금지, 추가만)
   ========================================= */
:root {
  /* 사이드바 */
  --sb-bg: #0d0d0d;
  --sb-hover: #1c1c1c;
  --sb-active: #2a2a2a;
  --sb-text: #f0f0f0;
  --sb-muted: #555;
  --sb-accent: #ffffff;
  --sb-width: 220px;
  --sb-section-color: #444;

  /* 콘텐츠 */
  --ct-bg: #f4f5f7;
  --ct-surface: #ffffff;
  --ct-border: #e2e4e8;
  --ct-text: #111111;
  --ct-muted: #888;
  --ct-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --ct-shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
  --ct-shadow-lg: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.04);

  /* 헤더 */
  --hd-bg: #ffffff;
  --hd-border: #e2e4e8;
  --hd-h: 56px;

  /* 강조 */
  --accent: #111111;
  --accent-hover: #000000;

  /* 상태 색상 */
  --ok: #16a34a;
  --ok-bg: #dcfce7;
  --warn: #d97706;
  --warn-bg: #fef9c3;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --info: #2563eb;
  --info-bg: #dbeafe;

  /* 테이블 */
  --row-a: #ffffff;
  --row-b: #f8f9fa;
  --row-sel: #dde8f0;
  --row-hover: #f0f4f8;
  --th-bg: #f1f3f5;
  --th-text: #374151;

  /* 반경 */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-full: 9999px;

  /* 트랜지션 */
  --t-fast: 120ms ease;
  --t-base: 200ms ease;
  --t-slow: 300ms ease;

  /* Z-인덱스 */
  --z-sidebar: 100;
  --z-header: 110;
  --z-overlay: 190;
  --z-modal: 200;
  --z-toast: 300;
}

/* =========================================
   전역 기반 — tools 페이지 전용
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Inter', 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ct-text);
  background: var(--ct-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }

/* =========================================
   Shell 레이아웃
   ========================================= */
.znt-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--ct-bg);
}

/* =========================================
   헤더
   ========================================= */
.znt-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--hd-h);
  background: var(--hd-bg);
  border-bottom: 1px solid var(--hd-border);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 0 12px;
  z-index: var(--z-header);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

.znt-hamburger {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  color: var(--ct-text);
  font-size: 17px;
  line-height: 1;
  transition: background var(--t-fast);
  flex-shrink: 0;
}
.znt-hamburger:hover { background: var(--ct-bg); }

.znt-logo {
  font-size: 15px;
  font-weight: 700;
  color: var(--ct-text);
  letter-spacing: -0.025em;
  white-space: nowrap;
  flex-shrink: 0;
}

.znt-breadcrumb {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--ct-muted);
  padding-left: 10px;
  margin-left: 2px;
  border-left: 1px solid var(--ct-border);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.znt-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

/* 연결 상태 */
.znt-conn-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ct-muted);
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--ct-bg);
  border: 1px solid var(--ct-border);
  user-select: none;
}

.znt-conn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ccc;
  flex-shrink: 0;
  transition: background var(--t-base), box-shadow var(--t-base);
}
.znt-conn-dot.connected {
  background: var(--ok);
  box-shadow: 0 0 0 2px rgba(22,163,74,0.22);
}
.znt-conn-dot.error {
  background: var(--danger);
  box-shadow: 0 0 0 2px rgba(220,38,38,0.22);
}

/* =========================================
   사이드바
   ========================================= */
.znt-sidebar {
  position: fixed;
  top: var(--hd-h);
  left: 0;
  width: var(--sb-width);
  height: calc(100vh - var(--hd-h));
  background: var(--sb-bg);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: var(--z-sidebar);
  display: flex;
  flex-direction: column;
  transition: transform var(--t-slow);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.04), 4px 0 20px rgba(0,0,0,0.28);
}

.znt-sidebar::-webkit-scrollbar { width: 3px; }
.znt-sidebar::-webkit-scrollbar-track { background: transparent; }
.znt-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: var(--r-full); }
.znt-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

/* 사이드바 상단 브랜드 */
.znt-sidebar-brand {
  padding: 16px 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  position: relative;
}
.znt-sidebar-brand::after {
  content: '';
  position: absolute;
  bottom: 0; left: 14px; right: 14px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}
.znt-sidebar-brand-link {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  border-radius: 6px;
  padding: 2px 4px;
  margin: -2px -4px;
  transition: background var(--t-fast);
}
.znt-sidebar-brand-link:hover {
  background: rgba(255,255,255,0.05);
}
.znt-sidebar-brand-link:hover .znt-sidebar-brand-label {
  color: rgba(255,255,255,0.55);
}
.znt-sidebar-brand-link:hover .znt-sidebar-brand-icon {
  opacity: 0.5;
}
.znt-sidebar-brand-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  transition: color var(--t-fast);
}
.znt-sidebar-brand-icon {
  width: 10px;
  height: 10px;
  color: rgba(255,255,255,0.25);
  opacity: 0;
  flex-shrink: 0;
  transition: opacity var(--t-fast);
}
.znt-sidebar-brand-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* 아이콘 컨테이너 내 SVG 크기 */
.znt-nav-item-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

/* 사이드바 하단 홈 링크 (Option B) */
.znt-nav-footer {
  flex-shrink: 0;
  padding: 8px 0 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  position: relative;
}
.znt-nav-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 14px; right: 14px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}
.znt-nav-footer-link {
  display: flex;
  text-decoration: none;
  color: rgba(200,111,78,0.55);
  transition: background var(--t-fast), color var(--t-fast);
}
.znt-nav-footer-link:hover {
  background: rgba(200,111,78,0.08);
  color: rgba(200,111,78,0.9);
  border-color: rgba(200,111,78,0.15);
}
.znt-nav-footer-link:hover .znt-nav-item-icon {
  background: rgba(200,111,78,0.12);
  border-color: rgba(200,111,78,0.2);
}

/* 내비 컨테이너 */
.znt-nav {
  padding: 4px 0 28px;
  flex: 1;
}

/* 섹션 구분 레이블 */
.znt-nav-section {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--sb-section-color);
  user-select: none;
}
.znt-nav-section::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.08), transparent);
}

/* 내비 아이템 */
.znt-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px 6px 14px;
  margin: 1px 8px;
  border-radius: var(--r-md);
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(240,240,240,0.5);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid transparent;
  background: none;
  width: calc(100% - 16px);
  text-align: left;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  letter-spacing: 0.005em;
}
.znt-nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: rgba(240,240,240,0.85);
}
.znt-nav-item:hover .znt-nav-item-icon {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
}
.znt-nav-item.active {
  background: linear-gradient(135deg, #1e1e1e, #181818);
  border-color: rgba(255,255,255,0.1);
  color: var(--sb-accent);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 1px 3px rgba(0,0,0,0.25);
}
.znt-nav-item.active::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: #fff;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(255,255,255,0.4);
}
.znt-nav-item.active .znt-nav-item-icon {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  opacity: 1;
}
.znt-nav-item-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
  font-size: 13px;
  transition: background var(--t-fast), border-color var(--t-fast);
  opacity: 0.8;
}

/* =========================================
   메인 콘텐츠
   ========================================= */
.znt-main {
  margin-left: var(--sb-width);
  margin-top: var(--hd-h);
  height: calc(100vh - var(--hd-h));
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--ct-bg);
  transition: margin-left var(--t-slow);
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.12) transparent;
}
.znt-main::-webkit-scrollbar { width: 6px; }
.znt-main::-webkit-scrollbar-track { background: transparent; }
.znt-main::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: var(--r-full); }
.znt-main::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.18); }

/* =========================================
   뷰 컨테이너
   ========================================= */
.znt-view {
  padding: 28px 32px;
  max-width: 1200px;
  animation: znt-fade-in 0.18s ease;
}

@keyframes znt-fade-in {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.znt-view-header {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ct-border);
}

.znt-view-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ct-text);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.znt-view-subtitle {
  font-size: 13px;
  color: var(--ct-muted);
  margin-top: 4px;
  line-height: 1.5;
}

/* =========================================
   KPI 카드 그리드
   ========================================= */
.znt-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.znt-kpi-card {
  background: var(--ct-surface);
  border: 1px solid var(--ct-border);
  border-radius: var(--r-lg);
  padding: 20px 20px 16px;
  box-shadow: var(--ct-shadow);
  transition: box-shadow var(--t-base), transform var(--t-base);
  cursor: default;
  position: relative;
  overflow: hidden;
}
.znt-kpi-card:hover {
  box-shadow: var(--ct-shadow-md);
  transform: translateY(-2px);
}
.znt-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--ct-border);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  transition: opacity var(--t-base);
}
.znt-kpi-card:hover::before { opacity: 0.75; }
.znt-kpi-card.ok::before    { background: linear-gradient(90deg, var(--ok), #4ade80); }
.znt-kpi-card.warn::before  { background: linear-gradient(90deg, var(--warn), #fbbf24); }
.znt-kpi-card.info::before  { background: linear-gradient(90deg, var(--info), #60a5fa); }
.znt-kpi-card.dark::before  { background: linear-gradient(90deg, #333, #666); }

/* KPI 값 색상 (상태별) */
.znt-kpi-card.ok   .znt-kpi-value { color: #15803d; }
.znt-kpi-card.warn .znt-kpi-value { color: #b45309; }
.znt-kpi-card.info .znt-kpi-value { color: #1d4ed8; }

.znt-kpi-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ct-muted);
  margin-bottom: 8px;
}

.znt-kpi-value {
  display: block;
  font-size: 30px;
  font-weight: 800;
  color: var(--ct-text);
  letter-spacing: -0.03em;
  line-height: 1;
}

.znt-kpi-unit {
  display: block;
  font-size: 11px;
  color: var(--ct-muted);
  margin-top: 4px;
}

.znt-kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
  margin-top: 8px;
  padding: 2px 7px;
  border-radius: var(--r-full);
}
.znt-kpi-trend.up     { background: var(--ok-bg); color: var(--ok); }
.znt-kpi-trend.down   { background: var(--danger-bg); color: var(--danger); }
.znt-kpi-trend.neutral { background: var(--ct-bg); color: var(--ct-muted); }

/* =========================================
   Dashboard 전용 스타일
   ========================================= */

/* KPI 카드 색상 변형 */
.db-kpi-hirose::before  { background: linear-gradient(90deg, #8b5cf6, #a78bfa) !important; }
.db-kpi-general::before { background: linear-gradient(90deg, #f59e0b, #fbbf24) !important; }
.db-kpi-laser::before   { background: linear-gradient(90deg, #3b82f6, #60a5fa) !important; }
.db-kpi-busbar::before  { background: linear-gradient(90deg, #14b8a6, #2dd4bf) !important; }
.db-kpi-total::before   { background: linear-gradient(90deg, #22c55e, #4ade80) !important; }

.db-kpi-hirose  .znt-kpi-value { color: #7c3aed; }
.db-kpi-general .znt-kpi-value { color: #d97706; }
.db-kpi-laser   .znt-kpi-value { color: #2563eb; }
.db-kpi-busbar  .znt-kpi-value { color: #0d9488; }

/* 완료율 링 */
.db-ring-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 4px 0;
}
.db-ring {
  width: 80px;
  height: 80px;
  transform: rotate(-90deg);
}
.db-ring-bg {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 6;
}
.db-ring-fg {
  fill: none;
  stroke: #22c55e;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 213.63;
  stroke-dashoffset: 213.63;
  transition: stroke-dashoffset 1s ease-out;
}
.db-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: 800;
  color: #22c55e;
  letter-spacing: -0.03em;
}

/* 시각화 2컬럼 그리드 */
.db-viz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

/* 프로그레스 바 */
.db-prog-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(226,228,232,0.5);
}
.db-prog-row:last-child { border-bottom: none; }
.db-prog-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 9px;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.db-prog-label.hirose  { background: #fee2e2; color: #b91c1c; }
.db-prog-label.general { background: #e0f2fe; color: #0369a1; }
.db-prog-bar-wrap {
  flex: 1;
  height: 18px;
  background: #f1f5f9;
  border-radius: 9px;
  overflow: hidden;
  position: relative;
}
.db-prog-bar {
  height: 100%;
  border-radius: 9px;
  transition: width 1s ease-out;
  min-width: 0;
}
.db-prog-bar.hirose  { background: linear-gradient(90deg, #ef4444, #f87171); }
.db-prog-bar.general { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }
.db-prog-stats {
  width: 100px;
  font-size: 11px;
  color: var(--ct-muted);
  text-align: right;
  flex-shrink: 0;
}
.db-prog-stats strong { color: var(--ct-text); font-weight: 700; }

/* 타임라인 */
.db-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(226,228,232,0.4);
}
.db-timeline-item:last-child { border-bottom: none; }
.db-tl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.db-tl-dot.hirose  { background: #8b5cf6; }
.db-tl-dot.general { background: #f59e0b; }
.db-tl-dot.laser   { background: #3b82f6; }
.db-tl-dot.busbar  { background: #14b8a6; }
.db-tl-body { flex: 1; min-width: 0; }
.db-tl-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ct-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-tl-meta {
  font-size: 11px;
  color: var(--ct-muted);
  margin-top: 2px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.db-tl-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.db-tl-badge.hirose  { background: #ede9fe; color: #6d28d9; }
.db-tl-badge.general { background: #fef3c7; color: #92400e; }
.db-tl-badge.laser   { background: #dbeafe; color: #1e40af; }
.db-tl-badge.busbar  { background: #ccfbf1; color: #115e59; }
.db-tl-time {
  font-size: 11px;
  color: #9ca3af;
  flex-shrink: 0;
  white-space: nowrap;
}

/* 타임라인 빈 상태 */
.db-timeline-empty {
  text-align: center;
  padding: 30px 0;
  color: var(--ct-muted);
  font-size: 13px;
}

/* 통합 검색 */
.db-search-card { margin-bottom: 0; }
.db-search-count { font-size: 11px; color: var(--ct-muted); }
.db-search-input-wrap { position: relative; display: flex; align-items: center; }
.db-search-icon { position: absolute; left: 12px; color: #9ca3af; pointer-events: none; line-height: 1; }
.db-search-input {
  width: 100%; height: 42px; padding: 0 14px 0 38px; font-size: 14px;
  border: 1.5px solid var(--ct-border); border-radius: 10px; background: var(--ct-bg);
  transition: all 0.2s; outline: none;
}
.db-search-input:focus { border-color: var(--info); background: var(--ct-surface); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.db-search-results {
  margin-top: 8px; border: 1px solid var(--ct-border); border-radius: 10px;
  background: var(--ct-surface); overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  max-height: 320px; overflow-y: auto;
}
.db-sr-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  cursor: pointer; transition: background 0.15s; border-bottom: 1px solid rgba(226,228,232,0.5);
}
.db-sr-item:last-child { border-bottom: none; }
.db-sr-item:hover { background: #f0f7ff; }
.db-sr-badge {
  display: inline-block; padding: 2px 8px; border-radius: 9px;
  font-size: 10px; font-weight: 700; flex-shrink: 0; min-width: 46px; text-align: center;
}
.db-sr-badge.hirose  { background: #fee2e2; color: #b91c1c; }
.db-sr-badge.general { background: #e0f2fe; color: #0369a1; }
.db-sr-badge.laser   { background: #dbeafe; color: #1e40af; }
.db-sr-badge.busbar  { background: #ccfbf1; color: #115e59; }
.db-sr-info { flex: 1; min-width: 0; }
.db-sr-company { font-size: 11px; color: #6b7280; }
.db-sr-product { font-size: 13px; font-weight: 500; color: var(--ct-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-sr-product mark { background: #fef08a; color: inherit; border-radius: 2px; padding: 0 1px; }
.db-sr-arrow { color: #d1d5db; flex-shrink: 0; }
.db-search-footer {
  padding: 8px 14px; background: #f9fafb; border-top: 1px solid var(--ct-border);
  font-size: 11px; color: #9ca3af; display: flex; justify-content: space-between;
}
.db-search-empty { text-align: center; padding: 24px; color: #9ca3af; font-size: 13px; }

/* 제품 상세 팝업 */
.db-detail-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 20px;
}
.db-detail-modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2); overflow: hidden;
  animation: dbModalIn 0.2s ease-out;
}
@keyframes dbModalIn { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }
.db-detail-top {
  padding: 20px 24px 16px; border-bottom: 1px solid #f0f0f0;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.db-detail-title-wrap { flex: 1; }
.db-detail-badge { margin-bottom: 6px; }
.db-detail-company { font-size: 12px; color: #6b7280; margin-bottom: 2px; }
.db-detail-product { font-size: 17px; font-weight: 700; color: #111827; }
.db-detail-close {
  background: none; border: none; cursor: pointer; color: #9ca3af;
  padding: 4px; border-radius: 6px; transition: all 0.15s;
}
.db-detail-close:hover { background: #f3f4f6; color: #374151; }
.db-detail-body { padding: 16px 24px 20px; max-height: 60vh; overflow-y: auto; }
.db-detail-section { margin-bottom: 10px; }
.db-detail-section:last-child { margin-bottom: 0; }
.db-detail-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: #9ca3af; margin-bottom: 6px;
}
.db-detail-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.db-detail-flag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 500;
}
.db-detail-flag.on  { background: #ecfdf5; color: #059669; }
.db-detail-flag.off { background: #f9fafb; color: #bbb; }
.db-detail-flag-dot { width: 6px; height: 6px; border-radius: 50%; }
.db-detail-flag.on  .db-detail-flag-dot { background: #10b981; }
.db-detail-flag.off .db-detail-flag-dot { background: #d1d5db; }
.db-detail-content-box {
  border: 1.5px solid #111827; border-radius: 8px;
  padding: 10px 14px; font-size: 13px; color: #374151; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
}
/* 이미지 보기 버튼 (프레임 박스 형태) */
.db-detail-img-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 18px 20px;
  border: 1.5px solid #111827; border-radius: 8px;
  background: #111827; color: #fff;
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.db-detail-img-btn:hover { background: #1f2937; border-color: #1f2937; }
.db-detail-img-btn svg { width: 18px; height: 18px; }
.db-detail-img-btn.disabled { background: #f9fafb; color: #9ca3af; border-color: #e5e7eb; cursor: default; pointer-events: none; }

/* 이미지 전체 뷰어 */
.db-imgpanel {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(17, 24, 39, 0.97);
  z-index: 10001;
  display: flex; flex-direction: column;
  animation: dbImgPanelIn 0.2s ease-out;
}
@keyframes dbImgPanelIn { from { opacity: 0; } to { opacity: 1; } }
.db-imgpanel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.db-imgpanel-title { color: #fff; font-size: 14px; font-weight: 600; }
.db-imgpanel-counter { color: rgba(255,255,255,0.5); font-size: 13px; margin-left: 8px; }
.db-imgpanel-close {
  background: none; border: none; cursor: pointer; color: rgba(255,255,255,0.6);
  padding: 4px; border-radius: 6px; transition: all 0.15s;
}
.db-imgpanel-close:hover { color: #fff; background: rgba(255,255,255,0.1); }
.db-imgpanel-body {
  flex: 1; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; padding: 20px;
}
.db-imgpanel-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.db-imgpanel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.12); border: none; cursor: pointer;
  color: #fff; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.7; transition: opacity 0.15s, background 0.15s;
}
.db-imgpanel-nav:hover { opacity: 1; background: rgba(255,255,255,0.22); }
.db-imgpanel-prev { left: 8px; }
.db-imgpanel-next { right: 8px; }
.db-imgpanel-loading { color: rgba(255,255,255,0.4); font-size: 13px; }
@media (max-width: 768px) { .db-imgpanel { width: 100vw; max-width: none; } }
.db-detail-footer {
  padding: 12px 24px 16px; display: flex; justify-content: flex-end; gap: 8px;
}
.db-detail-btn {
  padding: 7px 16px; border-radius: 8px; font-size: 13px; font-weight: 500;
  cursor: pointer; border: 1px solid #e5e7eb; background: #fff; color: #374151; transition: all 0.15s;
}
.db-detail-btn:hover { background: #f9fafb; }
.db-detail-btn.primary { background: #111827; color: #fff; border-color: #111827; }
.db-detail-btn.primary:hover { background: #1f2937; }

/* 메모 위젯 */
.db-viz-grid { align-items: start; }
.db-viz-grid > .znt-card { min-height: 220px; margin-top: 0 !important; }
.db-memo-card { display: flex; flex-direction: column; }
.db-memo-header-right { display: flex; align-items: center; gap: 10px; }
.db-memo-count { font-size: 11px; color: var(--ct-muted); }
.db-memo-body { padding: 14px 16px; display: flex; flex-direction: column; flex: 1; }
.db-memo-input-wrap {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.db-memo-input {
  flex: 1;
  height: 34px;
  font-size: 13px;
  padding: 0 10px;
  border: 1px solid var(--ct-border);
  border-radius: var(--r-md);
  background: var(--ct-bg);
  transition: border-color var(--t-base);
}
.db-memo-input:focus { border-color: var(--info); outline: none; }
.db-memo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  overflow-y: auto;
  max-height: 280px;
}
.db-memo-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px solid rgba(226,228,232,0.4);
  transition: background var(--t-base);
}
.db-memo-item:last-child { border-bottom: none; }
.db-memo-item:hover { background: #f9fafb; }
.db-memo-item .znt-checkbox { flex-shrink: 0; }
.db-memo-text {
  flex: 1;
  font-size: 13px;
  color: var(--ct-text);
  line-height: 1.4;
  word-break: break-word;
}
.db-memo-item.done .db-memo-text {
  text-decoration: line-through;
  color: var(--ct-muted);
}
.db-memo-time {
  font-size: 10px;
  color: #bbb;
  flex-shrink: 0;
  white-space: nowrap;
}
.db-memo-del {
  background: none;
  border: none;
  cursor: pointer;
  color: #ccc;
  padding: 2px;
  flex-shrink: 0;
  transition: color var(--t-base);
  line-height: 1;
}
.db-memo-del:hover { color: var(--danger); }
.db-memo-empty {
  display: none;
  text-align: center;
  padding: 30px 0;
  color: var(--ct-muted);
  font-size: 13px;
}
.db-memo-empty.show { display: block; }

/* 반응형 */
@media (max-width: 768px) {
  .db-viz-grid { grid-template-columns: 1fr; }
}

/* =========================================
   카드 컴포넌트
   ========================================= */
.znt-card {
  background: var(--ct-surface);
  border: 1px solid var(--ct-border);
  border-radius: var(--r-lg);
  box-shadow: var(--ct-shadow);
  overflow: hidden;
}

.znt-card-header {
  padding: 13px 20px;
  border-bottom: 1px solid var(--ct-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fafafa;
}

.znt-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ct-text);
  letter-spacing: -0.015em;
}

.znt-card-body {
  padding: 20px;
}

.znt-card + .znt-card {
  margin-top: 16px;
}

/* =========================================
   툴바 (검색 + 버튼)
   ========================================= */
.znt-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--ct-border);
  background: var(--ct-surface);
  flex-wrap: wrap;
}

.znt-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.znt-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* 검색 박스 */
.znt-search-wrap {
  position: relative;
  flex: 1;
  max-width: 340px;
}

.znt-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ct-muted);
  font-size: 13px;
  pointer-events: none;
}

.znt-search {
  width: 100%;
  height: 34px;
  padding: 0 10px 0 30px;
  border: 1px solid var(--ct-border);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--ct-text);
  background: var(--ct-bg);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.znt-search:focus {
  border-color: #aaa;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
  background: #fff;
}
.znt-search::placeholder { color: var(--ct-muted); }

/* =========================================
   버튼
   ========================================= */
.znt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), transform 80ms ease, color var(--t-fast);
  white-space: nowrap;
  user-select: none;
  letter-spacing: 0.01em;
  line-height: 1;
}
.znt-btn:active { transform: scale(0.97); }
.znt-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.znt-btn-primary {
  background: linear-gradient(180deg, #262626 0%, #111111 100%);
  color: #fff;
  border-color: #111;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.znt-btn-primary:hover {
  background: linear-gradient(180deg, #1a1a1a 0%, #000 100%);
  border-color: #000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 2px 8px rgba(0,0,0,0.3);
}

.znt-btn-outline {
  background: #fff;
  color: var(--ct-text);
  border-color: var(--ct-border);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.znt-btn-outline:hover {
  background: #f8f9fb;
  border-color: #b8bcc4;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}

.znt-btn-ghost {
  background: transparent;
  color: var(--ct-muted);
  border-color: transparent;
}
.znt-btn-ghost:hover {
  background: var(--ct-bg);
  color: var(--ct-text);
}

.znt-btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: #fca5a5;
}
.znt-btn-danger:hover {
  background: #fecaca;
  border-color: var(--danger);
}

.znt-btn-ok {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: #86efac;
}
.znt-btn-ok:hover {
  background: #bbf7d0;
  border-color: var(--ok);
}

.znt-btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 14px;
}

.znt-btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.znt-btn-lg {
  height: 40px;
  padding: 0 20px;
  font-size: 14px;
}

/* =========================================
   배지
   ========================================= */
.znt-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
  line-height: 1.6;
}
.znt-badge::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.znt-badge-no-dot::before { display: none; }

.znt-badge-ok      { background: var(--ok-bg); color: #166534; }
.znt-badge-pending { background: var(--warn-bg); color: #854d0e; }
.znt-badge-danger  { background: var(--danger-bg); color: #991b1b; }
.znt-badge-info    { background: var(--info-bg); color: #1e40af; }
.znt-badge-none    { background: #f3f4f6; color: #6b7280; }
.znt-badge-dark    { background: #111; color: #f5f5f5; }

/* =========================================
   테이블
   ========================================= */
.znt-table-wrap {
  overflow-x: auto;
  background: var(--ct-surface);
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.08) transparent;
}
.znt-table-wrap::-webkit-scrollbar { height: 4px; }
.znt-table-wrap::-webkit-scrollbar-track { background: transparent; }
.znt-table-wrap::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.08); border-radius: var(--r-full); }

.znt-table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  font-size: 13px;
  color: var(--ct-text);
}
.znt-table .col-name {
  white-space: normal;
  word-break: break-word;
  overflow: visible;
  text-overflow: unset;
  min-width: 100px;
}

.znt-table thead tr {
  background: var(--th-bg);
}

.znt-table thead th {
  padding: 9px 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #5a6172;
  text-align: left;
  border-bottom: 2px solid var(--ct-border);
  white-space: nowrap;
  user-select: none;
}
.znt-table thead th.sortable { cursor: pointer; }
.znt-table thead th.sortable:hover { background: #e8eaed; }
.znt-table thead th.sort-asc::after  { content: ' ↑'; opacity: 0.6; }
.znt-table thead th.sort-desc::after { content: ' ↓'; opacity: 0.6; }

.znt-table tbody tr:nth-child(odd)  { background: var(--row-a); }
.znt-table tbody tr:nth-child(even) { background: var(--row-b); }
.znt-table tbody tr:hover           { background: var(--row-hover); }
.znt-table tbody tr.selected        { background: var(--row-sel); }

.znt-table tbody td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(226,228,232,0.5);
  vertical-align: middle;
  white-space: nowrap;
}
.znt-table tbody tr:last-child td { border-bottom: none; }

.znt-table .col-check  { padding: 0 6px; text-align: center; white-space: nowrap; }
.znt-table .col-action { text-align: center; white-space: nowrap; padding: 0 6px; }
.znt-table thead th.col-action { padding: 9px 6px; }
.znt-table .col-center { text-align: center; }

.znt-checkbox {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--accent);
  vertical-align: middle;
}

/* 테이블 빈 상태 */
.znt-table-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 52px 24px;
  color: var(--ct-muted);
}
.znt-table-empty-icon { font-size: 30px; display: block; margin-bottom: 10px; opacity: 0.3; }
.znt-table-empty-icon svg { width: 34px; height: 34px; }
.znt-table-empty-text { font-size: 14px; font-weight: 500; }

/* 테이블 로딩 */
.znt-table-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 44px;
  color: var(--ct-muted);
  font-size: 13px;
}

/* =========================================
   폼
   ========================================= */
.znt-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 16px;
}
.znt-form-group:last-child { margin-bottom: 0; }

.znt-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.znt-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ct-text);
  letter-spacing: 0.02em;
}
.znt-label.required::after { content: ' *'; color: var(--danger); }

.znt-input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--ct-border);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--ct-text);
  background: var(--ct-surface);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.znt-input:focus {
  border-color: #999;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.07);
}
.znt-input::placeholder { color: var(--ct-muted); }
.znt-input:disabled {
  background: var(--ct-bg);
  color: var(--ct-muted);
  cursor: not-allowed;
}
.znt-input.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.08);
}

.znt-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--ct-border);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--ct-text);
  background: var(--ct-surface);
  outline: none;
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.znt-textarea:focus {
  border-color: #999;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.07);
}

.znt-select {
  width: 100%;
  height: 36px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--ct-border);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--ct-text);
  background-color: var(--ct-surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23888' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.znt-select:focus {
  border-color: #999;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.07);
}

.znt-hint       { font-size: 11px; color: var(--ct-muted); line-height: 1.4; }
.znt-error-text { font-size: 11px; color: var(--danger); }

/* =========================================
   모달
   ========================================= */
.znt-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-overlay);
  padding: 20px;
  animation: znt-overlay-in 0.15s ease;
  backdrop-filter: blur(2px);
}
@keyframes znt-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.znt-modal {
  background: var(--ct-surface);
  border-radius: var(--r-xl);
  box-shadow: 0 24px 48px rgba(0,0,0,0.18), 0 8px 16px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: znt-modal-in 0.2s cubic-bezier(0.16,1,0.3,1);
  z-index: var(--z-modal);
}
@keyframes znt-modal-in {
  from { opacity: 0; transform: scale(0.93) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.znt-modal-header {
  padding: 18px 24px 15px;
  border-bottom: 1px solid var(--ct-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  background: #fafafa;
}
.znt-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ct-text);
  letter-spacing: -0.015em;
}
.znt-modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  color: var(--ct-muted);
  font-size: 16px;
  flex-shrink: 0;
  transition: background var(--t-fast), color var(--t-fast);
}
.znt-modal-close:hover {
  background: var(--ct-bg);
  color: var(--ct-text);
}

.znt-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.znt-modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--ct-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.znt-modal-sm   { max-width: 380px; }
.znt-modal-lg   { max-width: 720px; }
.znt-modal-xl   { max-width: 960px; }
.znt-modal-wide { max-width: 860px; width: 95vw; }

/* 확인(Confirm) 모달 */
.znt-confirm-modal .znt-modal-body {
  text-align: center;
  padding: 28px 24px 20px;
}
.znt-confirm-icon  { display: flex; justify-content: center; margin-bottom: 12px; color: #6b7280; }
.znt-icon-sm { display: inline-flex; align-items: center; flex-shrink: 0; }
.znt-confirm-msg   { font-size: 14px; color: var(--ct-text); line-height: 1.6; }

/* =========================================
   페이지네이션
   ========================================= */
.znt-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 20px;
  border-top: 1px solid var(--ct-border);
  background: var(--ct-surface);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  gap: 10px;
  flex-wrap: wrap;
}

.znt-pagination-info {
  font-size: 12px;
  color: var(--ct-muted);
  white-space: nowrap;
}

.znt-pagination-controls {
  display: flex;
  align-items: center;
  gap: 3px;
}

.znt-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 500;
  color: var(--ct-muted);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  background: none;
}
.znt-page-btn:hover {
  background: var(--ct-bg);
  color: var(--ct-text);
  border-color: var(--ct-border);
}
.znt-page-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.znt-page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.znt-page-size {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ct-muted);
}
.znt-page-size select {
  height: 26px;
  padding: 0 22px 0 8px;
  font-size: 12px;
  border: 1px solid var(--ct-border);
  border-radius: var(--r-sm);
  background-color: var(--ct-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath fill='%23888' d='M4 5L0 0h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  color: var(--ct-text);
}

/* =========================================
   Toast 알림
   ========================================= */
.znt-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 340px;
  width: calc(100% - 48px);
}

.znt-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-lg);
  background: #1c1c1c;
  color: #efefef;
  box-shadow: 0 8px 24px rgba(0,0,0,0.28), 0 2px 6px rgba(0,0,0,0.14);
  font-size: 13px;
  line-height: 1.4;
  pointer-events: all;
  animation: znt-toast-in 0.22s cubic-bezier(0.16,1,0.3,1);
  border-left: 3px solid rgba(255,255,255,0.18);
}
.znt-toast.removing {
  animation: znt-toast-out 0.18s ease forwards;
}
@keyframes znt-toast-in {
  from { opacity: 0; transform: translateX(16px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes znt-toast-out {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(16px) scale(0.95); }
}

/* Nova SVG 상태 아이콘 공통 */
.znt-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: 3px;
}
.znt-status-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}
.znt-status-icon svg { width: 100%; height: 100%; display: block; }

.znt-toast-icon  { display: flex; align-items: center; flex-shrink: 0; width: 16px; height: 16px; margin-top: 1px; }
.znt-toast-icon svg { width: 100%; height: 100%; display: block; }
.znt-toast-body  { flex: 1; min-width: 0; }
.znt-toast-title { font-weight: 600; font-size: 13px; }
.znt-toast-msg   { font-size: 12px; opacity: 0.7; margin-top: 1px; }

.znt-toast-ok     { border-left-color: var(--ok); background: #0d1f12; }
.znt-toast-ok     .znt-toast-icon { color: var(--ok); }
.znt-toast-warn   { border-left-color: var(--warn); background: #1c1408; }
.znt-toast-warn   .znt-toast-icon { color: var(--warn); }
.znt-toast-danger { border-left-color: var(--danger); background: #1e0b0b; }
.znt-toast-danger .znt-toast-icon { color: var(--danger); }
.znt-toast-info   { border-left-color: var(--info); background: #081525; }
.znt-toast-info   .znt-toast-icon { color: #60a5fa; }

/* =========================================
   스피너
   ========================================= */
.znt-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0,0,0,0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: znt-spin 0.65s linear infinite;
  vertical-align: middle;
}
.znt-spinner-sm  { width: 14px; height: 14px; border-width: 1.5px; }
.znt-spinner-lg  { width: 28px; height: 28px; border-width: 3px; }
.znt-spinner-white {
  border-color: rgba(255,255,255,0.2);
  border-top-color: #fff;
}
@keyframes znt-spin { to { transform: rotate(360deg); } }

.znt-page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 260px;
  gap: 14px;
  color: var(--ct-muted);
  font-size: 13px;
}

/* =========================================
   빈 상태 (Empty State)
   ========================================= */
.znt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  text-align: center;
}
.znt-empty-icon  { font-size: 40px; opacity: 0.3; margin-bottom: 14px; }
.znt-empty-title { font-size: 15px; font-weight: 600; color: var(--ct-text); margin-bottom: 6px; }
.znt-empty-desc  { font-size: 13px; color: var(--ct-muted); max-width: 280px; line-height: 1.6; }

/* =========================================
   Coming Soon 뷰
   ========================================= */
.znt-coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 340px;
  text-align: center;
  gap: 10px;
}
.znt-coming-soon-icon { font-size: 44px; opacity: 0.3; }
.znt-coming-soon-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ct-text);
  letter-spacing: -0.02em;
}
.znt-coming-soon-desc {
  font-size: 13px;
  color: var(--ct-muted);
  max-width: 260px;
  line-height: 1.6;
}

/* =========================================
   구분선 / 섹션
   ========================================= */
.znt-divider { height: 1px; background: var(--ct-border); margin: 20px 0; }

.znt-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ct-muted);
  margin-bottom: 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--ct-border);
}

/* =========================================
   유틸리티
   ========================================= */
.znt-flex           { display: flex; }
.znt-flex-col       { display: flex; flex-direction: column; }
.znt-items-center   { align-items: center; }
.znt-justify-between{ justify-content: space-between; }
.znt-gap-1 { gap: 4px; }
.znt-gap-2 { gap: 8px; }
.znt-gap-3 { gap: 12px; }
.znt-gap-4 { gap: 16px; }
.znt-mt-2  { margin-top: 8px; }
.znt-mt-4  { margin-top: 16px; }
.znt-mt-6  { margin-top: 24px; }
.znt-mb-4  { margin-bottom: 16px; }
.znt-mb-6  { margin-bottom: 24px; }
.znt-w-full{ width: 100%; }
.znt-text-sm   { font-size: 12px; }
.znt-text-muted{ color: var(--ct-muted); }
.znt-font-mono {
  font-family: 'Roboto Mono', 'Fira Mono', 'Consolas', monospace;
  font-size: 12px;
}
.znt-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================
   포커스 접근성
   ========================================= */
.znt-btn:focus-visible,
.znt-input:focus-visible,
.znt-select:focus-visible,
.znt-nav-item:focus-visible,
.znt-page-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* =========================================
   모바일 반응형 (≤ 768px)
   ========================================= */
@media (max-width: 768px) {
  .znt-sidebar {
    transform: translateX(calc(-1 * var(--sb-width)));
    position: fixed;
    z-index: var(--z-sidebar);
    box-shadow: none;
  }
  .znt-sidebar.open {
    transform: translateX(0);
    box-shadow: 6px 0 28px rgba(0,0,0,0.38);
  }
  .znt-main {
    margin-left: 0 !important;
  }
  .znt-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.42);
    z-index: calc(var(--z-sidebar) - 1);
  }
  .znt-sidebar-overlay.visible {
    display: block;
    animation: znt-overlay-in 0.15s ease;
  }
  .znt-view {
    padding: 16px;
  }
  .znt-kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .znt-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 14px;
    gap: 8px;
  }
  .znt-toolbar-left,
  .znt-toolbar-right {
    width: 100%;
  }
  .znt-search-wrap { max-width: 100%; }
  .znt-breadcrumb  { display: none; }
  .znt-form-row    { grid-template-columns: 1fr; }
  .znt-pagination  { flex-direction: column; align-items: flex-start; gap: 8px; }
  .znt-toast-container { left: 12px; right: 12px; bottom: 16px; max-width: 100%; width: auto; }
}

@media (max-width: 480px) {
  .znt-kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .znt-kpi-value { font-size: 24px; }
  .znt-modal {
    max-width: 100%;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    position: fixed;
    bottom: 0; left: 0; right: 0; top: auto;
    max-height: 92vh;
  }
  .znt-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
}

/* =========================================
   툴바 유틸리티
   ========================================= */
.znt-toolbar-sep {
  display: inline-block;
  width: 1px;
  height: 20px;
  background: var(--ct-border);
  margin: 0 4px;
  flex-shrink: 0;
  align-self: center;
}

.znt-count-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--ct-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.znt-btn-danger-ghost {
  background: transparent;
  color: var(--danger);
  border-color: transparent;
}
.znt-btn-danger-ghost:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.znt-btn-edit-ghost {
  background: transparent;
  color: var(--info);
  border-color: transparent;
}
.znt-btn-edit-ghost:hover {
  background: var(--info-bg);
  color: var(--info);
}

.znt-select-sm { width: 140px; }

/* =========================================
   Toggle Label (미완료만 등)
   ========================================= */
.znt-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ct-muted);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.znt-toggle-label:hover { color: var(--ct-text); }
.znt-toggle-label input { cursor: pointer; }

/* =========================================
   나영식 (NaTach Process) 모듈
   ========================================= */

/* KPI 카드 색상 */
.nys-kpi-reels::before { background: linear-gradient(90deg, #3b82f6, #60a5fa) !important; }
.nys-kpi-qty::before   { background: linear-gradient(90deg, #14b8a6, #2dd4bf) !important; }
.nys-kpi-short::before { background: linear-gradient(90deg, #ef4444, #f87171) !important; }
.nys-kpi-zones::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa) !important; }
.nys-kpi-reels .znt-kpi-value { color: #2563eb; }
.nys-kpi-qty   .znt-kpi-value { color: #0d9488; }
.nys-kpi-short .znt-kpi-value { color: #b91c1c; }
.nys-kpi-zones .znt-kpi-value { color: #7c3aed; }

/* 섹션 컨테이너 */
.nys-section {
  margin-top: 16px;
}
.nys-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 10px;
}
.nys-section-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
}
.nys-section-badge.stage-1 { background: #111827; }
.nys-section-badge.stage-2 { background: #475569; }
.nys-section-badge.stage-3 { background: #94a3b8; }
.nys-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ct-text);
}

/* 구역 카드 그리드 (3열) */
.nys-zone-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 768px) {
  .nys-zone-grid { grid-template-columns: 1fr; }
}

/* 개별 구역 카드 */
.nys-zone-card {
  background: var(--ct-surface);
  border: 1px solid var(--ct-border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--ct-shadow);
}
.nys-zone-card:hover {
  border-color: #111827;
  transform: translateY(-2px);
  box-shadow: var(--ct-shadow-md);
}
.nys-zone-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
.nys-zone-col-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ct-text);
}
.nys-zone-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
  transition: background 0.2s;
}
.nys-zone-status-dot.has-data  { background: #22c55e; }
.nys-zone-status-dot.has-short { background: #ef4444; }

.nys-zone-stats {
  font-size: 12px;
  color: var(--ct-muted);
  display: flex;
  gap: 8px;
  align-items: center;
}
.nys-zone-stats strong {
  color: var(--ct-text);
  font-weight: 700;
  font-size: 13px;
}
.nys-zone-range {
  font-size: 11px;
  color: #6b7280;
  font-family: monospace;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px dashed rgba(226,228,232,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nys-zone-empty {
  font-size: 11px;
  color: #bbb;
  font-style: italic;
  margin-top: auto;
  padding-top: 6px;
}

/* 구역 입력 모달 */
.nys-modal-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nys-paste-area {
  width: 100%;
  min-height: 70px;
  padding: 8px 12px;
  border: 1.5px solid var(--ct-border);
  border-radius: 8px;
  font-family: monospace;
  font-size: 12px;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}
.nys-paste-area:focus { border-color: #3b82f6; }
.nys-paste-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
  font-size: 11px;
  color: var(--ct-muted);
}
.nys-paste-row .nys-paste-stats { flex: 1; }

.nys-row-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.nys-row-table thead th {
  padding: 8px 10px;
  background: #f9fafb;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
  text-align: left;
  border-bottom: 1.5px solid var(--ct-border);
  white-space: nowrap;
}
.nys-row-table thead th.center { text-align: center; }
.nys-row-table tbody td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(226,228,232,0.5);
  vertical-align: middle;
  white-space: nowrap;
}
.nys-row-table tbody tr:hover { background: #f9fafb; }
/* 중복 → 노랑 배경 (전체 행). td 레벨 강제 적용으로 specificity 확보 */
.nys-row-table tbody tr.row-dup,
.nys-row-table tbody tr.row-dup:hover { background: #fef08a !important; }
.nys-row-table tbody tr.row-dup td { background: #fef08a; }
.nys-row-table tbody tr.row-dup:hover td { background: #fde047; }
/* 미달 → 빨강 배경 (중복보다 우선) */
.nys-row-table tbody tr.row-short,
.nys-row-table tbody tr.row-short:hover,
.nys-row-table tbody tr.row-short.row-dup,
.nys-row-table tbody tr.row-short.row-dup:hover { background: #fecaca !important; }
.nys-row-table tbody tr.row-short td,
.nys-row-table tbody tr.row-short.row-dup td { background: #fecaca; }
.nys-row-table tbody tr.row-short:hover td,
.nys-row-table tbody tr.row-short.row-dup:hover td { background: #fca5a5; }
.nys-row-num { font-family: monospace; }
.nys-row-qty { text-align: right; font-family: monospace; font-weight: 600; }
.nys-row-qty.short { color: #b91c1c; }
.nys-row-actions { text-align: right; }
.nys-row-actions button {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: #9ca3af;
  transition: all 0.15s;
  line-height: 1;
}
.nys-row-actions button:hover { color: #374151; background: #f3f4f6; }
.nys-row-actions button.del:hover { color: var(--danger); background: var(--danger-bg); }

.nys-empty-rows {
  text-align: center;
  padding: 24px;
  color: #bbb;
  font-size: 13px;
}

/* 이슈 카드 2컬럼 그리드 */
.nys-issue-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}
.nys-issue-grid > .znt-card { min-height: 200px; margin-top: 0 !important; display: flex; flex-direction: column; }
@media (max-width: 768px) { .nys-issue-grid { grid-template-columns: 1fr; } }
.nys-issue-body {
  padding: 12px 16px;
  max-height: 280px;
  overflow-y: auto;
  flex: 1;
}
.nys-issue-empty {
  text-align: center;
  padding: 28px 0;
  color: #bbb;
  font-size: 13px;
}
.nys-issue-item {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(226,228,232,0.5);
  font-size: 12.5px;
  line-height: 1.5;
}
.nys-issue-item:last-child { border-bottom: none; }
.nys-issue-item-head {
  font-weight: 700;
  font-family: monospace;
  color: #111827;
  margin-bottom: 2px;
}
.nys-issue-item-sub {
  font-size: 11px;
  color: #6b7280;
  padding-left: 10px;
}
.nys-issue-short-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(226,228,232,0.5);
  font-size: 12.5px;
}
.nys-issue-short-item:last-child { border-bottom: none; }
.nys-issue-short-loc {
  min-width: 85px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
}
.nys-issue-short-lot {
  flex: 1;
  font-family: monospace;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nys-issue-short-qty {
  font-weight: 700;
  color: #b91c1c;
  font-family: monospace;
}

/* 종합 팝업 */
.nys-summary-section {
  margin-bottom: 18px;
}
.nys-summary-section:last-child { margin-bottom: 0; }
.nys-summary-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #111827;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nys-summary-box {
  border: 1.5px solid #111827;
  border-radius: 8px;
  padding: 10px 14px;
}
.nys-summary-issue-group {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #e5e7eb;
}
.nys-summary-issue-group:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.nys-summary-zone-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(226,228,232,0.4);
  font-size: 13px;
}
.nys-summary-zone-row:last-child { border-bottom: none; }
.nys-summary-zone-loc {
  min-width: 120px;
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
}
.nys-summary-zone-range {
  flex: 1;
  font-family: monospace;
  color: #111827;
}
.nys-summary-zone-stats {
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
}
.nys-summary-stat-line {
  padding: 12px 14px;
  background: #f9fafb;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
}
.nys-summary-stat-line strong {
  color: #111827;
  font-weight: 700;
}
.nys-summary-stat-line .excl {
  color: #b91c1c;
  font-weight: 600;
  margin-left: 6px;
}

/* =========================================
   Photo Excel 모듈
   ========================================= */
.pe-layout {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--hd-h) - 56px);
  min-height: 0;
}

.pe-options {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--ct-surface);
  border: 1px solid var(--ct-border);
  border-radius: var(--r-lg);
  padding: 11px 16px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.pe-options-label {
  font-size: 11px;
  color: var(--ct-muted);
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pe-input-sm {
  text-align: center;
}

.pe-body {
  display: grid;
  grid-template-columns: 2fr 3fr 196px;
  gap: 10px;
  flex: 1;
  min-height: 0;
}

.pe-panel {
  background: var(--ct-surface);
  border: 1px solid var(--ct-border);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--ct-shadow);
}

.pe-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ct-border);
  flex-shrink: 0;
  background: #fafafa;
}

.pe-panel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ct-text);
  letter-spacing: -0.01em;
}

.pe-dropzone {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--ct-bg);
  margin: 10px;
  border-radius: var(--r-md);
  border: 2px dashed var(--ct-border);
  cursor: pointer;
  padding: 24px;
  text-align: center;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.pe-dropzone:hover {
  border-color: #aaa;
  background: #f0f2f5;
}

.pe-dropzone-icon {
  opacity: 0.3;
  margin-bottom: 10px;
}

.pe-dropzone-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ct-text);
  margin-bottom: 4px;
}

.pe-dropzone-hint {
  font-size: 11px;
  color: var(--ct-muted);
  line-height: 1.6;
}

.pe-file-list {
  flex: 1;
  overflow-y: auto;
}

.pe-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pe-generate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px;
  background: linear-gradient(180deg, #1ea34a, #16873d);
  color: #fff;
  border: none;
  border-radius: var(--r-lg);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: -0.01em;
  box-shadow: 0 2px 8px rgba(22,163,74,0.25), inset 0 1px 0 rgba(255,255,255,0.12);
  transition: background var(--t-fast), box-shadow var(--t-fast), transform 80ms ease;
  flex-shrink: 0;
}
.pe-generate-btn:hover {
  background: linear-gradient(180deg, #15803d, #166534);
  box-shadow: 0 4px 14px rgba(22,163,74,0.35), inset 0 1px 0 rgba(255,255,255,0.1);
}
.pe-generate-btn:active { transform: scale(0.98); }

.pe-stat-box {
  background: var(--ct-surface);
  border: 1px solid var(--ct-border);
  border-radius: var(--r-lg);
  padding: 14px;
  box-shadow: var(--ct-shadow);
}

.pe-stat-label {
  font-size: 10.5px;
  color: var(--ct-muted);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.pe-status-text {
  background: var(--ct-bg);
  border: 1px solid var(--ct-border);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  font-size: 12px;
  color: var(--ct-text);
  min-height: 36px;
}

.pe-count-big {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ct-text);
  letter-spacing: -0.04em;
}

.pe-count-unit {
  font-size: 12px;
  color: var(--ct-muted);
  margin-top: 2px;
}

/* =========================================
   Tasks 뷰 — 플래그 컬럼
   ========================================= */
.znt-table .col-flag {
  text-align: center;
  padding: 0 6px;
  white-space: nowrap;
}
.znt-table thead th.col-flag {
  text-align: center;
  padding: 9px 6px;
}
.znt-table .col-flag svg {
  display: block;
  margin: 0 auto;
}

/* 완료 행 처리 */
tr.ht-row-done td,
tr.gt-row-done td {
  color: var(--ct-muted);
}

/* =========================================
   모션 감소 (Accessibility)
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
