/**
 * JCT 플랫폼 공통 스타일
 * - 초기 로딩 인디케이터, 페이드인, 로딩 중 스크롤 방지
 * - 모바일에서 상단 헤더가 오버레이/드로어에 가리지 않도록 z-index 보장
 * - 폼 필드 표준: form-input, form-select (디자인 가이드 3.1)
 * - 모달 본인확인 비밀번호: .jct-modal-pw-* (플랫폼 규정 3절, common.js init/reset)
 * - 테이블 가로 스크롤: 모바일에서 min-w 테이블 스크롤바 스타일
 * - Mac/Windows 렌더링 통일: appearance, box-sizing, leading, font-smoothing
 */

@import url('/assets/css/jct-lang-flag.css?v=20260716a');
@import url('/assets/css/jct-file-image-upload-modal.css?v=20260716a');

/* 외부 폰트 의존 제거: 시스템 폰트 스택 우선 */

/* 1. 박스 모델 통일: 레이아웃 계산 오류 방지 */
*, *::before, *::after {
    box-sizing: border-box;
}

/* 2. 폰트 렌더링 통일: 맥/윈도우 글자 두께 차이 최소화 */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", "Noto Sans SC", "Noto Sans JP", system-ui, sans-serif;
}

/* 2.1 모바일 뷰포트: 푸터가 화면에 보이도록 실제 표시 영역 높이 사용 (iOS Safari 등에서 100vh가 주소창 포함해 커지는 문제 보정) */
body.h-screen {
    height: 100vh;
    height: 100dvh;
    min-height: 100dvh;
}

/* ===== Mac/Windows 크로스 플랫폼 렌더링 통일 ===== */
/* 3. Appearance 초기화: OS 기본 스타일 제거 (file, hidden, checkbox, radio, range 제외) */
button,
input:not([type="file"]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box;
    line-height: 1.5;
}

/* 테이블 overflow 컨테이너: 모바일 가로 스크롤 시 얇은 스크롤바 (클래스 custom-x-scroll 추가 시 적용) */
.custom-x-scroll::-webkit-scrollbar { height: 6px; }
.custom-x-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-x-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.custom-x-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ===== 폼 필드 Tier A (auth/login) — .form-input / .form-select / .jct-field / .jct-select
 * 높이 2.75rem · radius 0.5rem · 14px · padding 0 1rem · border #9eabb9
 * 로그인 등 공개 auth 화면: 컨테이너 .jct-form-auth + 본 클래스 사용 (pay-pages와 병행 시 Tier A 유지)
 * ===== */
.form-input,
.form-select,
.jct-field,
.jct-select {
    display: block;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    height: 2.75rem;
    min-height: 2.75rem;
    padding: 0 1rem;
    line-height: 1.5;
    border-radius: 0.5rem;
    border: 1px solid #9eabb9;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.875rem;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.form-input::placeholder,
.jct-field::placeholder { color: #94a3b8; }
textarea.form-input,
textarea.jct-field { min-height: 4rem; padding-top: 0.75rem; padding-bottom: 0.75rem; resize: vertical; }
.form-input:focus,
.form-select:focus,
.jct-field:focus,
.jct-select:focus {
    outline: none;
    border-color: #2563eb;
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.375rem;
    letter-spacing: 0.025em;
}
.form-input:disabled,
.form-select:disabled,
.jct-field:disabled,
.jct-select:disabled {
    background-color: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    border-color: #9eabb9;
}

/* Select expand chevron (FA fa-chevron-down) — page-size / 나열개수 selects must not use these classes */
.jct-form-select-wrap {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
}
.jct-form-select-wrap--inline {
    display: inline-flex;
    align-items: center;
    width: auto;
    flex-shrink: 0;
}
.jct-form-select-wrap > select {
    width: 100%;
    padding-right: 1.75rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: none;
}
.jct-form-select-wrap--inline > select {
    width: auto;
}
.jct-form-select-wrap > select::-ms-expand {
    display: none;
}
.jct-form-select-wrap::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    color: #64748b;
    pointer-events: none;
    z-index: 1;
    line-height: 1;
}
.jct-form-select-wrap:has(> select:disabled)::after {
    color: #cbd5e1;
}
.floating-group > i.jct-form-select-chevron {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #64748b;
    font-size: 10px;
    line-height: 1;
    z-index: 1;
}
.floating-group:has(> select:disabled) > i.jct-form-select-chevron {
    color: #cbd5e1;
}
.floating-group > select.form-select:has(+ .floating-label + i.jct-form-select-chevron),
.floating-group > select.form-select:has(+ i.jct-form-select-chevron),
.floating-group > select.form-input-base:has(+ .floating-label + i.jct-form-select-chevron),
.floating-group > select.form-input-base:has(+ i.jct-form-select-chevron) {
    padding-right: 1.75rem;
}

/* 정렬 폼필드: 숫자 입력 시 화살표(스피너) 삭제 - 저해상도에서 일관된 디자인 */
.form-input[inputmode="numeric"]::-webkit-outer-spin-button,
.form-input[inputmode="numeric"]::-webkit-inner-spin-button,
.jct-field[inputmode="numeric"]::-webkit-outer-spin-button,
.jct-field[inputmode="numeric"]::-webkit-inner-spin-button,
.code-sort-input::-webkit-outer-spin-button,
.code-sort-input::-webkit-inner-spin-button,
.sort-input::-webkit-outer-spin-button,
.sort-input::-webkit-inner-spin-button,
.specialty-sort-input::-webkit-outer-spin-button,
.specialty-sort-input::-webkit-inner-spin-button,
.brand-sort-input::-webkit-outer-spin-button,
.brand-sort-input::-webkit-inner-spin-button,
.sort-order-input::-webkit-outer-spin-button,
.sort-order-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.form-input[inputmode="numeric"],
.jct-field[inputmode="numeric"] {
    -moz-appearance: textfield;
    appearance: textfield;
}
.code-sort-input,
.sort-input,
.specialty-sort-input,
.brand-sort-input,
.sort-order-input,
.partner-fee-number-input {
    -moz-appearance: textfield;
    appearance: textfield;
}
.code-sort-input,
.sort-input,
.specialty-sort-input,
.brand-sort-input,
.sort-order-input {
    text-align: center;
}
.partner-fee-number-input::-webkit-outer-spin-button,
.partner-fee-number-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 윈도우 저해상도: 폼 섹션 내 input 높이·테두리 강제 (디자인 가이드 3.6)
   - Tailwind 등과 충돌 시 !important로 우선 적용 */
.form-section-windows .form-input,
.form-section-windows input[type="text"].form-input,
.form-section-windows .jct-field,
.form-section-windows input[type="text"].jct-field {
    min-height: 2.75rem !important;
    height: 2.75rem !important;
    border: 1px solid #9eabb9 !important;
    background: #f8fafc !important;
    box-sizing: border-box !important;
}

/* 설명문(보조 문구): 폰트 크기·색상 규격 - 저해상도에서도 가독성 확보 */
.form-hint {
    font-size: 0.6875rem;
    line-height: 1.4;
    color: #475569;
    margin-top: 0.25rem;
}
.form-hint-warning {
    color: #b45309;
}

/* 리스트/테이블 빈 상태: 검색·필터 결과 없음 시 최소 5행 분량 여백 유지 (규정 6.6) */
.list-empty-state {
    min-height: 12.5rem;
    vertical-align: top;
}

/* Full-page catalog empty card (JCT_PAGE_EMPTY_STATE) */
.jct-page-empty-state {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-height: min(28rem, calc(100vh - 12rem));
    width: 100%;
    padding: 1.5rem 1rem;
    position: relative;
    z-index: 1;
}
.jct-page-empty-state.hidden {
    display: none !important;
}
.jct-page-empty-hide.hidden {
    display: none !important;
}
.jct-page-empty-state__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    max-width: 28rem;
    padding: 2.5rem 2rem;
    text-align: center;
}
.jct-page-empty-state__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 9999px;
    background: linear-gradient(145deg, #eff6ff 0%, #f8fafc 55%, #eef2ff 100%);
    border: 1px solid #dbeafe;
    color: #64748b;
    font-size: 1.65rem;
}
.jct-page-empty-state__message {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.5;
    color: #64748b;
    letter-spacing: -0.01em;
}
.jct-page-empty-state__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 2.25rem;
    margin-top: 0.25rem;
    padding: 0 1rem;
    border-radius: 0.5rem;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    font-size: 0.6875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.jct-page-empty-state__back:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
}
.jct-page-empty-state__back:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* partner/apply: 필수 입력 검증 실패 시 해당 섹션 강조 */
.partner-section-error {
    border-color: #dc2626 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

/* 개발자모드 DB 힌트: 운영 UI 방해 최소화 */
.dev-db-hint {
    font-size: 10px;
    line-height: 1.35;
    color: #94a3b8;
}
.dev-db-card {
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 6px 8px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}
.dev-db-table-row td {
    border-top: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 10px;
    line-height: 1.35;
    padding-top: 6px;
    padding-bottom: 6px;
}

/* 출력물에는 개발자모드 정보를 제외 */
@media print {
    .dev-db-hint,
    .dev-db-card,
    .dev-db-table-row {
        display: none !important;
    }
}

.form-select,
.jct-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.25rem;
}

/* 버튼 표준 (setting/product_categories 기준, 디자인 가이드 §5)
   - Mac/Windows 폰트 렌더링 차이: min-height + py 조합으로 클리핑 방지
   - whitespace-nowrap: 텍스트 줄바꿈으로 레이아웃 밀림 방지 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box;
    line-height: 1.5;
}
.btn-md { min-height: 2.75rem; padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-sm { min-height: 2rem; padding: 0.375rem 0.75rem; font-size: 0.75rem; font-weight: 700; }
.btn-xs { min-height: 1.75rem; padding: 0.25rem 0.5rem; font-size: 10px; font-weight: 700; }
.btn-icon { min-height: 2rem; min-width: 2rem; height: 2rem; width: 2rem; padding: 0; }
.btn-flex-1 { flex: 1; }

.btn-primary { background: #4f46e5; color: #fff; }
.btn-primary:hover { background: #4338ca; }
.btn-secondary { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.btn-secondary:hover { background: #e2e8f0; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-toolbar { background: #fff; color: #334155; border: 1px solid #e2e8f0; }
.btn-toolbar:hover { background: #f8fafc; }
.btn-toolbar-primary { background: #4f46e5; color: #fff; border: 1px solid #818cf8; }
.btn-toolbar-primary:hover { background: #4338ca; }
.btn-row-edit,
.btn-row-delete,
.btn-row-child,
a.btn-row-edit,
a.btn-row-child {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem 0.4rem;
    border-radius: 0.375rem;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
}
.btn-row-edit,
.btn-row-delete,
a.btn-row-edit {
    color: #475569;
    border: 1px solid #cbd5e1;
    background: #fff;
}
.btn-row-edit:hover,
a.btn-row-edit:hover {
    color: #2563eb;
    background: #eff6ff;
    border-color: #bfdbfe;
}
.btn-row-delete:hover {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}
.btn-row-child,
a.btn-row-child {
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    background: #fff;
}
.btn-row-child:hover,
a.btn-row-child:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

body:has(#jct-initial-loader) {
    overflow: hidden;
}
#layout-header {
    position: relative;
    z-index: 110;
    flex-shrink: 0;
    min-height: 3.5rem;
}
#header-tools-area {
    flex-shrink: 0;
    overflow: visible;
}
#header-avatar-wrap {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
#header-avatar-img:not(.hidden) {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#header-avatar-initial:not(.hidden) {
    display: block;
    line-height: 1;
}
#jct-initial-loader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.96);
    z-index: 9999;
    transition: opacity 0.2s ease;
}
#jct-initial-loader .bar {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
    animation: jct-loader-pulse 1s ease-in-out infinite;
}
.jct-initial-loader-card {
    width: min(26rem, calc(100vw - 2rem));
    padding: 1.2rem 1.25rem 1.15rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
    text-align: center;
    box-sizing: border-box;
}
.jct-initial-loader-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.22rem;
    margin: 0 0 0.7rem;
}
.jct-initial-loader-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.35rem;
    background: #eef2ff;
    color: #6366f1;
    font-size: 12px;
    font-weight: 800;
    animation: jct-initial-loader-letter-pulse 1.2s ease-in-out infinite;
}
.jct-initial-loader-letter:nth-child(2) { animation-delay: 0.12s; }
.jct-initial-loader-letter:nth-child(3) { animation-delay: 0.24s; }
@keyframes jct-initial-loader-letter-pulse {
    0%, 100% { opacity: 0.45; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-1px); }
}
.jct-initial-loader-msg {
    margin: 0 0 0.85rem;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    line-height: 1.4;
}
.jct-initial-loader-row {
    display: flex;
    align-items: center;
}
.jct-initial-loader-track {
    flex: 1 1 auto;
    height: 0.4rem;
    border-radius: 9999px;
    background: #e2e8f0;
    overflow: hidden;
}
.jct-initial-loader-fill {
    height: 100%;
    width: 42%;
    border-radius: 9999px;
    background: #6366f1;
    animation: jct-initial-loader-indeterminate 1.25s ease-in-out infinite;
}
@keyframes jct-initial-loader-indeterminate {
    0% { transform: translateX(-120%); width: 36%; }
    50% { width: 52%; }
    100% { transform: translateX(280%); width: 36%; }
}
.jct-initial-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}
.jct-initial-loader-subtext {
    margin: 0;
    max-width: 22rem;
    padding: 0 1rem;
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.04em;
    text-align: center;
    line-height: 1.45;
}
.jct-initial-loader-subtext:empty {
    display: none;
}
@keyframes jct-loader-pulse {
    0%, 100% { opacity: 0.6; transform: scaleX(0.9); }
    50% { opacity: 1; transform: scaleX(1); }
}
.fade-in { animation: jct-fade-in 0.3s ease-out; }
@keyframes jct-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== 폼 필드 Tier B (앱 컴팩트) — .jct-form-compact + pay-pages =====
 * 사용: 폼 컨테이너에 .jct-form-compact · .form-input-base / .form-select 동일 높이 2rem
 * border #9eabb9 · radius 0.375rem · 12px · padding 0 0.75rem
 * 로그인 외 등록·설정·공지·pay 목록 폼 전반
 */
.jct-form-compact .form-input-base {
    width: 100%;
    padding: 0 0.75rem;
    background-color: #fff;
    border: 1px solid #9eabb9;
    border-radius: 0.375rem;
    font-size: 12px;
    transition: all 0.2s;
    display: block;
    color: #1e293b;
    box-sizing: border-box;
}
.jct-form-compact .form-input-base:focus {
    outline: none;
    border-color: #2563eb;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.jct-form-compact .h-md,
.jct-form-compact .form-input-base.h-md {
    height: 2rem;
    min-height: 2rem;
    font-size: 12px;
}
.jct-form-compact .floating-group {
    position: relative;
    width: 100%;
    overflow: visible;
}
.jct-form-compact .floating-group > .form-input-base,
.jct-form-compact .floating-group > .form-select,
.jct-form-compact .floating-group > select.form-select {
    position: relative;
    z-index: 0;
}
.jct-form-compact .floating-label {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 400;
    color: #64748b;
    pointer-events: none;
    transition: all 0.2s;
    z-index: 2;
    padding: 0 4px;
    background-color: transparent;
}
.jct-form-compact .form-input-base:focus + .floating-label,
.jct-form-compact .form-input-base:not(:placeholder-shown) + .floating-label {
    top: 0;
    transform: translateY(-50%) scale(0.85);
    background-color: #fff;
    color: #2563eb;
    font-weight: 600;
    left: 0.5rem;
    margin-left: -4px;
}
.jct-form-compact textarea.form-input-base + .floating-label { top: 1rem; transform: none; }
.jct-form-compact textarea.form-input-base:focus + .floating-label,
.jct-form-compact textarea.form-input-base:not(:placeholder-shown) + .floating-label {
    top: 0; transform: translateY(-50%) scale(0.85); background-color: #fff; color: #2563eb; left: 0.5rem;
}
.jct-form-compact .form-select {
    width: 100%;
    height: 2rem;
    min-height: 2rem;
    padding: 0 0.75rem;
    padding-right: 2rem;
    background-color: #fff;
    border: 1px solid #9eabb9;
    border-radius: 0.375rem;
    font-size: 12px;
    box-sizing: border-box;
}
.jct-form-compact .form-select:focus {
    outline: none;
    border-color: #2563eb;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
/* Tier A: pay-pages 병행 페이지에서 auth 폼만 대형 필드 유지 */
.jct-form-auth .form-input,
.jct-form-auth .form-select,
.jct-form-auth .jct-field,
.jct-form-auth .jct-select,
.jct-form-auth .form-input-base {
    height: 2.75rem;
    min-height: 2.75rem;
    padding: 0 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #0f172a;
    border: 1px solid #9eabb9;
    background: #f8fafc;
    box-sizing: border-box;
}
.jct-form-auth .form-input:focus,
.jct-form-auth .form-select:focus,
.jct-form-auth .jct-field:focus,
.jct-form-auth .jct-select:focus,
.jct-form-auth .form-input-base:focus {
    outline: none;
    border-color: #2563eb;
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.jct-form-compact .form-label-ext {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}
/* 폼·섹션 안내문: set_code/sku_product_group 등과 동일 타이포 (text-[10px] text-slate-500) */
.jct-form-hint-text {
    font-size: 10px;
    line-height: 1.45;
    color: #64748b;
}
p.jct-form-hint-text {
    margin: 0;
}

/* 인스턴스 설정(set_sys/instance) pill 토글 — sm · md · lg */
.sns-toggle {
    width: 20px;
    height: 12px;
    border-radius: 9999px;
    background: #cbd5e1;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    flex-shrink: 0;
    padding: 0;
}
.sns-toggle.on { background: #2563eb; }
.sns-toggle::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    left: 2px;
    bottom: 2px;
    transition: transform 0.2s;
}
.sns-toggle.on::after { transform: translateX(8px); }
.master-toggle-md {
    width: 30px;
    height: 18px;
    border-radius: 9999px;
    background: #cbd5e1;
    position: relative;
    cursor: pointer;
    border: none;
    flex-shrink: 0;
    transition: background 0.2s;
    padding: 0;
}
.master-toggle-md.on { background: #2563eb; }
.master-toggle-md::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    left: 3px;
    bottom: 3px;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.master-toggle-md.on::after { transform: translateX(12px); }
.master-toggle {
    width: 40px;
    height: 24px;
    border-radius: 9999px;
    background: #cbd5e1;
    position: relative;
    cursor: pointer;
    border: none;
    flex-shrink: 0;
    transition: background 0.2s;
    padding: 0;
}
.master-toggle.on { background: #2563eb; }
.master-toggle::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    left: 4px;
    bottom: 4px;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.master-toggle.on::after { transform: translateX(16px); }
.maintenance-toggle.on { background: #dc2626; }

/**
 * Dev DB / 컬럼·vis_code 인라인 힌트 (Master + DEV_DB_COLUMN_INFO_VISIBLE)
 * — 플랫폼 규정 platform-rules.mdc §17.1. 신규 페이지는 수치·색 중복 정의 없이 본 클래스만 부여.
 */
.jct-dev-db-col-hint {
    font-size: calc(0.6875rem - 3px);
    font-weight: 500;
    color: #94a3b8;
}

/* ===== JCT 본문 타이포 공통 (8 roles, digital_reqs_clinic·entity_edit 파일럿 기준) =====
   1 jct-body-ro-label   읽기 전용 항목명(dt·인라인 라벨)
   2 jct-body-ro-value    읽기 전용 값(본문 데이터)
   3 jct-body-hint        안내문(본문) / jct-body-hint--sm 보조 한 단계 작게
   4 jct-body-section-title 카드 안 소제목(uppercase 11px, digital_reqs_clinic 섹션 h2와 동일)
   5 jct-body-emphasis    강조 한 줄(상태·요약)
   6 jct-body-empty       빈 값·플레이스홀더
   7 jct-body-meta        부가 메타(ID·코드 꼬리표)
   8 jct-body-link        문장 속 링크(플랫폼 규정 §16)
   보조: jct-body-card-heading(카드 상단 바 제목), jct-body-block-title(폼 블록 제목·대소문자 유지),
        jct-body-nav-anchor(인스턴스 빠른 이동 칩), jct-body-hint-panel(틴트 박스 본문) */
.jct-body-ro-label {
    font-size: 0.75rem;
    line-height: 1.5;
    font-weight: 400;
    color: #64748b;
}
.jct-body-ro-value {
    font-size: 0.75rem;
    line-height: 1.5;
    color: #1e293b;
    min-width: 0;
    word-break: break-word;
}
.jct-body-hint {
    font-size: 0.6875rem;
    line-height: 1.5;
    color: #64748b;
    margin: 0;
}
.jct-body-hint--sm {
    font-size: 10px;
    line-height: 1.45;
    color: #64748b;
    margin: 0;
}
.jct-body-hint--warning {
    color: #92400e;
}
p.jct-body-hint,
p.jct-body-hint--sm {
    margin-top: 0;
}
.jct-body-hint-panel {
    font-size: 0.875rem;
    line-height: 1.625;
    color: #334155;
    margin: 0;
}
.jct-body-section-title {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    color: #1e293b;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.jct-body-block-title {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    color: #1e293b;
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
}
.jct-body-card-heading {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.35;
    color: #1e293b;
}
.jct-body-emphasis {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.375;
    color: #2563eb;
}
.jct-body-empty {
    font-size: 0.75rem;
    color: #94a3b8;
}
.jct-body-meta {
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.5;
    color: #64748b;
}
.jct-body-link {
    color: #2563eb;
    font-weight: 500;
    text-decoration: underline;
}
.jct-body-link:hover {
    text-decoration: none;
}
.jct-body-nav-anchor {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.jct-body-nav-anchor:hover {
    border-color: #60a5fa;
    background: #eff6ff;
    color: #1d4ed8;
}
.jct-readonly-kv-row {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
    width: 100%;
}
@media (min-width: 640px) {
    .jct-readonly-kv-row {
        flex-direction: row;
        align-items: baseline;
        gap: 0.5rem;
    }
}

.jct-form-compact .section-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    position: relative;
    overflow: hidden;
}
.jct-form-compact .rule-title {
    font-size: 11px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.35rem;
}
.jct-form-compact .form-input-base.error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

/* ===== JCT 로딩 N안 (전환·풀스크린 대기, 플랫폼 규정 §3.4) ===== */
@keyframes jct-loading-n-spin {
    to { transform: rotate(360deg); }
}
@keyframes jct-loading-n-pop {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.06); opacity: 1; }
}
.jct-loading-n-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.jct-loading-n-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 15px solid #e0e7ff;
    border-top-color: #2563eb;
    animation: jct-loading-n-spin 1s linear infinite;
}
.jct-loading-n-letters {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 1px;
    align-items: center;
    justify-content: center;
}
.jct-loading-n-letter {
    display: inline-block;
    font-weight: 900;
    font-size: 1.05rem;
    color: #1e3a8a;
    animation: jct-loading-n-pop 0.9s ease-in-out infinite;
}
.jct-loading-n-letter:nth-child(1) { animation-delay: 0s; }
.jct-loading-n-letter:nth-child(2) { animation-delay: 0.12s; }
.jct-loading-n-letter:nth-child(3) { animation-delay: 0.24s; }

/* Dev-only: stable element keys for i18n / Cursor (Instance DEV_PAGE_ELEMENT_LABELS_VISIBLE + master policy) */
body.jct-dev-page-el-labels-on [data-jct-dev-el] {
    position: relative;
}
body.jct-dev-page-el-labels-on [data-jct-dev-el]::after {
    content: attr(data-jct-dev-el);
    position: absolute;
    top: 0.125rem;
    right: 0.25rem;
    z-index: 2;
    max-width: min(100%, 14rem);
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    border: 1px solid #cbd5e1;
    background: rgba(241, 245, 249, 0.96);
    color: #475569;
    font-size: 7px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.02em;
    pointer-events: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
/* guide/pros 의뢰 단계 셀: 전체 키 배지는 레이아웃을 가리므로 비활성 — 짧은 키는 .gr-step-dev-el-line 행에만 표시 */
body.jct-dev-page-el-labels-on #reqs-form-main-card .gr-step-toolbar .gr-step-cell[data-jct-dev-el]::after,
body.jct-dev-page-el-labels-on #guide-reqs-main-card .gr-step-toolbar .gr-step-cell[data-jct-dev-el]::after {
    content: none;
}
#reqs-form-main-card .gr-step-toolbar .gr-step-dev-el-line,
#guide-reqs-main-card .gr-step-toolbar .gr-step-dev-el-line {
    display: none;
    margin-top: 0.25rem;
    padding-top: 0.125rem;
    border-top: 1px dashed #e2e8f0;
    font-weight: 600;
    font-size: 8px;
    line-height: 1.35;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: #64748b;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
}

/* Sidebar sits in a row below #layout-header; avoid duplicate top offset (was md:top-14) and fill row height */
@media (min-width: 768px) {
    #layout-sidebar {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
}

/* ===== 모달·본인확인용 비밀번호 입력 (안전 비밀번호 / 계정 비밀번호) =====
 * 마크업·JS: 플랫폼 규정 §3 — JCT_COMMON.initModalSensitivePasswordFields(root)
 * 우측: 클리어(X) → 눈 아이콘(표시/숨김). 입력과 겹치지 않도록 padding-right 확보.
 */
.jct-modal-pw-wrap {
    position: relative;
    width: 100%;
}
.jct-modal-pw-wrap .jct-modal-pw-input {
    width: 100%;
    min-height: 2.25rem;
    height: 2.25rem;
    padding: 0 0.75rem;
    padding-right: 4.75rem;
    box-sizing: border-box;
    border: 1px solid #9eabb9;
    border-radius: 0.375rem;
    background: #f8fafc;
    font-size: 12px;
    color: #1e293b;
    line-height: 1.25;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.jct-modal-pw-wrap .jct-modal-pw-input:focus {
    outline: none;
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.jct-modal-pw-wrap .jct-modal-pw-clear {
    position: absolute;
    right: 2.35rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 0.25rem;
    cursor: pointer;
    z-index: 3;
}
.jct-modal-pw-wrap .jct-modal-pw-clear:hover {
    color: #0f172a;
    background: #e2e8f0;
}
.jct-modal-pw-wrap .jct-modal-pw-clear[hidden] {
    display: none !important;
}
.jct-modal-pw-wrap .jct-modal-pw-toggle {
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 0.25rem;
    cursor: pointer;
    z-index: 4;
}
.jct-modal-pw-wrap .jct-modal-pw-toggle:hover {
    color: #334155;
    background: #f1f5f9;
}

/* 업무 대화(service_chat): iPad/Safari 등에서 메시지 영역 스크롤·flex 높이 계산 보정 */
.svc-chat-message-scroll {
    box-sizing: border-box;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}
.svc-chat-body {
    -webkit-overflow-scrolling: touch;
    overflow-x: clip;
    overflow-y: auto;
}
@media (max-width: 1023px) {
    html:has(#svc-chat-root) body.svc-chat-body {
        overflow-x: clip;
        overflow-y: auto;
    }
}

/* 업무 대화(service_chat): iPad/Safari 뷰포트·flex 높이·가로 넘침 보정 */
html:has(#svc-chat-root) {
    min-height: 100%;
    overflow-x: clip;
    scrollbar-gutter: stable;
}
html:has(#svc-chat-root) body.svc-chat-body {
    min-height: 100dvh;
    min-height: -webkit-fill-available;
}
@media (min-width: 1024px) {
    html:has(#svc-chat-root) body.svc-chat-body {
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
    }
    html:has(#svc-chat-root) #svc-chat-root {
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
    }
    html:has(#svc-chat-root) #svc-chat-root > .flex.min-h-0 {
        min-height: 0;
        overflow: hidden;
    }
    html:has(#svc-chat-root) #main-content {
        overflow: hidden;
    }
    html:has(#svc-chat-root) #main-content > .mx-auto {
        overflow: hidden;
    }
    html:has(#svc-chat-root) .svc-chat-work-split-grid {
        flex: 1 1 0%;
        min-height: 0;
        height: auto;
        grid-template-rows: minmax(0, 1fr);
        align-items: stretch;
        overflow: hidden;
    }
    html:has(#svc-chat-root) .svc-chat-work-split-grid > * {
        min-height: 0;
    }
    html:has(#svc-chat-root) .svc-chat-room-list-column {
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    html:has(#svc-chat-root) #svc-chat-room-list.svc-chat-room-list-pane {
        flex: 1 1 0%;
        min-height: 0;
        overflow-x: auto;
        overflow-y: auto;
        max-height: none;
    }
    html:has(#svc-chat-root) .svc-chat-work-chat-pane.svc-chat-chat-column {
        position: static;
        top: auto;
        align-self: stretch;
        height: 100%;
        min-height: 0;
        max-height: 100%;
    }
}
#svc-chat-root {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}
/* 태블릿·데스크톱: 메시지 영역이 남는 세로 공간을 채우도록 고정 픽셀 높이 제거 */
#svc-chat-root #svc-chat-message-list.svc-chat-message-scroll {
    flex: 1 1 0%;
    -webkit-box-flex: 1;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
@media (max-width: 1023px) {
    #svc-chat-root #svc-chat-message-list.svc-chat-message-scroll {
        flex: 1 1 auto;
        min-height: min(42vh, 22rem);
    }
}
@media (min-width: 1024px) {
    #svc-chat-root #svc-chat-message-list.svc-chat-message-scroll {
        flex: 1 1 0%;
        min-height: 0;
    }
}
#svc-chat-root .svc-chat-chat-column {
    min-width: 0;
    max-width: 100%;
}
#svc-chat-root #svc-chat-composer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
#svc-chat-root #svc-chat-composer-inner > :first-child {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-self: stretch;
}
#svc-chat-root #svc-chat-composer-inner textarea#svc-chat-draft.svc-chat-draft-input,
#svc-chat-root #svc-chat-composer-inner textarea#svc-chat-draft {
    flex: 1 1 auto;
    min-height: 3.25rem;
}
#svc-chat-root #svc-chat-composer-inner > :last-child {
    align-self: stretch;
}
#svc-chat-root #svc-chat-composer-wrap {
    padding: 0.75rem;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
}

#svc-chat-root .svc-chat-msg-row {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
#svc-chat-root .svc-chat-msg-row--me {
    justify-content: flex-end;
}
#svc-chat-root .svc-chat-msg-row--them {
    justify-content: flex-start;
}
#svc-chat-root .svc-chat-msg-bubble {
    box-sizing: border-box;
    max-width: min(88%, 30rem);
    min-width: 0;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 0.5rem 0.625rem;
    font-size: 11px;
    line-height: 1.45;
    color: #1e293b;
    text-align: left;
}
#svc-chat-root .svc-chat-msg-bubble--me {
    border-color: #bfdbfe;
    background: #eff6ff;
}
#svc-chat-root .svc-chat-msg-bubble-body {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}
#svc-chat-root .svc-chat-msg-bubble-meta {
    margin: 0.25rem 0 0;
    font-size: 10px;
    color: #64748b;
}
#svc-chat-root .svc-chat-day-sep {
    display: flex;
    justify-content: center;
    margin: 0.5rem 0;
}

#svc-chat-root .svc-chat-room-list-loading {
    width: 72px;
    height: 72px;
}
#svc-chat-root .svc-chat-room-list-loading .jct-loading-n-ring {
    border-width: 9px;
}
#svc-chat-root .svc-chat-room-list-loading .jct-loading-n-letter {
    font-size: 0.75rem;
}

#svc-chat-root .svc-chat-partner-room-table {
    table-layout: fixed;
    border-collapse: collapse;
}
#svc-chat-root .svc-chat-partner-room-table col.col-no { width: 2.25rem; }
#svc-chat-root .svc-chat-partner-room-table col.col-business { width: 18%; }
#svc-chat-root .svc-chat-partner-room-table col.col-client-ref { width: 4.75rem; }
#svc-chat-root .svc-chat-partner-room-table col.col-patient { width: 14%; }
#svc-chat-root .svc-chat-partner-room-table col.col-chart { width: 4.75rem; }
#svc-chat-root .svc-chat-partner-room-table col.col-performer { width: 14%; }
#svc-chat-root .svc-chat-partner-room-table col.col-requester { width: 18%; }
#svc-chat-root .svc-chat-partner-room-table--dual-party col.col-performer,
#svc-chat-root .svc-chat-partner-room-table--dual-party col.col-requester { width: 14%; }
#svc-chat-root .svc-chat-partner-room-table col.col-status { width: 12%; }
#svc-chat-root .svc-chat-partner-room-table col.col-last-chat { width: 4.75rem; }
#svc-chat-root .svc-chat-partner-room-table col.col-req-content { width: 4.5rem; }
#svc-chat-root .svc-chat-partner-room-table th,
#svc-chat-root .svc-chat-partner-room-table td {
    vertical-align: middle;
}
#svc-chat-root .svc-chat-partner-room-table tbody tr.svc-chat-partner-room-row td {
    border-bottom: 1px solid #e8edf2;
}
#svc-chat-root .svc-chat-partner-room-table tbody tr.svc-chat-partner-room-row:last-child td {
    border-bottom-color: #eef2f6;
}
#svc-chat-root .svc-chat-partner-room-table thead th {
    border-bottom: 1px solid #dbe3ec;
}
#svc-chat-root .svc-chat-partner-room-table .svc-chat-partner-room-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#svc-chat-root #svc-chat-room-list {
    min-width: 0;
    max-width: 100%;
}
#svc-chat-root .svc-chat-partner-room-row {
    cursor: pointer;
}
#svc-chat-root .svc-chat-partner-room-row--active,
#svc-chat-root .svc-chat-partner-room-row--active td {
    background-color: #dbeafe;
}
#svc-chat-root .svc-chat-partner-room-row--active:hover,
#svc-chat-root .svc-chat-partner-room-row--active:hover td {
    background-color: #dbeafe;
}
#svc-chat-root .svc-chat-partner-room-row:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}
@media (min-width: 1024px) {
    #svc-chat-root .svc-chat-chat-column:not(.svc-chat-work-chat-pane) {
        height: 100%;
        min-height: 0;
    }
}
#svc-chat-root .svc-chat-summary-header-row {
    align-items: center;
}
#svc-chat-root #svc-chat-summary-title.flex {
    align-items: center;
}
#svc-chat-root #svc-chat-summary-title .fa-solid {
    display: block;
}

/* Home list row relation tooltip */
.jct-home-tip-bubble {
    position: fixed;
    white-space: nowrap;
    background: #1e293b;
    color: #fff;
    font-size: 11px;
    line-height: 1.4;
    padding: 4px 10px;
    border-radius: 6px;
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.12s;
}
.jct-home-tip-bubble.jct-home-tip-visible {
    opacity: 1;
}

/* Clipboard copy icon button — 주체 정보 모달·프로필 미리보기 등 (platform-rules-frontend §6.4a) */
.jct-copy-btn,
.jct-subj-copy-btn,
.pel-subject-copy-btn,
.jct-pex-copy-btn,
.idv-ctr-admin-copy-btn {
    border-color: #e2e8f0;
    color: #cbd5e1;
    background-color: #fff;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.jct-copy-btn:hover,
.jct-subj-copy-btn:hover,
.pel-subject-copy-btn:hover,
.jct-pex-copy-btn:hover,
.idv-ctr-admin-copy-btn:hover {
    color: #3b82f6;
    border-color: #bfdbfe;
    background-color: #fff;
}
.jct-copy-btn:focus-visible,
.jct-subj-copy-btn:focus-visible,
.pel-subject-copy-btn:focus-visible,
.jct-pex-copy-btn:focus-visible,
.idv-ctr-admin-copy-btn:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 1px;
}
.jct-copy-btn i,
.jct-subj-copy-btn i,
.pel-subject-copy-btn i,
.jct-pex-copy-btn i,
.idv-ctr-admin-copy-btn i {
    color: inherit;
}

/* Inline body text links — list·inbox·dashboard table cells (hover underline only) */
a.jct-inline-text-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
a.jct-inline-text-link:hover,
a.jct-inline-text-link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Chip·icon·button-shaped links — no underline (exceptions to jct-inline-text-link) */
a.jct-link-plain,
a.jct-link-plain:hover,
a.jct-link-plain:focus-visible {
    text-decoration: none !important;
    color: inherit;
}

/* Subject name (requester/performer) list truncation + float tip */
.jct-subject-name-trunc {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
    vertical-align: middle;
    cursor: default;
}
a .jct-subject-name-trunc {
    cursor: pointer;
}
a:has(.jct-subject-name-trunc) {
    cursor: pointer;
}
.jct-subject-name-float-tip {
    position: fixed;
    z-index: 10050;
    max-width: min(24rem, calc(100vw - 1rem));
    padding: 0.35rem 0.55rem;
    border-radius: 0.35rem;
    background: #16a34a;
    color: #fff;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.35;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}
.jct-subject-name-float-tip.hidden {
    display: none;
}

/* D-day / D-N suffix spacing after dates (all pages) */
.idv-surg-hope-dn,
.idv-list-surg-dn,
.grl-wish-date-dn,
.cro-wish-date-dn,
.reqs-ck-wish-date-dn,
.ddb-dash-dday {
    margin-left: 0.25em;
}

/* List row hover — canonical tokens (dashboard · reqs_list · invite · partner lists) */
:root {
    --jct-list-row-h: 40px;
    --jct-list-row-hover-bg: #f1f5f9;
    --jct-list-row-hover-bg-invite: #fef9c3;
    --jct-float-tip-z: 10040;
    --jct-float-tip-row-z: 10030;
    --jct-page-modal-z: 10150;
    --jct-page-modal-tip-z: 10160;
}

/* Full-page modals — above list float tips (--jct-float-tip-z) */
.jct-page-modal-overlay,
#popup-ref-item.ref-item-modal-overlay {
    z-index: var(--jct-page-modal-z) !important;
    isolation: isolate;
}

.jct-page-modal-overlay > :first-child,
#popup-ref-item .ref-item-modal-panel {
    position: relative;
    z-index: 1;
    background: #fff;
}

.jct-page-modal-sub-overlay,
#popup-ref-item-quick.ref-item-quick-overlay {
    z-index: calc(var(--jct-page-modal-z) + 10) !important;
    isolation: isolate;
}

.jct-ref-item-excel-modal-overlay {
    z-index: calc(var(--jct-page-modal-z) + 20) !important;
    isolation: isolate;
}

/* Body floating tips — top stacking layer within page content */
[data-tip]:hover::after,
[data-tip]:hover::before,
.brand-list-cell-tip-wrap[data-list-tip]:hover::after,
.brand-list-cell-tip-wrap[data-list-tip]:hover::before,
.brand-exposure-priority-wrap[data-exposure-tip]:hover::after,
.brand-exposure-priority-wrap[data-exposure-tip]:hover::before {
    z-index: var(--jct-float-tip-z);
}

[data-tip]:hover,
.brand-list-cell-tip-wrap:hover,
.brand-exposure-priority-wrap:hover {
    z-index: var(--jct-float-tip-z);
}

tr:has([data-tip]:hover),
tr:has(.brand-list-cell-tip-wrap:hover),
tr:has(.brand-exposure-priority-wrap:hover),
.pro-cat-hierarchy-tree-item:has([data-tip]:hover),
.pro-cat-hierarchy-tree-row:has([data-tip]:hover),
.pro-cat-hierarchy-tree-value:has([data-tip]:hover),
.pro-cat-hierarchy-tree-value-actions:has([data-tip]:hover),
.spec-group-saved-specs-cell:has(.brand-list-cell-tip-wrap:hover) {
    position: relative;
    z-index: var(--jct-float-tip-row-z);
}

tr:has([data-tip]:hover) td,
tr:has(.brand-list-cell-tip-wrap:hover) td,
.pro-cat-detail-hierarchy-tree-wrap:has([data-tip]:hover),
.pro-cat-detail-hierarchy-tree-wrap:has(.brand-list-cell-tip-wrap:hover),
.jct-list-table-inset:has([data-tip]:hover),
.jct-list-table-inset:has(.brand-list-cell-tip-wrap:hover) {
    overflow: visible;
}

body.jct-page-modal-open #main-content,
body.jct-ref-item-modal-open #main-content {
    overflow: hidden !important;
}

body.jct-page-modal-open #main-content [data-tip]:hover::after,
body.jct-page-modal-open #main-content [data-tip]:hover::before,
body.jct-page-modal-open #main-content .brand-list-cell-tip-wrap[data-list-tip]:hover::after,
body.jct-page-modal-open #main-content .brand-list-cell-tip-wrap[data-list-tip]:hover::before,
body.jct-page-modal-open #main-content .brand-exposure-priority-wrap[data-exposure-tip]:hover::after,
body.jct-page-modal-open #main-content .brand-exposure-priority-wrap[data-exposure-tip]:hover::before,
body.jct-ref-item-modal-open [data-tip]:hover::after,
body.jct-ref-item-modal-open [data-tip]:hover::before,
body.jct-ref-item-modal-open .brand-list-cell-tip-wrap[data-list-tip]:hover::after,
body.jct-ref-item-modal-open .brand-list-cell-tip-wrap[data-list-tip]:hover::before,
body.jct-ref-item-modal-open .brand-exposure-priority-wrap[data-exposure-tip]:hover::after,
body.jct-ref-item-modal-open .brand-exposure-priority-wrap[data-exposure-tip]:hover::before {
    display: none !important;
}

body.jct-page-modal-open #main-content [data-tip]:hover,
body.jct-page-modal-open #main-content .brand-list-cell-tip-wrap:hover,
body.jct-page-modal-open #main-content .brand-exposure-priority-wrap:hover,
body.jct-page-modal-open #main-content tr:has([data-tip]:hover),
body.jct-page-modal-open #main-content .pro-cat-hierarchy-tree-item:has([data-tip]:hover),
body.jct-page-modal-open #main-content .pro-cat-hierarchy-tree-row:has([data-tip]:hover),
body.jct-page-modal-open #main-content .pro-cat-hierarchy-tree-value:has([data-tip]:hover),
body.jct-page-modal-open #main-content .pro-cat-hierarchy-tree-value-actions:has([data-tip]:hover),
body.jct-ref-item-modal-open [data-tip]:hover,
body.jct-ref-item-modal-open .brand-list-cell-tip-wrap:hover,
body.jct-ref-item-modal-open .brand-exposure-priority-wrap:hover,
body.jct-ref-item-modal-open tr:has([data-tip]:hover),
body.jct-ref-item-modal-open .pro-cat-hierarchy-tree-item:has([data-tip]:hover),
body.jct-ref-item-modal-open .pro-cat-hierarchy-tree-row:has([data-tip]:hover),
body.jct-ref-item-modal-open .pro-cat-hierarchy-tree-value:has([data-tip]:hover),
body.jct-ref-item-modal-open .pro-cat-hierarchy-tree-value-actions:has([data-tip]:hover) {
    z-index: auto !important;
}

tbody tr.jct-list-row-hover:hover {
    background-color: var(--jct-list-row-hover-bg);
}

/* List column layout debug (classification-tree pages — toggle via JCT_LIST_COL_LAYOUT_DEBUG) */
table.jct-list-col-layout-debug-on {
    border-collapse: collapse;
}

table.jct-list-col-layout-debug-on thead th,
table.jct-list-col-layout-debug-on tbody td {
    border: 1px solid #94a3b8;
    box-shadow: none;
    box-sizing: border-box;
}

table.jct-list-col-layout-debug-on.jct-clf-tree tr[class*="tree-level-"] {
    border-bottom: none;
}

table.jct-list-col-layout-debug-on thead tr {
    border-bottom: none !important;
}

.jct-list-col-width-hint {
    font-size: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-variant-numeric: tabular-nums;
    color: #64748b;
    text-align: right;
    padding: 0.25rem 1.25rem 0;
    white-space: nowrap;
    overflow-x: auto;
    min-height: 1rem;
}

/* Classification-tree list toolbar — (전체펼침·전체접기) | (전체팝업·DB컬럼…) */
.jct-clf-toolbar-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    height: 2rem;
    min-height: 2rem;
    flex-shrink: 0;
    margin-left: auto;
}

.jct-clf-toolbar-right .jct-clf-toolbar-btn-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.jct-clf-toolbar-right .jct-clf-toolbar-btn-group .toolbar-btn {
    height: 2rem;
    min-height: 2rem;
}

/* Duplicate display name — yellow highlighter (numbered ref-item lists) */
.jct-dup-name-mark {
    background: linear-gradient(to bottom, transparent 18%, #fde047 18%, #fde047 78%, transparent 78%);
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    text-decoration: underline;
    text-decoration-color: #ca8a04;
    text-underline-offset: 0.12em;
}
