.mail-scope-shell {
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
}

html body.mail-body.mail-simple-mode:not(.mail-embedded) .mail-topbar {
  grid-template-columns: 226px minmax(184px, 228px) minmax(300px, 1fr) auto !important;
  gap: 12px !important;
  pointer-events: none;
}

html body.mail-body.mail-simple-mode .mail-topbar-actions {
  flex-wrap: nowrap !important;
  width: auto !important;
  min-width: max-content !important;
  height: 48px !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

html body.mail-body.mail-simple-mode .mail-topbar button,
html body.mail-body.mail-simple-mode .mail-topbar input,
html body.mail-body.mail-simple-mode .mail-topbar select,
html body.mail-body.mail-simple-mode .mail-topbar a,
html body.mail-body.mail-simple-mode .mail-search-shell,
html body.mail-body.mail-simple-mode .mail-scope-shell,
html body.mail-body.mail-simple-mode .mail-topbar-actions {
  pointer-events: auto;
}

html body.mail-body.mail-simple-mode .mail-brand-media,
html body.mail-body.mail-simple-mode .mail-brand-copy {
  pointer-events: none;
}

html body.mail-body.mail-simple-mode .mail-brand-title {
  font-size: 18px !important;
}

html body.mail-body #mail-scope-btn.mail-scope-btn {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) 16px;
  gap: 8px;
  align-items: center;
  min-width: 184px;
  max-width: 228px;
  min-height: 44px;
  padding: 4px 10px;
  border: 1px solid #dadce0 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #202124 !important;
  text-align: left;
  box-shadow: none !important;
}

html body.mail-body #mail-scope-btn.mail-scope-btn:hover,
html body.mail-body #mail-scope-btn.mail-scope-btn[aria-expanded="true"] {
  border-color: #bdc1c6 !important;
  background: #f8fafd !important;
}

.mail-scope-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: hsl(var(--mailbox-scope-hue, 214) 70% 48%);
  box-shadow: 0 0 0 3px hsl(var(--mailbox-scope-hue, 214) 80% 94%);
}

.mail-scope-btn-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.mail-scope-btn-copy strong,
.mail-scope-btn-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-scope-btn-copy strong {
  font-size: 13px;
  line-height: 17px;
}

.mail-scope-btn-copy small {
  color: #5f6368;
  font-size: 10.5px;
  line-height: 14px;
}

.mail-scope-chevron {
  color: #5f6368;
  font-size: 15px;
  text-align: center;
}

.mail-scope-menu {
  position: absolute;
  z-index: 120;
  top: calc(100% + 6px);
  left: 0;
  width: min(380px, calc(100vw - 24px));
  max-height: min(540px, calc(100dvh - 86px));
  overflow: hidden;
  border: 1px solid #dadce0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(60, 64, 67, .24);
}

.mail-scope-menu > header,
.mail-scope-menu > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
}

.mail-scope-menu > header strong {
  font-size: 14px;
  font-weight: 600;
}

.mail-scope-menu > header span {
  color: #5f6368;
  font-size: 11px;
}

.mail-scope-search {
  display: block;
  padding: 0 10px 8px;
}

html body.mail-body .mail-scope-menu .mail-scope-search input {
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid #dadce0 !important;
  border-radius: 8px !important;
  background: #f8fafd;
  color: #202124;
  font-size: 13px;
  box-shadow: none !important;
}

html body.mail-body .mail-scope-menu .mail-scope-search input:focus {
  border-color: #0b57d0 !important;
  outline: 1px solid #0b57d0;
}

.mail-scope-options {
  max-height: min(388px, calc(100dvh - 222px));
  overflow-y: auto;
  padding: 0 6px 6px;
  overscroll-behavior: contain;
}

.mail-scope-section {
  display: grid;
  gap: 1px;
}

.mail-scope-section + .mail-scope-section {
  margin-top: 4px;
}

.mail-scope-section-all {
  margin: 0 0 5px;
  padding-bottom: 5px;
  border-bottom: 1px solid #edf0f2;
}

.mail-scope-section-label {
  padding: 7px 10px 3px;
  color: #5f6368;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 16px;
  text-transform: uppercase;
}

.mail-scope-option-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  min-width: 0;
  border-radius: 8px;
}

html body.mail-body .mail-scope-menu .mail-scope-option,
html body.mail-body .mail-scope-menu .mail-scope-option:not(.secondary):not(.danger) {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto 20px;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 46px !important;
  padding: 5px 7px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #202124 !important;
  text-align: left;
  box-shadow: none !important;
}

html body.mail-body .mail-scope-menu .mail-scope-option:hover,
html body.mail-body .mail-scope-menu .mail-scope-option:focus-visible {
  background: #f1f3f4 !important;
  outline: 0;
}

html body.mail-body .mail-scope-menu .mail-scope-option[aria-checked="true"] {
  background: #e8f0fe !important;
  color: #174ea6 !important;
}

html body.mail-body .mail-scope-menu .mail-scope-option[aria-checked="true"]:focus-visible {
  box-shadow: inset 0 0 0 2px #0b57d0 !important;
}

.mail-scope-option-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: hsl(var(--mailbox-option-hue, 214) 75% 92%);
  color: hsl(var(--mailbox-option-hue, 214) 65% 32%);
  font-size: 12px;
  font-weight: 700;
}

.mail-scope-option-copy {
  display: grid;
  min-width: 0;
}

.mail-scope-option-copy strong,
.mail-scope-option-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-scope-option-copy strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 17px;
}

.mail-scope-option-copy small {
  color: #5f6368;
  font-size: 10.5px;
  line-height: 15px;
}

.mail-scope-option-count {
  min-width: 22px;
  color: #5f6368;
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}

.mail-scope-option-check {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #0b57d0;
  opacity: 0;
}

.mail-scope-option-check svg,
.mail-scope-pin svg,
.mail-scope-menu > footer svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.mail-scope-option[aria-checked="true"] .mail-scope-option-check {
  opacity: 1;
}

html body.mail-body .mail-scope-menu .mail-scope-pin,
html body.mail-body .mail-scope-menu .mail-scope-pin:not(.secondary):not(.danger) {
  display: grid;
  place-items: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #5f6368 !important;
  box-shadow: none !important;
  opacity: 0;
}

.mail-scope-option-row:hover .mail-scope-pin,
.mail-scope-pin:focus-visible,
.mail-scope-pin.is-pinned {
  opacity: 1 !important;
}

html body.mail-body .mail-scope-menu .mail-scope-pin:hover,
html body.mail-body .mail-scope-menu .mail-scope-pin:focus-visible {
  background: #e9eef6 !important;
  color: #0b57d0 !important;
  outline: 0;
}

.mail-scope-pin.is-pinned svg {
  fill: currentColor;
}

.mail-scope-menu > footer {
  border-top: 1px solid #edf0f2;
}

html body.mail-body .mail-scope-menu > footer button,
html body.mail-body .mail-scope-menu > footer button:not(.secondary):not(.danger) {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px !important;
  padding: 0 8px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #0b57d0 !important;
  font-size: 12px;
  font-weight: 600;
  box-shadow: none !important;
}

html body.mail-body .mail-scope-menu > footer button:hover,
html body.mail-body .mail-scope-menu > footer button:focus-visible {
  background: #edf3fe !important;
  outline: 0;
}

.mail-compose-origin-note {
  grid-column: 2 / -1 !important;
  width: auto !important;
  min-width: 0;
  margin: 3px 0 0;
  color: #5f6368;
  font-size: 10.5px;
  line-height: 15px;
}

.mail-compose-origin-note.is-warning {
  color: #8a4b00;
  font-weight: 600;
}

.mail-mailbox-origin {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  max-width: 132px;
  min-height: 20px;
  padding: 1px 7px;
  border: 1px solid hsl(var(--mailbox-origin-hue, 214) 55% 80%);
  border-radius: 999px;
  background: hsl(var(--mailbox-origin-hue, 214) 75% 96%);
  color: hsl(var(--mailbox-origin-hue, 214) 60% 31%);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-thread-mailbox-banner {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 24px 10px;
  padding: 8px 12px;
  border: 1px solid #d9e4f5;
  border-radius: 10px;
  background: #f6f9fe;
  color: #3c4043;
  font-size: 12px;
}

.mail-thread-mailbox-banner strong {
  color: #174ea6;
}

body[data-mailbox-scope="all"] .mail-search-input {
  padding-left: 16px;
}

@media (max-width: 1250px) and (min-width: 901px) {
  html body.mail-body.mail-simple-mode:not(.mail-embedded) .mail-topbar {
    grid-template-columns: 212px 44px minmax(280px, 1fr) auto !important;
  }

  html body.mail-body #mail-scope-btn.mail-scope-btn {
    min-width: 44px;
    width: 44px;
    padding: 5px 10px;
    grid-template-columns: 10px 16px;
  }

  .mail-scope-btn-copy {
    display: none;
  }
}

@media (max-width: 720px) {
  .mail-scope-shell {
    order: 3;
  }

  .mail-scope-menu {
    position: fixed;
    z-index: 122;
    inset: auto 8px 8px;
    width: auto;
    max-height: min(78dvh, 620px);
    border-radius: 18px 18px 14px 14px;
    box-shadow: 0 14px 44px rgba(32, 33, 36, .34);
  }

  body.mail-scope-open .mail-scope-shell::before {
    content: "";
    position: fixed;
    z-index: 121;
    inset: 0;
    background: rgba(32, 33, 36, .32);
  }

  .mail-scope-options {
    max-height: min(58dvh, 430px);
  }

  html body.mail-body .mail-scope-menu .mail-scope-option,
  html body.mail-body .mail-scope-menu .mail-scope-option:not(.secondary):not(.danger) {
    min-height: 50px !important;
  }

  html body.mail-body .mail-scope-menu .mail-scope-pin {
    opacity: 1;
  }
}

@media (max-width: 900px) {
  html body.mail-body.mail-simple-mode .mail-scope-shell {
    position: absolute;
    z-index: 92;
    top: 9px;
    left: 56px;
    width: 46px;
  }

  html body.mail-body.mail-simple-mode #mail-scope-btn.mail-scope-btn {
    min-width: 44px;
    width: 44px;
    grid-template-columns: 10px 16px;
    padding: 5px 10px;
    border-color: transparent;
    background: transparent;
  }

  html body.mail-body.mail-simple-mode .mail-scope-btn-copy {
    display: none;
  }

  html body.mail-body.mail-simple-mode .mail-search-input {
    padding-left: 108px !important;
  }
}

/* Keep the approved sender identity visible in Gmail-style Compose. Earlier
 * compatibility layers collapsed this row as duplicate preflight metadata,
 * which left users unable to verify or switch the account they send from. */
html body.mail-body.mail-body.mail-body.mail-body.mail-body.mail-body.mail-body.mail-body.mail-body.mail-body #mail-compose-modal#mail-compose-modal#mail-compose-modal#mail-compose-modal#mail-compose-modal#mail-compose-modal .mail-compose-grid > div:has(#compose-mailbox),
html body.mail-embedded.mail-embedded.mail-embedded.mail-embedded.mail-embedded.mail-embedded.mail-embedded.mail-embedded.mail-embedded.mail-embedded #mail-compose-modal#mail-compose-modal#mail-compose-modal#mail-compose-modal#mail-compose-modal#mail-compose-modal .mail-compose-grid > div:has(#compose-mailbox) {
  display: grid !important;
  visibility: visible !important;
  grid-template-columns: 44px minmax(0, 1fr) !important;
  align-items: center !important;
  min-height: 40px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 2px 12px !important;
  overflow: visible !important;
}

html body.mail-body #mail-compose-modal #compose-mailbox,
html body.mail-embedded #mail-compose-modal #compose-mailbox {
  display: block !important;
  visibility: visible !important;
  width: 100% !important;
  min-height: 32px !important;
}

/* The wizard is a two-column grid (step badge + copy). Pin both copy rows to
 * the content column so the description never collapses into the badge width. */
html body.mail-body #mail-admin-panel .mail-domain-wizard strong,
html body.mail-body #mail-admin-panel .mail-domain-wizard small {
  grid-column: 2 !important;
}

html body.mail-body #mail-admin-panel .mail-domain-wizard strong {
  grid-row: 1 !important;
}

html body.mail-body #mail-admin-panel .mail-domain-wizard small {
  grid-row: 2 !important;
  white-space: normal !important;
  line-height: 1.3 !important;
}

/* Team work recovery
   The mailbox scope control made the standalone header a four-item grid.
   Team work must use that same shell contract instead of falling back to the
   older three-column header, which pushed account actions over the inbox. */
html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-topbar {
  grid-template-columns: 232px minmax(184px, 228px) minmax(320px, 1fr) auto !important;
  gap: 12px !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 64px !important;
  height: 64px !important;
  padding: 8px 16px !important;
  pointer-events: none;
}

html body.mail-body.mail-team-work-mode .mail-topbar button,
html body.mail-body.mail-team-work-mode .mail-topbar input,
html body.mail-body.mail-team-work-mode .mail-topbar select,
html body.mail-body.mail-team-work-mode .mail-topbar a,
html body.mail-body.mail-team-work-mode .mail-search-shell,
html body.mail-body.mail-team-work-mode .mail-scope-shell,
html body.mail-body.mail-team-work-mode .mail-topbar-actions {
  pointer-events: auto;
}

html body.mail-body.mail-team-work-mode .mail-brand {
  display: grid !important;
  grid-template-columns: 40px 44px minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 48px !important;
  height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body.mail-body.mail-team-work-mode .mail-header-action-btn,
html body.mail-body.mail-team-work-mode .mail-app-menu-btn,
html body.mail-body.mail-team-work-mode .mail-profile-menu-btn,
html body.mail-body.mail-team-work-mode .mail-header-action-btn:not(.secondary):not(.danger),
html body.mail-body.mail-team-work-mode .mail-app-menu-btn:not(.secondary):not(.danger),
html body.mail-body.mail-team-work-mode .mail-profile-menu-btn:not(.secondary):not(.danger) {
  display: grid !important;
  place-items: center !important;
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #5f6368 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-team-work-mode .mail-header-action-btn:hover,
html body.mail-body.mail-team-work-mode .mail-app-menu-btn:hover {
  background: #edf1f6 !important;
}

html body.mail-body.mail-team-work-mode .mail-header-action-btn svg,
html body.mail-body.mail-team-work-mode .mail-app-menu-btn svg {
  display: block !important;
  width: 21px !important;
  height: 21px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.7 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body.mail-body.mail-team-work-mode .mail-app-menu-btn svg circle {
  fill: currentColor !important;
  stroke: none !important;
}

html body.mail-body.mail-team-work-mode .mail-profile-menu-btn,
html body.mail-body.mail-team-work-mode .mail-profile-menu-btn:not(.secondary):not(.danger) {
  background: #5f3dc4 !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

html body.mail-body.mail-team-work-mode .mail-search-filter-btn,
html body.mail-body.mail-team-work-mode .mail-search-filter-btn:not(.secondary):not(.danger) {
  position: absolute !important;
  top: 50% !important;
  right: 8px !important;
  display: grid !important;
  place-items: center !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #5f6368 !important;
  box-shadow: none !important;
  transform: translateY(-50%) !important;
}

html body.mail-body.mail-team-work-mode .mail-search-filter-btn:hover {
  background: #dfe7f3 !important;
}

html body.mail-body.mail-team-work-mode .mail-search-filter-btn span {
  display: none !important;
}

html body.mail-body.mail-team-work-mode .mail-search-filter-btn svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
}

html body.mail-body.mail-team-work-mode .mail-sidebar-toggle-button,
html body.mail-body.mail-team-work-mode .mail-sidebar-toggle-button:not(.secondary):not(.danger) {
  display: grid !important;
  place-items: center !important;
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #5f6368 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-team-work-mode .mail-sidebar-toggle-button:hover,
html body.mail-body.mail-team-work-mode .mail-sidebar-toggle-button:focus-visible {
  background: #edf1f6 !important;
}

html body.mail-body.mail-team-work-mode .mail-sidebar-toggle-button svg {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
}

html body.mail-body.mail-team-work-mode .mail-brand-media {
  width: 44px !important;
  height: 44px !important;
}

html body.mail-body.mail-team-work-mode .mail-brand-copy {
  display: grid !important;
  min-width: 0 !important;
  gap: 1px !important;
}

html body.mail-body.mail-team-work-mode .mail-brand-title,
html body.mail-body.mail-team-work-mode #mail-session-meta {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body.mail-body.mail-team-work-mode .mail-brand-title {
  font-size: 18px !important;
  line-height: 22px !important;
}

html body.mail-body.mail-team-work-mode #mail-session-meta {
  margin: 0 !important;
  font-size: 10.5px !important;
  line-height: 14px !important;
}

html body.mail-body.mail-team-work-mode .mail-search-shell {
  width: 100% !important;
  min-width: 0 !important;
  height: 48px !important;
}

html body.mail-body.mail-team-work-mode .mail-search-input {
  width: 100% !important;
  min-width: 0 !important;
  height: 48px !important;
  min-height: 48px !important;
  border-radius: 24px !important;
}

html body.mail-body.mail-team-work-mode .mail-topbar-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 4px !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 48px !important;
  height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Keep the queue on the same 64px shell rhythm as standard Mail. */
html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-pane-stack {
  min-height: 0 !important;
  height: calc(100dvh - 64px) !important;
  padding: 0 !important;
}

/* The desktop page has an 8px outer inset above the 64px header. Account for
   both so scrolling stays inside the mail panes and never moves toolbar hit
   targets underneath the fixed account chrome. */
@media (min-width: 901px) {
  html body.mail-body:not(.mail-embedded) {
    height: 100dvh !important;
    overflow: hidden !important;
  }

  html body.mail-body:not(.mail-embedded) .mail-page {
    height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

}

html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-shell.mail-pane.is-active {
  grid-template-columns: 256px minmax(0, 1fr) !important;
  min-height: calc(100dvh - 64px) !important;
  height: calc(100dvh - 64px) !important;
}

html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-sidebar-panel,
html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-thread-panel {
  max-height: calc(100dvh - 64px) !important;
  height: calc(100dvh - 64px) !important;
}

html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-thread-panel {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  border-radius: 16px 0 0 0 !important;
}

html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-thread-panel > .mail-panel-header,
html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-workspace-categories {
  display: none !important;
}

html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-workspace-toolbar-actions .mail-workspace-bulk-label,
html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-workspace-toolbar-actions .mail-workspace-secondary-bulk:disabled {
  display: none !important;
}

html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-workspace-toolbar-actions,
html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-workspace-toolbar-meta {
  flex-wrap: nowrap !important;
}

html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-workspace-toolbar-actions {
  overflow: hidden !important;
}

html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-workspace-toolbar-meta {
  justify-content: flex-end !important;
}

html body.mail-body.mail-team-work-mode:not(.mail-embedded) #mail-system-status,
html body.mail-body.mail-team-work-mode:not(.mail-embedded) #mail-sort-state,
html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-density-menu {
  display: none !important;
}

/* One queue command bar. Legacy count-definition cells duplicated the same
   metrics and were the visible source of the overlapping text. */
html body.mail-body.mail-team-work-mode #mail-threads .mail-triage-strip {
  position: relative !important;
  top: auto !important;
  z-index: 2 !important;
  display: grid !important;
  grid-template-columns: minmax(200px, .8fr) minmax(0, 2.2fr) !important;
  gap: 12px !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 64px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 8px 12px !important;
  overflow: visible !important;
  border: 0 !important;
  border-bottom: 1px solid #e3e7ee !important;
  border-radius: 0 !important;
  background: rgba(255, 255, 255, .98) !important;
  box-shadow: none !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .mail-count-definition-row {
  display: none !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .mail-triage-strip-title {
  display: grid !important;
  min-width: 0 !important;
  gap: 1px !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .mail-triage-strip-title > span {
  color: #64748b !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .04em !important;
  line-height: 13px !important;
  text-transform: uppercase !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .mail-triage-strip-title strong {
  overflow: hidden !important;
  color: #172033 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 18px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .mail-triage-strip-title small {
  overflow: hidden !important;
  color: #64748b !important;
  font-size: 10.5px !important;
  line-height: 14px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .mail-triage-filter-actions {
  display: flex !important;
  grid-column: auto !important;
  width: auto !important;
  min-width: 0 !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  overflow: visible !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .mail-triage-filter-actions .mail-visible-view-mode-toggle {
  display: none !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .mail-triage-filter-actions button,
html body.mail-body.mail-team-work-mode #mail-threads .mail-view-mode-toggle button,
html body.mail-body.mail-team-work-mode #mail-threads .mail-reading-pane-toggle button {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 10px !important;
  border: 1px solid #d7dde6 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #334155 !important;
  font-size: 11px !important;
  font-weight: 650 !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .mail-triage-filter-actions button.is-active,
html body.mail-body.mail-team-work-mode #mail-threads .mail-triage-filter-actions button[aria-pressed="true"],
html body.mail-body.mail-team-work-mode #mail-threads .mail-view-mode-toggle button.is-active,
html body.mail-body.mail-team-work-mode #mail-threads .mail-reading-pane-toggle button.is-active {
  border-color: #b8cff3 !important;
  background: #e8f0fe !important;
  color: #174ea6 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .mail-triage-filter-actions button b {
  color: inherit !important;
  font-size: inherit !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .mail-triage-filter-actions button small {
  margin-left: 5px !important;
  color: inherit !important;
  font-size: 10px !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx-review-sort-control {
  display: grid !important;
  grid-template-columns: auto minmax(112px, 132px) !important;
  gap: 6px !important;
  align-items: center !important;
  color: #64748b !important;
  font-size: 10px !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx-review-sort-control select {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 28px 0 10px !important;
  border: 1px solid #d7dde6 !important;
  border-radius: 8px !important;
  background-color: #fff !important;
  color: #334155 !important;
  font-size: 11px !important;
  box-shadow: none !important;
}

/* The inspector was intentionally hidden by the scoring layer but its grid
   column remained reserved, leaving a large blank lane. */
html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-workspace {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-inspector {
  display: none !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-table-shell {
  width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  border: 0 !important;
  border-bottom: 1px solid #e3e7ee !important;
  background: #fff !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx-review-owner-banner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 6px 12px !important;
  border: 0 !important;
  border-bottom: 1px solid #e3e7ee !important;
  border-radius: 0 !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx-review-owner-banner > span {
  display: flex !important;
  min-width: 0 !important;
  align-items: baseline !important;
  gap: 7px !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx-review-owner-banner b {
  color: #172033 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx-review-owner-banner small {
  overflow: hidden !important;
  color: #64748b !important;
  font-size: 11px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx-review-owner-banner button {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 12px !important;
  border: 1px solid #0b57d0 !important;
  border-radius: 8px !important;
  background: #0b57d0 !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx-review-owner-banner button:hover {
  background: #0842a0 !important;
  border-color: #0842a0 !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-table {
  width: 100% !important;
  min-width: 900px !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx309-conversation-col-select { width: 42px !important; }
html body.mail-body.mail-team-work-mode #mail-threads .hvx309-conversation-col-sla { width: 96px !important; }
html body.mail-body.mail-team-work-mode #mail-threads .hvx309-conversation-col-subject { width: auto !important; }
html body.mail-body.mail-team-work-mode #mail-threads .hvx309-conversation-col-owner { width: 140px !important; }
html body.mail-body.mail-team-work-mode #mail-threads .hvx309-conversation-col-workflow { width: 122px !important; }
html body.mail-body.mail-team-work-mode #mail-threads .hvx309-conversation-col-touch { width: 132px !important; }

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-table th,
html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-table td,
html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-table th:nth-child(3),
html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-action {
  display: table-cell !important;
  width: auto !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-table th {
  height: 34px !important;
  padding: 7px 10px !important;
  border: 0 !important;
  border-bottom: 1px solid #dfe5ec !important;
  background: #fff !important;
  color: #64748b !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .02em !important;
  line-height: 16px !important;
  text-align: left !important;
  text-transform: uppercase !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-row td {
  height: 88px !important;
  padding: 10px !important;
  border: 0 !important;
  border-bottom: 1px solid #e7ebf0 !important;
  background: #fff !important;
  vertical-align: middle !important;
  box-shadow: none !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-row:hover td,
html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-row:focus-within td {
  background: #f7f9fc !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-row.active td,
html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-row.is-selected td {
  background: #edf4ff !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-row.active td:first-child,
html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-row.is-selected td:first-child,
html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-row.is-owner-required td:first-child {
  box-shadow: inset 3px 0 0 #6b86ad !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-select {
  padding-inline: 8px 4px !important;
  text-align: center !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .mail-workspace-checkbox {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-risk {
  padding-inline: 8px !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .mail-conversation-triage.hvx18-sla-badge {
  display: grid !important;
  min-width: 0 !important;
  gap: 2px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #334155 !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .mail-conversation-triage.hvx18-sla-badge strong {
  color: #334155 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 15px !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .mail-conversation-triage.hvx18-sla-badge small {
  color: #64748b !important;
  font-size: 10px !important;
  line-height: 14px !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-subject {
  min-width: 0 !important;
  overflow: hidden !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-open {
  display: grid !important;
  min-width: 0 !important;
  gap: 3px !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx820-conversation-subject-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: center !important;
  min-width: 0 !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx930-conversation-title-line {
  display: grid !important;
  grid-template-columns: minmax(88px, max-content) minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: center !important;
  min-width: 0 !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx930-conversation-id {
  min-width: 0 !important;
  min-height: 24px !important;
  height: 24px !important;
  padding: 0 7px !important;
  border: 1px solid #c4d2e5 !important;
  border-radius: 6px !important;
  background: #f8fafc !important;
  color: #334155 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx930-conversation-headline {
  display: grid !important;
  min-width: 0 !important;
  gap: 1px !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx930-conversation-headline strong,
html body.mail-body.mail-team-work-mode #mail-threads .hvx930-conversation-headline em {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx930-conversation-headline strong {
  color: #172033 !important;
  font-size: 13px !important;
  font-style: normal !important;
  font-weight: 700 !important;
  line-height: 17px !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx930-conversation-headline em,
html body.mail-body.mail-team-work-mode #mail-threads .hvx820-read-state {
  color: #64748b !important;
  font-size: 10px !important;
  font-style: normal !important;
  line-height: 14px !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx960-conversation-evidence,
html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-reason,
html body.mail-body.mail-team-work-mode #mail-threads .hvx155-conversation-preview,
html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-identity-line span:nth-child(n+3) {
  display: none !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx960-conversation-snippet {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: #64748b !important;
  font-size: 11px !important;
  line-height: 15px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx960-conversation-snippet b {
  display: none !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx960-conversation-snippet em {
  color: inherit !important;
  font-size: inherit !important;
  font-style: normal !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-identity-line {
  display: flex !important;
  min-width: 0 !important;
  margin: 0 !important;
  gap: 10px !important;
  color: #64748b !important;
  font-size: 10px !important;
  line-height: 14px !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-identity-line span {
  display: flex !important;
  min-width: 0 !important;
  max-width: 50% !important;
  gap: 4px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-identity-line b,
html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-identity-line em {
  display: inline !important;
  overflow: hidden !important;
  color: inherit !important;
  font-size: inherit !important;
  font-style: normal !important;
  font-weight: 500 !important;
  text-overflow: ellipsis !important;
  text-transform: none !important;
  white-space: nowrap !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-identity-line b::after {
  content: ":";
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-owner-control,
html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-row-action,
html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-touch {
  display: grid !important;
  min-width: 0 !important;
  gap: 2px !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-owner-control strong,
html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-row-action,
html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-touch strong {
  overflow: hidden !important;
  color: #334155 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 15px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-owner-control small,
html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-touch small {
  display: grid !important;
  min-width: 0 !important;
  gap: 1px !important;
  overflow: hidden !important;
  color: #64748b !important;
  font-size: 10px !important;
  line-height: 13px !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-touch small span {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-row-action,
html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-row.is-owner-required .hvx100-conversation-row-action {
  min-height: 0 !important;
  padding: 0 0 0 8px !important;
  border: 0 !important;
  border-left: 2px solid #94a3b8 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

@media (max-width: 1250px) and (min-width: 901px) {
  html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-topbar {
    grid-template-columns: 212px 44px minmax(260px, 1fr) auto !important;
  }

  html body.mail-body.mail-team-work-mode #mail-scope-btn.mail-scope-btn {
    min-width: 44px !important;
    width: 44px !important;
    grid-template-columns: 10px 16px !important;
    padding: 5px 10px !important;
  }

  html body.mail-body.mail-team-work-mode .mail-scope-btn-copy {
    display: none !important;
  }

  html body.mail-body.mail-team-work-mode #mail-threads .mail-triage-strip {
    grid-template-columns: minmax(180px, .65fr) minmax(0, 2.35fr) !important;
  }

  html body.mail-body.mail-team-work-mode #mail-threads .mail-reading-pane-toggle {
    display: none !important;
  }
}

/* Accessibility and density closeout. The visual glyph can remain Gmail-sized
   while its interactive box meets the WCAG 2.2 desktop target floor. */
html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-select {
  grid-template-columns: repeat(3, 24px) !important;
  width: 88px !important;
  min-width: 88px !important;
  gap: 2px !important;
  padding-left: 10px !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-workspace-checkbox,
html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-star,
html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-important {
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
}

html body.mail-body #mail-admin-panel .mail-admin-task-tab {
  min-height: 44px !important;
}

@media (min-width: 901px) {
  html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-row td {
    height: 76px !important;
    padding-block: 8px !important;
  }
}

@media (max-width: 900px) {
  html body.mail-body #mail-profile-menu-btn,
  html body.mail-body #mail-sidebar-toggle {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
  }
}

/* Tenant-admin workspace: one bounded task at a time. */
html body.mail-body[data-mail-pane="admin"] #mail-admin-panel.mail-admin-shell {
  display: block !important;
  width: 100% !important;
  height: calc(100dvh - 86px) !important;
  max-height: calc(100dvh - 86px) !important;
  min-height: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

html body.mail-body #mail-admin-panel[hidden],
html body.mail-body #mail-admin-panel.hidden,
html body.mail-body #mail-admin-panel .mail-admin-task-panel[hidden] {
  display: none !important;
}

html body.mail-body #mail-admin-panel .mail-admin-workspace {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 16px !important;
}

html body.mail-body #mail-admin-panel .mail-admin-workspace-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px 14px;
  background: #fff;
}

html body.mail-body #mail-admin-panel .mail-admin-workspace-header .meta,
html body.mail-body #mail-admin-panel .mail-admin-workspace-header .mail-overview-kicker {
  margin: 0;
}

html body.mail-body #mail-admin-panel .mail-admin-task-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  min-width: 0;
  padding: 0 20px;
  overflow-x: auto;
  border-bottom: 1px solid #e8eaed;
  background: #fff;
  scrollbar-width: thin;
}

html body.mail-body #mail-admin-panel .mail-admin-workspace-status:empty {
  display: none;
}

html body.mail-body #mail-admin-panel .mail-admin-workspace-status:not(:empty) {
  flex: 0 0 auto;
  margin: 0;
  padding: 9px 24px;
  border-bottom: 1px solid #e8eaed;
  background: #f8fbff;
}

html body.mail-body #mail-admin-panel .mail-admin-task-tab {
  flex: 0 0 auto;
  min-width: 0;
  padding: 13px 16px 11px !important;
  border: 0 !important;
  border-bottom: 3px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #5f6368 !important;
  font-weight: 600 !important;
  white-space: nowrap;
}

html body.mail-body #mail-admin-panel .mail-admin-task-tab:hover,
html body.mail-body #mail-admin-panel .mail-admin-task-tab:focus-visible {
  background: #f4f7fc !important;
  color: #174ea6 !important;
}

html body.mail-body #mail-admin-panel .mail-admin-task-tab.is-active {
  border-bottom-color: #1a73e8 !important;
  color: #174ea6 !important;
}

html body.mail-body #mail-admin-panel .mail-admin-task-panel {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: 22px 24px 28px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
}

html body.mail-body #mail-admin-panel #mail-admin-task-access {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

html body.mail-body #mail-admin-panel .mail-admin-task-panel > .subpanel {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 22px;
  background: #fff;
}

html body.mail-body #mail-admin-panel #mail-admin-task-domains > .mail-admin-grid,
html body.mail-body #mail-admin-panel #mail-admin-task-access > .subpanel {
  width: 100%;
  max-width: none;
}

html body.mail-body #mail-admin-panel #mail-admin-task-access > .subpanel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

html body.mail-body #mail-admin-panel #mail-admin-task-domains > .mail-admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

html body.mail-body #mail-admin-panel .mail-admin-grid,
html body.mail-body #mail-admin-panel .mail-admin-grid > *,
html body.mail-body #mail-admin-panel .mail-panel-header,
html body.mail-body #mail-admin-panel .mail-header-actions {
  min-width: 0 !important;
}

html body.mail-body #mail-admin-panel input,
html body.mail-body #mail-admin-panel select,
html body.mail-body #mail-admin-panel textarea {
  max-width: 100% !important;
}

html body.mail-body #mail-admin-panel .mail-address-builder {
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center;
}

html body.mail-body #mail-admin-panel .mail-permission-list {
  max-height: none;
  overflow: visible;
  border: 1px solid #e8eaed;
  border-radius: 12px;
  background: #fff;
}

html body.mail-body #mail-admin-panel .mail-permission-row > span:first-child {
  min-width: 0;
}

html body.mail-body #mail-admin-panel .mail-permission-row strong,
html body.mail-body #mail-admin-panel .mail-permission-row small {
  overflow-wrap: anywhere;
}

html body.mail-body #mail-admin-panel .mail-admin-access-picker {
  display: grid;
  grid-template-columns: minmax(0, 420px);
  gap: 6px;
  margin: 16px 0;
}

html body.mail-body #mail-admin-panel .mail-admin-roster-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px 0 10px;
}

html body.mail-body #mail-admin-panel .mail-admin-roster-toolbar .meta {
  margin: 0;
}

html body.mail-body #mail-admin-panel .mail-admin-roster-pages {
  display: flex;
  gap: 6px;
}

html body.mail-body #mail-admin-panel .mail-admin-roster-pages button {
  min-height: 32px !important;
}

html body.mail-body #mail-admin-panel .mail-managed-mailboxes {
  flex: 1 1 auto;
  max-height: none !important;
  min-height: 0;
  margin-top: 0;
  padding: 0 4px 20px 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

html body.mail-body #mail-admin-panel .mail-admin-card {
  width: min(100%, 1200px);
  min-width: 0;
  margin: 0 auto;
  padding: 0 16px 18px;
}

html body.mail-body #mail-admin-panel .mail-admin-card-head {
  position: sticky;
  z-index: 4;
  top: 0;
  margin: 0 -16px 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #e8eaed;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}

html body.mail-body #mail-admin-panel .mail-admin-card-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

html body.mail-body #mail-admin-panel .mail-admin-card-actions button:disabled {
  border-color: #dadce0 !important;
  background: #f1f3f4 !important;
  box-shadow: none !important;
  color: #80868b !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
}

html body.mail-body #mail-admin-panel .mail-domain-checks {
  width: min(100%, 1200px);
  margin-right: auto;
  margin-left: auto;
}

html body.mail-body #mail-admin-panel .mail-check-technical-key {
  display: block;
  margin-top: 2px;
  color: #6b7280;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html body.mail-body #mail-admin-panel .mail-admin-dirty-state {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: #5f6368;
  font-size: 12px;
}

html body.mail-body #mail-admin-panel .mail-admin-dirty-state.is-dirty {
  color: #b06000;
  font-weight: 700;
}

html body.mail-body #mail-admin-panel .mail-permission-header,
html body.mail-body #mail-admin-panel .mail-permission-row {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(288px, auto);
  align-items: center;
  gap: 16px;
}

html body.mail-body #mail-admin-panel .mail-permission-header {
  position: sticky;
  z-index: 3;
  top: 72px;
  min-height: 38px;
  padding: 7px 12px;
  border-bottom: 1px solid #e8eaed;
  background: rgba(248, 250, 253, .97);
  color: #5f6368;
  font-size: 12px;
  font-weight: 700;
}

html body.mail-body #mail-admin-panel .mail-permission-header > span:first-child {
  min-width: 0;
}

html body.mail-body #mail-admin-panel .mail-permission-header-flags {
  display: grid;
  grid-template-columns: repeat(3, minmax(88px, 96px));
  gap: 8px;
}

html body.mail-body #mail-admin-panel .mail-permission-row {
  min-height: 64px;
  padding: 8px 12px;
}

html body.mail-body #mail-admin-panel .mail-permission-flags {
  display: grid;
  grid-template-columns: repeat(3, minmax(88px, 96px));
  gap: 8px;
}

html body.mail-body #mail-admin-panel .mail-permission-flags label {
  min-width: 88px;
  min-height: 32px;
  justify-content: flex-start;
}

html body.mail-body #mail-admin-panel .mail-permission-flags input {
  width: 24px;
  min-width: 24px;
  height: 24px;
}

@media (max-width: 900px) {
  html body.mail-body[data-mail-pane="admin"] #mail-admin-panel.mail-admin-shell {
    height: calc(100dvh - 64px) !important;
    max-height: calc(100dvh - 64px) !important;
  }

  html body.mail-body #mail-admin-panel .mail-admin-workspace-header,
  html body.mail-body #mail-admin-panel .mail-admin-task-panel {
    padding-left: 16px;
    padding-right: 16px;
  }

  html body.mail-body #mail-admin-panel #mail-admin-task-domains > .mail-admin-grid,
  html body.mail-body #mail-admin-panel .mail-admin-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html body.mail-body #mail-admin-panel .mail-admin-card-head,
  html body.mail-body #mail-admin-panel .mail-panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  html body.mail-body #mail-admin-panel .mail-admin-card-actions {
    justify-content: flex-start;
  }

  html body.mail-body #mail-admin-panel .mail-permission-header,
  html body.mail-body #mail-admin-panel .mail-permission-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  html body.mail-body #mail-admin-panel .mail-permission-header {
    top: 96px;
  }

  html body.mail-body #mail-admin-panel .mail-permission-header-flags,
  html body.mail-body #mail-admin-panel .mail-permission-flags {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  html body.mail-body #mail-admin-panel .mail-permission-flags label,
  html body.mail-body #mail-admin-panel .mail-admin-roster-pages button {
    min-width: 0;
    min-height: 44px !important;
  }

  html body.mail-body #mail-admin-panel .mail-admin-roster-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  html body.mail-body #mail-admin-panel .mail-admin-task-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: 0 8px 8px;
    overflow-x: hidden;
  }

  html body.mail-body #mail-admin-panel .mail-admin-task-tab {
    width: 100%;
    min-height: 44px !important;
    padding: 9px 8px 7px !important;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  html body.mail-body #mail-admin-panel .mail-admin-task-tab.is-active {
    background: #e8f0fe !important;
  }

  html body.mail-body #mail-admin-panel .mail-admin-task-panel {
    padding: 12px 10px 16px;
  }

  html body.mail-body #mail-admin-panel .mail-admin-task-panel > .subpanel {
    padding: 12px;
  }

  html body.mail-body #mail-admin-panel .mail-admin-access-picker {
    margin: 10px 0;
  }

  html body.mail-body #mail-admin-panel .mail-admin-roster-toolbar {
    align-items: center;
    flex-direction: row;
    gap: 8px;
    margin-bottom: 8px;
  }

  html body.mail-body #mail-admin-panel .mail-admin-roster-pages {
    flex: 0 0 auto;
  }

  html body.mail-body #mail-admin-panel .mail-admin-card-head {
    gap: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  html body.mail-body #mail-admin-panel .mail-admin-card-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    width: 100%;
  }

  html body.mail-body #mail-admin-panel .mail-permission-header {
    position: relative;
    top: auto;
  }
}

html body.mail-body #mail-admin-panel .mail-admin-task-tab:focus-visible,
html body.mail-body #mail-admin-panel .mail-admin-access-picker :is(input, select):focus-visible,
html body.mail-body #mail-admin-panel .mail-permission-flags label:has(input:focus-visible),
html body.mail-body #mail-admin-panel .mail-admin-card-actions button:focus-visible {
  outline: 3px solid #1a73e8 !important;
  outline-offset: 2px !important;
}

/* Keep the enterprise queue navigation on the same familiar Gmail icon rhythm. */
html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-workspace-nav-item,
html body.mail-body.mail-team-work-mode:not(.mail-embedded) .folder-btn {
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 0 12px 0 18px !important;
  text-align: left !important;
}

html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-nav-icon {
  display: inline-grid !important;
  width: 20px !important;
  height: 20px !important;
  place-items: center !important;
  color: currentColor !important;
}

html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-nav-icon svg {
  width: 20px !important;
  height: 20px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.65 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

@media (max-width: 900px) {
  html body.mail-body.mail-team-work-mode:not(.mail-embedded),
  html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-page {
    width: 100% !important;
    height: 100dvh !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-topbar {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 64px !important;
    min-height: 64px !important;
    padding: 8px 10px !important;
  }

  html body.mail-body.mail-team-work-mode .mail-brand {
    position: absolute !important;
    z-index: 90 !important;
    top: 12px !important;
    left: 14px !important;
    display: flex !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
  }

  html body.mail-body.mail-team-work-mode .mail-brand-media,
  html body.mail-body.mail-team-work-mode .mail-brand-copy {
    display: none !important;
  }

  html body.mail-body.mail-team-work-mode .mail-scope-shell {
    position: absolute !important;
    z-index: 92 !important;
    top: 9px !important;
    left: 56px !important;
    width: 46px !important;
  }

  html body.mail-body.mail-team-work-mode .mail-search-shell {
    position: absolute !important;
    top: 8px !important;
    right: 50px !important;
    left: 108px !important;
    width: auto !important;
    min-width: 0 !important;
    height: 48px !important;
    margin: 0 !important;
  }

  html body.mail-body.mail-team-work-mode .mail-topbar-actions {
    position: absolute !important;
    z-index: 93 !important;
    top: 12px !important;
    right: 6px !important;
    display: flex !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    overflow: visible !important;
  }

  html body.mail-body.mail-team-work-mode .mail-header-action-btn,
  html body.mail-body.mail-team-work-mode .mail-app-menu-btn,
  html body.mail-body.mail-team-work-mode .mail-app-menu {
    display: none !important;
  }

  html body.mail-body.mail-team-work-mode #mail-profile-menu-btn.mail-profile-menu-btn,
  html body.mail-body.mail-team-work-mode #mail-profile-menu-btn.mail-profile-menu-btn:not(.secondary):not(.danger) {
    display: inline-grid !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    flex: 0 0 36px !important;
  }

  html body.mail-body.mail-team-work-mode #mail-scope-btn.mail-scope-btn {
    min-width: 44px !important;
    width: 44px !important;
    grid-template-columns: 10px 16px !important;
    padding: 5px 10px !important;
    border-color: transparent !important;
    background: transparent !important;
  }

  html body.mail-body.mail-team-work-mode .mail-scope-btn-copy {
    display: none !important;
  }

  html body.mail-body.mail-team-work-mode #mail-threads .mail-triage-strip {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  html body.mail-body.mail-team-work-mode #mail-threads .mail-triage-filter-actions {
    justify-content: flex-start !important;
  }

  html body.mail-body.mail-team-work-mode #mail-threads .hvx100-conversation-table {
    min-width: 820px !important;
  }
}

/* Final desktop constraint intentionally lives after every team-work override. */
@media (min-width: 901px) {
  html body.mail-body.mail-simple-mode:not(.mail-embedded) .mail-pane-stack,
  html body.mail-body.mail-simple-mode:not(.mail-embedded) .mail-shell.mail-pane.is-active,
  html body.mail-body.mail-simple-mode:not(.mail-embedded) .mail-sidebar-panel,
  html body.mail-body.mail-simple-mode:not(.mail-embedded) .mail-thread-panel,
  html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-pane-stack,
  html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-shell.mail-pane.is-active,
  html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-sidebar-panel,
  html body.mail-body.mail-team-work-mode:not(.mail-embedded) .mail-thread-panel {
    height: calc(100dvh - 72px) !important;
    min-height: 0 !important;
    max-height: calc(100dvh - 72px) !important;
  }
}

@media (max-width: 900px) {
  html body.mail-body.mail-simple-mode #mail-profile-menu-btn.mail-profile-menu-btn:not(.secondary):not(.danger) {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    flex: 0 0 40px !important;
  }
}
