.mv524-workspace, .mv524-extract-layout {
  --mv-surface: #ffffff;
  --mv-soft: #f4f7fa;
  --mv-line: #dce3eb;
  --mv-ink: #172437;
  --mv-muted: #607087;
  --mv-accent: #087f99;
  --mv-selected: #e9f7fb;
  display: grid;
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  gap: 20px;
  min-width: 0;
  color: var(--mv-ink);
}
html[data-theme="dark"] :is(.mv524-workspace, .mv524-extract-layout) {
  --mv-surface: #131c27;
  --mv-soft: #1b2735;
  --mv-line: #3b4c60;
  --mv-ink: #edf3fa;
  --mv-muted: #b2c0d1;
  --mv-accent: #67e8f9;
  --mv-selected: #143d46;
}
[class^="mv524-"] { box-sizing: border-box; }
.mv524-workspace button, .mv524-extract-layout button, .mv524-result-toolbar button, .mv524-dialog button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--mv-line, #dce3eb);
  border-radius: 8px;
  background: var(--mv-surface, #fff);
  color: inherit;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.mv524-workspace button:disabled, .mv524-extract-layout button:disabled, .mv524-dialog button:disabled { opacity: .45; cursor: default; }
.mv524-workspace button:hover:not(:disabled), .mv524-extract-layout button:hover:not(:disabled) { border-color: var(--mv-accent); }
.mv524-accounts, .mv524-account-picker { min-width: 0; padding: 14px; border: 1px solid var(--mv-line); border-radius: 12px; background: var(--mv-soft); align-self: start; }
.mv524-picker-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; }
.mv524-picker-heading span { color: var(--mv-muted); font-size: 11px; white-space: nowrap; }
.mv524-workspace input:not([type="checkbox"]), .mv524-extract-layout input:not([type="checkbox"]), .mv524-extract-layout select, .mv524-workspace select, .mv524-result-toolbar input {
  width: 100%; min-width: 0; min-height: 38px; padding: 8px 10px; border: 1px solid var(--mv-line, #dce3eb);
  border-radius: 8px; background: var(--mv-surface, #fff); color: inherit; font: inherit; font-size: 12px;
}
.mv524-inline { display: flex; gap: 6px; margin: 10px 0; }
.mv524-account-option { display: flex; gap: 9px; align-items: flex-start; padding: 10px 3px; border-bottom: 1px solid var(--mv-line); cursor: pointer; }
.mv524-account-option input { flex: 0 0 auto; margin-top: 3px; accent-color: var(--mv-accent); }
.mv524-account-option > span { display: grid; gap: 3px; min-width: 0; }
.mv524-account-option strong { overflow-wrap: anywhere; font-size: 12px; font-weight: 600; line-height: 1.4; }
.mv524-account-option small { font-size: 11px; color: var(--mv-muted); }
.mv524-workspace .mv524-danger, .mv524-dialog .mv524-danger { color: #b4233d; background: #fff4f5; border-color: #f1c8d0; }
.mv524-remove-accounts { width: 100%; margin-top: 14px; }
.mv524-mail { min-width: 0; }
.mv524-folder-toolbar, .mv524-result-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.mv524-segments { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; border: 1px solid var(--mv-line, #dce3eb); border-radius: 10px; background: var(--mv-soft, #f4f7fa); }
.mv524-segments button { border-color: transparent; background: transparent; }
.mv524-segments button.active { background: var(--mv-surface, #fff); color: var(--mv-accent, #087f99); border-color: var(--mv-line, #dce3eb); box-shadow: 0 1px 3px #1020300a; }
.mv524-filter-form { display: flex; gap: 9px; flex-wrap: wrap; align-items: end; padding: 14px; background: var(--mv-soft); border: 1px solid var(--mv-line); border-radius: 10px; }
.mv524-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 175px; font-size: 11px; font-weight: 600; color: var(--mv-muted, #607087); }
.mv524-field input, .mv524-field select { color: var(--mv-ink, #172437); }
.mv524-message-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 14px 0; }
.mv524-message-actions > span { margin-right: auto; color: var(--mv-muted); font-size: 12px; }
.mv524-table-wrap { width: 100%; min-width: 0; overflow: auto; border: 1px solid var(--mv-line, #dce3eb); border-radius: 10px; }
.mv524-table-wrap table { width: 100%; border-collapse: collapse; font-size: 12px; color: inherit; text-align: left; }
.mv524-table-wrap th { background: var(--mv-soft, #f4f7fa); color: var(--mv-muted, #607087); font-size: 11px; font-weight: 650; padding: 11px 12px; white-space: nowrap; }
.mv524-table-wrap td { border-top: 1px solid var(--mv-line, #dce3eb); padding: 12px; vertical-align: top; }
.mv524-table-wrap tr.selected { background: var(--mv-selected); }
.mv524-message-table { min-width: 650px; table-layout: fixed; }
.mv524-message-table th:first-child { width: 38px; }
.mv524-message-table th:nth-child(2) { width: 28%; }
.mv524-message-table th:last-child { width: 154px; }
.mv524-message-table td strong, .mv524-message-table td small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 500; }
.mv524-message-table td small { margin-top: 4px; font-size: 11px; color: var(--mv-muted); }
.mv524-message-table input[type="checkbox"] { accent-color: var(--mv-accent); }
.mv524-message-table .mv524-subject { display: block; width: 100%; padding: 0; min-height: 24px; border: 0; background: transparent; text-align: left; font-weight: 450; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mv524-message-table .mv524-subject.unread { font-weight: 750; }
.mv524-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; font-size: 12px; color: var(--mv-muted); }
.mv524-pagination label { display: flex; align-items: center; gap: 7px; }
.mv524-pagination select { width: 70px; }
.mv524-pagination > span { margin-right: auto; }
.mv524-empty { padding: 28px 14px !important; text-align: center; color: var(--mv-muted, #607087); font-size: 12px; }
.mv524-muted { color: var(--mv-muted, #607087); font-size: 12px; line-height: 1.6; margin: 12px 0 0; }
.mv524-connect { padding: 12px 16px; margin-bottom: 20px; border: 1px solid #dce3eb; border-radius: 10px; }
.mv524-connect summary { cursor: pointer; font-size: 12px; font-weight: 650; }
.mv524-connect-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 14px; }
.mv524-connect-form :is(input, select) { width: 100%; min-height: 40px; border: 1px solid var(--mv-line, #dce3eb); border-radius: 8px; padding: 8px 10px; }
.mv524-connect-form select { background: var(--mv-surface, #fff); }
.mv524-error, .mv524-notice { padding: 12px 14px; margin: 12px 0; border: 1px solid #f1c8d0; border-radius: 9px; background: #fff4f5; color: #9f1633; font-size: 12px; line-height: 1.6; white-space: pre-line; }
.mv524-notice { background: #edf9f3; border-color: #bfe3d0; color: #18623b; }
.mv524-reader { border: 1px solid var(--mv-line); border-radius: 12px; padding: 20px; margin-top: 20px; }
.mv524-reader h3 { font-size: 19px; font-weight: 700; line-height: 1.5; margin: 0; overflow-wrap: anywhere; }
.mv524-reader-header { overflow-wrap: anywhere; font-size: 12px; line-height: 1.6; margin: 5px 0; }
.mv524-reader .mv524-folder-toolbar { margin-top: 14px; }
.mv524-reader iframe { width: 100%; height: 520px; border: 1px solid var(--mv-line); border-radius: 8px; background: white; }
.mv524-reader pre, .mv524-results-table pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 550px; overflow: auto; font-size: 12px; line-height: 1.7; background: var(--mv-soft, #f4f7fa); border-radius: 8px; padding: 14px; }
.mv524-dialog { width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; border: 1px solid #dce3eb; border-radius: 16px; padding: 24px; background: #fff; color: #172437; margin: auto; }
.mv524-dialog::backdrop { background: #0b172c80; }
.mv524-dialog h2 { font-size: 20px; font-weight: 750; margin: 0 0 10px; }
.mv524-dialog p { font-size: 13px; line-height: 1.7; margin-bottom: 14px; }
.mv524-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.mv524-extractor { display: grid; gap: 24px; }
.mv524-form-grid { display: grid; align-content: start; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.mv524-form-actions { display: flex; align-items: end; justify-content: flex-end; grid-column: 1 / -1; }
.mv524-check-field { display: flex; align-items: center; gap: 8px; color: var(--mv-muted); font-size: 12px; }
.mv524-result-toolbar { justify-content: flex-start; }
.mv524-result-toolbar input { max-width: 230px; margin-right: auto; }
.mv524-results-table { min-width: 700px; table-layout: fixed; }
.mv524-results-table th:first-child { width: 45%; }
.mv524-results-table code { font-size: 12px; overflow-wrap: anywhere; white-space: pre-wrap; }
.mv524-results-table summary { cursor: pointer; overflow-wrap: anywhere; font-family: monospace; font-size: 12px; }
.mv524-results-table td { overflow-wrap: anywhere; }
.mv524-output { box-sizing: border-box; width: 100%; min-height: 320px; padding: 16px; border: 1px solid #dce3eb; border-radius: 10px; font: 12px/1.7 ui-monospace, monospace; background: #f7f9fb; color: #172437; }
html[data-theme="dark"] :is(.mv524-dialog, .mv524-table-wrap, .mv524-result-toolbar, .mv524-connect) { --mv-surface: #131c27; --mv-soft: #1b2735; --mv-line: #3b4c60; --mv-ink: #edf3fa; --mv-muted: #b2c0d1; --mv-accent: #67e8f9; border-color: #3b4c60; color: #edf3fa; }
html[data-theme="dark"] .mv524-dialog { background: #131c27; }
html[data-theme="dark"] :is(.mv524-workspace, .mv524-dialog) .mv524-danger { background: #3a202a; color: #ffb2c0; border-color: #794254; }
html[data-theme="dark"] .mv524-error { background: #3a202a; color: #ffb2c0; border-color: #794254; }
html[data-theme="dark"] .mv524-notice { background: #16332a; color: #a5e8c6; border-color: #305d49; }
html[data-theme="dark"] .mv524-muted { color: #b2c0d1; }
@media (max-width: 1000px) { .mv524-workspace, .mv524-extract-layout { grid-template-columns: 1fr; } .mv524-accounts, .mv524-account-picker { max-height: 300px; overflow: auto; } }
@media (max-width: 620px) { .mv524-form-grid { grid-template-columns: 1fr; } .mv524-field { flex-basis: 100%; } .mv524-message-actions > span { width: 100%; } .mv524-reader { padding: 12px; } .mv524-result-toolbar input { max-width: 100%; flex-basis: 100%; } .mv524-connect-form .mv524-field { flex-basis: 100%; } .mv524-dialog { padding: 18px; } }
