/* ────────────────────────────────────────────────────────────────
 *  lab-mail-auto — Gmail-inspired inbox UI
 * ──────────────────────────────────────────────────────────────── */

:root {
  --fg: #202124;
  --fg-2: #3c4043;
  --muted: #5f6368;
  --muted-2: #80868b;
  --border: #e0e3e7;
  --border-2: #dadce0;
  --bg: #f6f8fc;
  --white: #ffffff;
  --hover: #f1f3f4;
  --selected: #c2e7ff;
  --selected-tint: #d3e3fd;
  --brand: #1a73e8;
  --brand-dark: #185abc;
  --brand-tint: #e8f0fe;
  --danger: #d93025;
  --danger-tint: #fce8e6;
  --warn: #f9ab00;
  --warn-tint: #fef7e0;
  --ok: #188038;
  --ok-tint: #e6f4ea;
  --violet: #9334e6;
  --violet-tint: #f3e8fd;
  /* Priority / label dot colours (roughly Gmail's category palette) */
  --dot-patient: #1a73e8;   /* blue */
  --dot-job: #188038;       /* green */
  --dot-b2b: #a142f4;       /* purple */
  --dot-vendor: #f9ab00;    /* amber */
  --dot-doctor: #f4b400;    /* yellow */
  --dot-corporate: #5f6368; /* grey */
  --dot-regulatory: #d93025;/* red */
  --dot-internal: #202124;  /* black */
  --shadow-sm: 0 1px 2px 0 rgba(60,64,67,.06), 0 1px 3px 0 rgba(60,64,67,.08);
  --shadow: 0 1px 2px 0 rgba(60,64,67,.08), 0 2px 6px 2px rgba(60,64,67,.10);
  --sidebar-width: 256px;
  --topbar-height: 64px;
}

* { box-sizing: border-box; }
/* Force the HTML `hidden` attribute to actually hide even when a later
 * ruleset gives the same element `display: flex/block` — otherwise the
 * inbox list gets squeezed by an invisible-but-flexed .detail-view. */
[hidden] { display: none !important; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--fg);
  font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px; line-height: 1.5;
  min-height: 100vh;
  overflow: hidden;
}
body { height: 100vh; display: flex; flex-direction: column; }
button, input, select, textarea { font-family: inherit; }

a { color: inherit; text-decoration: none; }

/* ── Icon button (Gmail's circular hover buttons) ────────────── */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: transparent; color: var(--muted);
  cursor: pointer; transition: background 0.12s;
}
.icon-btn:hover { background: rgba(32,33,36,.06); color: var(--fg); }
.icon-btn:active { background: rgba(32,33,36,.12); }
.icon-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.icon-btn:disabled { opacity: .4; cursor: default; }
.icon-btn:disabled:hover { background: transparent; color: var(--muted); }

/* ── Top bar ─────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center;
  height: var(--topbar-height);
  padding: 8px 16px;
  background: var(--bg);
  flex-shrink: 0;
  gap: 16px;
  z-index: 20;
}
.topbar-left { display: flex; align-items: center; gap: 4px; width: calc(var(--sidebar-width) - 16px); min-width: 200px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; color: var(--fg); }
.brand-mark { color: var(--danger); display: inline-flex; }
.brand-title {
  font-family: 'Google Sans', 'Product Sans', sans-serif;
  font-size: 22px; font-weight: 400; color: var(--fg-2);
  letter-spacing: -0.3px;
}

.topbar-search { flex: 1; max-width: 720px; }
.search-shell {
  display: flex; align-items: center;
  height: 48px; padding: 0 4px 0 4px;
  background: #eaf1fb; border-radius: 8px;
  transition: background 0.15s, box-shadow 0.15s;
}
.search-shell:focus-within {
  background: var(--white);
  box-shadow: var(--shadow);
}
.search-shell .search-icon { color: var(--muted); }
.search-shell input {
  flex: 1; height: 48px;
  padding: 0 12px;
  background: transparent; border: none; outline: none;
  font-size: 16px; color: var(--fg);
}
.search-shell input::placeholder { color: var(--muted); }

.topbar-right { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.user-chip { padding-left: 8px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 500; font-size: 14px;
  cursor: pointer;
}

/* ── Shell (sidebar + main) ──────────────────────────────────── */
.shell {
  display: flex; flex: 1; min-height: 0;
  background: var(--bg);
  overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width); flex-shrink: 0;
  padding: 8px 8px 16px 8px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: transparent; }
.sidebar:hover::-webkit-scrollbar-thumb { background: rgba(32,33,36,.16); border-radius: 4px; }

.compose {
  display: inline-flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 24px 0 16px;
  margin: 8px 8px 16px 8px;
  border-radius: 16px; border: none;
  background: #c2e7ff; color: var(--fg);
  font-family: 'Google Sans', sans-serif; font-size: 14px; font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  align-self: flex-start;
  transition: box-shadow 0.15s, background 0.15s;
}
.compose:hover { box-shadow: var(--shadow); background: #b3dbf8; }
.compose:disabled { opacity: 0.55; cursor: not-allowed; }
.compose:disabled:hover { box-shadow: var(--shadow-sm); background: #c2e7ff; }

.rail { display: flex; flex-direction: column; }
.rail-item {
  display: flex; align-items: center; gap: 20px;
  height: 32px; padding: 0 12px 0 26px;
  border-radius: 0 16px 16px 0; margin-right: 8px;
  color: var(--fg-2); font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: background 0.12s;
  overflow: hidden;
}
.rail-item:hover { background: rgba(32,33,36,.06); }
.rail-item.active { background: var(--selected-tint); color: var(--brand-dark); font-weight: 700; }
.rail-item.active:hover { background: var(--selected); }
.rail-item svg { flex-shrink: 0; opacity: 0.9; }
.rail-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.rail-count { font-size: 12px; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.rail-item.active .rail-count { color: var(--brand-dark); }

.rail-section { margin-top: 20px; }
.rail-section-head {
  padding: 8px 26px 4px 26px;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px;
  color: var(--muted); font-weight: 600;
}

.label-dot {
  width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0;
  display: inline-block;
}
.dot-patient    { background: var(--dot-patient); }
.dot-job        { background: var(--dot-job); }
.dot-b2b        { background: var(--dot-b2b); }
.dot-vendor     { background: var(--dot-vendor); }
.dot-doctor     { background: var(--dot-doctor); }
.dot-corporate  { background: var(--dot-corporate); }
.dot-regulatory { background: var(--dot-regulatory); }
.dot-internal   { background: var(--dot-internal); }

.rail-footer {
  margin: 24px 12px 8px 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
  display: flex; flex-direction: column; gap: 6px;
}
.rail-footer-row { display: flex; justify-content: space-between; }
.rail-footer-row span:last-child { color: var(--fg-2); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ── Main content area (list + detail) ───────────────────────── */
.main {
  flex: 1; min-width: 0;
  background: var(--white);
  border-radius: 16px 0 0 0;
  margin-right: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(60,64,67,.06);
}

/* ── List toolbar ───────────────────────────────────────────── */
.list-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 48px; padding: 0 12px;
  flex-shrink: 0;
  border-bottom: 1px solid transparent;
}
.lt-left, .lt-right { display: flex; align-items: center; gap: 2px; }
.pager-info { font-size: 12px; color: var(--muted); margin-right: 8px; font-variant-numeric: tabular-nums; }

.checkbox { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; cursor: pointer; }
.checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.checkbox-box {
  width: 18px; height: 18px; border: 2px solid var(--muted); border-radius: 2px;
  display: inline-block; position: relative;
  transition: background 0.1s, border-color 0.1s;
}
.checkbox input:checked + .checkbox-box {
  background: var(--brand); border-color: var(--brand);
}
.checkbox input:checked + .checkbox-box::after {
  content: ''; position: absolute; left: 4px; top: 0px;
  width: 5px; height: 10px; border: solid white; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ── Gmail-style category tabs ─────────────────────────────── */
.cat-tabs {
  display: flex; align-items: stretch;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  flex-shrink: 0;
  padding: 0 4px;
  overflow-x: auto;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  display: inline-flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 24px;
  min-width: 190px; max-width: 300px;
  background: transparent; border: none; cursor: pointer;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-family: 'Google Sans', 'Roboto', sans-serif;
  font-size: 14px; font-weight: 500;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  white-space: nowrap;
  border-radius: 8px 8px 0 0;
}
.cat-tab:hover { background: rgba(32,33,36,.04); color: var(--fg); }
.cat-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.cat-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.cat-tab svg { flex-shrink: 0; opacity: 0.9; }
.cat-tab span { flex: 1; text-align: left; }
.cat-tab-count {
  font-style: normal; font-size: 12px;
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.cat-tab.active .cat-tab-count { color: var(--brand); }

/* ── Mail list ───────────────────────────────────────────────── */
.mail-list {
  flex: 1; overflow-y: auto;
}
.mail-list::-webkit-scrollbar { width: 12px; }
.mail-list::-webkit-scrollbar-thumb { background: rgba(32,33,36,.20); border-radius: 6px; border: 2px solid var(--white); }

.mail-row {
  display: grid;
  grid-template-columns: 40px 32px minmax(140px, 180px) minmax(0, 1fr) 110px;
  align-items: center;
  column-gap: 8px;
  height: 40px; min-height: 40px;
  padding: 0 8px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  background: var(--white);
  transition: background 0.08s;
}
.mail-row:hover {
  box-shadow:
    inset 1px 0 0 rgba(60,64,67,.15),
    inset -1px 0 0 rgba(60,64,67,.15),
    0 1px 2px 0 rgba(60,64,67,.15),
    0 1px 3px 1px rgba(60,64,67,.10);
  z-index: 1;
}
.mail-row.unread { background: var(--white); }
.mail-row.unread .mr-from,
.mail-row.unread .mr-subject b,
.mail-row.unread .mr-time { color: var(--fg); font-weight: 700; }
.mail-row.selected { background: var(--brand-tint); }
.mail-row.status-approved { background: var(--ok-tint); }
.mail-row.status-edited { background: var(--brand-tint); }
.mail-row.status-rejected { background: var(--danger-tint); }
.mail-row.status-rejected .mr-subject,
.mail-row.status-rejected .mr-from { color: var(--muted); text-decoration: line-through; }
.mail-row.status-sent { background: var(--ok-tint); }

/* Priority accent — a thin coloured left-border, Gmail-Important-marker style */
.mail-row.prio-P1::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px; background: var(--danger); border-radius: 0 2px 2px 0;
}
.mail-row.prio-P2::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px; background: var(--warn); border-radius: 0 2px 2px 0;
}

.mail-row .mr-check { display: flex; align-items: center; justify-content: center; }
.mail-row .mr-star {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; color: var(--muted-2);
  border-radius: 50%; cursor: pointer;
}
.mail-row .mr-star:hover { background: rgba(32,33,36,.06); color: var(--fg); }
.mail-row .mr-star.starred { color: var(--warn); }
.mail-row .mr-from {
  color: var(--fg-2); font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding-right: 8px;
  display: flex; align-items: center; gap: 6px;
}
.mail-row .mr-from .cat-swatch {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.mail-row .mr-subject {
  color: var(--fg-2); font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0; padding-right: 8px;
}
.mail-row .mr-subject b {
  color: var(--fg); font-weight: 500; margin-right: 6px;
}
.mail-row .mr-subject .snippet { color: var(--muted); font-weight: 400; }
.mail-row .mr-subject .inline-chip {
  display: inline-flex; align-items: center; height: 16px;
  padding: 0 6px; margin-left: 6px; border-radius: 3px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.3px;
  vertical-align: 1px;
}

/* Right side: time collapses on row-hover; actions fade in */
.mail-row .mr-right {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 2px;
  position: relative;
  padding-right: 4px;
}
.mail-row .mr-time {
  color: var(--fg-2); font-size: 12px; font-weight: 500;
  text-align: right; white-space: nowrap;
  transition: opacity 0.1s;
}
.mail-row .mr-actions {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  display: none;
  align-items: center; gap: 0;
  background: inherit;
}
.mail-row:hover .mr-time { display: none; }
.mail-row:hover .mr-actions { display: flex; }
.mr-actions .icon-btn { width: 34px; height: 34px; }
.mr-actions .icon-btn svg { width: 18px; height: 18px; }

.mail-empty {
  padding: 80px 24px; text-align: center; color: var(--muted);
}
.mail-empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }
.mail-empty-msg { font-size: 15px; color: var(--fg-2); font-weight: 500; }
.mail-empty-sub { font-size: 13px; margin-top: 4px; }

/* Chip-style mini badge inside list row (for P1 marker + label pill) */
.chip {
  display: inline-flex; align-items: center; padding: 0 6px;
  height: 18px; border-radius: 4px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.2px;
  border: 1px solid transparent; white-space: nowrap;
}
.chip-cat { background: var(--bg); color: var(--fg-2); border-color: var(--border); }
.chip-p1 { background: var(--danger-tint); color: var(--danger); }
.chip-p2 { background: var(--warn-tint); color: #b76400; }
.chip-p3 { background: var(--brand-tint); color: var(--brand-dark); }
.chip-p4 { background: var(--ok-tint); color: var(--ok); }
.chip-auto_draft { background: var(--ok-tint); color: var(--ok); }
.chip-escalate { background: var(--warn-tint); color: #b76400; }
.chip-human_only { background: var(--violet-tint); color: var(--violet); }
.chip-approved { background: var(--ok-tint); color: var(--ok); }
.chip-edited { background: var(--brand-tint); color: var(--brand-dark); }
.chip-rejected { background: var(--danger-tint); color: var(--danger); }
.chip-sent { background: var(--ok-tint); color: var(--ok); }
.chip-pending { background: var(--bg); color: var(--muted); }

/* ── Detail view ─────────────────────────────────────────────── */
.detail-view {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column;
}
.detail-toolbar {
  display: flex; align-items: center; gap: 4px;
  height: 48px; padding: 0 12px;
  flex-shrink: 0;
  border-bottom: 1px solid transparent;
}
.detail-toolbar .spacer { flex: 1; }

.detail-body {
  padding: 12px 40px 60px 40px;
  max-width: 100%;
  min-width: 0;
}
.detail-subject {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0 20px 96px;
  font-size: 22px; font-weight: 400; color: var(--fg);
  border-bottom: none;
}
.detail-subject .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.detail-subject-text { flex: 1; word-break: break-word; }

.detail-message {
  padding: 12px 0 20px 0;
  border-top: 1px solid var(--border);
}
.msg-head {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 8px 0;
}
.msg-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 500; font-size: 16px; flex-shrink: 0;
  text-transform: uppercase;
}
.msg-meta { flex: 1; min-width: 0; }
.msg-from {
  font-size: 14px; color: var(--fg);
}
.msg-from b { font-weight: 700; }
.msg-from .email { color: var(--muted); font-weight: 400; }
.msg-to {
  font-size: 12px; color: var(--muted);
  margin-top: 2px;
}
.msg-date {
  font-size: 12px; color: var(--muted);
  white-space: nowrap; padding-top: 2px;
}

.msg-body {
  padding: 12px 0 24px 56px;
  font-size: 14px; line-height: 1.6; color: var(--fg-2);
  white-space: pre-wrap; word-wrap: break-word;
}

/* ── Smart Reply / draft card ──────────────────────────────── */
.smart-reply {
  margin: 8px 0 20px 56px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.sr-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f3f8ff 0%, #fff5fb 100%);
  border-bottom: 1px solid var(--border);
}
.sr-head-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; color: var(--fg-2);
}
.sr-icon {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, #1a73e8, #a142f4);
  color: white; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.sr-chips { display: flex; gap: 6px; flex-wrap: wrap; }

.sr-body { padding: 16px; }
.sr-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.sr-field label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; font-weight: 600; }
.sr-field input, .sr-field textarea {
  padding: 10px 12px; border: 1px solid var(--border-2); border-radius: 6px;
  font-size: 14px; color: var(--fg); background: var(--white);
  font-family: inherit; line-height: 1.5;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.sr-field input:focus, .sr-field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-tint);
}
.sr-field textarea { min-height: 160px; resize: vertical; }

.sr-actions {
  padding: 12px 16px; background: #fafbfc;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.sr-actions .spacer { flex: 1; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 20px; border: 1px solid transparent;
  font-family: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; background: transparent; color: var(--fg-2);
  transition: background 0.12s, box-shadow 0.12s;
}
.btn:hover { background: rgba(32,33,36,.06); }
.btn-primary { background: var(--brand); color: white; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); box-shadow: var(--shadow-sm); }
.btn-ok { background: var(--ok); color: white; border-color: var(--ok); }
.btn-ok:hover { background: #106a2d; border-color: #106a2d; box-shadow: var(--shadow-sm); }
.btn-danger { color: var(--danger); border-color: var(--danger-tint); background: var(--white); }
.btn-danger:hover { background: var(--danger-tint); }
.btn-ghost { color: var(--fg-2); border-color: var(--border-2); background: var(--white); }
.btn-ghost:hover { background: var(--hover); }

.sr-notice {
  padding: 14px 16px; margin: 0;
  background: var(--warn-tint); color: #7a5000;
  border-bottom: 1px solid var(--border);
  font-size: 13px; line-height: 1.5;
  display: flex; align-items: flex-start; gap: 10px;
}
.sr-notice.human_only { background: var(--violet-tint); color: #57268e; }
.sr-notice svg { flex-shrink: 0; margin-top: 2px; }

.sr-classifier {
  padding: 10px 16px; background: #fafbfc;
  border-top: 1px solid var(--border);
  font-size: 11px; color: var(--muted);
}
.sr-classifier code {
  background: var(--white); border: 1px solid var(--border); padding: 1px 5px; border-radius: 3px;
  font-family: 'Roboto Mono', 'SF Mono', Menlo, monospace; font-size: 10px;
}

.status-banner {
  margin: 8px 0 20px 56px;
  padding: 10px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
}
.status-banner.approved, .status-banner.sent { background: var(--ok-tint); color: var(--ok); }
.status-banner.edited { background: var(--brand-tint); color: var(--brand-dark); }
.status-banner.rejected { background: var(--danger-tint); color: var(--danger); }

/* ── Toast ───────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #323639; color: white; padding: 12px 20px;
  border-radius: 4px; box-shadow: var(--shadow);
  font-size: 13px; z-index: 100;
  animation: toast-in 0.18s ease;
}
.toast.error { background: var(--danger); }
.toast.success { background: #323639; }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ── Responsive collapse ─────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { width: 72px; }
  .rail-label, .rail-count, .rail-section-head span, .rail-footer, .compose { display: none; }
  .compose {
    display: inline-flex; padding: 0; width: 56px; height: 56px;
    justify-content: center; margin: 8px 8px 16px 8px;
  }
  .compose svg { margin: 0; }
  .rail-item { justify-content: center; padding: 0; }
  .rail-item svg, .label-dot { margin: 0 auto; }
  :root { --sidebar-width: 72px; }
  .mail-row { grid-template-columns: 40px 32px 130px minmax(0, 1fr) 60px; }
  .cat-tab { min-width: 130px; padding: 0 12px; }
  .cat-tab span { display: none; }
  .cat-tab-count { display: inline; }
  .detail-body { padding: 12px 20px 60px 20px; }
  .detail-subject { padding-left: 0; }
  .msg-body, .smart-reply, .status-banner { margin-left: 0; padding-left: 0; }
}
