:root{--bg:#0a1020;--bg2:#10182b;--panel:#121b2f;--panel2:#18233a;--panel3:#0e1729;--line:#26334e;--line2:#344360;--text:#eef3ff;--muted:#97a5bf;--primary:#7c5cff;--primary2:#3b82f6;--success:#19c98b;--warning:#ffb648;--danger:#ff637c;--shadow:0 20px 60px rgba(0,0,0,.28);--radius:20px;--radius-sm:12px;--sidebar:258px;--topbar:82px;color-scheme:dark}
html[data-theme="light"]{--bg:#edf2f8;--bg2:#f7f9fc;--panel:#fff;--panel2:#f8faff;--panel3:#f0f4fa;--line:#dfe6f0;--line2:#cbd6e5;--text:#172033;--muted:#66738a;--shadow:0 18px 50px rgba(32,52,84,.1);color-scheme:light}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}body{min-height:100vh}button,input,select,textarea{font:inherit}button{cursor:pointer}input,select,textarea{width:100%;border:1px solid var(--line);background:var(--panel3);color:var(--text);border-radius:11px;padding:12px 13px;outline:none;transition:.2s border,.2s box-shadow,.2s background}input:focus,select:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(124,92,255,.15)}label{display:block;font-size:13px;font-weight:650;color:var(--muted)}label input,label select,label textarea{margin-top:7px}.muted{color:var(--muted)}.eyebrow{font-size:11px;letter-spacing:.16em;font-weight:900;color:#8b7cff;margin:0 0 8px}.primary-button,.secondary-button,.quick-compose{border:0;border-radius:12px;padding:13px 18px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:9px;transition:.2s transform,.2s filter,.2s background}.primary-button{background:linear-gradient(135deg,var(--primary),var(--primary2));color:#fff;box-shadow:0 10px 25px rgba(80,83,230,.25)}.primary-button:hover,.quick-compose:hover{filter:brightness(1.08);transform:translateY(-1px)}.secondary-button{background:var(--panel2);border:1px solid var(--line);color:var(--text)}.secondary-button:hover{border-color:var(--primary)}.compact{padding:10px 14px}.link-button{text-decoration:none}.icon-button{width:42px;height:42px;border-radius:12px;border:1px solid var(--line);background:var(--panel);color:var(--text)}.text-button{border:0;background:none;color:#8b7cff;font-weight:800}.brand-mark{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;font-weight:950;color:#fff;background:linear-gradient(135deg,#8b5cf6,#2563eb);box-shadow:0 12px 30px rgba(76,72,222,.35)}code{background:var(--panel3);padding:2px 6px;border-radius:6px}.fatal-screen{min-height:100vh;display:grid;place-items:center;padding:24px}.fatal-card{max-width:600px;background:var(--panel);border:1px solid var(--line);border-radius:24px;padding:34px;box-shadow:var(--shadow)}.fatal-card h1{margin:20px 0 8px}.fatal-card p{color:var(--muted);line-height:1.65}.fatal-card .primary-button{margin-top:12px}
/* login */
.login-shell{min-height:100vh;display:grid;grid-template-columns:1.35fr .85fr;background:var(--bg)}.login-art{position:relative;overflow:hidden;display:flex;align-items:center;padding:8vw;background:radial-gradient(circle at 20% 20%,rgba(90,80,255,.24),transparent 40%),linear-gradient(145deg,#091020,#111b36)}.login-art:after{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.03) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.03) 1px,transparent 1px);background-size:44px 44px;mask-image:linear-gradient(to bottom,black,transparent)}.ambient{position:absolute;border-radius:50%;filter:blur(10px);opacity:.6}.ambient-one{width:380px;height:380px;background:#703cff;right:-150px;top:-100px}.ambient-two{width:300px;height:300px;background:#1676ff;left:-120px;bottom:-120px}.login-copy{position:relative;z-index:2;max-width:740px}.logo-line{display:flex;align-items:center;gap:13px;font-size:17px;font-weight:850;margin-bottom:70px}.login-copy h1{font-size:clamp(44px,6vw,82px);line-height:1.03;letter-spacing:-.05em;margin:0}.login-copy h1 span{background:linear-gradient(90deg,#b7a9ff,#6ecbff);-webkit-background-clip:text;color:transparent}.login-copy>p{font-size:18px;color:#abb8d0;max-width:630px;line-height:1.7;margin:28px 0}.feature-cloud{display:flex;flex-wrap:wrap;gap:10px}.feature-cloud span{padding:9px 13px;border:1px solid #324261;border-radius:99px;background:rgba(19,30,54,.62);font-size:12px;color:#c7d2e9}.login-panel{display:grid;place-items:center;padding:40px;background:var(--bg2)}.login-card{width:min(430px,100%);background:var(--panel);border:1px solid var(--line);border-radius:26px;padding:38px;box-shadow:var(--shadow)}.login-card h2{font-size:32px;letter-spacing:-.03em;margin:6px 0}.login-card>label{margin-top:20px}.login-card .primary-button{width:100%;margin-top:24px;justify-content:space-between}.secure-note{font-size:11px;color:var(--muted);text-align:center;line-height:1.55;margin:20px 0 0}.mobile-brand{display:none;align-items:center;gap:11px;margin-bottom:30px}.form-message{margin-top:14px;padding:11px 13px;border-radius:10px;font-size:13px}.form-message.error{background:rgba(255,99,124,.12);border:1px solid rgba(255,99,124,.3);color:#ff9aad}.form-message.success{background:rgba(25,201,139,.12);border:1px solid rgba(25,201,139,.3);color:#7ae2bb}
/* shell */
.app-shell{min-height:100vh}.sidebar{position:fixed;z-index:30;inset:0 auto 0 0;width:var(--sidebar);background:#0b1324;border-right:1px solid #22304a;padding:22px 16px;display:flex;flex-direction:column;transition:.25s transform}.sidebar-brand{display:flex;align-items:center;gap:12px;padding:0 9px 24px}.sidebar-brand strong,.sidebar-brand small{display:block}.sidebar-brand small{color:#7e8da9;margin-top:3px;font-size:11px}.main-nav{display:grid;gap:6px}.nav-item{height:46px;padding:0 12px;border:0;border-radius:12px;background:transparent;color:#8f9eb8;display:flex;align-items:center;gap:12px;text-align:left;font-weight:700}.nav-item:hover{background:#141f36;color:#eaf0ff}.nav-item.active{background:linear-gradient(90deg,rgba(124,92,255,.22),rgba(59,130,246,.08));color:#fff;border:1px solid rgba(124,92,255,.22)}.nav-icon{width:22px;text-align:center;font-size:18px}.nav-badge{margin-left:auto;background:#6749e8;color:#fff;font-size:9px;padding:3px 7px;border-radius:99px}.sidebar-health{margin-top:auto;background:#111d33;border:1px solid #263553;border-radius:14px;padding:14px}.health-title{font-size:12px;font-weight:800}.status-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--success);box-shadow:0 0 0 5px rgba(25,201,139,.12);margin-right:8px}.sidebar-health small{display:block;color:#7f8da8;line-height:1.5;margin-top:8px}.logout-button{margin-top:10px;height:42px;border:0;background:transparent;color:#8998b4;text-align:left;padding:0 12px}.logout-button:hover{color:#fff}.workspace{margin-left:var(--sidebar);min-height:100vh;background:var(--bg)}.topbar{height:var(--topbar);position:sticky;top:0;z-index:20;background:rgba(10,16,32,.86);backdrop-filter:blur(18px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 30px}.topbar-left,.topbar-actions,.profile-chip{display:flex;align-items:center}.topbar-left{gap:14px}.topbar h1{font-size:21px;margin:0}.topbar p{margin:4px 0 0;color:var(--muted);font-size:12px}.topbar-actions{gap:10px}.quick-compose{background:linear-gradient(135deg,var(--primary),var(--primary2));color:white;padding:11px 15px}.profile-chip{gap:9px;margin-left:5px}.profile-chip strong,.profile-chip small{display:block;font-size:12px}.profile-chip small{color:var(--muted);font-size:10px;margin-top:3px}.avatar{width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,#f97316,#ef4444);display:grid;place-items:center;color:white;font-weight:900}.menu-button{display:none}.page{display:none;padding:28px 30px 110px;max-width:1680px;margin:0 auto}.page.active{display:block;animation:fadeIn .22s ease}@keyframes fadeIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 8px 28px rgba(0,0,0,.08)}.panel-head,.section-heading,.composer-heading,.preview-head,.preflight-title{display:flex;align-items:center;justify-content:space-between;gap:20px}.panel-head h3,.section-heading h2,.composer-heading h2,.preview-head h3{margin:0}.panel-head p,.section-heading p,.preview-head p{margin:5px 0 0;color:var(--muted);font-size:12px}.section-heading{margin-bottom:22px}.section-heading h2{font-size:28px;letter-spacing:-.03em}.welcome-banner{min-height:170px;padding:30px 34px;border-radius:24px;background:linear-gradient(120deg,#29215b,#142958 55%,#103e56);border:1px solid #394275;display:flex;align-items:center;justify-content:space-between;overflow:hidden;position:relative}.welcome-banner:after{content:"";position:absolute;width:400px;height:400px;border-radius:50%;right:-150px;top:-180px;border:70px solid rgba(255,255,255,.035)}.welcome-banner>div,.welcome-banner button{position:relative;z-index:2}.welcome-banner h2{font-size:32px;margin:0 0 8px}.welcome-banner p{color:#b8c4dc}.stats-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:14px;margin:18px 0}.stat-card{background:var(--panel);border:1px solid var(--line);border-radius:17px;padding:18px;display:flex;gap:13px;align-items:center}.stat-icon{width:40px;height:40px;flex:0 0 auto;border-radius:12px;display:grid;place-items:center;background:rgba(124,92,255,.14);color:#9d8cff;font-weight:900}.stat-card span,.stat-card small,.stat-card strong{display:block}.stat-card span{color:var(--muted);font-size:11px}.stat-card strong{font-size:25px;margin:3px 0}.stat-card small{font-size:9px;color:#74829a}.danger-lite .stat-icon{background:rgba(255,99,124,.12);color:var(--danger)}.dashboard-grid{display:grid;grid-template-columns:2fr 1fr;gap:18px}.dashboard-grid .panel{padding:22px}.activity-list{margin-top:16px;min-height:220px}.activity-item{display:grid;grid-template-columns:42px 1fr auto;gap:12px;align-items:center;padding:13px 0;border-top:1px solid var(--line)}.activity-item:first-child{border-top:0}.activity-symbol{width:38px;height:38px;border-radius:12px;background:var(--panel2);display:grid;place-items:center}.activity-main strong,.activity-main small{display:block}.activity-main small{color:var(--muted);margin-top:4px;font-size:11px}.status-badge{font-size:10px;padding:5px 8px;border-radius:99px;background:var(--panel2);text-transform:capitalize}.status-badge.sent{background:rgba(25,201,139,.13);color:#65ddb2}.status-badge.scheduled,.status-badge.queued{background:rgba(59,130,246,.13);color:#77adff}.status-badge.temporary_failed,.status-badge.permanent_failed{background:rgba(255,99,124,.13);color:#ff8799}.quick-action-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}.quick-action-grid button{min-height:105px;border:1px solid var(--line);background:var(--panel2);color:var(--text);border-radius:15px;padding:15px;text-align:left}.quick-action-grid button:hover{border-color:var(--primary);transform:translateY(-1px)}.quick-action-grid b{display:block;font-size:22px;margin-bottom:14px;color:#9b8cff}.quick-action-grid span{font-size:12px;font-weight:800}
/* compose */
.composer-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(360px,.8fr);gap:18px}.compose-card{padding:24px}.composer-heading{margin-bottom:20px}.save-state{font-size:11px;color:var(--muted);display:flex;gap:7px;align-items:center}.save-state span:first-child{width:7px;height:7px;border-radius:50%;background:#65718a}.save-state.saved span:first-child{background:var(--success)}.sender-row,.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.compose-card>label,.sender-row,.collapsible{margin-top:14px}.recipient-field,.subject-field{display:flex;align-items:center;border:1px solid var(--line);background:var(--panel3);border-radius:11px;margin-top:7px;overflow:hidden}.recipient-field:focus-within,.subject-field:focus-within{border-color:var(--primary);box-shadow:0 0 0 3px rgba(124,92,255,.15)}.recipient-field>span{padding-left:13px;color:#8e9cb5}.recipient-field input,.subject-field input{border:0;background:transparent;box-shadow:none;margin:0}.recipient-field button{margin-right:7px;border:0;background:var(--panel2);color:#9d8cff;border-radius:8px;padding:7px 9px;font-size:10px;font-weight:800}.subject-field span{padding-right:12px;color:var(--muted);font-size:10px}.variable-strip{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:16px 0 10px}.variable-strip>span{font-size:10px;color:var(--muted);font-weight:800}.variable-strip button{border:1px solid var(--line);background:var(--panel2);color:#a99aff;border-radius:99px;padding:6px 9px;font-size:9px}.editor-shell{border:1px solid var(--line);border-radius:15px;overflow:hidden;background:#fff}.editor-toolbar{padding:8px;display:flex;align-items:center;gap:5px;flex-wrap:wrap;background:var(--panel2);border-bottom:1px solid var(--line)}.editor-toolbar button,.editor-toolbar select{width:auto;height:32px;padding:0 9px;border:1px solid transparent;background:transparent;color:var(--text);border-radius:7px;font-size:12px}.editor-toolbar button:hover,.editor-toolbar select:hover{background:var(--panel3);border-color:var(--line)}.editor-toolbar input[type=color]{width:30px;height:30px;padding:3px;border-radius:7px}.rich-editor,.html-editor{min-height:360px;padding:28px;color:#172033;background:white;line-height:1.65;outline:none}.html-editor{width:100%;border:0;border-radius:0;resize:vertical;font:12px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;background:#0b1020;color:#dce7ff}.editor-shell.fullscreen{position:fixed;z-index:100;inset:16px;box-shadow:0 0 0 100vmax rgba(0,0,0,.75);border-radius:18px}.editor-shell.fullscreen .rich-editor,.editor-shell.fullscreen .html-editor{height:calc(100vh - 86px)}.attachment-zone{margin-top:16px;min-height:94px;border:1px dashed var(--line2);border-radius:14px;display:flex;align-items:center;justify-content:center;gap:14px;position:relative;background:var(--panel3)}.attachment-zone.dragging{border-color:var(--primary);background:rgba(124,92,255,.08)}.attachment-zone input{position:absolute;inset:0;opacity:0;cursor:pointer}.attachment-icon{width:42px;height:42px;border-radius:12px;background:var(--panel2);display:grid;place-items:center;color:#9d8cff;font-size:22px}.attachment-zone strong{font-size:12px}.attachment-zone p{font-size:10px;color:var(--muted);margin:5px 0}.attachment-list{display:grid;gap:7px;margin-top:9px}.attachment-item{display:flex;align-items:center;justify-content:space-between;padding:9px 11px;border:1px solid var(--line);border-radius:10px;font-size:11px}.attachment-item small{color:var(--muted)}.plain-toggle,.notification-box{display:flex;align-items:center;gap:12px;margin-top:17px;padding:13px;border:1px solid var(--line);border-radius:13px;background:var(--panel3)}.plain-toggle strong,.notification-box strong{font-size:12px}.plain-toggle p,.notification-box p{font-size:10px;color:var(--muted);margin:4px 0}.switch{width:auto;margin:0}.switch input{display:none}.switch span{display:block;width:42px;height:24px;border-radius:99px;background:#3b465d;position:relative;transition:.2s}.switch span:after{content:"";position:absolute;width:18px;height:18px;border-radius:50%;background:white;top:3px;left:3px;transition:.2s}.switch input:checked+span{background:var(--primary)}.switch input:checked+span:after{left:21px}.plain-text{min-height:160px;margin-top:10px}.sticky-card{position:sticky;top:calc(var(--topbar) + 18px)}.preview-card{padding:18px}.device-switch{display:flex;background:var(--panel3);padding:3px;border-radius:9px}.device-switch button{border:0;background:transparent;color:var(--muted);padding:6px 9px;border-radius:7px;font-size:9px}.device-switch button.active{background:var(--panel2);color:var(--text)}.preview-meta{margin:15px 0 10px;padding:12px;background:var(--panel3);border-radius:11px}.preview-meta strong,.preview-meta small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preview-meta strong{font-size:12px}.preview-meta small{font-size:9px;color:var(--muted);margin-top:4px}.preview-stage{min-height:455px;background:#dfe5ee;border-radius:13px;padding:14px;display:flex;justify-content:center;overflow:auto}.preview-stage iframe{width:100%;height:425px;border:0;background:white;border-radius:9px;transition:.2s width}.preflight{margin-top:16px}.preflight-title h4{margin:0;font-size:12px}.preflight-title span{font-size:10px;color:var(--muted)}.preflight ul{padding:0;list-style:none;margin:10px 0 0;display:grid;grid-template-columns:1fr 1fr;gap:6px}.preflight li{font-size:9px;color:var(--muted);padding:7px 8px;background:var(--panel3);border-radius:8px}.preflight li:before{content:"○";margin-right:6px}.preflight li.passed{color:#72dcb5}.preflight li.passed:before{content:"✓"}.compose-actions{position:fixed;z-index:25;left:calc(var(--sidebar) + 30px);right:30px;bottom:18px;min-height:66px;border:1px solid var(--line);background:rgba(18,27,47,.92);backdrop-filter:blur(18px);border-radius:18px;box-shadow:var(--shadow);padding:12px 16px;display:flex;align-items:center;justify-content:space-between}.compose-actions>div{display:flex;gap:9px}
/* tables/templates/accounts/settings */
.templates-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:18px}.templates-layout>.panel,.accounts-layout>.panel{padding:20px}.template-editor-panel{height:max-content;position:sticky;top:calc(var(--topbar) + 18px)}.template-editor-panel label{margin-top:14px}.template-editor-panel .primary-button{width:100%;margin-top:18px}.table-tools{display:flex;gap:10px;align-items:center;margin-bottom:16px}.table-tools input{max-width:440px}.table-tools select{max-width:190px}.template-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.template-card{border:1px solid var(--line);border-radius:15px;overflow:hidden;background:var(--panel2)}.template-preview{height:150px;background:#fff;color:#172033;padding:16px;overflow:hidden;font-size:10px}.template-info{padding:13px}.template-info strong{display:block;font-size:12px}.template-info small{color:var(--muted);font-size:9px}.template-actions{display:flex;gap:6px;margin-top:11px}.template-actions button{flex:1;border:1px solid var(--line);background:var(--panel3);color:var(--text);padding:7px;border-radius:8px;font-size:9px}.template-actions .danger-action{color:#ff8397}.accounts-layout{display:grid;grid-template-columns:430px minmax(0,1fr);gap:18px}.mailbox-form label{margin-top:14px}.secure-pill,.count-pill{font-size:9px;border-radius:99px;padding:6px 9px;background:rgba(25,201,139,.12);color:#69dbb2}.mailbox-address{display:grid;grid-template-columns:1fr auto 1.25fr;gap:8px;align-items:center;margin-top:18px}.mailbox-address span{color:var(--muted)}.mailbox-form>.primary-button{width:100%;margin-top:18px}.responsive-table{overflow:auto}.responsive-table table{width:100%;border-collapse:collapse;min-width:760px}.responsive-table th{text-align:left;padding:11px 12px;color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.08em;border-bottom:1px solid var(--line)}.responsive-table td{padding:13px 12px;border-bottom:1px solid var(--line);font-size:11px;vertical-align:top}.responsive-table td small{display:block;color:var(--muted);margin-top:4px;max-width:300px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.empty-cell{text-align:center!important;padding:40px!important;color:var(--muted)}.cpanel-results{margin-top:14px;background:var(--panel3);border-radius:12px;padding:12px;max-height:260px;overflow:auto;font:11px/1.5 monospace}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.settings-card{padding:22px}.settings-card>div:first-of-type:not(.form-grid){display:inline-grid}.settings-icon{width:42px;height:42px;border-radius:13px;background:rgba(124,92,255,.13);color:#9d8cff;place-items:center;font-weight:900;margin-bottom:14px}.settings-card h3{margin:0}.settings-card>div:nth-child(2)>p{margin:5px 0 14px;color:var(--muted);font-size:11px}.settings-card label{margin-top:12px}.settings-card button{width:100%;margin-top:16px}.check-row{display:flex!important;align-items:center;gap:8px}.check-row input{width:auto;margin:0}.security-callout{margin-top:15px;padding:12px;border-radius:12px;background:rgba(255,182,72,.08);border:1px solid rgba(255,182,72,.2)}.security-callout strong{color:#ffc66d;font-size:11px}.security-callout p{font-size:10px;color:var(--muted);margin:5px 0}.floating-message{position:fixed;z-index:80;right:25px;bottom:25px;max-width:420px;padding:13px 16px;border-radius:12px;background:var(--panel);border:1px solid var(--line);box-shadow:var(--shadow);font-size:12px}
/* modal/toast */
.modal{position:fixed;z-index:120;inset:0;display:grid;place-items:center;padding:20px}.modal[hidden]{display:none}.modal-backdrop{position:absolute;inset:0;background:rgba(2,6,18,.76);backdrop-filter:blur(7px)}.modal-card{position:relative;width:min(440px,100%);background:var(--panel);border:1px solid var(--line);border-radius:24px;padding:30px;box-shadow:var(--shadow);text-align:center}.modal-card h2{margin:13px 0 7px}.modal-card p{color:var(--muted);font-size:12px}.modal-card label{text-align:left;margin:20px 0}.modal-card>.primary-button{width:100%}.modal-close{position:absolute;right:13px;top:13px;width:32px;height:32px;border-radius:9px;border:1px solid var(--line);background:var(--panel2);color:var(--text)}.modal-icon{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;background:rgba(124,92,255,.13);color:#9d8cff;margin:auto;font-size:23px}.success-check{width:72px;height:72px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#19c98b,#0ea5a5);color:white;font-size:34px;font-weight:900;margin:auto;box-shadow:0 14px 35px rgba(25,201,139,.25)}.success-card dl{text-align:left;background:var(--panel3);border-radius:13px;padding:12px;margin:18px 0}.success-card dl div{display:grid;grid-template-columns:110px 1fr;gap:8px;padding:7px;border-bottom:1px solid var(--line);font-size:10px}.success-card dl div:last-child{border:0}.success-card dt{color:var(--muted)}.success-card dd{margin:0;word-break:break-word}.success-note{font-size:9px;color:var(--muted)}.modal-actions{display:flex;gap:8px;margin-top:18px}.modal-actions button{flex:1}.toast-region{position:fixed;z-index:200;right:22px;top:95px;display:grid;gap:9px}.toast{width:min(380px,calc(100vw - 40px));background:var(--panel);border:1px solid var(--line);border-radius:13px;padding:12px 14px;box-shadow:var(--shadow);display:flex;gap:10px;align-items:flex-start;animation:toastIn .25s ease}.toast.success{border-color:rgba(25,201,139,.35)}.toast.error{border-color:rgba(255,99,124,.35)}.toast strong,.toast small{display:block}.toast small{color:var(--muted);margin-top:3px;line-height:1.4}@keyframes toastIn{from{opacity:0;transform:translateX(15px)}to{opacity:1;transform:none}}.loading{opacity:.6;pointer-events:none}.skeleton-box:empty:before{content:"Loading activity…";display:grid;place-items:center;color:var(--muted);min-height:220px}.hidden{display:none!important}
@media(max-width:1320px){.stats-grid{grid-template-columns:repeat(3,1fr)}.template-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:1080px){:root{--sidebar:220px}.composer-layout{grid-template-columns:1fr}.composer-side{order:2}.sticky-card{position:relative;top:auto}.preview-stage{min-height:390px}.preview-stage iframe{height:360px}.accounts-layout{grid-template-columns:1fr}.templates-layout{grid-template-columns:1fr}.template-editor-panel{position:relative;top:auto}.settings-grid{grid-template-columns:1fr}.dashboard-grid{grid-template-columns:1fr}.compose-actions{left:calc(var(--sidebar) + 18px);right:18px}}
@media(max-width:820px){.login-shell{grid-template-columns:1fr}.login-art{display:none}.mobile-brand{display:flex}.sidebar{transform:translateX(-100%);width:260px}.sidebar.open{transform:translateX(0)}.workspace{margin-left:0}.menu-button{display:block}.topbar{padding:0 16px}.topbar-actions .profile-chip,.topbar-actions .quick-compose{display:none}.page{padding:20px 16px 120px}.compose-actions{left:12px;right:12px;bottom:10px}.stats-grid{grid-template-columns:1fr 1fr}.welcome-banner{padding:24px;display:block}.welcome-banner button{margin-top:16px}.template-grid{grid-template-columns:1fr 1fr}.section-heading{align-items:flex-start}.sender-row,.form-grid{grid-template-columns:1fr}.editor-toolbar{max-height:115px;overflow:auto}}
@media(max-width:560px){.login-panel{padding:18px}.login-card{padding:25px}.topbar h1{font-size:17px}.topbar p{display:none}.stats-grid{grid-template-columns:1fr}.stat-card{padding:14px}.dashboard-grid .panel{padding:17px}.composer-layout{display:block}.compose-card{padding:16px}.composer-side{margin-top:14px}.template-grid{grid-template-columns:1fr}.section-heading{display:block}.section-heading button{margin-top:12px}.table-tools{display:grid}.table-tools input,.table-tools select{max-width:none}.compose-actions{display:block;padding:9px}.compose-actions>div{display:grid;grid-template-columns:1fr 1fr}.compose-actions>div+div{margin-top:7px}.rich-editor,.html-editor{min-height:310px;padding:18px}.preview-stage{min-height:320px}.preview-stage iframe{height:300px}.preflight ul{grid-template-columns:1fr}.modal-card{padding:24px}.modal-actions{display:grid}.mailbox-address{grid-template-columns:1fr auto}.mailbox-address input:last-child{grid-column:1/-1}}

.draft-tools{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}.draft-tools select{width:190px;padding:8px 10px;font-size:10px}.mini-danger{width:32px;height:32px;border:1px solid rgba(255,99,124,.25);background:rgba(255,99,124,.08);color:#ff8397;border-radius:9px}.draft-tools .save-state{margin-left:5px}@media(max-width:700px){.composer-heading{align-items:flex-start}.draft-tools{justify-content:flex-start}.draft-tools select{width:170px}}

/* v1.2 smart cPanel workflow */
.composer-layout{grid-template-columns:minmax(0,3.35fr) minmax(300px,1fr)}
.composer-main{min-width:0}.composer-side{min-width:0}.rich-editor,.html-editor{min-height:52vh}
.smart-reply-note{margin-top:10px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:rgba(25,201,139,.07);color:var(--muted);font-size:10px}.smart-reply-note strong{color:var(--text)}
.locked-value{margin-top:7px;min-height:42px;padding:11px 12px;border:1px solid var(--line);border-radius:10px;background:var(--panel3);font-size:11px;color:var(--muted)}
.pagination{display:flex;justify-content:center;align-items:center;gap:6px;flex-wrap:wrap;padding:16px 0 2px}.pagination button{min-width:34px;height:32px;border:1px solid var(--line);background:var(--panel3);color:var(--text);border-radius:8px;padding:0 10px;font-size:10px}.pagination button.active{background:var(--primary);border-color:var(--primary);color:white}.pagination button:disabled{opacity:.45;cursor:not-allowed}.pagination span{font-size:10px;color:var(--muted);padding:0 5px}
@media(max-width:1280px){.composer-layout{grid-template-columns:minmax(0,2.5fr) minmax(290px,1fr)}}

/* v1.3 Unified Inbox and Professional Composer */
.sidebar-compose{margin:0 6px 18px;height:46px;border:0;border-radius:13px;background:linear-gradient(135deg,var(--primary),var(--primary2));color:#fff;font-weight:850;display:flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 12px 24px rgba(79,99,246,.24)}
.nav-count{margin-left:auto;min-width:23px;height:21px;padding:0 6px;border-radius:99px;background:#ff526e;color:#fff;display:inline-grid;place-items:center;font-size:10px;font-weight:900}.nav-count[hidden]{display:none}.stat-card.featured{background:linear-gradient(145deg,rgba(79,99,246,.18),var(--panel));border-color:rgba(100,116,255,.38)}.stat-card.featured .stat-icon{background:linear-gradient(135deg,var(--primary),var(--primary2));color:#fff}.activity-item>div:nth-child(2) strong,.activity-item>div:nth-child(2) small,.activity-right small{display:block}.activity-item>div:nth-child(2) small,.activity-right small{font-size:10px;color:var(--muted);margin-top:4px}.activity-right{text-align:right}.activity-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--panel2);font-weight:900}.activity-icon.sent{color:var(--success)}.activity-icon.temporary_failed,.activity-icon.permanent_failed{color:var(--danger)}
.mailbox-summary{display:grid;gap:7px;margin-top:15px}.mailbox-summary button{display:grid;grid-template-columns:38px 1fr auto;align-items:center;gap:10px;width:100%;border:1px solid transparent;background:transparent;color:var(--text);padding:9px;border-radius:12px;text-align:left}.mailbox-summary button:hover{background:var(--panel2);border-color:var(--line)}.mailbox-summary strong,.mailbox-summary small{display:block}.mailbox-summary small{color:var(--muted);font-size:9px;margin-top:3px}.mailbox-summary b{min-width:25px;height:25px;border-radius:99px;background:rgba(79,99,246,.15);color:#9faaff;display:grid;place-items:center;font-size:10px}.mail-avatar{width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,#6f5cf6,#367fee);color:#fff;display:grid;place-items:center;font-weight:900;flex:0 0 auto}.mail-avatar.small{width:29px;height:29px;border-radius:9px;font-size:10px}

.mail-page{max-width:none!important;padding:18px!important;height:calc(100vh - var(--topbar));overflow:hidden}.mail-app{height:100%;display:grid;grid-template-columns:225px minmax(330px,430px) minmax(420px,1fr);background:var(--panel);border:1px solid var(--line);border-radius:20px;overflow:hidden;box-shadow:var(--shadow)}.mail-folders{background:var(--panel3);border-right:1px solid var(--line);padding:16px 12px;overflow:auto}.mail-compose-button{width:100%;height:44px;border:0;border-radius:12px;background:linear-gradient(135deg,var(--primary),var(--primary2));color:#fff;font-weight:850;margin-bottom:19px}.folder-title{font-size:9px;letter-spacing:.14em;font-weight:900;color:var(--muted);padding:7px 10px}.mailbox-title{margin-top:17px}.folder-button{width:100%;height:40px;border:0;border-radius:10px;background:transparent;color:var(--muted);display:flex;align-items:center;justify-content:space-between;padding:0 11px;font-size:11px;font-weight:750}.folder-button:hover,.folder-button.active{background:var(--panel2);color:var(--text)}.folder-button b{min-width:23px;height:22px;border-radius:99px;background:rgba(79,99,246,.14);color:#9da9ff;display:grid;place-items:center;font-size:9px}.mailbox-folder-list{display:grid;gap:4px}.mailbox-folder{width:100%;display:grid;grid-template-columns:29px minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px;border:0;border-radius:11px;background:transparent;color:var(--text);text-align:left}.mailbox-folder:hover,.mailbox-folder.active{background:var(--panel2)}.mailbox-folder strong,.mailbox-folder small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mailbox-folder strong{font-size:10px}.mailbox-folder small{font-size:8px;color:var(--muted);margin-top:2px}.mailbox-folder b{min-width:21px;height:21px;border-radius:99px;background:#ff536f;color:#fff;display:grid;place-items:center;font-size:8px}.folder-empty{padding:12px;color:var(--muted);font-size:10px}
.mail-list-panel{border-right:1px solid var(--line);display:flex;flex-direction:column;min-width:0;background:var(--panel)}.mail-list-toolbar{padding:14px;display:flex;gap:9px;border-bottom:1px solid var(--line)}.mail-search{height:40px;display:flex;align-items:center;gap:8px;border:1px solid var(--line);background:var(--panel3);border-radius:11px;padding:0 11px;flex:1}.mail-search input{border:0;background:transparent;padding:0;box-shadow:none!important;font-size:11px}.mail-list-heading{display:flex;align-items:flex-end;justify-content:space-between;padding:16px 16px 12px}.mail-list-heading h2{margin:0;font-size:20px}.mail-list-heading p{margin:4px 0 0;color:var(--muted);font-size:10px}.message-list{flex:1;overflow:auto;border-top:1px solid var(--line)}.message-list.loading-list{opacity:.55;pointer-events:none}.message-row{width:100%;display:grid;grid-template-columns:24px 36px minmax(0,1fr);gap:9px;padding:13px 13px;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--text);text-align:left}.message-row:hover{background:var(--panel2)}.message-row.selected{background:rgba(79,99,246,.12);box-shadow:inset 3px 0 var(--primary)}.message-row.unread{background:rgba(79,99,246,.06)}.message-row.unread .message-copy>b,.message-row.unread .message-line strong{font-weight:900;color:var(--text)}.message-star{border:0;background:transparent;color:var(--muted);font-size:16px;padding:2px}.message-star.active{color:#ffc95c}.sender-avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--panel3);border:1px solid var(--line);font-weight:900;color:#9ca9ff;font-size:11px}.message-copy{min-width:0}.message-line{display:flex;align-items:center;justify-content:space-between;gap:8px}.message-line strong{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.message-line time{font-size:8px;color:var(--muted);white-space:nowrap}.message-copy>b,.message-copy>small,.message-copy>em{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.message-copy>b{font-size:10px;margin-top:3px}.message-copy>small{font-size:9px;color:var(--muted);margin-top:4px}.message-copy>em{font-size:8px;color:#7f8da6;margin-top:5px;font-style:normal}.mail-empty,.reader-empty{height:100%;min-height:240px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--muted);padding:30px}.mail-empty strong{color:var(--text);font-size:13px;margin-bottom:6px}.mail-empty span{font-size:10px}.reader-empty-icon{width:64px;height:64px;border-radius:20px;background:rgba(79,99,246,.12);display:grid;place-items:center;font-size:27px;color:#98a5ff}.reader-empty h3{margin:16px 0 6px;color:var(--text)}.reader-empty p{max-width:360px;font-size:11px;line-height:1.6}
.mail-reader{overflow:auto;background:var(--bg2);min-width:0}.reader-loading{height:100%;display:grid;place-items:center;color:var(--muted)}.reader-toolbar{position:sticky;top:0;z-index:4;display:flex;align-items:center;gap:8px;padding:12px 18px;background:rgba(10,16,32,.82);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}html[data-theme="light"] .reader-toolbar{background:rgba(247,249,252,.9)}.reader-toolbar #readerUnreadButton{margin-left:auto}.reader-subject{padding:25px 28px 14px}.reader-subject h2{font-size:25px;line-height:1.25;margin:0 0 14px}.reader-subject>div{font-size:10px;color:var(--muted)}.reader-subject>div strong{color:var(--text);margin-left:6px}.thread-stream{display:grid;gap:12px;padding:0 28px 18px}.thread-card{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:17px}.thread-card.outgoing{border-left:3px solid var(--primary)}.thread-card.incoming{border-left:3px solid var(--success)}.thread-card header{display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center}.thread-card header strong,.thread-card header small{display:block}.thread-card header strong{font-size:11px}.thread-card header small{font-size:8px;color:var(--muted);margin-top:3px}.thread-card header em{font-style:normal;font-size:8px;color:var(--muted);padding:4px 7px;border-radius:99px;background:var(--panel2)}.thread-text{margin-top:14px;padding-top:13px;border-top:1px solid var(--line);font-size:11px;line-height:1.65;color:var(--text);max-height:480px;overflow:auto}.incoming-attachments{display:flex;flex-wrap:wrap;gap:8px;padding:0 28px 17px}.incoming-attachments a{display:flex;align-items:center;gap:8px;padding:9px 11px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--text);text-decoration:none;font-size:9px}.incoming-attachments a small{color:var(--muted)}.quick-reply{margin:0 28px 30px;background:var(--panel);border:1px solid var(--line);border-radius:18px;overflow:hidden}.reply-identity{display:flex;gap:10px;align-items:center;padding:15px;border-bottom:1px solid var(--line)}.reply-identity strong,.reply-identity small{display:block}.reply-identity strong{font-size:11px}.reply-identity small{font-size:8px;color:var(--muted);margin-top:3px}.reply-editor{min-height:190px;padding:20px;background:#fff;color:#172033;font:14px/1.65 Arial;outline:none}.reply-footer{display:flex;align-items:center;gap:9px;padding:11px;border-top:1px solid var(--line)}.reply-attach{font-size:10px;color:var(--text);padding:9px 11px;border:1px solid var(--line);border-radius:9px;cursor:pointer}.reply-footer>span{flex:1;min-width:0;font-size:8px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.composer-pro{max-width:1420px;margin:0 auto}.professional-compose{padding:0;overflow:hidden}.professional-compose .composer-heading{padding:18px 22px;margin:0;border-bottom:1px solid var(--line)}.professional-compose .composer-heading h2{font-size:22px}.compose-heading-actions{display:flex;align-items:center;gap:8px}.compose-heading-actions select{width:180px;padding:8px 10px;font-size:9px}.compose-fields{padding:4px 22px 0}.compose-line{min-height:48px;display:grid;grid-template-columns:64px minmax(0,1fr) auto;align-items:center;border-bottom:1px solid var(--line)}.compose-line input,.compose-line select{border:0;background:transparent;border-radius:0;box-shadow:none!important;padding:10px 4px;font-size:12px}.compose-line select{appearance:auto}.field-label{font-size:10px;color:var(--muted);font-weight:850}.identity-hint{font-size:9px;color:var(--muted);padding-left:10px;white-space:nowrap}.inline-link{border:0;background:transparent;color:#91a0ff;font-size:9px;font-weight:800}.cc-line{grid-template-columns:64px 1fr 64px 1fr}.bcc-label{padding-left:17px}.subject-line{grid-template-columns:64px minmax(0,1fr) auto}.subject-line>span:last-child{font-size:8px;color:var(--muted)}.reply-context{margin:12px 22px 0;padding:10px 12px;border-radius:10px;background:rgba(25,201,139,.09);border:1px solid rgba(25,201,139,.22);font-size:10px;color:var(--muted)}.composer-view-tabs{display:flex;align-items:center;justify-content:space-between;padding:12px 22px 8px}.composer-view-tabs>div:first-child{display:flex;gap:5px}.composer-view-tabs>div:first-child button{height:31px;border:1px solid var(--line);background:var(--panel3);color:var(--muted);border-radius:8px;padding:0 12px;font-size:9px;font-weight:800}.composer-view-tabs>div:first-child button.active{background:var(--primary);color:#fff;border-color:var(--primary)}.variable-strip.compact{margin:0}.editor-shell{margin:0 22px;border-radius:14px;overflow:hidden;border:1px solid var(--line);background:var(--panel3)}.editor-toolbar{border:0;border-bottom:1px solid var(--line);border-radius:0;padding:8px;min-height:48px}.rich-editor,.html-editor{min-height:55vh!important;max-height:none!important;border:0!important;border-radius:0!important;padding:30px 34px!important;background:#fff!important;color:#172033!important;font-size:15px!important;line-height:1.65!important}.compose-preview-panel{min-height:55vh;padding:22px;background:#e9eef6}.preview-envelope{max-width:840px;margin:auto}.preview-meta{background:#172033;color:#fff;padding:13px 16px;border-radius:12px 12px 0 0}.preview-meta strong,.preview-meta small{display:block}.preview-meta small{font-size:9px;color:#b5c1d6;margin-top:4px}.compose-preview-panel iframe{width:100%;height:54vh;border:0;background:#fff;border-radius:0 0 12px 12px}.compose-extras{padding:12px 22px 0}.attachment-zone{min-height:64px;padding:10px 14px;display:flex;align-items:center;justify-content:flex-start;gap:11px}.attachment-zone>span{font-size:19px}.attachment-zone p{margin:2px 0 0}.attachment-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}.plain-toggle{display:flex;align-items:center;gap:8px;margin:10px 0;font-size:9px}.plain-toggle input{width:auto;margin:0}.professional-actions{position:sticky!important;left:auto!important;right:auto!important;bottom:0!important;margin-top:0!important;padding:13px 22px!important;border-top:1px solid var(--line)!important;background:rgba(18,27,47,.95)!important;border-radius:0!important;box-shadow:0 -12px 30px rgba(0,0,0,.13)!important}.professional-actions>div{display:flex;gap:8px}.send-primary{min-width:155px}.editor-fullscreen{position:fixed!important;z-index:150;inset:16px!important;margin:0!important;border-radius:18px!important;box-shadow:0 30px 100px rgba(0,0,0,.6)}.editor-fullscreen .rich-editor,.editor-fullscreen .html-editor{min-height:calc(100vh - 95px)!important}.identity-cell{display:flex;align-items:center;gap:9px}.identity-cell strong,.identity-cell small{display:block}.unread-table-count{min-width:28px;height:28px;border-radius:99px;background:rgba(79,99,246,.13);color:#9ba8ff;display:inline-grid;place-items:center}.error-text{color:var(--danger)!important}.locked-value{display:flex;align-items:center}

@media(max-width:1280px){.mail-app{grid-template-columns:190px 360px minmax(390px,1fr)}.stats-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:1050px){.mail-page{height:auto;overflow:visible}.mail-app{height:auto;min-height:720px;grid-template-columns:190px minmax(320px,1fr)}.mail-reader{grid-column:1/-1;min-height:600px;border-top:1px solid var(--line)}.mail-list-panel{border-right:0}.professional-compose .compose-heading-actions .save-state{display:none}}
@media(max-width:820px){.mail-page{padding:10px!important}.mail-app{display:block;border-radius:14px}.mail-folders{display:flex;gap:6px;overflow:auto;border-right:0;border-bottom:1px solid var(--line);padding:9px}.mail-compose-button,.folder-title,.mailbox-folder-list{display:none}.folder-button{width:auto;min-width:max-content;padding:0 13px}.mail-list-panel{min-height:560px}.mail-reader{min-height:520px}.compose-heading-actions select{width:140px}.compose-line{grid-template-columns:50px minmax(0,1fr) auto}.cc-line{grid-template-columns:50px 1fr}.cc-line .bcc-label,.cc-line #bccEmail{grid-column:auto}.composer-view-tabs{display:block}.variable-strip.compact{margin-top:9px}.rich-editor,.html-editor{min-height:48vh!important;padding:22px!important}.professional-actions{display:flex!important}.settings-grid{grid-template-columns:1fr}}
@media(max-width:560px){.mail-list-toolbar{display:grid}.mail-list-heading{align-items:flex-start}.mail-list-heading .text-button{display:none}.message-row{grid-template-columns:20px 32px minmax(0,1fr)}.reader-subject,.thread-stream{padding-left:15px;padding-right:15px}.quick-reply{margin-left:15px;margin-right:15px}.reply-footer{flex-wrap:wrap}.reply-footer>span{width:100%;flex-basis:100%}.professional-compose .composer-heading{display:block}.compose-heading-actions{margin-top:10px}.compose-fields{padding-left:14px;padding-right:14px}.compose-line{grid-template-columns:42px minmax(0,1fr)}.compose-line .identity-hint,.compose-line .inline-link,.subject-line>span:last-child{display:none}.cc-line{grid-template-columns:42px minmax(0,1fr)}.cc-line .bcc-label{grid-column:1}.cc-line #bccEmail{grid-column:2}.composer-view-tabs,.compose-extras{padding-left:14px;padding-right:14px}.editor-shell{margin-left:14px;margin-right:14px}.professional-actions{padding-left:14px!important;padding-right:14px!important;display:block!important}.professional-actions>div{display:grid;grid-template-columns:repeat(3,1fr)}.send-primary{width:100%;margin-top:8px}}
.rename-mailbox{display:block;border:0;background:transparent;color:#8fa0ff;padding:3px 0 0;font-size:8px;font-weight:800;text-align:left}.rename-mailbox:hover{text-decoration:underline}

/* v1.3.1 — refined blank composer and professional 12px typography */
.composer-pro{max-width:1540px}.professional-compose{box-shadow:0 22px 70px rgba(0,0,0,.18)}
.editor-shell{border-color:var(--line2);box-shadow:0 14px 36px rgba(0,0,0,.12)}
.editor-toolbar{padding:10px 12px;gap:6px;background:linear-gradient(180deg,var(--panel2),var(--panel3));box-shadow:inset 0 -1px 0 var(--line);scrollbar-width:thin}
.editor-toolbar button,.editor-toolbar select{height:34px;border-color:var(--line);background:rgba(255,255,255,.025);font-weight:750}
.editor-toolbar button:hover,.editor-toolbar select:hover,.editor-toolbar select:focus{background:var(--panel);border-color:rgba(124,92,255,.7);box-shadow:0 0 0 2px rgba(124,92,255,.12)}
.editor-toolbar select:first-child{min-width:112px}.editor-toolbar select[data-command="fontName"]{min-width:105px}.font-size-select{min-width:82px!important;font-weight:900!important;color:#b8adff!important;background:rgba(124,92,255,.09)!important;border-color:rgba(124,92,255,.28)!important}.toolbar-divider{width:1px;height:24px;background:var(--line2);margin:0 2px;flex:0 0 auto}
.rich-editor,.html-editor{min-height:58vh!important;padding:38px 44px!important;font-size:12px!important;line-height:1.65!important}.rich-editor{background:linear-gradient(180deg,#fff 0%,#fefefe 100%)!important;caret-color:#4f46e5}.rich-editor:focus{box-shadow:inset 0 0 0 2px rgba(79,70,229,.08)}
.rich-editor:empty:before,.reply-editor:empty:before{content:attr(data-placeholder);display:block;color:#9aa6b8;font-style:normal;pointer-events:none;user-select:none}.rich-editor:focus:empty:before,.reply-editor:focus:empty:before{color:#b2bac7}
.rich-editor p,.reply-editor p{margin-top:0;margin-bottom:12px}.rich-editor h1,.rich-editor h2,.rich-editor h3{line-height:1.25;margin:0 0 14px}.compose-preview-panel{min-height:58vh}.compose-preview-panel iframe{height:57vh}
.quick-reply{border-color:var(--line2);box-shadow:0 18px 44px rgba(0,0,0,.13)}.reply-identity{background:linear-gradient(180deg,var(--panel2),var(--panel));padding:16px 18px}.reply-formatbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:9px 12px;border-bottom:1px solid var(--line);background:var(--panel3)}.reply-formatbar button,.reply-formatbar select{width:auto;height:32px;padding:0 9px;border:1px solid var(--line);border-radius:8px;background:var(--panel2);color:var(--text);font-size:10px}.reply-formatbar button:hover,.reply-formatbar select:hover{border-color:var(--primary);background:var(--panel)}.reply-formatbar select:first-child{min-width:105px}.reply-editor{min-height:220px;padding:24px 26px;background:#fff;color:#172033;font:12px/1.65 Arial,Helvetica,sans-serif;outline:none;caret-color:#4f46e5}.reply-editor:focus{box-shadow:inset 0 0 0 2px rgba(79,70,229,.08)}
@media(max-width:820px){.rich-editor,.html-editor{min-height:52vh!important;padding:28px!important}.editor-toolbar{flex-wrap:nowrap;overflow-x:auto;max-height:none}.toolbar-divider{display:none}.reply-formatbar{flex-wrap:nowrap;overflow-x:auto}.reply-editor{min-height:200px;padding:20px}}

/* ========================================================================== 
   v1.4.1 Professional Mail Client — compact, database-first and searchable
   ========================================================================== */
.compact-banner{min-height:76px!important;padding:14px 20px!important;border-radius:16px!important}
.compact-banner:after{width:220px!important;height:220px!important;right:-100px!important;top:-105px!important;border-width:38px!important}
.compact-banner h2{font-size:19px!important;margin:0 0 3px!important}.compact-banner p{font-size:11px;margin:0}.compact-banner .eyebrow{margin-bottom:4px}.banner-actions{display:flex;align-items:center;gap:8px}
.compact-stats{gap:9px!important;margin:10px 0!important}.compact-stats .stat-card{min-height:64px;padding:9px 11px!important;border-radius:13px;cursor:pointer}.compact-stats .stat-icon{width:32px;height:32px;border-radius:10px}.compact-stats .stat-card strong{font-size:20px;margin:0}.compact-stats .stat-card span{font-size:9px}
.dashboard-mail-grid{grid-template-columns:minmax(0,2fr) minmax(260px,.75fr)!important;gap:11px!important}.dashboard-mail-grid .panel{padding:15px!important}.dashboard-mail-grid .span-two{grid-column:auto}.dashboard-mail-grid .span-two:last-child{grid-column:1/-1}.compact-activity{min-height:0!important;margin-top:7px!important}.activity-button{width:100%;border:0;background:transparent;color:var(--text);text-align:left}.activity-button:hover{background:var(--panel2);border-radius:10px}.activity-item{padding:8px 7px!important}.activity-icon{width:31px!important;height:31px!important;border-radius:9px!important}.dashboard-inbox-list{display:grid;margin-top:7px;min-height:0}.dashboard-inbox-row{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:9px;align-items:center;width:100%;padding:8px 7px;border:0;border-top:1px solid var(--line);background:transparent;color:var(--text);text-align:left;border-radius:9px}.dashboard-inbox-row:first-child{border-top:0}.dashboard-inbox-row:hover{background:var(--panel2)}.dashboard-inbox-row.unread{background:rgba(79,99,246,.07)}.dashboard-inbox-row span:nth-child(2){min-width:0}.dashboard-inbox-row strong,.dashboard-inbox-row b,.dashboard-inbox-row small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-inbox-row strong{font-size:10px}.dashboard-inbox-row b{font-size:10px;margin-top:2px}.dashboard-inbox-row small{font-size:8px;color:var(--muted);margin-top:3px}.dashboard-inbox-row time{font-size:8px;color:var(--muted);white-space:nowrap}

#page-compose{max-width:none!important;padding:10px 12px 24px!important}.composer-pro{max-width:none!important}.professional-compose{min-height:calc(100vh - var(--topbar) - 28px);display:flex;flex-direction:column;border-radius:15px!important}.professional-compose .composer-heading{padding:9px 15px!important;min-height:46px}.professional-compose .composer-heading .eyebrow{display:none}.professional-compose .composer-heading h2{font-size:15px!important}.compose-heading-actions select{height:31px;width:190px!important}.compose-fields{padding:0 16px!important}.compose-line{min-height:40px!important;grid-template-columns:52px minmax(0,1fr) auto!important}.compose-line input{padding:8px 3px!important}.cc-line{grid-template-columns:52px 1fr 52px 1fr!important}.composer-view-tabs{padding:7px 16px 6px!important}.editor-shell{margin:0 16px!important;flex:1;display:flex;flex-direction:column;min-height:0}.editor-toolbar{min-height:41px!important;padding:5px 7px!important}.editor-toolbar button,.editor-toolbar select{height:30px!important}.rich-editor,.html-editor{flex:1;min-height:calc(100vh - 315px)!important;padding:22px 26px!important;font-size:12px!important;line-height:1.65!important}.compose-preview-panel{min-height:calc(100vh - 315px)!important}.compose-extras{padding:7px 16px 0!important}.attachment-zone{min-height:46px!important}.professional-actions{padding:9px 16px!important}.professional-actions .secondary-button,.professional-actions .primary-button{padding:9px 13px}.identity-hint{display:none!important}

.sender-line{overflow:visible!important}.sender-combobox{position:relative;min-width:0}.sender-picker-button{width:100%;height:38px;display:grid;grid-template-columns:29px minmax(0,1fr) auto;align-items:center;gap:9px;border:0;background:transparent;color:var(--text);padding:2px 4px;text-align:left;border-radius:8px}.sender-picker-button:hover,.sender-picker-button[aria-expanded="true"]{background:var(--panel2)}.sender-picker-avatar{width:27px;height:27px;border-radius:9px;display:grid;place-items:center;background:linear-gradient(135deg,#7458f7,#337bea);color:#fff;font-weight:900;font-size:10px}.sender-picker-copy{min-width:0}.sender-picker-copy strong,.sender-picker-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sender-picker-copy strong{font-size:11px;color:var(--text)}.sender-picker-copy small{font-size:8px;color:var(--muted);margin-top:2px}.sender-picker-chevron{color:var(--muted)}.sender-picker-menu{position:absolute;z-index:160;left:0;top:43px;width:min(540px,calc(100vw - 80px));background:#111b30;color:#f5f7ff;border:1px solid #30415f;border-radius:14px;box-shadow:0 24px 70px rgba(0,0,0,.48);overflow:hidden}.sender-picker-menu[hidden]{display:none}.sender-picker-search{display:flex;align-items:center;gap:8px;padding:10px;border-bottom:1px solid #2b3a55;background:#0d1729}.sender-picker-search input{height:36px;border:0!important;background:#17233a!important;color:#fff!important;box-shadow:none!important}.sender-results{max-height:330px;overflow:auto;padding:6px}.sender-result{width:100%;display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:9px;padding:8px;border:0;border-radius:9px;background:transparent;color:#f4f6ff;text-align:left}.sender-result:hover,.sender-result.selected{background:#1b2943}.sender-result strong,.sender-result small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sender-result strong{font-size:10px}.sender-result small{font-size:8px;color:#9aa9c2;margin-top:2px}.sender-result em{font-size:8px;color:#9f94ff;font-style:normal}.sender-result-meta{padding:8px 12px;border-top:1px solid #2b3a55;color:#8999b4;font-size:8px}.sender-no-results{padding:22px;text-align:center;color:#9aa9c2;font-size:10px}html[data-theme="light"] .sender-picker-menu{background:#fff;color:#172033;border-color:#cfd7e5;box-shadow:0 20px 60px rgba(30,41,59,.2)}html[data-theme="light"] .sender-picker-search{background:#f4f7fb;border-color:#dce3ee}html[data-theme="light"] .sender-picker-search input{background:#fff!important;color:#172033!important}html[data-theme="light"] .sender-result{color:#172033}html[data-theme="light"] .sender-result:hover,html[data-theme="light"] .sender-result.selected{background:#eef2ff}html[data-theme="light"] .sender-result-meta{border-color:#e3e8f1;color:#667085}

.two-panel-mail{grid-template-columns:minmax(360px,480px) minmax(520px,1fr)!important}.mail-select-all{width:34px;height:40px;display:grid;place-items:center;flex:0 0 auto}.mail-select-all input,.row-check input{position:absolute;opacity:0;pointer-events:none}.mail-select-all span,.row-check span{width:15px;height:15px;border:1px solid var(--line2);border-radius:4px;background:var(--panel3);display:block}.mail-select-all input:checked+span,.row-check input:checked+span{background:var(--primary);border-color:var(--primary);box-shadow:inset 0 0 0 3px var(--panel)}.mail-filter-select{width:135px!important;height:40px;padding:0 9px!important}.bulk-action-bar{display:flex;align-items:center;gap:6px;padding:7px 13px;border-bottom:1px solid var(--line);background:rgba(79,99,246,.08);overflow:auto}.bulk-action-bar[hidden]{display:none}.bulk-action-bar strong{font-size:9px;margin-right:5px;white-space:nowrap}.bulk-action-bar button,.trash-tabs button{height:29px;padding:0 9px;border:1px solid var(--line);background:var(--panel2);color:var(--text);border-radius:8px;font-size:8px;font-weight:800;white-space:nowrap}.bulk-action-bar button:hover,.trash-tabs button.active{border-color:var(--primary);background:rgba(79,99,246,.12)}.danger-button{border:1px solid rgba(255,82,110,.3);background:rgba(255,82,110,.1);color:#ff8296;border-radius:10px;font-weight:800}.danger-action{color:#ff8296!important}.message-row{grid-template-columns:20px 22px 34px minmax(0,1fr) auto!important;gap:8px!important;align-items:center;padding:9px 10px!important;position:relative}.row-check{width:20px;height:34px;display:grid;place-items:center;cursor:pointer}.message-open{border:0;background:transparent;color:var(--text);text-align:left;padding:0;min-width:0;width:100%}.row-quick-actions{display:flex;gap:3px;opacity:0;transition:.15s opacity}.message-row:hover .row-quick-actions{opacity:1}.row-quick-actions button{width:28px;height:28px;border:0;border-radius:8px;background:var(--panel3);color:var(--muted)}.row-quick-actions button:hover{color:var(--text);background:var(--panel)}.reader-toolbar{flex-wrap:wrap}.reader-toolbar .danger-button{margin-left:auto}.reply-route{margin-top:9px;padding:8px 10px;background:rgba(79,99,246,.08);border-radius:9px}.reader-reply-cta{padding:0 28px 28px}.sent-html-view{padding:0 28px 18px}.sent-html-view iframe{width:100%;min-height:430px;border:1px solid var(--line);border-radius:14px;background:#fff}.incoming-attachments span{display:flex;align-items:center;gap:7px;padding:8px 10px;border:1px solid var(--line);border-radius:9px;background:var(--panel)}.trash-tabs{display:flex;gap:5px}.draft-list{display:grid}.draft-row{display:flex;align-items:center;gap:10px;border-top:1px solid var(--line);padding:8px 10px}.draft-row:first-child{border-top:0}.draft-row>button:first-child{flex:1;display:flex;align-items:center;gap:10px;border:0;background:transparent;color:var(--text);text-align:left}.draft-row strong,.draft-row small{display:block}.draft-row small{color:var(--muted);font-size:9px;margin-top:3px}.draft-row>.danger-action{border:1px solid rgba(255,82,110,.2);background:rgba(255,82,110,.06);border-radius:8px;padding:7px 9px}.compact-section-heading{margin-bottom:12px!important}

@media(max-width:1100px){.dashboard-mail-grid{grid-template-columns:1fr!important}.dashboard-mail-grid .span-two:last-child{grid-column:auto}.two-panel-mail{grid-template-columns:minmax(330px,430px) minmax(420px,1fr)!important}.row-quick-actions{opacity:1}.sender-picker-menu{width:min(500px,calc(100vw - 50px))}}
@media(max-width:820px){.compact-banner{display:none!important}.compact-stats{grid-template-columns:repeat(3,1fr)!important}.dashboard-mail-grid{margin-top:10px}.two-panel-mail{display:block!important}.two-panel-mail .mail-list-panel{min-height:500px}.two-panel-mail .mail-reader{min-height:520px}.compose-heading-actions{max-width:100%;overflow:auto}.sender-picker-menu{position:fixed;left:12px;right:12px;top:110px;width:auto}.message-row{grid-template-columns:20px 20px 32px minmax(0,1fr)!important}.row-quick-actions{display:none}.rich-editor,.html-editor{min-height:55vh!important}.professional-compose{min-height:auto}}
@media(max-width:560px){.compact-stats{grid-template-columns:repeat(2,1fr)!important}.mail-filter-select{width:100%!important}.bulk-action-bar{padding-left:8px}.message-star{display:none}.message-row{grid-template-columns:20px 32px minmax(0,1fr)!important}.message-row>.sender-avatar{grid-column:2}.message-open{grid-column:3}.sender-line{grid-template-columns:42px minmax(0,1fr)!important}.professional-actions>div{grid-template-columns:1fr 1fr!important}.professional-actions #sendTestButton{display:none}}

/* =========================================================
   v1.5 Multi-tenant polish, registration, leads and focus UI
   ========================================================= */
:root{--sidebar-compact:76px}
.auth-shell{min-height:100vh;display:grid;grid-template-columns:minmax(0,1.2fr) minmax(430px,.8fr);background:var(--bg)}
.auth-showcase{position:relative;overflow:hidden;display:flex;align-items:center;padding:clamp(38px,7vw,110px);background:radial-gradient(circle at 16% 18%,rgba(124,92,255,.28),transparent 35%),radial-gradient(circle at 85% 72%,rgba(59,130,246,.22),transparent 34%),linear-gradient(145deg,#08101f,#101d39)}
.auth-grid-glow{position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);background-size:46px 46px;mask-image:linear-gradient(120deg,#000,transparent 84%)}
.auth-showcase-inner{position:relative;z-index:1;max-width:760px}.auth-showcase .logo-line{margin-bottom:72px}.auth-showcase h1{font-size:clamp(46px,6.4vw,88px);line-height:1;letter-spacing:-.055em;margin:0}.auth-showcase h1 span{background:linear-gradient(90deg,#b9adff,#6ed2ff);-webkit-background-clip:text;color:transparent}.auth-showcase-inner>p:not(.eyebrow){font-size:18px;line-height:1.75;color:#afbdd5;max-width:680px}.auth-points{display:flex;flex-wrap:wrap;gap:9px;margin:28px 0}.auth-points span{border:1px solid rgba(164,179,211,.22);background:rgba(13,24,46,.68);padding:9px 12px;border-radius:999px;color:#d2dcf0;font-size:12px}.identity-proof{margin-top:42px;padding:16px 18px;border:1px solid rgba(139,124,255,.3);background:rgba(13,24,46,.72);border-radius:16px;display:grid;gap:4px;max-width:620px}.identity-proof div{font-size:10px;color:#9585ff;font-weight:900;letter-spacing:.14em;text-transform:uppercase}.identity-proof strong{font-size:14px}.identity-proof small{color:#93a2bd;line-height:1.5}.auth-panel{display:grid;place-items:center;padding:34px;background:var(--bg2)}.auth-card{width:min(500px,100%);background:var(--panel);border:1px solid var(--line);border-radius:26px;padding:32px;box-shadow:var(--shadow)}.auth-tabs{display:grid;grid-template-columns:1fr 1fr;background:var(--panel3);border:1px solid var(--line);padding:4px;border-radius:12px;margin-bottom:26px}.auth-tabs button{height:39px;border:0;border-radius:9px;background:transparent;color:var(--muted);font-weight:800}.auth-tabs button.active{background:var(--panel2);color:var(--text);box-shadow:0 5px 16px rgba(0,0,0,.14)}.auth-form{display:none}.auth-form.active{display:block}.auth-form h2{font-size:29px;letter-spacing:-.035em;margin:5px 0}.auth-form>label,.auth-form-grid{margin-top:15px}.auth-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.auth-submit{width:100%;justify-content:space-between;margin-top:22px}.auth-terms{font-size:10px;color:var(--muted);line-height:1.55}.honeypot{position:absolute!important;left:-99999px!important;width:1px!important;height:1px!important;overflow:hidden!important}

.nav-count{margin-left:auto;min-width:21px;height:20px;padding:0 6px;border-radius:99px;background:rgba(124,92,255,.2);color:#c7bdff;display:grid;place-items:center;font-size:9px}.sidebar-compose{height:44px;margin:0 4px 12px;border:0;border-radius:12px;background:linear-gradient(135deg,var(--primary),var(--primary2));color:#fff;font-weight:850}.section-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.inline-check{display:flex!important;align-items:center;gap:7px;white-space:nowrap;color:var(--muted)}.inline-check input{width:auto;margin:0}.shared-template-label{font-size:9px;color:var(--muted);padding:7px 9px}

/* Composer consumes almost the complete viewport while retaining a compact icon rail. */
body.compose-focus .sidebar{width:var(--sidebar-compact);padding-inline:9px}body.compose-focus .workspace{margin-left:var(--sidebar-compact)}body.compose-focus .sidebar-brand{justify-content:center;padding-inline:0}body.compose-focus .sidebar-brand>div:last-child,body.compose-focus .sidebar-compose,body.compose-focus .nav-item>span:not(.nav-icon),body.compose-focus .nav-count,body.compose-focus .sidebar-health,body.compose-focus .logout-button{display:none!important}body.compose-focus .nav-item{justify-content:center;padding:0}body.compose-focus .nav-icon{width:auto}body.compose-focus .topbar{height:58px;padding-inline:18px}body.compose-focus .topbar-left>div,body.compose-focus .profile-chip>div:last-child{display:none}body.compose-focus #page-compose{padding:6px 8px 10px!important}body.compose-focus .professional-compose{min-height:calc(100vh - 70px)!important;border-radius:12px!important}body.compose-focus .professional-compose .composer-heading{min-height:40px!important;padding:5px 12px!important}body.compose-focus .compose-fields{padding-inline:12px!important}body.compose-focus .compose-line{min-height:35px!important}body.compose-focus .composer-view-tabs{padding:4px 12px!important}body.compose-focus .editor-shell{margin:0 12px!important}body.compose-focus .rich-editor,body.compose-focus .html-editor,body.compose-focus .compose-preview-panel{min-height:calc(100vh - 255px)!important}body.compose-focus .compose-extras{padding:5px 12px 0!important}body.compose-focus .professional-actions{position:sticky;bottom:0;z-index:20;padding:6px 12px!important;background:linear-gradient(to top,var(--panel) 80%,rgba(18,27,47,.92));backdrop-filter:blur(12px)}body.compose-focus .topbar-actions .quick-compose{display:none}

/* compact, calm dashboard */
.compact-banner{min-height:92px!important;padding:16px 20px!important;border-radius:16px!important}.compact-banner h2{font-size:19px!important;margin:0 0 3px!important}.compact-banner p{font-size:11px;margin:0!important}.compact-banner .eyebrow{display:none}.compact-stats{grid-template-columns:repeat(7,minmax(108px,1fr))!important;gap:8px!important;margin:10px 0!important}.compact-stats .stat-card{min-height:64px;padding:9px 11px!important;border-radius:13px!important;gap:8px!important}.compact-stats .stat-icon{width:31px;height:31px;border-radius:9px;font-size:12px}.compact-stats .stat-card strong{font-size:18px!important;margin:1px 0!important}.compact-stats .stat-card span{font-size:9px!important}.dashboard-mail-grid{gap:10px!important}.dashboard-mail-grid .panel{padding:13px!important;border-radius:15px!important}.dashboard-mail-grid .panel-head h3{font-size:13px}.dashboard-mail-grid .panel-head p{font-size:9px}.compact-activity{min-height:130px!important}

/* Lead CRM */
.lead-summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:0 0 12px}.lead-summary-grid article{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:14px}.lead-summary-grid span,.lead-summary-grid strong{display:block}.lead-summary-grid span{font-size:10px;color:var(--muted)}.lead-summary-grid strong{font-size:24px;margin-top:4px}.leads-panel{overflow:hidden}.leads-tools{padding:12px}.leads-tools .mail-search{flex:1;max-width:none}.leads-tools select{width:170px}.leads-table-wrap table{min-width:1020px}.lead-identity{display:flex;align-items:center;gap:9px;min-width:250px}.lead-identity>span{min-width:0}.lead-identity strong,.lead-identity small,.lead-identity em{display:block}.lead-identity small{color:var(--muted);font-size:10px}.lead-identity em{font-style:normal;color:#9e90ff;font-size:8px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}.lead-star{border:0;background:transparent;color:#68758e;font-size:18px}.lead-star.active{color:#f7b84b}.lead-status,.role-pill{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.04em;background:rgba(124,92,255,.12);color:#a99cff}.lead-status.customer{background:rgba(25,201,139,.12);color:#63dbb0}.lead-status.do_not_contact,.lead-status.bounced{background:rgba(255,99,124,.12);color:#ff8ca0}.lead-status.active{background:rgba(59,130,246,.12);color:#7eb1ff}.lead-modal-card{width:min(680px,calc(100vw - 30px))}.lead-modal-card form{display:grid;gap:14px}.role-pill.admin{background:rgba(255,182,72,.13);color:#ffc56b}.role-pill.user{background:rgba(59,130,246,.12);color:#7fb3ff}

/* profile / tenant administration */
.settings-layout-v15{display:grid;gap:18px}.profile-settings-card{padding:22px;display:grid;gap:15px}.settings-card-head{display:flex;align-items:flex-start;gap:13px}.settings-card-head h3,.member-infrastructure-card h3{margin:0}.settings-card-head p,.member-infrastructure-card p{margin:4px 0 0;color:var(--muted);font-size:11px;line-height:1.55}.identity-safety,.tenant-safety-banner{display:flex;gap:10px;align-items:center;padding:11px 13px;border:1px solid rgba(124,92,255,.25);background:rgba(124,92,255,.07);border-radius:11px}.identity-safety strong,.tenant-safety-banner strong{white-space:nowrap}.identity-safety span,.tenant-safety-banner span{color:var(--muted);font-size:10px;line-height:1.5}.admin-settings-section{margin-top:8px}.inline-heading{margin:0 0 12px!important}.member-infrastructure-card{padding:20px;display:flex;gap:14px}.infrastructure-facts{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.infrastructure-facts span{border:1px solid var(--line);background:var(--panel3);padding:8px 10px;border-radius:9px;font-size:10px}.tenant-safety-banner{margin-bottom:12px}.settings-grid{gap:12px!important}.settings-card{padding:18px!important}

/* stronger tenant-friendly account page */
#page-accounts .split-layout{grid-template-columns:minmax(300px,380px) minmax(0,1fr)!important}.mailbox-create-card{position:sticky;top:calc(var(--topbar) + 12px);align-self:start}.cpanel-results{max-height:220px;overflow:auto}.identity-cell small{word-break:break-all}

/* General density and usability */
.page{padding-bottom:55px}.responsive-table tbody small{display:block;color:var(--muted);font-size:9px;margin-top:3px}.table-tools{gap:8px;align-items:center}.table-tools .mail-search{min-width:240px}.modal-card{max-height:calc(100vh - 30px);overflow:auto}.primary-button:disabled,.secondary-button:disabled{opacity:.5;cursor:not-allowed;transform:none}.profile-chip{max-width:250px}.profile-chip>div:last-child{min-width:0}.profile-chip strong{max-width:165px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

@media(max-width:1250px){.compact-stats{grid-template-columns:repeat(4,1fr)!important}.auth-shell{grid-template-columns:1fr 480px}.lead-summary-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){.auth-shell{display:block}.auth-showcase{min-height:340px;padding:40px}.auth-showcase .logo-line{margin-bottom:38px}.auth-showcase h1{font-size:46px}.auth-panel{padding:20px}.compact-stats{grid-template-columns:repeat(3,1fr)!important}.section-actions{width:100%}body.compose-focus .sidebar{width:var(--sidebar);transform:translateX(-100%)}body.compose-focus .workspace{margin-left:0}body.compose-focus .menu-button{display:block}.lead-summary-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.auth-showcase{display:none}.auth-card{padding:23px}.auth-form-grid{grid-template-columns:1fr}.compact-stats{grid-template-columns:repeat(2,1fr)!important}.lead-summary-grid{grid-template-columns:1fr 1fr}.identity-safety,.tenant-safety-banner{display:grid}.settings-card-head{align-items:center}.member-infrastructure-card{display:grid}.topbar-actions .profile-chip{display:none}}

/* v1.5 finishing polish */
.auth-tabs button:only-child{grid-column:1/-1}
#page-accounts .accounts-layout{grid-template-columns:minmax(300px,380px) minmax(0,1fr)!important}
#page-accounts .mailbox-form{position:sticky;top:calc(var(--topbar) + 12px);align-self:start}
@media(max-width:1080px){#page-accounts .accounts-layout{grid-template-columns:1fr!important}#page-accounts .mailbox-form{position:relative;top:auto}}

.password-details{border:1px solid var(--line);background:var(--panel3);border-radius:12px;padding:0 13px}.password-details summary{cursor:pointer;padding:12px 0;font-size:11px;font-weight:850;color:var(--text)}.password-change-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding-bottom:10px}.password-details>small{display:block;color:var(--muted);font-size:9px;padding:0 0 12px}@media(max-width:850px){.password-change-grid{grid-template-columns:1fr}}

/* ======================================================================
   v1.6 Administrator Operations Portal + persistent delivery alerts
   ====================================================================== */
.notification-center{position:relative}.notification-button{position:relative;font-size:19px}.notification-button>span{position:absolute;right:-4px;top:-5px;min-width:18px;height:18px;padding:0 5px;border-radius:99px;background:#ff607d;color:#fff;border:2px solid var(--panel);font-size:8px;font-weight:900;display:grid;place-items:center}.notification-panel{position:absolute;z-index:220;right:0;top:calc(100% + 12px);width:min(430px,calc(100vw - 24px));max-height:min(620px,75vh);overflow:hidden;background:var(--panel);border:1px solid var(--line);border-radius:17px;box-shadow:0 24px 80px rgba(0,0,0,.32)}.notification-panel-head{display:flex;align-items:center;justify-content:space-between;padding:15px 16px;border-bottom:1px solid var(--line)}.notification-panel-head strong,.notification-panel-head small{display:block}.notification-panel-head small{font-size:9px;color:var(--muted);margin-top:2px}.notification-list{max-height:520px;overflow:auto;padding:7px}.notification-item{width:100%;display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;padding:11px;border:0;border-radius:12px;background:transparent;color:var(--text);text-align:left}.notification-item:hover{background:var(--panel3)}.notification-item.unread{background:rgba(124,92,255,.08)}.notification-item.error.unread{background:rgba(255,96,125,.09)}.notification-item.warning.unread{background:rgba(246,181,65,.09)}.notification-item.success.unread{background:rgba(25,201,139,.09)}.notification-symbol{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;background:rgba(124,92,255,.13);color:#a99cff;font-weight:900}.notification-item.error .notification-symbol{background:rgba(255,96,125,.14);color:#ff7f97}.notification-item.warning .notification-symbol{background:rgba(246,181,65,.14);color:#f7c86e}.notification-item.success .notification-symbol{background:rgba(25,201,139,.14);color:#60ddb0}.notification-item strong,.notification-item small,.notification-item time{display:block}.notification-item strong{font-size:10px}.notification-item small{font-size:9px;line-height:1.45;color:var(--muted);margin:3px 0 5px}.notification-item time{font-size:8px;color:var(--muted)}.notification-empty{padding:28px;text-align:center;color:var(--muted);font-size:10px}
.admin-nav-item{position:relative;background:linear-gradient(90deg,rgba(124,92,255,.08),transparent)}.admin-nav-pulse{width:7px;height:7px;border-radius:50%;background:#7c5cff;box-shadow:0 0 0 5px rgba(124,92,255,.12);margin-left:auto}.admin-operations-page{max-width:1700px}.admin-command-header{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:11px;padding:2px}.admin-command-header h2{margin:2px 0 5px;font-size:25px}.admin-command-header p{margin:0;color:var(--muted);max-width:790px;line-height:1.55;font-size:11px}.admin-command-actions{display:flex;align-items:center;gap:8px}.admin-command-actions select{width:145px;height:36px;padding:0 10px}.admin-privacy-note{display:flex;align-items:center;gap:12px;padding:10px 13px;margin-bottom:11px;border:1px solid rgba(77,187,255,.22);background:rgba(77,187,255,.07);border-radius:11px}.admin-privacy-note strong{white-space:nowrap;color:#78c9ff}.admin-privacy-note span{font-size:9px;color:var(--muted);line-height:1.45}.admin-kpi-grid{display:grid;grid-template-columns:repeat(8,minmax(125px,1fr));gap:8px;margin-bottom:11px}.admin-kpi-grid article{min-height:88px;background:linear-gradient(145deg,var(--panel),var(--panel2));border:1px solid var(--line);border-radius:13px;padding:12px;overflow:hidden;position:relative}.admin-kpi-grid article:after{content:"";position:absolute;width:70px;height:70px;border-radius:50%;right:-30px;top:-36px;background:rgba(124,92,255,.08)}.admin-kpi-grid span,.admin-kpi-grid strong,.admin-kpi-grid small{display:block}.admin-kpi-grid span{font-size:8px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:850}.admin-kpi-grid strong{font-size:23px;line-height:1;margin-top:10px}.admin-kpi-grid small{font-size:8px;color:var(--muted);margin-top:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.admin-visual-grid,.admin-data-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,.48fr);gap:10px;margin-bottom:10px}.admin-visual-grid .span-two,.admin-data-grid .span-two{grid-column:span 1}.admin-chart-panel{min-height:310px}.chart-legend{display:flex;gap:10px;font-size:8px;color:var(--muted)}.chart-legend span:before{content:"";display:inline-block;width:8px;height:8px;border-radius:3px;margin-right:4px}.chart-legend .sent:before{background:#7c5cff}.chart-legend .reply:before{background:#19c98b}.chart-legend .failed:before{background:#ff607d}.admin-trend-chart{height:235px;display:flex;align-items:stretch;gap:3px;padding:17px 6px 0;border-top:1px solid var(--line);overflow-x:auto}.trend-day{flex:1;min-width:17px;display:grid;grid-template-rows:1fr 20px;gap:5px}.trend-bars{height:100%;display:flex;align-items:flex-end;justify-content:center;gap:2px;border-bottom:1px solid var(--line)}.trend-bars i{display:block;width:28%;min-width:3px;border-radius:4px 4px 1px 1px;transition:height .25s}.trend-bars .sent{background:linear-gradient(#9c87ff,#6f52ee)}.trend-bars .reply{background:linear-gradient(#4ee0b1,#19a977)}.trend-bars .failed{background:linear-gradient(#ff8ea3,#e94e6c)}.trend-day small{font-size:7px;color:var(--muted);text-align:center;white-space:nowrap;transform:rotate(-36deg);transform-origin:center}.admin-breakdown-list{display:grid;gap:9px;padding:3px 0}.admin-breakdown-row{display:grid;grid-template-columns:minmax(110px,.9fr) minmax(80px,1fr) 40px;gap:8px;align-items:center}.admin-breakdown-row strong,.admin-breakdown-row small{display:block}.admin-breakdown-row strong{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.admin-breakdown-row small{font-size:7px;color:var(--muted);margin-top:2px}.admin-breakdown-row>span{height:6px;background:var(--panel3);border-radius:99px;overflow:hidden}.admin-breakdown-row>span i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#7c5cff,#4dbbff);min-width:2px}.admin-breakdown-row>b{font-size:9px;text-align:right}.admin-user-performance{max-height:500px}.admin-user-performance table{min-width:940px}.mail-avatar.online{box-shadow:0 0 0 2px var(--panel),0 0 0 4px #19c98b}.admin-failure-list{display:grid;gap:6px;max-height:410px;overflow:auto}.admin-failure-list button{display:grid;grid-template-columns:31px minmax(0,1fr) auto;gap:9px;width:100%;border:0;background:transparent;color:var(--text);padding:9px;border-radius:10px;text-align:left}.admin-failure-list button:hover{background:var(--panel3)}.admin-failure-icon{width:29px;height:29px;display:grid;place-items:center;border-radius:10px;background:rgba(255,96,125,.13);color:#ff7890;font-weight:900}.admin-failure-list strong,.admin-failure-list small,.admin-failure-list em{display:block}.admin-failure-list strong{font-size:9px}.admin-failure-list small{font-size:8px;color:var(--muted);margin:3px 0}.admin-failure-list em{font-size:8px;color:#ff8ca0;font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.admin-failure-list time{font-size:7px;color:var(--muted);white-space:nowrap}.admin-good-state{display:grid;place-items:center;gap:7px;padding:28px;color:var(--muted);text-align:center}.admin-good-state span{width:35px;height:35px;border-radius:50%;display:grid;place-items:center;background:rgba(25,201,139,.12);color:#57dbaa}.admin-health-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-bottom:9px}.admin-health-summary span{padding:9px;background:var(--panel3);border-radius:9px;font-size:7px;color:var(--muted);text-align:center}.admin-health-summary b{display:block;font-size:16px;color:var(--text);margin-bottom:2px}.admin-health-problems{display:grid;gap:5px;max-height:300px;overflow:auto}.admin-health-problems>div{display:grid;grid-template-columns:27px minmax(0,1fr);gap:8px;padding:7px;border-radius:9px;background:rgba(255,255,255,.025)}.admin-health-problems strong,.admin-health-problems small,.admin-health-problems em{display:block}.admin-health-problems strong{font-size:8px}.admin-health-problems small{font-size:7px;color:var(--muted)}.admin-health-problems em{grid-column:2;font-size:7px;color:#ff8ca0;font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.table-action-pair{display:flex;gap:5px;align-items:center}.admin-user-modal-card{width:min(1180px,calc(100vw - 26px));max-height:92vh;overflow:auto;padding:22px}.admin-user-detail-head{display:grid;grid-template-columns:52px minmax(0,1fr) auto;align-items:center;gap:12px;padding-bottom:14px;border-bottom:1px solid var(--line)}.mail-avatar.large{width:49px;height:49px;font-size:18px}.admin-user-detail-head h2,.admin-user-detail-head p{margin:0}.admin-user-detail-head h2{font-size:21px}.admin-user-detail-head>div>p:last-child{font-size:9px;color:var(--muted);margin-top:4px}.admin-user-kpis{display:grid;grid-template-columns:repeat(6,1fr);gap:7px;margin:13px 0}.admin-user-kpis article{padding:11px;background:var(--panel3);border-radius:11px}.admin-user-kpis span,.admin-user-kpis strong{display:block}.admin-user-kpis span{font-size:8px;color:var(--muted)}.admin-user-kpis strong{font-size:20px;margin-top:6px}.admin-user-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.admin-user-detail-grid>section{padding:13px;border:1px solid var(--line);border-radius:12px}.admin-user-detail-grid .span-two{grid-column:1/-1}.admin-user-detail-grid h3{margin:0 0 10px;font-size:11px}.admin-user-mailbox,.admin-user-activity>div,.admin-user-failures>div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid var(--line)}.admin-user-mailbox:last-child,.admin-user-activity>div:last-child,.admin-user-failures>div:last-child{border-bottom:0}.admin-user-mailbox strong,.admin-user-mailbox small,.admin-user-activity strong,.admin-user-activity small{display:block}.admin-user-mailbox strong,.admin-user-activity strong{font-size:9px}.admin-user-mailbox small,.admin-user-activity small{font-size:8px;color:var(--muted);margin-top:2px}.admin-user-mailbox em,.admin-user-activity em,.admin-user-failures em{font-size:8px;color:var(--muted);font-style:normal;text-align:right}.admin-user-activity>div{display:grid;grid-template-columns:8px minmax(0,1fr) auto}.status-dot-mini{width:7px;height:7px;border-radius:50%;background:#8792a8}.status-dot-mini.sent{background:#19c98b}.status-dot-mini.temporary_failed,.status-dot-mini.permanent_failed{background:#ff607d}.admin-user-failures>div{display:grid;grid-template-columns:minmax(160px,.55fr) minmax(0,1fr) auto}.admin-user-failures strong{font-size:9px}.admin-user-failures span{font-size:8px;color:#ff8ca0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.modal-breakdown{padding:0}
@media(min-width:1450px){.admin-visual-grid{grid-template-columns:minmax(0,1.45fr) minmax(280px,.55fr) minmax(280px,.55fr)}.admin-visual-grid .span-two{grid-column:span 1}.admin-data-grid{grid-template-columns:minmax(0,1.4fr) minmax(330px,.6fr)}.admin-data-grid>.panel:nth-child(3),.admin-data-grid>.panel:nth-child(4){grid-column:span 1}}
@media(max-width:1350px){.admin-kpi-grid{grid-template-columns:repeat(4,1fr)}}
@media(max-width:960px){.admin-command-header{align-items:flex-start;display:grid}.admin-command-actions{flex-wrap:wrap}.admin-visual-grid,.admin-data-grid{grid-template-columns:1fr}.admin-kpi-grid{grid-template-columns:repeat(2,1fr)}.admin-user-kpis{grid-template-columns:repeat(3,1fr)}.admin-user-detail-grid{grid-template-columns:1fr}.admin-user-detail-grid .span-two{grid-column:auto}}
@media(max-width:600px){.notification-panel{position:fixed;left:10px;right:10px;top:70px;width:auto}.admin-command-actions{display:grid;grid-template-columns:1fr 1fr}.admin-command-actions select{width:auto}.admin-command-actions .link-button{grid-column:1/-1}.admin-privacy-note{display:grid}.admin-kpi-grid{grid-template-columns:1fr 1fr}.admin-health-summary{grid-template-columns:1fr 1fr}.admin-user-kpis{grid-template-columns:1fr 1fr}.admin-user-detail-head{grid-template-columns:44px 1fr}.admin-user-detail-head>.role-pill{grid-column:2}}

/* v1.6.1 — Sent-recipient clarity and polished compact workspace */
:root{
  --sidebar:232px;
  --sidebar-compact:56px;
  --topbar:66px;
  --radius:14px;
  --radius-sm:10px;
  --shadow:0 14px 36px rgba(0,0,0,.18);
}
html,body{background:linear-gradient(180deg,var(--bg),color-mix(in srgb,var(--bg) 91%,#172849 9%));}
body{font-size:13px;letter-spacing:-.006em}
button,input,select,textarea{letter-spacing:0}
input,select,textarea{border-radius:9px;padding:10px 11px;background:color-mix(in srgb,var(--panel3) 92%,transparent)}
.primary-button,.secondary-button,.quick-compose{border-radius:9px;padding:10px 14px;font-size:12px;box-shadow:none}
.primary-button{background:linear-gradient(135deg,#7257ec,#397cf1)}
.secondary-button{background:color-mix(in srgb,var(--panel2) 94%,transparent)}
.icon-button{width:36px;height:36px;border-radius:10px}
.brand-mark{width:36px;height:36px;border-radius:11px;font-size:12px;box-shadow:0 8px 22px rgba(77,72,220,.23)}
.sidebar{padding:14px 10px;background:linear-gradient(180deg,#0a1324,#0b1424 68%,#0a1220)}
.sidebar-brand{padding:2px 7px 15px;gap:10px}
.sidebar-brand strong{font-size:13px}.sidebar-brand small{font-size:9px}
.sidebar-compose{min-height:40px!important;border-radius:10px!important;margin-bottom:9px!important;font-size:11px!important}
.main-nav{gap:3px}.nav-item{height:39px;border-radius:9px;padding:0 10px;font-size:11px;gap:10px}.nav-icon{font-size:15px;width:19px}
.sidebar-health{padding:10px;border-radius:10px}.sidebar-health small{font-size:9px}.logout-button{height:36px;font-size:11px}
.topbar{padding:0 20px;background:color-mix(in srgb,var(--bg) 88%,transparent);box-shadow:0 6px 24px rgba(0,0,0,.08)}
.topbar h1{font-size:17px;letter-spacing:-.02em}.topbar p{font-size:10px;margin-top:2px}.topbar-actions{gap:7px}.quick-compose{padding:9px 12px;font-size:11px}.avatar{width:34px;height:34px;border-radius:10px}.profile-chip strong{font-size:11px}.profile-chip small{font-size:9px}
.page{padding:18px 20px 76px;max-width:1780px}.panel{border-radius:14px;box-shadow:0 7px 22px rgba(0,0,0,.07)}
.section-heading{margin-bottom:13px}.section-heading h2{font-size:22px}.section-heading p{font-size:10px}.section-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.compact-banner{min-height:72px!important;padding:12px 16px!important;border-radius:13px!important;background:linear-gradient(115deg,#211e4d,#152c50 58%,#143846)!important}
.compact-banner h2{font-size:17px!important}.compact-banner p{font-size:10px!important}
.compact-stats{gap:7px!important;margin:8px 0!important}.compact-stats .stat-card{min-height:56px!important;padding:7px 9px!important;border-radius:11px!important}.compact-stats .stat-icon{width:28px!important;height:28px!important}.compact-stats .stat-card strong{font-size:16px!important}.compact-stats .stat-card span{font-size:8px!important}
.dashboard-mail-grid{gap:8px!important}.dashboard-mail-grid .panel{padding:11px!important}.panel-head h3{font-size:12px}.panel-head p{font-size:9px}.activity-item{padding:9px 0}.activity-symbol{width:31px;height:31px;border-radius:9px}
.table-tools{padding:10px!important;gap:7px!important}.responsive-table th{font-size:8px!important;letter-spacing:.06em}.responsive-table td{font-size:10px!important}.responsive-table th,.responsive-table td{padding:9px 10px!important}
.pagination{padding:10px!important}.pagination button{min-width:30px;height:30px;border-radius:8px!important}

/* Sent leads: visually and semantically distinct from mailbox identities. */
.sent-leads-definition{display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;gap:11px;margin:0 0 10px;padding:10px 13px;border:1px solid rgba(64,179,255,.24);border-radius:11px;background:linear-gradient(90deg,rgba(59,130,246,.10),rgba(124,92,255,.05))}
.sent-leads-definition-icon{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:rgba(25,201,139,.13);color:#57ddae;font-weight:950}
.sent-leads-definition strong,.sent-leads-definition span{display:block}.sent-leads-definition strong{font-size:11px}.sent-leads-definition span{margin-top:3px;color:var(--muted);font-size:9px;line-height:1.5}
.lead-summary-grid{gap:7px!important;margin:0 0 10px!important}.lead-summary-grid article{min-height:67px!important;padding:10px 12px!important;border-radius:11px!important}.lead-summary-grid span{font-size:8px!important}.lead-summary-grid strong{font-size:20px!important;margin-top:6px!important}.leads-panel{overflow:hidden}.leads-tools{background:color-mix(in srgb,var(--panel2) 42%,transparent)}.lead-identity strong{font-size:10px}.lead-identity small,.lead-identity em{font-size:8px!important}.lead-status{font-size:8px!important}.lead-modal-card{width:min(720px,calc(100vw - 24px))}.lead-modal-card input[readonly]{color:#91a0b8;background:var(--panel3);cursor:not-allowed}

/* Authentication: cleaner, calmer and easier to scan. */
.auth-shell{background:var(--bg)}.auth-showcase{padding:clamp(42px,7vw,100px);background:radial-gradient(circle at 24% 20%,rgba(114,87,236,.22),transparent 38%),linear-gradient(145deg,#08101e,#111b32)}
.auth-showcase h1{font-size:clamp(42px,5.5vw,76px);letter-spacing:-.055em}.auth-showcase-inner>p{max-width:650px;font-size:15px;line-height:1.7}.auth-points span{font-size:9px;padding:7px 10px}.identity-proof{border-radius:14px!important;padding:14px!important}.auth-panel{padding:30px}.auth-card{width:min(440px,100%);padding:28px;border-radius:18px}.auth-tabs{padding:4px!important;border-radius:10px!important}.auth-tabs button{height:36px!important;border-radius:8px!important}.auth-form h2{font-size:23px!important}.auth-form label{margin-top:13px!important}.auth-submit{margin-top:18px!important}

/* Composer receives nearly the entire viewport while keeping only essential controls visible. */
body.compose-focus .sidebar{width:var(--sidebar-compact);padding:8px 6px}
body.compose-focus .workspace{margin-left:var(--sidebar-compact)}
body.compose-focus .sidebar-brand{padding:0 0 8px}
body.compose-focus .brand-mark{width:34px;height:34px}
body.compose-focus .nav-item{height:36px;border-radius:9px}
body.compose-focus .topbar{height:52px;padding:0 10px}
body.compose-focus .topbar-actions{gap:5px}
body.compose-focus .topbar-actions .profile-chip,body.compose-focus #globalSyncButton{display:none}
body.compose-focus #page-compose{padding:4px!important}
body.compose-focus .professional-compose{min-height:calc(100vh - 60px)!important;border-radius:10px!important;border-color:color-mix(in srgb,var(--line) 80%,transparent)}
body.compose-focus .professional-compose .composer-heading{min-height:38px!important;padding:4px 10px!important}
body.compose-focus .professional-compose .composer-heading h2{font-size:13px!important}
body.compose-focus .compose-heading-actions select{height:28px!important;width:168px!important}
body.compose-focus .compose-fields{padding:0 10px!important}
body.compose-focus .compose-line{min-height:34px!important;grid-template-columns:44px minmax(0,1fr) auto!important}
body.compose-focus .compose-line input{font-size:11px!important;padding:6px 2px!important}
body.compose-focus .cc-line{grid-template-columns:44px 1fr 42px 1fr!important}
body.compose-focus .composer-view-tabs{padding:3px 10px!important}
body.compose-focus .composer-view-tabs>div:first-child button{height:27px!important;padding:0 9px!important}
body.compose-focus .variable-strip{display:none!important}
body.compose-focus .editor-shell{margin:0 10px!important;border-radius:10px!important}
body.compose-focus .editor-toolbar{min-height:37px!important;padding:3px 5px!important}
body.compose-focus .editor-toolbar button,body.compose-focus .editor-toolbar select{height:28px!important;border-radius:7px!important}
body.compose-focus .rich-editor,body.compose-focus .html-editor,body.compose-focus .compose-preview-panel{min-height:calc(100vh - 226px)!important;padding:20px 24px!important}
body.compose-focus .compose-extras{padding:4px 10px 0!important}
body.compose-focus .attachment-zone{min-height:40px!important;padding:6px 10px!important}
body.compose-focus .professional-actions{padding:6px 10px!important}
body.compose-focus .professional-actions .secondary-button,body.compose-focus .professional-actions .primary-button{padding:8px 11px!important;font-size:10px}

/* Admin portal: denser intelligence without visual overload. */
.admin-command-header{margin-bottom:8px}.admin-command-header h2{font-size:21px}.admin-command-header p{font-size:9px}.admin-privacy-note{padding:8px 11px;margin-bottom:8px}.admin-kpi-grid{gap:6px;margin-bottom:8px}.admin-kpi-grid article{min-height:78px;padding:10px;border-radius:11px}.admin-kpi-grid strong{font-size:20px}.admin-visual-grid,.admin-data-grid{gap:8px;margin-bottom:8px}.admin-visual-grid .panel,.admin-data-grid .panel{padding:13px!important}.admin-chart-panel{min-height:280px}.admin-trend-chart{height:205px}

@media(max-width:900px){
  :root{--topbar:62px}
  .page{padding:12px 11px 70px}.section-heading{align-items:flex-start;display:grid}.section-actions{width:100%}
  .sent-leads-definition{grid-template-columns:30px 1fr}.sent-leads-definition-icon{width:29px;height:29px}
  body.compose-focus .workspace{margin-left:0}body.compose-focus #page-compose{padding:0!important}body.compose-focus .professional-compose{border-radius:0!important;min-height:calc(100vh - 52px)!important}
}
@media(max-width:600px){
  .topbar{padding:0 10px}.topbar p{display:none}.quick-compose{display:none}.page{padding:10px 8px 65px}
  .compact-stats{grid-template-columns:repeat(2,1fr)!important}.lead-summary-grid{grid-template-columns:1fr 1fr!important}
  .auth-panel{padding:12px}.auth-card{padding:20px}
  body.compose-focus .rich-editor,body.compose-focus .html-editor,body.compose-focus .compose-preview-panel{min-height:56vh!important;padding:16px!important}
}

/* ======================================================================
   v1.6.2 — Fixed viewport shell, attached content and internal mail scroll
   ====================================================================== */
:root{
  --shell-gap:10px;
  --dashboard-toolbar:48px;
}

/* The browser document never becomes the application scroller. */
html,body{height:100%;min-height:0;overflow:hidden}
body{width:100%;overscroll-behavior:none}
.app-shell{height:100dvh;min-height:0;overflow:hidden}
.sidebar{height:100dvh;min-height:0;overflow:hidden}
.sidebar-brand,.sidebar-compose,.sidebar-health,.logout-button{flex:0 0 auto}
.main-nav{min-height:0;overflow-y:auto;overflow-x:hidden;padding-right:2px;scrollbar-width:thin}
.workspace{
  width:calc(100vw - var(--sidebar));
  height:100dvh;
  min-height:0;
  min-width:0;
  overflow:hidden;
  display:grid;
  grid-template-rows:var(--topbar) minmax(0,1fr);
}
.topbar{
  position:relative;
  inset:auto;
  height:100%;
  min-height:0;
  width:100%;
  grid-row:1;
  flex:0 0 auto;
}
.page{
  grid-row:2;
  width:100%;
  max-width:none;
  height:100%;
  min-height:0;
  margin:0;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  padding:12px 14px 16px;
}
.page.active{animation:none}

/* Dashboard is a viewport dashboard, not a long webpage. */
#page-dashboard.active{
  display:grid;
  grid-template-rows:auto auto minmax(0,1fr);
  gap:8px;
  overflow:hidden;
  padding:9px 11px 11px;
}
#page-dashboard .compact-banner{
  min-height:var(--dashboard-toolbar)!important;
  height:var(--dashboard-toolbar);
  padding:7px 12px!important;
  margin:0!important;
  border-radius:11px!important;
  align-items:center;
  background:linear-gradient(100deg,#211b4a,#162b4d 62%,#12384a)!important;
}
#page-dashboard .compact-banner:after{display:none}
#page-dashboard .compact-banner .eyebrow{display:none}
#page-dashboard .compact-banner h2{font-size:13px!important;margin:0!important;line-height:1.1}
#page-dashboard .compact-banner p{font-size:9px!important;margin:3px 0 0!important;line-height:1.1}
#page-dashboard .banner-actions{display:flex;gap:6px;align-items:center}
#page-dashboard .banner-actions button{height:31px;padding:0 11px!important;font-size:9px!important;border-radius:8px!important}
#page-dashboard .compact-stats{
  display:grid!important;
  grid-template-columns:repeat(7,minmax(0,1fr))!important;
  gap:6px!important;
  margin:0!important;
}
#page-dashboard .compact-stats .stat-card{
  min-width:0;
  min-height:48px!important;
  height:48px;
  padding:6px 8px!important;
  border-radius:10px!important;
  gap:7px!important;
  overflow:hidden;
}
#page-dashboard .compact-stats .stat-icon{width:25px!important;height:25px!important;border-radius:8px!important;font-size:10px}
#page-dashboard .compact-stats .stat-card span{font-size:7px!important;white-space:nowrap}
#page-dashboard .compact-stats .stat-card strong{font-size:14px!important;margin:1px 0 0!important}
#page-dashboard .dashboard-mail-grid{
  min-height:0;
  height:100%;
  display:grid!important;
  grid-template-columns:minmax(0,1.75fr) minmax(270px,.65fr)!important;
  grid-template-rows:minmax(0,1fr) 145px;
  gap:8px!important;
  overflow:hidden;
}
#page-dashboard .dashboard-mail-grid>.panel{
  min-height:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  padding:10px!important;
  border-radius:11px!important;
}
#page-dashboard .dashboard-mail-grid>.panel:nth-child(3){grid-column:1/-1;grid-row:2}
#page-dashboard .panel-head{flex:0 0 auto;min-height:31px;gap:8px}
#page-dashboard .panel-head h3{font-size:10px!important}
#page-dashboard .panel-head p{font-size:7px!important;margin-top:2px}
#page-dashboard .panel-head .text-button{font-size:8px}
#recentInbox,#dashboardMailboxes,#recentActivity{
  min-height:0!important;
  flex:1 1 auto;
  overflow:auto!important;
  overscroll-behavior:contain;
  scrollbar-width:thin;
}
#recentInbox{margin-top:4px!important}
#recentActivity{margin-top:3px!important;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 10px;align-content:start}
#recentActivity .activity-item{border-top:0!important;border-bottom:1px solid var(--line);min-width:0}
#dashboardMailboxes.mailbox-summary{margin-top:4px;overflow:auto}

/* All mailbox pages own their scroll. */
.mail-page{
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
  padding:8px!important;
}
.mail-app{
  height:100%!important;
  min-height:0!important;
  width:100%;
  border-radius:12px!important;
  box-shadow:none!important;
  grid-template-columns:210px minmax(350px,470px) minmax(0,1fr)!important;
}
.two-panel-mail{grid-template-columns:minmax(390px,510px) minmax(0,1fr)!important}
.mail-folders,.mail-list-panel,.mail-reader{height:100%;min-height:0!important}
.mail-folders{overflow:auto}
.mail-list-panel{overflow:hidden;display:flex;flex-direction:column}
.mail-list-toolbar,.bulk-action-bar,.mail-list-heading,.pagination{flex:0 0 auto}
.message-list{
  flex:1 1 0;
  min-height:0;
  overflow-y:auto!important;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-width:thin;
}
.mail-reader{
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-width:thin;
}
.pagination{min-height:42px;background:var(--panel);border-top:1px solid var(--line);position:relative;z-index:3}
.message-row{padding:10px 11px}
.mail-list-toolbar{padding:9px 10px}
.mail-list-heading{padding:10px 12px 8px}
.mail-list-heading h2{font-size:15px}

/* Composer attaches immediately below the top bar and fills the remaining viewport. */
body.compose-focus .workspace{
  width:calc(100vw - var(--sidebar-compact));
  height:100dvh;
  grid-template-rows:50px minmax(0,1fr);
}
body.compose-focus .topbar{height:50px}
body.compose-focus #page-compose.active{
  display:block;
  height:100%;
  min-height:0;
  overflow:hidden;
  padding:5px!important;
}
body.compose-focus .composer-pro{
  width:100%;
  height:100%;
  min-height:0;
  margin:0;
}
body.compose-focus .professional-compose{
  width:100%;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  display:grid!important;
  grid-template-rows:auto auto auto auto minmax(0,1fr) auto auto;
  overflow:hidden;
  border-radius:10px!important;
  box-shadow:none!important;
}
body.compose-focus .professional-compose .composer-heading,
body.compose-focus .reply-context,
body.compose-focus .compose-fields,
body.compose-focus .composer-view-tabs,
body.compose-focus .compose-extras,
body.compose-focus .professional-actions{flex:0 0 auto}
body.compose-focus .professional-compose .composer-heading{margin:0!important}
body.compose-focus .editor-shell{
  height:100%;
  min-height:0!important;
  margin:0 9px!important;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
body.compose-focus .editor-toolbar{flex:0 0 auto;max-height:70px;overflow:auto}
body.compose-focus .rich-editor,
body.compose-focus .html-editor,
body.compose-focus .compose-preview-panel{
  flex:1 1 0;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:auto!important;
  padding:18px 22px!important;
}
body.compose-focus .compose-preview-panel iframe{height:calc(100% - 60px)!important;min-height:320px}
body.compose-focus .compose-extras{max-height:92px;overflow:auto;padding-top:4px!important}
body.compose-focus .attachment-zone{margin-top:0!important}
body.compose-focus .professional-actions{position:relative!important;bottom:auto!important;z-index:5;margin:0!important}

/* Keep content attached to its navigation edge with no hidden horizontal area. */
.workspace,.page,.panel,.mail-app,.composer-pro{min-width:0}
body:not(.compose-focus) .workspace{margin-left:var(--sidebar)}
body.compose-focus .workspace{margin-left:var(--sidebar-compact)}

/* Light mode: clean mail-client surfaces instead of washed-out grey blocks. */
html[data-theme="light"] body{background:#eef3f8}
html[data-theme="light"] .workspace{background:#eef3f8}
html[data-theme="light"] .topbar{background:rgba(255,255,255,.94);border-color:#dbe4ef}
html[data-theme="light"] .panel,html[data-theme="light"] .mail-app{box-shadow:0 5px 18px rgba(31,55,88,.06)}
html[data-theme="light"] #page-dashboard .compact-banner{color:#fff}
html[data-theme="light"] #page-dashboard .compact-banner p{color:#d9e3f5!important}

@media(max-width:1180px){
  #page-dashboard .compact-stats{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  #page-dashboard.active{overflow:auto;grid-template-rows:auto auto auto}
  #page-dashboard .dashboard-mail-grid{height:720px;grid-template-columns:1fr!important;grid-template-rows:1fr 280px 180px}
  #page-dashboard .dashboard-mail-grid>.panel:nth-child(3){grid-column:auto;grid-row:auto}
  .mail-app{grid-template-columns:190px minmax(320px,420px) minmax(0,1fr)!important}
  .two-panel-mail{grid-template-columns:minmax(350px,440px) minmax(0,1fr)!important}
}
@media(max-width:900px){
  html,body{overflow:auto}
  .app-shell,.workspace{height:auto;min-height:100dvh;overflow:visible;width:100%}
  .workspace{display:block}
  .topbar{position:sticky;height:var(--topbar)}
  .page{height:auto;min-height:calc(100dvh - var(--topbar));overflow:visible}
  .mail-page{height:auto!important;overflow:visible!important}
  .mail-app,.two-panel-mail{height:auto!important;display:block!important}
  .mail-list-panel,.mail-reader{height:auto;min-height:520px!important}
  body.compose-focus .workspace{width:100%;height:auto;display:block}
  body.compose-focus #page-compose.active{height:auto;overflow:visible}
  body.compose-focus .composer-pro,body.compose-focus .professional-compose{height:auto!important;min-height:calc(100dvh - 52px)!important;overflow:visible}
  body.compose-focus .rich-editor,body.compose-focus .html-editor,body.compose-focus .compose-preview-panel{min-height:55vh!important}
}

/* ======================================================================
   v1.6.3 — Premium shell repair, tenant-safe settings and resilient loads
   ====================================================================== */
:root{
  --sidebar:226px;
  --sidebar-compact:52px;
  --topbar:64px;
  --premium-border:color-mix(in srgb,var(--line) 78%,transparent);
  --premium-shadow:0 12px 36px rgba(7,15,35,.10);
}

/* Pages must remain direct grid children of the workspace. */
.app-shell{display:block;height:100dvh;overflow:hidden}
.workspace{position:relative;isolation:isolate}
.workspace>.topbar{grid-row:1}
.workspace>.page{grid-row:2;min-width:0;min-height:0}
.workspace>.page.active{display:block}
.workspace>#page-dashboard.active{display:grid}

/* Refined navigation: compact, quiet and easy to scan. */
.sidebar{
  padding:14px 10px 12px;
  background:
    radial-gradient(circle at 16% 0%,rgba(82,95,255,.16),transparent 28%),
    linear-gradient(180deg,#0c1528 0%,#091224 100%);
  border-right:1px solid rgba(127,146,186,.14);
  box-shadow:10px 0 38px rgba(2,8,23,.12);
}
.sidebar-brand{padding:2px 7px 14px;gap:10px}.sidebar-brand .brand-mark{width:36px;height:36px;border-radius:11px;font-size:12px}
.sidebar-brand strong{font-size:12px;letter-spacing:-.01em}.sidebar-brand small{font-size:8px}
.sidebar-compose{height:38px!important;border-radius:10px!important;margin-bottom:9px!important;font-size:10px!important}
.main-nav{gap:3px}.nav-item{height:36px;border-radius:9px;padding:0 10px;gap:9px;font-size:10px;font-weight:760}
.nav-icon{width:18px;font-size:13px}.nav-count{font-size:8px;min-width:20px;height:20px}
.nav-item.active{background:linear-gradient(90deg,rgba(89,76,255,.24),rgba(42,120,255,.08));border-color:rgba(121,107,255,.28);box-shadow:inset 3px 0 0 #7765ff}
.admin-nav-item{margin-top:5px}.sidebar-health{padding:10px;border-radius:11px}.sidebar-health small{font-size:8px}.health-title{font-size:9px}.logout-button{height:34px;font-size:9px}

/* Premium control bar. */
.topbar{
  padding:0 16px;
  background:color-mix(in srgb,var(--panel) 91%,transparent);
  border-bottom:1px solid var(--premium-border);
  box-shadow:0 5px 24px rgba(17,31,58,.07);
  backdrop-filter:blur(18px) saturate(145%);
}
.topbar h1{font-size:15px}.topbar p{font-size:9px;margin-top:2px}.topbar-actions{gap:6px}
.topbar .icon-button{width:34px;height:34px;border-radius:10px}.quick-compose{height:34px;padding:0 12px;font-size:10px;border-radius:10px}
.profile-chip{padding:3px 5px 3px 3px;border-radius:12px}.profile-chip .avatar{width:32px;height:32px;border-radius:9px}.profile-chip strong{font-size:10px}.profile-chip small{font-size:8px}

/* Consistent page surfaces. */
.page{padding:10px 12px 12px;background:linear-gradient(180deg,color-mix(in srgb,var(--bg) 94%,#6477ff 6%),var(--bg))}
.panel,.mail-app{border:1px solid var(--premium-border);box-shadow:var(--premium-shadow)}
.premium-page-heading{margin:2px 0 10px;padding:12px 14px;border:1px solid var(--premium-border);border-radius:14px;background:linear-gradient(125deg,color-mix(in srgb,var(--panel) 92%,#7663ff 8%),var(--panel))}
.premium-page-heading h2{font-size:19px!important}.premium-page-heading p{font-size:10px!important}.premium-page-heading .eyebrow{font-size:8px;margin-bottom:4px}

/* Mail client: stable columns and unmistakable loading/error feedback. */
.mail-page{padding:7px!important}.mail-app{border-radius:14px!important;background:var(--panel);overflow:hidden}
.mail-folders{padding:11px 8px;background:color-mix(in srgb,var(--panel3) 90%,#5664ff 10%)}
.mail-compose-button{height:37px;margin-bottom:11px;font-size:9px;border-radius:9px}.folder-title{font-size:7px;padding:6px 8px}.folder-button{height:34px;font-size:9px;padding:0 8px}.mailbox-folder{padding:6px;border-radius:9px}
.mail-list-panel{background:var(--panel)}.mail-list-toolbar{min-height:48px;background:color-mix(in srgb,var(--panel) 95%,#7282ff 5%)}
.mail-search input{font-size:10px}.mail-list-heading{min-height:49px}.mail-list-heading h2{font-size:14px}.mail-list-heading p{font-size:8px}
.message-row{min-height:76px;transition:background .16s,border-color .16s}.message-row:hover{background:color-mix(in srgb,var(--panel2) 90%,#6574ff 10%)}
.message-row.unread{box-shadow:inset 3px 0 0 var(--primary2)}.message-row.unread .message-copy strong,.message-row.unread .message-copy b{font-weight:850}
.mail-reader{background:color-mix(in srgb,var(--panel) 97%,#6b7cff 3%)}
.pagination{min-height:38px;padding:5px 8px}.pagination button{height:27px;min-width:29px;font-size:8px}

.premium-loader,.premium-load-error{height:100%;min-height:220px;display:flex;align-items:center;justify-content:center;gap:13px;padding:28px;text-align:left;color:var(--muted)}
.premium-loader>span{width:32px;height:32px;border-radius:50%;border:3px solid color-mix(in srgb,var(--line) 70%,transparent);border-top-color:var(--primary);animation:premiumSpin .75s linear infinite}
.premium-loader strong,.premium-loader small,.premium-load-error strong,.premium-load-error p{display:block}.premium-loader strong,.premium-load-error strong{color:var(--text);font-size:11px}.premium-loader small{font-size:8px;margin-top:4px}
.load-error-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:11px;background:rgba(255,99,124,.12);color:var(--danger);font-weight:900}.premium-load-error p{font-size:9px;line-height:1.55;max-width:390px;margin:5px 0 10px}
@keyframes premiumSpin{to{transform:rotate(360deg)}}

/* Dashboard: high information density without becoming microscopic. */
#page-dashboard.active{gap:9px;padding:9px 11px 11px}
#page-dashboard .compact-banner{height:56px!important;min-height:56px!important;padding:8px 14px!important}
#page-dashboard .compact-banner h2{font-size:14px!important}.compact-banner p{font-size:9px!important}
#page-dashboard .compact-stats .stat-card{height:54px;min-height:54px!important;padding:7px 9px!important}
#page-dashboard .compact-stats .stat-icon{width:28px!important;height:28px!important}.compact-stats .stat-card strong{font-size:16px!important}
#page-dashboard .dashboard-mail-grid>.panel{padding:11px!important}.dashboard-inbox-row{min-height:54px}

/* Personal settings are completely separate from infrastructure settings. */
.account-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(300px,.6fr);gap:12px;align-items:start}
.profile-settings-card,.account-help-card{padding:18px!important}.profile-settings-card{max-width:none}
.account-help-card{position:sticky;top:10px}.account-security-chip,.system-security-chip{display:flex;align-items:center;gap:9px;padding:8px 11px;border-radius:11px;background:rgba(25,201,139,.09);border:1px solid rgba(25,201,139,.2)}
.system-security-chip{background:rgba(124,92,255,.09);border-color:rgba(124,92,255,.2)}
.account-security-chip>span,.system-security-chip>span{width:27px;height:27px;border-radius:8px;display:grid;place-items:center;background:rgba(25,201,139,.14);color:var(--success)}
.system-security-chip>span{background:rgba(124,92,255,.14);color:#a597ff}.account-security-chip strong,.account-security-chip small,.system-security-chip strong,.system-security-chip small{display:block}.account-security-chip strong,.system-security-chip strong{font-size:9px}.account-security-chip small,.system-security-chip small{font-size:7px;color:var(--muted);margin-top:2px}
.identity-rule-list{display:grid;gap:8px;margin:16px 0}.identity-rule-list>div{padding:11px;border:1px solid var(--line);border-radius:10px;background:var(--panel3)}.identity-rule-list span,.identity-rule-list strong{display:block}.identity-rule-list span{font-size:8px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}.identity-rule-list strong{font-size:9px;margin-top:4px;line-height:1.5}.account-help-note{padding:11px;border-radius:10px;background:rgba(59,130,246,.08);border:1px solid rgba(59,130,246,.16);font-size:8px;line-height:1.6;color:var(--muted)}
.system-settings-page .admin-settings-section>.inline-heading{display:none}.system-settings-page .settings-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.system-settings-page .settings-card{padding:16px}.system-settings-page .settings-card h3{font-size:12px}.system-settings-page .settings-card p{font-size:9px}.system-settings-page label{font-size:9px}.system-settings-page input,.system-settings-page select{padding:9px 10px;font-size:10px}

/* Tenant users page never mixes the administrator account into customer rows. */
#page-users .responsive-table{border:1px solid var(--premium-border);border-radius:13px;background:var(--panel)}
#page-users tbody tr:hover{background:var(--panel2)}

/* Composer remains the dominant experience. */
body.compose-focus .workspace{grid-template-rows:48px minmax(0,1fr)}body.compose-focus .topbar{height:48px}
body.compose-focus #page-compose.active{padding:4px!important}.professional-compose{border-radius:9px!important}
body.compose-focus .rich-editor,body.compose-focus .html-editor,body.compose-focus .compose-preview-panel{padding:17px 21px!important}
body.compose-focus .sender-picker-menu{max-height:min(520px,70vh)}

html[data-theme="light"] .sidebar{background:linear-gradient(180deg,#10213a,#0b1930);color:#fff}
html[data-theme="light"] .sidebar .nav-item{color:#9eb0cc}html[data-theme="light"] .sidebar .nav-item.active{color:#fff}
html[data-theme="light"] .page{background:linear-gradient(180deg,#edf3f9,#f6f8fb)}
html[data-theme="light"] .mail-app,html[data-theme="light"] .panel{border-color:#dce5ef;box-shadow:0 10px 32px rgba(33,60,94,.07)}
html[data-theme="light"] .mail-list-toolbar{background:#fbfcfe}html[data-theme="light"] .mail-reader{background:#fcfdff}

@media(max-width:1180px){.account-layout{grid-template-columns:1fr}.account-help-card{position:relative;top:auto}.system-settings-page .settings-grid{grid-template-columns:1fr}}
@media(max-width:900px){:root{--sidebar:226px}.premium-page-heading{display:grid}.account-security-chip,.system-security-chip{width:100%}.account-layout{display:block}.account-help-card{margin-top:10px}}

/* =========================================================
   v1.7 Corporate approval, compliance and mail.com compose
   ========================================================= */
.corporate-disclosure{margin-top:18px;padding:13px 14px;border:1px solid rgba(93,126,246,.28);border-radius:14px;background:rgba(79,99,246,.08);display:grid;gap:4px}.corporate-disclosure strong{font-size:11px;color:var(--text)}.corporate-disclosure span{font-size:10px;color:var(--muted);line-height:1.55}
.approval-shell{min-height:100dvh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 18% 15%,rgba(93,76,246,.16),transparent 34%),var(--bg)}.approval-card{width:min(620px,100%);padding:34px;border:1px solid var(--line);border-radius:24px;background:var(--panel);box-shadow:var(--shadow);text-align:center}.approval-brand{display:flex;align-items:center;justify-content:center;gap:11px;margin-bottom:26px;font-weight:850}.approval-symbol{width:70px;height:70px;margin:0 auto 18px;border-radius:22px;display:grid;place-items:center;font-size:30px;background:rgba(124,92,255,.12);color:#a99cff}.approval-card.status-rejected .approval-symbol,.approval-card.status-suspended .approval-symbol{background:rgba(255,99,124,.12);color:#ff8296}.approval-card h1{font-size:30px;margin:0 0 10px}.approval-card>p{color:var(--muted);line-height:1.65;margin:0 auto;max-width:500px}.approval-user{margin:20px 0;padding:14px;border-radius:14px;background:var(--panel3);display:grid;gap:3px}.approval-user strong{font-size:14px}.approval-user span,.approval-user small{color:var(--muted);font-size:10px}.approval-actions{display:flex;justify-content:center;gap:9px;margin-top:20px}
.tenant-safety-banner.corporate{border-color:rgba(255,182,72,.25);background:rgba(255,182,72,.07)}.approval-pill{display:inline-flex;align-items:center;border-radius:99px;padding:5px 9px;font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.07em;background:rgba(124,92,255,.13);color:#a99cff}.approval-pill.approved{background:rgba(25,201,139,.13);color:#60ddb0}.approval-pill.pending{background:rgba(246,181,65,.14);color:#f7c86e}.approval-pill.rejected,.approval-pill.disabled,.approval-pill.suspended{background:rgba(255,96,125,.13);color:#ff8296}.approval-actions-cell{flex-wrap:wrap;min-width:210px}.corporate-policy-chip{padding:8px 11px;border-radius:99px;background:rgba(25,201,139,.1);color:#60ddb0;border:1px solid rgba(25,201,139,.2);font-size:9px;font-weight:850}

/* A compact mail.com-inspired composer. The editor owns the viewport. */
body.compose-focus #page-compose.active{height:calc(100dvh - 48px)!important;min-height:0!important;padding:3px!important;overflow:hidden!important}
body.compose-focus .composer-pro,body.compose-focus .professional-compose{height:100%!important;min-height:0!important;overflow:hidden!important}
body.compose-focus .professional-compose{display:flex!important;flex-direction:column!important;border-radius:8px!important}
body.compose-focus .professional-compose .composer-heading{height:30px!important;min-height:30px!important;padding:2px 9px!important;border-bottom:1px solid var(--line)}
body.compose-focus .professional-compose .composer-heading h2{font-size:11px!important}.compose-heading-actions{gap:6px}.compose-heading-actions .save-state{font-size:8px}.compose-heading-actions select{height:25px!important;width:150px!important;font-size:9px!important}.mini-danger{width:25px!important;height:25px!important}
body.compose-focus .compose-fields{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:0 14px!important;padding:0 9px!important;border-bottom:1px solid var(--line)}
body.compose-focus .compose-fields>.compose-line{min-height:31px!important;height:31px!important;border-bottom:1px solid color-mix(in srgb,var(--line) 65%,transparent);grid-template-columns:40px minmax(0,1fr) auto!important}
body.compose-focus .compose-fields>.sender-line{grid-column:1}.compose-fields>.compose-line:nth-child(2){grid-column:2}.compose-fields>.cc-line,.compose-fields>.subject-line{grid-column:1/-1}
body.compose-focus .compose-fields>.subject-line{border-bottom:0}.field-label{font-size:8px!important}.sender-picker-button{height:28px!important}.sender-picker-avatar{width:24px;height:24px}.sender-picker-copy strong{font-size:9px}.sender-picker-copy small{font-size:7px}.compose-line input{font-size:10px!important;padding:4px 2px!important}.inline-link{font-size:8px!important}
body.compose-focus .composer-view-tabs{height:30px!important;min-height:30px!important;padding:2px 9px!important;display:flex;align-items:center}.composer-view-tabs button{height:25px!important;padding:0 8px!important;font-size:8px!important}.compose-utility-actions{display:flex;gap:5px}.compose-utility-actions button{border:1px solid var(--line);background:var(--panel3);color:var(--muted);border-radius:7px;font-weight:800}
body.compose-focus .editor-shell{margin:0 9px!important;flex:1 1 auto!important;min-height:0!important;height:auto!important;border-radius:8px!important}
body.compose-focus .editor-toolbar{height:34px!important;min-height:34px!important;max-height:34px!important;padding:2px 4px!important;overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important}.editor-toolbar button,.editor-toolbar select{height:27px!important;min-width:max-content!important;font-size:9px!important;padding:0 7px!important}.editor-toolbar input[type=color]{height:27px!important;width:27px!important}
body.compose-focus .rich-editor,body.compose-focus .html-editor,body.compose-focus .compose-preview-panel{flex:1 1 auto!important;height:100%!important;min-height:0!important;padding:17px 20px!important;overflow:auto!important;font-size:12px!important;background:#fff!important;color:#172033!important}
body.compose-focus .compose-extras{flex:0 0 auto!important;max-height:116px!important;overflow:auto!important;padding:4px 9px!important}.compose-extras[hidden]{display:none!important}body.compose-focus .attachment-zone{min-height:38px!important;margin:0!important}
body.compose-focus .professional-actions{height:43px!important;min-height:43px!important;flex:0 0 43px!important;padding:5px 9px!important;border-top:1px solid var(--line);background:var(--panel)!important}.professional-actions .primary-button,.professional-actions .secondary-button{height:31px!important;padding:0 11px!important;font-size:9px!important}

/* Corporate mail archive */
.compliance-page{height:100%;overflow:hidden!important}.compliance-toolbar{display:grid;grid-template-columns:auto minmax(260px,1fr) minmax(190px,280px) auto;gap:9px;align-items:center;margin-bottom:10px}.segmented-control{display:flex;padding:3px;border-radius:10px;background:var(--panel3);border:1px solid var(--line)}.segmented-control button{height:31px;padding:0 12px;border:0;border-radius:7px;background:transparent;color:var(--muted);font-size:9px;font-weight:850}.segmented-control button.active{background:var(--panel);color:var(--text);box-shadow:0 4px 14px rgba(0,0,0,.12)}.compliance-layout{display:grid;grid-template-columns:minmax(380px,470px) minmax(520px,1fr);gap:10px;height:calc(100% - 94px);min-height:0}.compliance-list-panel,.compliance-reader{min-height:0;overflow:hidden}.compliance-list-panel{display:grid;grid-template-rows:minmax(0,1fr) auto}.compliance-list{overflow:auto;padding:5px}.compliance-message-row{width:100%;display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:9px;padding:9px;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--text);text-align:left}.compliance-message-row:hover,.compliance-message-row.active{background:var(--panel3);border-radius:10px}.compliance-message-row strong,.compliance-message-row b,.compliance-message-row small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.compliance-message-row strong{font-size:10px}.compliance-message-row b{font-size:9px;margin-top:2px}.compliance-message-row small{font-size:8px;color:var(--muted);margin-top:3px}.compliance-row-meta{text-align:right}.compliance-row-meta em,.compliance-row-meta time{display:block;font-size:8px;color:var(--muted);font-style:normal;white-space:nowrap}.compliance-row-meta em{color:#9f94ff;margin-bottom:5px}.compliance-reader{overflow:auto}.compliance-reader-head{padding:20px 22px 14px;border-bottom:1px solid var(--line)}.compliance-reader-head h2{font-size:22px;margin:0 0 14px}.compliance-identities{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.compliance-identities span{padding:8px 10px;border-radius:9px;background:var(--panel3);font-size:9px;overflow:hidden;text-overflow:ellipsis}.compliance-identities b{display:block;color:var(--muted);font-size:7px;text-transform:uppercase;letter-spacing:.08em;margin-bottom:3px}.originating-user-banner{margin-top:10px;padding:9px 11px;border-radius:10px;background:rgba(246,181,65,.09);border:1px solid rgba(246,181,65,.2)}.originating-user-banner strong,.originating-user-banner span{display:block;font-size:9px}.originating-user-banner span{color:var(--muted);margin-top:3px}.compliance-message-body{margin:15px 22px;padding:20px;border-radius:13px;background:#fff;color:#172033;min-height:250px;overflow:auto}.compliance-attachments{padding:0 22px 16px}.compliance-attachments h3{font-size:11px}.compliance-attachments a{display:grid;grid-template-columns:28px minmax(0,1fr);padding:9px;border:1px solid var(--line);border-radius:9px;text-decoration:none;color:var(--text);margin-top:6px}.compliance-attachments a span{grid-row:1/3;display:grid;place-items:center}.compliance-attachments a strong,.compliance-attachments a small{display:block}.compliance-attachments a strong{font-size:9px}.compliance-attachments a small{font-size:8px;color:var(--muted)}.compliance-audit-note{margin:0 22px 20px;padding:9px 11px;border-radius:9px;background:rgba(25,201,139,.08);color:#60ddb0;font-size:8px}

@media(max-width:1000px){body.compose-focus .compose-fields{grid-template-columns:1fr!important}.compose-fields>.compose-line{grid-column:1!important}.compliance-toolbar{grid-template-columns:1fr 1fr}.compliance-layout{grid-template-columns:minmax(320px,420px) 1fr}}
@media(max-width:760px){.approval-actions{flex-direction:column}.compliance-page{height:auto;overflow:auto!important}.compliance-toolbar{grid-template-columns:1fr}.compliance-layout{display:block;height:auto}.compliance-list-panel{height:480px}.compliance-reader{min-height:520px;margin-top:10px}body.compose-focus #page-compose.active{height:auto!important;overflow:visible!important}body.compose-focus .composer-pro,body.compose-focus .professional-compose{height:auto!important;min-height:calc(100dvh - 48px)!important;overflow:visible!important}body.compose-focus .rich-editor,body.compose-focus .html-editor{min-height:58vh!important}}


/* v1.7 contact communication timeline */
.lead-modal-card{width:min(980px,calc(100vw - 32px));max-height:min(880px,calc(100vh - 32px));overflow:auto}
.contact-history-section{margin-top:18px;padding-top:16px;border-top:1px solid var(--line,rgba(148,163,184,.18))}
.contact-history-head{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:10px}
.contact-history-head h3{margin:2px 0 0;font-size:15px}
.contact-history-head small{color:var(--muted,#94a3b8)}
.contact-activity-timeline{display:grid;gap:6px;max-height:270px;overflow:auto;padding-right:4px}
.contact-activity-row{display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%;padding:10px 12px;border:1px solid var(--line,rgba(148,163,184,.18));border-radius:10px;background:var(--panel-soft,rgba(15,23,42,.4));color:inherit;text-align:left;cursor:pointer}
.contact-activity-row:hover{border-color:rgba(99,102,241,.55);transform:translateY(-1px)}
.contact-activity-row span{min-width:0;display:grid;gap:3px}.contact-activity-row strong,.contact-activity-row small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.contact-activity-row small,.contact-activity-row em{font-size:11px;color:var(--muted,#94a3b8);font-style:normal}.reader-loading.compact{min-height:72px}


/* v1.8.0 stable compose fields, mailbox branding and controlled scheduler */
#ccFields[hidden]{display:none!important}
body.compose-focus .compose-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-auto-flow:row!important;align-items:stretch!important}
body.compose-focus .compose-fields>.sender-line{grid-column:1!important;grid-row:1!important}
body.compose-focus .compose-fields>.to-line{grid-column:2!important;grid-row:1!important}
body.compose-focus .compose-fields>.cc-fields{grid-column:1/-1!important;grid-row:2!important;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;padding:3px 16px;border-bottom:1px solid var(--line);min-height:38px;position:relative;z-index:4;background:var(--panel)}
body.compose-focus .compose-fields>.cc-fields[hidden]{display:none!important}
body.compose-focus .cc-fields label{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:8px;margin:0;color:var(--muted);font-size:9px;font-weight:800;text-transform:uppercase}
body.compose-focus .cc-fields input{min-width:0;width:100%;border:0!important;background:transparent!important;box-shadow:none!important;color:var(--text)!important;padding:6px 2px!important}
body.compose-focus .compose-fields>.subject-line{grid-column:1/-1!important;grid-row:3!important;position:relative!important;z-index:2!important;clear:both!important;background:var(--panel)}
body.compose-focus .compose-fields>.subject-line input{padding-left:2px!important}
body.compose-focus .editor-shell{min-height:0!important}.attachment-item{gap:8px}.attachment-item button{margin-left:auto;width:24px;height:24px;border:0;border-radius:7px;background:#ef444422;color:#ef4444;cursor:pointer}.attachment-item.saved{border-color:#22c55e55;background:#22c55e0d}
.branding-cell{display:flex;align-items:center;gap:8px;min-width:210px}.branding-cell>span:nth-child(2){min-width:0;flex:1}.branding-cell strong,.branding-cell small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.branding-dot{width:9px;height:9px;border-radius:50%;background:#94a3b8}.branding-dot.active{background:#22c55e;box-shadow:0 0 0 5px #22c55e18}.branding-modal-card{width:min(720px,calc(100vw - 32px))}.branding-preview{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--panel-2);margin:14px 0}.branding-preview-logo{width:48px;height:48px;border-radius:14px;background:#4f63f6;color:#fff;display:grid;place-items:center;font-weight:900;font-size:18px}.branding-preview strong,.branding-preview small{display:block}.deliverability-modal-card{width:min(640px,calc(100vw - 32px))}.deliverability-score{display:flex;align-items:center;gap:16px;padding:18px;border-radius:16px;background:linear-gradient(135deg,#4f46e522,#06b6d422);margin:16px 0}.deliverability-score strong{font-size:34px}.deliverability-score span{font-weight:800}.deliverability-checks{display:grid;gap:8px}.deliverability-row{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid var(--line);border-radius:12px}.deliverability-row>span{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-weight:900}.deliverability-row.pass>span{background:#22c55e22;color:#22c55e}.deliverability-row.warn>span{background:#f59e0b22;color:#f59e0b}.deliverability-notice{font-size:11px;color:var(--muted);margin-top:14px}.bulk-schedule-card{width:min(1180px,calc(100vw - 30px));max-height:92vh;display:flex;flex-direction:column}.bulk-schedule-head{display:flex;justify-content:space-between;gap:20px}.bulk-defaults{display:grid;grid-template-columns:220px 150px auto auto;gap:10px;align-items:end;margin:14px 0}.bulk-defaults label{margin:0}.bulk-table-wrap{overflow:auto;min-height:260px;border:1px solid var(--line);border-radius:14px}.bulk-schedule-table{width:100%;border-collapse:collapse;min-width:900px}.bulk-schedule-table th{position:sticky;top:0;background:var(--panel-2);z-index:2;text-align:left;font-size:9px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);padding:10px}.bulk-schedule-table td{border-top:1px solid var(--line);padding:7px}.bulk-schedule-table input{width:100%;min-width:0}.slot-status{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:9px;font-weight:800;white-space:nowrap}.slot-status.available{background:#22c55e18;color:#22c55e}.slot-status.conflict{background:#ef444418;color:#ef4444}.slot-status.pending{background:#94a3b818;color:#94a3b8}
@media(max-width:900px){body.compose-focus .compose-fields{grid-template-columns:1fr!important}body.compose-focus .compose-fields>.sender-line,body.compose-focus .compose-fields>.to-line,body.compose-focus .compose-fields>.cc-fields,body.compose-focus .compose-fields>.subject-line{grid-column:1!important;grid-row:auto!important}.bulk-defaults{grid-template-columns:1fr 1fr}.bulk-defaults button{width:100%}}

/* ========================================================================
   v1.8.1 Mail.com-inspired Compose UI
   Airy, centred, accessible and touch-friendly without altering mail logic.
   ======================================================================== */
body.compose-focus{
  --compose-primary:#1a73e8;
  --compose-primary-hover:#155fc0;
  --compose-text:#222222;
  --compose-label:#666666;
  --compose-placeholder:#999999;
  --compose-line:#e0e0e0;
  --compose-soft:#fafafa;
  --compose-hover:#f5f5f5;
}
body.compose-focus .workspace{background:#f3f5f8!important}
body.compose-focus #page-compose.active{
  height:calc(100dvh - 50px)!important;
  overflow:auto!important;
  padding:24px!important;
  background:#f3f5f8!important;
  scrollbar-gutter:stable;
}
body.compose-focus .composer-pro{
  width:100%!important;
  max-width:1100px!important;
  min-height:100%!important;
  margin:0 auto!important;
  display:block!important;
}
body.compose-focus .professional-compose,
body.compose-focus .compose-window{
  width:100%!important;
  min-height:calc(100dvh - 98px)!important;
  height:auto!important;
  max-width:1100px!important;
  margin:0 auto!important;
  padding:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:visible!important;
  color:var(--compose-text)!important;
  background:#fff!important;
  border:0!important;
  border-radius:12px!important;
  box-shadow:0 2px 8px rgba(0,0,0,.08)!important;
  font-family:Inter,"Segoe UI","Helvetica Neue",Arial,sans-serif!important;
  font-size:15px!important;
}
body.compose-focus .compose-header{
  min-height:68px;
  padding:12px 24px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  border-bottom:1px solid var(--compose-line);
}
body.compose-focus .compose-title-block{display:flex;align-items:center;gap:16px;min-width:0}
body.compose-focus .compose-title-block h2{
  margin:0!important;
  color:var(--compose-text)!important;
  font-size:18px!important;
  font-weight:650!important;
  letter-spacing:-.01em;
  white-space:nowrap;
}
body.compose-focus .save-state{display:flex;align-items:center;gap:7px;color:var(--compose-placeholder)!important;font-size:13px!important;white-space:nowrap}
body.compose-focus .save-state #saveDot{width:7px;height:7px;border-radius:50%;background:#a6adb7}
body.compose-focus .save-state.saved #saveDot{background:#1aa36f}
body.compose-focus .compose-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:0}
body.compose-focus .compose-header-actions select{
  width:190px!important;
  height:42px!important;
  padding:0 36px 0 12px!important;
  border:1px solid #d0d0d0!important;
  border-radius:8px!important;
  background:#fff!important;
  color:#333!important;
  font-size:14px!important;
}
body.compose-focus .compose-icon-danger{
  width:42px!important;height:42px!important;display:grid;place-items:center;
  border:1px solid #f1c8cc!important;border-radius:8px!important;
  background:#fff!important;color:#c73645!important;font-size:20px!important;cursor:pointer;
}
body.compose-focus .compose-icon-danger:hover{background:#fff3f4!important}
body.compose-focus .compose-send-button{
  min-height:44px!important;
  padding:0 24px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  border:0!important;
  border-radius:8px!important;
  background:var(--compose-primary)!important;
  color:#fff!important;
  font-size:15px!important;
  font-weight:650!important;
  line-height:1!important;
  box-shadow:0 2px 5px rgba(26,115,232,.22)!important;
  cursor:pointer!important;
  transition:background .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
body.compose-focus .compose-send-button svg{width:18px;height:18px;fill:currentColor;flex:0 0 auto}
body.compose-focus .compose-send-button:hover{background:var(--compose-primary-hover)!important;box-shadow:0 4px 11px rgba(26,115,232,.28)!important;transform:translateY(-1px)}
body.compose-focus .compose-send-button:disabled{opacity:.6;cursor:wait;transform:none}
body.compose-focus .reply-context{
  margin:16px 24px 0!important;
  padding:12px 14px!important;
  border:1px solid #cfe2ff!important;
  border-radius:8px!important;
  background:#f5f9ff!important;
  color:#506176!important;
  font-size:14px!important;
}
body.compose-focus .compose-fields{
  display:block!important;
  padding:0 24px!important;
  background:#fff!important;
  border:0!important;
}
body.compose-focus .compose-fields>.compose-line{
  width:100%!important;
  min-height:56px!important;
  height:auto!important;
  padding:8px 0!important;
  display:grid!important;
  grid-template-columns:72px minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:14px!important;
  border:0!important;
  border-bottom:1px solid var(--compose-line)!important;
  background:#fff!important;
  position:relative!important;
  z-index:auto!important;
}
body.compose-focus .field-label{
  color:var(--compose-label)!important;
  font-size:15px!important;
  font-weight:400!important;
  text-transform:none!important;
  letter-spacing:0!important;
}
body.compose-focus .compose-line input{
  width:100%!important;
  height:40px!important;
  min-width:0!important;
  padding:8px 0!important;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
  color:var(--compose-text)!important;
  font-family:inherit!important;
  font-size:16px!important;
  line-height:1.4!important;
}
body.compose-focus .compose-line input::placeholder{color:var(--compose-placeholder)!important;opacity:1}
body.compose-focus .compose-line input:focus{box-shadow:inset 0 -2px 0 var(--compose-primary)!important}
body.compose-focus .sender-line{grid-template-columns:72px minmax(0,1fr) auto!important}
body.compose-focus .sender-picker-button{
  width:100%!important;
  min-height:48px!important;
  height:auto!important;
  padding:5px 8px!important;
  border:0!important;
  border-radius:8px!important;
  background:transparent!important;
  color:var(--compose-text)!important;
  text-align:left!important;
}
body.compose-focus .sender-picker-button:hover{background:var(--compose-hover)!important}
body.compose-focus .sender-picker-avatar{width:36px!important;height:36px!important;border-radius:50%!important;font-size:14px!important}
body.compose-focus .sender-picker-copy strong{color:var(--compose-text)!important;font-size:15px!important;font-weight:650!important}
body.compose-focus .sender-picker-copy small{color:var(--compose-placeholder)!important;font-size:13px!important;margin-top:2px!important}
body.compose-focus .sender-picker-chevron{color:var(--compose-label)!important;font-size:16px!important}
body.compose-focus .identity-hint{color:var(--compose-placeholder)!important;font-size:13px!important}
body.compose-focus .sender-picker-menu{
  z-index:250!important;
  width:min(540px,calc(100vw - 80px))!important;
  max-height:min(520px,70vh)!important;
  border:1px solid #d8dde5!important;
  border-radius:10px!important;
  background:#fff!important;
  color:var(--compose-text)!important;
  box-shadow:0 18px 45px rgba(31,42,55,.18)!important;
}
body.compose-focus .sender-picker-search{padding:12px!important;border-bottom:1px solid var(--compose-line)!important;background:#fff!important}
body.compose-focus .sender-picker-search input{font-size:15px!important;color:var(--compose-text)!important;background:#f8fafc!important;border:1px solid #d8dde5!important;border-radius:8px!important;padding:10px 12px!important}
body.compose-focus .sender-result{min-height:54px!important;padding:9px 12px!important;color:var(--compose-text)!important}
body.compose-focus .sender-result:hover,body.compose-focus .sender-result.active{background:#f0f6ff!important}
body.compose-focus .cc-bcc-links{display:flex;align-items:center;gap:12px}
body.compose-focus .inline-link{
  padding:7px 2px!important;
  border:0!important;
  background:transparent!important;
  color:var(--compose-primary)!important;
  font-size:14px!important;
  font-weight:550!important;
  cursor:pointer!important;
}
body.compose-focus .inline-link:hover{text-decoration:underline}
body.compose-focus .compose-fields>.cc-fields{
  width:100%!important;
  min-height:56px!important;
  padding:8px 0!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:24px!important;
  border:0!important;
  border-bottom:1px solid var(--compose-line)!important;
  background:#fff!important;
}
body.compose-focus .compose-fields>.cc-fields[hidden]{display:none!important}
body.compose-focus .cc-fields label{
  display:grid!important;
  grid-template-columns:50px minmax(0,1fr)!important;
  align-items:center!important;
  gap:10px!important;
  margin:0!important;
  color:var(--compose-label)!important;
  font-size:15px!important;
  font-weight:400!important;
  text-transform:none!important;
}
body.compose-focus .cc-fields input{
  height:40px!important;
  padding:8px 0!important;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
  color:var(--compose-text)!important;
  font-size:15px!important;
}
body.compose-focus .cc-fields input::placeholder{color:var(--compose-placeholder)!important}
body.compose-focus .subject-line{grid-template-columns:72px minmax(0,1fr) auto!important}
body.compose-focus .subject-line>span:last-child{color:var(--compose-placeholder)!important;font-size:13px!important;font-weight:400!important}
body.compose-focus .composer-view-tabs{
  min-height:48px!important;
  height:auto!important;
  padding:8px 24px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  border-bottom:1px solid var(--compose-line)!important;
  background:#fff!important;
}
body.compose-focus .view-tab-group,body.compose-focus .compose-utility-actions{display:flex!important;align-items:center!important;gap:8px!important}
body.compose-focus .composer-view-tabs button{
  min-height:34px!important;
  height:auto!important;
  padding:7px 12px!important;
  border:1px solid transparent!important;
  border-radius:7px!important;
  background:transparent!important;
  color:#596273!important;
  font-size:14px!important;
  font-weight:550!important;
}
body.compose-focus .composer-view-tabs button:hover{background:var(--compose-hover)!important}
body.compose-focus .composer-view-tabs button.active{background:#eaf2ff!important;color:var(--compose-primary)!important;border-color:#cfe0fb!important}
body.compose-focus .compose-utility-actions button{border-color:#d9dee6!important;background:#fff!important;color:#46505f!important}
body.compose-focus .editor-shell{
  flex:1 1 auto!important;
  min-height:500px!important;
  height:auto!important;
  margin:0 24px!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:0!important;
  background:#fff!important;
}
body.compose-focus .editor-toolbar{
  min-height:52px!important;
  height:auto!important;
  max-height:none!important;
  padding:7px 4px!important;
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:4px!important;
  overflow:visible!important;
  border:0!important;
  border-bottom:1px solid var(--compose-line)!important;
  background:var(--compose-soft)!important;
}
body.compose-focus .toolbar-group{display:flex;align-items:center;gap:2px;min-width:max-content}
body.compose-focus .toolbar-divider{
  width:1px!important;
  height:28px!important;
  margin:0 5px!important;
  display:block!important;
  flex:0 0 1px!important;
  background:var(--compose-line)!important;
}
body.compose-focus .editor-toolbar button{
  min-width:36px!important;
  width:auto!important;
  height:36px!important;
  padding:0 9px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid transparent!important;
  border-radius:7px!important;
  background:transparent!important;
  color:#303844!important;
  font-size:18px!important;
  line-height:1!important;
}
body.compose-focus .editor-toolbar button:hover{border-color:#d7dce4!important;background:#fff!important;box-shadow:0 1px 2px rgba(0,0,0,.05)!important}
body.compose-focus .editor-toolbar select{
  min-width:118px!important;
  width:auto!important;
  height:36px!important;
  padding:0 34px 0 10px!important;
  border:1px solid #d0d0d0!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#303030!important;
  font-size:15px!important;
}
body.compose-focus .editor-toolbar .font-size-select{min-width:86px!important}
body.compose-focus .toolbar-color{
  position:relative;
  width:36px;height:36px;
  display:grid;place-items:center;
  border:1px solid transparent;
  border-radius:7px;
  background:transparent;
  color:#303844;
  font-size:17px;
  font-weight:700;
  overflow:hidden;
  cursor:pointer;
}
body.compose-focus .toolbar-color:hover{border-color:#d7dce4;background:#fff}
body.compose-focus .toolbar-color input[type=color]{position:absolute;inset:auto 4px 3px;width:28px!important;height:5px!important;padding:0!important;border:0!important;opacity:1;cursor:pointer}
body.compose-focus .toolbar-color.highlight input[type=color]{height:8px!important}
body.compose-focus .rich-editor,
body.compose-focus .html-editor{
  flex:1 1 auto!important;
  width:100%!important;
  min-height:400px!important;
  height:auto!important;
  max-height:none!important;
  padding:18px 10px 28px!important;
  overflow:auto!important;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  background:#fff!important;
  color:var(--compose-text)!important;
  caret-color:var(--compose-primary)!important;
  font-family:Arial,"Helvetica Neue",sans-serif!important;
  font-size:15px!important;
  line-height:1.6!important;
  box-shadow:none!important;
}
body.compose-focus .rich-editor:empty:before{color:var(--compose-placeholder)!important;font-size:15px!important}
body.compose-focus .rich-editor:focus{box-shadow:none!important}
body.compose-focus .compose-preview-panel{flex:1 1 auto!important;min-height:400px!important;padding:20px!important;background:#f4f6f9!important}
body.compose-focus .compose-preview-panel iframe{min-height:420px!important}
body.compose-focus .compose-extras{
  flex:0 0 auto!important;
  max-height:none!important;
  margin:0 24px!important;
  padding:12px 0!important;
  overflow:visible!important;
  border-top:1px solid var(--compose-line)!important;
  background:#fff!important;
}
body.compose-focus .compose-extras[hidden]{display:none!important}
body.compose-focus .attachment-zone{
  min-height:64px!important;
  padding:12px 16px!important;
  border:1px dashed #c9d1dc!important;
  border-radius:8px!important;
  background:#fafbfc!important;
  color:#4b5563!important;
}
body.compose-focus .plain-toggle{font-size:14px!important;color:#4b5563!important}
body.compose-focus .plain-text{min-height:140px!important;font-size:15px!important;line-height:1.6!important;background:#fff!important;color:#222!important;border:1px solid #d8dde5!important}
body.compose-focus .professional-actions{
  position:relative!important;
  bottom:auto!important;
  min-height:68px!important;
  height:auto!important;
  padding:12px 24px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  border-top:1px solid var(--compose-line)!important;
  border-radius:0 0 12px 12px!important;
  background:#fff!important;
  box-shadow:none!important;
}
body.compose-focus .compose-secondary-actions{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:12px!important}
body.compose-focus .professional-actions .secondary-button{
  min-height:42px!important;
  height:auto!important;
  padding:9px 18px!important;
  border:1px solid #d0d0d0!important;
  border-radius:8px!important;
  background:#fff!important;
  color:#333!important;
  font-size:14px!important;
  font-weight:550!important;
  box-shadow:none!important;
}
body.compose-focus .professional-actions .secondary-button:hover{background:var(--compose-hover)!important;border-color:#c3c8cf!important}
body.compose-focus .compose-send-bottom{min-width:148px!important}
body.compose-focus .editor-fullscreen{
  inset:16px!important;
  z-index:300!important;
  max-width:none!important;
  margin:0!important;
  border:1px solid #d7dce4!important;
  border-radius:12px!important;
  box-shadow:0 24px 80px rgba(15,23,42,.24)!important;
}
body.compose-focus .editor-fullscreen .rich-editor,body.compose-focus .editor-fullscreen .html-editor{min-height:calc(100vh - 90px)!important}

@media(max-width:1180px){
  body.compose-focus #page-compose.active{padding:16px!important}
  body.compose-focus .composer-pro,body.compose-focus .professional-compose{max-width:100%!important}
}
@media(max-width:820px){
  body.compose-focus #page-compose.active{height:auto!important;min-height:calc(100dvh - 48px)!important;padding:0!important;overflow:visible!important}
  body.compose-focus .professional-compose{min-height:calc(100dvh - 48px)!important;border-radius:0!important;box-shadow:none!important}
  body.compose-focus .compose-header{padding:10px 14px;align-items:flex-start;flex-direction:column}
  body.compose-focus .compose-header-actions{width:100%;justify-content:flex-end;flex-wrap:wrap}
  body.compose-focus .compose-header-actions select{flex:1 1 150px;width:auto!important}
  body.compose-focus .compose-fields{padding:0 14px!important}
  body.compose-focus .compose-fields>.compose-line{grid-template-columns:54px minmax(0,1fr) auto!important;gap:8px!important}
  body.compose-focus .compose-fields>.cc-fields{grid-template-columns:1fr!important;gap:0!important}
  body.compose-focus .composer-view-tabs{padding:8px 14px!important;align-items:flex-start!important;flex-direction:column!important}
  body.compose-focus .editor-shell{margin:0 14px!important;min-height:460px!important}
  body.compose-focus .editor-toolbar{flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important}
  body.compose-focus .compose-extras{margin:0 14px!important}
  body.compose-focus .professional-actions{padding:12px 14px!important;align-items:stretch!important;flex-direction:column-reverse!important}
  body.compose-focus .compose-secondary-actions{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%}
  body.compose-focus .compose-send-bottom{width:100%!important}
}
@media(max-width:520px){
  body.compose-focus .compose-title-block{align-items:flex-start;flex-direction:column;gap:5px}
  body.compose-focus .compose-header-actions{display:grid;grid-template-columns:1fr 42px auto}
  body.compose-focus .compose-fields>.compose-line{grid-template-columns:46px minmax(0,1fr) auto!important}
  body.compose-focus .field-label{font-size:14px!important}
  body.compose-focus .compose-line input{font-size:15px!important}
  body.compose-focus .identity-hint{display:none!important}
  body.compose-focus .compose-secondary-actions{grid-template-columns:1fr!important}
}
body.compose-focus .editor-toolbar[hidden],
body.compose-focus .rich-editor[hidden],
body.compose-focus .html-editor[hidden],
body.compose-focus .compose-preview-panel[hidden],
body.compose-focus .compose-extras[hidden],
body.compose-focus .cc-fields[hidden]{display:none!important}

/* v1.9 multi-domain infrastructure and protected user deletion */
.infrastructure-page{padding:24px;overflow:auto;background:var(--page-bg,#f3f6fb)}
.infrastructure-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 18px}
.infrastructure-summary article{background:var(--panel-bg,#fff);border:1px solid var(--border,#e2e8f0);border-radius:14px;padding:16px 18px;box-shadow:0 4px 14px rgba(15,23,42,.04)}
.infrastructure-summary span{display:block;color:var(--muted,#667085);font-size:12px;margin-bottom:6px}.infrastructure-summary strong{font-size:26px;line-height:1;color:var(--text,#172033)}
.infrastructure-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:start}.infrastructure-card{min-height:360px}.infrastructure-list{display:grid;gap:10px}
.infrastructure-item{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:14px;align-items:center;padding:14px;border:1px solid var(--border,#e2e8f0);border-radius:12px;background:var(--surface,#fff)}
.infrastructure-item-icon{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;font-weight:800;background:linear-gradient(135deg,#5b5ff7,#2e8cff);color:#fff}
.infrastructure-item-main{min-width:0}.infrastructure-item-main>div{display:flex;align-items:center;flex-wrap:wrap;gap:7px}.infrastructure-item-main strong{font-size:15px}.infrastructure-item-main small,.infrastructure-item-main em{display:block;margin-top:4px;font-size:12px;color:var(--muted,#667085);font-style:normal;overflow-wrap:anywhere}
.infrastructure-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;max-width:245px}.infra-status{display:inline-flex;padding:3px 7px;border-radius:999px;background:#eef1f5;color:#667085;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}.infra-status.success{background:#eafaf1;color:#137a45}.infra-status.default{background:#eef0ff;color:#4f46e5}.infrastructure-empty{padding:34px;text-align:center;border:1px dashed var(--border,#d8dee9);border-radius:12px}.infrastructure-empty strong,.infrastructure-empty span{display:block}.infrastructure-empty span{margin-top:6px;color:var(--muted,#667085);font-size:13px}.infrastructure-note{display:flex;gap:12px;margin-top:16px;padding:14px 18px;border-radius:12px;background:#eef6ff;border:1px solid #cfe3ff;color:#24415f}.infrastructure-note span{font-size:13px}.infrastructure-modal-card{width:min(720px,calc(100vw - 32px));max-height:92vh;overflow:auto}.domain-modal-card{width:min(880px,calc(100vw - 32px))}.infrastructure-form-section{padding:14px;border:1px solid var(--border,#e2e8f0);border-radius:12px;background:var(--soft-bg,#f8fafc);margin:12px 0}.infrastructure-form-section h3{margin:0 0 10px;font-size:14px}.form-grid.three{grid-template-columns:2fr .8fr 1fr}.danger-modal-card{width:min(520px,calc(100vw - 32px));text-align:left}.danger-modal-icon{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#fee2e2;color:#b42318;font-size:24px;font-weight:900;margin-bottom:12px}.danger-solid{background:#c62828!important;border-color:#c62828!important;color:#fff!important}.deleted-user-row{opacity:.72;background:rgba(180,35,24,.035)}.approval-pill.deleted{background:#fee2e2;color:#b42318}
@media(max-width:1100px){.infrastructure-grid{grid-template-columns:1fr}.infrastructure-summary{grid-template-columns:repeat(2,1fr)}}
@media(max-width:680px){.infrastructure-page{padding:14px}.infrastructure-summary{grid-template-columns:1fr 1fr}.infrastructure-item{grid-template-columns:40px 1fr}.infrastructure-actions{grid-column:1/-1;justify-content:flex-start;max-width:none}.form-grid.three{grid-template-columns:1fr}}
.infrastructure-route-banner{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 18px;padding:16px 18px;border:1px solid #cfe3ff;border-radius:14px;background:linear-gradient(135deg,#f2f7ff,#eef8ff);color:#1f3b5b}.infrastructure-route-banner>div{display:flex;align-items:center;gap:13px;min-width:0}.infrastructure-route-banner strong,.infrastructure-route-banner p{display:block;margin:0}.infrastructure-route-banner p{margin-top:4px;font-size:13px;line-height:1.5;color:#526c86}.route-banner-icon{width:44px;height:44px;flex:0 0 44px;display:grid;place-items:center;border-radius:12px;background:linear-gradient(135deg,#5b5ff7,#2e8cff);color:#fff;font-size:20px;font-weight:800}.policy-settings-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:1100px){.policy-settings-grid{grid-template-columns:1fr 1fr}.infrastructure-route-banner{align-items:flex-start}}
@media(max-width:720px){.policy-settings-grid{grid-template-columns:1fr}.infrastructure-route-banner{align-items:stretch;flex-direction:column}.infrastructure-route-banner .primary-button{width:100%}}

/* ========================================================================
   v1.9.1 Flexible Compose Viewport
   The compose shell stays attached beneath the top bar. Only the editor,
   HTML source or preview document scrolls, so the header and footer remain
   reachable without the complete page drifting upward.
   ======================================================================== */
body.compose-focus #page-compose.active{
  height:calc(100dvh - 50px)!important;
  min-height:0!important;
  overflow:hidden!important;
  padding:16px!important;
  scroll-behavior:auto!important;
  scrollbar-gutter:auto!important;
}
body.compose-focus .composer-pro{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-width:1100px!important;
  margin:0 auto!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
body.compose-focus .professional-compose,
body.compose-focus .compose-window{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  margin:0!important;
  display:grid!important;
  grid-template-rows:auto auto auto auto minmax(0,1fr) auto auto!important;
  overflow:hidden!important;
}
body.compose-focus .compose-header,
body.compose-focus .reply-context,
body.compose-focus .compose-fields,
body.compose-focus .composer-view-tabs,
body.compose-focus .compose-extras,
body.compose-focus .professional-actions{
  min-width:0!important;
  flex:0 0 auto!important;
}
body.compose-focus .editor-shell{
  width:auto!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  margin:0 24px!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  overflow:hidden!important;
}
body.compose-focus .editor-toolbar{
  grid-row:1!important;
  flex:0 0 auto!important;
  max-height:104px!important;
  overflow-x:auto!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
}
body.compose-focus .rich-editor,
body.compose-focus .html-editor,
body.compose-focus .compose-preview-panel{
  grid-row:2!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
}
body.compose-focus .html-editor{
  resize:none!important;
  white-space:pre-wrap!important;
  overflow-wrap:anywhere!important;
}
body.compose-focus .compose-preview-panel:not([hidden]){
  display:flex!important;
  align-items:stretch!important;
  justify-content:center!important;
  min-height:0!important;
  overflow:hidden!important;
  padding:16px!important;
}
body.compose-focus .compose-preview-panel .preview-envelope{
  width:min(840px,100%)!important;
  height:100%!important;
  min-height:0!important;
  margin:0 auto!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  overflow:hidden!important;
  border-radius:12px!important;
  box-shadow:0 8px 28px rgba(15,23,42,.08)!important;
}
body.compose-focus .compose-preview-panel .preview-meta{
  margin:0!important;
  min-width:0!important;
  border-radius:12px 12px 0 0!important;
}
body.compose-focus .compose-preview-panel iframe{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  display:block!important;
  overflow:auto!important;
  border:0!important;
  border-radius:0 0 12px 12px!important;
  background:#fff!important;
}
body.compose-focus .compose-extras{
  max-height:min(180px,28dvh)!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
}
body.compose-focus .professional-actions{
  position:relative!important;
  inset:auto!important;
  z-index:8!important;
  margin:0!important;
  box-shadow:0 -4px 14px rgba(15,23,42,.05)!important;
}
body.compose-focus .editor-fullscreen{
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  overflow:hidden!important;
}
body.compose-focus .editor-fullscreen .rich-editor,
body.compose-focus .editor-fullscreen .html-editor{
  height:100%!important;
  min-height:0!important;
  overflow:auto!important;
}
@media(max-height:760px) and (min-width:821px){
  body.compose-focus #page-compose.active{padding:8px!important}
  body.compose-focus .compose-header{min-height:54px!important;padding:7px 18px!important}
  body.compose-focus .compose-fields>.compose-line{min-height:48px!important;padding:4px 0!important}
  body.compose-focus .composer-view-tabs{min-height:42px!important;padding:4px 18px!important}
  body.compose-focus .editor-shell{margin:0 18px!important}
  body.compose-focus .professional-actions{min-height:56px!important;padding:7px 18px!important}
}
@media(max-width:820px){
  body.compose-focus #page-compose.active{
    height:auto!important;
    min-height:calc(100dvh - 48px)!important;
    overflow:visible!important;
    padding:0!important;
  }
  body.compose-focus .composer-pro,
  body.compose-focus .professional-compose{
    height:auto!important;
    min-height:calc(100dvh - 48px)!important;
    max-height:none!important;
    overflow:visible!important;
  }
  body.compose-focus .professional-compose{display:flex!important;flex-direction:column!important}
  body.compose-focus .editor-shell{height:auto!important;min-height:62vh!important;margin:0 14px!important}
  body.compose-focus .rich-editor,
  body.compose-focus .html-editor,
  body.compose-focus .compose-preview-panel{min-height:58vh!important;height:auto!important}
  body.compose-focus .compose-preview-panel:not([hidden]){overflow:auto!important}
  body.compose-focus .compose-preview-panel .preview-envelope{height:auto!important;min-height:58vh!important}
  body.compose-focus .compose-preview-panel iframe{height:58vh!important;min-height:58vh!important}
}

/* ========================================================================
   v1.9.2 Stable Compose Layout
   Final structural correction: the compose window is a simple flex column.
   Header/fields/toolbars keep their natural height; the editor receives all
   remaining space; the action bar never expands into the writing area.
   ======================================================================== */
@media (min-width: 821px) {
  body.compose-focus #page-compose.active {
    height: calc(100dvh - 50px) !important;
    min-height: 0 !important;
    padding: 14px 18px !important;
    overflow: hidden !important;
  }

  body.compose-focus .composer-pro {
    width: min(1100px, 100%) !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  body.compose-focus .professional-compose,
  body.compose-focus .compose-window {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  body.compose-focus .compose-header,
  body.compose-focus .reply-context,
  body.compose-focus .compose-fields,
  body.compose-focus .composer-view-tabs,
  body.compose-focus .compose-extras,
  body.compose-focus .professional-actions {
    flex: 0 0 auto !important;
    min-height: 0 !important;
  }

  body.compose-focus .compose-header {
    padding: 10px 22px !important;
  }

  body.compose-focus .compose-fields {
    padding: 0 22px !important;
  }

  body.compose-focus .compose-fields > .compose-line {
    min-height: 50px !important;
    padding: 4px 0 !important;
  }

  body.compose-focus .composer-view-tabs {
    min-height: 44px !important;
    padding: 5px 22px !important;
  }

  body.compose-focus .editor-shell {
    flex: 1 1 auto !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 22px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  body.compose-focus .editor-toolbar {
    flex: 0 0 auto !important;
    min-height: 50px !important;
    max-height: 94px !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
  }

  body.compose-focus .rich-editor,
  body.compose-focus .html-editor,
  body.compose-focus .compose-preview-panel {
    flex: 1 1 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: auto !important;
    overscroll-behavior: contain !important;
    scrollbar-gutter: stable !important;
  }

  body.compose-focus .rich-editor,
  body.compose-focus .html-editor {
    padding: 18px 14px 34px !important;
  }

  body.compose-focus .compose-preview-panel:not([hidden]) {
    display: flex !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    padding: 14px !important;
    overflow: hidden !important;
  }

  body.compose-focus .compose-preview-panel .preview-envelope {
    width: min(840px, 100%) !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  body.compose-focus .compose-preview-panel .preview-meta {
    flex: 0 0 auto !important;
  }

  body.compose-focus .compose-preview-panel iframe {
    flex: 1 1 auto !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    display: block !important;
    border: 0 !important;
    overflow: auto !important;
  }

  body.compose-focus .compose-extras {
    max-height: min(170px, 24dvh) !important;
    margin: 0 22px !important;
    overflow: auto !important;
  }

  body.compose-focus .professional-actions {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 62px !important;
    height: auto !important;
    padding: 9px 22px !important;
    margin: 0 !important;
    position: relative !important;
    inset: auto !important;
    overflow: visible !important;
  }
}

@media (min-width: 821px) and (max-height: 760px) {
  body.compose-focus #page-compose.active { padding: 8px 12px !important; }
  body.compose-focus .compose-header { padding: 7px 18px !important; }
  body.compose-focus .compose-fields { padding: 0 18px !important; }
  body.compose-focus .compose-fields > .compose-line { min-height: 44px !important; }
  body.compose-focus .composer-view-tabs { min-height: 40px !important; padding: 4px 18px !important; }
  body.compose-focus .editor-shell { margin: 0 18px !important; }
  body.compose-focus .editor-toolbar { min-height: 46px !important; }
  body.compose-focus .professional-actions { min-height: 54px !important; padding: 6px 18px !important; }
}

/* ========================================================================
   v2.0.0 Responsive Experience System
   Complete desktop, tablet and mobile shell redesign.
   ======================================================================== */
:root{
  --v2-sidebar:248px;
  --v2-topbar:68px;
  --v2-mobile-nav:66px;
  --v2-content:1500px;
  --v2-gutter:clamp(14px,2vw,28px);
  --v2-radius:16px;
  --v2-radius-sm:11px;
  --v2-shadow:0 14px 40px rgba(2,8,23,.10);
  --v2-ease:cubic-bezier(.2,.8,.2,1);
}
*{box-sizing:border-box}
html,body{width:100%;max-width:100%;overflow-x:hidden}
body{font-family:Inter,"Segoe UI",Roboto,Arial,sans-serif;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
button,input,select,textarea{font:inherit}
button{touch-action:manipulation}
img,iframe{max-width:100%}
[hidden]{display:none!important}

/* Stable application shell */
.app-shell{height:100dvh;min-height:100dvh;overflow:hidden;background:var(--bg)}
.sidebar{width:var(--v2-sidebar)!important;padding:18px 14px!important;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.workspace{margin-left:var(--v2-sidebar)!important;height:100dvh!important;min-height:0!important;display:grid!important;grid-template-rows:var(--v2-topbar) minmax(0,1fr)!important;overflow:hidden!important}
.topbar{position:relative!important;inset:auto!important;height:var(--v2-topbar)!important;min-height:var(--v2-topbar)!important;padding:0 var(--v2-gutter)!important;background:color-mix(in srgb,var(--bg) 88%,transparent)!important;backdrop-filter:blur(18px);z-index:45!important}
.page{width:100%!important;max-width:var(--v2-content)!important;height:100%!important;min-height:0!important;margin:0 auto!important;padding:var(--v2-gutter)!important;overflow:auto!important;overscroll-behavior:contain;scrollbar-gutter:stable}
.page.active{display:block!important}
.sidebar-scrim,.mobile-bottom-nav,.mobile-compose-fab{display:none}

/* Global premium surfaces */
.panel,.compose-window,.mail-list-panel,.mail-reader,.mail-folders{border-radius:var(--v2-radius)!important;box-shadow:var(--v2-shadow)}
.panel{border-color:color-mix(in srgb,var(--line) 72%,transparent)!important}
.primary-button,.secondary-button,.danger-button,.quick-compose,.sidebar-compose{min-height:42px;border-radius:11px!important}
.icon-button{min-width:40px;min-height:40px;border-radius:11px!important}
input,select,textarea{min-height:42px;border-radius:10px!important}
textarea{min-height:100px}
.section-heading{align-items:flex-start!important}
.section-heading h2{font-size:clamp(22px,2.1vw,30px)!important}
.section-heading p{font-size:13px!important;line-height:1.55}

/* Dashboard */
.welcome-banner{min-height:128px!important;padding:24px 28px!important;border-radius:20px!important}
.welcome-banner h2{font-size:clamp(24px,2.8vw,34px)!important}
.stats-grid,.compact-stats{grid-template-columns:repeat(7,minmax(128px,1fr))!important;gap:12px!important;overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:3px}
.stat-card{min-width:128px!important;padding:15px!important;border-radius:15px!important;scroll-snap-align:start}
.dashboard-grid,.dashboard-mail-grid{grid-template-columns:minmax(0,2fr) minmax(290px,1fr)!important;gap:16px!important}
.dashboard-grid .panel{min-width:0}
.dashboard-inbox-list,.activity-list,.mailbox-summary{max-height:360px;overflow:auto;overscroll-behavior:contain}

/* Mail application: desktop */
.mail-page{overflow:hidden!important}
.mail-app{height:100%!important;min-height:0!important;display:grid!important;grid-template-columns:210px minmax(330px,420px) minmax(0,1fr)!important;gap:12px!important}
.two-panel-mail{grid-template-columns:minmax(340px,430px) minmax(0,1fr)!important}
.mail-folders,.mail-list-panel,.mail-reader{min-width:0!important;min-height:0!important;height:100%!important;overflow:hidden!important}
.mail-folders{padding:14px!important;box-shadow:none!important;overflow-y:auto!important}
.mail-list-panel{display:grid!important;grid-template-rows:auto auto auto minmax(0,1fr) auto!important}
.mail-list-toolbar{gap:8px!important;padding:12px!important}
.mail-search{min-width:0;flex:1}
.mail-search input{width:100%}
.mail-list-heading{padding:12px 16px!important}
.message-list{min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain!important;scrollbar-gutter:stable}
.message-row{min-width:0!important}
.message-open,.message-copy{min-width:0!important}
.mail-reader{overflow-y:auto!important;overscroll-behavior:contain!important;scrollbar-gutter:stable}
.reader-toolbar{position:sticky;top:0;z-index:5;background:var(--panel);backdrop-filter:blur(12px);flex-wrap:wrap}
.sent-html-view iframe,.compliance-message-body iframe{width:100%;min-height:480px}
.pagination{position:relative;z-index:4;overflow-x:auto;white-space:nowrap;scrollbar-width:none}
.pagination::-webkit-scrollbar{display:none}

/* Forms and management pages */
.templates-layout{grid-template-columns:minmax(0,1fr) minmax(280px,340px)!important}
.template-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important}
.accounts-layout{grid-template-columns:minmax(320px,420px) minmax(0,1fr)!important}
.settings-grid,.policy-settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.admin-kpi-grid{grid-template-columns:repeat(4,minmax(150px,1fr))!important}
.admin-visual-grid,.admin-data-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.form-grid{gap:14px!important}
.responsive-table{width:100%;max-width:100%;overflow:auto;overscroll-behavior-inline:contain}
.responsive-table table{min-width:720px}
.table-tools{flex-wrap:wrap!important}
.table-tools>*{min-width:0}
.modal-card{max-height:min(88dvh,900px)!important;overflow-y:auto!important;overscroll-behavior:contain;width:min(720px,calc(100vw - 32px))!important}
.bulk-schedule-card,.admin-user-modal-card{width:min(1120px,calc(100vw - 32px))!important}

/* Compose: desktop and tablet foundation */
body.compose-focus .workspace{grid-template-rows:52px minmax(0,1fr)!important}
body.compose-focus .topbar{height:52px!important;min-height:52px!important}
body.compose-focus #page-compose.active{max-width:none!important;padding:12px!important;overflow:hidden!important}
body.compose-focus .composer-pro{width:min(1180px,100%)!important;height:100%!important;margin:0 auto!important}
body.compose-focus .professional-compose{height:100%!important;border-radius:16px!important;box-shadow:0 16px 50px rgba(15,23,42,.12)!important}
body.compose-focus .compose-header{padding:10px 18px!important}
body.compose-focus .compose-fields{padding:0 18px!important}
body.compose-focus .compose-fields>.compose-line{min-height:48px!important}
body.compose-focus .composer-view-tabs{padding:5px 18px!important}
body.compose-focus .editor-shell{margin:0 18px!important;min-height:0!important}
body.compose-focus .editor-toolbar{min-height:50px!important;overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap;scrollbar-width:thin}
body.compose-focus .toolbar-group{flex:0 0 auto}
body.compose-focus .rich-editor,body.compose-focus .html-editor,body.compose-focus .compose-preview-panel{min-height:0!important}
body.compose-focus .professional-actions{min-height:58px!important;padding:8px 18px!important;gap:10px!important}

/* Tablet */
@media (max-width:1199px){
  :root{--v2-sidebar:82px;--v2-topbar:64px}
  .sidebar{width:var(--v2-sidebar)!important;padding:14px 9px!important;align-items:stretch}
  .sidebar-brand{justify-content:center;padding:0 0 16px!important}
  .sidebar-brand>div:last-child,.sidebar-compose span+*,.sidebar-compose:not(:focus-visible){font-size:0}
  .sidebar-compose{width:52px!important;min-width:52px!important;margin:0 auto 10px!important;padding:0!important;display:grid!important;place-items:center!important}
  .sidebar-compose span{font-size:24px!important}
  .nav-item{justify-content:center!important;padding:0!important;position:relative}
  .nav-item>span:not(.nav-icon):not(.nav-count):not(.admin-nav-pulse){display:none!important}
  .nav-icon{width:auto!important;font-size:20px!important}
  .nav-count{position:absolute;top:4px;right:4px}
  .sidebar-health,.logout-button span+*{display:none!important}
  .logout-button{display:grid!important;place-items:center!important;text-align:center!important;font-size:22px!important}
  .workspace{margin-left:var(--v2-sidebar)!important}
  .topbar{padding:0 18px!important}
  .profile-chip>div:last-child{display:none}
  .profile-chip{margin:0!important}
  .page{padding:18px!important}
  .dashboard-grid,.dashboard-mail-grid{grid-template-columns:1fr 1fr!important}
  .dashboard-grid .span-two{grid-column:1/-1}
  .stats-grid,.compact-stats{grid-template-columns:repeat(4,minmax(140px,1fr))!important}
  .mail-app{grid-template-columns:180px minmax(300px,360px) minmax(0,1fr)!important}
  .mail-folders{padding:10px!important}
  .templates-layout,.accounts-layout{grid-template-columns:1fr!important}
  .template-editor-panel{position:static!important}
  .settings-grid,.policy-settings-grid{grid-template-columns:1fr!important}
  .admin-kpi-grid{grid-template-columns:repeat(3,minmax(145px,1fr))!important}
}

/* Mobile phone shell */
@media (max-width:767px){
  :root{--v2-topbar:58px;--v2-mobile-nav:68px;--v2-radius:13px;--v2-gutter:12px}
  html,body{height:100%;overscroll-behavior:none}
  body{font-size:14px}
  .app-shell{height:100dvh;overflow:hidden}
  .workspace{margin-left:0!important;height:100dvh!important;grid-template-rows:var(--v2-topbar) minmax(0,1fr)!important;padding-bottom:var(--v2-mobile-nav)!important}
  .topbar{height:var(--v2-topbar)!important;min-height:var(--v2-topbar)!important;padding:0 10px!important;position:relative!important}
  .topbar-left{gap:8px!important;min-width:0}
  .topbar-left>div{min-width:0}
  .topbar h1{font-size:17px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .topbar p{display:none}
  .menu-button{display:grid!important;place-items:center!important;min-width:40px!important}
  .topbar-actions{gap:5px!important}
  .topbar-actions>#globalSyncButton,.topbar-actions>#themeButton,.quick-compose,.profile-chip{display:none!important}
  .notification-panel{position:fixed!important;top:58px!important;left:8px!important;right:8px!important;width:auto!important;max-height:calc(100dvh - 140px)!important;border-radius:14px!important}

  .sidebar{display:flex!important;position:fixed!important;z-index:100!important;inset:0 auto 0 0!important;width:min(86vw,320px)!important;height:100dvh!important;padding:18px 14px calc(24px + env(safe-area-inset-bottom))!important;transform:translateX(-105%)!important;transition:transform .28s var(--v2-ease)!important;box-shadow:24px 0 60px rgba(2,8,23,.36)!important;align-items:stretch!important}
  .sidebar.open{transform:translateX(0)!important}
  .sidebar-brand{justify-content:flex-start!important;padding:0 8px 18px!important}
  .sidebar-brand>div:last-child{display:block!important}
  .sidebar-compose{width:100%!important;margin:0 0 12px!important;font-size:14px!important;display:flex!important;place-items:unset!important;justify-content:center!important;gap:8px!important}
  .sidebar-compose span{font-size:20px!important}
  .main-nav{display:grid!important;gap:4px!important}
  .nav-item{height:44px!important;justify-content:flex-start!important;padding:0 12px!important}
  .nav-item>span:not(.nav-icon):not(.nav-count):not(.admin-nav-pulse){display:inline!important}
  .nav-icon{width:24px!important;font-size:18px!important}
  .nav-count{position:static!important;margin-left:auto!important}
  .sidebar-health{display:block!important}
  .logout-button{display:flex!important;place-items:unset!important;align-items:center!important;gap:10px!important;font-size:14px!important}
  .logout-button span+*{display:inline!important}
  .sidebar-scrim{display:block;position:fixed;z-index:90;inset:0;background:rgba(2,8,23,.55);opacity:0;pointer-events:none;transition:opacity .25s ease;backdrop-filter:blur(2px)}
  body.sidebar-open .sidebar-scrim{opacity:1;pointer-events:auto}
  body.sidebar-open{overflow:hidden}

  .mobile-bottom-nav{display:grid;position:fixed;z-index:70;left:0;right:0;bottom:0;height:calc(var(--v2-mobile-nav) + env(safe-area-inset-bottom));padding:6px 8px env(safe-area-inset-bottom);grid-template-columns:repeat(5,1fr);background:color-mix(in srgb,var(--panel) 94%,transparent);border-top:1px solid var(--line);box-shadow:0 -10px 30px rgba(2,8,23,.12);backdrop-filter:blur(18px)}
  .mobile-bottom-nav button{position:relative;border:0;background:transparent;color:var(--muted);border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0}
  .mobile-bottom-nav button>span{font-size:20px;line-height:1}
  .mobile-bottom-nav button>small{font-size:10px;font-weight:700}
  .mobile-bottom-nav button.active{color:var(--primary2);background:color-mix(in srgb,var(--primary2) 11%,transparent)}
  .mobile-bottom-nav .mobile-compose-action{transform:translateY(-14px);width:58px;height:58px;justify-self:center;border-radius:20px;background:linear-gradient(135deg,var(--primary),var(--primary2));color:#fff;box-shadow:0 12px 24px rgba(59,130,246,.3)}
  .mobile-bottom-nav .mobile-compose-action small{font-size:9px}
  .mobile-unread-badge{position:absolute;top:2px;right:18%;min-width:18px;height:18px;padding:0 5px;border-radius:99px;background:var(--danger);color:#fff;font-size:9px;display:grid;place-items:center}
  .mobile-compose-fab{display:none}

  .page{height:100%!important;max-width:none!important;padding:12px 10px 18px!important;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-gutter:auto}
  .panel{border-radius:13px!important;box-shadow:0 7px 22px rgba(2,8,23,.08)!important}
  .section-heading,.panel-head,.admin-command-header,.compact-section-heading{align-items:flex-start!important;flex-direction:column!important;gap:10px!important}
  .section-heading{margin-bottom:14px!important}
  .section-heading h2{font-size:22px!important}
  .section-actions,.admin-command-actions,.banner-actions{width:100%;display:flex!important;gap:8px!important;overflow-x:auto!important;padding-bottom:2px}
  .section-actions>*,.admin-command-actions>*{flex:0 0 auto}

  /* Mobile dashboard */
  .welcome-banner{min-height:auto!important;padding:18px!important;display:block!important;border-radius:15px!important}
  .welcome-banner h2{font-size:23px!important}
  .welcome-banner p{font-size:13px!important;margin-bottom:14px}
  .banner-actions button{flex:1}
  .stats-grid,.compact-stats{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important;gap:9px!important;margin:10px 0 12px!important}
  .stat-card{min-width:0!important;padding:12px!important;gap:9px!important}
  .stat-icon{width:34px!important;height:34px!important}
  .stat-card strong{font-size:21px!important}
  .dashboard-grid,.dashboard-mail-grid{display:grid!important;grid-template-columns:1fr!important;gap:11px!important}
  .dashboard-grid .span-two{grid-column:auto!important}
  .dashboard-grid .panel{padding:14px!important}
  .dashboard-inbox-list,.activity-list,.mailbox-summary{max-height:340px}
  .dashboard-inbox-row{grid-template-columns:38px minmax(0,1fr)!important}
  .dashboard-inbox-row time{grid-column:2;text-align:left!important}

  /* Mobile mail */
  .mail-page{padding:0!important;overflow:hidden!important}
  .mail-app,.two-panel-mail{height:100%!important;display:flex!important;flex-direction:column!important;gap:0!important}
  .mail-folders{height:auto!important;min-height:0!important;display:flex!important;align-items:center!important;gap:6px!important;overflow-x:auto!important;overflow-y:hidden!important;padding:8px 10px!important;border-radius:0!important;border-width:0 0 1px!important;box-shadow:none!important;scrollbar-width:none}
  .mail-folders::-webkit-scrollbar{display:none}
  .mail-folders .mail-compose-button,.mail-folders .folder-title,.mail-folders .mailbox-title,.mail-folders .mailbox-folder-list{display:none!important}
  .folder-button{flex:0 0 auto!important;width:auto!important;height:34px!important;border-radius:99px!important;padding:0 12px!important;white-space:nowrap}
  .mail-list-panel{flex:1 1 auto!important;height:auto!important;border-radius:0!important;border:0!important;box-shadow:none!important;grid-template-rows:auto auto auto minmax(0,1fr) auto!important}
  .mail-list-toolbar{padding:8px!important;position:sticky;top:0;z-index:5;background:var(--panel)}
  .mail-list-toolbar .secondary-button{min-width:42px;padding:0 9px!important;font-size:0}
  .mail-list-toolbar .secondary-button::first-letter{font-size:16px}
  .mail-list-heading{padding:9px 12px!important}
  .mail-list-heading h2{font-size:18px!important}
  .mail-list-heading p{font-size:11px!important}
  .message-row{grid-template-columns:32px minmax(0,1fr)!important;padding:10px 8px!important;gap:7px!important}
  .message-row>.sender-avatar{display:none!important}
  .message-line{gap:6px!important}
  .message-line strong{max-width:66%;font-size:13px!important}
  .message-line time{font-size:10px!important}
  .message-copy>b{font-size:13px!important}
  .message-copy>small{font-size:11px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .row-quick-actions{display:none!important}
  .bulk-action-bar{overflow-x:auto!important;white-space:nowrap!important;padding:8px!important}
  .pagination{padding:7px!important;justify-content:flex-start!important}
  .pagination button{min-width:38px!important;height:36px!important}

  .mail-reader{position:fixed!important;z-index:85!important;inset:var(--v2-topbar) 0 calc(var(--v2-mobile-nav) + env(safe-area-inset-bottom)) 0!important;width:100%!important;height:auto!important;border-radius:0!important;border:0!important;box-shadow:none!important;background:var(--bg)!important;transform:translateX(102%);transition:transform .28s var(--v2-ease);overflow-y:auto!important}
  .mail-reader.mobile-reader-active{transform:translateX(0)}
  body.mobile-reader-open{overflow:hidden}
  .reader-toolbar{padding:8px!important;gap:6px!important;flex-wrap:nowrap!important;overflow-x:auto!important;top:0!important}
  .reader-toolbar button{flex:0 0 auto}
  .reader-subject{padding:16px 14px!important}
  .reader-subject h2{font-size:22px!important;overflow-wrap:anywhere}
  .thread-stream,.incoming-attachments,.reader-reply-cta{padding-left:12px!important;padding-right:12px!important}
  .thread-card{border-radius:12px!important}
  .sent-html-view iframe{min-height:calc(100dvh - 250px)!important}

  /* Mobile compose */
  body.compose-focus .workspace{padding-bottom:0!important;grid-template-rows:48px minmax(0,1fr)!important}
  body.compose-focus .topbar{height:48px!important;min-height:48px!important}
  body.compose-focus .mobile-bottom-nav{display:none!important}
  body.compose-focus #page-compose.active{height:100%!important;min-height:0!important;padding:0!important;overflow:hidden!important}
  body.compose-focus .composer-pro,body.compose-focus .professional-compose{width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;margin:0!important;border-radius:0!important;box-shadow:none!important;overflow:hidden!important}
  body.compose-focus .professional-compose{display:flex!important;flex-direction:column!important}
  body.compose-focus .compose-header{padding:7px 10px!important;min-height:50px!important;gap:8px!important}
  body.compose-focus .compose-title-block h2{font-size:16px!important}
  body.compose-focus .save-state{font-size:10px!important}
  body.compose-focus .compose-header-actions{gap:5px!important}
  body.compose-focus .compose-header-actions select{max-width:115px!important;min-height:36px!important;font-size:11px!important}
  body.compose-focus .compose-icon-danger{min-width:36px!important;width:36px!important;height:36px!important}
  body.compose-focus .compose-send-button{height:38px!important;min-height:38px!important;padding:0 13px!important;font-size:13px!important}
  body.compose-focus .compose-fields{padding:0 10px!important;display:block!important}
  body.compose-focus .compose-fields>.compose-line{display:grid!important;grid-template-columns:54px minmax(0,1fr) auto!important;min-height:46px!important;padding:2px 0!important}
  body.compose-focus .field-label{font-size:12px!important}
  body.compose-focus .sender-picker-button{min-height:42px!important;padding:3px 4px!important}
  body.compose-focus .sender-picker-avatar{width:31px!important;height:31px!important}
  body.compose-focus .sender-picker-copy strong{font-size:13px!important}
  body.compose-focus .sender-picker-copy small,.identity-hint{font-size:10px!important}
  body.compose-focus .sender-picker-menu{position:fixed!important;z-index:120!important;left:8px!important;right:8px!important;top:58px!important;width:auto!important;max-height:55dvh!important}
  body.compose-focus .compose-line input{font-size:16px!important;min-height:42px!important}
  body.compose-focus .cc-bcc-links{gap:8px!important}
  body.compose-focus .inline-link{font-size:12px!important;padding:7px 4px!important}
  body.compose-focus .compose-fields>.cc-fields{display:grid!important;grid-template-columns:1fr!important;gap:0!important;padding:0!important}
  body.compose-focus .compose-fields>.cc-fields[hidden]{display:none!important}
  body.compose-focus .cc-fields label{grid-template-columns:54px minmax(0,1fr)!important;min-height:44px!important}
  body.compose-focus .subject-line{grid-template-columns:54px minmax(0,1fr) auto!important}
  body.compose-focus .composer-view-tabs{padding:5px 8px!important;min-height:44px!important;gap:6px!important;overflow-x:auto!important;white-space:nowrap!important}
  body.compose-focus .view-tab-group,body.compose-focus .compose-utility-actions{flex:0 0 auto!important}
  body.compose-focus .compose-utility-actions{margin-left:auto!important}
  body.compose-focus .compose-utility-actions button{height:34px!important;padding:0 9px!important;font-size:11px!important}
  body.compose-focus .editor-shell{flex:1 1 auto!important;height:auto!important;min-height:0!important;margin:0!important;border-radius:0!important;border-left:0!important;border-right:0!important;overflow:hidden!important}
  body.compose-focus .editor-toolbar{flex:0 0 48px!important;min-height:48px!important;max-height:48px!important;padding:5px 7px!important;overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important;scrollbar-width:none}
  body.compose-focus .editor-toolbar::-webkit-scrollbar{display:none}
  body.compose-focus .editor-toolbar button{width:36px!important;min-width:36px!important;height:36px!important}
  body.compose-focus .editor-toolbar select{height:36px!important;min-height:36px!important;font-size:13px!important;min-width:95px!important}
  body.compose-focus .editor-toolbar .font-size-select{min-width:72px!important}
  body.compose-focus .rich-editor,body.compose-focus .html-editor,body.compose-focus .compose-preview-panel{flex:1 1 auto!important;height:100%!important;min-height:0!important;max-height:none!important;padding:14px 12px 90px!important;font-size:16px!important;overflow:auto!important}
  body.compose-focus .compose-preview-panel:not([hidden]){padding:8px!important;overflow:auto!important}
  body.compose-focus .compose-preview-panel .preview-envelope{height:auto!important;min-height:100%!important}
  body.compose-focus .compose-preview-panel iframe{height:calc(100dvh - 250px)!important;min-height:500px!important}
  body.compose-focus .compose-extras{position:fixed!important;z-index:105!important;left:8px!important;right:8px!important;bottom:64px!important;max-height:55dvh!important;margin:0!important;border-radius:14px!important;box-shadow:0 18px 60px rgba(2,8,23,.3)!important;background:var(--panel)!important}
  body.compose-focus .professional-actions{flex:0 0 58px!important;min-height:58px!important;height:58px!important;padding:7px 8px calc(7px + env(safe-area-inset-bottom))!important;gap:6px!important;overflow-x:auto!important;white-space:nowrap!important;position:relative!important}
  body.compose-focus .professional-actions>div{display:flex!important;gap:6px!important;flex:0 0 auto!important}
  body.compose-focus .professional-actions button{height:40px!important;min-height:40px!important;padding:0 11px!important;font-size:11px!important;flex:0 0 auto!important}
  body.compose-focus .professional-actions .primary-button{margin-left:auto!important}

  /* Remaining pages */
  .templates-layout,.accounts-layout,.settings-grid,.policy-settings-grid,.admin-visual-grid,.admin-data-grid,.admin-kpi-grid,.lead-summary-grid,.infrastructure-grid,.users-grid{display:grid!important;grid-template-columns:1fr!important;gap:11px!important}
  .template-grid{grid-template-columns:1fr!important}
  .template-editor-panel{position:static!important}
  .accounts-layout>.panel,.templates-layout>.panel,.settings-card{padding:14px!important}
  .mailbox-address{grid-template-columns:minmax(0,1fr) auto!important}
  .mailbox-address select{grid-column:1/-1}
  .form-grid,.form-grid.three,.bulk-defaults{grid-template-columns:1fr!important}
  .responsive-table{margin:0 -2px;padding-bottom:6px}
  .responsive-table table{min-width:680px!important}
  .table-tools{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  .table-tools input,.table-tools select,.table-tools button{width:100%!important;max-width:none!important}
  .leads-tools .mail-search{width:100%}
  .admin-kpi-grid article{min-height:100px}
  .admin-command-header,.admin-command-actions{width:100%}
  .compliance-layout{display:block!important;height:auto!important}
  .compliance-list-panel{height:460px!important}
  .compliance-reader{min-height:520px!important;margin-top:10px!important}
  .infrastructure-toolbar,.compliance-toolbar{grid-template-columns:1fr!important}

  /* Mobile modals become bottom sheets */
  .modal{align-items:flex-end!important;padding:0!important}
  .modal-card,.bulk-schedule-card,.admin-user-modal-card,.lead-modal-card,.infrastructure-modal-card{width:100%!important;max-width:none!important;max-height:92dvh!important;margin:0!important;border-radius:20px 20px 0 0!important;padding:20px 16px calc(20px + env(safe-area-inset-bottom))!important;box-shadow:0 -18px 60px rgba(2,8,23,.28)!important}
  .modal-actions{position:sticky;bottom:0;background:var(--panel);padding-top:10px;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
  .bulk-table-wrap{overflow-x:auto!important}
  .bulk-schedule-table{min-width:800px}
  .toast-region{left:10px!important;right:10px!important;bottom:calc(var(--v2-mobile-nav) + 10px + env(safe-area-inset-bottom))!important;width:auto!important}

  /* Authentication and approval */
  .auth-shell{display:block!important;min-height:100dvh!important;overflow:auto!important}
  .auth-showcase{min-height:auto!important;padding:30px 20px!important}
  .auth-showcase h1{font-size:34px!important}
  .auth-panel{padding:16px!important}
  .auth-card{width:100%!important;padding:22px 18px!important}
  .auth-form-grid{grid-template-columns:1fr!important}
  .approval-shell{padding:16px!important}
  .approval-card{padding:24px 18px!important}
}

/* Small phones */
@media (max-width:420px){
  .stats-grid,.compact-stats{grid-template-columns:1fr 1fr!important}
  .stat-card{padding:10px!important}
  .stat-card span{font-size:10px!important}
  .topbar h1{max-width:150px}
  body.compose-focus .compose-header-actions select{display:none!important}
  body.compose-focus .compose-title-block .save-state{display:none!important}
  body.compose-focus .compose-utility-actions button:not(#attachmentToggle):not(#moreOptionsToggle){display:none!important}
  body.compose-focus .professional-actions button{padding:0 9px!important}
}

/* Landscape phone */
@media (max-width:900px) and (max-height:520px) and (orientation:landscape){
  :root{--v2-topbar:46px;--v2-mobile-nav:54px}
  .mobile-bottom-nav{height:calc(54px + env(safe-area-inset-bottom))}
  .mobile-bottom-nav button>small{display:none}
  .mobile-bottom-nav .mobile-compose-action{width:48px;height:48px;transform:translateY(-8px)}
  body.compose-focus .topbar{display:none!important}
  body.compose-focus .workspace{grid-template-rows:minmax(0,1fr)!important}
  body.compose-focus .compose-header{min-height:44px!important;padding:4px 8px!important}
  body.compose-focus .compose-fields>.compose-line{min-height:40px!important}
  body.compose-focus .composer-view-tabs{min-height:38px!important}
  body.compose-focus .editor-toolbar{flex-basis:42px!important;min-height:42px!important;max-height:42px!important}
  body.compose-focus .professional-actions{flex-basis:48px!important;min-height:48px!important;height:48px!important}
}

/* Respect accessibility settings */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}
@media (prefers-contrast:more){
  .panel,.compose-window,.mail-list-panel,.mail-reader,.mail-folders,input,select,textarea{border-width:2px!important}
}
