/* 사이드바 스크롤 */
      .w-60.h-screen { overflow-y:auto; }
      /* 필터 영역 컴팩트화 */
      ._filter-row { display:flex; gap:6px; align-items:end; flex-wrap:nowrap !important; }
      ._filter-row > .space-y-1 input,
      ._filter-row > .space-y-1 select { width:90px !important; min-width:0 !important; }
      ._filter-row > .space-y-1 input[placeholder="품목명"] { width:80px !important; }
      ._filter-row > .space-y-1 input[placeholder="시리즈"] { width:70px !important; }
      /* 다중선택 드롭다운 */
      ._ms { position:relative; display:inline-block; }
      ._ms-btn {
        height:32px; min-width:80px; max-width:140px; box-sizing:border-box;
        display:flex; align-items:center; justify-content:space-between; gap:4px;
        padding:0 8px; border-radius:6px;
        border:1px solid hsl(var(--input)); background:hsl(var(--background));
        font-size:12px; cursor:pointer; white-space:nowrap; overflow:hidden;
        color:hsl(var(--foreground)); user-select:none;
      }
      ._ms-btn:hover { border-color:hsl(var(--ring)); }
      ._ms-btn > span:first-child { overflow:hidden; text-overflow:ellipsis; }
      ._ms-btn ._arrow { font-size:8px; opacity:0.5; flex-shrink:0; margin-left:auto; }
      ._ms-panel {
        display:none; position:absolute; top:calc(100% + 4px); left:0; z-index:9999;
        padding:4px 0; min-width:200px; max-height:300px;
        overflow-y:auto; border-radius:8px;
        border:1px solid hsl(var(--border)); background:#fff;
        box-shadow:0 4px 20px rgba(0,0,0,0.18);
      }
      ._ms-panel.open { display:block; }
      ._ms-item {
        display:flex; align-items:center; gap:8px;
        padding:5px 12px; font-size:12px; cursor:pointer;
        white-space:nowrap; line-height:1.4; text-align:left;
      }
      ._ms-item:hover { background:hsl(var(--accent)); }
      ._ms-item input[type=checkbox] {
        flex-shrink:0; width:14px; height:14px; margin:0;
        accent-color:hsl(var(--primary)); cursor:pointer;
      }
      ._ms-actions {
        display:flex; gap:6px; padding:6px 12px;
        border-bottom:1px solid hsl(var(--border)); margin-bottom:2px;
      }
      ._ms-actions button {
        font-size:11px; padding:2px 8px; border-radius:4px; cursor:pointer;
        border:1px solid hsl(var(--border)); background:transparent; color:hsl(var(--foreground));
      }
      ._ms-actions button:hover { background:hsl(var(--accent)); }
      ._ms-badge {
        display:inline-flex; align-items:center; justify-content:center;
        min-width:16px; height:16px; border-radius:8px; font-size:10px; font-weight:600;
        background:hsl(var(--primary)); color:white; padding:0 4px; flex-shrink:0;
      }

      /* ── 모바일 반응형 ── */

      /* 햄버거 메뉴 버튼 */
      ._mob-hamburger {
        display:none; position:fixed; top:10px; left:10px; z-index:60;
        width:40px; height:40px; border-radius:10px; border:none;
        background:#2e2e2e; color:white; font-size:20px; cursor:pointer;
        align-items:center; justify-content:center;
        box-shadow:0 2px 8px rgba(0,0,0,0.2);
      }
      /* 사이드바 오버레이 */
      ._mob-overlay {
        display:none; position:fixed; inset:0; z-index:45;
        background:rgba(0,0,0,0.5); opacity:0; transition:opacity 0.3s;
      }
      ._mob-overlay.active { opacity:1; }

      @media (max-width: 768px) {
        /* 사이드바: 고정 오버레이로 전환 */
        .w-60.h-screen {
          position:fixed !important; left:-260px; top:0; z-index:50;
          width:240px !important; transition:left 0.3s ease;
          box-shadow:4px 0 20px rgba(0,0,0,0.3);
        }
        .w-60.h-screen._mob-open { left:0; }

        /* 햄버거 표시 */
        ._mob-hamburger { display:flex; }
        ._mob-overlay._mob-visible { display:block; }

        /* 메인 영역 전체폭 */
        .flex.h-screen { flex-direction:column !important; }
        .flex.h-screen > main { width:100% !important; padding-top:52px; }

        /* 대시보드: 4열 → 2열 */
        .grid.grid-cols-4 { grid-template-columns:repeat(2, 1fr) !important; }
        /* 3열 → 1열 */
        .grid.grid-cols-3 { grid-template-columns:1fr !important; }
        /* 2열 → 1열 */
        .grid.grid-cols-2 { grid-template-columns:1fr !important; }

        /* 필터 영역: wrap 허용 */
        ._filter-row { flex-wrap:wrap !important; gap:8px !important; }
        ._filter-row > .space-y-1 input,
        ._filter-row > .space-y-1 select { width:auto !important; min-width:70px !important; flex:1; }

        /* 테이블: 가로 스크롤 개선 */
        .relative.w-full.overflow-x-auto { -webkit-overflow-scrolling:touch; }
        /* 테이블 덜 중요한 컬럼 숨김 — 6번째 이후 */
        table th:nth-child(n+7), table td:nth-child(n+7) { display:none; }
        /* 테이블 폰트 축소 */
        table { font-size:11px !important; }
        table th, table td { padding:6px 8px !important; }

        /* 코드 전환 페이지: 버튼 영역 wrap */
        #_tp_root { padding:16px 12px !important; }
        #_tp_root > div:nth-child(2) { flex-wrap:wrap !important; gap:8px !important; }
        /* 코드 전환 검색 입력 폭 */
        #_tp_q { width:100% !important; }
        /* 코드 전환 필터+검색 행 세로 배치 */
        #_tp_root > div:nth-child(4) { flex-wrap:wrap !important; }

        /* 등록 모달: 전체폭 */
        #_tp_mbg > div { width:calc(100vw - 32px) !important; max-height:85vh !important; padding:16px !important; }

        /* 카드 내 텍스트 축소 */
        .text-2xl { font-size:1.25rem !important; }
        .text-xl { font-size:1.1rem !important; }

        /* PageHeader 여백 조정 */
        .flex-1.flex.flex-col.overflow-hidden > div:first-child { padding-left:48px !important; }

        /* max-w-7xl 해제 */
        .max-w-7xl { max-width:100% !important; padding-left:8px !important; padding-right:8px !important; }

        /* 다중선택 패널: 모바일 위치 조정 */
        ._ms-panel { position:fixed !important; left:8px !important; right:8px !important; top:auto !important; bottom:60px !important; min-width:auto !important; max-height:50vh !important; }
      }

      @media (max-width: 480px) {
        /* 초소형: 4열 → 1열 */
        .grid.grid-cols-4 { grid-template-columns:1fr !important; }
        /* 테이블 5번째 이후 숨김 */
        table th:nth-child(n+5), table td:nth-child(n+5) { display:none; }
      }

._nt-page { padding:24px; max-width:1200px; margin:0 auto; overflow-y:auto; flex:1; }
      ._nt-header { display:flex; align-items:center; gap:12px; margin-bottom:20px; }
      ._nt-tabs { display:flex; gap:0; border-bottom:1px solid #e5e7eb; margin-bottom:16px; }
      ._nt-tab { padding:8px 16px; font-size:13px; cursor:pointer; border:none; background:none; border-bottom:2px solid transparent; color:#888; font-weight:400; }
      ._nt-tab.active { border-bottom-color:#dc2626; color:#111; font-weight:600; }
      ._nt-toolbar { display:flex; gap:8px; align-items:center; margin-bottom:16px; flex-wrap:wrap; }
      ._nt-btn { height:32px; padding:0 12px; border-radius:6px; font-size:12px; cursor:pointer; border:1px solid #d1d5db; background:white; color:#555; display:inline-flex; align-items:center; gap:4px; }
      ._nt-btn:hover { border-color:#9ca3af; }
      ._nt-btn-primary { border:none; background:#dc2626; color:white; font-weight:500; }
      ._nt-btn-primary:hover { background:#b91c1c; }
      ._nt-table { width:100%; border-collapse:collapse; font-size:13px; }
      ._nt-table th { text-align:left; padding:8px 12px; font-size:11px; font-weight:600; color:#888; border-bottom:1px solid #e5e7eb; }
      ._nt-table td { padding:10px 12px; border-bottom:1px solid #f1f5f9; }
      ._nt-table tr:hover { background:#f8f9fa; }
      ._nt-badge { display:inline-block; padding:2px 8px; border-radius:10px; font-size:11px; }
      ._nt-badge-pending { background:#fef3c7; color:#92400e; }
      ._nt-badge-matched { background:#dcfce7; color:#166534; }
      ._nt-badge-dismissed { background:#f3f4f6; color:#6b7280; }
      ._nt-empty { text-align:center; padding:40px; color:#888; }
      ._nt-upload-zone { border:2px dashed #d1d5db; border-radius:12px; padding:32px; text-align:center; cursor:pointer; transition:border-color 0.2s; }
      ._nt-upload-zone:hover { border-color:#9ca3af; }
      ._nt-upload-zone.dragover { border-color:#dc2626; background:#fef2f2; }
      @media (max-width:768px) {
        ._nt-page { padding:16px 12px; }
        ._nt-toolbar { flex-direction:column; align-items:stretch; }
        ._nt-table th:nth-child(n+5), ._nt-table td:nth-child(n+5) { display:none; }
      }

._memo-slot { margin-top:8px; }
      ._memo-box { display:flex; align-items:flex-start; gap:6px; }
      ._memo-box textarea {
        flex:1; min-height:32px; max-height:120px; padding:6px 8px;
        border:1px solid hsl(var(--border)); border-radius:6px;
        font-size:12px; line-height:1.5; resize:vertical;
        background:hsl(var(--background)); color:hsl(var(--foreground));
      }
      ._memo-box textarea:focus { outline:none; border-color:hsl(var(--ring)); }
      ._memo-box button {
        padding:6px 10px; border-radius:6px; font-size:11px; font-weight:500;
        cursor:pointer; white-space:nowrap; border:none;
      }
      ._memo-save { background:#3b82f6; color:#fff; }
      ._memo-save:hover { background:#2563eb; }
      ._memo-save:disabled { opacity:0.5; cursor:not-allowed; }
      ._memo-display {
        display:flex; align-items:center; gap:6px;
        padding:5px 8px; border-radius:6px;
        background:#eff6ff; border:1px solid #bfdbfe;
        font-size:12px; color:#1e40af; cursor:pointer;
      }
      ._memo-display:hover { background:#dbeafe; }
      ._memo-label { font-size:10px; color:#64748b; font-weight:500; }
      ._memo-add {
        display:inline-flex; align-items:center; gap:4px;
        padding:3px 8px; border-radius:4px; font-size:11px;
        color:#94a3b8; cursor:pointer; border:1px dashed #cbd5e1;
        background:transparent;
      }
      ._memo-add:hover { color:#3b82f6; border-color:#3b82f6; background:#f8fafc; }

._ch-overlay { position:fixed; inset:0; z-index:300; background:rgba(0,0,0,0.4); display:flex; align-items:center; justify-content:center; }
      ._ch-modal { background:white; border-radius:12px; width:720px; max-width:90vw; max-height:80vh; display:flex; flex-direction:column; box-shadow:0 20px 60px rgba(0,0,0,0.3); }
      ._ch-header { display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid #e5e7eb; }
      ._ch-header h3 { font-size:15px; font-weight:700; margin:0; }
      ._ch-header .sub { font-size:12px; color:#888; margin-top:2px; }
      ._ch-close { width:28px; height:28px; border-radius:6px; border:none; background:#f1f5f9; color:#64748b; cursor:pointer; font-size:16px; display:flex; align-items:center; justify-content:center; }
      ._ch-close:hover { background:#e2e8f0; }
      ._ch-body { flex:1; overflow-y:auto; padding:16px 20px; }
      ._ch-empty { text-align:center; padding:40px; color:#888; font-size:13px; }
      ._ch-item { padding:10px 12px; border-bottom:1px solid #f1f5f9; font-size:12px; }
      ._ch-item:last-child { border-bottom:none; }
      ._ch-item .date { color:#888; font-size:11px; }
      ._ch-item .type { display:inline-block; padding:1px 6px; border-radius:4px; font-size:10px; font-weight:600; margin-left:6px; }
      ._ch-item .type-new { background:#dcfce7; color:#166534; }
      ._ch-item .type-mod { background:#fef3c7; color:#92400e; }
      ._ch-item .type-del { background:#fee2e2; color:#991b1b; }
      ._ch-item .cols { margin-top:4px; color:#555; font-size:12px; }
      ._ch-diff { margin-top:6px; background:#f8fafc; border-radius:6px; padding:8px 10px; border:1px solid #e2e8f0; }
      ._ch-diff-row { display:flex; gap:8px; align-items:baseline; padding:3px 0; font-size:11px; border-bottom:1px solid #f1f5f9; }
      ._ch-diff-row:last-child { border-bottom:none; }
      ._ch-diff-field { font-weight:600; color:#475569; min-width:100px; flex-shrink:0; }
      ._ch-diff-old { color:#dc2626; text-decoration:line-through; }
      ._ch-diff-new { color:#16a34a; font-weight:500; }
      ._ch-diff-arrow { color:#94a3b8; flex-shrink:0; }
      ._ch-item .memo-line { margin-top:4px; color:#1e40af; font-size:11px; }
      ._ch-link { color:#2563eb; cursor:pointer; text-decoration:underline; }
      ._ch-link:hover { color:#1d4ed8; }

