        :root {
            --primary: #1B2A4A;
            --primary-light: #2a3f6b;
            --primary-lighter: #f0f2f7;
            --accent: #e72159;
            --accent-hover: #c91d4e;
            --accent-light: rgba(231,33,89,0.08);
            --bg: #f5f6fa;
            --surface: #ffffff;
            --border: #dde1ea;
            --border-light: #eceef4;
            --text: #2c3347;
            --text-secondary: #6b7280;
            --text-muted: #9ca3af;
            --success: #1a9a5c;
            --success-bg: #eef9f3;
            --warning: #d4880f;
            --warning-bg: #fef8ec;
            --danger: #d94452;
            --danger-bg: #fdf0f1;
            --info: #2b7de9;
            --info-bg: #eef5fd;
            --shadow-sm: 0 1px 3px rgba(27,42,74,0.06);
            --shadow-md: 0 4px 16px rgba(27,42,74,0.08);
            --shadow-lg: 0 8px 32px rgba(27,42,74,0.12);
            --radius: 10px;
            --radius-sm: 6px;
            --transition: all 0.2s ease;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: 'Inter', 'Pretendard', -apple-system, 'Malgun Gothic', sans-serif; background: var(--bg); color: var(--text); font-size: 13px; line-height: 1.6; -webkit-font-smoothing: antialiased; }

        /* ===== HEADER (Compact Single-line Dark Theme) ===== */
        .header {
            background: #1B2A4A;
            border-bottom: 1px solid #2a3f6b;
            padding: 8px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 100;
            backdrop-filter: blur(8px);
            gap: 12px;
        }
        .header-brand { display: flex; align-items: center; gap: 8px; min-width: 0; flex-shrink: 1; }
        .header-logo { flex-shrink: 0; }
        .header-logo svg path:first-child { fill: #ffffff; }
        .header-logo svg path:last-child { fill: #e6225a; }
        .header h1 { font-size: 15px; font-weight: 700; color: #ffffff; letter-spacing: -0.3px; white-space: nowrap; }
        .header .subtitle { font-size: 11px; color: rgba(255,255,255,0.45); font-weight: 400; white-space: nowrap; }
        .header-divider { width: 1px; height: 18px; background: rgba(255,255,255,0.15); margin: 0 4px; flex-shrink: 0; }
        .header-project-name { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
        .header-actions { display: flex; gap: 3px; align-items: center; flex-shrink: 0; }
        .header .est-toolbar-btn { border-color: rgba(255,255,255,0.2); color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.08); font-size: 11px; padding: 4px 10px; }
        .header .est-toolbar-btn:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.3); }
        .header .est-toolbar-group:hover .est-toolbar-btn { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.3); }
        .header .est-btn-primary { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff !important; font-weight: 600; }
        .header .est-btn-primary:hover { background: var(--accent-hover) !important; }
        .header .tb-caret { color: rgba(255,255,255,0.5); }
        .header #userInfoArea { color: rgba(255,255,255,0.85); }

        /* ===== TOOLBAR DROPDOWN SYSTEM ===== */
        .est-toolbar-group {
            position: relative;
        }
        .est-toolbar-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 7px 14px;
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
            background: var(--surface);
            color: var(--text);
            font-size: 12px;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            transition: var(--transition);
            white-space: nowrap;
            letter-spacing: -0.2px;
        }
        .est-toolbar-btn:hover {
            background: var(--primary-lighter);
            border-color: var(--primary-light);
        }
        .est-toolbar-btn .tb-icon { font-size: 14px; line-height: 1; }
        .est-toolbar-btn .tb-caret {
            font-size: 9px;
            color: var(--text-muted);
            margin-left: 2px;
            transition: transform 0.2s ease;
        }
        .est-toolbar-group:hover .est-toolbar-btn {
            background: var(--primary-lighter);
            border-color: var(--primary-light);
        }
        .est-toolbar-group:hover .tb-caret {
            transform: rotate(180deg);
        }

        /* Dropdown Menu */
        .est-toolbar-menu {
            position: absolute;
            top: calc(100% + 4px);
            left: 0;
            min-width: 180px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 8px;
            box-shadow: 0 8px 24px rgba(63,58,57,0.12), 0 2px 8px rgba(63,58,57,0.06);
            padding: 4px;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-4px);
            transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
            z-index: 200;
        }
        .est-toolbar-menu.menu-right {
            left: auto;
            right: 0;
        }
        .est-toolbar-group:hover .est-toolbar-menu {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        /* Menu Items */
        .est-toolbar-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 12px;
            border: none;
            border-radius: 6px;
            background: none;
            color: var(--text);
            font-size: 12px;
            font-weight: 500;
            font-family: inherit;
            cursor: pointer;
            transition: background 0.12s ease;
            width: 100%;
            text-align: left;
            white-space: nowrap;
        }
        .est-toolbar-item:hover {
            background: var(--primary-lighter);
        }
        .est-toolbar-item .mi-icon {
            font-size: 15px;
            width: 20px;
            text-align: center;
            flex-shrink: 0;
            line-height: 1;
        }
        .est-toolbar-item .mi-label {
            flex: 1;
        }
        .est-toolbar-item .mi-badge {
            font-size: 9px;
            padding: 1px 6px;
            border-radius: 10px;
            background: var(--info-bg);
            color: var(--info);
            font-weight: 600;
            letter-spacing: 0.3px;
        }
        .est-toolbar-sep {
            height: 1px;
            background: var(--border-light);
            margin: 4px 8px;
        }

        /* Legacy compat — hide old styles */
        .header-actions .btn-dl,
        .header-actions .dl-divider { display: none; }

        /* ===== CONTAINER ===== */
        .container { max-width: 1440px; margin: 0 auto; padding: 24px; }

        /* ===== SECTIONS (Card UI) ===== */
        .section {
            background: var(--surface);
            border-radius: var(--radius);
            box-shadow: var(--shadow-sm);
            margin-bottom: 20px;
            overflow: hidden;
            border: 1px solid var(--border-light);
            transition: var(--transition);
        }
        .section:hover { box-shadow: var(--shadow-md); }
        .section-header {
            background: var(--primary);
            color: white;
            padding: 12px 20px;
            font-size: 13px;
            font-weight: 600;
            display: flex;
            justify-content: space-between;
            align-items: center;
            letter-spacing: -0.2px;
        }
        .section-body { padding: 28px 24px; }
        .section + .section { margin-top: 8px; }

        /* ===== FORMS ===== */
        .form-row { display: flex; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
        .form-group { display: flex; flex-direction: column; }
        .form-group label { font-size: 11px; color: var(--text-secondary); margin-bottom: 5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
        .form-group input, .form-group select, .form-group textarea {
            padding: 9px 13px;
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
            font-size: 13px;
            font-family: inherit;
            color: var(--text);
            background: var(--surface);
            transition: var(--transition);
        }
        .form-group input:focus, .form-group select:focus, .form-group textarea:focus {
            border-color: var(--accent);
            outline: none;
            box-shadow: 0 0 0 3px var(--accent-light);
        }
        .form-group input::placeholder { color: var(--text-muted); }
        .form-group small { font-size: 10px; color: var(--text-muted); margin-top: 3px; }

        /* ===== TABLES ===== */
        table { width: 100%; border-collapse: collapse; font-size: 12px; }
        th {
            background: var(--primary-lighter);
            padding: 10px 8px;
            text-align: center;
            border-bottom: 2px solid var(--border);
            font-weight: 600;
            color: var(--text);
            white-space: nowrap;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }
        td { padding: 8px; border-bottom: 1px solid var(--border-light); }
        td input, td select {
            width: 100%;
            padding: 6px 8px;
            border: 1px solid transparent;
            border-radius: 4px;
            font-size: 12px;
            background: transparent;
            color: var(--text);
            transition: var(--transition);
        }
        td input:hover, td select:hover { background: var(--primary-lighter); }
        td input:focus, td select:focus {
            border-color: var(--accent);
            background: var(--surface);
            outline: none;
            box-shadow: 0 0 0 2px var(--accent-light);
        }
        td input[type="number"] { text-align: right; -moz-appearance: textfield; font-variant-numeric: tabular-nums; }
        td input[type="number"]::-webkit-outer-spin-button,
        td input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
        td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }

        /* ===== 산출내역서 탭 전폭 레이아웃 ===== */
        .container.estimate-active {
            max-width: 100%;
            padding: 24px 8px;
        }
        #tab-estimate > .section {
            overflow: visible;
            padding: 0;
            max-width: 100%;
            border-radius: var(--radius-sm);
            box-shadow: none;
            border: none;
        }
        #tab-estimate > .section:hover { box-shadow: none; }
        #tab-estimate > .section > .toolbar {
            padding: 10px 12px;
        }
        /* ===== 산출내역서 단일 반응형 테이블 ===== */
        .estimate-wrapper {
            border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
            overflow: auto; position: relative; background: white;
            max-height: calc(100vh - 220px);
        }
        .estimate-wrapper table {
            border-collapse: collapse; min-width: 1880px; width: 100%; table-layout: fixed;
        }
        .estimate-wrapper.labor-cols-hidden table {
            min-width: 0;
            width: 100%;
            table-layout: auto;
        }
        .estimate-wrapper th {
            background: var(--primary); color: white; font-size: 11px; font-weight: 600;
            padding: 6px 4px; text-align: center; white-space: nowrap; border: 1px solid #2a3f6b;
            position: sticky; top: 0; z-index: 3;
        }
        .estimate-wrapper td {
            padding: 3px 4px; border: 1px solid #eee; font-size: 12px; vertical-align: middle;
        }
        .estimate-wrapper td input, .estimate-wrapper td select {
            width: 100%; padding: 3px 4px; border: 1px solid #ddd; border-radius: 3px;
            font-size: 12px; font-family: inherit; box-sizing: border-box;
        }
        /* 수량 입력 강조 */
        .qty-input {
            font-size: 13px !important; font-weight: 600 !important; color: var(--accent) !important;
            background: var(--accent-light) !important; border: 2px solid var(--accent) !important;
            padding: 4px 6px !important; text-align: right !important;
            border-radius: var(--radius-sm); font-family: 'SF Mono','Consolas',monospace;
        }
        .qty-input:focus {
            border-color: #1a73e8 !important; background: #f0f7ff !important;
            box-shadow: 0 0 0 3px rgba(26,115,232,0.15) !important;
            color: #1a73e8 !important; text-align: left !important;
        }
        /* 공종 행 */
        .work-row-main td { background: #1B2A4A !important; color: white !important; font-weight: 700; font-size: 13px; }
        .work-row-main input { background: transparent !important; color: white !important; border: none !important; font-weight: 700; font-size: 13px; }
        .work-row-sub td { background: #E8EDF5 !important; color: #1B2A4A !important; font-weight: 600; font-size: 12px; }
        .work-row-sub input { background: transparent !important; color: #1B2A4A !important; border: none !important; font-weight: 600; }
        /* 소계/총계 행 */
        .subtotal-row td { background: #F0F4FA !important; font-weight: 600; font-style: italic; color: #1B2A4A; }
        .grandtotal-row td { background: #1B2A4A !important; color: white !important; font-weight: 700; }
        /* 이동 버튼 */
        .move-btn {
            background: none; border: 1px solid rgba(0,0,0,0.15); border-radius: 3px;
            cursor: pointer; font-size: 10px; padding: 1px 4px; margin: 0 1px; color: inherit;
        }
        .move-btn:hover { background: rgba(0,0,0,0.1); }
        .work-row-main .move-btn { border-color: rgba(255,255,255,0.3); color: white; }
        .work-row-main .move-btn:hover { background: rgba(255,255,255,0.15); }
        /* textarea 자동 확장 */
        .auto-textarea {
            resize: none; overflow: hidden; min-height: 26px; width: 100%;
            border: 1px solid #ddd; border-radius: 3px; padding: 3px 5px;
            font-size: 12px; font-family: inherit; line-height: 1.4;
            box-sizing: border-box; white-space: pre-wrap; word-break: break-all;
        }
        .spec-textarea {
            min-height: 40px; max-height: 200px; overflow-y: auto !important;
        }
        .auto-textarea:focus { border-color: var(--info); outline: none; box-shadow: 0 0 0 2px rgba(43,125,233,0.15); }
        /* 노무비 산출 내역 숨김/보기 */
        .labor-cols-hidden .labor-detail-col { display: none !important; }
        .labor-cols-hidden .action-cell {
            white-space: normal !important;
            display: flex !important; flex-wrap: wrap; gap: 2px; justify-content: center; align-items: center;
            max-width: 56px;
        }
        .labor-toggle-btn { font-size: 11px; padding: 3px 10px; cursor: pointer; border-radius: 3px; border: 1px solid #888; background: #f5f5f5; color: #333; margin-left: 8px; white-space: nowrap; }
        .labor-toggle-btn:hover { background: #e0e0e0; }
        .labor-toggle-btn.active { background: #1B2A4A; color: white; border-color: #1B2A4A; }
        /* 드래그앤드롭 */
        .drag-source td { opacity: 0.4; background: #fff3cd !important; }
        .drag-over td { border-top: 3px solid #1B2A4A !important; }
        /* 액션 열 */
        .action-cell { display: flex; gap: 2px; align-items: center; justify-content: center; flex-wrap: nowrap; }
        /* 개별 요율 설정 팝오버 */
        .rate-override-popover { z-index: 10000; background: white; border: 1px solid #ddd; border-radius: 8px; padding: 12px 14px; box-shadow: 0 4px 16px rgba(0,0,0,0.15); min-width: 290px; }
        .rate-override-popover input[type="number"] { border: 1px solid #ccc; border-radius: 3px; padding: 2px 6px; }
        .custom-rate-row td:first-child { border-left: 3px solid #e72159 !important; }

        /* ===== BUTTONS ===== */
        .btn {
            padding: 8px 18px;
            border: none;
            border-radius: var(--radius-sm);
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
            font-family: inherit;
            transition: var(--transition);
            letter-spacing: -0.1px;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }
        .btn:active { transform: scale(0.97); }
        .btn-primary { background: var(--accent); color: white; }
        .btn-primary:hover { background: var(--accent-hover); box-shadow: 0 2px 8px rgba(231,33,89,0.25); }
        .btn-success { background: var(--success); color: white; }
        .btn-success:hover { background: #158a50; }
        .btn-danger { background: var(--danger); color: white; }
        .btn-danger:hover { background: #c13c49; }
        .btn-warning { background: var(--warning); color: white; }
        .btn-warning:hover { background: #be7a0d; }
        .btn-sm { padding: 5px 10px; font-size: 11px; }
        .btn-info { background: var(--info); color: white; }
        .btn-info:hover { background: #2570d3; }
        .btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--border); }
        .btn-outline:hover { background: var(--primary-lighter); border-color: var(--primary); }
        .btn-ghost { background: transparent; color: var(--text-secondary); }
        .btn-ghost:hover { background: var(--primary-lighter); color: var(--text); }
        .btn-accent-outline { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
        .btn-accent-outline:hover { background: var(--accent-light); }

        /* ===== SUMMARY TABLE ===== */
        .summary-table td { padding: 10px 14px; }
        .summary-table .label { background: var(--primary-lighter); font-weight: 600; width: 200px; color: var(--text); }
        .summary-table .rate { width: 100px; text-align: center; color: var(--text-secondary); }
        .summary-table .amount { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

        /* ===== TOOLBAR ===== */
        .toolbar { display: flex; gap: 8px; padding: 14px 20px; background: var(--primary-lighter); border-bottom: 1px solid var(--border-light); flex-wrap: wrap; }

        /* ===== TABS ===== */
        .tabs { display: flex; gap: 2px; flex-wrap: wrap; background: var(--surface); border-radius: var(--radius) var(--radius) 0 0; padding: 4px; border: 1px solid var(--border-light); border-bottom: none; }
        .tab {
            padding: 10px 22px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 500;
            color: var(--text-secondary);
            border-radius: var(--radius-sm);
            transition: var(--transition);
        }
        .tab.active { color: var(--surface); background: var(--primary); font-weight: 600; }
        .tab:hover:not(.active) { background: var(--primary-lighter); color: var(--text); }

        .tab-content { display: none; }
        .tab-content.active { display: block; }

        /* ===== WAGE / ITEM TABLES ===== */
        .wage-search { display: flex; gap: 10px; margin-bottom: 15px; align-items: center; flex-wrap: wrap; }
        .wage-search input { flex: 1; max-width: 320px; }
        .wage-table tr { transition: var(--transition); }
        .wage-table tr:hover { background: var(--primary-lighter); }
        .wage-table tr.selected { background: var(--accent-light); }
        .item-table th { position: sticky; top: 0; z-index: 3; background: var(--primary-lighter); }
        .item-table tr:hover { background: var(--primary-lighter); }
        .item-table tr.selected { background: var(--accent-light); }

        /* ===== TOAST ===== */
        #toast {
            position: fixed; bottom: 30px; right: 30px; padding: 14px 28px;
            border-radius: var(--radius); color: white; font-size: 13px; font-weight: 500;
            display: none; z-index: 9999; box-shadow: var(--shadow-lg);
        }
        #toast.success { background: var(--success); }
        #toast.error { background: var(--danger); }

        /* ===== DISCOUNT ===== */
        .discount-row { background: var(--warning-bg); }

        /* ===== CARD STYLES ===== */
        .material-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; background: var(--surface); }
        .material-card h4 { margin-bottom: 10px; color: var(--primary); }

        /* ===== MODALS ===== */
        .modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(63,58,57,0.4); z-index: 1000; backdrop-filter: blur(4px); }
        .modal-content { background: var(--surface); margin: 50px auto; max-width: 1000px; max-height: 80vh; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
        .modal-header { background: var(--primary); color: white; padding: 16px 22px; display: flex; justify-content: space-between; align-items: center; }
        .modal-header span { font-weight: 600; font-size: 14px; }
        .modal-close { background: none; border: none; color: rgba(255,255,255,0.7); font-size: 20px; cursor: pointer; transition: var(--transition); width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
        .modal-close:hover { background: rgba(255,255,255,0.15); color: white; }
        .modal-body { overflow-y: auto; flex: 1; padding: 20px; }
        .modal-footer { padding: 14px 22px; background: var(--primary-lighter); text-align: right; border-top: 1px solid var(--border-light); display: flex; gap: 8px; justify-content: flex-end; }

        /* ===== BADGES ===== */
        .wage-year-badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 10px; font-weight: 600; margin-left: 5px; }
        .wage-year-badge.current { background: var(--success); color: white; }
        .wage-year-badge.old { background: var(--text-muted); color: white; }

        /* ===== COVER INFO ===== */
        .cover-info-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; background: var(--surface); box-shadow: var(--shadow-sm); margin-bottom: 16px; }
        .cover-info-box h4 { font-size: 12px; color: var(--primary); margin-bottom: 10px; border-bottom: 2px solid var(--primary); padding-bottom: 8px; letter-spacing: 0.3px; font-weight: 700; text-transform: uppercase; }
        .cover-info-box .form-row { margin-bottom: 8px; gap: 10px; }
        .cover-info-box .form-group label { margin-bottom: 3px; }
        .cover-info-box .form-group input, .cover-info-box .form-group select { padding: 7px 10px; font-size: 12px; }
        .cover-two-col { display: flex; gap: 20px; flex-wrap: wrap; }
        .cover-two-col > div { flex: 1; min-width: 300px; }

        /* ===== LOGO DISPLAY ===== */
        .logo-display-area { margin-bottom: 8px; }
        .logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
        .logo-preview span { color: var(--text-muted); font-size: 11px; text-align: center; line-height: 1.5; }

        /* ===== DISCOUNT BOX ===== */
        .discount-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin-top: 20px; box-shadow: var(--shadow-sm); }
        .discount-box h4 { font-size: 12px; color: var(--primary); margin-bottom: 14px; border-bottom: 2px solid var(--accent); padding-bottom: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }

        /* ===== COST SUMMARY ===== */
        .cost-summary-card { background: var(--primary-lighter); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 18px; margin-top: 12px; }
        .cost-summary-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: 13px; }
        .cost-summary-row span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
        .cost-summary-row.total { border-top: 2px solid var(--primary); margin-top: 8px; padding-top: 10px; font-weight: 700; font-size: 15px; color: var(--primary); }
        .cost-summary-row.discount { color: var(--accent); font-weight: 700; }
        .cost-summary-row.final { background: var(--primary); color: white; border-radius: var(--radius-sm); padding: 12px 18px; margin-top: 8px; font-size: 16px; font-weight: 700; }

        /* ===== REMARKS ===== */
        .remarks-section { margin-top: 18px; }
        .remarks-section textarea { width: 100%; min-height: 80px; resize: vertical; }

        /* ===== PROJECT BAR ===== */
        .project-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 0; }
        .project-list-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; background: var(--surface); transition: var(--transition); }
        .project-list-item:hover { background: var(--primary-lighter); border-color: var(--primary); box-shadow: var(--shadow-sm); }
        .project-list-item .project-name { font-weight: 600; color: var(--primary); }
        .project-list-item .project-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

        .project-filter-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
        .project-filter-bar select { padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; }

        /* ===== FOLDER SYSTEM ===== */
        .folder-breadcrumb { display:flex; align-items:center; gap:4px; padding:8px 0; font-size:12px; flex-wrap:wrap; }
        .folder-breadcrumb-item { color:var(--accent); cursor:pointer; font-weight:600; padding:2px 6px; border-radius:var(--radius-sm); transition:var(--transition); }
        .folder-breadcrumb-item:hover { background:rgba(231,33,89,0.1); }
        .folder-breadcrumb-sep { color:var(--text-muted); font-size:10px; }
        .folder-breadcrumb-current { color:var(--text); font-weight:600; padding:2px 6px; }
        .folder-item { display:flex; align-items:center; padding:10px 14px; border:1px solid var(--border); border-radius:var(--radius-sm); margin-bottom:6px; background:var(--surface); cursor:pointer; transition:var(--transition); gap:10px; }
        .folder-item:hover { background:var(--primary-lighter); border-color:var(--primary); box-shadow:var(--shadow-sm); }
        .folder-item .folder-icon { font-size:20px; flex-shrink:0; }
        .folder-item .folder-name { font-weight:600; color:var(--primary); flex:1; }
        .folder-item .folder-count { font-size:11px; color:var(--text-muted); margin-right:6px; }
        .folder-item .folder-actions { display:flex; gap:4px; opacity:0; transition:var(--transition); }
        .folder-item:hover .folder-actions { opacity:1; }
        .folder-toolbar { display:flex; gap:8px; align-items:center; margin-bottom:10px; }
        .folder-toolbar button { font-size:11px; padding:5px 10px; }
        .folder-select-tree { max-height:200px; overflow-y:auto; border:1px solid var(--border); border-radius:var(--radius-sm); padding:8px; margin-top:8px; background:var(--bg); }
        .folder-select-item { display:flex; align-items:center; gap:6px; padding:5px 8px; cursor:pointer; border-radius:var(--radius-sm); font-size:12px; transition:var(--transition); }
        .folder-select-item:hover { background:var(--primary-lighter); }

        /* ===== EXPLORER LAYOUT (Finder-style) ===== */
        .explorer-container { display:flex; flex:1; min-height:0; overflow:hidden; }
        .explorer-sidebar { width:200px; min-width:160px; max-width:260px; background:#f5f5f7; border-right:1px solid #d1d1d6; overflow-y:auto; overflow-x:hidden; flex-shrink:0; padding:8px 0; }
        .explorer-sidebar-title { font-size:10px; font-weight:700; color:#86868b; text-transform:uppercase; letter-spacing:0.5px; padding:10px 14px 4px; }
        .explorer-sidebar-item { display:flex; align-items:center; gap:6px; padding:5px 14px; font-size:12px; color:#333; cursor:pointer; transition:background .12s; border-radius:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
        .explorer-sidebar-item:hover { background:rgba(0,0,0,0.05); }
        .explorer-sidebar-item.active { background:var(--accent); color:#fff; border-radius:5px; margin:0 6px; padding:5px 8px; }
        .explorer-sidebar-item .sb-icon { font-size:14px; flex-shrink:0; }
        .explorer-sidebar-item .sb-name { overflow:hidden; text-overflow:ellipsis; }
        .explorer-sidebar-item .sb-count { font-size:10px; color:#999; margin-left:auto; flex-shrink:0; }
        .explorer-sidebar-item.active .sb-count { color:rgba(255,255,255,0.7); }
        .explorer-sidebar-add { display:flex; align-items:center; gap:4px; padding:5px 14px; font-size:11px; color:var(--accent); cursor:pointer; transition:background .12s; }
        .explorer-sidebar-add:hover { background:rgba(0,0,0,0.04); }
        .explorer-main { flex:1; display:flex; flex-direction:column; min-width:0; background:#fff; }

        /* ===== EXPLORER TABLE VIEW ===== */
        .explorer-table { width:100%; border-collapse:collapse; table-layout:fixed; }
        .explorer-table thead { position:sticky; top:0; z-index:2; }
        .explorer-th { background:linear-gradient(180deg, #f8f9fa 0%, #eef0f2 100%); border-bottom:1px solid #d1d1d6; border-right:1px solid #e5e5e5; padding:6px 10px; font-size:11px; font-weight:600; color:#555; cursor:pointer; user-select:none; white-space:nowrap; text-align:left; }
        .explorer-th:hover { background:linear-gradient(180deg, #e9ecef 0%, #dee2e6 100%); }
        .explorer-th:last-child { border-right:none; }
        .explorer-th .sort-arrow { font-size:9px; margin-left:4px; color:#aaa; }
        .explorer-th .sort-arrow.active { color:var(--primary); }
        .explorer-row { cursor:default; border-bottom:1px solid #f0f0f0; }
        .explorer-row:nth-child(even) { background:#fafbfc; }
        .explorer-row:hover { background:#e8f0fe; }
        .explorer-row.selected { background:#d4e4fc; }
        .explorer-row.current-project { background:rgba(231,33,89,0.05); }
        .explorer-row.current-project.selected { background:rgba(231,33,89,0.14); }
        .explorer-row td { padding:5px 10px; font-size:12px; color:#333; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; vertical-align:middle; }
        .explorer-row td:first-child { display:flex; align-items:center; gap:8px; white-space:normal; overflow:visible; word-break:break-all; }
        .explorer-row .file-icon { font-size:16px; flex-shrink:0; }
        .explorer-row .file-name { font-weight:500; word-break:break-all; line-height:1.4; }
        .explorer-row .file-name .badge-current { color:#28a745; font-size:10px; font-weight:400; margin-left:4px; }
        .explorer-row .file-name .badge-rev { color:var(--accent); font-size:10px; font-weight:400; margin-left:4px; }
        .explorer-rev-row { cursor:default; border-bottom:1px solid #f0f0f0; background:#FFFDF5; }
        .explorer-rev-row:hover { background:#FFF8E1; }
        .explorer-rev-row[data-type="invoice"] { background:#f0faf4 !important; cursor:pointer; }
        .explorer-rev-row[data-type="invoice"]:hover { background:#d4edda !important; }
        .explorer-rev-row.selected { background:#FFE082; }
        .explorer-rev-row td { padding:4px 10px; font-size:11px; color:#666; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; vertical-align:middle; }
        .explorer-rev-row td:first-child { padding-left:40px; display:flex; align-items:center; gap:8px; white-space:normal; overflow:visible; word-break:break-all; }
        .explorer-move-row td:first-child { padding-left:10px; }
        .explorer-move-row td:first-child input { margin-right:4px; }

        /* ===== EXPLORER CONTEXT MENU ===== */
        .explorer-context-menu { position:fixed; z-index:9999; min-width:180px; background:#fff; border:1px solid #ccc; border-radius:6px; box-shadow:0 4px 16px rgba(0,0,0,0.18); padding:4px 0; font-size:12px; }
        .explorer-context-menu .ctx-item { display:flex; align-items:center; gap:8px; padding:7px 16px; cursor:pointer; color:#333; transition:background .12s; }
        .explorer-context-menu .ctx-item:hover { background:#e8f0fe; }
        .explorer-context-menu .ctx-item.danger { color:#dc3545; }
        .explorer-context-menu .ctx-item.danger:hover { background:#fbe9eb; }
        .explorer-context-menu .ctx-sep { height:1px; background:#e5e5e5; margin:4px 0; }
        .explorer-context-menu .ctx-icon { width:18px; text-align:center; flex-shrink:0; }

        /* ===== EXPLORER STATUS BAR ===== */
        .explorer-statusbar { display:flex; justify-content:space-between; align-items:center; padding:5px 14px; font-size:11px; color:#86868b; background:#f5f5f7; border-top:1px solid #d1d1d6; }

        /* ===== EXPLORER INPUT MODAL (replaces prompt) ===== */
        .explorer-input-overlay { position:fixed; z-index:10000; inset:0; background:rgba(0,0,0,0.35); display:flex; align-items:center; justify-content:center; }
        .explorer-input-box { background:#fff; border-radius:12px; box-shadow:0 8px 32px rgba(0,0,0,0.22); width:380px; overflow:hidden; }
        .explorer-input-box .eib-header { padding:18px 22px 8px; font-size:14px; font-weight:700; color:#1B2A4A; }
        .explorer-input-box .eib-body { padding:8px 22px 18px; }
        .explorer-input-box .eib-body input { width:100%; padding:9px 12px; border:1px solid #ccc; border-radius:6px; font-size:13px; font-family:inherit; box-sizing:border-box; outline:none; transition:border-color .2s; }
        .explorer-input-box .eib-body input:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(231,33,89,0.12); }
        .explorer-input-box .eib-footer { display:flex; justify-content:flex-end; gap:8px; padding:12px 22px; background:#f9f9f9; border-top:1px solid #eee; }
        .explorer-input-box .eib-footer button { padding:7px 18px; border-radius:6px; font-size:12px; font-weight:600; cursor:pointer; border:1px solid #ccc; background:#fff; color:#333; font-family:inherit; transition:all .15s; }
        .explorer-input-box .eib-footer button:hover { background:#f0f0f0; }
        .explorer-input-box .eib-footer button.primary { background:var(--accent); color:#fff; border-color:var(--accent); }
        .explorer-input-box .eib-footer button.primary:hover { background:#c9204e; }
        .folder-select-item.selected { background:rgba(231,33,89,0.12); border:1px solid var(--accent); font-weight:600; }
        .folder-select-item .indent { display:inline-block; }

        /* ===== CA SECTIONS (원가 분석) ===== */
        .ca-section { margin-bottom: 18px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
        .ca-section-header {
            background: var(--primary);
            color: white;
            padding: 10px 16px;
            font-size: 12px;
            font-weight: 600;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .ca-section-header.purple { background: #5c3d8f; }
        .ca-section-header.green { background: var(--success); }

        /* ===== LOADING ===== */
        @keyframes spin { to { transform: rotate(360deg); } }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

        /* ===== SCROLLBAR ===== */
        ::-webkit-scrollbar { width: 6px; height: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

        /* ===== PRINT ===== */
        @media print {
            .no-print { display: none !important; }
            .section { box-shadow: none; border: 1px solid #ddd; }
            .header { position: static; }
        }
        /* 관리자 전용 필드 */
        .admin-only-badge { font-size:9px; color:#C9A96E; font-weight:500; margin-left:4px; }
        .admin-only-field[readonly] { background:#f5f5f5; color:#999; cursor:not-allowed; border-color:#e0e0e0; }
        /* 자사정보 언어 탭 */
        .company-lang-tab { font-family:inherit; }
        .company-lang-tab.active { background:var(--primary) !important; color:white !important; }

        /* ===== 상황별 도움말 (Contextual Help) ===== */
        #helpFab {
            position: fixed; bottom: 30px; right: 30px; z-index: 9000;
            width: 52px; height: 52px; border-radius: 50%;
            background: linear-gradient(135deg, var(--primary) 0%, #2d3f6b 100%);
            color: white; font-size: 24px; font-weight: 700;
            display: none; align-items: center; justify-content: center;
            cursor: pointer; box-shadow: 0 4px 20px rgba(27,42,74,0.35);
            transition: transform 0.2s, box-shadow 0.2s;
            user-select: none; font-family: inherit;
        }
        #helpFab:hover { transform: scale(1.12); box-shadow: 0 6px 28px rgba(27,42,74,0.45); }
        #helpFab:active { transform: scale(0.95); }

        .help-ctx-header {
            display: flex; gap: 16px; align-items: center;
            padding: 24px 28px; background: linear-gradient(135deg, #1B2A4A 0%, #2d3f6b 100%);
            color: white;
        }
        .help-ctx-icon { font-size: 36px; flex-shrink: 0; }
        .help-ctx-title { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
        .help-ctx-desc { font-size: 12px; opacity: 0.8; line-height: 1.5; }

        .help-section { border-bottom: 1px solid #f0f0f0; }
        .help-section:last-child { border-bottom: none; }
        .help-section-title {
            cursor: pointer; padding: 14px 24px; display: flex; justify-content: space-between;
            align-items: center; font-size: 14px; font-weight: 700; color: var(--primary);
            transition: background 0.15s; user-select: none;
        }
        .help-section-title:hover { background: #f8f9ff; }
        .help-chevron { font-size: 12px; color: #aaa; transition: transform 0.2s; }
        .help-section.open .help-chevron { transform: rotate(90deg); color: var(--accent); }
        .help-section-body { display: none; padding: 0 24px 18px 24px; }
        .help-section.open .help-section-body { display: block; }
        .help-section-body ul { list-style: none; padding: 0; margin: 0; }
        .help-section-body li {
            font-size: 13px; color: #555; line-height: 1.7; padding: 4px 0 4px 18px;
            position: relative;
        }
        .help-section-body li::before {
            content: ''; position: absolute; left: 2px; top: 12px;
            width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.6;
        }
        .help-section-body li strong { color: var(--primary); font-weight: 600; }
        .help-section-body li .help-key {
            display: inline-block; background: #f1f3f5; border: 1px solid #ced4da; border-bottom: 2px solid #adb5bd;
            border-radius: 3px; padding: 0px 5px; font-size: 11px; font-weight: 600; font-family: inherit;
        }
        .help-footer-link {
            display: block; text-align: center; padding: 14px; font-size: 12px; color: var(--primary);
            text-decoration: none; font-weight: 600; background: var(--primary-lighter);
            border-radius: 0 0 12px 12px; transition: background 0.15s;
        }
        .help-footer-link:hover { background: #e0e6f0; }

        /* ===== V6 INTEGRATION — .est-page namespace ===== */
        #page-estimates .est-page { padding: 0; }
        #page-estimates .est-page .header { position: relative; top: auto; z-index: 10; }
        /* Sticky cascade: V6 header(48px) → tabs → toolbar → table headers */
        #page-estimates .est-page .tabs {
            position: sticky; top: 48px; z-index: 50;
            background: var(--surface); border-bottom: 1px solid var(--border-light);
        }
        #page-estimates .est-page .toolbar {
            position: sticky; top: 88px; z-index: 49;
            background: var(--primary-lighter);
        }
        /* estimate-wrapper는 overflow:auto로 자체 스크롤 컨텍스트 →
           th sticky top은 wrapper 기준이므로 0으로 유지 */
        #page-estimates .est-page .estimate-wrapper th {
            top: 0;
        }

        /* ===== MOBILE RESPONSIVE ===== */
        @media (max-width: 768px) {
            .est-page .header { flex-direction: column; padding: 12px 16px; gap: 8px; }
            .est-page .header-brand { gap: 8px; }
            .est-page .header h1 { font-size: 13px; }
            .est-page .header .subtitle { font-size: 10px; }
            .est-page .header-actions { flex-wrap: wrap; gap: 3px; justify-content: center; }
            .est-page .est-toolbar-btn { padding: 5px 10px; font-size: 11px; gap: 4px; }
            .est-page .est-toolbar-btn .tb-caret { display: none; }
            .est-page .est-toolbar-menu { min-width: 160px; }

            .est-page .container { padding: 12px 8px; }
            .est-page .section-body { padding: 12px; }
            .est-page .form-row { flex-direction: column; gap: 8px; }
            .est-page .form-group { min-width: 100%; }
            .est-page .cover-two-col { flex-direction: column; gap: 12px; }
            .est-page .cover-two-col > div { min-width: 100%; }

            .est-page .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
            .est-page .tab { padding: 8px 14px; font-size: 11px; white-space: nowrap; flex-shrink: 0; }

            .est-page .estimate-wrapper { -webkit-overflow-scrolling: touch; }
            .est-page .estimate-wrapper table { min-width: 1200px; }

            .est-page .toolbar { flex-direction: column; gap: 6px; padding: 10px 12px; }

            .est-page .explorer-container { flex-direction: column; }
            .est-page .explorer-sidebar { width: 100%; max-width: 100%; min-width: 100%; max-height: 200px; border-right: none; border-bottom: 1px solid #d1d1d6; }

            .est-page .modal-content { margin: 10px; max-height: 90vh; }

            .est-page .summary-table .label { width: 140px; }
            .est-page .cost-summary-row.final { font-size: 14px; padding: 10px 14px; }

            .est-page .project-bar { flex-direction: column; gap: 6px; }
        }

        @media (max-width: 480px) {
            .est-page .est-toolbar-btn { padding: 4px 8px; font-size: 10px; }
            .est-page .estimate-wrapper table { min-width: 900px; }
            .est-page .tab { padding: 6px 10px; font-size: 10px; }
        }

        /* ===== 원가 기준 설정 모달 ===== */
        .config-radio-card {
            display: flex; align-items: center; gap: 12px;
            padding: 10px 14px; border: 1.5px solid var(--border-light);
            border-radius: var(--radius-sm); cursor: pointer;
            transition: all 0.15s ease; background: var(--surface);
        }
        .config-radio-card:hover { border-color: var(--primary-light); background: var(--primary-lighter); }
        .config-radio-card.selected { border-color: var(--primary); background: var(--primary-lighter); box-shadow: 0 0 0 1px var(--primary); }
        .config-radio-card input[type="radio"] { display: none; }
        .config-radio-body { display: flex; flex-direction: column; gap: 1px; flex: 1; }
        .config-radio-rate {
            font-size: 18px; font-weight: 800; color: var(--primary); min-width: 52px; text-align: center;
            background: var(--primary-lighter); border-radius: 6px; padding: 4px 8px; flex-shrink: 0;
        }
        .config-radio-rate.disc { color: var(--accent); background: var(--accent-light); }
        .config-radio-label { font-size: 13px; font-weight: 600; color: var(--text-primary); }
        .config-radio-desc { font-size: 11px; color: var(--text-muted); line-height: 1.3; }

        /* ===== AI 매칭 모달 스타일 ===== */
        .ai-spinner {
            width: 28px; height: 28px; border: 3px solid var(--border-light);
            border-top-color: var(--primary); border-radius: 50%;
            animation: ai-spin 0.8s linear infinite; margin: 0 auto;
        }
        @keyframes ai-spin { to { transform: rotate(360deg); } }
        .ai-match-card { transition: box-shadow 0.15s; }
        .ai-match-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
