.em-workspace { margin: 0 0 26px; }
.em-topline,.em-toolbar,.em-card-head,.em-dialog-head,.em-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.em-topline { margin:0 0 22px; color:var(--muted); font-size:14px; }
.em-status { display:inline-flex; align-items:center; gap:7px; background:#fff3d8; color:#795215; padding:7px 11px; border-radius:30px; font-size:12px; font-weight:700; }
.em-status::before { content:''; width:7px; height:7px; background:currentColor; border-radius:50%; }
.em-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:24px; }
.em-stat { background:white; border:1px solid var(--line); border-radius:15px; padding:20px; }
.em-stat strong { display:block; font-size:30px; letter-spacing:-1px; margin:8px 0; }
.em-stat span { font-size:12px; color:var(--muted); }
.em-stat b { font-size:13px; font-weight:600; }
.em-tabs { display:flex; overflow:auto; gap:8px; padding:0 0 15px; margin-bottom:20px; border-bottom:1px solid var(--line); }
.em-tabs button { padding:10px 17px; border-radius:8px; background:transparent; color:var(--muted); white-space:nowrap; cursor:pointer; }
.em-tabs button[aria-selected=true] { background:var(--blue-dark); color:white; font-weight:700; }
.em-panel { background:#fff; border:1px solid var(--line); border-radius:16px; padding:24px; }
.em-toolbar { margin-bottom:22px; }
.em-toolbar h3,.em-empty h3 { margin:0 0 7px; font-size:20px; }
.em-toolbar p,.em-empty p { margin:0; color:var(--muted); font-size:14px; line-height:1.6; }
.em-button { display:inline-flex; align-items:center; justify-content:center; gap:6px; border:1px solid var(--line); border-radius:8px; padding:10px 14px; background:white; color:var(--ink); font-size:13px; font-weight:650; cursor:pointer; text-decoration:none; }
.em-button.primary { background:var(--blue-dark); color:white; border-color:var(--blue-dark); }
.em-button.danger { color:#b52b46; }
.em-button:disabled { opacity:.45; cursor:not-allowed; }
.em-empty { padding:55px 22px; text-align:center; background:#fafafa; border-radius:12px; }
.em-empty .em-button { margin-top:20px; }
.em-table-wrap { overflow:auto; }
.em-table { width:100%; border-collapse:collapse; font-size:13px; text-align:left; }
.em-table th { color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.06em; font-weight:600; padding:12px 10px; border-bottom:1px solid var(--line); white-space:nowrap; }
.em-table td { padding:16px 10px; border-bottom:1px solid #edf0f2; vertical-align:middle; }
.em-table td small { display:block; margin-top:5px; color:var(--muted); }
.em-table td strong { font-weight:650; }
.em-badge { display:inline-block; padding:4px 8px; border-radius:20px; background:#f0f2f5; color:#555d68; font-size:11px; white-space:nowrap; }
.em-badge.green { background:#e7f5ed; color:#237342; }
.em-badge.orange { background:#fff4df; color:#865e20; }
.em-badge.red { background:#fce9ee; color:#a42d4d; }
.em-tag { display:inline-block; padding:3px 6px; border:1px solid #e4e6ec; border-radius:4px; margin:2px 3px 2px 0; font-size:11px; }
.em-filters { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:18px; }
.em-filters input,.em-filters select { border:1px solid var(--line); border-radius:8px; background:white; padding:10px 12px; font-size:13px; min-width:0; }
.em-filters input { flex:1; min-width:180px; }
.em-note { background:#f6f7f9; border-radius:10px; padding:13px 16px; color:var(--muted); font-size:13px; line-height:1.65; margin:16px 0; }
.em-note.warning { background:#fff5e2; color:#795215; }
.em-error { border:1px solid #efb8c5; background:#fff2f5; color:#a02c49; padding:14px 17px; border-radius:10px; margin-bottom:18px; font-size:14px; }
.em-list { display:grid; gap:12px; }
.em-card { border:1px solid var(--line); border-radius:12px; padding:18px; }
.em-card h4 { margin:0 0 8px; }
.em-card p { margin:5px 0; line-height:1.6; font-size:13px; color:var(--muted); overflow-wrap:anywhere; }
.em-checklist { padding:0; list-style:none; display:grid; gap:8px; }
.em-checklist li { border-radius:7px; padding:10px 12px; font-size:13px; background:#fff4df; color:#795215; }
.em-checklist li.ok { background:#e7f5ed; color:#237342; }
.em-dialog { border:1px solid var(--line); border-radius:16px; padding:0; max-width:min(960px,calc(100vw - 32px)); width:780px; max-height:90vh; background:#fff; color:var(--ink); box-shadow:0 24px 100px #0004; }
.em-dialog::backdrop { background:#11182788; backdrop-filter:blur(3px); }
.em-dialog-head { position:sticky; top:0; background:#fff; border-bottom:1px solid var(--line); padding:18px 24px; z-index:2; }
.em-dialog-head h3 { margin:0; font-size:19px; }
.em-dialog-head button { background:#f3f4f6; padding:7px 12px; border-radius:8px; cursor:pointer; }
.em-dialog-body { padding:24px; }
.em-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.em-field { display:flex; flex-direction:column; gap:7px; font-size:12px; font-weight:600; min-width:0; }
.em-field.full { grid-column:1/-1; }
.em-field input,.em-field textarea,.em-field select { border:1px solid var(--line); background:white; border-radius:8px; padding:11px 12px; width:100%; font-size:14px; font-weight:400; color:var(--ink); }
.em-field textarea { resize:vertical; min-height:85px; }
.em-field small { color:var(--muted); font-size:11px; font-weight:400; line-height:1.5; }
.em-field textarea.code { font:12px/1.5 ui-monospace,SFMono-Regular,monospace; min-height:180px; }
.em-form-actions { display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap; margin-top:22px; }
.em-preview-wrap { overflow:auto; background:#edf0f4; padding:16px 0; text-align:center; border-radius:10px; margin-top:16px; }
.em-preview-wrap iframe { width:600px; max-width:100%; height:700px; border:0; background:white; transition:width .2s; }
.em-result { margin-top:18px; }
.em-pipeline { display:grid; grid-template-columns:repeat(7,minmax(110px,1fr)); gap:10px; overflow:auto; padding-bottom:12px; }
.em-pipeline button { min-height:105px; background:#f6f7f9; border:1px solid #e8ebef; border-radius:10px; text-align:left; padding:15px; cursor:pointer; }
.em-pipeline button:hover { border-color:var(--blue); }
.em-pipeline span { display:block; color:var(--muted); font-size:12px; min-height:30px; }
.em-pipeline strong { display:block; margin-top:12px; font-size:25px; }
.em-mapping { margin-top:20px; }
.em-mini-summary { display:flex; gap:10px; flex-wrap:wrap; font-size:12px; }
.em-mini-summary span { background:#f0f3f6; border-radius:6px; padding:9px 12px; }
.em-loading { padding:30px; text-align:center; color:var(--muted); }
@media(max-width:800px) { .em-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } .em-panel { padding:16px; } .em-stat { padding:15px; } .em-dialog-body { padding:18px; } }
@media(max-width:500px) { .em-form-grid { grid-template-columns:1fr; } .em-stat strong { font-size:26px; } .em-filters select { flex:1; } .em-dialog { max-width:calc(100vw - 16px); } .em-dialog-head { padding:15px 18px; } }
