:root {
  --bg: #090909;
  --bg-2: #131313;
  --bg-3: #1b1b1b;
  --panel: rgba(20, 20, 20, 0.94);
  --panel-soft: rgba(27, 27, 27, 0.88);
  --panel-border: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.06);
  --text: #f3f4f6;
  --text-soft: #a1a1aa;
  --text-dim: #71717a;
  --accent: #d6d3d1;
  --accent-strong: #f5f5f4;
  --success: #22c55e;
  --danger: #ef4444;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(120, 113, 108, 0.14), transparent 30%),
    radial-gradient(circle at bottom right, rgba(55, 65, 81, 0.16), transparent 32%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
button,
input,
select,
textarea { font: inherit; }

.guest-shell,
.app-shell { min-height: 100vh; }

.shell-grid {
  display: grid;
  grid-template-columns: 276px 1fr;
  min-height: 100vh;
}

.shell-grid-mail {
  grid-template-columns: 278px 1fr;
}

.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: rgba(12, 12, 12, 0.94);
  backdrop-filter: blur(10px);
}

.app-shell-mail .sidebar {
  background: #121212;
}

.main-panel {
  padding: 18px 22px 24px;
}

.app-shell-mail .main-panel {
  padding: 12px 16px 18px;
}

.brand-block,
.nav-link,
.account-nav-item,
.button,
.folder-link,
.gmail-message-row,
.icon-button {
  transition: 160ms ease;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eceae8, #8a817c);
  color: #050505;
  font-weight: 700;
}

.brand-title { font-size: 1rem; font-weight: 700; }
.brand-subtitle,
.muted,
.sidebar-section-title,
.empty-state p,
.panel p { color: var(--text-soft); }

.compose-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 18px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f2f2f1, #d6d3d1);
  color: #0f0f0f;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.nav-list,
.account-nav,
.stack-lg,
.stack-xl,
.simple-list,
.account-tree-list {
  display: grid;
  gap: 10px;
}

.nav-link,
.account-nav-item,
.folder-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text-soft);
  border: 1px solid transparent;
}

.nav-link:hover,
.account-nav-item:hover,
.folder-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.nav-link.is-active,
.account-nav-item.is-active,
.folder-link.is-active {
  background: rgba(214, 211, 209, 0.16);
  color: var(--accent-strong);
}

.folder-link-icon {
  width: 16px;
  text-align: center;
  color: #8ab4f8;
}

.account-tree-copy small,
.user-chip small {
  color: var(--text-dim);
}

.account-tree {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.account-tree-summary {
  display: grid;
  grid-template-columns: 36px 1fr auto 16px;
  gap: 12px;
  align-items: center;
  list-style: none;
  cursor: pointer;
  padding: 12px;
}

.account-tree-summary::-webkit-details-marker { display: none; }

.account-tree-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--accent-strong);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.account-tree-avatar-image {
  object-fit: cover;
  display: block;
}

.account-tree-copy {
  display: grid;
  min-width: 0;
}

.account-tree-copy strong,
.account-tree-copy small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-tree-summary i {
  color: var(--text-dim);
}

.account-tree-badge,
.notification-status-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.28);
}

.notification-status-dot {
  min-width: 26px;
  height: 26px;
}

.account-tree[open] .account-tree-summary i {
  transform: rotate(180deg);
}

.account-tree-folders {
  display: grid;
  gap: 4px;
  padding: 0 8px 8px 52px;
}

.account-tree-list {
  max-height: calc(100vh - 300px);
  overflow-y: auto;
  padding-right: 4px;
}

.logout-form,
.nav-list-secondary {
  margin-top: 14px;
}

.topbar,
.page-header,
.panel-header,
.hero-actions,
.form-actions,
.table-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar {
  margin-bottom: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  min-width: min(520px, 100%);
  max-width: 760px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
}

.app-shell-mail .topbar-search {
  background: #262626;
}

.page-header {
  margin-bottom: 18px;
}

.page-header h1,
.panel h2,
.panel h3,
.panel h4,
.guest-card h1,
.message-view-header h2 {
  margin: 0;
}

.eyebrow,
.guest-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  font-size: 0.72rem;
  margin: 0 0 10px;
}

.user-chip,
.panel,
.subpanel,
.guest-card,
.guest-brand {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.user-chip,
.guest-card,
.guest-brand {
  border-radius: 20px;
  padding: 16px 18px;
}

.user-chip {
  display: inline-grid;
  justify-items: end;
  min-width: 180px;
}

.notification-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.notification-toggle:hover {
  background: rgba(255, 255, 255, 0.07);
}

.notification-toggle.is-enabled {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
  color: #dcfce7;
}

.notification-toggle.is-blocked {
  border-color: rgba(239, 68, 68, 0.25);
  color: #fecaca;
}

.panel,
.subpanel {
  border-radius: 24px;
  padding: 22px;
}

.alert {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
}

.alert-success {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.3);
}

.alert-error {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
}

.button:hover { transform: translateY(-1px); }
.button-full { width: 100%; }
.button-primary {
  background: linear-gradient(180deg, #f5f5f4, #a8a29e);
  color: #090909;
}
.button-muted,
.button-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--panel-border);
  color: var(--text);
}
.button-danger {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: #fecaca;
}

.guest-login-shell {
  display: grid;
  gap: 22px;
  align-content: center;
  justify-items: center;
  min-height: 100vh;
  max-width: 460px;
  margin: 0 auto;
  padding: 32px 20px;
}

.guest-login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.guest-login-brand-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 3.5rem);
  line-height: 0.95;
}

.guest-login-brand-copy p {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.guest-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f5f5f4, #8a817c);
  color: #050505;
  font-size: 1.4rem;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.guest-login-card {
  width: 100%;
  padding: 28px 24px 24px;
  background:
    radial-gradient(circle at top right, rgba(138, 180, 248, 0.06), transparent 28%),
    rgba(20, 20, 20, 0.96);
}

.guest-login-header {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.guest-login-header h2 {
  margin: 0;
  font-size: 1.55rem;
}

.guest-login-header p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.dashboard-grid,
.content-grid {
  display: grid;
  gap: 20px;
}

.dashboard-grid { grid-template-columns: 1.45fr 1fr; }
.dashboard-grid > :first-child { grid-column: span 2; }
.content-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mail-home {
  display: grid;
  gap: 18px;
}

.mail-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.25fr);
  gap: 18px;
}

.mail-home-hero {
  padding-bottom: 18px;
}

.dashboard-message-list {
  border-top: 1px solid var(--line);
  margin-top: 10px;
}

.dashboard-message-list .gmail-message-row {
  padding-left: 6px;
  padding-right: 10px;
}

.panel-hero {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(36, 36, 36, 0.98), rgba(14, 14, 14, 0.98));
}

.hero-copy { max-width: 720px; }

.hero-stats {
  display: flex;
  gap: 16px;
  margin: 20px 0 18px;
}

.hero-stat {
  min-width: 140px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.hero-stat-label {
  display: block;
  color: var(--text-dim);
  font-size: 0.78rem;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.badge,
.pill,
.attachment-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--panel-border);
  color: var(--text-soft);
  font-size: 0.85rem;
}

.account-list,
.message-list {
  display: grid;
  gap: 14px;
}

.account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.02);
}

.account-card-main,
.account-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-avatar,
.message-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--accent-strong);
  font-weight: 700;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.account-avatar-image {
  object-fit: cover;
  display: block;
}

.account-table-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.account-avatar-preview {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 22px;
}

.avatar-upload-fields {
  flex: 1;
}

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }

.table th,
.table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--panel-border);
  text-align: left;
}

.field {
  display: grid;
  gap: 8px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.field select {
  color-scheme: dark;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-soft) 50%),
    linear-gradient(135deg, var(--text-soft) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.field select option,
.field select optgroup {
  background: #1f1f1f;
  color: var(--text);
}

.field textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field-span-2 { grid-column: span 2; }
.checkbox { display: inline-flex; align-items: center; gap: 10px; }
.empty-state { padding: 30px 12px 10px; }
.simple-list { padding-left: 20px; }

.mail-workspace {
  min-width: 0;
}

.gmail-content {
  padding: 0;
  border-radius: 24px;
  overflow: hidden;
  background: #1a1a1a;
}

.gmail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #202020;
}

.mail-toolbar-left,
.mail-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--text-soft);
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.icon-button-action {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #d6d3d1;
}

.icon-button-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: translateY(-1px);
}

.icon-button-danger {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.08);
}

.icon-button-danger:hover {
  background: rgba(239, 68, 68, 0.16);
  color: #ffffff;
}

.mail-toolbar-count {
  color: var(--text-dim);
  font-size: 0.84rem;
}

.gmail-main {
  display: grid;
  grid-template-columns: minmax(420px, 700px) minmax(520px, 1fr);
  min-height: calc(100vh - 126px);
}

.gmail-list-full {
  min-width: 0;
  background: #202020;
}

.gmail-read-full {
  min-width: 0;
  background: #171717;
}

.gmail-list-pane {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: #202020;
}

.gmail-read-pane {
  min-width: 0;
  background: #171717;
}

.gmail-list-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}

.gmail-list-header h3 {
  font-size: 1.05rem;
}

.gmail-message-list {
  gap: 0;
}

.gmail-message-row {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr) 96px;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-top: 1px solid var(--line);
  background: transparent;
}

.gmail-message-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.gmail-message-row.is-unread {
  background: rgba(255, 255, 255, 0.06);
}

.gmail-message-row.is-selected {
  background: rgba(214, 211, 209, 0.09);
}

.gmail-row-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  white-space: nowrap;
  min-width: 0;
}

.gmail-row-sender,
.gmail-row-subject {
  min-width: 0;
  overflow: hidden;
}

.gmail-row-sender {
  font-weight: 600;
  color: #e7e5e4;
  font-size: 0.88rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.thread-count {
  color: var(--text-dim);
  margin-left: 6px;
  font-size: 0.82rem;
}

.gmail-row-subject-line {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gmail-row-subject strong {
  font-size: 0.88rem;
  font-weight: 600;
}

.gmail-row-snippet {
  color: var(--text-soft);
  margin-left: 6px;
  font-size: 0.84rem;
}

.gmail-row-meta {
  justify-content: flex-end;
  font-size: 0.78rem;
  min-width: 96px;
}

.gmail-row-date {
  display: inline-block;
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.gmail-empty-state {
  padding: 40px 22px 52px;
}

.message-view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 10px;
  border-bottom: 1px solid var(--line);
}

.message-view-header-full {
  padding-top: 16px;
}

.message-view-backwrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.icon-button-back {
  margin-top: 2px;
}

.message-view-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.message-action-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-view-meta {
  padding: 14px 20px 10px;
}

.message-view-person {
  display: flex;
  align-items: center;
  gap: 14px;
}

.message-view-person strong,
.message-view-person small {
  display: block;
}

.message-view-person small {
  color: var(--text-dim);
}

.attachment-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 20px 16px;
}

.message-view-body {
  padding: 0 20px 18px;
}

.message-view-body-html {
  padding-top: 6px;
}

.thread-stack {
  display: grid;
  gap: 14px;
  padding: 0 20px 20px;
}

.thread-message-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.thread-message-card.is-active {
  border-color: rgba(255, 255, 255, 0.14);
}

.thread-message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px 10px;
}

.thread-message-date {
  color: var(--text-dim);
  font-size: 0.82rem;
  white-space: nowrap;
}

.message-html-frame {
  width: 100%;
  min-height: min(78vh, 900px);
  border: 0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

.message-text-body {
  padding: 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  line-height: 1.6;
}

.gmail-empty-read {
  display: grid;
  place-content: center;
  min-height: 100%;
  padding: 24px;
  color: var(--text-soft);
}

.reply-composer {
  margin: 0 20px 20px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.reply-composer-header {
  margin-bottom: 14px;
}

.reply-composer-header h3 {
  margin: 0 0 6px;
}

.reply-composer textarea {
  min-height: 180px;
}

.reply-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-page {
  display: grid;
  gap: 18px;
  max-width: 1120px;
}

.settings-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.settings-hero h2 {
  margin: 0 0 8px;
}

.settings-security-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.settings-stack {
  display: grid;
  gap: 18px;
}

.settings-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.settings-panel {
  min-width: 0;
}

.settings-actions {
  display: flex;
  justify-content: flex-start;
}

.settings-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.settings-callout i {
  color: #8ab4f8;
  margin-top: 2px;
}

.settings-callout p {
  margin: 4px 0 0;
}

.two-factor-qr-block {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.two-factor-qr-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 164px;
  height: 164px;
  padding: 12px;
  border-radius: 20px;
  background: #ffffff;
  flex: 0 0 164px;
}

.two-factor-qr-image {
  display: block;
  width: 100%;
  height: auto;
}

.two-factor-qr-copy {
  display: grid;
  gap: 6px;
}

.settings-activity-list {
  display: grid;
  gap: 10px;
}

.settings-activity-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.settings-activity-item p {
  margin: 4px 0 0;
}

.settings-activity-item time {
  color: var(--text-dim);
  font-size: 0.82rem;
  white-space: nowrap;
}

.settings-empty {
  padding-top: 12px;
}

@media (max-width: 1180px) {
  .gmail-main {
    grid-template-columns: 1fr;
  }

  .gmail-list-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 1080px) {
  .shell-grid,
  .dashboard-grid,
  .content-grid,
  .settings-grid-two {
    grid-template-columns: 1fr;
  }

  .dashboard-grid > :first-child {
    grid-column: auto;
  }

  .sidebar {
    gap: 24px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-search,
  .user-chip {
    min-width: 0;
    width: 100%;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .gmail-message-row {
    grid-template-columns: 1fr;
    row-gap: 6px;
    padding: 10px 14px;
  }

  .gmail-row-sender,
  .gmail-row-subject,
  .gmail-row-meta {
    grid-column: 1;
  }

  .gmail-row-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .main-panel,
  .sidebar,
  .guest-login-shell {
    padding: 18px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-span-2 {
    grid-column: auto;
  }

  .page-header,
  .panel-header,
  .form-actions,
  .table-actions,
  .hero-stats,
  .settings-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .compose-button,
  .nav-link,
  .folder-link {
    width: 100%;
  }

  .avatar-upload-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .message-view-body,
  .message-view-meta,
  .message-view-header,
  .attachment-strip,
  .reply-composer,
  .thread-stack,
  .thread-message-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .reply-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .settings-activity-item {
    flex-direction: column;
  }

  .two-factor-qr-block {
    flex-direction: column;
    align-items: flex-start;
  }
}
