.crm-mail {
  --mail-primary: var(--primary, #5966f2);
  --mail-primary-dark: var(--primary-dark, #444fd7);
  --mail-text: var(--text, #121927);
  --mail-muted: var(--muted, #7d8798);
  --mail-line: var(--line, #e3e7ef);
  --mail-surface: var(--surface, #fff);
  --mail-soft: var(--surface-soft, #f1f3f8);
  --mail-green: var(--green, #22a06b);
  --mail-red: var(--red, #dd5d65);
  min-width: 0;
  color: var(--mail-text);
}
.crm-mail *, .crm-mail *::before, .crm-mail *::after { box-sizing: border-box; }
.crm-mail button, .crm-mail input, .crm-mail select, .crm-mail textarea { font: inherit; }
.crm-mail button { cursor: pointer; }
.crm-mail button:disabled { cursor: wait; opacity: .6; }
.crm-mail [hidden] { display: none !important; }
.crm-mail button:focus-visible, .crm-mail a:focus-visible, .crm-mail input:focus-visible, .crm-mail textarea:focus-visible, .crm-mail select:focus-visible, .crm-mail summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--mail-primary) 42%, transparent);
  outline-offset: 2px;
}
.crm-mail-icon { width: 18px; height: 18px; flex: 0 0 auto; }
.crm-mail-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.crm-mail-title { display: flex; align-items: center; gap: 13px; min-width: 0; }
.crm-mail-title-icon, .crm-mail-setup-mark { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 auto; color: var(--mail-primary); background: color-mix(in srgb, var(--mail-primary) 10%, white); border-radius: 14px; }
.crm-mail-title-icon .crm-mail-icon { width: 22px; height: 22px; }
.crm-mail-eyebrow { margin-bottom: 3px; color: var(--mail-primary); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.crm-mail-title h1 { font-size: clamp(25px, 3vw, 32px); line-height: 1.12; letter-spacing: -.045em; }
.crm-mail-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.crm-mail-primary, .crm-mail-secondary, .crm-mail-danger, .crm-mail-text-button, .crm-mail-search-submit, .crm-mail-reply {
  min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 13px;
  border: 1px solid transparent; border-radius: 10px; font-size: 12px; font-weight: 800; text-decoration: none;
}
.crm-mail-primary { color: #fff; background: var(--mail-primary); box-shadow: 0 5px 14px color-mix(in srgb, var(--mail-primary) 22%, transparent); }
.crm-mail-primary:hover { background: var(--mail-primary-dark); }
.crm-mail-secondary { color: var(--mail-text); background: var(--mail-surface); border-color: var(--mail-line); }
.crm-mail-secondary:hover { background: var(--mail-soft); }
.crm-mail-danger { color: #a93643; background: #fff1f2; border-color: #f5d7da; }
.crm-mail-text-button { min-height: 32px; padding: 5px 7px; color: var(--mail-primary); background: transparent; }
.crm-mail-text-button:hover { text-decoration: underline; }
.crm-mail-feedback:empty { display: none; }
.crm-mail-notice { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin: 0 0 14px; padding: 11px 13px; border: 1px solid #d7e3ff; border-radius: 11px; color: #3d4ba8; background: #f3f5ff; font-size: 12px; }
.crm-mail-notice-error { color: #a53643; background: #fff2f2; border-color: #f0d0d3; }
.crm-mail-notice-success { color: #16754e; background: #effaf4; border-color: #cdebd9; }
.crm-mail-notice button, .crm-mail-icon-button { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 8px; color: inherit; background: transparent; }
.crm-mail-notice button:hover, .crm-mail-icon-button:hover { background: color-mix(in srgb, currentColor 9%, transparent); }
.crm-mail-notice .crm-mail-icon, .crm-mail-icon-button .crm-mail-icon { width: 17px; height: 17px; }
.crm-mail-setup { max-width: 1040px; margin: 0 auto; padding: clamp(18px, 4vw, 34px); border: 1px solid var(--mail-line); border-radius: 18px; background: var(--mail-surface); box-shadow: 0 8px 30px rgba(25,36,66,.045); }
.crm-mail-setup-copy { max-width: 670px; margin-bottom: 25px; }
.crm-mail-setup-mark { margin-bottom: 18px; }
.crm-mail-setup-copy h2 { margin: 4px 0 8px; font-size: clamp(22px, 3vw, 28px); letter-spacing: -.035em; }
.crm-mail-setup-copy p, .crm-mail-dialog-header p { max-width: 680px; color: var(--mail-muted); font-size: 13px; }
.crm-mail-key-warning { margin-top: 13px !important; padding: 10px 12px; border: 1px solid #f2d7a4; border-radius: 10px; color: #78551f !important; background: #fff8e9; font-size: 11px !important; line-height: 1.55; overflow-wrap: anywhere; }
.crm-mail-account-form { display: grid; gap: 16px; }
.crm-mail-account-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.crm-mail-service { min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--mail-line); border-radius: 13px; }
.crm-mail-service legend { padding: 0 7px; font-size: 13px; font-weight: 800; }
.crm-mail-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.crm-mail-field { display: grid; align-content: start; gap: 6px; min-width: 0; color: #505a6d; font-size: 11px; font-weight: 800; }
.crm-mail-field-wide { grid-column: 1 / -1; }
.crm-mail-field input, .crm-mail-field select, .crm-mail-field textarea {
  width: 100%; min-width: 0; min-height: 41px; padding: 9px 11px; border: 1px solid var(--mail-line); border-radius: 9px;
  color: var(--mail-text); background: var(--mail-surface); outline: none; font-size: 13px; font-weight: 500;
}
.crm-mail-field textarea { min-height: 170px; resize: vertical; line-height: 1.6; }
.crm-mail-field input:focus, .crm-mail-field select:focus, .crm-mail-field textarea:focus { border-color: var(--mail-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mail-primary) 12%, transparent); }
.crm-mail-field small { color: var(--mail-muted); font-size: 10px; font-weight: 500; line-height: 1.5; }
.crm-mail-optional { color: var(--mail-muted); font-size: 10px; font-weight: 500; }
.crm-mail-security-note { color: var(--mail-muted); font-size: 11px; line-height: 1.6; }
.crm-mail-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.crm-mail-account-strip { min-height: 42px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 7px 12px; border: 1px solid var(--mail-line); border-radius: 11px; color: var(--mail-muted); background: var(--mail-surface); font-size: 11px; }
.crm-mail-account-strip strong { max-width: min(45vw, 440px); overflow: hidden; color: var(--mail-text); text-overflow: ellipsis; white-space: nowrap; }
.crm-mail-connected-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--mail-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mail-green) 13%, transparent); }
.crm-mail-account-spacer { flex: 1; }
.crm-mail-test-result { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.crm-mail-test-item { display: flex; align-items: flex-start; gap: 8px; min-width: 160px; padding: 8px 10px; border: 1px solid var(--mail-line); border-radius: 9px; background: var(--mail-surface); font-size: 11px; }
.crm-mail-test-item > span { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--mail-green); font-weight: 900; }
.crm-mail-test-item.is-failed > span { background: var(--mail-red); }
.crm-mail-test-item b, .crm-mail-test-item small { display: block; }
.crm-mail-test-item small { margin-top: 3px; color: var(--mail-muted); overflow-wrap: anywhere; }
.crm-mail-grid { display: grid; grid-template-columns: minmax(145px, 185px) minmax(255px, 340px) minmax(0, 1fr); min-height: 560px; border: 1px solid var(--mail-line); border-radius: 15px; overflow: hidden; background: var(--mail-surface); box-shadow: 0 7px 24px rgba(25,36,66,.035); }
.crm-mail-folders { min-width: 0; padding: 15px 10px; border-right: 1px solid var(--mail-line); background: #fafbfe; }
.crm-mail-section-label { margin: 0 8px 8px; color: var(--mail-muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.crm-mail-folder { width: 100%; min-width: 0; display: flex; align-items: center; gap: 9px; margin: 2px 0; padding: 9px 8px; border: 0; border-radius: 8px; color: #586275; background: transparent; text-align: left; font-size: 11px; font-weight: 700; }
.crm-mail-folder:hover { background: #f0f2fa; }
.crm-mail-folder.is-active { color: var(--mail-primary-dark); background: color-mix(in srgb, var(--mail-primary) 10%, white); }
.crm-mail-folder .crm-mail-icon { width: 16px; height: 16px; }
.crm-mail-folder span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-mail-list-panel { display: flex; min-width: 0; flex-direction: column; border-right: 1px solid var(--mail-line); }
.crm-mail-list-heading { min-height: 59px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 13px 8px; }
.crm-mail-list-heading h2 { overflow: hidden; font-size: 16px; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.crm-mail-list-heading span { display: block; margin-top: 2px; color: var(--mail-muted); font-size: 10px; }
.crm-mail-search { display: flex; align-items: center; gap: 5px; margin: 0 9px 8px; padding: 4px; border: 1px solid var(--mail-line); border-radius: 9px; background: var(--mail-surface); }
.crm-mail-search-input { position: relative; min-width: 0; flex: 1; }
.crm-mail-search-input .crm-mail-icon { position: absolute; top: 50%; left: 7px; width: 15px; height: 15px; color: var(--mail-muted); transform: translateY(-50%); pointer-events: none; }
.crm-mail-search-input input { display: block; width: 100%; min-width: 0; height: 31px; padding: 5px 6px 5px 27px; border: 0; outline: none; color: var(--mail-text); background: transparent; font-size: 11px; }
.crm-mail-search-input input:focus-visible { outline: 2px solid var(--mail-primary); outline-offset: -2px; border-radius: 6px; }
.crm-mail-search-submit { min-height: 30px; padding: 5px 8px; color: var(--mail-primary); background: #f2f3ff; font-size: 10px; }
.crm-mail-clear-search { display: grid; place-items: center; width: 27px; height: 28px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 7px; color: var(--mail-muted); background: transparent; }
.crm-mail-clear-search:hover { color: var(--mail-text); background: var(--mail-soft); }
.crm-mail-clear-search .crm-mail-icon { width: 15px; height: 15px; }
.crm-mail-cap-note { margin: 0 12px 8px; color: #876026; font-size: 10px; line-height: 1.5; }
.crm-mail-message-list { min-height: 260px; flex: 1; overflow: auto; }
.crm-mail-message { position: relative; width: 100%; min-height: 76px; display: flex; align-items: flex-start; gap: 8px; padding: 11px 10px 10px 12px; border: 0; border-top: 1px solid #eff1f5; color: inherit; background: transparent; text-align: left; }
.crm-mail-message:hover { background: #f8f9fd; }
.crm-mail-message.is-selected { background: #f0f2ff; box-shadow: inset 3px 0 var(--mail-primary); }
.crm-mail-unread-dot { width: 7px; height: 7px; flex: 0 0 auto; margin-top: 6px; border-radius: 50%; background: transparent; }
.crm-mail-message.is-unread .crm-mail-unread-dot { background: var(--mail-primary); }
.crm-mail-message-main { display: grid; gap: 3px; min-width: 0; flex: 1; }
.crm-mail-message-top { display: flex; align-items: center; justify-content: space-between; gap: 7px; min-width: 0; }
.crm-mail-sender, .crm-mail-message-top time { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-mail-sender { color: #566174; font-size: 10px; }
.crm-mail-message.is-unread .crm-mail-sender, .crm-mail-message.is-unread .crm-mail-subject { color: var(--mail-text); font-weight: 800; }
.crm-mail-message-top time { flex: 0 0 auto; color: var(--mail-muted); font-size: 9px; }
.crm-mail-subject { overflow: hidden; color: #374153; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.crm-mail-snippet { min-height: 14px; overflow: hidden; color: var(--mail-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.crm-mail-star { flex: 0 0 auto; margin: 2px 1px 0; color: #dda62e; }
.crm-mail-star .crm-mail-icon { width: 15px; height: 15px; fill: currentColor; }
.crm-mail-pagination { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 9px; border-top: 1px solid var(--mail-line); }
.crm-mail-page-count { color: var(--mail-muted); font-size: 9px; }
.crm-mail-page-buttons { display: flex; gap: 5px; }
.crm-mail-page-buttons button { min-height: 29px; padding: 5px 8px; border: 1px solid var(--mail-line); border-radius: 7px; color: var(--mail-text); background: #fff; font-size: 10px; font-weight: 700; }
.crm-mail-page-buttons button:hover { background: var(--mail-soft); }
.crm-mail-reader { min-width: 0; min-height: 0; overflow: auto; }
.crm-mail-reader-empty { min-height: 100%; display: grid; align-content: center; justify-items: center; padding: 28px; color: var(--mail-muted); text-align: center; }
.crm-mail-reader-empty > span { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 14px; border-radius: 15px; color: var(--mail-primary); background: #f0f2ff; }
.crm-mail-reader-empty > span .crm-mail-icon { width: 24px; height: 24px; }
.crm-mail-reader-empty strong { color: var(--mail-text); font-size: 14px; }
.crm-mail-reader-empty p { max-width: 280px; margin-top: 5px; font-size: 11px; }
.crm-mail-reading { min-width: 0; padding: 17px clamp(14px, 2.2vw, 26px) 24px; }
.crm-mail-reading-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 17px; }
.crm-mail-reader-back { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 0; border-radius: 8px; color: var(--mail-muted); background: transparent; font-size: 11px; font-weight: 700; }
.crm-mail-reader-back:hover { color: var(--mail-text); background: var(--mail-soft); }
.crm-mail-reader-back .crm-mail-icon { width: 16px; height: 16px; }
.crm-mail-reply { min-height: 34px; padding: 6px 12px; color: var(--mail-primary); background: #f1f2ff; }
.crm-mail-reading-subject { margin: 0 0 14px; overflow-wrap: anywhere; font-size: clamp(18px, 2.1vw, 24px); line-height: 1.25; letter-spacing: -.035em; }
.crm-mail-reading-meta { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--mail-line); border-bottom: 1px solid var(--mail-line); }
.crm-mail-reading-meta > div { display: grid; grid-template-columns: 45px minmax(0, 1fr); gap: 7px; font-size: 10px; }
.crm-mail-reading-meta b { color: var(--mail-muted); }
.crm-mail-reading-meta span, .crm-mail-reading-meta time { min-width: 0; overflow-wrap: anywhere; color: #485366; }
.crm-mail-reading-note { margin-top: 12px; color: var(--mail-muted); font-size: 10px; line-height: 1.5; }
.crm-mail-body { margin: 13px 0 20px; overflow: auto; color: #303949; font-family: inherit; font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; }
.crm-mail-attachments { margin-top: 19px; }
.crm-mail-attachments h3 { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; font-size: 12px; }
.crm-mail-attachments h3 span { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; color: var(--mail-muted); background: var(--mail-soft); font-size: 9px; }
.crm-mail-attachments ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.crm-mail-attachments li a { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px; border: 1px solid var(--mail-line); border-radius: 9px; color: var(--mail-text); text-decoration: none; }
.crm-mail-attachments li a:hover { border-color: color-mix(in srgb, var(--mail-primary) 50%, var(--mail-line)); background: #fafaff; }
.crm-mail-attachments li a > .crm-mail-icon { color: var(--mail-primary); }
.crm-mail-attachment-name { min-width: 0; flex: 1; overflow-wrap: anywhere; font-size: 10px; font-weight: 700; }
.crm-mail-attachments li small { flex: 0 0 auto; color: var(--mail-muted); font-size: 9px; }
.crm-mail-reader-status { margin-top: 10px; color: #a53643; font-size: 10px; }
.crm-mail-loading, .crm-mail-list-empty, .crm-mail-reader-state, .crm-mail-inline-empty, .crm-mail-inline-error { color: var(--mail-muted); font-size: 11px; }
.crm-mail-loading { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 100px; padding: 16px; text-align: center; }
.crm-mail-spinner { width: 17px; height: 17px; flex: 0 0 auto; border: 2px solid #dce0ed; border-top-color: var(--mail-primary); border-radius: 50%; animation: crm-mail-spin .75s linear infinite; }
@keyframes crm-mail-spin { to { transform: rotate(360deg); } }
.crm-mail-list-empty { min-height: 190px; display: grid; align-content: center; justify-items: center; gap: 7px; padding: 20px 14px; text-align: center; }
.crm-mail-list-empty strong { color: var(--mail-text); font-size: 12px; }
.crm-mail-list-empty > span:not(.crm-mail-empty-icon) { max-width: 260px; line-height: 1.55; overflow-wrap: anywhere; }
.crm-mail-list-empty .crm-mail-text-button { margin-top: 2px; }
.crm-mail-empty-icon { color: var(--mail-muted); }
.crm-mail-empty-icon .crm-mail-icon { width: 24px; height: 24px; }
.crm-mail-inline-empty { padding: 12px 8px; line-height: 1.5; }
.crm-mail-inline-error { display: grid; gap: 8px; padding: 12px 8px; color: #a53643; overflow-wrap: anywhere; }
.crm-mail-inline-error button { justify-self: start; padding: 4px 0; border: 0; color: var(--mail-primary); background: transparent; font: inherit; }
.crm-mail-reader-state { min-height: 250px; padding: 12px; }
.crm-mail-reader-state .crm-mail-reader-back { margin-bottom: 10px; }
.crm-mail-dialog { width: min(920px, calc(100vw - 36px)); max-width: none; max-height: min(92vh, 900px); max-height: min(92dvh, 900px); overflow: auto; padding: clamp(16px, 3vw, 27px); border: 1px solid var(--mail-line); border-radius: 17px; color: var(--mail-text); background: var(--mail-surface); box-shadow: 0 24px 80px rgba(14, 21, 36, .24); }
.crm-mail-dialog::backdrop { background: rgba(14, 21, 36, .55); backdrop-filter: blur(3px); }
.crm-mail-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.crm-mail-dialog-header h2 { font-size: 22px; letter-spacing: -.035em; }
.crm-mail-dialog-header p { margin-top: 5px; font-size: 11px; }
.crm-mail-compose-dialog { width: min(690px, calc(100vw - 28px)); }
.crm-mail-compose-form { display: grid; gap: 13px; }
.crm-mail-compose-recipients { display: grid; gap: 7px; }
.crm-mail-compose-recipients > small { color: var(--mail-muted); font-size: 10px; }
.crm-mail-extra-recipients { padding: 8px 10px; border: 1px solid var(--mail-line); border-radius: 9px; }
.crm-mail-extra-recipients summary { color: var(--mail-primary); cursor: pointer; font-size: 11px; font-weight: 800; }
.crm-mail-extra-recipients .crm-mail-field-grid { margin-top: 10px; }
.crm-mail-file-picker { display: flex; align-items: center; gap: 11px; min-height: 54px; padding: 9px 12px; border: 1px dashed #cbd1df; border-radius: 10px; color: var(--mail-primary); background: #fbfcff; cursor: pointer; }
.crm-mail-file-picker > .crm-mail-icon { width: 19px; height: 19px; }
.crm-mail-file-picker span b, .crm-mail-file-picker span small { display: block; }
.crm-mail-file-picker span b { font-size: 11px; }
.crm-mail-file-picker span small { margin-top: 2px; color: var(--mail-muted); font-size: 9px; font-weight: 500; }
.crm-mail-file-picker input { width: 1px; height: 1px; position: absolute; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.crm-mail-file-picker:focus-within { outline: 3px solid color-mix(in srgb, var(--mail-primary) 42%, transparent); outline-offset: 2px; }
.crm-mail-selected-files { display: flex; flex-wrap: wrap; gap: 5px; color: var(--mail-muted); font-size: 10px; overflow-wrap: anywhere; }
.crm-mail-selected-files span { padding: 4px 7px; border-radius: 7px; background: var(--mail-soft); }
.crm-mail-selected-files small { margin-left: 4px; }
.crm-mail-selected-files.has-error { color: #a53643; }
.crm-mail-compose-actions { justify-content: flex-end; margin-top: 2px; padding-top: 12px; border-top: 1px solid var(--mail-line); }
.crm-mail-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1080px) {
  .crm-mail-grid { grid-template-columns: minmax(132px, 160px) minmax(245px, 310px) minmax(0, 1fr); }
  .crm-mail-account-fields { gap: 10px; }
  .crm-mail-service { padding: 13px; }
}
@media (max-width: 820px) {
  .crm-mail-grid { grid-template-columns: 150px minmax(0, 1fr); min-height: 520px; }
  .crm-mail-reader { grid-column: 1 / -1; min-height: 310px; border-top: 1px solid var(--mail-line); }
  .crm-mail[data-reading="true"] .crm-mail-list-panel { grid-column: 1 / -1; }
  .crm-mail[data-reading="true"] .crm-mail-reader { grid-column: 1 / -1; }
}
@media (max-width: 650px) {
  .crm-mail-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  .crm-mail-toolbar { width: 100%; justify-content: flex-start; }
  .crm-mail-toolbar > button { flex: 1 1 auto; }
  .crm-mail-account-fields { grid-template-columns: minmax(0, 1fr); }
  .crm-mail-setup { padding: 17px 13px; }
  .crm-mail-account-strip { flex-wrap: wrap; }
  .crm-mail-account-strip strong { max-width: calc(100% - 30px); }
  .crm-mail-account-spacer { display: none; }
  .crm-mail-account-strip .crm-mail-text-button { margin-left: auto; }
  .crm-mail-grid { display: flex; min-height: 0; flex-direction: column; overflow: visible; }
  .crm-mail-folders { display: flex; gap: 5px; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--mail-line); scrollbar-width: thin; }
  .crm-mail-section-label { display: none; }
  .crm-mail-folder { width: auto; max-width: 190px; min-height: 36px; flex: 0 0 auto; margin: 0; padding: 7px 9px; }
  .crm-mail-list-panel { min-height: 310px; border-right: 0; }
  .crm-mail-message-list { min-height: 220px; max-height: min(58vh, 520px); }
  .crm-mail-reader { display: none; min-height: 0; border-top: 0; }
  .crm-mail[data-reading="true"] .crm-mail-list-panel { display: none; }
  .crm-mail[data-reading="true"] .crm-mail-reader { display: block; }
  .crm-mail-reading { padding: 13px 12px 19px; }
  .crm-mail-reading-actions { margin-bottom: 12px; }
  .crm-mail-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); padding: 16px 13px; border-radius: 14px; }
  .crm-mail-dialog-header h2 { font-size: 19px; }
  .crm-mail-service { padding: 12px; }
  .crm-mail-form-actions > button { flex: 1 1 auto; }
}
@media (max-width: 380px) {
  .crm-mail-toolbar > button { gap: 5px; padding: 8px 8px; font-size: 10px; }
  .crm-mail-toolbar .crm-mail-icon { width: 16px; height: 16px; }
  .crm-mail-folder { max-width: 150px; font-size: 10px; }
  .crm-mail-list-heading { padding-right: 10px; padding-left: 10px; }
  .crm-mail-search { margin-right: 6px; margin-left: 6px; }
  .crm-mail-search-submit { padding-right: 6px; padding-left: 6px; }
  .crm-mail-reading-meta > div { grid-template-columns: 38px minmax(0, 1fr); }
  .crm-mail-compose-actions > button { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .crm-mail *, .crm-mail *::before, .crm-mail *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
