/* SmartersWeb Tech Mail · Webmail UX milestone 3.6.5 · safely layered over 3.7 */
.mail-workspace{--wm365-cyan:#00aeef;--wm365-navy:#0a172a;--wm365-line:#e2e8f0;--wm365-ink:#173046;--wm365-muted:#64748b;--wm365-paper:#fff;--wm365-wash:#f3f7fc}
.mail-workspace .app-main{padding:8px 10px 14px!important}
.mail-workspace .webmail-shell{border:1px solid var(--wm365-line);border-radius:13px;box-shadow:0 12px 34px rgba(10,23,42,.065);overflow:hidden;min-height:calc(100vh - 94px)}
.mail-workspace .webmail-sidebar{background:linear-gradient(165deg,#f8fbff,#f0f6fb);border-right:1px solid var(--wm365-line)}
.mail-workspace .webmail-sidebar .compose-button{background:linear-gradient(100deg,#163b65,#00aeef);border:0;color:white;border-radius:10px;box-shadow:0 6px 16px rgba(0,174,239,.19)}
.mail-workspace .folder-link{border-radius:9px;transition:background .16s ease,color .16s ease}
.mail-workspace .folder-link.active{background:#e0f4ff;color:#103b65}
.wm365-quick-actions{display:flex;align-items:center;gap:6px;min-width:0;flex-wrap:nowrap}
.wm365-quick-actions>button,.wm365-quick-actions>select{appearance:none;border:1px solid #d9e4ef;min-height:33px;border-radius:10px;padding:6px 11px;background:#fff;color:#244159;font-size:11px;font-weight:780;white-space:nowrap;cursor:pointer;max-width:194px}
.wm365-quick-actions>select{max-width:160px;text-overflow:ellipsis;font-size:11px}
.wm365-quick-actions .wm365-top-upgrade{background:#123b65;color:#fff;border-color:#123b65}
.wm365-quick-actions .wm365-top-referral{background:#e9faff;color:#0a668c;border-color:#c9edfc}
.wm365-quick-actions>button:hover{filter:brightness(.94)}
.wm365-sidebar-actions{border-top:1px solid #dce8f2;margin-top:14px;padding-top:10px;display:grid;gap:5px}
.wm365-sidebar-actions button{background:transparent;text-align:left;font-size:12px;color:#33506a;border:0;border-radius:8px;padding:9px 10px;font-weight:700;cursor:pointer}
.wm365-sidebar-actions button:hover{background:#e1edf8}
.wm365-sidebar-actions .wm365-sb-upgrade{background:#123b65;color:#fff}
.wm365-split{display:grid;grid-template-columns:minmax(315px,.83fr) minmax(360px,1.17fr);grid-template-rows:auto minmax(0,1fr);align-content:start;min-width:0;background:var(--wm365-paper)}
.wm365-split .mail-toolbar{grid-column:1/-1;grid-row:1;min-width:0;position:relative;z-index:1;border-bottom:1px solid var(--wm365-line);background:var(--wm365-paper)}
.wm365-split .wm365-message-column{grid-column:1;grid-row:2;overflow:auto;min-width:0;min-height:calc(100vh - 170px);max-height:calc(100vh - 120px);border-right:1px solid var(--wm365-line);scrollbar-width:thin}
.wm365-split .mail-row-link{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;gap:2px;align-content:center;padding:8px 0;position:relative}
.wm365-split .mail-row{min-height:75px;grid-template-columns:20px 25px minmax(0,1fr);padding:0 9px;gap:5px}
.wm365-split .mail-from>span{font-size:12px;color:#183852;font-weight:730}
.wm365-split .mail-subject strong{font-size:12px;font-weight:640;color:#23364b;line-height:1.3}
.wm365-split .mail-subject small{display:none}
.wm365-split .mail-row-link time{font-size:10px;grid-row:3;color:#7b8b9c}
.wm365-split .mail-row.wm365-selected,.wm365-split .mail-row:hover{background:#eaf6ff;box-shadow:inset 3px 0 #00aeef}
.wm365-thread-count{background:#e0f4ff;border-radius:12px;color:#0b6a99;padding:1px 6px;white-space:nowrap;font-size:10px;font-weight:750}
.wm365-compact .wm365-split .mail-row{min-height:53px}.wm365-compact .wm365-split .mail-row-link time{display:none}
.wm365-preview{grid-column:2;grid-row:2;min-width:0;max-height:calc(100vh - 120px);overflow:auto;scrollbar-width:thin;background:var(--wm365-paper);color:var(--wm365-ink)}
.wm365-preview-header{display:flex;justify-content:space-between;align-items:center;padding:11px 19px;border-bottom:1px solid #edf1f7;color:#657e90;letter-spacing:.08em;text-transform:uppercase;font-size:10px;font-weight:800}
.wm365-preview-dismiss{display:none;border:0;border-radius:9px;padding:2px 8px;background:transparent;color:#526579;font-size:22px;cursor:pointer}
.wm365-preview-content{padding:20px 23px;min-width:0}
.wm365-placeholder{min-height:280px;display:grid;place-content:center;justify-items:center;gap:13px;text-align:center;color:#8492a3}
.wm365-placeholder>span{display:grid;place-items:center;width:56px;height:56px;border-radius:17px;background:#eff7fd;color:#195e83;font-size:24px}
.wm365-placeholder strong{color:#2f4761;font-size:14px}.wm365-placeholder p{font-size:12px;max-width:260px}
.wm365-message-meta{padding-bottom:16px;border-bottom:1px solid var(--wm365-line);display:grid;gap:6px}
.wm365-message-meta h2{font-size:20px;line-height:1.27;color:#152b42;letter-spacing:-.02em;margin:0;overflow-wrap:anywhere}
.wm365-message-meta p{font-size:12px;color:#24496c;margin:0;overflow-wrap:anywhere}
.wm365-message-meta small{color:#7f899c;font-size:11px;overflow-wrap:anywhere}
.wm365-preview-actions{display:flex;flex-wrap:wrap;gap:7px;margin:16px 0}
.wm365-preview-actions .button{min-height:34px;padding:7px 10px;font-size:11px}
.wm365-preview-body{white-space:pre-wrap;overflow-wrap:anywhere;word-wrap:break-word;word-break:normal;background:none;border:0;box-shadow:none;font:13px/1.8 ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#253b50;max-width:100%;padding:5px 0 50px;margin:0}
.wm365-preview-attachments{display:grid;gap:5px;padding:11px 0;border-bottom:1px solid var(--wm365-line);margin-bottom:14px;font-size:11px}.wm365-preview-attachments a{color:#075f93;overflow-wrap:anywhere}
.wm365-pill{display:inline-block;margin:12px 0 0;font-size:11px;border-radius:999px;padding:4px 9px;background:#e7f8ff;color:#005f8a;font-weight:750}
.wm365-pill.block{background:#fff0e8;color:#9f431e}
.wm365-error{color:#b91c1c;font-size:13px}.wm365-loading{color:#64748b;font-size:13px}
.wm365-no-preview .wm365-split{display:block}
.wm365-no-preview .wm365-split .wm365-preview{display:none}
.wm365-no-preview .wm365-split .wm365-message-column{max-height:none;overflow:visible;min-height:0;border:0}
.wm365-no-preview .wm365-split .mail-row-link{grid-template-columns:minmax(140px,220px) minmax(160px,1fr) auto;grid-template-rows:auto;gap:11px}
.wm365-no-preview .wm365-split .mail-row{min-height:54px}
.wm365-no-preview .wm365-split .mail-row-link time{display:block;grid-row:auto}
.wm365-modal{border:1px solid #d4e2ef;border-radius:17px;max-width:min(98vw,1040px);width:min(94vw,920px);height:min(90vh,870px);max-height:90vh;background:#fff;color:#173047;padding:0;overflow:hidden;box-shadow:0 24px 90px rgba(1,15,31,.33)}
.wm365-modal::backdrop{background:rgba(5,20,35,.65);backdrop-filter:blur(5px)}
.wm365-modal-head{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:13px 17px;border-bottom:1px solid #dfebf5;background:linear-gradient(115deg,#f7fbff,#ecf7fe)}
.wm365-modal-head>div:first-child{display:grid;gap:2px}.wm365-modal-head small{font-size:9px;letter-spacing:.13em;color:#648199;font-weight:850}
.wm365-modal-head strong{font-size:15px;color:#0c2c48}
.wm365-modal-actions{display:flex;align-items:center;gap:9px}.wm365-modal-actions>a{font-size:11px;color:#17628d;font-weight:800}
.wm365-modal-actions button{border:0;background:#e1edf6;border-radius:9px;color:#29465d;min-width:32px;height:32px;font-size:22px;cursor:pointer}
.wm365-modal iframe{display:block;width:100%;height:calc(100% - 66px);border:0;background:#f7fafc}
body.wm365-modal-open{overflow:hidden}
body.wm365-embedded{min-height:100vh;margin:0;padding:0;background:#f7fafc;color:#16324b}
.wm365-embedded .app-main{padding:20px!important;max-width:100%;width:100%;margin:0}
.wm365-embedded .page-header{margin-bottom:15px}.wm365-embedded .page-header h1{font-size:23px!important}
.wm365-embedded .app-shell{display:block;min-width:0;width:100%;min-height:100vh;margin:0;padding:0}
.wm365-settings{max-width:960px;margin:auto;color:#1c364e;font-size:13px}
.wm365-settings-head{padding:10px 0 19px}.wm365-settings-head h1{font-size:27px;margin:4px 0 7px;line-height:1.1;letter-spacing:-.025em}.wm365-settings-head p{color:#6a8195;font-size:12px}
.wm365-settings-tabs{display:flex;overflow-x:auto;gap:4px;border-bottom:1px solid #dbe6ef;margin-bottom:21px;scrollbar-width:thin}
.wm365-settings-tabs>a{padding:10px 13px;white-space:nowrap;color:#57738c;font-size:12px;font-weight:750;border-bottom:3px solid transparent}
.wm365-settings-tabs>a.selected{color:#066b9c;border-bottom-color:#00aeef}
.wm365-form,.wm365-settings-card{background:white;border:1px solid #dce7ef;border-radius:12px;padding:20px;margin:11px 0;box-shadow:0 4px 14px rgba(30,55,76,.03)}
.wm365-settings-card h3{font-size:16px;margin:0 0 7px}.wm365-settings-card p{font-size:12px;color:#64748b;line-height:1.6;margin:0 0 12px}
.wm365-settings-card dl{display:grid;grid-template-columns:100px minmax(0,1fr);gap:8px;line-height:1.5;font-size:12px}.wm365-settings-card dt{font-weight:800;color:#64748b}.wm365-settings-card dd{margin:0;overflow-wrap:anywhere}
.wm365-option{display:flex;align-items:center;gap:11px;padding:12px 8px;border-bottom:1px solid #eff3f7;font-weight:700;color:#2a4761;font-size:13px}
.wm365-option input{accent-color:#00aeef;width:17px;height:17px}.wm365-form>.button{margin-top:15px}
.wm365-policy-add{display:flex;flex-wrap:wrap;align-items:end;gap:12px}.wm365-policy-add label{flex:1;min-width:170px;font-size:12px}.wm365-policy-add input,.wm365-policy-add select{display:block;width:100%;margin-top:5px;min-height:36px}
.wm365-policy-list{display:grid;gap:7px}.wm365-policy-list form{border:1px solid #e2e8f0;background:white;border-radius:10px;padding:10px;display:flex;align-items:center;gap:10px;font-size:12px}.wm365-policy-list form strong{overflow-wrap:anywhere;min-width:0;flex:1}.wm365-policy-list small{color:#64748b}
@media(max-width:1500px){.wm365-quick-actions .wm365-top-referral{display:none}.wm365-top-switch{max-width:125px!important}}
@media(max-width:1220px){.wm365-quick-actions .wm365-top-settings{font-size:0}.wm365-quick-actions .wm365-top-settings::first-letter{font-size:14px}.wm365-quick-actions .wm365-top-upgrade{font-size:10px}.wm365-split{grid-template-columns:minmax(280px,.88fr) minmax(300px,1.12fr)}}
@media(max-width:990px){.wm365-quick-actions .wm365-top-upgrade,.wm365-quick-actions>select{display:none}.wm365-split{grid-template-columns:minmax(255px,1fr) minmax(290px,1.1fr)}.wm365-preview-content{padding:16px}}
@media(max-width:760px){.wm365-quick-actions{display:none}.mail-workspace .webmail-shell{display:block}.wm365-split{display:block;position:relative}.wm365-split .mail-toolbar{display:block}.wm365-split .wm365-message-column{overflow:visible;max-height:none;min-height:0;border:0}.wm365-split .wm365-preview{display:none;position:fixed;z-index:200;inset:60px 0 0 0;max-height:none;background:white;box-shadow:0 -10px 40px rgba(4,28,48,.25)}.wm365-split .wm365-preview.wm365-open{display:block}.wm365-preview-dismiss{display:block}.wm365-compact .wm365-split .mail-row{min-height:58px}.wm365-modal{width:100vw;height:94vh;max-height:94vh;max-width:100vw;border-radius:13px 13px 0 0;margin:auto 0 0}.wm365-modal-head{padding:12px}.wm365-modal-actions>a{display:none}.wm365-modal iframe{height:calc(100% - 63px)}.wm365-embedded .app-main{padding:12px!important}.wm365-settings-head h1{font-size:23px}.wm365-settings-tabs>a{padding:10px 8px;font-size:11px}.wm365-form,.wm365-settings-card{padding:15px}}
/* High contrast and dark mode adaptability, without overriding existing theme logic. */
@media(prefers-reduced-motion:reduce){.mail-workspace .folder-link{transition:none}}
/* Honour the 3.5 saved theme state in both full webmail and the embedded panels. */
:root[data-mailhub-theme="dark"] .mail-workspace{--wm365-line:#30465e;--wm365-ink:#e5f0fa;--wm365-muted:#99b4c9;--wm365-paper:#132235;--wm365-wash:#15293e}
:root[data-mailhub-theme="dark"] .mail-workspace .webmail-shell,
:root[data-mailhub-theme="dark"] .wm365-split,
:root[data-mailhub-theme="dark"] .wm365-preview{background:#132235;color:#e5f0fa;border-color:#30465e}
:root[data-mailhub-theme="dark"] .mail-workspace .webmail-sidebar{background:linear-gradient(165deg,#192f47,#102339);border-color:#30465e}
:root[data-mailhub-theme="dark"] .wm365-quick-actions>button,
:root[data-mailhub-theme="dark"] .wm365-quick-actions>select{background:#1b3249;color:#e0f2fc;border-color:#3d5b73}
:root[data-mailhub-theme="dark"] .wm365-quick-actions .wm365-top-upgrade{background:#075f86;color:#fff;border-color:#188dbd}
:root[data-mailhub-theme="dark"] .wm365-quick-actions .wm365-top-referral{background:#103b51;color:#8bddff}
:root[data-mailhub-theme="dark"] .wm365-split .mail-toolbar,
:root[data-mailhub-theme="dark"] .wm365-split .message-list{background:#132235;border-color:#30465e}
:root[data-mailhub-theme="dark"] .wm365-preview-header,
:root[data-mailhub-theme="dark"] .wm365-message-meta{border-color:#30465e;color:#a9bece}
:root[data-mailhub-theme="dark"] .wm365-preview-header{background:#14283a}
:root[data-mailhub-theme="dark"] .wm365-message-meta h2,
:root[data-mailhub-theme="dark"] .wm365-placeholder strong{color:#f1f7fc}
:root[data-mailhub-theme="dark"] .wm365-message-meta p,
:root[data-mailhub-theme="dark"] .wm365-preview-body,
:root[data-mailhub-theme="dark"] .wm365-split .mail-subject strong,
:root[data-mailhub-theme="dark"] .wm365-split .mail-from>span{color:#cfdfed}
:root[data-mailhub-theme="dark"] .wm365-split .mail-row.wm365-selected,
:root[data-mailhub-theme="dark"] .wm365-split .mail-row:hover{background:#193e56}
:root[data-mailhub-theme="dark"] .wm365-placeholder>span{background:#1b3e56;color:#7bd7ff}
:root[data-mailhub-theme="dark"] .wm365-sidebar-actions{border-color:#36546a}
:root[data-mailhub-theme="dark"] .wm365-sidebar-actions button{color:#d4e4f3}
:root[data-mailhub-theme="dark"] .wm365-sidebar-actions button:hover{background:#274258}
:root[data-mailhub-theme="dark"] .wm365-modal,
:root[data-mailhub-theme="dark"] .wm365-modal iframe{background:#152438;color:#dceaf5;border-color:#30465e}
:root[data-mailhub-theme="dark"] .wm365-modal-head{background:linear-gradient(115deg,#193149,#10263a);border-color:#30465e}
:root[data-mailhub-theme="dark"] .wm365-modal-head strong{color:#f0f7ff}
:root[data-mailhub-theme="dark"] .wm365-modal-actions button{background:#36536c;color:#fff}
:root[data-mailhub-theme="dark"] body.wm365-embedded{background:#101f31;color:#d9eaf9}
:root[data-mailhub-theme="dark"] .wm365-settings,
:root[data-mailhub-theme="dark"] .wm365-settings-head h1{color:#e7f1fa}
:root[data-mailhub-theme="dark"] .wm365-settings-card,
:root[data-mailhub-theme="dark"] .wm365-form,
:root[data-mailhub-theme="dark"] .wm365-policy-list form{background:#182b40;border-color:#365066;color:#eaf2f9}
:root[data-mailhub-theme="dark"] .wm365-settings-card h3,
:root[data-mailhub-theme="dark"] .wm365-option{color:#e6eef6}
:root[data-mailhub-theme="dark"] .wm365-settings-tabs,
:root[data-mailhub-theme="dark"] .wm365-option{border-color:#365066}
@media(max-width:760px){:root[data-mailhub-theme="dark"] .wm365-split .wm365-preview{background:#132235}}
