:root{--brand:#2563eb;--brand2:#0f62fe;--soft:#eef5ff;--dark:#0f172a;--muted:#64748b;--line:#e5e7eb;--bg:#f5f7fb}*{box-sizing:border-box}html,body{width:100%;overflow-x:hidden}body{background:var(--bg);color:#111827;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}.app-shell{display:flex;min-height:100vh;width:100%}.sidebar{width:270px;min-width:270px;background:#fff;border-right:1px solid var(--line);position:sticky;top:0;height:100vh;overflow:auto;padding:18px 14px;z-index:10}.brand{font-weight:900;font-size:20px;color:var(--brand);display:flex;gap:10px;align-items:center;margin-bottom:18px;white-space:nowrap}.compose-pill{display:inline-flex;align-items:center;gap:12px;text-decoration:none;background:#c2e7ff;color:#001d35;padding:14px 18px;border-radius:18px;font-weight:800;margin:0 0 16px 0;box-shadow:0 2px 6px rgba(15,23,42,.08)}.compose-pill:hover{background:#a8d8ff;color:#001d35}.side-nav a,.mobile-menu a,.side-config-toggle,.mobile-config-toggle{display:flex;gap:12px;align-items:center;padding:11px 13px;border-radius:999px;text-decoration:none;color:#334155;margin-bottom:6px;font-weight:650;background:transparent;border:0;width:100%;text-align:left;transition:.18s ease}.side-nav a:hover,.side-nav a.active,.mobile-menu a:hover,.side-config-toggle:hover,.side-config-toggle.active,.side-config-toggle[aria-expanded=true],.mobile-config-toggle:hover{background:#eaf1fb;color:#0b57d0}.side-nav i{width:18px;text-align:center}.side-submenu,.mobile-submenu{margin:2px 0 10px 28px;padding-left:8px;border-left:2px solid #dbeafe}.side-submenu a,.mobile-submenu a{border-radius:14px;font-size:14px;padding:9px 11px;margin-bottom:4px;color:#475569}.side-submenu a:hover,.side-submenu a.active{background:#eaf1fb;color:#0b57d0}.main{flex:1;min-width:0}.topbar{height:72px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:14px;padding:0 24px;position:sticky;top:0;z-index:8}.top-title{max-width:180px}.icon-btn{width:42px;height:42px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;border:0;background:#f1f5f9;color:#334155;text-decoration:none}.icon-btn:hover{background:#e2e8f0;color:#0b57d0}.gmail-search{height:48px;background:#f1f5f9;border-radius:24px;display:flex;align-items:center;gap:10px;padding:0 14px;flex:1;max-width:720px}.gmail-search input{border:0;background:transparent;outline:0;flex:1;min-width:0}.gmail-search button{border:0;background:transparent;color:#64748b}.user-avatar{border:1px solid #dbeafe;border-radius:999px;color:var(--brand);font-weight:700;background:#fff}.content{padding:24px;max-width:100%;overflow-x:hidden}.card,.glass-card{border:0;border-radius:18px;background:#fff;box-shadow:0 8px 28px rgba(15,23,42,.06)}.login-wrap{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#eef5ff,#fff);padding:16px}.form-control,.form-select{max-width:100%;border-radius:10px}.btn{border-radius:10px}.table-responsive{overflow-x:auto}.composer textarea{min-height:280px}.mail-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;margin-bottom:14px}.toolbar-left{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.mailbox-chip{background:#eef5ff;color:#0b57d0;border-radius:999px;padding:5px 10px;font-size:13px;font-weight:700}.toolbar-actions{display:flex;align-items:center;gap:8px;min-width:280px}.toolbar-actions .form-select{max-width:220px}.gmail-list-card{border-radius:18px;background:rgba(255,255,255,.85);box-shadow:0 8px 28px rgba(15,23,42,.05);overflow:hidden}.gmail-mail-row{display:grid;grid-template-columns:58px 44px minmax(0,1fr);align-items:center;gap:10px;text-decoration:none;color:#111827;padding:10px 16px;border-bottom:1px solid rgba(148,163,184,.22);transition:.15s ease}.gmail-mail-row:hover{background:#f8fbff;box-shadow:inset 4px 0 0 #dbeafe}.gmail-mail-row.unread strong,.gmail-mail-row.unread .mail-subject{font-weight:900}.row-check{align-items:center;gap:12px;color:#94a3b8}.sender-avatar{width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#60a5fa;color:#fff;font-weight:900;font-size:18px;flex:0 0 auto}.mail-row-main{min-width:0}.mail-row-top{display:flex;justify-content:space-between;gap:10px;min-width:0}.mail-row-top strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-row-top time{color:#64748b;font-size:13px;white-space:nowrap}.mail-subject{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-preview{color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.mobile-star{color:#94a3b8}.empty-state{min-height:210px;display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:center;color:#64748b}.empty-state i{font-size:42px;color:#cbd5e1}.read-card{padding:24px}.read-head{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap}.clean-mail-body{font-size:16px;line-height:1.65;overflow-wrap:anywhere}.clean-mail-body img{max-width:100%;height:auto}.health-card{position:relative;background:#fff;border-radius:18px;padding:18px;box-shadow:0 8px 28px rgba(15,23,42,.06);min-height:110px;overflow:hidden}.health-card span{color:#64748b;font-weight:700}.health-card b{display:block;font-size:34px;margin-top:8px}.health-card i{position:absolute;right:18px;bottom:14px;color:#dbeafe;font-size:44px}.big-status{font-weight:900;font-size:24px}.health-line,.status-line{display:flex;justify-content:space-between;gap:12px;align-items:center;border-bottom:1px solid #e5e7eb;padding:10px 0}.bimi-note{border:1px solid #bfdbfe;background:#eff6ff;color:#1e3a8a;border-radius:14px;padding:12px 14px;font-size:14px}.config-page,.config-panel-page{max-width:1180px;margin:0 auto;width:100%}.config-title-card,.config-hero{background:linear-gradient(135deg,#fff,#f0f6ff);border:1px solid #e5efff!important}.dns-record-card{border:1px solid var(--line);border-radius:16px;padding:14px;background:#fff;max-width:100%;overflow:hidden;transition:.18s}.dns-record-card:hover{box-shadow:0 12px 30px rgba(15,23,42,.08);transform:translateY(-1px)}.dns-record-card code,.status-line code{white-space:normal;word-break:break-all;color:#db2777}.dns-record-card textarea,.code-area{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}.permission-check{display:inline-flex;align-items:center;gap:6px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:999px;padding:8px 12px;margin:4px;font-weight:700;font-size:13px}.role-box{background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:12px;margin-bottom:8px}.guide-list li{margin-bottom:8px}.mobile-bottom{position:fixed;left:0;right:0;bottom:0;height:68px;background:#202124;color:#fff;display:grid;grid-template-columns:repeat(5,1fr);z-index:20;box-shadow:0 -10px 24px rgba(0,0,0,.16)}.mobile-bottom a{text-decoration:none;color:#e5e7eb;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:11px;gap:2px}.mobile-bottom i{font-size:19px}.mobile-compose-fab{position:relative;top:-18px;background:#3f5f9f!important;color:#fff!important;border-radius:18px;height:58px;margin:0 4px;box-shadow:0 8px 18px rgba(0,0,0,.25)}@media(max-width:991.98px){.desktop-sidebar{display:none}.app-shell{display:block}.topbar{height:66px;padding:0 12px;background:#202124;color:#e5e7eb;border:0}.gmail-search{height:48px;background:#303134;color:#fff}.gmail-search input{color:#fff}.gmail-search input::placeholder{color:#d1d5db}.icon-btn{background:#303134;color:#e5e7eb}.content{padding:14px 12px 86px;background:#111217;min-height:calc(100vh - 66px)}.content h4,.content h3{color:#111827}.gmail-mail-page .mail-toolbar{display:none}.gmail-list-card{background:transparent;box-shadow:none;border-radius:0}.gmail-mail-row{grid-template-columns:52px minmax(0,1fr) 26px;background:#17191f;color:#e5e7eb;border:0;border-radius:12px;margin-bottom:8px;padding:14px 12px}.gmail-mail-row:hover{background:#1f222b;box-shadow:none}.sender-avatar{width:44px;height:44px}.mail-row-top time,.mail-preview{color:#a3a8b2}.mail-subject{color:#e5e7eb}.card,.glass-card{border-radius:16px}.row.g-3>[class*=col-]{width:100%}.status-line,.health-line{align-items:flex-start;flex-direction:column}.offcanvas-body.mobile-menu{padding-bottom:80px}.read-card,.dashboard-page .card,.config-page .card{background:#fff}.toolbar-actions{width:100%}.toolbar-actions .form-select{max-width:none}.config-page,.config-panel-page{max-width:100%}.config-title-card .btn{width:100%}}@media(max-width:575.98px){.content{padding-left:8px;padding-right:8px}.gmail-search{max-width:none}.user-avatar span{display:none}.content h4,.content h3{font-size:20px}.composer textarea{min-height:220px}.alert{font-size:14px}.table{font-size:13px}.permission-check{width:100%;justify-content:flex-start}.mail-row-top{align-items:flex-start}.read-actions .btn{width:100%;margin-bottom:6px}.read-actions{width:100%}.read-card{padding:16px}.dns-record-card .input-group{flex-wrap:nowrap}.dns-record-card .input-group .btn{width:auto}.config-page .btn{min-height:40px}}
.nav-badge{margin-left:auto;background:#ef4444;color:#fff;border-radius:999px;min-width:22px;height:22px;padding:0 7px;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-style:normal;font-weight:900}.notification-btn{position:relative}.notification-btn span{position:absolute;right:-3px;top:-5px;background:#ef4444;color:#fff;border-radius:999px;min-width:20px;height:20px;font-size:11px;font-weight:900;display:flex;align-items:center;justify-content:center}.bottom-badge{position:absolute;top:6px;right:24%;background:#ef4444;color:#fff;border-radius:999px;min-width:20px;height:20px;padding:0 5px;font-size:11px;font-style:normal;font-weight:900}.unread-pill,.new-mail-chip{background:#ef4444;color:#fff;border-radius:999px;padding:3px 8px;font-size:11px;font-weight:900;white-space:nowrap}.gmail-mail-row.unread{background:#f8fbff;box-shadow:inset 4px 0 0 var(--brand)}.code-input{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}.copy-card{border:1px solid #e5e7eb;border-radius:16px;padding:14px;background:#fff}.user-access-card{border-left:4px solid #dbeafe}.role-select{min-width:150px}.mailbox-access-table input[type=checkbox]{width:18px;height:18px}.compose-body{min-height:320px}@media(max-width:991.98px){.gmail-mail-row.unread{background:#1f2937;box-shadow:inset 4px 0 0 #60a5fa}.new-mail-chip{background:#60a5fa}.mailbox-access-table{min-width:820px}.notification-btn{display:inline-flex!important}.nav-badge{margin-left:8px}.bottom-badge{right:18%}}

.star-btn{border:0;background:transparent;color:#94a3b8;padding:0;font-size:18px;line-height:1}.star-btn:hover,.star-btn.on{color:#f59e0b}.row-check .star-btn{display:inline-flex;align-items:center;justify-content:center}.security-note{border:1px solid #bbf7d0;background:#f0fdf4;color:#14532d;border-radius:14px;padding:12px}
html[data-theme="dark"]{--bg:#0f172a;--line:#233047}html[data-theme="dark"] body{background:#0f172a;color:#e5e7eb}html[data-theme="dark"] .sidebar,html[data-theme="dark"] .topbar,html[data-theme="dark"] .card,html[data-theme="dark"] .glass-card,html[data-theme="dark"] .health-card,html[data-theme="dark"] .gmail-list-card,html[data-theme="dark"] .copy-card,html[data-theme="dark"] .dns-record-card{background:#111827;color:#e5e7eb;border-color:#233047}html[data-theme="dark"] .content{background:#0f172a}html[data-theme="dark"] .form-control,html[data-theme="dark"] .form-select,html[data-theme="dark"] textarea{background:#0b1220;color:#e5e7eb;border-color:#334155}html[data-theme="dark"] .text-muted{color:#94a3b8!important}html[data-theme="dark"] .side-nav a,html[data-theme="dark"] .side-config-toggle{color:#d1d5db}html[data-theme="dark"] .side-nav a:hover,html[data-theme="dark"] .side-nav a.active,html[data-theme="dark"] .side-config-toggle.active,html[data-theme="dark"] .side-config-toggle:hover{background:#1e293b;color:#93c5fd}html[data-theme="dark"] .gmail-search,html[data-theme="dark"] .icon-btn{background:#1e293b;color:#e5e7eb}html[data-theme="dark"] .gmail-mail-row{color:#e5e7eb;border-color:#233047}html[data-theme="dark"] .gmail-mail-row:hover,html[data-theme="dark"] .gmail-mail-row.unread{background:#1e293b}
/* Conversation/thread UI update */
.reply-mail-chip{background:#e0f2fe;color:#075985;border-radius:999px;padding:3px 8px;font-size:11px;font-weight:900;white-space:nowrap}.mail-sender-line{display:flex;align-items:center;gap:8px;min-width:0;overflow:hidden}.mail-sender-line strong{min-width:0;max-width:320px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-page{max-width:1180px;margin:0 auto}.conversation-header{padding:18px 20px;display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:16px}.conversation-thread{display:flex;flex-direction:column;gap:14px}.thread-message{display:grid;grid-template-columns:44px minmax(0,1fr);gap:12px;align-items:start}.thread-avatar{width:42px;height:42px;border-radius:50%;background:#60a5fa;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:900}.thread-bubble{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:16px;box-shadow:0 8px 24px rgba(15,23,42,.05)}.sent-message .thread-avatar{background:#2563eb}.sent-message .thread-bubble{background:#f8fbff;border-color:#bfdbfe}.current-message .thread-bubble{box-shadow:0 0 0 3px rgba(37,99,235,.08),0 8px 24px rgba(15,23,42,.06)}.thread-meta{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.thread-meta time{font-size:13px;color:#64748b;white-space:nowrap}.reply-card{padding:18px;margin-top:18px}.reply-file{max-width:420px}.mail-row-top{align-items:center}.mail-row-top time{min-width:112px;text-align:right}@media(max-width:991.98px){.conversation-header{background:#fff}.thread-bubble{background:#17191f;color:#e5e7eb;border-color:#242832}.sent-message .thread-bubble{background:#172033;border-color:#284070}.thread-meta time,.thread-to{color:#a3a8b2!important}.conversation-page .reply-card{background:#fff}.mail-row-top time{min-width:auto;font-size:12px}.mail-sender-line strong{max-width:180px}.reply-mail-chip{background:#1e40af;color:#dbeafe}}@media(max-width:575.98px){.conversation-header{flex-direction:column}.thread-message{grid-template-columns:38px minmax(0,1fr);gap:9px}.thread-avatar{width:36px;height:36px}.thread-bubble{padding:13px;border-radius:14px}.thread-meta{flex-direction:column;gap:2px}.thread-meta time{text-align:left}.reply-file{max-width:100%}.mail-row-top{gap:6px}.mail-sender-line strong{max-width:130px}.mail-row-top time{font-size:11px}}

/* Professional Gmail-style inbox refinement */
.side-section-title{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#64748b;font-weight:900;margin:14px 18px 6px}.nav-badge.muted{background:#e2e8f0;color:#334155}.mailbox-nav-item span{max-width:155px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mobile-section-title{font-size:12px;text-transform:uppercase;color:#94a3b8;font-weight:900;margin:14px 0 6px;padding:0 8px}.inbox-workspace{height:calc(100vh - 92px);display:flex;flex-direction:column;gap:14px;overflow:hidden}.inbox-title-card{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:18px;border-radius:22px}.inbox-title-left{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.professional-mail-card{flex:1 1 auto;overflow:auto;border-radius:22px;background:rgba(255,255,255,.86);box-shadow:0 14px 36px rgba(15,23,42,.08)}.gmail-mail-row{grid-template-columns:58px 46px minmax(0,1fr) 24px}.mail-row-main{min-width:0}.mail-row-top{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:start}.mail-row-meta{display:flex;flex-direction:column;align-items:flex-end;gap:6px;min-width:120px}.mail-status-stack{display:flex;flex-wrap:wrap;gap:5px;justify-content:flex-end}.mailbox-mini-chip{background:#e0f2fe;color:#075985;border-radius:999px;padding:3px 8px;font-size:11px;font-weight:900;white-space:nowrap;max-width:190px;overflow:hidden;text-overflow:ellipsis}.mail-pagination{display:flex;justify-content:space-between;flex:0 0 auto}.empty-state span{display:none}.gmail-content{overflow:hidden}.desktop-sidebar{position:sticky;top:0;height:100vh;overflow:auto}.gmail-main{min-width:0}.gmail-mail-row.unread .mail-sender-line strong,.gmail-mail-row.unread .mail-subject{font-weight:900}.gmail-mail-row:not(.unread){background:#fff}.gmail-mail-row:not(.unread):hover{background:#f8fafc}.gmail-mail-row.unread{background:#eef6ff}.mail-row-top time{font-weight:600;color:#64748b}.mail-subject{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-preview{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gmail-search{max-width:680px}.content.gmail-content{height:calc(100vh - 72px)}@media(max-width:991.98px){.inbox-workspace{height:calc(100vh - 152px);gap:8px}.inbox-title-card{display:none}.professional-mail-card{border-radius:0;background:transparent;box-shadow:none;overflow:auto}.gmail-mail-row{grid-template-columns:50px minmax(0,1fr) 26px;padding:13px 12px}.mail-row-meta{min-width:auto}.mailbox-mini-chip{max-width:150px}.mail-status-stack{gap:4px}.content.gmail-content{height:calc(100vh - 66px);overflow:hidden}.side-section-title{margin-left:10px}}@media(max-width:575.98px){.mail-row-top{grid-template-columns:minmax(0,1fr) auto;gap:8px}.mail-row-meta time{font-size:11px}.mailbox-mini-chip{max-width:115px}.mail-status-stack span{font-size:10px;padding:2px 6px}.mail-sender-line{gap:5px}.mail-preview{font-size:13px}.sender-avatar{width:42px;height:42px}.gmail-mail-row{margin-bottom:7px}.mail-row-meta{align-items:flex-end}}

/* Final layout scroll fix: fixed header, hidden sidebar scrollbar, scrollable work area */
html,body{height:100%;}
body{overflow:hidden;}
.app-shell.gmail-shell{height:100vh;min-height:100vh;overflow:hidden;}
.sidebar.desktop-sidebar{height:100vh;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none;}
.sidebar.desktop-sidebar::-webkit-scrollbar{width:0;height:0;display:none;}
.main.gmail-main{height:100vh;min-width:0;display:flex;flex-direction:column;overflow:hidden;}
.topbar.gmail-topbar{position:sticky;top:0;z-index:25;flex:0 0 auto;background:rgba(255,255,255,.96);backdrop-filter:blur(12px);}
.content.gmail-content{flex:1 1 auto;height:auto!important;min-height:0;overflow-y:auto!important;overflow-x:hidden;padding-bottom:34px;scrollbar-width:thin;}
.content.gmail-content::-webkit-scrollbar{width:8px;}
.content.gmail-content::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px;}
.content.gmail-content::-webkit-scrollbar-track{background:transparent;}
/* Keep inbox page Gmail-like: header/sidebar fixed, mail list scrolls inside card */
.content.gmail-content:has(.inbox-workspace){overflow:hidden!important;}
.inbox-workspace{height:100%;min-height:0;overflow:hidden;}
.professional-mail-card{min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;}
.professional-mail-card::-webkit-scrollbar{width:8px;}
.professional-mail-card::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px;}
.professional-mail-card::-webkit-scrollbar-track{background:transparent;}
.mail-pagination{flex:0 0 auto;padding-bottom:4px;}
/* Config/sidebar dropdown stays clean without visible scrollbar */
.side-submenu{overflow:hidden;}
/* Mobile layout: body can scroll naturally under bottom nav */
@media(max-width:991.98px){
  body{overflow:hidden;}
  .app-shell.gmail-shell{height:100dvh;}
  .main.gmail-main{height:100dvh;}
  .topbar.gmail-topbar{position:sticky;top:0;}
  .content.gmail-content{padding-bottom:92px;}
  .content.gmail-content:has(.inbox-workspace){overflow:hidden!important;}
  .inbox-workspace{height:100%;}
  .professional-mail-card{padding-bottom:8px;}
}
@supports not selector(:has(*)){
  .content.gmail-content{overflow-y:auto!important;}
  .inbox-workspace{max-height:none;}
}
html[data-theme="dark"] .topbar.gmail-topbar{background:rgba(17,24,39,.96);}
/* Timezone + attachment final update */
.mail-attachments{display:flex;flex-wrap:wrap;gap:8px;border-top:1px solid var(--line);padding-top:12px}.attachment-chip{display:inline-flex;align-items:center;gap:8px;max-width:100%;border:1px solid #dbeafe;background:#f8fbff;color:#0b57d0;border-radius:999px;padding:8px 12px;text-decoration:none;font-size:13px;font-weight:700}.attachment-chip span{max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment-chip small{color:#64748b;font-weight:600}.attachment-chip:hover{background:#eaf1fb;color:#0b57d0}.timezone-preview{border:1px solid #dbeafe;background:#f8fbff;border-radius:16px;padding:14px;color:#1e293b}html[data-theme="dark"] .attachment-chip{background:#172033;border-color:#284070;color:#bfdbfe}html[data-theme="dark"] .timezone-preview{background:#172033;border-color:#284070;color:#e5e7eb}

/* Final attachment preview + bulk inbox + backup UX */
.mail-bulk-toolbar{display:flex;align-items:center;gap:10px;padding:10px 14px;background:rgba(255,255,255,.95);border-radius:18px;margin-bottom:8px;box-shadow:0 6px 18px rgba(15,23,42,.05)}
.bulk-action-select{max-width:190px}.select-all-wrap{display:flex;align-items:center;gap:6px;font-weight:700;color:#475569}.attachment-preview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px}.attachment-preview-card{border:1px solid #dbeafe;border-radius:16px;background:#f8fbff;overflow:hidden;padding:10px}.attachment-preview-card img,.attachment-preview-card video{width:100%;max-height:260px;object-fit:contain;border-radius:12px;background:#fff}.attachment-preview-card>div{font-size:13px;font-weight:700;margin-top:8px;display:flex;gap:7px;align-items:center;flex-wrap:wrap}.attachment-preview-card.file-preview{display:flex;align-items:center;justify-content:space-between;gap:12px}.attachment-preview-card.file-preview a{text-decoration:none;color:#0b57d0;display:flex;align-items:center;gap:10px}.attachment-preview-card.file-preview i{font-size:34px}.attachment-preview-card.file-preview b{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment-preview-card.file-preview small{display:block;color:#64748b}.mail-row-main{min-width:0}@media(max-width:991.98px){.mail-bulk-toolbar{background:#17191f;color:#e5e7eb;border-radius:12px;box-shadow:none}.bulk-action-select{max-width:160px}.attachment-preview-card{background:#172033;border-color:#284070}.attachment-preview-card.file-preview a{color:#bfdbfe}.attachment-preview-card small{color:#94a3b8!important}.mobile-bottom{grid-template-columns:repeat(3,1fr)!important}}

/* Final trash/delete + scroll layout polish */
.inbox-workspace{height:auto!important;min-height:calc(100vh - 120px)!important;overflow:visible!important;display:block!important;}
.inbox-title-card{display:none!important;}
.content.gmail-content:has(.inbox-workspace){overflow-y:auto!important;overflow-x:hidden!important;}
.professional-mail-card{overflow:visible!important;min-height:0!important;}
.bulk-mail-form{display:block;}
.clean-bulk-toolbar{display:flex;align-items:center;gap:12px;background:#fff;border-radius:18px;padding:12px 16px;margin-bottom:12px;box-shadow:0 8px 24px rgba(15,23,42,.05);position:sticky;top:0;z-index:2;}
.clean-bulk-toolbar .select-all-wrap{margin:0;}
.clean-bulk-toolbar .btn{min-width:92px;}
.gmail-mail-row{position:relative;}
.gmail-mail-row .row-check input[type=checkbox]{cursor:pointer;}
@media(max-width:991.98px){
  .inbox-workspace{min-height:auto!important;}
  .professional-mail-card{overflow:visible!important;}
  .clean-bulk-toolbar{position:sticky;top:0;margin:0 0 8px 0;border-radius:14px;background:#fff;color:#111827;}
}


/* Final update: action bar inside mail card + right reload/sync */
.professional-mail-card{background:#fff!important;border-radius:22px!important;overflow:visible!important;box-shadow:0 14px 36px rgba(15,23,42,.08)!important;}
.mail-card-actionbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid rgba(148,163,184,.22);background:rgba(255,255,255,.96);border-radius:22px 22px 0 0;position:sticky;top:0;z-index:5;}
.mail-card-action-left{display:flex;align-items:center;gap:10px;min-width:0;}
.mail-card-actionbar .select-all-wrap{display:inline-flex;align-items:center;gap:7px;margin:0;font-weight:800;color:#475569;cursor:pointer;user-select:none;}
.mail-card-actionbar .select-all-wrap input{cursor:pointer;}
.mail-card-actionbar .btn{border-radius:12px;font-weight:700;}
.sync-now-btn{white-space:nowrap;}
.gmail-mail-row:first-of-type{border-top:0;}
@media(max-width:991.98px){
  .professional-mail-card{background:transparent!important;box-shadow:none!important;border-radius:0!important;}
  .mail-card-actionbar{border-radius:14px;background:#fff;color:#111827;margin-bottom:8px;position:sticky;top:0;box-shadow:0 8px 24px rgba(15,23,42,.08);}
  .sync-now-btn{padding-left:10px;padding-right:10px;font-size:12px;}
  .mail-card-actionbar .btn{font-size:12px;}
}
@media(max-width:575.98px){
  .mail-card-actionbar{padding:10px;gap:8px;}
  .mail-card-action-left{gap:7px;}
  .mail-card-actionbar .select-all-wrap span{font-size:13px;}
  .sync-now-btn{max-width:122px;overflow:hidden;text-overflow:ellipsis;}
}
html[data-theme="dark"] .mail-card-actionbar{background:#111827;color:#e5e7eb;border-color:#233047;}
html[data-theme="dark"] .professional-mail-card{background:#111827!important;}

/* FINAL POLISH: bulk action bar must be fully solid and connected under fixed navbar */
.content.gmail-content:has(.inbox-workspace){
  padding-top:0!important;
  background:#f5f7fb!important;
}
.inbox-workspace{
  padding-top:0!important;
  margin-top:0!important;
}
.inbox-workspace .bulk-mail-form,
.inbox-workspace .professional-mail-card{
  margin-top:0!important;
}
.professional-mail-card{
  position:relative!important;
  overflow:hidden!important;
  isolation:isolate!important;
  background:#fff!important;
}
.mail-card-actionbar{
  position:sticky!important;
  top:0!important;
  z-index:80!important;
  margin:0!important;
  border-radius:22px 22px 0 0!important;
  background:#fff!important;
  opacity:1!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  box-shadow:0 10px 22px rgba(15,23,42,.10)!important;
}
.mail-card-actionbar::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:-64px;
  height:64px;
  background:#f5f7fb;
  z-index:-1;
  pointer-events:none;
}
.gmail-mail-row{
  z-index:1;
}
.mail-card-actionbar + .empty-state,
.mail-card-actionbar + .gmail-mail-row{
  border-top:0!important;
}

/* FINAL POLISH: mobile notification bell should not break */
.notification-btn{
  position:relative!important;
  flex:0 0 42px!important;
  min-width:42px!important;
  width:42px!important;
  height:42px!important;
  overflow:visible!important;
}
.notification-btn span{
  position:absolute!important;
  top:-7px!important;
  right:-5px!important;
  min-width:20px!important;
  height:20px!important;
  padding:0 5px!important;
  border-radius:999px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#ef4444!important;
  color:#fff!important;
  font-size:11px!important;
  font-weight:900!important;
  line-height:20px!important;
  border:2px solid #fff!important;
  white-space:nowrap!important;
}
@media(max-width:575.98px){
  .topbar.gmail-topbar{gap:8px!important;padding:0 10px!important;}
  .gmail-search{height:42px!important;min-width:0!important;}
  .notification-btn{flex-basis:38px!important;min-width:38px!important;width:38px!important;height:38px!important;}
  .notification-btn span{top:-6px!important;right:-4px!important;min-width:18px!important;height:18px!important;line-height:18px!important;font-size:10px!important;padding:0 4px!important;}
  .user-avatar{max-width:92px!important;overflow:hidden!important;}
  .mail-card-actionbar::before{top:-56px;height:56px;}
}
html[data-theme="dark"] .content.gmail-content:has(.inbox-workspace),
html[data-theme="dark"] .mail-card-actionbar::before{background:#0f172a!important;}
html[data-theme="dark"] .mail-card-actionbar{background:#111827!important;}
html[data-theme="dark"] .notification-btn span{border-color:#111827!important;}

/* Gmail-style multi recipient chips */
.email-chip-input{min-height:38px;border:1px solid #dee2e6;border-radius:.5rem;background:#fff;display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:5px 8px;cursor:text}
.email-chip-input:focus-within{border-color:#86b7fe;box-shadow:0 0 0 .25rem rgba(13,110,253,.15)}
.email-chip-input input{border:0;outline:0;min-width:190px;flex:1;background:transparent;padding:4px 2px}
.mail-chip{display:inline-flex;align-items:center;gap:6px;background:#e8f0fe;color:#0b57d0;border-radius:999px;padding:4px 8px;font-size:13px;font-weight:700}
.mail-chip button{border:0;background:transparent;color:#0b57d0;font-weight:900;line-height:1;padding:0 2px}
.thread-extra-line{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px}
.forward-inline-btn{border-radius:999px!important;padding:.25rem .7rem!important;font-size:12px!important}
.mailbox-all-nav{font-weight:800!important;color:#0f172a!important}
html[data-theme="dark"] .email-chip-input{background:#111827;border-color:#334155;color:#e5e7eb}
html[data-theme="dark"] .email-chip-input input{color:#e5e7eb}

/* Final advanced compose/reply editor */
.rich-editor-wrap{border:1px solid #d9e2ef;border-radius:16px;background:#fff;overflow:hidden;box-shadow:0 6px 18px rgba(15,23,42,.04)}
.rich-toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:8px 10px;border-bottom:1px solid #e5e7eb;background:#f8fbff}
.rich-toolbar button,.rich-toolbar select,.rich-toolbar input[type=color]{height:32px;border:1px solid #dbeafe;background:#fff;border-radius:9px;color:#0f172a;display:inline-flex;align-items:center;justify-content:center;padding:0 10px;font-size:13px}
.rich-toolbar button:hover{background:#eaf1fb;color:#0b57d0}.rich-toolbar select{min-width:120px}.rich-toolbar input[type=color]{width:40px;padding:3px}.rich-editor{min-height:330px;padding:14px 16px;outline:0;line-height:1.65;font-size:15px;overflow:auto}.reply-rich-editor .rich-editor{min-height:360px}.rich-editor:empty:before{content:attr(data-placeholder);color:#94a3b8}.rich-editor blockquote{border-left:4px solid #bfdbfe;margin:8px 0;padding:6px 12px;color:#475569;background:#f8fbff}.reply-card{max-width:980px;margin:18px auto 0}.reply-file{max-width:420px}.composer .rich-editor{min-height:360px}
html[data-theme="dark"] .rich-editor-wrap{background:#111827;border-color:#334155}html[data-theme="dark"] .rich-toolbar{background:#172033;border-color:#334155}html[data-theme="dark"] .rich-toolbar button,html[data-theme="dark"] .rich-toolbar select,html[data-theme="dark"] .rich-toolbar input[type=color]{background:#111827;border-color:#334155;color:#e5e7eb}html[data-theme="dark"] .rich-editor{color:#e5e7eb}html[data-theme="dark"] .rich-editor blockquote{background:#172033;color:#cbd5e1;border-left-color:#60a5fa}
@media(max-width:575.98px){.rich-editor{min-height:260px}.reply-rich-editor .rich-editor{min-height:300px}.rich-toolbar{gap:4px}.rich-toolbar button{padding:0 8px}.rich-toolbar select{min-width:100px}.reply-card{margin-left:0;margin-right:0}}

/* Toast notifications */
.nx-toast-container{max-width:min(420px, calc(100vw - 24px));}
.nx-toast-container .toast{border-radius:16px; box-shadow:0 18px 50px rgba(15,23,42,.22); overflow:hidden; font-weight:500;}
.nx-toast-container .toast-body{padding:.9rem 1rem; line-height:1.35;}
@media (max-width:575.98px){.nx-toast-container{top:12px!important; left:12px!important; right:12px!important; padding:0!important;}.nx-toast-container .toast{width:100%;}}


/* Final compose field isolation and Gmail-like compose action bar */
.compose-recipient-field{min-height:42px;align-items:center;background:#fff!important;}
.compose-recipient-field input{min-width:220px!important;}
.gmail-compose-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:10px 12px;box-shadow:0 8px 24px rgba(15,23,42,.05)}
.send-main-btn{border-radius:999px!important;padding:.55rem 1.2rem!important;font-weight:800!important;}
.compose-tool-btn{width:36px;height:36px;border:0;border-radius:50%;background:#fff;color:#374151;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;text-decoration:none;transition:.16s ease;font-weight:800;}
.compose-tool-btn:hover{background:#eef5ff;color:#0b57d0;}
.compose-tool-btn input{display:none!important;}
.compose-file-names{max-width:360px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.composer .rich-editor-wrap{border-radius:18px;}
.composer .rich-toolbar{border-radius:18px 18px 0 0;}
@media(max-width:575.98px){.gmail-compose-actions{position:sticky;bottom:62px;z-index:12;border-radius:18px;margin-left:-4px;margin-right:-4px}.compose-tool-btn{width:34px;height:34px}.send-main-btn{padding:.5rem 1rem!important}.compose-file-names{max-width:180px}}
html[data-theme="dark"] .gmail-compose-actions,html[data-theme="dark"] .compose-recipient-field{background:#111827!important;border-color:#334155!important;color:#e5e7eb!important}html[data-theme="dark"] .compose-tool-btn{background:#111827;color:#e5e7eb}html[data-theme="dark"] .compose-tool-btn:hover{background:#172033;color:#bfdbfe}
.mail-sender-address{font-size:12px;color:#64748b;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:340px}.gmail-mail-row.unread .mail-sender-address{font-weight:700;color:#475569}@media(max-width:575.98px){.mail-sender-address{max-width:170px;font-size:11px}}

/* Final inbox thread layout polish: sender email stays under sender name; badges clear after read. */
.gmail-mail-row .mail-identity-block{min-width:0;display:flex;flex-direction:column;gap:2px;overflow:hidden;}
.gmail-mail-row .mail-sender-line{display:flex;align-items:center;gap:8px;min-width:0;overflow:hidden;}
.gmail-mail-row .mail-sender-line strong{display:block;max-width:360px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.gmail-mail-row .mail-sender-address{display:block;font-size:12px;color:#64748b;line-height:1.25;max-width:360px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0;}
.gmail-mail-row.unread .mail-sender-address{font-weight:700;color:#475569;}
.gmail-mail-row .mail-row-top{grid-template-columns:minmax(0,1fr) auto;align-items:start;}
.gmail-mail-row .mail-row-meta{padding-top:1px;}
@media(max-width:575.98px){
  .gmail-mail-row .mail-sender-line strong{max-width:145px;}
  .gmail-mail-row .mail-sender-address{max-width:170px;font-size:11px;}
  .gmail-mail-row .mail-row-meta{min-width:78px;}
}
/* Final shared-inbox thread row polish */
.mail-identity-block{min-width:0;display:flex;flex-direction:column;gap:2px}.mail-sender-line{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}.mail-sender-address{font-size:12px;color:#64748b;line-height:1.25;max-width:360px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mail-row-meta{min-width:110px;text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:5px}.mail-status-stack{display:flex;flex-wrap:wrap;gap:5px;justify-content:flex-end}.replied-by-chip{display:inline-flex;align-items:center;border-radius:999px;background:#eef6ff;color:#0b63ce;font-size:11px;font-weight:700;padding:3px 8px;white-space:nowrap}.gmail-mail-row.unread .mail-sender-address{color:#475569;font-weight:600}.mailbox-mini-chip{font-size:11px;font-weight:700;background:#e0f2fe;color:#0369a1;border-radius:999px;padding:2px 7px;white-space:nowrap}@media(max-width:768px){.mail-row-top{align-items:flex-start}.mail-row-meta{min-width:auto;text-align:left;align-items:flex-start}.mail-sender-address{max-width:220px}.mail-status-stack{justify-content:flex-start}.mailbox-mini-chip{font-size:10px}}

/* Final mobile/tablet responsive polish + persistent login UI update */
@media(max-width:991.98px){
  body{background:#f5f7fb!important;}
  .desktop-sidebar{display:none!important;}
  .app-shell.gmail-shell{display:block!important;min-height:100vh!important;}
  .main.gmail-main{width:100%!important;min-width:0!important;}
  .topbar.gmail-topbar{height:64px!important;position:sticky!important;top:0!important;z-index:1030!important;background:#fff!important;border-bottom:1px solid #e5e7eb!important;box-shadow:0 6px 18px rgba(15,23,42,.06)!important;}
  .content.gmail-content{padding:12px 10px 86px!important;min-height:calc(100vh - 64px)!important;overflow-x:hidden!important;}
  .gmail-search{max-width:none!important;flex:1 1 auto!important;background:#eef5ff!important;}
  .gmail-mobile-menu{width:min(360px,92vw)!important;border:0!important;background:#f5f7fb!important;}
  .gmail-mobile-menu .offcanvas-header.mobile-menu-head{background:linear-gradient(135deg,#2563eb,#0f62fe)!important;color:#fff!important;border-bottom:0!important;padding:18px 18px!important;}
  .gmail-mobile-menu .offcanvas-header h5{font-weight:900!important;display:flex!important;align-items:center!important;gap:10px!important;}
  .gmail-mobile-menu .btn-close{filter:invert(1) grayscale(1) brightness(2)!important;opacity:.9!important;}
  .mobile-menu{padding:14px!important;overflow-y:auto!important;}
  .mobile-menu-profile{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid #e5e7eb;border-radius:20px;padding:12px 14px;margin-bottom:12px;box-shadow:0 10px 24px rgba(15,23,42,.05)}
  .mobile-menu-profile i{font-size:32px;color:#2563eb}.mobile-menu-profile b{display:block;color:#0f172a}.mobile-menu-profile small{display:block;color:#64748b;max-width:230px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mobile-menu a,.mobile-config-toggle{min-height:44px;border-radius:16px!important;margin-bottom:7px!important;background:#fff!important;border:1px solid #e5e7eb!important;color:#334155!important;box-shadow:0 6px 18px rgba(15,23,42,.035)!important;padding:11px 13px!important;}
  .mobile-menu a:hover,.mobile-menu a:active,.mobile-config-toggle:hover,.mobile-config-toggle[aria-expanded=true]{background:#eaf1fb!important;color:#0b57d0!important;border-color:#bfdbfe!important;}
  .mobile-menu a i,.mobile-config-toggle i:first-child{width:22px!important;text-align:center!important;color:#2563eb!important;}
  .mobile-submenu{margin:0 0 10px 12px!important;padding-left:10px!important;border-left:2px solid #bfdbfe!important;}
  .mobile-submenu a{font-size:14px!important;min-height:40px!important;border-radius:13px!important;background:#fff!important;}
  .mobile-section-title{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#64748b;font-weight:900;margin:14px 8px 7px;}
  .mobile-logout{color:#dc2626!important;border-color:#fecaca!important;background:#fff7f7!important;}
  .mobile-bottom.gmail-bottom{position:fixed!important;left:0!important;right:0!important;bottom:0!important;height:64px!important;background:#fff!important;border-top:1px solid #e5e7eb!important;box-shadow:0 -8px 24px rgba(15,23,42,.10)!important;z-index:1040!important;display:grid!important;grid-template-columns:repeat(3,1fr)!important;padding:6px 8px calc(6px + env(safe-area-inset-bottom))!important;}
  .mobile-bottom.gmail-bottom a{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;text-decoration:none!important;color:#475569!important;border-radius:16px!important;position:relative!important;font-weight:800!important;font-size:11px!important;}
  .mobile-bottom.gmail-bottom a:hover,.mobile-bottom.gmail-bottom a:active{background:#eaf1fb!important;color:#0b57d0!important;}
  .mobile-bottom.gmail-bottom i{font-size:20px!important;line-height:1!important;}
  .bottom-badge{position:absolute!important;top:2px!important;right:24%!important;background:#ef4444!important;color:#fff!important;border-radius:999px!important;min-width:18px!important;height:18px!important;font-size:10px!important;font-style:normal!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;border:2px solid #fff!important;}
}
@media(min-width:576px) and (max-width:991.98px){
  .content.gmail-content{padding:16px 18px 88px!important;}
  .gmail-mobile-menu{width:390px!important;}
  .mobile-menu-profile small{max-width:280px;}
}
html[data-theme="dark"] body{background:#0f172a!important;}
@media(max-width:991.98px){
  html[data-theme="dark"] .topbar.gmail-topbar,html[data-theme="dark"] .mobile-bottom.gmail-bottom{background:#111827!important;border-color:#233047!important;color:#e5e7eb!important;}
  html[data-theme="dark"] .gmail-mobile-menu{background:#0f172a!important;}
  html[data-theme="dark"] .mobile-menu-profile,html[data-theme="dark"] .mobile-menu a,html[data-theme="dark"] .mobile-config-toggle,html[data-theme="dark"] .mobile-submenu a{background:#111827!important;border-color:#233047!important;color:#e5e7eb!important;}
  html[data-theme="dark"] .mobile-menu-profile b{color:#f8fafc!important;} html[data-theme="dark"] .mobile-menu-profile small,html[data-theme="dark"] .mobile-section-title{color:#94a3b8!important;}
  html[data-theme="dark"] .mobile-menu a:hover,html[data-theme="dark"] .mobile-config-toggle:hover,html[data-theme="dark"] .mobile-config-toggle[aria-expanded=true],html[data-theme="dark"] .mobile-bottom.gmail-bottom a:hover{background:#172033!important;color:#bfdbfe!important;border-color:#334155!important;}
}


/* INSTANT PIPE LIVE MOBILE FIX: mobile/tablet keeps clean light Gmail-style colors and full menu access */
@media(max-width:991.98px){
  html[data-theme="light"] body,
  html[data-theme="light"] .gmail-mobile-menu{background:#f5f7fb!important;color:#0f172a!important;}
  html[data-theme="light"] .topbar.gmail-topbar,
  html[data-theme="light"] .mobile-bottom.gmail-bottom,
  html[data-theme="light"] .mobile-menu-profile,
  html[data-theme="light"] .mobile-menu a,
  html[data-theme="light"] .mobile-config-toggle,
  html[data-theme="light"] .mobile-submenu a{background:#fff!important;color:#334155!important;border-color:#e5e7eb!important;}
  .mobile-menu{max-height:calc(100vh - 72px)!important;overflow-y:auto!important;padding-bottom:90px!important;}
  .mobile-submenu.show{display:block!important;}
  .mobile-submenu a{display:flex!important;align-items:center!important;gap:10px!important;}
  .gmail-content{background:#f5f7fb!important;}
}
.nx-live-toast-container .toast{border-radius:16px;box-shadow:0 18px 40px rgba(15,23,42,.22);}

.nx-attachment-list{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-left:4px}.nx-attachment-chip{display:inline-flex;align-items:center;gap:6px;max-width:240px;padding:7px 9px;border:1px solid #dbeafe;background:#eff6ff;color:#1d4ed8;border-radius:999px;font-size:13px;font-weight:650}.nx-attachment-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nx-attachment-chip small{color:#64748b;font-weight:500}.nx-attachment-remove{border:0;background:#dbeafe;color:#1e40af;width:20px;height:20px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:16px;line-height:1}.nx-attachment-remove:hover{background:#bfdbfe}.attachment-picker-btn{cursor:pointer}.reply-card .nx-attachment-list{flex:1 1 260px}.read-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}@media(max-width:575.98px){.nx-attachment-list{width:100%;margin-left:0}.nx-attachment-chip{max-width:100%}.reply-card .btn{width:100%}}


/* Smart recipient search dropdown */
.email-chip-input{position:relative;}
.nx-recipient-suggestions{display:none;position:absolute;left:12px;right:12px;top:calc(100% + 6px);z-index:1050;background:#fff;border:1px solid #dfe3eb;border-radius:14px;box-shadow:0 16px 40px rgba(15,23,42,.16);padding:6px;max-height:260px;overflow:auto;}
.nx-recipient-suggestions.show{display:block;}
.nx-recipient-suggestion-item{width:100%;border:0;background:transparent;text-align:left;border-radius:10px;padding:9px 10px;display:flex;flex-direction:column;gap:2px;color:#111827;}
.nx-recipient-suggestion-item:hover,.nx-recipient-suggestion-item:focus{background:#eef4ff;outline:none;}
.nx-suggestion-name{font-weight:700;font-size:.92rem;line-height:1.15;}
.nx-suggestion-email{font-size:.78rem;color:#64748b;line-height:1.1;}
html[data-theme="dark"] .nx-recipient-suggestions{background:#111827;border-color:#334155;box-shadow:0 16px 40px rgba(0,0,0,.35)}
html[data-theme="dark"] .nx-recipient-suggestion-item{color:#e5e7eb} html[data-theme="dark"] .nx-recipient-suggestion-item:hover{background:#1e293b} html[data-theme="dark"] .nx-suggestion-email{color:#94a3b8}

/* Enterprise Suite final: serial attachments, HTML composer, tracking status */
.nx-attachment-list{display:flex;flex-direction:column;align-items:stretch;gap:8px;width:100%;margin:10px 0 0 0}.nx-attachment-chip{display:flex!important;align-items:center;gap:10px;max-width:100%;width:100%;padding:9px 12px;border:1px solid #dbeafe;background:#f8fbff;color:#1e3a8a;border-radius:14px;font-size:13px;font-weight:700}.nx-attachment-chip .nx-attachment-index{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;border-radius:50%;background:#dbeafe;color:#1d4ed8;font-weight:900}.nx-attachment-chip .nx-attachment-name{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.nx-attachment-chip small{font-weight:600;color:#64748b}.nx-attachment-remove{margin-left:auto;border:0;background:#fee2e2!important;color:#b91c1c!important;width:26px;height:26px;border-radius:50%;font-size:18px}.nx-attachment-remove:hover{background:#fecaca!important}.html-source-btn{font-weight:800;gap:4px}.nx-html-modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:1090;display:flex;align-items:center;justify-content:center;padding:16px}.nx-html-modal{width:min(880px,96vw);background:#fff;border-radius:22px;box-shadow:0 30px 80px rgba(15,23,42,.32);overflow:hidden}.nx-html-modal-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid #e5e7eb}.nx-html-modal-head b{font-size:18px}.nx-html-modal-body{padding:16px}.nx-html-code{width:100%;min-height:300px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;border:1px solid #dbe3ef;border-radius:14px;padding:12px;resize:vertical}.nx-html-modal-actions{display:flex;justify-content:flex-end;gap:10px;padding:14px 16px;border-top:1px solid #e5e7eb}.rich-editor table{border-collapse:collapse;width:auto;max-width:100%;margin:8px 0}.rich-editor table td,.rich-editor table th{border:1px solid #cbd5e1;padding:6px 8px;vertical-align:top}.rich-editor{overflow:auto}.delivery-eye-chip{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:3px 8px;font-size:11px;font-weight:900;white-space:nowrap}.delivery-eye-chip.red{background:#fee2e2;color:#b91c1c}.delivery-eye-chip.yellow{background:#fef3c7;color:#92400e}.delivery-eye-chip.green{background:#dcfce7;color:#166534}.delivery-eye-chip.gray{background:#e5e7eb;color:#374151}@media(max-width:575.98px){.nx-html-modal{width:100vw;height:100vh;border-radius:0}.nx-html-code{min-height:55vh}.nx-html-modal-backdrop{padding:0}.nx-attachment-chip{font-size:12px}.mail-status-stack{align-items:flex-start}}

/* Compose attachment serial list: one file per row with remove button */
.gmail-compose-actions .compose-attachment-serial-list,
.gmail-compose-actions .nx-attachment-list{
  flex:0 0 100%;
  width:100%;
  margin:8px 0 0 0;
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:stretch;
}
.gmail-compose-actions .nx-attachment-list.is-empty{display:none;}
.nx-attachment-row{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  padding:9px 12px;
  border:1px solid #dbeafe;
  background:#f8fbff;
  border-radius:14px;
  color:#1e3a8a;
  box-shadow:0 4px 14px rgba(15,23,42,.04);
}
.nx-attachment-row .nx-attachment-index{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:26px;
  min-width:26px;
  height:26px;
  border-radius:50%;
  background:#dbeafe;
  color:#1d4ed8;
  font-weight:900;
  font-size:13px;
}
.nx-attachment-row .nx-attachment-name{
  flex:1;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:800;
}
.nx-attachment-row .nx-attachment-size{
  color:#64748b;
  font-weight:600;
  white-space:nowrap;
}
.nx-attachment-row .nx-attachment-remove,
.nx-attachment-remove{
  margin-left:auto;
  border:0;
  background:#fee2e2!important;
  color:#b91c1c!important;
  width:28px;
  height:28px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  line-height:1;
  cursor:pointer;
}
.nx-attachment-row .nx-attachment-remove:hover,
.nx-attachment-remove:hover{background:#fecaca!important;}

.nx-recipient-suggestion-item.active{background:#dbeafe!important;}


/* Compose-only serial attachment list: same visual logic as reply attachments */
.composer .compose-attachment-serial-list{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
  width:100%;
  margin:12px 0 0 0;
}
.composer .compose-attachment-serial-list.is-empty{display:none!important;}
.composer .compose-attachment-serial-list .nx-attachment-row{
  display:grid;
  grid-template-columns:30px minmax(0,1fr) auto 30px;
  align-items:center;
  gap:10px;
  width:100%;
  padding:9px 12px;
  border:1px solid #bfdbfe;
  background:#f8fbff;
  border-radius:14px;
  color:#1e3a8a;
  font-size:13px;
  font-weight:700;
}
.composer .compose-attachment-serial-list .nx-attachment-index{
  display:inline-flex;align-items:center;justify-content:center;
  width:24px;height:24px;border-radius:50%;
  background:#dbeafe;color:#1d4ed8;font-weight:900;
}
.composer .compose-attachment-serial-list .nx-attachment-name{
  min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.composer .compose-attachment-serial-list .nx-attachment-size{
  color:#64748b;font-weight:600;white-space:nowrap;
}
.composer .compose-attachment-serial-list .nx-attachment-remove{
  border:0;background:#fee2e2!important;color:#b91c1c!important;
  width:26px;height:26px;border-radius:50%;font-size:18px;line-height:1;
  display:inline-flex;align-items:center;justify-content:center;
}
.composer .compose-attachment-serial-list .nx-attachment-remove:hover{background:#fecaca!important;}
@media(max-width:575.98px){
  .composer .compose-attachment-serial-list .nx-attachment-row{grid-template-columns:28px minmax(0,1fr) 28px;}
  .composer .compose-attachment-serial-list .nx-attachment-size{display:none;}
}

/* 2026-05-10: mobile/tablet stability and same desktop color language */
@media (max-width: 991.98px){
  body{background:var(--bg)!important;padding-bottom:78px;}
  .desktop-sidebar{display:none!important;}
  .topbar.gmail-topbar{height:auto;min-height:64px;padding:10px 12px;gap:8px;position:sticky;top:0;background:#fff!important;border-bottom:1px solid var(--line);z-index:1030;}
  .topbar .icon-btn{flex:0 0 42px;}
  .gmail-search{order:2;flex:0 0 100%;max-width:none;width:100%;height:44px;border-radius:22px;background:#f1f5f9!important;}
  .user-avatar{padding:8px 10px;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .content.gmail-content{padding:12px 10px 86px!important;background:var(--bg)!important;}
  .gmail-mobile-menu{width:min(360px,92vw)!important;border:0!important;background:#fff!important;color:#111827!important;}
  .gmail-mobile-menu .offcanvas-header{background:#fff!important;color:#111827!important;border-bottom:1px solid var(--line);}
  .gmail-mobile-menu .btn-close{filter:none!important;opacity:.75;}
  .mobile-menu{background:#fff!important;color:#111827!important;max-height:calc(100vh - 64px)!important;overflow-y:auto!important;padding:14px 12px 96px!important;}
  .mobile-menu-profile{display:flex;gap:10px;align-items:center;background:#eef5ff!important;border:1px solid #dbeafe;border-radius:18px;padding:12px;margin-bottom:12px;color:#0f172a;}
  .mobile-menu-profile i{font-size:28px;color:var(--brand);}
  .mobile-menu-profile small{display:block;color:#64748b;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .mobile-menu a,.mobile-config-toggle{background:#fff!important;color:#334155!important;border:1px solid transparent!important;border-radius:16px!important;margin-bottom:7px!important;padding:12px 13px!important;min-height:46px;}
  .mobile-menu a:hover,.mobile-menu a.active,.mobile-config-toggle:hover,.mobile-config-toggle[aria-expanded="true"]{background:#eaf1fb!important;color:#0b57d0!important;border-color:#dbeafe!important;}
  .mobile-submenu{margin:0 0 10px 12px!important;padding:0 0 0 10px!important;border-left:2px solid #dbeafe!important;}
  .mobile-bottom.gmail-bottom{height:68px;background:#fff!important;color:#334155!important;border-top:1px solid var(--line);box-shadow:0 -10px 24px rgba(15,23,42,.10);}
  .mobile-bottom.gmail-bottom a{color:#334155!important;font-weight:800;font-size:11px;gap:3px;padding-top:7px;}
  .mobile-bottom.gmail-bottom a i{font-size:19px;color:#2563eb!important;}
  .mobile-bottom.gmail-bottom a:hover,.mobile-bottom.gmail-bottom a:focus{background:#eaf1fb!important;color:#0b57d0!important;}
  .bottom-badge,.notification-btn span,.nav-badge{background:#ef4444!important;color:#fff!important;}
  .gmail-list-card,.professional-mail-card,.card,.glass-card{border-radius:18px!important;box-shadow:0 8px 24px rgba(15,23,42,.06)!important;}
  .gmail-mail-row{grid-template-columns:40px minmax(0,1fr) 32px!important;padding:12px 10px!important;gap:9px!important;}
  .sender-avatar{width:38px;height:38px;font-size:16px;}
  .mail-row-top{align-items:flex-start;}
  .mail-row-meta{display:flex;flex-direction:column;align-items:flex-end;gap:4px;max-width:92px;}
  .mail-preview{font-size:13px;}
  .mail-card-actionbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;}
  .mail-card-action-left{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
  .gmail-compose-page .card,.gmail-compose-page .glass-card{margin:0!important;}
  .email-chip-input{min-height:44px;border-radius:12px!important;overflow:visible!important;}
  .nx-recipient-suggestions{left:0!important;right:0!important;max-height:220px!important;z-index:1100!important;}
  .rich-toolbar{overflow-x:auto;white-space:nowrap;display:flex;gap:6px;}
  .rich-editor{min-height:260px!important;}
  .gmail-compose-actions{position:sticky;bottom:76px;background:#fff!important;z-index:10;border:1px solid var(--line);border-radius:18px;padding:10px;display:flex;gap:8px;overflow-x:auto;}
  .send-main-btn{white-space:nowrap;}
}
@media (min-width: 768px) and (max-width: 991.98px){
  .content.gmail-content{padding:18px 16px 90px!important;}
  .gmail-mobile-menu{width:380px!important;}
  .gmail-mail-row{grid-template-columns:52px 44px minmax(0,1fr)!important;}
  .row-check.d-none{display:flex!important;}
}


/* 2026-05-10: mobile bottom menu cleanup, forced light mobile UI, tap/navigation fixes and performance polish */
@media (max-width: 991.98px){
  html,body{background:#f5f7fb!important;color:#111827!important;}
  body{padding-bottom:74px!important;}
  .topbar.gmail-topbar{background:#fff!important;color:#111827!important;box-shadow:0 1px 0 rgba(226,232,240,.75)!important;}
  .topbar.gmail-topbar .icon-btn{background:#f1f5f9!important;color:#334155!important;}
  .topbar.gmail-topbar .icon-btn:hover{background:#eaf1fb!important;color:#0b57d0!important;}
  .gmail-search{background:#f1f5f9!important;color:#111827!important;border:1px solid #e5e7eb!important;}
  .gmail-search input{color:#111827!important;}
  .gmail-search input::placeholder{color:#64748b!important;}
  .content.gmail-content{background:#f5f7fb!important;color:#111827!important;}
  .content.gmail-content *{color:inherit;}
  .content.gmail-content .text-muted,.content.gmail-content small,.mail-preview,.mail-row-top time{color:#64748b!important;}
  .card,.glass-card,.read-card,.gmail-list-card,.professional-mail-card,.config-page .card,.dashboard-page .card{background:#fff!important;color:#111827!important;border:1px solid #eef2f7!important;}
  .gmail-mail-row{background:#fff!important;color:#111827!important;border:1px solid #eef2f7!important;border-radius:14px!important;margin-bottom:8px!important;box-shadow:0 3px 12px rgba(15,23,42,.04)!important;}
  .gmail-mail-row:hover,.gmail-mail-row:focus{background:#f8fbff!important;color:#111827!important;}
  .mail-subject,.mail-row-top strong,.clean-mail-body,.rich-editor,.form-label,label,h1,h2,h3,h4,h5,h6,p,td,th{color:#111827!important;}
  .sender-avatar{background:#60a5fa!important;color:#fff!important;}
  .form-control,.form-select,.email-chip-input,.rich-editor{background:#fff!important;color:#111827!important;border-color:#dbe3ef!important;}
  .form-control::placeholder,.email-chip-input input::placeholder{color:#94a3b8!important;}
  .mobile-bottom.gmail-bottom{grid-template-columns:repeat(5,1fr)!important;height:70px!important;background:#fff!important;border-top:1px solid #e5e7eb!important;}
  .mobile-bottom.gmail-bottom a{position:relative;min-width:0;color:#334155!important;text-decoration:none!important;border-radius:12px!important;margin:5px 2px!important;padding:5px 2px 6px!important;line-height:1.1!important;}
  .mobile-bottom.gmail-bottom a i{font-size:20px!important;color:#2563eb!important;}
  .mobile-bottom.gmail-bottom a span{font-size:10.5px!important;color:#334155!important;white-space:nowrap!important;}
  .mobile-bottom.gmail-bottom a:active,.mobile-bottom.gmail-bottom a:hover,.mobile-bottom.gmail-bottom a:focus{background:#eaf1fb!important;}
  .bottom-badge{top:2px!important;right:18%!important;}
  .gmail-mobile-menu a,.gmail-mobile-menu button{pointer-events:auto!important;touch-action:manipulation!important;}
  .mobile-menu a{color:#334155!important;text-decoration:none!important;}
  .mobile-menu a i,.mobile-config-toggle i{color:#2563eb!important;}
  .mobile-menu-profile b,.mobile-menu-profile div{color:#111827!important;}
  .table-responsive{background:#fff!important;border-radius:16px!important;}
  .table{color:#111827!important;background:#fff!important;}
  .table td,.table th{background:#fff!important;color:#111827!important;}
  .gmail-compose-actions{box-shadow:0 -4px 16px rgba(15,23,42,.06)!important;}
}
@media (max-width: 575.98px){
  .topbar.gmail-topbar{gap:7px!important;padding:9px 8px!important;}
  .user-avatar{max-width:88px!important;padding:7px 8px!important;}
  .content.gmail-content{padding-left:8px!important;padding-right:8px!important;}
  .mobile-bottom.gmail-bottom a span{font-size:10px!important;}
}


/* 2026-05-10 patch: keep previous mobile navigation fixes, only force mail reader content to clean light mode */
@media(max-width:991.98px){
  .conversation-page,.conversation-header,.conversation-thread,.reply-card{background:transparent!important;color:#111827!important;}
  .conversation-header.glass-card,.thread-bubble,.sent-message .thread-bubble,.inbox-message .thread-bubble,.current-message .thread-bubble{background:#fff!important;color:#111827!important;border:1px solid #e5e7eb!important;box-shadow:0 8px 24px rgba(15,23,42,.06)!important;}
  .thread-meta,.thread-meta b,.thread-meta span,.thread-extra-line,.thread-extra-line span,.clean-mail-body,.clean-mail-body *,.mail-body,.mail-body *{color:#111827!important;background-color:transparent!important;}
  .thread-meta time,.thread-extra-line.text-muted,.thread-extra-line .text-muted,.text-muted.small{color:#64748b!important;}
  .clean-mail-body{background:#fff!important;color:#111827!important;border:0!important;}
  .clean-mail-body table,.clean-mail-body td,.clean-mail-body th{color:#111827!important;background:#fff!important;}
  .attachment-preview-card,.file-preview,.image-preview,.video-preview{background:#fff!important;color:#111827!important;border-color:#dbeafe!important;}
  .attachment-preview-card *,.file-preview *{color:#111827!important;}
}
html[data-theme="dark"] .conversation-header.glass-card,html[data-theme="dark"] .thread-bubble,html[data-theme="dark"] .sent-message .thread-bubble,html[data-theme="dark"] .clean-mail-body{background:#fff!important;color:#111827!important;border-color:#e5e7eb!important;}
html[data-theme="dark"] .thread-bubble *,html[data-theme="dark"] .clean-mail-body *{color:#111827!important;}
.delivery-eye-chip{display:inline-flex;align-items:center;gap:4px;border-radius:999px;padding:2px 8px;font-size:11px;font-weight:700;border:1px solid #e5e7eb;background:#fff;color:#334155;}
.delivery-eye-chip.green{background:#dcfce7;color:#166534;border-color:#bbf7d0;}
.delivery-eye-chip.yellow{background:#fef9c3;color:#854d0e;border-color:#fde68a;}
.delivery-eye-chip.red{background:#fee2e2;color:#991b1b;border-color:#fecaca;}

/* NX thread fix: small contextual reply label, no design removal */
.reply-context-note{margin-top:.45rem;padding:.45rem .65rem;border:1px solid rgba(13,110,253,.16);background:#f8fbff;color:#334155;border-radius:.75rem;display:inline-flex;gap:.35rem;align-items:center;}
