:root{
  --navy:#052b5c;--navy2:#07498f;--navy3:#0d66c2;--blue:#1278ef;--blue2:#0a5ec4;
  --gold:#e5b243;--bg:#eef5fd;--panel:#ffffff;--text:#10243e;--muted:#75859a;
  --line:#dbe5f0;--danger:#b42318;--shadow:0 18px 50px rgba(11,49,91,.10);
  --radius:22px;--sidebar:270px
}
*{box-sizing:border-box}html,body{min-height:100%}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;color:var(--text);background:linear-gradient(160deg,#07366f 0,#0357a2 45%,#0b79db 100%)}
a{color:inherit;text-decoration:none}button,input,textarea,select{font:inherit}.hidden{display:none!important}
.eyebrow{font-size:.72rem;font-weight:800;letter-spacing:.18em;color:#2c83e6;margin-bottom:8px}.muted{color:var(--muted)}
.card{background:#fff;border:1px solid rgba(206,220,235,.9);border-radius:var(--radius);box-shadow:var(--shadow)}
.btn{border:0;border-radius:13px;padding:11px 16px;font-weight:750;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:7px;transition:.18s;white-space:nowrap}.btn:hover{transform:translateY(-1px)}
.btn.primary{background:linear-gradient(135deg,#1787ff,#0b63d4);color:#fff;box-shadow:0 10px 24px rgba(19,119,235,.22)}.btn.secondary{background:#edf5ff;color:#164b83}.btn.danger{background:#fff0ef;color:var(--danger)}.btn.full{width:100%;padding:13px}
.alert{padding:12px 14px;border-radius:12px;margin:12px 0;font-size:.9rem}.alert.error{background:#fff0ef;color:#9d1c13}.alert.success{background:#ecfdf3;color:#087443}

/* Login */
.login-page{min-height:100vh;background:radial-gradient(circle at 12% 10%,#0d67b9 0,#07366f 34%,#041f42 70%,#03152e 100%);display:flex;align-items:center;justify-content:center;padding:28px}
.login-shell{width:min(1050px,100%);display:grid;grid-template-columns:1.2fr .85fr;background:#fff;border-radius:30px;overflow:hidden;box-shadow:0 34px 90px rgba(0,0,0,.28)}
.brand-panel{padding:56px;color:#fff;background:linear-gradient(150deg,rgba(5,43,92,.95),rgba(4,92,171,.9));display:flex;flex-direction:column;justify-content:space-between;min-height:600px}.brand-logo{width:105px;height:105px;object-fit:contain;margin-bottom:32px}.brand-panel .eyebrow{color:#9ed2ff}.brand-panel h1{font-family:Georgia,serif;font-size:3.2rem;line-height:1.04;margin:0 0 20px}.brand-panel p{font-size:1.02rem;line-height:1.7;color:#dceeff;max-width:600px}.brand-points{display:flex;gap:10px;flex-wrap:wrap}.brand-points span{padding:9px 12px;border:1px solid rgba(255,255,255,.2);border-radius:999px;background:rgba(255,255,255,.07);font-size:.82rem}
.login-card{padding:55px 46px;align-self:center}.login-card h2{font-family:Georgia,serif;font-size:2rem;margin:0 0 8px}.mobile-brand{display:none}
label{display:block;font-size:.83rem;font-weight:760;color:#344a65;margin:18px 0 7px}input,textarea{width:100%;border:1px solid #cad8e7;background:#fbfdff;border-radius:12px;padding:12px 13px;color:var(--text);outline:none;transition:.18s}input:focus,textarea:focus{border-color:#4d9fe9;box-shadow:0 0 0 4px rgba(33,132,224,.10)}textarea{resize:vertical}.password-wrap{position:relative}.password-wrap input{padding-right:68px}.show-pass{position:absolute;right:8px;top:50%;transform:translateY(-50%);border:0;background:transparent;color:#176abe;font-weight:750;cursor:pointer}.privacy-note{font-size:.76rem;color:#8390a2;line-height:1.5;margin-top:20px}

/* App shell */
.app-page{min-height:100vh;background:linear-gradient(160deg,#07366f 0,#04549d 50%,#0a74cf 100%);overflow-x:hidden}
.app-shell{display:grid;grid-template-columns:var(--sidebar) minmax(0,1fr);min-height:100vh;align-items:stretch}
.sidebar{position:sticky;top:0;height:100vh;align-self:start;overflow-y:auto;overflow-x:hidden;padding:28px 18px 18px;background:linear-gradient(165deg,#083b7c 0%,#06346f 45%,#07559f 100%);color:#fff;z-index:20;display:flex;flex-direction:column}
.sidebar-brand{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:2px 10px 24px}.sidebar-brand img{width:104px;height:104px;object-fit:contain;display:block;filter:drop-shadow(0 10px 18px rgba(0,0,0,.12))}.sidebar-brand strong{font-size:1.45rem;line-height:1.1;letter-spacing:.01em;color:#fff}
.compose-btn{display:flex;align-items:center;gap:14px;background:linear-gradient(135deg,#1a8cff,#0f6ee5);color:#fff;font-weight:800;padding:15px 18px;border-radius:19px;margin:0 4px 24px;box-shadow:0 14px 28px rgba(0,30,80,.28);transition:.18s}.compose-btn:hover{transform:translateY(-1px);box-shadow:0 17px 32px rgba(0,30,80,.33)}
.mail-nav{display:flex;flex-direction:column;gap:5px}.nav-item{position:relative;display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:12px;padding:13px 13px;border-radius:17px;color:#f1f7ff;font-weight:650;font-size:.96rem;transition:.16s}.nav-item:hover{background:rgba(255,255,255,.08)}.nav-item.active{background:linear-gradient(90deg,rgba(90,166,255,.25),rgba(255,255,255,.08));box-shadow:inset 0 0 0 1px rgba(255,255,255,.05)}.nav-item.active:before{content:"";position:absolute;left:-18px;top:9px;bottom:9px;width:6px;border-radius:0 8px 8px 0;background:#118aff}.nav-icon{display:inline-grid;place-items:center;width:28px;height:28px;flex:0 0 auto}.nav-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.compose-btn .nav-icon svg{width:26px;height:26px}.nav-label{min-width:0;overflow:hidden;text-overflow:ellipsis}.nav-count{font-size:.69rem;background:rgba(255,255,255,.16);color:#fff;border-radius:999px;padding:3px 7px;min-width:22px;text-align:center}.nav-count:empty{display:none}
.sidebar-account{margin-top:auto;padding:20px 8px 2px;border-top:1px solid rgba(255,255,255,.13)}.sidebar-email{font-size:.69rem;color:#bcd7f2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:8px}.sidebar-logout{display:flex;align-items:center;gap:8px;font-size:.79rem;color:#ddebfa;padding:7px 0}.sidebar-logout .nav-icon{width:20px;height:20px}.sidebar-logout .nav-icon svg{width:18px;height:18px}
.content{min-width:0;min-height:calc(100vh - 20px);background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);margin:10px 10px 10px 0;border-radius:28px;padding:34px 38px;box-shadow:-14px 0 36px rgba(0,28,72,.08);overflow-x:hidden}
.session-warning{position:fixed;left:var(--sidebar);right:10px;top:10px;z-index:60;background:#fff4cc;color:#6d4d00;padding:10px 16px;text-align:center;border-radius:16px;font-size:.83rem;box-shadow:0 10px 24px rgba(71,48,0,.12)}.session-warning button{border:0;background:transparent;color:#0b67c9;font-weight:800;cursor:pointer}

/* Page header / refresh */
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:22px}.page-head h1{font-family:Georgia,serif;margin:0;color:#071e3f;font-size:2.7rem;line-height:1.02}.page-head .muted{margin:10px 0 0;font-size:.98rem}.page-head-actions{display:flex;align-items:flex-start;gap:12px}.refresh-control{border:0;background:transparent;color:#0f6fe0;display:flex;flex-direction:column;align-items:center;gap:5px;cursor:pointer;padding:0}.refresh-icon{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#f7fbff,#e7f2ff);box-shadow:0 9px 22px rgba(31,102,190,.13);border:1px solid #deebf8}.refresh-icon svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round}.refresh-control>span:last-child{font-size:.72rem;color:#6c7f95}.search-toggle{margin-top:7px}

/* Search and bulk tools */
.search-panel{padding:18px;margin-bottom:14px}.search-panel.collapsed{display:none}.search-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr 1fr;gap:10px}.search-panel label{margin:0}.search-actions{display:flex;align-items:center;gap:10px;margin-top:12px}.check-label{display:flex!important;align-items:center;gap:7px;margin:0!important}.check-label input{width:auto}
.bulkbar{display:flex;align-items:center;gap:10px;padding:11px 14px;margin-bottom:12px;box-shadow:none}.bulkbar select{border:1px solid #cad8e7;border-radius:10px;padding:9px 11px;background:#fff;color:#173250}

/* Mail list */
.mail-list{overflow:hidden}.mail-row{display:grid;grid-template-columns:30px 34px minmax(0,1fr);gap:7px;align-items:center;padding:14px 18px;border-bottom:1px solid #edf2f7;transition:.15s}.mail-row:last-child{border-bottom:0}.mail-row:hover{background:#f8fbff}.mail-row.unread{background:#f1f7ff}.mail-row.unread strong,.mail-row.unread .sender{font-weight:850;color:#082d5b}.row-check{display:flex;justify-content:center}.row-check input{width:auto}.star-btn{border:0;background:transparent;color:#b8c2cf;font-size:1.2rem;cursor:pointer;padding:0}.star-btn.on{color:#e4ac23}.mail-main{display:grid;grid-template-columns:minmax(170px,1fr) minmax(260px,2.3fr) 85px;gap:18px;align-items:center;min-width:0}.sender{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.subject{display:flex;flex-direction:column;gap:4px;min-width:0}.subject strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.subject span,.size{font-size:.78rem;color:var(--muted)}
.empty-state{text-align:center;padding:54px 20px 62px;min-height:490px;display:flex;flex-direction:column;align-items:center;justify-content:center}.empty-illustration{width:min(260px,74%);margin-bottom:8px}.empty-illustration svg{display:block;width:100%;height:auto}.empty-state h3{font-size:1.55rem;margin:8px 0 8px;color:#0b1d38}.empty-state p{color:#7e8da1;font-size:1rem;line-height:1.55;max-width:440px;margin:0}
.pager{display:flex;justify-content:center;align-items:center;gap:14px;margin:18px 0}.pager span{font-size:.86rem;color:var(--muted)}

/* Message */
.message-card{padding:28px}.message-toolbar{display:flex;justify-content:space-between;gap:12px}.toolbar-right{display:flex;gap:8px;flex-wrap:wrap}.inline-form{display:inline}.message-card h1{font-family:Georgia,serif;color:var(--navy);font-size:2rem;margin:28px 0 18px}.message-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;padding:16px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.message-meta div{display:flex;flex-direction:column;gap:4px}.message-meta span{font-size:.72rem;text-transform:uppercase;color:#8996a7;font-weight:800;letter-spacing:.08em}.message-meta strong{font-size:.88rem;word-break:break-word}.message-body{white-space:pre-wrap;word-wrap:break-word;line-height:1.75;background:#fbfdff;border-radius:14px;padding:22px;margin:22px 0;border:1px solid #edf1f5}.message-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.html-frame{width:100%;min-height:420px;border:1px solid var(--line);border-radius:14px;background:#fff;margin:22px 0}
.attachments{margin-top:24px}.attachment-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px}.attachment-card{border:1px solid var(--line);border-radius:12px;padding:13px;display:flex;flex-direction:column;gap:5px}.attachment-card span{font-size:.76rem;color:var(--muted)}.attachment-actions{display:flex;gap:12px;margin-top:6px}.attachment-actions a{font-size:.8rem;color:#0b67c9;font-weight:700}

/* Compose, settings, contacts */
.compose-card,.settings-card{padding:28px;max-width:960px}.compose-card label,.settings-card label{margin-top:0;margin-bottom:18px}.file-label input{padding:10px;background:#f7faff}.file-label span{display:block;font-size:.76rem;color:var(--muted);margin-top:6px}.compose-actions{display:flex;justify-content:flex-end;gap:10px}.settings-note{padding:13px;border-radius:11px;background:#f3f7fb;color:#60748c;font-size:.84rem;margin:14px 0 20px;border:1px solid #e1e9f2}.recipient-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.editor-label{font-size:.83rem;font-weight:760;color:#344a65;margin-bottom:7px}.editor-toolbar{display:flex;gap:6px;flex-wrap:wrap;border:1px solid #cad8e7;border-bottom:0;border-radius:11px 11px 0 0;padding:8px;background:#f8fbfe}.editor-toolbar button{border:1px solid #dce6ef;background:#fff;border-radius:7px;padding:6px 9px;cursor:pointer}.rich-editor{min-height:260px;border:1px solid #cad8e7;border-radius:0 0 11px 11px;background:#fff;padding:14px;outline:none;line-height:1.6}.rich-editor img{max-width:100%;height:auto}.plain-fallback{display:none}.contact-suggestions{position:relative;margin-top:-8px;border:1px solid var(--line);background:#fff;border-radius:10px;padding:6px;box-shadow:var(--shadow);z-index:10}.contact-suggestions button{display:block;width:100%;text-align:left;border:0;background:#fff;padding:8px;border-radius:7px;cursor:pointer}.contact-suggestions button:hover{background:#f1f7fd}.upload-progress{height:8px;background:#e6edf5;border-radius:999px;overflow:hidden;margin:10px 0}.upload-progress span{display:block;height:100%;width:0;background:#1174df;transition:.2s}.toast{position:fixed;right:20px;bottom:20px;background:#102a49;color:#fff;padding:12px 16px;border-radius:11px;box-shadow:var(--shadow);z-index:99}
.contacts-layout{display:grid;grid-template-columns:320px 1fr;gap:18px}.contact-form,.contact-list{padding:20px}.contact-row{display:flex;justify-content:space-between;align-items:center;padding:13px 0;border-bottom:1px solid var(--line)}.contact-row:last-child{border-bottom:0}.contact-row div{display:flex;flex-direction:column;gap:4px}.contact-row span{font-size:.8rem;color:var(--muted)}
.thread-list{display:grid;gap:10px}.thread-item{padding:16px;display:block}.thread-item div{display:flex;justify-content:space-between;gap:12px}.thread-item span{font-size:.78rem;color:var(--muted)}.thread-item p{margin:8px 0 0}.health-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.health-card{padding:20px;display:flex;gap:14px;align-items:center}.health-card>span{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;font-weight:900}.health-card.ok>span{background:#e8f8ee;color:#087443}.health-card.bad>span{background:#fff0ef;color:#b42318}.health-card p{margin:3px 0 0;color:var(--muted);font-size:.82rem}

/* PWA / push */
.button-link{border:0;background:transparent;cursor:pointer;font-family:inherit}.install-app-btn{margin-top:10px}.ios-install-help{margin-top:12px;padding:12px 14px;border-radius:11px;background:#eef6ff;color:#204f7f;font-size:.83rem;line-height:1.55;border:1px solid #d5e8fa}.notification-settings{margin:22px 0;padding:20px;border:1px solid var(--line);border-radius:14px;background:#fbfdff}.notification-settings h3{margin:0 0 6px;color:var(--navy)}.notification-actions{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}

/* Responsive: preserve vertical sidebar on mobile, as requested */
@media(max-width:1050px){:root{--sidebar:220px}.search-grid{grid-template-columns:1fr 1fr}.health-grid{grid-template-columns:1fr 1fr}.contacts-layout{grid-template-columns:1fr}.mail-main{grid-template-columns:minmax(0,1fr) 70px}.mail-main .subject{grid-column:1/2}.mail-main .sender{grid-column:1/2}.mail-main .size{grid-column:2;grid-row:1/3;text-align:right}.sidebar-brand img{width:86px;height:86px}.sidebar-brand strong{font-size:1.22rem}.nav-item{font-size:.88rem;padding:12px 10px}.compose-btn{padding:14px 13px}}
@media(max-width:760px){
  :root{--sidebar:clamp(124px,34vw,180px)}
  .app-shell{grid-template-columns:var(--sidebar) minmax(0,1fr)}.sidebar{padding:18px 8px 12px}.sidebar-brand{padding:0 6px 18px;gap:7px}.sidebar-brand img{width:76px;height:76px}.sidebar-brand strong{font-size:1rem}.compose-btn{gap:7px;padding:12px 8px;margin:0 0 16px;border-radius:15px;font-size:.78rem}.compose-btn .nav-icon{width:22px;height:22px}.compose-btn .nav-icon svg{width:21px;height:21px}.mail-nav{gap:3px}.nav-item{grid-template-columns:26px minmax(0,1fr) auto;gap:6px;padding:10px 7px;border-radius:13px;font-size:.75rem}.nav-icon{width:23px;height:23px}.nav-icon svg{width:20px;height:20px}.nav-count{font-size:.58rem;min-width:17px;padding:2px 4px}.sidebar-account{padding:14px 5px 0}.sidebar-email{font-size:.58rem}.sidebar-logout{font-size:.67rem}.content{margin:0;border-radius:24px 0 0 24px;padding:22px 14px;min-height:100vh}.session-warning{left:var(--sidebar);right:0;top:0;border-radius:0 0 12px 12px}.page-head{gap:8px;margin-bottom:16px}.page-head h1{font-size:2rem}.page-head .muted{font-size:.8rem;margin-top:6px}.page-head-actions{gap:6px}.refresh-icon{width:44px;height:44px}.refresh-icon svg{width:22px;height:22px}.refresh-control>span:last-child{font-size:.61rem}.search-toggle{padding:8px 9px;font-size:.66rem}.search-grid{grid-template-columns:1fr}.bulkbar{gap:6px;padding:9px;flex-wrap:wrap}.bulkbar .check-label{font-size:.68rem}.bulkbar select{min-width:0;max-width:118px;padding:8px 6px;font-size:.68rem}.bulkbar .btn{padding:8px 9px;font-size:.68rem}.mail-row{grid-template-columns:22px 22px minmax(0,1fr);gap:4px;padding:11px 7px}.mail-main{grid-template-columns:minmax(0,1fr) auto;gap:3px 6px}.mail-main .sender{grid-column:1/2;font-size:.71rem}.mail-main .subject{grid-column:1/2}.mail-main .subject strong{font-size:.74rem}.mail-main .subject span{font-size:.6rem;white-space:normal}.mail-main .size{grid-column:2;grid-row:1/3;font-size:.6rem;white-space:nowrap}.row-check input{width:15px;height:15px}.star-btn{font-size:.9rem}.search-panel{padding:11px}.empty-state{min-height:430px;padding:35px 12px}.empty-illustration{width:min(220px,92%)}.empty-state h3{font-size:1.25rem}.empty-state p{font-size:.82rem}.compose-card,.settings-card,.message-card,.contact-form,.contact-list{padding:14px;border-radius:15px}.message-card h1{font-size:1.55rem}.message-meta{grid-template-columns:1fr}.message-toolbar{align-items:flex-start}.toolbar-right{justify-content:flex-end}.message-toolbar .btn,.message-actions .btn{padding:8px 9px;font-size:.68rem}.recipient-row{grid-template-columns:1fr}.editor-toolbar{gap:4px}.editor-toolbar button{padding:5px 7px;font-size:.68rem}.rich-editor{min-height:200px}.contacts-layout,.health-grid{grid-template-columns:1fr}.compose-actions{flex-direction:column}.compose-actions .btn{width:100%}.notification-actions{flex-direction:column}.notification-actions .btn{width:100%}
}
@media(max-width:430px){:root{--sidebar:126px}.sidebar{padding-left:6px;padding-right:6px}.sidebar-brand img{width:66px;height:66px}.sidebar-brand strong{font-size:.9rem}.compose-btn{font-size:.72rem;padding:10px 6px}.nav-item{font-size:.68rem;padding:9px 5px;grid-template-columns:22px minmax(0,1fr) auto}.nav-icon{width:20px;height:20px}.nav-icon svg{width:18px;height:18px}.content{padding:18px 9px}.page-head h1{font-size:1.75rem}.search-toggle{display:none}.empty-state{min-height:400px}.bulkbar select{max-width:100px}}

/* ==========================================================================\n   EJSIR Mail V7 — demo-parity UI\n   Visual-only overrides. Mail transport, IMAP/SMTP, MIME and server logic stay untouched.\n   ========================================================================== */
:root{
  --v7-sidebar:#073b78;
  --v7-sidebar-deep:#042b5d;
  --v7-sidebar-bright:#075aa8;
  --v7-accent:#1588ff;
  --v7-accent2:#0a6be4;
  --v7-ink:#081a36;
  --v7-soft:#f3f8ff;
  --v7-line:#e7eef7;
  --v7-sidebar-width:300px;
}
body.app-page{
  background:linear-gradient(155deg,#062f67 0%,#064f99 58%,#0871cf 100%);
  color:var(--v7-ink);
}
.app-shell{
  grid-template-columns:var(--v7-sidebar-width) minmax(0,1fr);
  min-height:100vh;
}
.sidebar{
  width:var(--v7-sidebar-width);
  padding:35px 22px 24px;
  background:
    radial-gradient(circle at 18% 4%,rgba(30,135,255,.23),transparent 30%),
    linear-gradient(160deg,var(--v7-sidebar) 0%,var(--v7-sidebar-deep) 58%,var(--v7-sidebar-bright) 100%);
  box-shadow:inset -1px 0 rgba(255,255,255,.06);
}
.sidebar-brand{
  align-items:flex-start;
  gap:10px;
  padding:0 16px 32px;
}
.sidebar-brand img{
  width:112px;
  height:104px;
  object-fit:contain;
  object-position:left center;
  filter:drop-shadow(0 10px 18px rgba(0,0,0,.18));
}
.sidebar-brand strong{
  color:#fff;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.8rem;
  line-height:1;
  font-weight:700;
  letter-spacing:.005em;
}
.compose-btn{
  margin:0 0 30px;
  min-height:76px;
  border-radius:24px;
  padding:0 22px;
  gap:17px;
  font-size:1.22rem;
  background:linear-gradient(135deg,#1590ff 0%,#0875f1 68%,#0869d9 100%);
  box-shadow:0 17px 36px rgba(0,22,70,.29),inset 0 1px rgba(255,255,255,.2);
}
.compose-btn .nav-icon{width:34px;height:34px}.compose-btn .nav-icon svg{width:31px;height:31px;stroke-width:1.8}
.mail-nav{gap:9px}
.nav-item{
  min-height:68px;
  grid-template-columns:43px minmax(0,1fr) auto;
  gap:15px;
  padding:0 18px;
  border-radius:20px;
  color:#fff;
  font-size:1.05rem;
  font-weight:560;
}
.nav-item:hover{background:rgba(255,255,255,.075)}
.nav-item.active{
  background:linear-gradient(90deg,rgba(65,151,249,.27),rgba(255,255,255,.08));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.05),0 8px 20px rgba(0,20,55,.09);
}
.nav-item.active:before{
  left:-22px;
  top:8px;
  bottom:8px;
  width:7px;
  border-radius:0 9px 9px 0;
  background:#0f90ff;
  box-shadow:0 0 16px rgba(15,144,255,.45);
}
.nav-icon{width:36px;height:36px}.nav-icon svg{width:30px;height:30px;stroke-width:1.75}
.nav-count{
  font-size:.76rem;
  background:rgba(141,202,255,.19);
  min-width:28px;
  padding:5px 8px;
}
.sidebar-account{
  padding:22px 16px 0;
  border-top:1px solid rgba(255,255,255,.12);
}
.sidebar-email{font-size:.73rem;color:#bad6f2;margin-bottom:10px}
.sidebar-logout{font-size:.88rem;padding:8px 0;color:#e7f2ff}
.content{
  margin:0;
  min-height:100vh;
  padding:48px 48px 34px;
  border-radius:32px 0 0 32px;
  background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);
  box-shadow:-14px 0 38px rgba(0,24,70,.10);
}
.page-head{
  align-items:flex-start;
  margin:0 0 24px;
  min-height:160px;
}
.page-head-copy{padding-top:4px}
.page-head .eyebrow{
  display:none;
}
.page-head h1{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  color:#08152c;
  font-size:3.25rem;
  line-height:1;
  font-weight:800;
  letter-spacing:-.035em;
}
.page-head .muted{
  margin:12px 0 20px;
  color:#77869a;
  font-size:1.35rem;
  font-weight:450;
}
.advanced-search-link{
  border:1px solid #e7eef7;
  border-radius:15px;
  background:#f4f8fd;
  color:#46627f;
  padding:9px 13px;
  font-size:.78rem;
  font-weight:650;
  cursor:pointer;
  transition:.16s;
}
.advanced-search-link:hover{background:#ebf4ff;color:#126ed1}
.page-head-actions{
  align-items:flex-start;
  padding-top:3px;
}
.refresh-control{
  position:relative;
  min-width:86px;
  color:#1179ec;
  gap:7px;
}
.refresh-icon{
  width:76px;
  height:76px;
  border-radius:50%;
  background:linear-gradient(145deg,#fbfdff 0%,#eef6ff 100%);
  border:1px solid #e7f0fa;
  box-shadow:0 12px 30px rgba(33,111,205,.16),inset 0 1px #fff;
}
.refresh-icon svg{width:36px;height:36px;stroke-width:2.25}
.refresh-control>span:last-child{
  color:#687a91;
  font-size:.82rem;
  font-weight:600;
  background:#fff;
  border:1px solid #dfe8f2;
  border-radius:10px;
  padding:5px 12px;
  box-shadow:0 4px 12px rgba(20,55,90,.05);
}
.refresh-control.is-refreshing .refresh-icon svg{animation:v7spin .72s linear infinite}
@keyframes v7spin{to{transform:rotate(360deg)}}
.search-panel{
  margin-top:-8px;
  margin-bottom:18px;
  border-radius:20px;
  box-shadow:0 16px 40px rgba(10,49,92,.07);
}
.bulkbar{
  border-radius:20px;
  box-shadow:0 8px 24px rgba(10,49,92,.05);
  padding:14px 18px;
}
.mail-list{
  border-radius:28px;
  border-color:#e6edf5;
  box-shadow:0 18px 46px rgba(10,49,92,.09);
}
.empty-state{
  min-height:660px;
  padding:74px 34px 90px;
}
.empty-illustration{width:min(330px,76%);margin-bottom:18px;opacity:.93}
.empty-state h3{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  font-size:2.1rem;
  line-height:1.1;
  font-weight:800;
  letter-spacing:-.02em;
  color:#08152c;
  margin:10px 0 18px;
}
.empty-state p{
  max-width:540px;
  font-size:1.22rem;
  line-height:1.6;
  color:#75849a;
}
.session-warning{left:var(--v7-sidebar-width);right:0;top:0;border-radius:0 0 14px 14px}

@media(max-width:1100px){
  :root{--v7-sidebar-width:245px}
  .sidebar{width:var(--v7-sidebar-width);padding:28px 16px 20px}
  .sidebar-brand img{width:92px;height:86px}.sidebar-brand strong{font-size:1.48rem}
  .compose-btn{min-height:66px;border-radius:21px;font-size:1.02rem;padding:0 17px}
  .nav-item{min-height:59px;font-size:.95rem;padding:0 14px;grid-template-columns:36px minmax(0,1fr) auto}
  .nav-icon{width:31px;height:31px}.nav-icon svg{width:26px;height:26px}
  .content{padding:38px 34px 28px}
  .page-head h1{font-size:2.8rem}.page-head .muted{font-size:1.13rem}
  .empty-state{min-height:590px}
}

@media(max-width:760px){
  :root{--v7-sidebar-width:clamp(146px,38vw,178px)}
  .app-shell{grid-template-columns:var(--v7-sidebar-width) minmax(0,1fr)}
  .sidebar{width:var(--v7-sidebar-width);padding:24px 10px 16px}
  .sidebar-brand{padding:0 8px 24px;gap:8px}
  .sidebar-brand img{width:88px;height:82px}
  .sidebar-brand strong{font-size:1.1rem;line-height:1.08}
  .compose-btn{min-height:58px;border-radius:18px;padding:0 11px;gap:8px;margin-bottom:22px;font-size:.88rem}
  .compose-btn .nav-icon{width:25px;height:25px}.compose-btn .nav-icon svg{width:23px;height:23px}
  .mail-nav{gap:6px}
  .nav-item{min-height:54px;border-radius:16px;padding:0 9px;grid-template-columns:27px minmax(0,1fr) auto;gap:7px;font-size:.78rem}
  .nav-item.active:before{left:-10px;top:7px;bottom:7px;width:5px}
  .nav-icon{width:25px;height:25px}.nav-icon svg{width:22px;height:22px}
  .nav-count{font-size:.6rem;min-width:20px;padding:3px 5px}
  .sidebar-account{padding:16px 8px 0}.sidebar-email{font-size:.58rem}.sidebar-logout{font-size:.68rem}
  .content{margin:0;padding:32px 16px 24px;border-radius:28px 0 0 28px}
  .page-head{min-height:135px;gap:10px;margin-bottom:14px}
  .page-head h1{font-size:2.1rem;letter-spacing:-.035em}
  .page-head .muted{font-size:.92rem;margin:9px 0 13px}
  .advanced-search-link{font-size:.62rem;padding:7px 8px;border-radius:11px}
  .page-head-actions{padding-top:0}
  .refresh-control{min-width:58px;gap:5px}
  .refresh-icon{width:54px;height:54px}.refresh-icon svg{width:27px;height:27px}
  .refresh-control>span:last-child{font-size:.62rem;padding:3px 8px;border-radius:8px}
  .search-panel{padding:11px;border-radius:16px}
  .bulkbar{padding:9px;gap:6px;border-radius:15px}
  .mail-list{border-radius:20px}
  .empty-state{min-height:550px;padding:40px 10px 58px}
  .empty-illustration{width:min(250px,92%);margin-bottom:10px}
  .empty-state h3{font-size:1.45rem;margin:8px 0 12px}
  .empty-state p{font-size:.93rem;line-height:1.55}
  .session-warning{left:var(--v7-sidebar-width)}
}

@media(max-width:440px){
  :root{--v7-sidebar-width:148px}
  .sidebar{padding:22px 8px 14px}
  .sidebar-brand img{width:78px;height:72px}.sidebar-brand strong{font-size:1rem}
  .compose-btn{font-size:.8rem;padding:0 9px;min-height:54px}
  .nav-item{font-size:.72rem;padding:0 8px;min-height:50px;grid-template-columns:25px minmax(0,1fr) auto}
  .content{padding:28px 12px 20px}
  .page-head h1{font-size:1.9rem}.page-head .muted{font-size:.83rem}
  .refresh-icon{width:50px;height:50px}.refresh-icon svg{width:25px;height:25px}
  .empty-state{min-height:520px}.empty-state h3{font-size:1.32rem}.empty-state p{font-size:.86rem}
}

/* ==========================================================
   EJSIR MAIL V8 — DEMO-PARITY VISUAL LAYER
   Backend/mail transport remains unchanged.
   ========================================================== */
:root{
  --v8-navy-1:#062f69;
  --v8-navy-2:#043c7d;
  --v8-navy-3:#075aa9;
  --v8-blue:#1489ff;
  --v8-blue-deep:#0873ea;
  --v8-white:#ffffff;
  --v8-ink:#07172f;
  --v8-muted:#74839a;
  --v8-soft:#f7fbff;
  --v8-line:#e7eef7;
  --v8-frame:16px;
  --v8-sidebar:300px;
}
html,body{min-height:100%;background:var(--v8-navy-1)}
body.app-page{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(circle at 13% 8%,rgba(37,143,255,.28),transparent 28%),
    linear-gradient(155deg,#062d63 0%,#043c7c 48%,#075ba8 100%);
  color:var(--v8-ink);
  overflow-x:hidden;
}
.app-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:var(--v8-sidebar) minmax(0,1fr);
  gap:0;
  padding:var(--v8-frame);
  background:transparent;
  align-items:stretch;
}
.sidebar{
  position:sticky;
  top:var(--v8-frame);
  align-self:start;
  width:var(--v8-sidebar);
  height:calc(100vh - (var(--v8-frame) * 2));
  padding:30px 18px 22px;
  border-radius:34px 0 0 34px;
  overflow:auto;
  background:
    radial-gradient(circle at 16% 3%,rgba(36,143,255,.24),transparent 31%),
    linear-gradient(165deg,#073d80 0%,#052f68 58%,#07539a 100%);
  box-shadow:inset -1px 0 rgba(255,255,255,.06);
  color:#fff;
  display:flex;
  flex-direction:column;
  z-index:20;
}
.sidebar-brand{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
  padding:0 18px 28px;
}
.sidebar-brand img{
  width:118px;
  height:112px;
  display:block;
  object-fit:contain;
  object-position:left center;
  filter:drop-shadow(0 11px 20px rgba(0,0,0,.16));
}
.sidebar-brand strong{
  margin-top:-2px;
  color:#fff;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  font-size:1.78rem;
  line-height:1;
  font-weight:800;
  letter-spacing:-.02em;
}
.compose-btn{
  min-height:76px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:17px;
  margin:0 0 29px;
  padding:0 22px;
  border-radius:24px;
  background:linear-gradient(135deg,#188fff 0%,#0879f5 64%,#0768dc 100%);
  color:#fff;
  font-size:1.18rem;
  font-weight:800;
  box-shadow:0 17px 35px rgba(0,25,76,.30),inset 0 1px rgba(255,255,255,.20);
}
.compose-btn:hover{transform:translateY(-1px);box-shadow:0 20px 40px rgba(0,25,76,.34)}
.compose-btn .nav-icon{width:35px;height:35px}.compose-btn .nav-icon svg{width:31px;height:31px;stroke-width:1.85}
.mail-nav{display:flex;flex-direction:column;gap:7px}
.nav-item{
  position:relative;
  min-height:67px;
  display:grid;
  grid-template-columns:43px minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
  padding:0 18px;
  border-radius:20px;
  color:#fff;
  font-size:1.02rem;
  font-weight:560;
  transition:background .16s ease,transform .16s ease;
}
.nav-item:hover{background:rgba(255,255,255,.07);transform:translateX(1px)}
.nav-item.active{
  background:linear-gradient(90deg,rgba(65,154,255,.28),rgba(255,255,255,.08));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.055),0 9px 22px rgba(0,20,60,.08);
}
.nav-item.active:before{
  content:"";
  position:absolute;
  left:-18px;
  top:8px;
  bottom:8px;
  width:7px;
  border-radius:0 9px 9px 0;
  background:#1190ff;
  box-shadow:0 0 17px rgba(17,144,255,.48);
}
.nav-icon{display:grid;place-items:center;width:36px;height:36px;color:currentColor}
.nav-icon svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nav-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nav-count{font-size:.75rem;min-width:28px;padding:5px 8px;border-radius:999px;text-align:center;background:rgba(143,204,255,.18);color:#fff}
.nav-count:empty{display:none}
.sidebar-account{margin-top:auto;padding:22px 16px 0;border-top:1px solid rgba(255,255,255,.12)}
.sidebar-email{font-size:.73rem;color:#c1dcf5;margin-bottom:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-logout{display:flex;align-items:center;gap:9px;color:#ecf5ff;font-size:.87rem;padding:8px 0}

.content{
  min-width:0;
  min-height:calc(100vh - (var(--v8-frame) * 2));
  margin:0;
  padding:42px 44px 34px;
  border-radius:0 34px 34px 0;
  background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);
  box-shadow:-15px 0 42px rgba(0,25,72,.11),0 18px 44px rgba(0,25,72,.09);
  overflow-x:hidden;
}
.page-head{
  min-height:156px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  margin:0 0 20px;
}
.page-head-copy{padding-top:4px;min-width:0}
.page-head .eyebrow{display:none}
.page-head h1{
  margin:0;
  color:#07162d;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  font-size:3.15rem;
  line-height:1;
  font-weight:830;
  letter-spacing:-.045em;
}
.page-head .muted{margin:12px 0 17px;color:#77869b;font-size:1.28rem;font-weight:450}
.advanced-search-link{
  border:1px solid #e5edf7;
  border-radius:13px;
  background:#f5f9fe;
  color:#597088;
  padding:8px 12px;
  font-size:.74rem;
  font-weight:650;
  cursor:pointer;
}
.advanced-search-link:hover{background:#eef6ff;color:#136fd2}
.page-head-actions{display:flex;align-items:flex-start;justify-content:flex-end;padding-top:0}
.refresh-control{
  appearance:none;
  border:0;
  background:transparent;
  padding:0;
  color:#117bf1;
  min-width:90px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  cursor:pointer;
}
.refresh-icon{
  width:76px;
  height:76px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:linear-gradient(145deg,#fbfdff 0%,#edf6ff 100%);
  border:1px solid #e5effa;
  box-shadow:0 13px 30px rgba(24,104,203,.17),inset 0 1px #fff;
}
.refresh-icon svg{width:36px;height:36px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.refresh-control>span:last-child{
  color:#667a93;
  font-size:.82rem;
  font-weight:600;
  line-height:1;
  padding:6px 12px;
  background:#fff;
  border:1px solid #dfe8f3;
  border-radius:10px;
  box-shadow:0 4px 13px rgba(20,55,90,.05);
}
.refresh-control:hover .refresh-icon{transform:translateY(-1px);box-shadow:0 16px 34px rgba(24,104,203,.21),inset 0 1px #fff}
.refresh-control.is-refreshing .refresh-icon svg{animation:v8spin .72s linear infinite}
@keyframes v8spin{to{transform:rotate(360deg)}}

.search-panel{margin:-8px 0 17px;border-radius:21px;box-shadow:0 14px 36px rgba(10,49,92,.07)}
.bulkbar{border-radius:20px;padding:14px 18px;box-shadow:0 8px 24px rgba(10,49,92,.05)}
.mail-list{border-radius:28px;border-color:#e6edf5;box-shadow:0 18px 48px rgba(10,49,92,.09);overflow:hidden}
.mail-row{background:#fff;border-bottom:1px solid #edf2f7;transition:.15s}
.mail-row:hover{background:#f8fbff}.mail-row:last-child{border-bottom:0}
.mail-row.unread{background:#f9fcff}
.empty-state{min-height:650px;padding:74px 34px 92px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.empty-illustration{width:min(330px,76%);margin:0 auto 18px;opacity:.94}
.empty-state h3{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;font-size:2.05rem;line-height:1.1;font-weight:820;letter-spacing:-.025em;color:#08152c;margin:10px 0 18px}
.empty-state p{max-width:540px;font-size:1.18rem;line-height:1.6;color:#75849a;margin:0}
.session-warning{left:calc(var(--v8-sidebar) + var(--v8-frame));right:var(--v8-frame);top:var(--v8-frame);border-radius:0 0 14px 14px}

/* Keep forms/cards consistent with the demo surface */
.card{background:#fff;border:1px solid #e3ebf4;box-shadow:0 14px 36px rgba(10,49,92,.07)}
.btn.primary{background:linear-gradient(135deg,#168aff,#0b6fe8);color:#fff}.btn.secondary{background:#eef6ff;color:#164b83}
input,textarea,select{background:#fff;border-color:#d7e2ef}

@media(max-width:1180px){
  :root{--v8-sidebar:250px;--v8-frame:12px}
  .sidebar{padding:27px 15px 19px}.sidebar-brand{padding:0 12px 25px}.sidebar-brand img{width:100px;height:96px}.sidebar-brand strong{font-size:1.48rem}
  .compose-btn{min-height:68px;border-radius:21px;font-size:1.02rem;padding:0 17px}
  .nav-item{min-height:60px;font-size:.94rem;padding:0 14px;grid-template-columns:36px minmax(0,1fr) auto;gap:11px}.nav-icon{width:31px;height:31px}.nav-icon svg{width:26px;height:26px}
  .content{padding:38px 34px 28px}.page-head h1{font-size:2.8rem}.page-head .muted{font-size:1.12rem}.empty-state{min-height:590px}
}
@media(max-width:760px){
  :root{--v8-sidebar:clamp(145px,38vw,178px);--v8-frame:8px}
  .app-shell{grid-template-columns:var(--v8-sidebar) minmax(0,1fr);padding:var(--v8-frame)}
  .sidebar{top:var(--v8-frame);width:var(--v8-sidebar);height:calc(100vh - (var(--v8-frame) * 2));padding:22px 9px 14px;border-radius:28px 0 0 28px}
  .sidebar-brand{padding:0 8px 22px;gap:8px}.sidebar-brand img{width:84px;height:80px}.sidebar-brand strong{font-size:1.04rem}
  .compose-btn{min-height:56px;border-radius:18px;padding:0 10px;gap:8px;margin-bottom:20px;font-size:.84rem}.compose-btn .nav-icon{width:25px;height:25px}.compose-btn .nav-icon svg{width:23px;height:23px}
  .mail-nav{gap:5px}.nav-item{min-height:51px;border-radius:16px;padding:0 8px;grid-template-columns:26px minmax(0,1fr) auto;gap:7px;font-size:.76rem}.nav-item.active:before{left:-9px;top:6px;bottom:6px;width:5px}.nav-icon{width:24px;height:24px}.nav-icon svg{width:21px;height:21px}.nav-count{font-size:.58rem;min-width:19px;padding:3px 5px}
  .sidebar-account{padding:14px 7px 0}.sidebar-email{font-size:.56rem}.sidebar-logout{font-size:.65rem}
  .content{min-height:calc(100vh - (var(--v8-frame) * 2));padding:28px 14px 20px;border-radius:0 28px 28px 0}
  .page-head{min-height:132px;gap:9px;margin-bottom:12px}.page-head h1{font-size:2.02rem}.page-head .muted{font-size:.88rem;margin:9px 0 11px}.advanced-search-link{font-size:.58rem;padding:6px 7px;border-radius:10px}.page-head-actions{padding-top:0}
  .refresh-control{min-width:56px;gap:4px}.refresh-icon{width:52px;height:52px}.refresh-icon svg{width:26px;height:26px}.refresh-control>span:last-child{font-size:.58rem;padding:4px 7px;border-radius:8px}
  .search-panel{padding:10px;border-radius:16px}.bulkbar{padding:9px;gap:6px;border-radius:15px}.mail-list{border-radius:20px}.empty-state{min-height:535px;padding:42px 9px 58px}.empty-illustration{width:min(245px,92%);margin-bottom:8px}.empty-state h3{font-size:1.42rem;margin:8px 0 12px}.empty-state p{font-size:.9rem;line-height:1.55}.session-warning{left:calc(var(--v8-sidebar) + var(--v8-frame));right:var(--v8-frame);top:var(--v8-frame)}
}
@media(max-width:440px){
  :root{--v8-sidebar:145px;--v8-frame:6px}
  .sidebar{padding:20px 7px 12px;border-radius:25px 0 0 25px}.sidebar-brand img{width:76px;height:72px}.sidebar-brand strong{font-size:.95rem}.compose-btn{font-size:.77rem;padding:0 8px;min-height:52px}.nav-item{font-size:.69rem;padding:0 7px;min-height:48px;grid-template-columns:24px minmax(0,1fr) auto}.content{padding:25px 11px 18px;border-radius:0 25px 25px 0}.page-head h1{font-size:1.82rem}.page-head .muted{font-size:.8rem}.refresh-icon{width:48px;height:48px}.refresh-icon svg{width:24px;height:24px}.empty-state{min-height:500px}.empty-state h3{font-size:1.3rem}.empty-state p{font-size:.83rem}
}


/* ==========================================================================\n   EJSIR Mail V9 — final demo-parity layer\n   Backend mail transport is untouched.\n   ========================================================================== */
:root{
  --v9-navy:#052f66;
  --v9-navy-deep:#032550;
  --v9-navy-bright:#07569e;
  --v9-blue:#1588ff;
  --v9-blue2:#0872e9;
  --v9-surface:#ffffff;
  --v9-soft:#f4f8fd;
  --v9-line:#e5edf6;
  --v9-ink:#08182f;
  --v9-muted:#78879b;
  --v9-frame:12px;
  --v9-sidebar:292px;
}
html,body{background:#052f66!important}
body.app-page{
  background:radial-gradient(circle at 13% 6%,rgba(33,139,255,.27),transparent 28%),linear-gradient(155deg,var(--v9-navy) 0%,var(--v9-navy-deep) 57%,var(--v9-navy-bright) 100%)!important;
  color:var(--v9-ink);
}
.app-shell{
  grid-template-columns:var(--v9-sidebar) minmax(0,1fr)!important;
  padding:var(--v9-frame)!important;
  min-height:100vh;
  gap:0!important;
}
.sidebar{
  width:var(--v9-sidebar)!important;
  height:calc(100vh - (var(--v9-frame)*2))!important;
  top:var(--v9-frame)!important;
  padding:28px 18px 20px!important;
  border-radius:34px 0 0 34px!important;
  background:radial-gradient(circle at 16% 3%,rgba(39,145,255,.26),transparent 31%),linear-gradient(165deg,#073e80 0%,#052d63 61%,#0759a6 100%)!important;
  box-shadow:inset -1px 0 rgba(255,255,255,.07)!important;
}
.sidebar-brand{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:10px!important;padding:0 18px 26px!important}
.sidebar-brand img{width:116px!important;height:110px!important;object-fit:contain!important;object-position:left center!important;filter:drop-shadow(0 12px 20px rgba(0,0,0,.18))!important}
.sidebar-brand strong{color:#fff!important;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif!important;font-size:1.75rem!important;line-height:1!important;font-weight:800!important;letter-spacing:-.02em!important}
.compose-btn{min-height:76px!important;border-radius:24px!important;margin:0 0 28px!important;padding:0 22px!important;gap:17px!important;background:linear-gradient(135deg,var(--v9-blue) 0%,var(--v9-blue2) 72%,#0663d1 100%)!important;color:#fff!important;font-size:1.16rem!important;font-weight:800!important;box-shadow:0 16px 34px rgba(0,21,70,.31),inset 0 1px rgba(255,255,255,.2)!important}
.mail-nav{display:flex!important;flex-direction:column!important;gap:8px!important}
.nav-item{min-height:64px!important;grid-template-columns:42px minmax(0,1fr) auto!important;gap:13px!important;padding:0 17px!important;border-radius:19px!important;color:#fff!important;background:rgba(255,255,255,.025)!important;border:1px solid rgba(255,255,255,.025)!important;font-size:1rem!important;font-weight:560!important}
.nav-item:hover{background:rgba(255,255,255,.075)!important;border-color:rgba(255,255,255,.05)!important}
.nav-item.active{background:linear-gradient(90deg,rgba(62,153,255,.28),rgba(255,255,255,.09))!important;border-color:rgba(255,255,255,.06)!important;box-shadow:0 8px 22px rgba(0,20,60,.1)!important}
.nav-item.active:before{left:-18px!important;top:8px!important;bottom:8px!important;width:7px!important;background:#1090ff!important;box-shadow:0 0 16px rgba(16,144,255,.45)!important}
.nav-icon{width:35px!important;height:35px!important;color:#fff!important}.nav-icon svg{width:29px!important;height:29px!important;stroke-width:1.8!important}
.nav-count{font-size:.74rem!important;min-width:28px!important;padding:5px 8px!important;background:rgba(153,210,255,.18)!important;color:#fff!important}
.sidebar-account{margin-top:auto!important;padding:20px 16px 0!important;border-top:1px solid rgba(255,255,255,.12)!important}.sidebar-email{color:#c1dcf5!important}.sidebar-logout{color:#eef6ff!important}
.content{min-height:calc(100vh - (var(--v9-frame)*2))!important;padding:38px 42px 32px!important;border-radius:0 34px 34px 0!important;background:linear-gradient(180deg,#fff 0%,#fbfdff 100%)!important;box-shadow:-15px 0 42px rgba(0,25,72,.12),0 18px 44px rgba(0,25,72,.10)!important;overflow-x:hidden!important}
.page-head{position:relative!important;min-height:156px!important;padding-right:104px!important;margin-bottom:18px!important;display:block!important}
.page-head-copy{padding-top:4px!important}.page-head .eyebrow{display:none!important}
.page-head h1{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif!important;font-size:3.15rem!important;font-weight:830!important;letter-spacing:-.045em!important;line-height:1!important;color:#07162d!important}
.page-head .muted{margin:12px 0 16px!important;font-size:1.25rem!important;color:var(--v9-muted)!important}
.advanced-search-link{display:inline-flex!important;align-items:center!important;background:#f4f8fd!important;color:#4f6781!important;border:1px solid #e4edf7!important;border-radius:13px!important;padding:8px 12px!important;font-size:.74rem!important;font-weight:650!important}
.page-head-actions{position:absolute!important;right:0!important;top:0!important;display:block!important;z-index:5!important}
.refresh-control{display:flex!important;visibility:visible!important;opacity:1!important;flex-direction:column!important;align-items:center!important;gap:7px!important;width:88px!important;min-width:88px!important;color:#117bf1!important;text-decoration:none!important;cursor:pointer!important}
.refresh-icon{display:grid!important;place-items:center!important;width:74px!important;height:74px!important;border-radius:50%!important;background:linear-gradient(145deg,#fbfdff 0%,#edf6ff 100%)!important;border:1px solid #e4eef9!important;box-shadow:0 13px 30px rgba(24,104,203,.17),inset 0 1px #fff!important}
.refresh-icon svg{width:35px!important;height:35px!important;fill:none!important;stroke:currentColor!important;stroke-width:2.2!important;stroke-linecap:round!important;stroke-linejoin:round!important}
.refresh-control>span:last-child{display:block!important;color:#687b92!important;font-size:.8rem!important;font-weight:600!important;line-height:1!important;padding:6px 11px!important;background:#fff!important;border:1px solid #dfe8f3!important;border-radius:10px!important;box-shadow:0 4px 12px rgba(20,55,90,.05)!important}
.search-panel{border-radius:20px!important}.bulkbar{border-radius:20px!important;background:#fff!important}.mail-list{background:transparent!important;border:0!important;box-shadow:none!important;display:flex!important;flex-direction:column!important;gap:12px!important;overflow:visible!important}
.mail-row{background:#fff!important;border:1px solid #e3ebf4!important;border-radius:22px!important;box-shadow:0 12px 30px rgba(10,49,92,.08)!important;overflow:hidden!important}.mail-row:hover{background:#fafdff!important;transform:translateY(-1px)!important}.mail-row.unread{background:#fff!important}
.empty-state{background:#fff!important;border:1px solid #e3ebf4!important;border-radius:28px!important;box-shadow:0 18px 48px rgba(10,49,92,.09)!important;min-height:630px!important;padding:70px 34px 88px!important}
.empty-state h3{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif!important;font-size:2rem!important;font-weight:820!important;color:#08152c!important}.empty-state p{font-size:1.14rem!important;color:#77869a!important}
.compose-card,.settings-card,.message-card,.contact-form,.contact-list,.thread-item,.health-card{border-radius:24px!important;border:1px solid #e3ebf4!important;background:#fff!important;box-shadow:0 16px 42px rgba(10,49,92,.08)!important}
.message-card{padding:28px!important}.message-toolbar{gap:12px!important}.message-toolbar .btn,.message-actions .btn{border-radius:13px!important}.back-btn{min-width:88px!important;text-align:center!important}.message-meta>div{background:#f8fbff!important;border:1px solid #e7eef6!important;border-radius:15px!important;padding:14px!important}.message-body,.html-frame{border-radius:18px!important;border:1px solid #e5edf5!important;background:#fff!important}.attachment-card{border-radius:16px!important;background:#f8fbff!important;border:1px solid #e5edf5!important}
.contact-form,.contact-list,.settings-card,.compose-card{padding:26px!important}.contact-row{border:1px solid #e7eef6!important;border-radius:16px!important;background:#fbfdff!important;margin-bottom:10px!important;padding:14px!important}
.btn{border-radius:13px!important}.btn.primary{background:linear-gradient(135deg,#168aff,#0b6fe8)!important;color:#fff!important}.btn.secondary{background:#eef6ff!important;color:#164b83!important;border-color:#e0ebf7!important}
input,textarea,select,.rich-editor{border-radius:13px!important;border-color:#d8e3ef!important;background:#fff!important}
.session-warning{left:calc(var(--v9-sidebar) + var(--v9-frame))!important;right:var(--v9-frame)!important;top:var(--v9-frame)!important}
@media(max-width:1180px){:root{--v9-sidebar:245px;--v9-frame:10px}.sidebar{width:var(--v9-sidebar)!important;padding:25px 14px 18px!important}.sidebar-brand img{width:98px!important;height:92px!important}.sidebar-brand strong{font-size:1.45rem!important}.compose-btn{min-height:66px!important;font-size:1rem!important}.nav-item{min-height:58px!important;font-size:.92rem!important;grid-template-columns:35px minmax(0,1fr) auto!important}.content{padding:34px 31px 26px!important}.page-head h1{font-size:2.7rem!important}}
@media(max-width:760px){:root{--v9-sidebar:clamp(145px,38vw,178px);--v9-frame:6px}.app-shell{grid-template-columns:var(--v9-sidebar) minmax(0,1fr)!important;padding:var(--v9-frame)!important}.sidebar{width:var(--v9-sidebar)!important;height:calc(100vh - (var(--v9-frame)*2))!important;top:var(--v9-frame)!important;padding:20px 8px 12px!important;border-radius:27px 0 0 27px!important}.sidebar-brand{padding:0 8px 20px!important}.sidebar-brand img{width:82px!important;height:77px!important}.sidebar-brand strong{font-size:1.03rem!important}.compose-btn{min-height:54px!important;border-radius:18px!important;padding:0 9px!important;gap:7px!important;font-size:.82rem!important;margin-bottom:18px!important}.mail-nav{gap:5px!important}.nav-item{min-height:49px!important;border-radius:15px!important;padding:0 8px!important;grid-template-columns:25px minmax(0,1fr) auto!important;gap:6px!important;font-size:.74rem!important}.nav-item.active:before{left:-8px!important;top:6px!important;bottom:6px!important;width:5px!important}.nav-icon{width:23px!important;height:23px!important}.nav-icon svg{width:20px!important;height:20px!important}.nav-count{font-size:.57rem!important;min-width:18px!important;padding:3px 4px!important}.sidebar-account{padding:13px 7px 0!important}.sidebar-email{font-size:.55rem!important}.sidebar-logout{font-size:.64rem!important}.content{min-height:calc(100vh - (var(--v9-frame)*2))!important;padding:25px 11px 18px!important;border-radius:0 27px 27px 0!important}.page-head{min-height:132px!important;padding-right:64px!important;margin-bottom:10px!important}.page-head h1{font-size:2rem!important}.page-head .muted{font-size:.86rem!important;margin:8px 0 10px!important}.advanced-search-link{font-size:.57rem!important;padding:6px 7px!important}.page-head-actions{right:0!important;top:0!important}.refresh-control{width:56px!important;min-width:56px!important;gap:4px!important}.refresh-icon{width:50px!important;height:50px!important}.refresh-icon svg{width:25px!important;height:25px!important}.refresh-control>span:last-child{font-size:.57rem!important;padding:4px 6px!important;border-radius:8px!important}.bulkbar{padding:9px!important;gap:6px!important}.mail-list{gap:9px!important}.mail-row{border-radius:17px!important}.empty-state{min-height:510px!important;padding:38px 8px 54px!important}.empty-state h3{font-size:1.36rem!important}.empty-state p{font-size:.86rem!important}.compose-card,.settings-card,.message-card,.contact-form,.contact-list{padding:13px!important;border-radius:18px!important}.message-toolbar{align-items:flex-start!important}.toolbar-right{display:flex!important;flex-wrap:wrap!important;justify-content:flex-end!important;gap:6px!important}.message-toolbar .btn,.message-actions .btn{padding:8px 8px!important;font-size:.66rem!important}.session-warning{left:calc(var(--v9-sidebar) + var(--v9-frame))!important;right:var(--v9-frame)!important;top:var(--v9-frame)!important}}
@media(max-width:440px){:root{--v9-sidebar:142px;--v9-frame:5px}.sidebar{padding:18px 6px 10px!important}.sidebar-brand img{width:74px!important;height:70px!important}.sidebar-brand strong{font-size:.92rem!important}.compose-btn{font-size:.75rem!important;min-height:50px!important}.nav-item{font-size:.67rem!important;min-height:46px!important;grid-template-columns:23px minmax(0,1fr) auto!important}.content{padding:23px 9px 16px!important}.page-head h1{font-size:1.78rem!important}.refresh-icon{width:46px!important;height:46px!important}.refresh-icon svg{width:23px!important;height:23px!important}.empty-state{min-height:480px!important}}

/* ==========================================================
   EJSIR MAIL V10 — FINAL DEMO-PARITY LAYER
   ========================================================== */
:root{
  --v10-navy:#06386f;
  --v10-navy-dark:#032953;
  --v10-blue:#1487ff;
  --v10-blue-2:#0b6ee8;
  --v10-panel:#ffffff;
  --v10-soft:#f7fbff;
  --v10-line:#e7eef7;
  --v10-ink:#07172f;
  --v10-muted:#7b8aa0;
  --v10-sidebar:300px;
  --v10-frame:14px;
}
html,body{background:var(--v10-navy)!important}
body.app-page{
  background:
    radial-gradient(circle at 15% 7%,rgba(33,132,255,.30),transparent 28%),
    linear-gradient(155deg,#052d61 0%,#063e7d 52%,#075ea9 100%)!important;
  min-height:100vh!important;
}
.app-shell{
  min-height:100vh!important;
  display:grid!important;
  grid-template-columns:var(--v10-sidebar) minmax(0,1fr)!important;
  gap:0!important;
  padding:var(--v10-frame)!important;
  background:transparent!important;
}
.sidebar{
  position:sticky!important;top:var(--v10-frame)!important;
  width:auto!important;height:calc(100vh - (var(--v10-frame)*2))!important;
  padding:28px 18px 20px!important;
  border-radius:30px 0 0 30px!important;
  background:linear-gradient(180deg,#073f82 0%,#06356e 38%,#042d60 100%)!important;
  color:#fff!important;
  box-shadow:none!important;
}
.sidebar-brand{
  display:flex!important;flex-direction:column!important;align-items:flex-start!important;
  gap:10px!important;padding:2px 12px 28px!important;
}
.sidebar-brand img{
  width:118px!important;height:118px!important;object-fit:contain!important;object-position:left center!important;
  filter:drop-shadow(0 10px 18px rgba(0,0,0,.20))!important;
}
.sidebar-brand strong{
  color:#fff!important;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif!important;
  font-size:1.78rem!important;font-weight:800!important;letter-spacing:-.02em!important;line-height:1!important;
}
.compose-btn{
  min-height:72px!important;margin:0 0 26px!important;padding:0 22px!important;border-radius:22px!important;
  background:linear-gradient(135deg,#188fff,#0b71e7)!important;color:#fff!important;font-size:1.06rem!important;
  box-shadow:0 16px 30px rgba(0,24,72,.30)!important;
}
.mail-nav{gap:7px!important}
.nav-item{
  min-height:64px!important;border-radius:19px!important;padding:0 16px!important;
  grid-template-columns:38px minmax(0,1fr) auto!important;gap:12px!important;
  color:#f4f8ff!important;font-size:1rem!important;font-weight:600!important;
}
.nav-item:hover{background:rgba(255,255,255,.08)!important}
.nav-item.active{
  background:linear-gradient(90deg,rgba(71,154,255,.28),rgba(255,255,255,.09))!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.05)!important;
}
.nav-item.active:before{
  left:-18px!important;top:9px!important;bottom:9px!important;width:7px!important;border-radius:0 10px 10px 0!important;background:#128dff!important;
}
.nav-icon{width:32px!important;height:32px!important}.nav-icon svg{width:28px!important;height:28px!important;stroke-width:1.9!important}
.nav-count{background:rgba(255,255,255,.15)!important;color:#fff!important}
.sidebar-account{border-top:1px solid rgba(255,255,255,.12)!important}.sidebar-email{color:#c7def5!important}.sidebar-logout{color:#eef6ff!important}
.content{
  min-height:calc(100vh - (var(--v10-frame)*2))!important;
  margin:0!important;padding:40px 42px 34px!important;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%)!important;
  border-radius:0 30px 30px 0!important;
  box-shadow:-14px 0 40px rgba(0,24,70,.10),0 16px 44px rgba(0,24,70,.12)!important;
  overflow-x:hidden!important;
}
.page-head{min-height:126px!important;align-items:flex-start!important;margin-bottom:18px!important}
.page-head h1{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif!important;font-size:3.05rem!important;font-weight:800!important;letter-spacing:-.045em!important;color:#07172f!important}
.page-head .muted{font-size:1.08rem!important;color:#79889d!important}
.page-head-actions{padding-top:2px!important}
.refresh-control{
  display:flex!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important;
  align-items:center!important;flex-direction:column!important;gap:7px!important;color:#0c72e7!important;
  min-width:74px!important;text-decoration:none!important;
}
.refresh-icon{
  width:66px!important;height:66px!important;border-radius:50%!important;
  background:linear-gradient(145deg,#ffffff,#eaf4ff)!important;border:1px solid #dceafb!important;
  box-shadow:0 12px 28px rgba(36,111,200,.17)!important;
}
.refresh-icon svg{width:33px!important;height:33px!important;stroke:#0b79ed!important;stroke-width:2.1!important}
.refresh-control>span:last-child{
  display:block!important;background:#fff!important;border:1px solid #dce8f5!important;border-radius:10px!important;
  padding:5px 11px!important;font-size:.78rem!important;color:#6c7b90!important;box-shadow:0 4px 12px rgba(24,74,130,.06)!important;
}
.refresh-control.is-refreshing .refresh-icon svg{animation:v10spin .8s linear infinite}@keyframes v10spin{to{transform:rotate(360deg)}}
.card{border:1px solid #e6edf5!important;box-shadow:0 16px 38px rgba(15,57,103,.08)!important}
.bulkbar,.search-panel{border-radius:22px!important}.mail-list{border-radius:28px!important;overflow:hidden!important}
.mail-row{padding:18px 20px!important}.mail-row:hover{background:#f6faff!important}.mail-row.unread{background:#eef6ff!important}
.message-card,.compose-card,.settings-card,.contact-form,.contact-list{border-radius:28px!important}
.btn{border-radius:15px!important}.btn.primary{background:linear-gradient(135deg,#158cff,#0b6fe8)!important}
.back-btn{position:relative!important;z-index:2!important;pointer-events:auto!important}
.empty-state{min-height:650px!important}.empty-state h3{font-size:2rem!important}.empty-state p{font-size:1.14rem!important}

@media(max-width:1100px){
  :root{--v10-sidebar:245px}
  .sidebar-brand img{width:98px!important;height:98px!important}.sidebar-brand strong{font-size:1.45rem!important}
  .compose-btn{min-height:64px!important;font-size:.96rem!important}.nav-item{min-height:58px!important;font-size:.9rem!important}
  .content{padding:34px 30px 28px!important}.page-head h1{font-size:2.6rem!important}.empty-state{min-height:560px!important}
}
@media(max-width:760px){
  :root{--v10-sidebar:clamp(148px,39vw,182px);--v10-frame:8px}
  .app-shell{grid-template-columns:var(--v10-sidebar) minmax(0,1fr)!important;padding:var(--v10-frame)!important}
  .sidebar{top:var(--v10-frame)!important;height:calc(100vh - (var(--v10-frame)*2))!important;padding:22px 9px 14px!important;border-radius:24px 0 0 24px!important}
  .sidebar-brand{padding:0 8px 20px!important}.sidebar-brand img{width:84px!important;height:84px!important}.sidebar-brand strong{font-size:1.04rem!important}
  .compose-btn{min-height:58px!important;border-radius:18px!important;font-size:.82rem!important;padding:0 11px!important;margin-bottom:20px!important}
  .nav-item{min-height:52px!important;border-radius:15px!important;padding:0 9px!important;font-size:.73rem!important;grid-template-columns:25px minmax(0,1fr) auto!important;gap:7px!important}
  .nav-icon{width:24px!important;height:24px!important}.nav-icon svg{width:21px!important;height:21px!important}.nav-count{font-size:.58rem!important;min-width:18px!important;padding:2px 5px!important}
  .content{min-height:calc(100vh - (var(--v10-frame)*2))!important;padding:26px 14px 22px!important;border-radius:0 24px 24px 0!important}
  .page-head{min-height:120px!important;gap:8px!important}.page-head h1{font-size:2.1rem!important}.page-head .muted{font-size:.84rem!important}
  .refresh-icon{width:54px!important;height:54px!important}.refresh-icon svg{width:27px!important;height:27px!important}.refresh-control>span:last-child{font-size:.62rem!important;padding:4px 8px!important}
  .empty-state{min-height:520px!important;padding:42px 10px!important}.empty-state h3{font-size:1.38rem!important}.empty-state p{font-size:.86rem!important}
  .mail-row{padding:12px 8px!important}.message-card,.compose-card,.settings-card,.contact-form,.contact-list{border-radius:18px!important}
}
@media(max-width:430px){
  :root{--v10-sidebar:142px}
  .sidebar-brand img{width:76px!important;height:76px!important}.sidebar-brand strong{font-size:.96rem!important}
  .compose-btn{font-size:.76rem!important;min-height:54px!important}.nav-item{font-size:.68rem!important;min-height:49px!important}
  .content{padding:22px 10px 18px!important}.page-head h1{font-size:1.85rem!important}
}

/* EJSIR Mail V11: new-mail sound setting */
.sound-toggle{margin:14px 0!important;padding:12px 14px;border:1px solid #e4edf7;border-radius:13px;background:#f8fbff;color:#17395f}.sound-toggle input{width:18px!important;height:18px!important}.notification-settings .muted{margin:4px 0 10px}.notification-settings [data-test-mail-sound]{min-width:130px}


/* EJSIR Mail V12 — account manager + refined brand assets */
.account-total-badge{margin-left:auto;min-width:24px;height:24px;border-radius:999px;background:rgba(255,255,255,.16);display:inline-flex;align-items:center;justify-content:center;font-size:.72rem;font-weight:800;color:#fff;padding:0 7px}
.accounts-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr);gap:22px;align-items:start}
.accounts-card{padding:24px}.account-list{display:grid;gap:12px;margin-top:18px}.account-row{display:flex;align-items:center;gap:14px;border:1px solid #d9e5f4;border-radius:20px;padding:14px;background:#fff;transition:.18s ease}.account-row.active{border-color:#91c6ff;background:#f2f8ff;box-shadow:0 10px 28px rgba(10,82,160,.08)}
.account-avatar{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(145deg,#063570,#0a7dff);color:#fff;font-weight:900;font-size:1.1rem}.account-copy{display:flex;min-width:0;flex:1;flex-direction:column;gap:3px}.account-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-copy span{font-size:.82rem;color:#6d8098}.account-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.account-actions form{margin:0}.active-account-badge{display:inline-flex;align-items:center;padding:8px 12px;border-radius:999px;background:#dff2ff;color:#0667c8;font-weight:800;font-size:.78rem}.section-title-row{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}.section-title-row h2,.accounts-card h2{margin:.2rem 0 .4rem}.sidebar-brand picture{display:block;flex:0 0 auto}.sidebar-brand img{display:block}
@media(max-width:900px){.accounts-layout{grid-template-columns:1fr}.account-actions{width:100%;padding-left:60px}.account-row{flex-wrap:wrap}}
@media(max-width:560px){.account-actions{padding-left:0}.account-actions .btn{min-height:42px}.accounts-card{padding:18px}}
