* { margin: 0; padding: 0; box-sizing: border-box; }
        body { background-color: #F3F4F6; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: #4B5563; }
        .main { padding: 2rem; max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; }
        body.embed-mode .main { max-width: 1100px; padding: 1rem; }
        body.embed-mode .card { border-radius: 8px; box-shadow: none; border: 1px solid #E5E7EB; }
        
        @media (max-width: 768px) {
            .main { padding: 1rem; }
            .header { padding: 1.5rem; margin-top: 70px; }
            .header h1 { font-size: 1.5rem; }
            .header p { font-size: 0.85rem; }
            .card { padding: 1.25rem; }
            .btn-group { flex-direction: column; }
            .btn-group .btn { width: 100%; }
            .grid-2 { grid-template-columns: 1fr !important; }
            .grid-4 { grid-template-columns: 1fr !important; }
            .segmented-control { flex-wrap: wrap; }
            .segmented-control button { font-size: 0.85rem; padding: 0.625rem; }
            .edit-section { padding: 1rem; }
            .form-group label { font-size: 0.85rem; }
            .form-group input[type="text"], .form-group textarea, .form-group select { font-size: 0.9rem; padding: 0.75rem; }
            .card-header h3 { font-size: 1rem; }
            .attach-row { grid-template-columns: 1fr; }
            .attach-col .upload-area { min-height: 120px; padding: 1rem; }
            .photo-gallery { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 0.5rem; }
            .photo-item img { height: 80px; }
        }
        .header { order: 1; margin-top: 80px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 1.75rem 2rem; border-radius: 16px; margin-bottom: 1.5rem; box-shadow: 0 4px 6px rgba(0,0,0,0.1); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
        .header-text { flex: 1; min-width: 220px; }
        .header h1 { font-size: 1.75rem; margin-bottom: 0.3rem; }
        .header p { color: rgba(255,255,255,0.85); font-size: 0.95rem; }
        .material-module-tabs { order: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.3rem; background: #E8F0FE; border-radius: 12px; padding: 0.25rem; min-width: 320px; margin-bottom: 1.5rem; }
        .material-module-tabs button { height: 40px; border: 0; border-radius: 9px; background: transparent; color: #4B5563; font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: all 0.18s ease; }
        .material-module-tabs button:hover { color: #667eea; background: rgba(102,126,234,0.1); }
        .material-module-tabs button.active { background: #fff; color: #667eea; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
        .material-module { order: 3; display: none; }
        .material-module.active { display: block; }
        @media (max-width: 768px) {
            .header { flex-direction: column; align-items: stretch; }
            .material-module-tabs { width: 100%; min-width: 0; }
            .material-module-tabs button { font-size: 0.88rem; }
        }
        @media (min-width: 769px) {
            .material-module-tabs { width: auto; }
        }
        .card { background: white; border-radius: 16px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); padding: 2rem; margin-bottom: 2rem; }
        .card-header { margin-bottom: 1.5rem; }
        .card-header h3 { color: #667eea; border-bottom: 2px solid #667eea; padding-bottom: 5px; margin-bottom: 1rem; }
        .form-group { margin-bottom: 1.5rem; }
        .form-group label { display: block; margin-bottom: 0.75rem; font-weight: 600; color: #1F2937; }
        .form-group textarea:not(.rich-textarea) { width: 100%; padding: 1rem; border: 1px solid #E5E7EB; border-radius: 12px; min-height: 250px; font-size: 1rem; resize: vertical; font-family: inherit; }
        .form-group textarea:not(.rich-textarea):focus { border-color: #667eea; outline: none; box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
        .keyword-highlight {
            color: #EF4444;
            font-weight: 600;
        }
        .form-group input[type="text"], .form-group select { width: 100%; padding: 0.875rem; border: 1px solid #E5E7EB; border-radius: 12px; font-size: 1rem; }
        .form-group input[type="text"]:focus, .form-group select:focus { border-color: #667eea; outline: none; box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
        .segmented-control { display: flex; background: #F3F4F6; border-radius: 12px; padding: 0.25rem; margin-bottom: 1.5rem; }
        .segmented-control button { flex: 1; padding: 0.75rem; border: none; background: none; border-radius: 8px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
        .segmented-control button.active { background: white; color: #667eea; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
        .material-unit-control { margin-bottom: 0; flex-wrap: wrap; gap: 0.25rem; }
        .material-unit-control button { min-width: 120px; white-space: normal; line-height: 1.35; }
        .unit-hidden-field { display: none !important; }
        .upload-area { border: 2px dashed #E5E7EB; border-radius: 12px; padding: 2rem; text-align: center; cursor: pointer; transition: all 0.2s; }
        .upload-area:hover { border-color: #667eea; background: #F9FAFB; }
        .upload-area.drag-over { border-color: #667eea; background: #EFF6FF; }
        .photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 1rem; margin-top: 1rem; }
        .photo-item { position: relative; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,0.1); transition: transform 0.2s; }
        .photo-item:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
        .photo-item img { width: 100%; height: 100px; object-fit: cover; display: block; }
        .photo-info { padding: 0.5rem; font-size: 0.75rem; text-align: center; background: #f8f9fa; }
        .photo-actions { display: flex; justify-content: space-around; padding: 0.25rem; background: #fff; border-top: 1px solid #eee; }
        .photo-actions button { background: none; border: none; cursor: pointer; padding: 0.25rem 0.5rem; font-size: 0.8rem; color: #6B7280; border-radius: 4px; }
        .photo-actions button:hover { background: #F3F4F6; color: #374151; }
        .photo-order { position: absolute; top: 6px; left: 6px; background: rgba(102,126,234,0.9); color: #fff; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; }
        .photo-delete { position: absolute; top: 6px; right: 6px; background: rgba(239,68,68,0.9); color: #fff; width: 22px; height: 22px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; }
        .file-list { margin-top: 1rem; }
        .file-item { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; background: #F9FAFB; border-radius: 8px; margin-bottom: 0.5rem; border: 1px solid #E5E7EB; }
        .file-item .file-info { display: flex; align-items: center; gap: 0.75rem; }
        .file-item .file-icon { font-size: 1.5rem; }
        .file-item .file-name { font-size: 0.875rem; color: #1F2937; font-weight: 500; }
        .file-item .file-size { font-size: 0.75rem; color: #9CA3AF; }
        .file-item .file-remove { background: none; border: none; color: #EF4444; cursor: pointer; font-size: 1.2rem; padding: 0.25rem; border-radius: 4px; }
        .file-item .file-remove:hover { background: #FEF2F2; }
        .upload-panel { display: none; }
        .upload-panel.active { display: block; }
        
        .attach-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
        .attach-col { display: flex; flex-direction: column; min-width: 0; }
        .attach-col .upload-area { height: 180px; display: flex; flex-direction: column; justify-content: center; align-items: center; overflow-wrap: break-word; word-break: break-word; }
        @media (max-width: 768px) { .attach-row { grid-template-columns: 1fr; } }
        .btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.875rem 1.5rem; border-radius: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; border: none; }
        .btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
        .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(102,126,234,0.4); }
        .btn-secondary { background: white; color: #4B5563; border: 1px solid #E5E7EB; }
        .btn-secondary:hover { background: #F3F4F6; }
        .btn-group { display: flex; gap: 1rem; }
        .char-counter { text-align: right; color: #9CA3AF; font-size: 0.875rem; margin-top: 0.5rem; }
        .input-tools { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin-top: 0.5rem; }
        .input-tools .char-counter { margin-top: 0; }
        .ai-understand-btn { white-space: nowrap; }
        .ai-insight-panel { margin-top: 0.75rem; border: 1px solid #DDE7F7; border-radius: 10px; background: #F8FBFF; padding: 0.9rem; color: #1F2937; }
        .ai-insight-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
        .ai-insight-head strong { font-size: 0.9rem; }
        .ai-insight-head span, .ai-insight-muted { color: #6B7280; font-size: 0.78rem; }
        .ai-insight-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
        .ai-insight-grid label, .ai-insight-section label { display: block; color: #6B7280; font-size: 0.75rem; margin-bottom: 0.25rem; }
        .ai-insight-grid p, .ai-insight-section p { margin: 0; font-size: 0.86rem; line-height: 1.45; }
        .ai-insight-chip { display: inline-flex; flex-direction: column; gap: 0.15rem; max-width: 100%; margin: 0 0.35rem 0.35rem 0; padding: 0.28rem 0.45rem; border: 1px solid #BFDBFE; border-radius: 6px; background: #EFF6FF; color: #1D4ED8; word-break: break-word; }
        .ai-insight-chip em { color: #6B7280; font-style: normal; font-size: 0.72rem; }
        .ai-insight-section { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid #E5E7EB; }
        .ai-insight-section.is-warning p { color: #92400E; }
        .ai-insight-loading, .ai-insight-error { font-size: 0.86rem; color: #6B7280; }
        .ai-insight-error { color: #B91C1C; }
        .textarea-wrapper { position: relative; }
        .highlight-layer { position: absolute; top: 0; left: 0; right: 0; bottom: 0; padding: 1rem; margin: 0; border-radius: 12px; font-size: 1rem; font-family: inherit; white-space: pre-wrap; word-wrap: break-word; overflow-y: auto; pointer-events: none; background: transparent; color: transparent; border: 1px solid transparent; }
        .highlight-layer mark { color: transparent; }
        .rich-textarea { position: relative; z-index: 1; width: 100%; padding: 1rem; border: 1px solid #E5E7EB; border-radius: 12px; min-height: 250px; font-size: 1rem; resize: vertical; font-family: inherit; background: transparent; }
        .rich-textarea:focus { border-color: #667eea; outline: none; box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
        .draft-indicator { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: #FEF3C7; border-radius: 8px; margin-top: 0.5rem; font-size: 0.875rem; color: #92400E; }
        .draft-indicator .icon { font-size: 1rem; }
        .draft-selector { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
        .draft-select { flex: 1; padding: 0.5rem 0.75rem; border: 1px solid #E5E7EB; border-radius: 8px; font-size: 0.85rem; background: white; cursor: pointer; }
        .draft-select:focus { outline: none; border-color: #667eea; }
        .btn-xs { padding: 0.375rem 0.75rem; font-size: 0.8rem; border-radius: 6px; font-weight: 500; cursor: pointer; border: 1px solid #E5E7EB; background: white; white-space: nowrap; }
        .btn-xs:hover { background: #F3F4F6; }
        .edit-section { background-color: #f8f9fa; border-radius: 12px; padding: 1.5rem; margin: 1.5rem 0; border: 1px solid #dee2e6; }
        .grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
        .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
        .download-section { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid #E5E7EB; }
        .spinner { display: none; align-items: center; justify-content: center; gap: 0.5rem; color: #667eea; }
        .spinner.active { display: flex; }
        .spinner-circle { width: 20px; height: 20px; border: 2px solid #E5E7EB; border-top-color: #667eea; border-radius: 50%; animation: spin 1s linear infinite; }
        .btn-primary .spinner { color: #fff; }
        .btn-primary .spinner-circle { border-color: rgba(255,255,255,0.4); border-top-color: #fff; }
        .generate-progress { margin-top: 0.75rem; display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.85rem; border: 1px solid #DDE7F7; border-radius: 10px; background: #F8FBFF; color: #1F2937; }
        .generate-progress[hidden] { display: none !important; }
        .generate-progress__ring { width: 22px; height: 22px; flex: 0 0 22px; border: 2px solid #DBEAFE; border-top-color: #667eea; border-radius: 50%; animation: spin 0.9s linear infinite; }
        .generate-progress__copy { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
        .generate-progress__copy strong { font-size: 0.88rem; color: #1F2937; line-height: 1.3; }
        .generate-progress__copy span { font-size: 0.78rem; color: #6B7280; line-height: 1.45; }
        @keyframes spin { to { transform: rotate(360deg); } }
        @media (prefers-reduced-motion: reduce) {
            .spinner-circle, .generate-progress__ring { animation: none; }
        }
        .footer { text-align: center; padding: 2rem; color: #9CA3AF; font-size: 0.875rem; }

        .confirm-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 9998; display: none; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s ease; }
        .confirm-overlay.active { display: flex; opacity: 1; }
        .confirm-modal { background: #fff; border-radius: 12px; width: 92%; max-width: 720px; max-height: 85vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.15); transform: translateY(20px); transition: transform 0.25s ease; }
        .confirm-overlay.active .confirm-modal { transform: translateY(0); }
        .confirm-header { padding: 1rem 1.25rem; border-bottom: 1px solid #E5E7EB; display: flex; align-items: center; justify-content: space-between; background: #F8FAFC; }
        .confirm-header h3 { font-size: 1rem; font-weight: 600; color: #1F2937; display: flex; align-items: center; gap: 0.5rem; }
        .confirm-close { width: 28px; height: 28px; border: none; background: none; cursor: pointer; font-size: 1.25rem; color: #9CA3AF; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
        .confirm-close:hover { background: #F3F4F6; color: #374151; }
        .confirm-body { padding: 1rem 1.25rem; overflow-y: auto; flex: 1; }
        .confirm-field { margin-bottom: 1rem; }
        .confirm-field:last-child { margin-bottom: 0; }
        .confirm-field-label { font-size: 0.8rem; font-weight: 600; color: #374151; margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.4rem; }
        .confirm-field-value { font-size: 0.9rem; color: #1F2937; background: #F8FAFC; padding: 0.5rem 0.75rem; border-radius: 6px; border: 1px solid #E5E7EB; line-height: 1.4; }
        .conf-badge { font-size: 0.65rem; padding: 0.1rem 0.4rem; border-radius: 999px; font-weight: 600; display: inline-flex; align-items: center; gap: 0.2rem; }
        .conf-high { background: #DCFCE7; color: #166534; }
        .conf-medium { background: #FEF3C7; color: #92400E; }
        .conf-low { background: #FEE2E2; color: #991B1B; }
        .conf-icon { font-size: 0.7rem; }
        .confirm-suggestions { margin-top: 0.4rem; display: flex; flex-direction: column; gap: 0.3rem; }
        .confirm-suggestion-item { padding: 0.5rem 0.75rem; border: 1.5px solid #E5E7EB; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-size: 0.85rem; transition: all 0.15s; }
        .confirm-suggestion-item:hover { border-color: #3B82F6; background: #EFF6FF; }
        .confirm-suggestion-item.selected { border-color: #3B82F6; background: #EFF6FF; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
        .confirm-suggestion-item .label { font-weight: 500; }
        .confirm-suggestion-item .meta { display: flex; align-items: center; gap: 0.3rem; font-size: 0.7rem; color: #6B7280; }
        .confirm-manual-input { margin-top: 0.5rem; }
        .confirm-manual-input input { width: 100%; border: 1.5px solid #D1D5DB; border-radius: 6px; padding: 0.5rem 0.75rem; font-size: 0.85rem; font-family: inherit; }
        .confirm-manual-input input:focus { outline: none; border-color: #3B82F6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
        .confirm-footer { padding: 1rem 1.25rem; border-top: 1px solid #E5E7EB; display: flex; gap: 0.5rem; justify-content: flex-end; background: #F9FAFB; }

        .candidate-card { padding: 0.75rem 1rem; border: 2px solid #E5E7EB; border-radius: 10px; cursor: pointer; transition: all 0.15s; display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.5rem; }
        .candidate-card:hover { border-color: #93C5FD; background: #F0F7FF; }
        .candidate-card.selected { border-color: #3B82F6; background: #EFF6FF; box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }
        .candidate-radio { width: 18px; height: 18px; border: 2px solid #D1D5DB; border-radius: 50%; flex-shrink: 0; margin-top: 0.25rem; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
        .candidate-card.selected .candidate-radio { border-color: #3B82F6; background: #3B82F6; }
        .candidate-card.selected .candidate-radio::after { content: ''; width: 6px; height: 6px; background: white; border-radius: 50%; }
        .candidate-content { flex: 1; min-width: 0; }
        .candidate-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.3rem; }
        .candidate-label { font-size: 0.8rem; font-weight: 600; color: #374151; }
        .candidate-desc { font-size: 0.9rem; color: #1F2937; line-height: 1.5; word-break: break-all; }
        .ai-candidate-card { border-color: #BFDBFE; background: #F8FAFC; }
        .ai-candidate-card:hover { background: #F0F7FF; }
        .ai-candidate-summary { font-size: 0.94rem; line-height: 1.65; color: #111827; padding: 0.65rem 0.75rem; border: 1px solid #DBEAFE; background: #FFFFFF; border-radius: 8px; word-break: break-word; }
        .ai-candidate-warning { margin-top: 0.65rem; padding: 0.55rem 0.7rem; border: 1px solid #FCD34D; border-radius: 8px; background: #FFFBEB; color: #92400E; font-size: 0.82rem; line-height: 1.5; }
        .ai-candidate-section { margin-top: 0.75rem; }
        .ai-candidate-section-title { margin-bottom: 0.45rem; font-size: 0.78rem; font-weight: 700; color: #374151; }
        .ai-candidate-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
        .ai-candidate-field { padding: 0.55rem 0.65rem; border: 1px solid #E5E7EB; border-radius: 8px; background: #FFFFFF; min-width: 0; }
        .ai-candidate-field.is-warning { border-color: #FCD34D; background: #FFFBEB; }
        .ai-candidate-field span { display: block; font-size: 0.72rem; color: #6B7280; margin-bottom: 0.2rem; }
        .ai-candidate-field strong { display: block; font-size: 0.84rem; line-height: 1.4; color: #1F2937; font-weight: 600; word-break: break-word; }
        .ai-candidate-field strong.is-muted { color: #9CA3AF; font-weight: 500; }
        @media (max-width: 768px) { .confirm-modal { width: 94%; max-width: 94%; } .ai-candidate-fields { grid-template-columns: 1fr; } }
        .candidate-custom { margin-top: 0.5rem; padding-top: 0.75rem; border-top: 1px dashed #E5E7EB; }
        .candidate-custom textarea { width: 100%; border: 1.5px solid #D1D5DB; border-radius: 8px; padding: 0.6rem 0.75rem; font-size: 0.85rem; font-family: inherit; resize: vertical; min-height: 60px; line-height: 1.5; }
        .candidate-custom textarea:focus { outline: none; border-color: #3B82F6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
        .candidate-none { text-align: center; padding: 2rem; color: #9CA3AF; font-size: 0.9rem; }
        
        .contract-number-wrapper { display: flex; align-items: center; gap: 0.5rem; position: relative; }
        .contract-number-wrapper input { flex: 1; }
        .contract-number-info { cursor: pointer; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; transition: background 0.15s; flex-shrink: 0; user-select: none; background: #DBEAFE; color: #2563EB; }
        .contract-number-info svg { width: 14px; height: 14px; flex-shrink: 0; }
        .contract-number-info:hover { background: #BFDBFE; }
        .contract-number-info:active { background: rgba(37,99,235,0.2); }
        
        .quick-panel { order: 4; margin-bottom: 1.5rem; }
        .quick-panel-toggle { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1.25rem; background: white; border-radius: 12px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); cursor: pointer; user-select: none; transition: all 0.2s; }
        .quick-panel-toggle:hover { box-shadow: 0 4px 8px rgba(0,0,0,0.08); }
        .quick-panel-toggle:active { transform: scale(0.98); }
        .quick-toggle-left { display: flex; align-items: center; gap: 0.75rem; }
        .quick-toggle-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; color: white; font-size: 0.85rem; font-weight: 600; }
        .quick-toggle-text { font-size: 0.9rem; color: #1F2937; font-weight: 500; }
        .quick-toggle-count { font-size: 0.75rem; color: #9CA3AF; background: #F3F4F6; padding: 0.125rem 0.5rem; border-radius: 10px; }
        .quick-toggle-icon { width: 20px; height: 20px; transition: transform 0.3s; color: #9CA3AF; }
        .quick-toggle-icon.expanded { transform: rotate(180deg); }
        .quick-panel-content { max-height: 0; overflow: hidden; transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.35s ease; opacity: 0; margin-top: 0; }
        .quick-panel-content.expanded { max-height: 800px; opacity: 1; margin-top: 1rem; }
        .quick-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
        .quick-stat { background: white; padding: 1rem; border-radius: 12px; text-align: center; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
        .quick-stat-value { font-size: 1.5rem; font-weight: 700; color: #1F2937; }
        .quick-stat-label { font-size: 0.8rem; color: #9CA3AF; margin-top: 0.25rem; }
        .quick-list { background: white; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); overflow: hidden; }
        .quick-list-header { padding: 0.875rem 1.25rem; border-bottom: 1px solid #F0F0F0; font-weight: 600; color: #1F2937; font-size: 0.85rem; }
        .quick-list-item { padding: 0.75rem 1.25rem; border-bottom: 1px solid #F5F5F5; cursor: pointer; transition: all 0.2s; display: flex; justify-content: space-between; align-items: center; }
        .quick-list-item:hover { background: #F9FAFB; }
        .quick-list-item:last-child { border-bottom: none; }
        .quick-item-title { font-size: 0.85rem; color: #1F2937; font-weight: 500; }
        .quick-item-meta { font-size: 0.75rem; color: #9CA3AF; margin-top: 0.25rem; }
        .quick-item-time { font-size: 0.7rem; color: #9CA3AF; white-space: nowrap; margin-left: 1rem; }
        @media (max-width: 768px) { .quick-stats { grid-template-columns: repeat(2, 1fr); } .quick-toggle-text { font-size: 0.85rem; } }
        .edit-drawer-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.3); z-index: 999; display: none; }
        .edit-drawer-overlay.active { display: block; }
        .edit-drawer { position: fixed; top: 0; right: 0; width: 680px; max-width: 90vw; height: 100vh; background: #fff; z-index: 1000; transform: translateX(100%); transition: transform 0.3s ease; display: flex; flex-direction: column; box-shadow: -4px 0 24px rgba(0,0,0,0.12); }
        .edit-drawer.active { transform: translateX(0); }
        .edit-drawer-header { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1.25rem; border-bottom: 1px solid #E5E7EB; background: #F9FAFB; min-height: 52px; }
        .edit-drawer-header h3 { margin: 0; font-size: 0.9rem; color: #1F2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; margin-right: 0.75rem; }
        .edit-drawer-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #6B7280; padding: 0; line-height: 1; }
        .edit-drawer-close:hover { color: #1F2937; }
        .edit-drawer-body { flex: 1; overflow-y: auto; padding: 1.5rem; }
        .edit-drawer-body .card { box-shadow: none; padding: 0; margin-bottom: 0; border-radius: 0; }
        .edit-drawer-body .card-header { margin-bottom: 1rem; padding: 0; }
        .edit-drawer-body .card-header h3 { font-size: 0.95rem; padding-bottom: 0.5rem; margin-bottom: 0; color: #1F2937; font-weight: 700; border-bottom: 2px solid #F0F0F0; }
        .edit-drawer-body .edit-section { padding: 0; margin: 0; border: none; background: none; border-radius: 0; }
        .edit-drawer-body .download-section { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #F0F0F0; }
        .edit-drawer-body .download-section .card-header { display: none; }
        .edit-drawer-body .form-group { margin-bottom: 1rem; }
        .edit-drawer-body .form-group label { display: block; margin-bottom: 0.4rem; font-size: 0.8rem; font-weight: 600; color: #4B5563; }
        .edit-drawer-body .form-group input[type="text"], .edit-drawer-body .form-group select { width: 100%; padding: 0.5rem 0.75rem; font-size: 0.85rem; border-radius: 8px; border: 1px solid #D1D5DB; }
        .edit-drawer-body .form-group textarea { width: 100%; padding: 0.5rem 0.75rem; font-size: 0.85rem; border-radius: 8px; border: 1px solid #D1D5DB; min-height: 120px !important; resize: vertical; }
        .edit-drawer-body .grid-4 { grid-template-columns: repeat(2, 1fr) !important; gap: 1rem; }
        .edit-drawer-body .grid-2 { grid-template-columns: repeat(2, 1fr) !important; gap: 1rem; }
        .edit-drawer-body .form-group input[readonly] { background: #F9FAFB; cursor: default; }
        .edit-drawer-body #saveChangesBtn { display: none !important; }
        .ai-review-inline-panel { margin-bottom: 1rem; padding: 0.75rem 0.9rem; border: 1px solid #FCA5A5; border-radius: 8px; background: #FEF2F2; color: #7F1D1D; line-height: 1.55; }
        .ai-review-inline-panel strong { display: block; margin-bottom: 0.25rem; font-size: 0.88rem; color: #991B1B; }
        .ai-review-inline-panel p { margin: 0; font-size: 0.82rem; }
        .ai-review-summary { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid #FECACA; color: #374151; font-size: 0.8rem; word-break: break-word; }
        .edit-drawer-body .form-group.is-ai-warning label { color: #B91C1C; }
        .edit-drawer-body .form-group.is-ai-warning input[type="text"],
        .edit-drawer-body .form-group.is-ai-warning select,
        .edit-drawer-body .form-group.is-ai-warning textarea { border-color: #EF4444; background: #FFF7F7; box-shadow: 0 0 0 3px rgba(239,68,68,0.08); }
        .ai-review-field-hint { margin-top: 0.35rem; color: #B91C1C; font-size: 0.76rem; line-height: 1.45; }
        .ai-review-contract-candidates { margin: -0.4rem 0 0.9rem; padding: 0.65rem; border: 1px solid #FDE68A; border-radius: 8px; background: #FFFBEB; display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
        .ai-review-contract-candidates > span { width: 100%; color: #92400E; font-size: 0.76rem; font-weight: 700; }
        .ai-review-contract-candidates button { max-width: 100%; padding: 0.4rem 0.55rem; border: 1px solid #F59E0B; border-radius: 7px; background: #fff; color: #92400E; font-size: 0.78rem; font-weight: 700; cursor: pointer; text-align: left; }
        .ai-review-contract-candidates button:hover { background: #FEF3C7; }
        .ai-review-contract-candidates small { display: block; margin-top: 0.15rem; color: #6B7280; font-weight: 500; line-height: 1.35; }
        .ai-review-extra-field { margin-top: 0; }
        .edit-drawer-footer { padding: 1rem 1.5rem; border-top: 1px solid #E5E7EB; display: flex; flex-direction: column; gap: 1.25rem; background: #F9FAFB; }
        .edit-drawer-footer .btn-row { display: flex; gap: 0.75rem; }
        .edit-drawer-footer .btn { flex: 1; padding: 0.75rem 1.5rem; font-size: 0.875rem; }
        .edit-drawer-footer .drawer-download-link { display: block; width: 100%; text-align: center; padding: 0.75rem 1.5rem; border-radius: 12px; font-size: 0.875rem; font-weight: 600; text-decoration: none; transition: all 0.2s; box-sizing: border-box; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; cursor: pointer; border: none; }
        .edit-drawer-footer .drawer-download-link:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(102,126,234,0.4); }
        .download-pulse { animation: downloadPulse 0.5s ease 3; }
        @keyframes downloadPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.4); } 50% { box-shadow: 0 0 0 8px rgba(59,130,246,0); } }
        .contract-suggest { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #D1D5DB; border-radius: 0.5rem; max-height: 200px; overflow-y: auto; z-index: 1000; display: none; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
        .contract-suggest.active { display: block; }
        .contract-suggest-item { padding: 0.6rem 1rem; cursor: pointer; transition: background 0.15s; border-bottom: 1px solid #F3F4F6; }
        .contract-suggest-item:hover { background: #EFF6FF; }
        .contract-suggest-item:last-child { border-bottom: none; }
        .contract-suggest-item .cs-number { font-weight: 600; color: #1F2937; font-size: 0.85rem; }
        .contract-suggest-item .cs-unit { font-size: 0.75rem; color: #6B7280; }
        .unit-suggest-host { position: relative; }
        .unit-suggest { position: absolute; top: calc(100% - 0.15rem); left: 0; right: 0; z-index: 1200; display: none; max-height: 220px; overflow-y: auto; border: 1px solid #D1D5DB; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(15,23,42,0.12); }
        .unit-suggest.active { display: block; }
        .unit-suggest button { width: 100%; padding: 0.55rem 0.75rem; border: 0; border-bottom: 1px solid #F3F4F6; background: #fff; text-align: left; cursor: pointer; }
        .unit-suggest button:last-child { border-bottom: 0; }
        .unit-suggest button:hover { background: #EFF6FF; }
        .unit-suggest strong { display: block; color: #1F2937; font-size: 0.82rem; line-height: 1.35; word-break: break-word; }
        .unit-suggest span { display: block; margin-top: 0.15rem; color: #6B7280; font-size: 0.74rem; line-height: 1.3; }
        
        /* ===== Announcement System - Redesigned ===== */
        .announcement-section { 
            position: fixed; 
            top: 56px; 
            left: 50%; 
            transform: translateX(-50%); 
            width: min(720px, calc(100vw - 32px));
            max-height: calc(100vh - 80px);
            background: #fff;
            border-radius: 0 0 16px 16px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.08);
            display: none;
            flex-direction: column;
            z-index: 1050;
            overflow: hidden;
            border: 1px solid #E5E7EB;
            border-top: 3px solid #4E5FF8;
        }
        .announcement-section.active { 
            display: flex; 
            animation: annPanelSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1); 
        }
        @keyframes annPanelSlide { 
            from { opacity: 0; transform: translateX(-50%) translateY(-16px); } 
            to { opacity: 1; transform: translateX(-50%) translateY(0); } 
        }
        
        .ann-panel-header { 
            display: flex; 
            justify-content: space-between; 
            align-items: center; 
            padding: 1rem 1.5rem; 
            background: linear-gradient(135deg, #FAFBFF 0%, #F5F7FF 100%);
            border-bottom: 1px solid #EEF0F8;
            flex-shrink: 0;
        }
        .ann-panel-header-left { display: flex; align-items: center; gap: 0.75rem; }
        .ann-panel-icon { 
            width: 36px; height: 36px; 
            background: linear-gradient(135deg, #4E5FF8 0%, #6C63FF 100%);
            border-radius: 10px; 
            display: flex; align-items: center; justify-content: center;
            font-size: 1.1rem;
            box-shadow: 0 4px 12px rgba(78,95,248,0.3);
        }
        .ann-panel-title { font-size: 1rem; font-weight: 700; color: #1F2937; }
        .ann-panel-subtitle { font-size: 0.75rem; color: #9CA3AF; margin-top: 1px; }
        .ann-panel-actions { display: flex; align-items: center; gap: 0.5rem; }
        
        .ann-panel-close { 
            width: 32px; height: 32px; 
            border: none; background: rgba(0,0,0,0.05); 
            border-radius: 8px; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            color: #6B7280; font-size: 1.1rem;
            transition: all 0.2s;
        }
        .ann-panel-close:hover { background: rgba(0,0,0,0.1); color: #1F2937; }
        
        .ann-panel-body { 
            flex: 1; 
            overflow-y: auto; 
            padding: 0;
            min-height: 120px;
            max-height: 480px;
        }
        .ann-panel-body::-webkit-scrollbar { width: 5px; }
        .ann-panel-body::-webkit-scrollbar-track { background: transparent; }
        .ann-panel-body::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 3px; }
        .ann-panel-body::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }
        
        .ann-item { 
            padding: 1rem 1.5rem; 
            cursor: pointer; 
            transition: all 0.2s; 
            border-bottom: 1px solid #F3F4F6; 
            display: flex; 
            gap: 1rem;
            position: relative;
        }
        .ann-item:last-child { border-bottom: none; }
        .ann-item:hover { background: #F9FAFB; }
        
        .ann-item-indicator { 
            width: 4px; 
            border-radius: 2px; 
            flex-shrink: 0;
            align-self: stretch;
            margin-top: 4px;
        }
        .ann-item.unread .ann-item-indicator { background: #4E5FF8; }
        .ann-item.is-top .ann-item-indicator { background: #F59E0B; }
        .ann-item:not(.unread):not(.is-top) .ann-item-indicator { background: transparent; }
        
        .ann-item-content { flex: 1; min-width: 0; }
        .ann-item-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; margin-bottom: 4px; }
        .ann-item-title { 
            font-size: 0.9rem; 
            color: #1F2937; 
            font-weight: 600; 
            flex: 1;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .ann-item.unread .ann-item-title { color: #111827; font-weight: 700; }
        .ann-item-time { 
            font-size: 0.7rem; 
            color: #9CA3AF; 
            white-space: nowrap; 
            flex-shrink: 0;
            font-variant-numeric: tabular-nums;
        }
        .ann-item-excerpt { 
            font-size: 0.8rem; 
            color: #6B7280; 
            line-height: 1.5; 
            display: -webkit-box; 
            -webkit-line-clamp: 2; 
            -webkit-box-orient: vertical; 
            overflow: hidden;
            margin-bottom: 6px;
        }
        .ann-item-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
        .ann-tag { 
            display: inline-block; 
            padding: 1px 8px; 
            border-radius: 10px; 
            font-size: 0.65rem; 
            font-weight: 600;
            letter-spacing: 0.02em;
        }
        .ann-tag-category { background: #EEF2FF; color: #4E5FF8; }
        .ann-tag-top { background: #FEF3C7; color: #D97706; }
        .ann-tag-urgent { background: #FEF2F2; color: #EF4444; }
        .ann-tag-high { background: #FFF7ED; color: #F59E0B; }
        
        .ann-item-unread-badge {
            width: 8px; height: 8px;
            background: #4E5FF8;
            border-radius: 50%;
            position: absolute;
            top: 1.25rem;
            right: 1.5rem;
            box-shadow: 0 0 0 3px rgba(78,95,248,0.15);
        }
        
        .ann-empty { 
            padding: 3rem 1.5rem; 
            text-align: center; 
            color: #9CA3AF; 
            font-size: 0.85rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.75rem;
        }
        .ann-empty-icon { font-size: 2.5rem; opacity: 0.4; }
        
        .ann-panel-footer {
            padding: 0.75rem 1.5rem;
            border-top: 1px solid #EEF0F8;
            background: #FAFBFF;
            display: flex;
            justify-content: center;
            flex-shrink: 0;
        }
        .ann-panel-footer-btn {
            font-size: 0.8rem;
            color: #4E5FF8;
            cursor: pointer;
            font-weight: 600;
            background: none;
            border: none;
            padding: 0.5rem 1.5rem;
            border-radius: 8px;
            transition: all 0.2s;
        }
        .ann-panel-footer-btn:hover { background: #EEF2FF; }
        
        /* Backdrop */
        .ann-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.2);
            z-index: 1040;
            display: none;
            backdrop-filter: blur(2px);
            -webkit-backdrop-filter: blur(2px);
        }
        .ann-backdrop.active { display: block; animation: annBackdropIn 0.3s ease; }
        @keyframes annBackdropIn { from { opacity: 0; } to { opacity: 1; } }
        
        /* Announcement Detail Modal - Redesigned */
        .ann-detail-overlay { 
            position: fixed; 
            inset: 0; 
            background: rgba(15, 23, 42, 0.6); 
            z-index: 1199; 
            display: none; 
            align-items: center; 
            justify-content: center; 
            padding: 2rem;
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
        }
        .ann-detail-overlay.active { display: flex; }
        .ann-detail-modal { 
            background: #fff; 
            border-radius: 20px; 
            width: 680px; 
            max-width: 100%; 
            max-height: 85vh; 
            display: flex; 
            flex-direction: column; 
            box-shadow: 0 25px 80px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.1); 
            animation: annDetailIn 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
            overflow: hidden;
        }
        @keyframes annDetailIn { 
            from { opacity: 0; transform: scale(0.92) translateY(20px); } 
            to { opacity: 1; transform: scale(1) translateY(0); } 
        }
        .ann-detail-header { 
            display: flex; 
            justify-content: space-between; 
            align-items: flex-start; 
            padding: 1.5rem 2rem 1rem; 
            gap: 1rem;
        }
        .ann-detail-header h2 { 
            margin: 0; 
            font-size: 1.25rem; 
            font-weight: 700; 
            color: #111827; 
            flex: 1;
            line-height: 1.4;
        }
        .ann-detail-close { 
            width: 36px; height: 36px; 
            background: #F3F4F6; 
            border: none; 
            font-size: 1.2rem; 
            color: #6B7280; 
            cursor: pointer; 
            border-radius: 10px; 
            display: flex; 
            align-items: center; 
            justify-content: center; 
            transition: all 0.2s;
            flex-shrink: 0;
        }
        .ann-detail-close:hover { background: #E5E7EB; color: #1F2937; }
        
        .ann-detail-meta { 
            padding: 0.5rem 2rem 1rem; 
            display: flex; 
            flex-wrap: wrap; 
            gap: 1rem; 
            font-size: 0.8rem; 
            color: #6B7280;
            border-bottom: 1px solid #F3F4F6;
        }
        .ann-detail-meta-item { display: flex; align-items: center; gap: 0.375rem; }
        .ann-detail-meta-item svg { width: 14px; height: 14px; opacity: 0.6; }
        
        .ann-detail-body { 
            flex: 1; 
            overflow-y: auto; 
            padding: 1.5rem 2rem; 
            line-height: 1.85; 
            font-size: 0.925rem; 
            color: #374151;
        }
        .ann-detail-body::-webkit-scrollbar { width: 5px; }
        .ann-detail-body::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 3px; }
        .ann-detail-body p { margin-bottom: 1rem; }
        .ann-detail-body img { max-width: 100%; border-radius: 10px; margin: 1rem 0; }
        
        .ann-detail-footer { 
            padding: 1rem 2rem 1.25rem; 
            border-top: 1px solid #F3F4F6; 
            display: flex; 
            justify-content: flex-end; 
            gap: 0.75rem;
            background: #FAFBFC;
        }
        .ann-detail-footer button { 
            padding: 0.625rem 1.75rem; 
            border: none; 
            border-radius: 10px; 
            font-weight: 600; 
            cursor: pointer; 
            transition: all 0.2s;
            font-size: 0.875rem;
        }
        .ann-modal-btn { 
            background: linear-gradient(135deg, #4E5FF8 0%, #6C63FF 100%); 
            color: #fff; 
            box-shadow: 0 4px 12px rgba(78,95,248,0.3);
        }
        .ann-modal-btn:hover { 
            transform: translateY(-1px);
            box-shadow: 0 6px 16px rgba(78,95,248,0.4);
        }
        .ann-modal-btn:active { transform: translateY(0); }
        
        @media (max-width: 768px) {
            .contract-drawer { width: 100vw; max-width: 100vw; }
            .announcement-section { 
                top: 52px; 
                width: calc(100vw - 16px); 
                border-radius: 0 0 12px 12px; 
            }
            .ann-item { padding: 0.75rem 1rem; }
            .ann-item-title { font-size: 0.8rem; }
            .ann-detail-modal { max-height: 95vh; border-radius: 12px; width: 95vw; }
            .ann-detail-header { padding: 1rem 1.25rem 0.75rem; }
            .ann-detail-body { padding: 1rem 1.25rem; }
            .ann-detail-footer { padding: 0.75rem 1.25rem 1rem; }
        }

        /* === 罚款单/开工令模块样式（card 风格，参照联络单） === */
        .card-header-flex { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
        .card-header-flex h3 { margin-bottom: 0; flex: 1; min-width: 0; }
        .btn-sm { padding: 0.5rem 0.875rem; font-size: 0.85rem; border-radius: 8px; }
        .date-shortcuts { display: flex; gap: 0.3rem; margin-top: 0.4rem; }
        .date-shortcuts button { padding: 0.25rem 0.6rem; font-size: 0.75rem; border: 1px solid #E5E7EB; background: #fff; color: #6B7280; border-radius: 6px; cursor: pointer; transition: all 0.15s; }
        .date-shortcuts button:hover { border-color: #667eea; color: #667eea; background: #F5F7FF; }
        .form-group input[type="date"] { width: 100%; padding: 0.875rem; border: 1px solid #E5E7EB; border-radius: 12px; font-size: 1rem; font-family: inherit; }
        .form-group input[type="date"]:focus { border-color: #667eea; outline: none; box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
        .form-group input[type="number"] { width: 100%; padding: 0.875rem; border: 1px solid #E5E7EB; border-radius: 12px; font-size: 1rem; font-family: inherit; }
        .form-group input[type="number"]:focus { border-color: #667eea; outline: none; box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
        .form-group textarea { width: 100%; padding: 0.875rem; border: 1px solid #E5E7EB; border-radius: 12px; font-size: 1rem; font-family: inherit; resize: vertical; min-height: 100px; }
        .form-group textarea:focus { border-color: #667eea; outline: none; box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
        .material-quick-fill { margin-bottom: 1.1rem; padding: 0.9rem; border: 1px solid #C7D2FE; border-radius: 10px; background: #F8FAFC; }
        .material-quick-fill__head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.65rem; }
        .material-quick-fill__title { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
        .material-quick-fill__title strong { color: #1F2937; font-size: 0.95rem; white-space: nowrap; }
        .material-quick-fill__title span { padding: 0.12rem 0.45rem; border: 1px solid #D1D5DB; border-radius: 999px; color: #6B7280; background: #fff; font-size: 0.72rem; line-height: 1.4; white-space: nowrap; }
        .material-quick-fill__actions { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; justify-content: flex-end; }
        .material-quick-fill textarea { width: 100%; min-height: 88px; resize: vertical; box-sizing: border-box; border: 1px solid #CBD5E1; border-radius: 8px; padding: 0.75rem 0.85rem; font: inherit; line-height: 1.55; background: #fff; transition: border-color 0.15s, box-shadow 0.15s; }
        .material-quick-fill textarea:focus { border-color: #667eea; outline: none; box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
        .material-quick-fill__foot { min-height: 1.4rem; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.5rem; color: #6B7280; font-size: 0.78rem; line-height: 1.4; }
        .material-quick-fill__foot span:last-child { text-align: right; min-width: 0; overflow-wrap: anywhere; }
        @media (max-width: 640px) {
            .material-quick-fill__head { align-items: flex-start; flex-direction: column; }
            .material-quick-fill__actions { width: 100%; justify-content: flex-start; }
            .material-quick-fill__actions .btn-sm { flex: 1; min-width: 0; }
            .material-quick-fill__foot { align-items: flex-start; flex-direction: column; gap: 0.25rem; }
            .material-quick-fill__foot span:last-child { text-align: left; }
        }
        .amount-preview { margin-top: 0.35rem; color: #4B5563; font-size: 0.82rem; min-height: 1.2em; }

        /* 结果卡片（默认隐藏，active 时显示） */
        .fine-result-card, .construction-result-card { display: none; }
        .fine-result-card.active, .construction-result-card.active { display: block; }
        .fine-result-row, .construction-result-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
        .fine-result-text, .construction-result-text { flex: 1; min-width: 220px; color: #1F2937; font-size: 0.95rem; line-height: 1.5; }

        /* 最近列表 */
        .recent-list { display: flex; flex-direction: column; gap: 0.5rem; }
        .recent-loading, .recent-empty { padding: 1.5rem; text-align: center; color: #9CA3AF; font-size: 0.875rem; background: #F9FAFB; border-radius: 8px; }
        .recent-item { padding: 0.875rem 1rem; background: #F9FAFB; border: 1px solid #E5E7EB; border-radius: 10px; transition: all 0.15s; }
        .recent-item:hover { background: #F3F4F6; border-color: #C7D2FE; }
        .recent-number { font-size: 0.78rem; color: #667eea; font-weight: 700; margin-bottom: 0.2rem; }
        .recent-title { font-size: 0.9rem; color: #1F2937; font-weight: 500; margin-bottom: 0.3rem; line-height: 1.4; }
        .recent-meta { font-size: 0.78rem; color: #6B7280; margin-bottom: 0.5rem; }
        .recent-actions { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
        .recent-actions .btn-sm { padding: 0.3rem 0.65rem; font-size: 0.75rem; }
        .recent-link { padding: 0.3rem 0.65rem; font-size: 0.75rem; border-radius: 6px; background: #fff; color: #4B5563; border: 1px solid #E5E7EB; text-decoration: none; display: inline-flex; align-items: center; transition: all 0.15s; }
        .recent-link:hover { border-color: #667eea; color: #667eea; background: #F5F7FF; }
        .status-pill { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700; }
        .status-pill.generated { background: #DCFCE7; color: #166534; }
        .status-pill.draft { background: #FEF3C7; color: #92400E; }
        @media (max-width: 768px) {
            .card-header-flex { flex-direction: column; align-items: stretch; gap: 0.5rem; }
            .fine-result-row, .construction-result-row { flex-direction: column; align-items: stretch; }
        }
