.mk-email-home-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mk-email-home-heading > span { min-width: 0; }

.mk-email-home-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    flex: 0 0 auto;
    padding: 0 11px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}

.mk-email-home-button:hover { background: #dbeafe; border-color: #bfdbfe; }
.mk-email-home-button:active { transform: scale(.97); }
.mk-email-home-button:focus-visible,
.mk-email-close:focus-visible { outline: 3px solid #60a5fa; outline-offset: 2px; }

.mk-email-home-status {
    border-radius: 999px;
    padding: 2px 6px;
    background: #fff;
    color: #64748b;
    font-size: 9px;
    font-weight: 800;
}

.mk-email-workspace[hidden] { display: none !important; }
.mk-email-workspace {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    padding: max(0px, env(safe-area-inset-top)) max(0px, env(safe-area-inset-right)) max(0px, env(safe-area-inset-bottom)) max(0px, env(safe-area-inset-left));
    background: #f1f5f9;
    color: #172033;
    font-family: inherit;
}

.mk-email-shell { display: flex; min-width: 0; min-height: 0; width: 100%; flex-direction: column; overflow: hidden; }
.mk-email-topbar {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto auto;
    align-items: center;
    gap: 20px;
    min-height: 76px;
    padding: 12px 22px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.mk-email-brand { display: flex; align-items: center; min-width: 0; gap: 12px; }
.mk-email-brand-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 14px; background: #eaf2ff; color: #2563eb; font-size: 17px; }
.mk-email-brand-copy { min-width: 0; }
.mk-email-brand h1 { margin: 0; color: #111827; font-size: 17px; font-weight: 900; line-height: 1.2; }
.mk-email-brand p { margin: 4px 0 0; color: #64748b; font-size: 11px; }
.mk-email-account { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mk-email-account-address { overflow: hidden; color: #334155; font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.mk-email-connection-state { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; border: 1px solid #fed7aa; border-radius: 999px; padding: 6px 10px; background: #fff7ed; color: #9a3412; font-size: 10px; font-weight: 800; }
.mk-email-connection-state > span { width: 7px; height: 7px; border-radius: 50%; background: #f97316; }
.mk-email-close { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; color: #334155; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.mk-email-close:hover { background: #f8fafc; }

.mk-email-layout { display: grid; min-height: 0; flex: 1; grid-template-columns: 220px minmax(260px, 360px) minmax(0, 1fr); }
.mk-email-sidebar { display: flex; min-height: 0; flex-direction: column; padding: 20px 12px; border-right: 1px solid #e2e8f0; background: #f8fafc; }
.mk-email-sidebar-title { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 12px; color: #64748b; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.mk-email-folder-lock { color: #94a3b8; }
.mk-email-folders { display: grid; gap: 5px; }
.mk-email-folder { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 11px; border: 0; border-radius: 11px; background: transparent; color: #64748b; text-align: left; font: inherit; font-size: 12px; font-weight: 700; }
.mk-email-folder > i { width: 17px; text-align: center; }
.mk-email-folder.is-current { background: #e8efff; color: #1d4ed8; }
.mk-email-folder:disabled { cursor: not-allowed; opacity: .72; }
.mk-email-folder-count { margin-left: auto; color: #94a3b8; }
.mk-email-sidebar-note { display: flex; align-items: flex-start; gap: 8px; margin: auto 4px 0; padding: 12px; border: 1px solid #e2e8f0; border-radius: 13px; background: #fff; color: #64748b; }
.mk-email-sidebar-note > i { margin-top: 2px; color: #3b82f6; }
.mk-email-sidebar-note p { margin: 0; font-size: 10px; line-height: 1.55; }

.mk-email-thread-list { display: flex; min-height: 0; flex-direction: column; border-right: 1px solid #e2e8f0; background: #fff; }
.mk-email-list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 20px 18px 15px; }
.mk-email-list-toolbar h2 { margin: 0; color: #172033; font-size: 14px; font-weight: 900; }
.mk-email-list-toolbar p { margin: 4px 0 0; color: #94a3b8; font-size: 10px; }
.mk-email-list-toolbar button { width: 34px; height: 34px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; color: #94a3b8; }
.mk-email-search { display: flex; align-items: center; gap: 8px; margin: 0 14px; padding: 0 11px; min-height: 38px; border: 1px solid #e2e8f0; border-radius: 11px; background: #f8fafc; color: #94a3b8; }
.mk-email-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #475569; font: inherit; font-size: 11px; }
.mk-email-search input:disabled { cursor: not-allowed; }
.mk-email-no-threads { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.mk-email-empty-icon { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 12px; border-radius: 16px; background: #f1f5f9; color: #64748b; font-size: 19px; }
.mk-email-no-threads strong { color: #334155; font-size: 12px; font-weight: 900; }
.mk-email-no-threads p { max-width: 230px; margin: 7px 0 0; color: #94a3b8; font-size: 10px; line-height: 1.5; }

.mk-email-reader { display: flex; min-width: 0; min-height: 0; flex-direction: column; background: #f8fafc; }
.mk-email-reader-empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 28px; text-align: center; }
.mk-email-reader-illustration { display: grid; width: 68px; height: 68px; place-items: center; margin-bottom: 17px; border: 1px solid #dbeafe; border-radius: 22px; background: linear-gradient(145deg,#eff6ff,#fff); color: #3b82f6; font-size: 25px; box-shadow: 0 10px 28px rgba(37,99,235,.08); }
.mk-email-reader-empty h2 { max-width: 440px; margin: 0; color: #172033; font-size: 19px; font-weight: 900; letter-spacing: -.02em; }
.mk-email-reader-empty > p { max-width: 470px; margin: 10px 0 0; color: #64748b; font-size: 12px; line-height: 1.7; }
.mk-email-capability-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.mk-email-capability-row span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid #e2e8f0; border-radius: 999px; background: #fff; color: #64748b; font-size: 10px; font-weight: 700; }
.mk-email-capability-row i { color: #2563eb; }
.mk-email-reply-preview { display: flex; align-items: flex-end; gap: 9px; margin: 0 18px; padding: 10px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; }
.mk-email-reply-preview textarea { min-height: 42px; max-height: 100px; flex: 1; resize: vertical; border: 0; outline: 0; background: transparent; color: #64748b; font: inherit; font-size: 12px; }
.mk-email-reply-preview textarea::placeholder { color: #94a3b8; }
.mk-email-reply-preview button { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: #2563eb; color: #fff; font: inherit; font-size: 11px; font-weight: 800; }
.mk-email-reply-preview button:disabled { cursor: not-allowed; opacity: .45; }
.mk-email-contract-note { display: flex; align-items: flex-start; gap: 7px; margin: 9px 18px 14px; color: #94a3b8; font-size: 9px; line-height: 1.5; }
.mk-email-contract-note i { margin-top: 1px; color: #64748b; }

.mk-email-mode-switch { display: flex; align-items: center; gap: 5px; min-height: 45px; padding: 5px 18px; border-bottom: 1px solid #e2e8f0; background: #fff; }
.mk-email-mode-switch button { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 13px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #64748b; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.mk-email-mode-switch button:hover { background: #f8fafc; }
.mk-email-mode-switch button.is-current { border-color: #dbeafe; background: #eff6ff; color: #1d4ed8; }
.mk-email-mode-switch button:focus-visible, .mk-email-clear-draft:focus-visible { outline: 3px solid #60a5fa; outline-offset: 2px; }
.mk-email-campaign-view[hidden] { display: none !important; }
.mk-email-campaign-view { min-height: 0; flex: 1; overflow: auto; padding: 23px clamp(14px, 3vw, 42px) 30px; background: #f1f5f9; }
.mk-email-campaign-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1400px; margin: 0 auto 18px; }
.mk-email-eyebrow { display: inline-flex; align-items: center; gap: 7px; color: #2563eb; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.mk-email-campaign-heading h2 { margin: 6px 0 0; color: #172033; font-size: 23px; font-weight: 950; letter-spacing: -.03em; }
.mk-email-campaign-heading > div:first-child > p { max-width: 700px; margin: 7px 0 0; color: #64748b; font-size: 11px; line-height: 1.6; }
.mk-email-queue-status { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; padding: 11px 14px; border: 1px solid #fed7aa; border-radius: 13px; background: #fff7ed; color: #9a3412; }
.mk-email-queue-status > span { width: 9px; height: 9px; border-radius: 50%; background: #f97316; box-shadow: 0 0 0 4px #ffedd5; }
.mk-email-queue-status strong, .mk-email-queue-status small { display: block; }
.mk-email-queue-status strong { font-size: 11px; font-weight: 900; }
.mk-email-queue-status small { margin-top: 3px; color: #c2410c; font-size: 9px; }
.mk-email-campaign-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(310px, .88fr); align-items: start; gap: 16px; max-width: 1400px; margin: 0 auto; }
.mk-email-campaign-form, .mk-email-campaign-preview-column { display: grid; min-width: 0; gap: 13px; }
.mk-email-campaign-card, .mk-email-preview-card, .mk-email-campaign-queue-card { min-width: 0; padding: 17px; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; box-shadow: 0 4px 16px rgba(15,23,42,.035); }
.mk-email-card-heading { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.mk-email-step, .mk-email-queue-icon { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: #eff6ff; color: #2563eb; font-size: 11px; font-weight: 950; }
.mk-email-queue-icon { font-size: 13px; }
.mk-email-card-heading h3 { margin: 1px 0 0; color: #1e293b; font-size: 12px; font-weight: 900; }
.mk-email-card-heading p { margin: 4px 0 0; color: #94a3b8; font-size: 10px; line-height: 1.45; }
.mk-email-field-label { display: block; margin: 12px 0 6px; color: #475569; font-size: 10px; font-weight: 900; }
.mk-email-field-label span { color: #94a3b8; font-size: 9px; font-weight: 600; }
.mk-email-campaign-card input:not([type=file]), .mk-email-campaign-card select, .mk-email-campaign-card textarea { display: block; width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid #dbe3ee; border-radius: 10px; outline: 0; background: #fff; color: #334155; font: inherit; font-size: 11px; }
.mk-email-campaign-card textarea { min-height: 125px; resize: vertical; line-height: 1.6; }
.mk-email-campaign-card input:focus, .mk-email-campaign-card textarea:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.mk-email-campaign-card select:disabled { cursor: not-allowed; background: #f8fafc; color: #94a3b8; }
.mk-email-field-help { display: flex; align-items: flex-start; gap: 6px; margin: 8px 0 0; color: #94a3b8; font-size: 9px; line-height: 1.5; }
.mk-email-field-help i { margin-top: 1px; color: #64748b; }
.mk-email-audience-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.mk-email-audience-chips span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; color: #64748b; font-size: 9px; font-weight: 700; }
.mk-email-audience-chips i { color: #64748b; }
.mk-email-campaign-editor-footer { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: #94a3b8; font-size: 9px; }
.mk-email-file-input { position: absolute; width: 1px !important; height: 1px; overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; }
.mk-email-file-picker { display: flex; align-items: center; gap: 11px; min-height: 58px; padding: 9px 12px; border: 1px dashed #93c5fd; border-radius: 12px; background: #f8fbff; color: #2563eb; cursor: pointer; }
.mk-email-file-picker > span { display: grid; flex: 1; gap: 3px; }
.mk-email-file-picker strong { color: #1e40af; font-size: 10px; }
.mk-email-file-picker small { color: #64748b; font-size: 9px; }
.mk-email-file-picker:hover { background: #eff6ff; }
.mk-email-attachment { display: flex; align-items: center; gap: 9px; min-height: 40px; margin-top: 9px; padding: 7px 9px; border: 1px solid #fecaca; border-radius: 10px; background: #fff7f7; color: #b91c1c; }
.mk-email-attachment > span { flex: 1; overflow: hidden; color: #475569; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.mk-email-attachment button { width: 28px; height: 28px; border: 0; border-radius: 8px; background: #fee2e2; color: #b91c1c; cursor: pointer; }
.mk-email-campaign-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.mk-email-clear-draft, .mk-email-send-campaign { min-height: 41px; padding: 0 14px; border: 1px solid #dbe3ee; border-radius: 11px; background: #fff; color: #475569; font: inherit; font-size: 10px; font-weight: 900; cursor: pointer; }
.mk-email-clear-draft:hover { background: #f8fafc; }
.mk-email-send-campaign { display: inline-flex; align-items: center; gap: 8px; border-color: #2563eb; background: #2563eb; color: #fff; }
.mk-email-send-campaign:disabled { cursor: not-allowed; opacity: .52; }
.mk-email-preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 13px; }
.mk-email-preview-toolbar > div { display: flex; align-items: center; gap: 8px; color: #334155; font-size: 11px; }
.mk-email-preview-toolbar > div i { color: #2563eb; }
.mk-email-preview-toolbar > span { color: #94a3b8; font-size: 9px; }
.mk-email-preview-window { min-height: 275px; padding: 17px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgba(15,23,42,.06); }
.mk-email-preview-brand { display: flex; align-items: center; gap: 9px; padding-bottom: 13px; border-bottom: 1px solid #f1f5f9; }
.mk-email-preview-logo { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: #111827; color: #fbbf24; font-size: 12px; }
.mk-email-preview-brand strong, .mk-email-preview-brand small { display: block; }
.mk-email-preview-brand strong { color: #334155; font-size: 10px; }
.mk-email-preview-brand small { margin-top: 2px; color: #94a3b8; font-size: 8px; }
.mk-email-preview-recipient { margin-top: 15px; color: #94a3b8; font-size: 9px; }
.mk-email-preview-window h3 { margin: 10px 0 0; color: #172033; font-size: 14px; font-weight: 900; overflow-wrap: anywhere; }
.mk-email-preview-preheader { margin: 4px 0 0; color: #64748b; font-size: 10px; overflow-wrap: anywhere; }
.mk-email-preview-body { min-height: 76px; margin-top: 16px; color: #475569; font-size: 11px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.mk-email-preview-pdf { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 9px; border: 1px solid #fecaca; border-radius: 9px; background: #fff7f7; color: #b91c1c; font-size: 9px; }
.mk-email-preview-pdf span { overflow: hidden; color: #475569; text-overflow: ellipsis; white-space: nowrap; }
.mk-email-queue-empty { display: flex; flex-direction: column; align-items: center; padding: 18px 12px; border: 1px dashed #cbd5e1; border-radius: 12px; background: #f8fafc; text-align: center; }
.mk-email-queue-empty > i { margin-bottom: 8px; color: #94a3b8; font-size: 18px; }
.mk-email-queue-empty strong { color: #475569; font-size: 10px; }
.mk-email-queue-empty span { max-width: 260px; margin-top: 5px; color: #94a3b8; font-size: 9px; line-height: 1.5; }
.mk-email-queue-steps { display: flex; justify-content: space-between; gap: 7px; margin-top: 13px; }
.mk-email-queue-steps span { display: inline-flex; align-items: center; gap: 5px; color: #94a3b8; font-size: 8px; }

@media (max-width: 860px) {
    .mk-email-layout { grid-template-columns: 170px minmax(240px, 310px) minmax(0, 1fr); }
    .mk-email-topbar { grid-template-columns: minmax(150px, 1fr) auto; gap: 12px; padding: 10px 14px; }
    .mk-email-account { grid-column: 1; grid-row: 2; margin-left: 54px; margin-top: -9px; }
    .mk-email-close { grid-column: 2; grid-row: 1 / span 2; }
    .mk-email-campaign-view { padding: 17px 13px 22px; }
    .mk-email-campaign-grid { grid-template-columns: minmax(0, 1fr) minmax(260px, .85fr); gap: 11px; }
    .mk-email-campaign-heading h2 { font-size: 20px; }
    .mk-email-queue-status { padding: 9px 10px; }
}

@media (max-width: 620px) {
    .mk-email-home-heading { flex-wrap: wrap; }
    .mk-email-home-heading > span { display: none; }
    .mk-email-home-button { min-height: 32px; gap: 6px; padding: 0 9px; font-size: 10px; }
    .mk-email-home-status { display: none; }
    .mk-email-topbar { min-height: 68px; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 9px 11px; }
    .mk-email-brand { gap: 9px; }
    .mk-email-brand-icon { width: 37px; height: 37px; border-radius: 12px; }
    .mk-email-brand h1 { font-size: 15px; }
    .mk-email-brand p { font-size: 9px; }
    .mk-email-account { grid-column: 1; grid-row: 2; gap: 7px; margin: -5px 0 0 46px; }
    .mk-email-account-address { font-size: 10px; }
    .mk-email-connection-state { padding: 4px 7px; font-size: 9px; }
    .mk-email-close { grid-column: 2; grid-row: 1 / span 2; min-height: 38px; padding: 0 10px; font-size: 10px; }
    .mk-email-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(150px, 34%) minmax(0, 1fr); }
    .mk-email-sidebar { min-height: 0; padding: 7px 10px 8px; border-right: 0; border-bottom: 1px solid #e2e8f0; }
    .mk-email-sidebar-title, .mk-email-sidebar-note { display: none; }
    .mk-email-folders { display: flex; gap: 5px; overflow-x: auto; }
    .mk-email-folder { min-height: 35px; flex: 0 0 auto; gap: 7px; padding: 0 10px; font-size: 10px; }
    .mk-email-folder-count { display: none; }
    .mk-email-thread-list { min-height: 0; border-right: 0; border-bottom: 1px solid #e2e8f0; }
    .mk-email-list-toolbar { padding: 10px 12px 8px; }
    .mk-email-list-toolbar h2 { font-size: 12px; }
    .mk-email-list-toolbar p { font-size: 9px; }
    .mk-email-list-toolbar button { width: 30px; height: 30px; }
    .mk-email-search { min-height: 34px; margin: 0 10px; }
    .mk-email-no-threads { padding: 10px; }
    .mk-email-empty-icon { width: 34px; height: 34px; margin-bottom: 6px; border-radius: 12px; font-size: 14px; }
    .mk-email-no-threads strong { font-size: 10px; }
    .mk-email-no-threads p { margin-top: 4px; font-size: 9px; }
    .mk-email-reader-empty { padding: 14px 18px; }
    .mk-email-reader-illustration { width: 46px; height: 46px; margin-bottom: 9px; border-radius: 15px; font-size: 18px; }
    .mk-email-reader-empty h2 { font-size: 15px; }
    .mk-email-reader-empty > p { margin-top: 6px; font-size: 10px; line-height: 1.5; }
    .mk-email-capability-row { gap: 5px; margin-top: 10px; }
    .mk-email-capability-row span { padding: 5px 7px; font-size: 9px; }
    .mk-email-reply-preview { margin: 0 9px; padding: 7px; }
    .mk-email-reply-preview textarea { min-height: 36px; font-size: 11px; }
    .mk-email-reply-preview button { min-height: 34px; padding: 0 9px; font-size: 10px; }
    .mk-email-contract-note { margin: 6px 10px max(8px, env(safe-area-inset-bottom)); font-size: 8px; }
    .mk-email-mode-switch { min-height: 40px; padding: 3px 10px; }
    .mk-email-mode-switch button { min-height: 32px; padding: 0 11px; font-size: 10px; }
    .mk-email-campaign-view { overflow-y: auto; padding: 13px 10px max(18px, env(safe-area-inset-bottom)); }
    .mk-email-campaign-heading { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 11px; }
    .mk-email-campaign-heading h2 { font-size: 18px; }
    .mk-email-campaign-heading > div:first-child > p { font-size: 10px; }
    .mk-email-queue-status { width: 100%; }
    .mk-email-campaign-grid { grid-template-columns: minmax(0, 1fr); }
    .mk-email-campaign-form { gap: 9px; }
    .mk-email-campaign-card, .mk-email-preview-card, .mk-email-campaign-queue-card { padding: 13px; border-radius: 13px; }
    .mk-email-preview-window { min-height: 210px; padding: 12px; }
    .mk-email-preview-body { min-height: 40px; margin-top: 10px; }
    .mk-email-campaign-actions { position: sticky; bottom: -1px; z-index: 2; margin: 0 -2px; padding: 8px 2px max(8px, env(safe-area-inset-bottom)); background: linear-gradient(transparent,#f1f5f9 18%); }
    .mk-email-clear-draft, .mk-email-send-campaign { min-height: 43px; }
}

@media (max-width: 360px) {
    .mk-email-home-button > span:not(.mk-email-home-status) { display: none; }
    .mk-email-account-address { max-width: 155px; }
    .mk-email-capability-row span { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .mk-email-home-button { transition: none; }
    .mk-email-home-button:active { transform: none; }
}

/* A caixa de e-mail usa o mesmo seletor e coluna de conversas do atendimento.
   O painel leitor ocupa o lugar do chat, sem modal cobrindo a caixa. */
.mk-email-home-heading { flex-wrap: nowrap; }
.mk-email-home-status { display: none; }
.mk-email-campaign-home-button {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    flex: 0 0 auto;
    padding: 0 10px;
    border: 1px solid #e9d5ff;
    border-radius: 999px;
    background: #faf5ff;
    color: #7e22ce;
    font: inherit;
    font-size: 10px;
    font-weight: 900;
    cursor: pointer;
}
.mk-email-campaign-home-button:hover { background: #f3e8ff; }
.mk-email-pending-pill { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; padding: 5px 7px; border: 1px solid #fed7aa; border-radius: 999px; background: #fff7ed; color: #9a3412; font-size: 8px; font-weight: 900; }
.mk-email-conversation-list[hidden] { display: none !important; }
.mk-email-conversation-list {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    overflow-y: auto;
    padding: 0 12px 14px;
    background: #fff;
}
.mk-email-conversation-list .mk-email-list-toolbar { padding: 12px 1px 10px; }
.mk-email-conversation-list .mk-email-no-threads { min-height: 180px; flex: 1; }
.mk-email-list-campaign-button { display: flex; align-items: center; gap: 9px; min-height: 42px; margin-top: auto; padding: 0 11px; border: 1px solid #e9d5ff; border-radius: 11px; background: #faf5ff; color: #7e22ce; font: inherit; font-size: 10px; font-weight: 900; cursor: pointer; }
.mk-email-list-campaign-button span { flex: 1; text-align: left; }
.mk-email-list-campaign-button:hover { background: #f3e8ff; }

.mk-email-workspace[hidden] { display: none !important; }
.mk-email-workspace {
    position: relative;
    inset: auto;
    z-index: 10;
    display: flex;
    min-width: 0;
    min-height: 0;
    width: auto;
    height: 100%;
    flex: 1 1 auto;
    padding: 0;
    background: #f8fafc;
    color: #172033;
}
.mk-email-shell { display: flex; width: 100%; min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; }
.mk-email-topbar { min-height: 64px; grid-template-columns: minmax(120px,1fr) auto auto; gap: 12px; padding: 9px 15px; }
.mk-email-brand-icon { width: 36px; height: 36px; }
.mk-email-brand h1 { font-size: 14px; }
.mk-email-brand p { font-size: 9px; }
.mk-email-account-address { font-size: 10px; }
.mk-email-connection-state { padding: 5px 8px; font-size: 9px; }
.mk-email-close { min-height: 35px; padding: 0 10px; font-size: 10px; }
.mk-email-mode-switch { flex: 0 0 auto; }
.mk-email-reader[data-email-view="inbox"] { display: flex; min-height: 0; flex: 1; flex-direction: column; padding: 12px; background: #f8fafc; }
.mk-email-reader-empty { padding: 15px 24px; }
.mk-email-reader-empty h2 { font-size: 17px; }
.mk-email-reader-empty > p { font-size: 11px; }
.mk-email-reply-preview { margin: 0 8px; }
.mk-email-contract-note { margin: 8px 8px 10px; }
.mk-email-campaign-view { min-height: 0; flex: 1; }
.mk-email-campaign-heading { margin-top: 0; }

html.mk-email-channel-active #chatArea { display: none !important; }
html.mk-email-channel-active #contactsList { display: none !important; }
html.mk-email-channel-active #mkEmailConversationList { display: flex !important; }
html.mk-email-channel-active #mkEmailWorkspace { display: flex; }
html.mk-email-channel-active .mk-email-campaign-home-button { display: inline-flex; }
html.mk-email-channel-active #contactSearch { pointer-events: none; }
html.mk-email-campaign-active #mkEmailWorkspace [data-email-view="inbox"] { display: none !important; }

@media (max-width: 767px) {
    html.mk-email-channel-active #sidebar { display: flex !important; width: 100% !important; max-width: none !important; }
    html.mk-email-channel-active #mkEmailWorkspace { display: none !important; }
    html.mk-email-channel-active.mk-email-campaign-active #sidebar { display: none !important; }
    html.mk-email-channel-active.mk-email-campaign-active #mkEmailWorkspace { display: flex !important; width: 100% !important; }
    .mk-email-topbar { grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: 8px 10px; }
    .mk-email-account { grid-column: 1; grid-row: 2; margin: -5px 0 0 45px; }
    .mk-email-close { grid-column: 2; grid-row: 1 / span 2; }
    .mk-email-campaign-view { overflow-y: auto; }
}

@media (max-width: 380px) {
    .mk-email-home-heading > span { display: none; }
    .mk-email-campaign-home-button span { display: none; }
    .mk-email-campaign-home-button { width: 34px; padding: 0; }
    .mk-email-home-button { width: 34px; justify-content: center; padding: 0; }
}
