*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#f6f8fc;color:#202124}.app-shell{display:grid;grid-template-columns:250px 1fr;height:100vh}.sidebar{background:#fff;padding:18px;border-right:1px solid #e5e7eb}.brand{font-size:24px;font-weight:700;margin:8px 0 24px}.compose{width:150px;border:0;background:#c2e7ff;border-radius:16px;padding:14px 18px;font-weight:700;margin-bottom:24px;cursor:pointer}.sidebar nav{display:flex;flex-direction:column;gap:4px}.sidebar a{padding:10px 14px;border-radius:20px;text-decoration:none;color:#333;cursor:pointer}.sidebar a.active,.sidebar a:hover{background:#eaf1fb}.main{display:grid;grid-template-rows:64px 1fr;min-width:0}.topbar{display:flex;align-items:center;gap:20px;padding:10px 24px;background:#fff;border-bottom:1px solid #e5e7eb}.topbar input{width:min(720px,70%);border:0;background:#eef3f8;border-radius:24px;padding:14px 20px;font-size:16px}.mail-grid{display:grid;grid-template-columns:420px 1fr;min-height:0}.message-list{background:#fff;border-right:1px solid #e5e7eb;overflow:auto}.message-row{width:100%;display:grid;grid-template-columns:1fr;gap:4px;text-align:left;background:#fff;border:0;border-bottom:1px solid #edf0f2;padding:14px 16px;cursor:pointer}.message-row:hover{box-shadow:inset 3px 0 0 #1a73e8;background:#f8fbff}.message-row.unread .from,.message-row.unread .subject{font-weight:700}.from{font-size:14px;color:#202124}.subject{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.date{font-size:12px;color:#6b7280}.reader{padding:32px;background:#fff;overflow:auto}.reader h1{font-size:24px;font-weight:500}.meta{color:#5f6368;font-size:14px;margin-bottom:28px}.body{line-height:1.55;max-width:900px}.empty,.loading{padding:30px;color:#6b7280}.auth-page{height:100vh;display:grid;place-items:center;background:#f6f8fc}.auth-card{width:360px;background:#fff;padding:32px;border-radius:18px;box-shadow:0 10px 30px rgba(0,0,0,.08);display:flex;flex-direction:column;gap:14px}.auth-card input,.settings-form input,.settings-form select{padding:12px;border:1px solid #d7dce2;border-radius:10px}.auth-card button,.settings-form button{padding:12px;border:0;border-radius:10px;background:#1a73e8;color:#fff;font-weight:700}.settings{max-width:900px;margin:40px auto;background:#fff;padding:30px;border-radius:18px}.settings-form{display:grid;grid-template-columns:1fr 1fr;gap:14px}.error{color:#b00020}.ok{color:#137333}@media(max-width:900px){.app-shell{grid-template-columns:1fr}.sidebar{display:none}.mail-grid{grid-template-columns:1fr}.reader{display:none}}
.attachments{display:flex;flex-direction:column;gap:10px;margin:0 0 24px;padding:14px;border:1px solid #e5e7eb;border-radius:14px;background:#f8fbff;max-width:720px}.attachments h3{font-size:14px;margin:0 0 4px;color:#5f6368}.attachment{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px;border:1px solid #d7dce2;border-radius:12px;background:#fff;text-decoration:none;color:#202124}.attachment:hover{background:#eef3f8}.attachment small{color:#6b7280;white-space:nowrap}
.message-actions{display:flex;gap:8px;margin-bottom:16px}.message-actions button{border:1px solid #d7dce2;background:#fff;border-radius:18px;padding:8px 14px;cursor:pointer}.message-actions button:hover{background:#eef3f8}.email-frame{width:100%;max-width:980px;min-height:240px;border:0;background:#fff}.attachment-preview{max-width:280px;max-height:220px;border-radius:12px;border:1px solid #d7dce2;background:#fff;object-fit:contain}.compose-modal{display:none;position:fixed;inset:0;pointer-events:none}.compose-modal.open{display:block}.compose-window{position:fixed;right:28px;bottom:0;width:min(560px,calc(100vw - 32px));height:620px;background:#fff;border:1px solid #d7dce2;border-radius:14px 14px 0 0;box-shadow:0 20px 60px rgba(0,0,0,.22);display:grid;grid-template-rows:44px 44px 44px 44px 1fr 54px;pointer-events:auto;overflow:hidden}.compose-title{display:flex;align-items:center;justify-content:space-between;background:#f2f6fc;padding:0 14px;font-weight:700}.compose-title button{border:0;background:transparent;font-size:24px;cursor:pointer}.compose-window input,.compose-window select{border:0;border-bottom:1px solid #edf0f2;padding:0 14px;font-size:14px}.compose-window textarea{border:0;padding:14px;font:14px Arial,Helvetica,sans-serif;resize:none;outline:none}.compose-footer{display:flex;align-items:center;gap:12px;padding:10px 14px;border-top:1px solid #edf0f2}.compose-footer button{border:0;border-radius:18px;background:#0b57d0;color:#fff;font-weight:700;padding:9px 18px;cursor:pointer}.attach-button{cursor:pointer;color:#0b57d0}.attach-button input{display:none!important}#compose-status{color:#5f6368;font-size:13px}@media(max-width:900px){.compose-window{right:8px;width:calc(100vw - 16px);height:80vh}.reader.open{display:block}}

.topbar select {
  border: 1px solid #dfe3ea;
  border-radius: 999px;
  padding: 10px 12px;
  background: #fff;
  min-width: 140px;
}
.message-actions button {
  border: 1px solid #dfe3ea;
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  margin-right: 6px;
  cursor: pointer;
}
.message-actions button:hover, .message-row:hover {
  background: #f5f7fb;
}
.message-row.unread .from, .message-row.unread .subject {
  font-weight: 800;
}
.message-row:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.nav-item{display:flex!important;align-items:center;justify-content:space-between;gap:12px}.nav-item .count{min-width:18px;text-align:center;color:#5f6368;font-size:12px;font-weight:700}.message-row{display:grid!important;grid-template-columns:44px 1fr;align-items:stretch;padding:0!important}.message-row.starred{background:#fffdf4}.message-open{border:0;background:transparent;text-align:left;padding:14px 16px;cursor:pointer;display:grid;grid-template-columns:1fr;gap:4px;min-width:0}.message-open:hover{background:#f8fbff}.star-button{border:0;background:transparent;font-size:22px;line-height:1;color:#9aa0a6;cursor:pointer;padding:0 0 0 12px}.star-button:hover,.star-button.on{color:#fbbc04}.star-button:disabled{opacity:.6;cursor:wait}.message-row.unread .message-open .from,.message-row.unread .message-open .subject{font-weight:800}.message-row:has(.message-open:disabled){opacity:.65;cursor:not-allowed}.message-actions #reader-star{min-width:92px}.message-actions #reader-star:first-letter{color:#fbbc04}
.thread-count,.unread-count{display:inline-block;margin-left:6px;padding:2px 7px;border-radius:999px;background:#e8f0fe;color:#174ea6;font-size:11px;font-weight:800;vertical-align:middle}.unread-count{background:#fce8e6;color:#b3261e}.thread-count.large{font-size:13px;padding:4px 9px}.thread-stack{display:flex;flex-direction:column;gap:18px;max-width:1050px}.thread-message{border:1px solid #e5e7eb;border-radius:16px;padding:18px;background:#fff}.thread-message.starred{background:#fffdf4}.thread-message-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}.thread-message-head span{color:#6b7280;font-size:13px}.thread-message-head button{border:1px solid #dfe3ea;background:#fff;border-radius:18px;padding:7px 12px;cursor:pointer}.thread-message-head button:hover{background:#eef3f8}


.list-panel{display:flex;flex-direction:column;min-height:0;border-right:1px solid var(--border,#e5e7eb);}
.list-panel .message-list{flex:1;min-height:0;overflow:auto;border-right:0;}
.pager{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-top:1px solid var(--border,#e5e7eb);background:#fff;font-size:13px;color:#6b7280;}
.pager button{border:1px solid var(--border,#e5e7eb);background:#fff;border-radius:999px;padding:6px 10px;cursor:pointer;}
.pager button:disabled{opacity:.45;cursor:not-allowed;}

.bulk-toolbar{display:flex;align-items:center;gap:12px;padding:9px 12px;border-bottom:1px solid #e5e7eb;background:#fff;color:#5f6368;font-size:13px}.bulk-toolbar button{border:1px solid #dfe3ea;background:#fff;border-radius:999px;padding:6px 11px;cursor:pointer}.bulk-toolbar button:disabled{opacity:.45;cursor:not-allowed}.bulk-checkbox{align-self:center;justify-self:center;width:16px;height:16px;cursor:pointer}.message-row{grid-template-columns:34px 44px 1fr!important}.draft-row{grid-template-columns:44px 1fr!important}.draft-row .star-button{font-size:18px;color:#6b7280}.draft-row .star-button:hover{color:#b3261e}

/* Product polish: dark mode, labels, contacts, archive controls */
:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #18202a;
  --muted: #667085;
  --border: #e5e7eb;
  --accent: #2563eb;
  --chip: #eef2ff;
}
body.theme-dark {
  --bg: #0f172a;
  --panel: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #263244;
  --accent: #60a5fa;
  --chip: #1e293b;
  background: var(--bg);
  color: var(--text);
}
body.theme-dark .sidebar,
body.theme-dark .main,
body.theme-dark .topbar,
body.theme-dark .list-panel,
body.theme-dark .reader,
body.theme-dark .compose-window,
body.theme-dark .message-row,
body.theme-dark .thread-message {
  background: var(--panel);
  color: var(--text);
  border-color: var(--border);
}
body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select {
  background: #0b1220;
  color: var(--text);
  border-color: var(--border);
}
.theme-toggle,
.small-link {
  border: 1px solid var(--border, #e5e7eb);
  background: transparent;
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
  color: inherit;
}
.label-nav { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border, #e5e7eb); }
.label-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted, #667085); margin: 8px 0; }
.label-link { cursor: pointer; }
.label-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.label-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 9px; background: var(--chip, #eef2ff); color: var(--accent, #2563eb); font-size: 12px; font-weight: 600; }
.label-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--border, #e5e7eb); margin-bottom: 10px; }
.label-toolbar label { display: inline-flex; gap: 5px; align-items: center; font-size: 13px; color: var(--muted, #667085); }
.label-toolbar button { border: 1px solid var(--border, #e5e7eb); border-radius: 999px; background: transparent; padding: 4px 9px; cursor: pointer; color: inherit; }
.bulk-toolbar { gap: 8px; }
#bulk-archive { border: 1px solid var(--border, #e5e7eb); border-radius: 6px; background: transparent; padding: 6px 10px; cursor: pointer; color: inherit; }
#bulk-archive:disabled { opacity: .5; cursor: default; }

/* Mobile polish + notifications */
.mobile-topbar,
.mobile-shade,
.mobile-back { display: none; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 120px);
  z-index: 4000;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(520px, calc(100vw - 24px));
  padding: 12px 14px;
  border-radius: 999px;
  background: #202124;
  color: #fff;
  box-shadow: 0 18px 45px rgba(0,0,0,.28);
  opacity: 0;
  pointer-events: none;
  transition: transform .2s ease, opacity .2s ease;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.toast button { border: 0; border-radius: 999px; padding: 7px 11px; background: #fff; color: #202124; font-weight: 700; cursor: pointer; }
body.theme-dark .toast { background: #e5e7eb; color: #111827; }
body.theme-dark .toast button { background: #111827; color: #e5e7eb; }

@media (max-width: 900px) {
  body { overflow: hidden; }
  .mobile-topbar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 1500;
    height: 56px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 12px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    background: var(--panel, #fff);
    color: var(--text, #18202a);
  }
  .mobile-topbar button {
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 999px;
    background: transparent;
    color: inherit;
    padding: 8px 11px;
    font-weight: 700;
  }
  .mobile-compose { background: #0b57d0 !important; color: #fff !important; border-color: #0b57d0 !important; }
  .app-shell { height: calc(100vh - 56px); grid-template-columns: 1fr !important; }
  .sidebar {
    display: block !important;
    position: fixed;
    z-index: 2500;
    inset: 0 auto 0 0;
    width: min(82vw, 320px);
    transform: translateX(-105%);
    transition: transform .2s ease;
    box-shadow: 20px 0 60px rgba(0,0,0,.25);
    background: var(--panel, #fff);
  }
  body.mobile-sidebar-open .sidebar { transform: translateX(0); }
  .mobile-shade {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 2400;
    background: rgba(15, 23, 42, .42);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }
  body.mobile-sidebar-open .mobile-shade { opacity: 1; pointer-events: auto; }
  .main { min-width: 0; height: calc(100vh - 56px); }
  .topbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
    height: auto;
  }
  .topbar input { grid-column: 1 / -1; width: 100%; padding: 11px 14px; font-size: 15px; }
  .topbar span { display: none; }
  .theme-toggle { padding: 9px 10px; }
  .mail-grid { display: block; height: calc(100vh - 56px - 112px); min-height: 0; }
  .list-panel { height: 100%; border-right: 0; }
  .bulk-toolbar { overflow-x: auto; white-space: nowrap; }
  .message-row { grid-template-columns: 32px 38px 1fr !important; }
  .message-open { padding: 13px 10px; grid-template-columns: minmax(0,1fr) auto; }
  .message-open .from, .message-open .subject { grid-column: 1; }
  .message-open .date { grid-column: 2; grid-row: 1 / 3; text-align: right; max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
  .reader {
    display: none !important;
    position: fixed;
    z-index: 1600;
    inset: 56px 0 0 0;
    padding: 14px;
    background: var(--panel, #fff);
  }
  body.mobile-reading .reader { display: block !important; }
  body.mobile-reading .list-panel { display: none; }
  .mobile-back {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 999px;
    background: transparent;
    color: inherit;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-weight: 700;
  }
  .reader h1 { font-size: 20px; line-height: 1.25; }
  .message-actions { overflow-x: auto; padding-bottom: 4px; }
  .thread-message { padding: 13px; border-radius: 13px; }
  .thread-message-head { gap: 8px; }
  .email-frame { min-height: 360px; }
  .attachments { max-width: none; }
  .attachment-preview { max-width: 100%; height: auto; }
  .compose-modal.open { z-index: 3200; background: rgba(15,23,42,.25); pointer-events: auto; }
  .compose-window {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    height: min(82vh, 720px);
    border-radius: 18px;
    grid-template-rows: 48px 44px 44px 44px minmax(220px,1fr) 58px;
  }
  .compose-footer { position: sticky; bottom: 0; background: var(--panel, #fff); }
  .pager { position: sticky; bottom: 0; }
  .toast { bottom: 14px; border-radius: 16px; width: calc(100vw - 24px); justify-content: space-between; }
}

.rule-form { margin-bottom: 18px; }
.rules-list { display: grid; gap: 10px; margin-top: 10px; }
.rule-card { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; border: 1px solid var(--border,#e5e7eb); border-radius: 14px; padding: 12px; }
.rule-card strong { grid-column: 1; }
.rule-card span, .rule-card em { color: var(--muted,#667085); font-size: 13px; }
.rule-card button { grid-column: 2; grid-row: 1 / span 3; border: 1px solid var(--border,#e5e7eb); background: transparent; border-radius: 999px; padding: 7px 10px; cursor: pointer; color: inherit; }
.muted { color: var(--muted,#667085); }
#run-filters { border: 1px solid var(--border,#e5e7eb); background: transparent; border-radius: 999px; padding: 6px 11px; cursor: pointer; color: inherit; }

/* Clean settings page */
.settings-clean { max-width: 1120px; margin: 0 auto; padding: 28px 18px 60px; }
.settings-header, .settings-card-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.settings-header h1 { margin: 0 0 4px; font-size: 30px; }
.settings-back, .settings-card button, .form-actions button { border: 1px solid var(--border,#e5e7eb); border-radius: 999px; padding: 9px 13px; background: var(--panel,#fff); color: inherit; text-decoration: none; cursor: pointer; font-weight: 700; }
.settings-card button.primary, .form-actions button:first-child { background: #111827; color: white; border-color: #111827; }
.settings-card button.secondary { background: transparent; color: inherit; }
.settings-card button.danger { color: #b42318; border-color: rgba(180,35,24,.3); background: rgba(180,35,24,.05); }
.settings-card { background: var(--panel,#fff); border: 1px solid var(--border,#e5e7eb); border-radius: 22px; padding: 20px; margin-bottom: 18px; box-shadow: 0 18px 40px rgba(15,23,42,.06); }
.settings-card h2 { margin: 0 0 3px; font-size: 19px; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.account-card { border: 1px solid var(--border,#e5e7eb); border-radius: 18px; padding: 15px; background: var(--bg,#f8fafc); display: grid; gap: 12px; }
.account-main { display: flex; align-items: center; gap: 12px; }
.account-avatar { width: 42px; height: 42px; border-radius: 14px; background: #111827; color: white; display: grid; place-items: center; font-weight: 800; }
.account-main h3 { margin: 0; font-size: 16px; }
.account-main p { margin: 3px 0 0; color: var(--muted,#667085); font-size: 13px; }
.account-meta { display: grid; gap: 5px; font-size: 12px; color: var(--muted,#667085); overflow-wrap: anywhere; }
.account-actions { display: flex; gap: 8px; }
.account-test-result .ok, #modal-account-result .ok { margin-top: 8px; padding: 8px 10px; border-radius: 12px; background: #ecfdf3; color: #027a48; }
.account-test-result .error, #modal-account-result .error { margin-top: 8px; padding: 8px 10px; border-radius: 12px; background: #fef3f2; color: #b42318; }
.settings-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.settings-form-grid label { display: grid; gap: 6px; font-weight: 700; font-size: 13px; color: var(--muted,#667085); }
.settings-form-grid input, .settings-form-grid select { width: 100%; border: 1px solid var(--border,#e5e7eb); background: var(--panel,#fff); color: inherit; border-radius: 13px; padding: 11px 12px; font: inherit; }
.settings-form-grid .check-row { display: flex; align-items: center; gap: 9px; padding: 10px 0; color: inherit; }
.settings-form-grid .check-row input { width: auto; }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.modal-backdrop { position: fixed; inset: 0; z-index: 5000; background: rgba(15,23,42,.45); display: grid; place-items: center; padding: 18px; }
.modal-backdrop[hidden] { display: none; }
.modal-card { width: min(760px, 100%); max-height: calc(100vh - 36px); overflow: auto; background: var(--panel,#fff); color: inherit; border-radius: 22px; border: 1px solid var(--border,#e5e7eb); box-shadow: 0 30px 80px rgba(15,23,42,.28); padding: 20px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h2 { margin: 0; }
.modal-head button { border: 0; background: transparent; font-size: 28px; line-height: 1; color: inherit; cursor: pointer; }
@media (max-width: 720px) {
  .settings-header, .settings-card-head { align-items: flex-start; flex-direction: column; }
  .settings-form-grid { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
  .modal-card { padding: 16px; border-radius: 18px; }
}

.sync-status {
  color: var(--muted, #6b7280);
  font-size: 12px;
  margin-left: 8px;
  white-space: nowrap;
}

.skeleton-row {
  pointer-events: none;
  opacity: .8;
}

.skeleton-dot,
.skeleton-star,
.skeleton-lines span {
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(127,127,127,.12), rgba(127,127,127,.28), rgba(127,127,127,.12));
  background-size: 200% 100%;
  animation: solly-shimmer 1.1s linear infinite;
}

.skeleton-dot { width: 16px; height: 16px; margin: 0 10px; }
.skeleton-star { width: 20px; height: 20px; margin-right: 10px; }
.skeleton-lines { flex: 1; display: grid; gap: 8px; padding: 12px 14px; }
.skeleton-lines span:first-child { height: 14px; width: 72%; }
.skeleton-lines span:last-child { height: 12px; width: 42%; }

@keyframes solly-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.toast-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-left: 12px;
}
.toast .toast-cancel {
  background: transparent;
  color: inherit;
  border: 1px solid rgba(255,255,255,.35);
}
body.theme-dark .toast .toast-cancel {
  border-color: rgba(17,24,39,.35);
}

/* UI safety polish */
.empty-state{display:grid;place-items:center;text-align:center;gap:8px;padding:52px 24px;color:var(--muted,#667085)}
.empty-state h3{margin:4px 0 0;color:var(--text,#18202a);font-size:18px}
.empty-state p{margin:0;max-width:320px;line-height:1.45}
.empty-icon{font-size:38px;line-height:1}
.danger-soft{border-color:#f4b4ab!important;color:#b3261e!important;background:#fff7f6!important}
body.theme-dark .danger-soft{background:#2a1414!important;color:#fca5a5!important;border-color:#7f1d1d!important}
#bulk-toolbar button:disabled,.message-actions button:disabled{opacity:.45;cursor:not-allowed}
.toast-actions{display:flex;gap:8px;align-items:center;margin-left:auto}.toast-cancel{opacity:.88}

/* Mobile overflow fixes */
.reader,
.thread-stack,
.thread-message,
.body,
.meta,
.attachments,
.attachment,
.message-open,
.from,
.subject {
  min-width: 0;
  max-width: 100%;
}
.reader,
.thread-message,
.body,
.meta {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.body a,
.thread-message a,
.reader a {
  overflow-wrap: anywhere;
  word-break: break-all;
}
.email-frame {
  max-width: 100%;
  overflow: hidden;
}
.thread-message img,
.body img {
  max-width: 100% !important;
  height: auto !important;
}

@media (max-width: 900px) {
  .mobile-topbar {
    justify-content: center;
    position: sticky;
  }
  .mobile-topbar #mobile-menu {
    position: absolute;
    left: 12px;
  }
  .mobile-compose {
    position: fixed !important;
    right: 16px;
    bottom: 18px;
    z-index: 3300;
    min-width: 136px;
    height: 48px;
    border-radius: 999px !important;
    box-shadow: 0 12px 30px rgba(11,87,208,.35);
  }
  body.mobile-reading .mobile-compose {
    display: none;
  }
  .topbar {
    overflow-x: hidden;
  }
  .topbar select,
  .topbar input,
  .theme-toggle {
    min-width: 0;
    max-width: 100%;
  }
  .mail-grid,
  .list-panel,
  .message-list {
    overflow-x: hidden;
  }
  .message-open .from,
  .message-open .subject {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .reader {
    overflow-x: hidden;
  }
  .thread-stack {
    width: 100%;
  }
  .thread-message {
    width: 100%;
    overflow-x: hidden;
  }
  .email-frame {
    width: 100% !important;
  }
  .message-actions,
  .label-toolbar,
  .bulk-toolbar {
    scrollbar-width: none;
  }
  .message-actions::-webkit-scrollbar,
  .label-toolbar::-webkit-scrollbar,
  .bulk-toolbar::-webkit-scrollbar {
    display: none;
  }
}
