.exc-tool-wrapper { --p-bg: #ffffff; --p-border: #e2e8f0; --p-primary: #16a34a; --p-text: #0f172a; width: 100%; max-width: 1200px; margin: 0 auto; background: var(--p-bg); border-radius: 24px; padding: 32px; border: 1px solid var(--p-border); box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05); transition: 0.3s; }
.exc-header-main { font-size: 1.5rem; font-weight: 600; color: var(--p-text); margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.exc-badge { background: #dcfce7; color: #15803d; padding: 4px 12px; border-radius: 30px; font-size: 0.8rem; font-weight: 500; }
.exc-subtitle { color: #64748b; font-size: 0.95rem; padding-bottom: 16px; border-bottom: 1px solid var(--p-border); margin-bottom: 24px; text-align: center; }

.exc-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
@media(max-width: 800px) { 
    .exc-layout { grid-template-columns: 1fr; } 
    .exc-tool-wrapper { padding: 20px; border-radius: 16px; }
}

.exc-card { background: #f8fafc; border-radius: 16px; padding: 24px; border: 1px solid var(--p-border); transition: 0.3s; }
.exc-card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; color: var(--p-text); }
.exc-dropzone { border: 2px dashed #cbd5e1; border-radius: 12px; padding: 32px 16px; text-align: center; cursor: pointer; transition: 0.2s; background: #ffffff; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 160px; }
.exc-dropzone:hover, .exc-dropzone.dragover { border-color: var(--p-primary); background: #f0fdf4; }
.exc-dropzone i { font-size: 2.5rem; color: #94a3b8; margin-bottom: 12px; transition: 0.2s; }
.exc-dropzone:hover i { color: var(--p-primary); transform: translateY(-4px); }
.exc-file-name { font-weight: 600; color: #475569; margin-bottom: 4px; word-break: break-all; }
.exc-file-tip { font-size: 0.8rem; color: #94a3b8; }

.exc-select { width: 100%; margin-top: 16px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; outline: none; font-size: 0.95rem; background: #ffffff; color: var(--p-text); display: none; }
.exc-select:focus { border-color: var(--p-primary); box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1); }

.exc-actions { display: flex; justify-content: center; gap: 16px; margin-bottom: 24px; }
.exc-btn { padding: 12px 32px; border: none; border-radius: 40px; font-weight: 600; font-size: 1.05rem; cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 8px; }
.exc-btn-primary { background: linear-gradient(135deg, var(--p-primary), #15803d); color: white; box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3); }
.exc-btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4); }
.exc-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.exc-btn-secondary { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.exc-btn-secondary:hover { background: #e2e8f0; }

.exc-legend { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; font-size: 0.9rem; color: #475569; display: none; }
.exc-legend-item { display: flex; align-items: center; gap: 8px; }
.exc-color-box { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0,0,0,0.1); }
.exc-color-mod { background: #fef08a; }
.exc-color-add { background: #dcfce7; }
.exc-color-del { background: #fee2e2; }

.exc-result-wrapper { background: #ffffff; border: 1px solid var(--p-border); border-radius: 16px; overflow: hidden; display: none; }
.exc-result-header { padding: 16px 24px; background: #f8fafc; border-bottom: 1px solid var(--p-border); display: flex; justify-content: space-between; align-items: center; }
.exc-result-title { font-weight: 700; color: var(--p-text); display: flex; align-items: center; gap: 8px; }
.exc-result-summary { font-size: 0.9rem; color: #64748b; background: #ffffff; padding: 4px 12px; border-radius: 20px; border: 1px solid #e2e8f0; }
.exc-table-container { max-height: 600px; overflow: auto; }
.exc-table { border-collapse: collapse; width: 100%; font-size: 0.9rem; font-family: ui-sans-serif, system-ui, -apple-system, sans-serif; }
.exc-table th, .exc-table td { border: 1px solid #e2e8f0; padding: 10px 12px; white-space: nowrap; }
.exc-table th { background: #f1f5f9; color: #475569; font-weight: 600; position: sticky; top: 0; z-index: 10; box-shadow: 0 1px 0 #e2e8f0; }
.exc-table td { color: var(--p-text); }
.exc-table .row-num { background: #f8fafc; color: #64748b; font-weight: 600; text-align: center; position: sticky; left: 0; z-index: 5; box-shadow: 1px 0 0 #e2e8f0; }

.cell-modified { background-color: #fef08a !important; color: #854d0e !important; }
.cell-added { background-color: #dcfce7 !important; color: #166534 !important; }
.cell-removed { background-color: #fee2e2 !important; color: #991b1b !important; }
.cell-old-val { font-size: 0.8rem; color: #94a3b8; text-decoration: line-through; display: block; margin-bottom: 2px; }

[data-theme="dark"] .exc-tool-wrapper { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .exc-card, [data-theme="dark"] .exc-result-header { background: #0f172a; border-color: #475569; }
[data-theme="dark"] .exc-dropzone { background: #1e293b; border-color: #475569; }
[data-theme="dark"] .exc-dropzone:hover, [data-theme="dark"] .exc-dropzone.dragover { background: #064e3b; border-color: var(--p-primary); }
[data-theme="dark"] .exc-file-name { color: #cbd5e1; }
[data-theme="dark"] .exc-select { background: #0f172a; border-color: #475569; color: #f8fafc; }
[data-theme="dark"] .exc-btn-secondary { background: #0f172a; border-color: #475569; color: #cbd5e1; }
[data-theme="dark"] .exc-btn-secondary:hover { background: #334155; }
[data-theme="dark"] .exc-result-wrapper { background: #1e293b; border-color: #475569; }
[data-theme="dark"] .exc-table th, [data-theme="dark"] .exc-table td { border-color: #334155; }
[data-theme="dark"] .exc-table th { background: #0f172a; color: #94a3b8; box-shadow: 0 1px 0 #334155; }
[data-theme="dark"] .exc-table .row-num { background: #0f172a; box-shadow: 1px 0 0 #334155; }
[data-theme="dark"] .exc-result-summary { background: #1e293b; border-color: #475569; color: #94a3b8; }
[data-theme="dark"] .exc-legend { color: #cbd5e1; }

[data-theme="dark"] .cell-modified { background-color: rgba(234, 179, 8, 0.2) !important; color: #fde047 !important; border-color: rgba(234, 179, 8, 0.3) !important; }
[data-theme="dark"] .cell-added { background-color: rgba(34, 197, 94, 0.2) !important; color: #86efac !important; border-color: rgba(34, 197, 94, 0.3) !important; }
[data-theme="dark"] .cell-removed { background-color: rgba(239, 68, 68, 0.2) !important; color: #fca5a5 !important; border-color: rgba(239, 68, 68, 0.3) !important; }
[data-theme="dark"] .cell-old-val { color: #64748b; }