/* ── [ERP 이전] 일정·계약 · 셀팝업 · 첨부 CSS ── */
    #plannerModalBg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10000; align-items: center; justify-content: center; }
    #plannerModalBg.open { display: flex; }
    .pl-shell {
        width: 1240px; max-width: 96vw; min-width: 760px;
        height: 780px; max-height: 94vh; min-height: 480px;
        background: #fff; border-radius: 12px;
        box-shadow: 0 4px 24px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06);
        display: flex; flex-direction: column; overflow: hidden;
        resize: both;
    }
    /* [추가됨] 최대화 상태 — 화면 전체 (!important: 수동 리사이즈 인라인 크기 무시) */
    .pl-shell.maxed {
        width: 100vw !important; height: 100vh !important;
        max-width: 100vw !important; max-height: 100vh !important;
        border-radius: 0; resize: none;
    }
    .pl-topbar { height: 52px; padding: 0 24px; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; gap: 10px; flex-shrink: 0; white-space: nowrap; }
    .pl-topbar-title { font-weight: 700; font-size: 14px; color: #111827; }
    .pl-topbar-sep { color: #d1d5db; }
    .pl-topbar-sub { font-size: 13px; color: #6b7280; font-weight: 500; }
    .pl-topbar .spacer { flex: 1; }
    .pl-status { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 10px; display: none; }
    .pl-status.ok  { display: inline-block; background: #dcfce7; color: #166534; }
    .pl-status.err { display: inline-block; background: #fee2e2; color: #991b1b; }
    .btn-pl-close { border: 1px solid #d1d5db; border-radius: 6px; background: #fff; color: #6b7280; font-size: 12px; font-weight: 500; padding: 5px 14px; cursor: pointer; }

    .pl-tabs { display: flex; gap: 4px; padding: 8px 20px 0; background: #fff; border-bottom: 1px solid #e5e7eb; flex-shrink: 0; }
    .pl-tab {
        background: none; border: none; padding: 8px 16px;
        font-size: 13px; font-weight: 600; color: #6b7280;
        cursor: pointer; border-bottom: 2.5px solid transparent; font-family: 'Malgun Gothic';
    }
    .pl-tab.active { color: #1a5cba; border-bottom-color: #1a5cba; font-weight: 700; }

    .pl-pane { display: none; flex: 1; flex-direction: column; min-height: 0; background: #fafafa; }
    .pl-pane.active { display: flex; }

    .pl-toolbar {
        padding: 10px 20px; display: flex; align-items: center; gap: 8px;
        border-bottom: 1px solid #e5e7eb; background: #fff; flex-shrink: 0; flex-wrap: wrap;
    }
    .pl-month-title { font-size: 15px; font-weight: 700; color: #111827; min-width: 110px; text-align: center; }
    .btn-pl {
        border: 1px solid #d1d5db; background: #fff; color: #374151;
        border-radius: 6px; padding: 5px 12px; font-size: 12px; font-weight: 600;
        cursor: pointer; font-family: 'Malgun Gothic';
    }
    .btn-pl:hover { border-color: #1a5cba; color: #1a5cba; }
    .btn-pl.primary { background: #1a5cba; border-color: #1a5cba; color: #fff; }
    .btn-pl.primary:hover { background: #164a99; }
    .pl-toolbar .hint { font-size: 11px; color: #9ca3af; }
    .pl-toolbar .spacer { flex: 1; }
    .pl-sum { font-size: 12.5px; color: #374151; }
    .pl-sum b { color: #1a5cba; }

    .pl-table-wrap { flex: 1; min-height: 0; overflow: auto; padding: 12px 20px 20px; }
    .pl-table {
        width: 100%; border-collapse: separate; border-spacing: 0;
        background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
        font-size: 12.5px;
    }
    .pl-table th {
        background: #0b2a5c; color: #fff; padding: 8px 8px; text-align: center;
        font-size: 12px; font-weight: 700; white-space: nowrap;
        position: sticky; top: 0; z-index: 2;
        border-bottom: 1px solid #e5e7eb;
    }
    .pl-table td {
        padding: 0; border-bottom: 1px solid #f0f2f5; border-right: 1px solid #f5f6f8;
        vertical-align: middle;
    }
    .pl-table td.ro { padding: 5px 8px; text-align: center; color: #374151; white-space: nowrap; background: #fbfcfe; }
    /* [추가됨] 일정 탭 날짜 열(月/日/曜日) 볼드 */
    #plScheduleTable td.ro { font-weight: 700; }

    /* ── [추가됨] 멀티라인 셀 (textarea 자동 높이) ── */
    textarea.pl-cell {
        width: 100%; border: none; outline: none; background: transparent;
        padding: 6px 8px; font-size: 12.5px; font-family: 'Malgun Gothic'; color: #111827;
        box-sizing: border-box; resize: none; overflow: hidden;
        line-height: 1.45; display: block; min-height: 29px;
    }
    textarea.pl-cell:focus { background: #eef5ff; box-shadow: inset 0 0 0 1.5px #1a5cba; }
    textarea.pl-cell::placeholder { color: #d1d5db; }
    .pl-shell:not(.editing) textarea.pl-cell:focus { background: transparent; box-shadow: none; }
    textarea.pl-cell.fw-b { font-weight: 700; }
    textarea.pl-cell.fz-sm { font-size: 11px; }
    textarea.pl-cell.fz-lg { font-size: 14px; }
    textarea.pl-cell.fz-xl { font-size: 16px; }
    #plScheduleTable td, #plCustomTable td { vertical-align: top; }
    #plScheduleTable td.ro, #plCustomTable td.ro { vertical-align: middle; }

    /* ── [추가됨] 달력 모드 보기 ── */
    .pl-cal-wrap { flex: 1; min-height: 0; overflow: auto; padding: 0 20px 20px; }
    .pl-cal-month { margin-bottom: 22px; }
    .pl-cal-title { font-size: 15px; font-weight: 700; color: #0b2a5c; margin: 4px 2px 8px; }
    /* [수정됨] overflow:hidden 제거 — 스크롤 조상과 sticky 사이에 overflow가 있으면
       요일 헤더 고정이 무력화됨. 둥근 모서리는 모서리 셀에 개별 적용 */
    .pl-cal-grid {
        display: grid; grid-template-columns: 100px repeat(7, 1fr);
        border: 1px solid #d8dee9; border-radius: 8px; background: #fff;
    }
    .pl-cal-corner { border-top-left-radius: 7px; }
    .pl-cal-dow.sat { border-top-right-radius: 7px; border-right: none; }
    .pl-cal-grid > :last-child { border-bottom-right-radius: 7px; }
    .pl-cal-grid > :nth-last-child(8) { border-bottom-left-radius: 7px; }
    /* [수정됨] 요일 헤더 고정 — 스크롤해도 상단에 붙음 (표의 sticky 헤더와 동일) */
    .pl-cal-corner {
        background: #0b2a5c; border-right: 1px solid rgba(255,255,255,0.12);
        position: sticky; top: 0; z-index: 5;
    }
    .pl-cal-dow {
        background: #0b2a5c; color: #fff; text-align: center; font-size: 12px; font-weight: 700;
        padding: 7px 0; border-right: 1px solid rgba(255,255,255,0.12);
        position: sticky; top: 0; z-index: 5;
    }
    .pl-cal-dow.sun { color: #ffb1b1; }
    .pl-cal-dow.sat { color: #a9c8ff; }

    /* [수정됨] 달력 = 주당 5행(날짜숫자 + 카테고리 4행) 그리드 —
       같은 주의 같은 카테고리 행은 높이가 함께 늘어나 전체 텍스트 표시 + 라인 정렬 유지 */

    /* 주 라벨 (좌측 컬럼 각 행) — [수정됨] 카테고리 좌측 색바 + 밴드색 + 행 구분선 */
    .pl-cal-rowlbl {
        background: #f6f8fb; border-right: 1px solid #dde3ec;
        border-top: 1px solid #e3e9f1;                 /* 라벨 칸 구분선 */
        border-left: 4px solid transparent;            /* 카테고리 색바 자리 */
        font-size: 10px; font-weight: 700; text-align: right;
        padding: 2px 8px 2px 4px; display: flex; align-items: center; justify-content: flex-end;
        white-space: nowrap; overflow: hidden;
    }
    .pl-cal-rowlbl.wktop { border-top: 2px solid #cfd8e6; background: #eef2f8; }  /* 날짜행 라벨(주 경계 진하게) */
    .pl-cal-rowlbl.l-external { color: #b45309; border-left-color: #f59e0b; background: rgba(245,158,11,0.10); }
    .pl-cal-rowlbl.l-customer { color: #1d4ed8; border-left-color: #3b82f6; background: rgba(59,130,246,0.10); }
    .pl-cal-rowlbl.l-note     { color: #7e22ce; border-left-color: #a855f7; background: rgba(168,85,247,0.10); }
    .pl-cal-rowlbl.l-dev      { color: #15803d; border-left-color: #22c55e; background: rgba(34,197,94,0.10); }

    /* 날짜 숫자 행 */
    .pl-cd-num {
        background: #fff; border-right: 1px solid #eef1f6; border-top: 2px solid #dde3ec;
        font-size: 12px; font-weight: 700; color: #374151;
        padding: 3px 6px 1px;
    }
    .pl-cd-num.off { background: #fafbfd; }
    .pl-cd-num.sun { color: #dc2626; }
    .pl-cd-num.sat { color: #1d4ed8; }
    .pl-cd-num.tdY { background: #fff7e0; box-shadow: inset 0 2px 0 #f5c542; }

    /* 슬롯 셀 (그리드 칸) + 내부 칩 */
    .pl-sc {
        background: #fff; border-right: 1px solid #eef1f6;
        border-top: 1px solid #eef1f6;   /* [추가됨] 카테고리 행 구분선 */
        padding: 1px 3px;
    }
    /* [수정됨] 밴드(칸 전체) 연한 카테고리 색 — 내용이 없어도 2:2:2:4 밴드가 색으로 보이도록
       (칸 높이는 JS plCalSyncRatio 가 주 단위로 2:2:2:4 강제) */
    .pl-sc.bg-external { background: rgba(245, 158, 11, 0.07); }
    .pl-sc.bg-customer { background: rgba(59, 130, 246, 0.07); }
    .pl-sc.bg-dev      { background: rgba(34, 197, 94, 0.07); }
    .pl-sc.bg-note     { background: rgba(168, 85, 247, 0.07); }
    .pl-sc.off { background: #fafbfd; }        /* 이달 밖 칸 — 색 없음(뒤에 와서 밴드색 덮음) */
    .pl-sc.tdY { background: #fff7e0; }         /* 오늘 — 노랑 우선 */
    .pl-sc.lastline { padding-bottom: 3px; }

    .pl-slot {
        font-size: 11px; line-height: 1.4;
        padding: 2px 5px; border-radius: 4px; border-left: 3px solid transparent;
        white-space: pre-wrap; word-break: break-all;   /* ★말줄임 없이 전체 표시(줄바꿈) */
        box-sizing: border-box;
    }
    .pl-slot.fw-b { font-weight: 700; }
    /* 내용 있는 칸 = 진한 칩(좌측 색 보더) */
    .pl-slot.filled.sl-external { border-left-color: #f59e0b; background: #fff4e0; }
    .pl-slot.filled.sl-customer { border-left-color: #3b82f6; background: #e8f1fe; }
    .pl-slot.filled.sl-dev      { border-left-color: #22c55e; background: #e6f7ec; }
    .pl-slot.filled.sl-note     { border-left-color: #a855f7; background: #f3eafe; }
    .pl-cal-legend { display: flex; gap: 12px; align-items: center; font-size: 11px; color: #6b7280; margin: 0 2px 8px; }
    .pl-cal-legend .lg { display: inline-flex; align-items: center; gap: 4px; }
    .pl-cal-legend .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

    /* 표 보기로 이동 시 해당 날짜 행 강조 플래시 */
    @keyframes plRowFlash { 0% { background: #fff3bf; } 100% { background: transparent; } }
    #plScheduleTable tr.flash td { animation: plRowFlash 1.6s ease-out; }
    .pl-table tr.sat td.ro { color: #1d4ed8; }
    .pl-table tr.sun td.ro { color: #dc2626; }
    .pl-table tr.today td.ro { background: #fff7e0; font-weight: 700; }
    .pl-table tr.today { outline: 2px solid #f5c542; outline-offset: -2px; }
    .pl-table input.pl-cell {
        width: 100%; border: none; outline: none; background: transparent;
        padding: 6px 8px; font-size: 12.5px; font-family: 'Malgun Gothic'; color: #111827;
        box-sizing: border-box;
    }
    .pl-table input.pl-cell:focus { background: #eef5ff; box-shadow: inset 0 0 0 1.5px #1a5cba; }
    .pl-table input.pl-cell::placeholder { color: #d1d5db; }
    .pl-table td.num input.pl-cell { text-align: right; }
    .pl-table .btn-pl-del {
        background: none; border: 1px solid #e5e7eb; color: #9ca3af;
        border-radius: 4px; padding: 3px 8px; font-size: 11px; cursor: pointer; margin: 0 6px;
    }
    .pl-table .btn-pl-del:hover { border-color: #dc2626; color: #dc2626; }
    .pl-table tfoot td { padding: 8px; background: #f8fafc; font-weight: 700; border-top: 1px solid #e5e7eb; }

    /* ── [추가됨] 수정모드 게이트: editing 없으면 편집 전용 UI 숨김 ── */
    .pl-shell:not(.editing) .pl-editonly { display: none !important; }
    .pl-shell:not(.editing) .pl-cell { cursor: default; }
    .pl-shell:not(.editing) .pl-cell:focus { background: transparent; box-shadow: none; }
    .pl-shell.editing #btnPlEdit { background: #1a5cba; border-color: #1a5cba; color: #fff; }

    /* ── [추가됨] 셀 서식 툴바 ── */
    .pl-fmtbar {
        display: flex; align-items: center; gap: 6px; padding: 6px 20px;
        background: #fbfcfe; border-bottom: 1px solid #e5e7eb; flex-shrink: 0; flex-wrap: wrap;
    }
    .pl-fmtbar .lbl { font-size: 11px; color: #6b7280; font-weight: 700; }
    .pl-sw { width: 22px; height: 22px; border-radius: 5px; border: 1px solid #d1d5db; cursor: pointer; padding: 0; }
    .pl-sw:hover { transform: scale(1.15); border-color: #1a5cba; }
    .btn-fmt {
        border: 1px solid #d1d5db; background: #fff; color: #374151; border-radius: 5px;
        padding: 3px 9px; font-size: 12px; cursor: pointer; font-family: 'Malgun Gothic';
    }
    .btn-fmt:hover { border-color: #1a5cba; color: #1a5cba; }
    .pl-fmtbar select { border: 1px solid #d1d5db; border-radius: 5px; font-size: 12px; padding: 3px 6px; font-family: 'Malgun Gothic'; }
    .pl-fmtbar input[type="color"] { width: 28px; height: 24px; border: 1px solid #d1d5db; border-radius: 5px; padding: 1px 2px; cursor: pointer; background: #fff; }
    .pl-fmt-target { font-size: 11px; color: #9ca3af; margin-left: auto; }

    /* ── [추가됨] 일정 컬럼별 색 구분 (열 틴트) + 주 단위 밴딩(격주로 진하게) ── */
    .pl-table td.c-external { background: #fff8ee; }
    .pl-table td.c-customer { background: #f0f6ff; }
    .pl-table td.c-dev      { background: #f0faf3; }
    .pl-table td.c-note     { background: #faf6ff; }
    .pl-table tr.wkalt td.c-external { background: #fcecd6; }
    .pl-table tr.wkalt td.c-customer { background: #e0edfc; }
    .pl-table tr.wkalt td.c-dev      { background: #dff2e6; }
    .pl-table tr.wkalt td.c-note     { background: #f1e8fc; }
    .pl-table tr.wkalt td.ro         { background: #edf1f7; }
    /* [추가됨] 일정 표 = 고정 레이아웃 + 2:2:2:4 컬럼 비율 (외부:고객사:비고:개발)
       — 개발일정 내용이 많아도 다른 칸이 밀리지 않게 폭 고정. 날짜 3열은 px,
         내용 4열은 순수 % (18:18:18:36 = 2:2:2:4). ※calc(%+px)는 이 엔진에서 무시되므로 순수 % 사용 */
    #plScheduleTable { table-layout: fixed; }
    #plScheduleTable th.h-external,
    #plScheduleTable th.h-customer,
    #plScheduleTable th.h-note { width: 18%; }
    #plScheduleTable th.h-dev  { width: 36%; }
    .pl-table th.h-external { box-shadow: inset 0 -3px 0 #f59e0b; }
    .pl-table th.h-customer { box-shadow: inset 0 -3px 0 #3b82f6; }
    .pl-table th.h-dev      { box-shadow: inset 0 -3px 0 #22c55e; }
    .pl-table th.h-note     { box-shadow: inset 0 -3px 0 #a855f7; }

    /* 월 구분 밴드 (2~3개월 보기 시 월 경계 표시) */
    .pl-table tr.pl-msep td {
        background: #16407f; color: #fff; font-weight: 700; font-size: 12px;
        padding: 5px 12px; text-align: left; letter-spacing: 0.5px;
    }

    /* 셀 글자 서식 (fmt) */
    .pl-cell.fw-b { font-weight: 700; }
    .pl-cell.fz-sm { font-size: 11px; }
    .pl-cell.fz-lg { font-size: 14px; }
    .pl-cell.fz-xl { font-size: 16px; }

    /* ── [추가됨] 보기 개월 세그먼트 ── */
    .pl-view-seg { display: flex; border: 1px solid #d1d5db; border-radius: 6px; overflow: hidden; }
    .pl-view-seg button {
        border: none; background: #fff; padding: 5px 11px; font-size: 12px;
        cursor: pointer; font-family: 'Malgun Gothic'; color: #6b7280;
        border-right: 1px solid #e5e7eb;
    }
    .pl-view-seg button:last-child { border-right: none; }
    .pl-view-seg button.active { background: #1a5cba; color: #fff; font-weight: 700; }

    /* ── [추가됨] 커스텀 탭 (탭 관리 아이콘 · 소계 행) ── */
    .pl-tab .tabx {
        margin-left: 6px; color: #9ca3af; font-weight: 400; cursor: pointer; font-size: 11px;
    }
    .pl-tab .tabx:hover { color: #dc2626; }
    .pl-tab.pl-newtab { color: #1a5cba; font-weight: 700; }
    .pl-table th .colx { margin-left: 5px; color: rgba(255,255,255,.55); cursor: pointer; font-weight: 400; }
    .pl-table th .colx:hover { color: #ffb4b4; }
    .pl-table tr.subtotal td { background: #fef9c3 !important; font-weight: 700; border-top: 1px solid #f2dd9a; border-bottom: 1px solid #f2dd9a; }
    .pl-table tr.subtotal td.lab { color: #92400e; padding: 6px 8px; }

    /* ── [추가됨] 첨부파일 버튼/뱃지 ── */
    .btn-att {
        background: none; border: 1px solid #e5e7eb; color: #9ca3af;
        border-radius: 4px; padding: 3px 7px; font-size: 11px; cursor: pointer; white-space: nowrap;
    }
    .btn-att:hover { border-color: #1a5cba; color: #1a5cba; }
    .btn-att.has { color: #1a5cba; border-color: #b8ccec; background: #eef5ff; font-weight: 700; }
    .pl-table td.attc { text-align: center; vertical-align: middle !important; }
    .pl-att {
        font-size: 10px; margin-left: 6px; cursor: pointer; color: #b6bec9;
        font-weight: 400; vertical-align: 1px;
    }
    .pl-att.has { color: #1a5cba; font-weight: 700; }
    .pl-att:hover { color: #1a5cba; }

    /* ── [추가됨] 첨부파일 모달 (플래너 모달 위) ── */
    #plAttModalBg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 10002; align-items: center; justify-content: center; }
    #plAttModalBg.open { display: flex; }
    .pl-att-card {
        width: 600px; max-width: 94vw; max-height: 82vh;
        background: #fff; border-radius: 12px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        display: flex; flex-direction: column; overflow: hidden;
    }
    .pl-att-head {
        padding: 13px 20px; border-bottom: 1px solid #e5e7eb;
        display: flex; align-items: center; gap: 8px; flex-shrink: 0;
    }
    .pl-att-head b { font-size: 14px; color: #111827; }
    .pl-att-head .sub { font-size: 12px; color: #6b7280; }
    .pl-att-list { padding: 12px 16px 4px; overflow-y: auto; flex: 1; min-height: 110px; }
    .pl-att-row {
        display: flex; align-items: center; gap: 8px;
        padding: 8px 10px; border: 1px solid #eef1f6; border-radius: 8px;
        margin-bottom: 6px; font-size: 12.5px; background: #fbfcfe;
    }
    .pl-att-row .ic { font-size: 16px; }
    .pl-att-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: #111827; }
    .pl-att-row .meta { font-size: 11px; color: #9ca3af; white-space: nowrap; }
    .pl-att-empty { text-align: center; color: #9ca3af; font-size: 12.5px; padding: 30px 10px; }
    .pl-att-up {
        margin: 4px 16px 14px; padding: 16px; border: 2px dashed #cbd5e1; border-radius: 8px;
        text-align: center; cursor: pointer; font-size: 12px; color: #6b7280; transition: 0.15s; flex-shrink: 0;
    }
    .pl-att-up:hover, .pl-att-up.dragover { border-color: #1a5cba; background: #eef5ff; }
    .pl-att-msg { margin: 0 16px 10px; padding: 7px 10px; font-size: 12px; border-radius: 6px; display: none; flex-shrink: 0; }
    .pl-att-msg.show { display: block; }
    .pl-att-msg.ok { background: #dcfce7; color: #166534; }
    .pl-att-msg.err { background: #fee2e2; color: #991b1b; }
    .pl-att-msg.info { background: #dbeafe; color: #1e40af; }

    /* ── [추가됨] 셀 표시(조회) 스타일 — 클릭하면 입력/조회 팝업 ── */
    .pl-vc { cursor: pointer; }
    .pl-vc:hover { outline: 2px solid #b8ccec; outline-offset: -2px; }
    .pl-vtext {
        min-height: var(--pl-rowh, 26px); padding: 5px 8px; font-size: 12.5px; line-height: 1.45;
        white-space: pre-wrap; word-break: break-all; color: #111827;
        display: flex; flex-direction: column; justify-content: center;
    }
    .pl-vtext.fw-b { font-weight: 700; }
    .pl-vtext.fz-sm { font-size: 11px; }
    .pl-vtext.fz-lg { font-size: 14px; }
    .pl-vtext.fz-xl { font-size: 16px; }
    .pl-vatt {
        display: inline-block; font-size: 10px; color: #1a5cba; font-weight: 700;
        background: #eef5ff; border: 1px solid #b8ccec; border-radius: 8px;
        padding: 0 6px; margin: 0 8px 4px;
    }
    /* 달력 슬롯(표시형) 내부 배치 */
    .pl-slot .pl-vatt { margin: 1px 0 0; }
    /* 상단 서식바 — 커스텀 탭에서만 표시 (일정은 팝업 안에 서식 내장) */
    .pl-fmtbar.pane-hide { display: none !important; }

    /* ── [추가됨] 셀 입력/조회 팝업 — 이동(헤더 드래그) + 크기조절(우하단) ── */
    #plCellModalBg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.25); z-index: 10003; }
    #plCellModalBg.open { display: block; }
    .pl-ce-card {
        position: fixed; width: 620px; height: 560px;
        min-width: 420px; min-height: 380px; max-width: 96vw; max-height: 94vh;
        background: #fff; border-radius: 12px;
        box-shadow: 0 24px 70px rgba(0,0,0,0.35);
        display: flex; flex-direction: column; overflow: hidden;
        resize: both;
    }
    .pl-ce-head {
        padding: 12px 18px; border-bottom: 1px solid #e5e7eb; flex-shrink: 0;
        display: flex; align-items: center; gap: 8px; cursor: move;
        background: linear-gradient(90deg, #f8fafd, #eef3fa);
        user-select: none;
    }
    .pl-ce-head b { font-size: 14px; color: #0b2a5c; }
    .pl-ce-mode {
        font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
        background: #e5e7eb; color: #374151;
    }
    .pl-ce-mode.edit { background: #dbeafe; color: #1e40af; }
    .pl-ce-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 14px 18px 8px; overflow: auto; }
    #plCeText {
        flex: 1; min-height: 90px; width: 100%; box-sizing: border-box;
        border: 1px solid #d1d5db; border-radius: 8px; outline: none;
        padding: 10px 12px; font-family: 'Malgun Gothic'; font-size: 13px; line-height: 1.5;
        color: #111827; resize: none;
    }
    #plCeText:focus { border-color: #1a5cba; box-shadow: 0 0 0 2px rgba(26,92,186,0.12); }
    #plCeText[readonly] { background: #fafbfd; }
    #plCeText.fw-b { font-weight: 700; }
    #plCeText.fz-sm { font-size: 11px; }
    #plCeText.fz-lg { font-size: 15px; }
    #plCeText.fz-xl { font-size: 17px; }
    .pl-ce-fmt { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }
    .pl-ce-fmt .lbl { font-size: 11px; color: #6b7280; font-weight: 700; }
    .pl-ce-fmt .btn-fmt.on { background: #1a5cba; border-color: #1a5cba; color: #fff; }
    .pl-ce-att { flex-shrink: 0; border-top: 1px dashed #e5e7eb; padding-top: 8px; }
    .pl-ce-att .t { font-size: 12px; font-weight: 700; color: #374151; margin-bottom: 6px; }
    #plCeAttList { max-height: 150px; overflow-y: auto; }
    .pl-att-up.sm { margin: 6px 0 4px; padding: 10px; font-size: 11.5px; }
    .pl-ce-foot {
        padding: 10px 18px; border-top: 1px solid #e5e7eb; flex-shrink: 0;
        display: flex; justify-content: flex-end; gap: 8px; align-items: center;
    }
    .btn-ce-save {
        background: #1a5cba; color: #fff; border: none; border-radius: 6px;
        padding: 8px 22px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: 'Malgun Gothic';
    }
    .btn-ce-save:hover { background: #164a99; }

    /* ═══════════════ [추가됨] 모바일 반응형 (≤820px) ═══════════════
       일정·계약 창과 하위 팝업을 폰에서도 쓰게: 모달 풀스크린, 툴바 줄바꿈,
       표는 가로 스크롤(컬럼 비율 유지), 달력은 라벨 좁힘 + 최소 폭 확보 후 가로 스크롤 */
    @media (max-width: 820px) {
        /* 본 창 = 화면 꽉 채움 */
        #plannerModalBg { align-items: stretch; justify-content: stretch; }
        .pl-shell {
            width: 100vw !important; height: 100dvh !important; height: 100vh !important;
            max-width: 100vw !important; max-height: 100dvh !important; max-height: 100vh !important;
            min-width: 0; border-radius: 0; resize: none;
        }
        .pl-topbar { height: auto; min-height: 46px; padding: 6px 12px; flex-wrap: wrap; white-space: normal; }
        .pl-topbar-title { font-size: 13px; }
        .pl-topbar-sub { display: none; }              /* 부제 숨김(공간) */
        .pl-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
        .pl-tab { flex-shrink: 0; }

        /* 툴바 — 줄바꿈 + 컴팩트, 긴 안내문 숨김 */
        .pl-toolbar { gap: 5px 6px; padding: 7px 10px; }
        .pl-toolbar .hint#plSchedHint { display: none; }
        .pl-month-title { min-width: 0; font-size: 13px; }
        .btn-pl { padding: 6px 9px; font-size: 12px; }
        .pl-view-seg button { padding: 5px 8px; }

        /* 표 — 컬럼 비율 유지한 채 가로 스크롤(폭이 좁으면 답답하므로 최소폭 확보) */
        .pl-table-wrap { padding: 8px 10px 14px; -webkit-overflow-scrolling: touch; }
        #plScheduleTable { min-width: 680px; }
        #plContractsTable, #plCustomTable { min-width: 720px; }

        /* 달력 — 라벨 컬럼 좁게 + 최소폭 확보 후 가로 스크롤 */
        .pl-cal-wrap { padding: 0 10px 14px; }
        .pl-cal-grid { grid-template-columns: 58px repeat(7, minmax(46px, 1fr)); min-width: 430px; }
        .pl-cal-rowlbl { font-size: 8.5px; padding: 2px 4px 2px 3px; }
        .pl-cal-legend { flex-wrap: wrap; font-size: 10px; }

        /* 셀 입력/조회 팝업 = 풀스크린 (드래그/리사이즈 대신) */
        .pl-ce-card {
            position: fixed !important; left: 0 !important; top: 0 !important;
            width: 100vw !important; height: 100dvh !important; height: 100vh !important;
            max-width: 100vw !important; max-height: 100dvh !important; max-height: 100vh !important;
            min-width: 0; min-height: 0; border-radius: 0; resize: none;
        }
        .pl-ce-head { cursor: default; }               /* 폰에선 드래그 불필요 */
        .pl-ce-fmt { gap: 5px; }

        /* 첨부 모달 = 폭 꽉 채움 */
        .pl-att-card { width: 96vw; max-width: 96vw; max-height: 88dvh; max-height: 88vh; }
        .pl-att-row { flex-wrap: wrap; }
        .pl-att-row .btn-pl, .pl-att-row .btn-pl-del { padding: 4px 8px; }
    }

/* ── [ERP 이전] 파일공유 CSS ── */
    #plShareModalBg { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:10001; align-items:center; justify-content:center; }
    #plShareModalBg.open { display:flex; }
    .sh-card { width:720px; max-width:96vw; height:640px; max-height:92vh; background:#fff; border-radius:12px;
        box-shadow:0 20px 60px rgba(0,0,0,0.3); display:flex; flex-direction:column; overflow:hidden; }
    .sh-head { padding:13px 20px; border-bottom:1px solid #e5e7eb; display:flex; align-items:center; gap:8px; flex-shrink:0; }
    .sh-head b { font-size:15px; color:#0b2a5c; }
    .sh-head .sub { font-size:12px; color:#6b7280; }
    .sh-up { margin:14px 18px; padding:16px; border:2px dashed #cbd5e1; border-radius:10px; background:#fafbfd; flex-shrink:0; }
    .sh-up .drop { text-align:center; cursor:pointer; padding:10px; border-radius:8px; font-size:13px; color:#6b7280; }
    .sh-up .drop:hover, .sh-up .drop.dragover { background:#eef5ff; color:#1a5cba; }
    .sh-opts { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top:10px; font-size:12.5px; color:#374151; }
    .sh-opts select, .sh-opts input { padding:5px 8px; border:1px solid #d1d5db; border-radius:6px; font-size:12.5px; font-family:inherit; }
    .sh-msg { margin:0 18px 8px; padding:8px 12px; font-size:12.5px; border-radius:6px; display:none; flex-shrink:0; }
    .sh-msg.show { display:block; } .sh-msg.ok { background:#dcfce7; color:#166534; } .sh-msg.err { background:#fee2e2; color:#991b1b; } .sh-msg.info { background:#dbeafe; color:#1e40af; }
    .sh-list { flex:1; overflow-y:auto; padding:4px 18px 18px; }
    .sh-row { display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center;
        padding:10px 12px; border:1px solid #eef1f6; border-radius:10px; margin-bottom:8px; background:#fff; }
    .sh-row .ic { font-size:22px; }
    .sh-row .nm { font-weight:700; color:#111827; word-break:break-all; }
    .sh-row .mt { font-size:11px; color:#9ca3af; margin-top:2px; }
    .sh-row .badge { display:inline-block; font-size:10px; font-weight:700; border-radius:8px; padding:0 6px; margin-left:5px; vertical-align:1px; }
    .sh-row .badge.pw { background:#fef3c7; color:#92400e; } .sh-row .badge.exp { background:#e0f2fe; color:#075985; }
    .sh-row .acts { display:flex; gap:5px; flex-wrap:wrap; justify-content:flex-end; }
    .sh-row .acts button { border:1px solid #d1d5db; background:#fff; color:#374151; border-radius:6px; padding:5px 9px; font-size:11.5px; cursor:pointer; font-family:inherit; white-space:nowrap; }
    .sh-row .acts button.copy { border-color:#1a5cba; color:#1a5cba; font-weight:700; }
    .sh-row .acts button.copy:hover { background:#1a5cba; color:#fff; }
    .sh-row .acts button.del { border-color:#f3c1c1; color:#dc2626; }
    .sh-empty { text-align:center; color:#9ca3af; font-size:13px; padding:40px 10px; }
    @media (max-width:820px){
        .sh-card{ width:100vw; height:100dvh; height:100vh; max-width:100vw; max-height:100dvh; max-height:100vh; border-radius:0; }
        .sh-row{ grid-template-columns:auto 1fr; } .sh-row .acts{ grid-column:1/-1; }
    }
