:root {
  color-scheme: light;
  --bg: #f4efe7;
  --panel: rgba(255, 252, 247, 0.88);
  --panel-strong: #fffaf2;
  --text: #16110d;
  --muted: #6b5d51;
  --line: rgba(22, 17, 13, 0.1);
  --accent: #c45a2d;
  --accent-dark: #8c3915;
  --danger: #8b281b;
  --success: #0d6c4d;
  --shadow: 0 24px 70px rgba(111, 64, 29, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(196, 90, 45, 0.18), transparent 34%),
    radial-gradient(circle at bottom right, rgba(16, 87, 76, 0.18), transparent 26%),
    linear-gradient(135deg, #f7f1e8 0%, #efe5d7 45%, #e7dccd 100%);
}

body.mailbox-mode {
  background:
    radial-gradient(circle at top left, rgba(57, 106, 177, 0.16), transparent 30%),
    radial-gradient(circle at bottom right, rgba(51, 132, 104, 0.14), transparent 26%),
    linear-gradient(180deg, #edf3fb 0%, #e8eef8 34%, #eef2f7 100%);
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

body.mailbox-authenticated .shell {
  width: min(1600px, calc(100% - 28px));
  padding-top: 18px;
}

.hero {
  padding: 24px 8px 32px;
}

body.mailbox-authenticated .hero {
  display: none;
}

.eyebrow,
.section-label {
  margin: 0 0 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-dark);
}

.hero h1,
.panel h2,
.card h3 {
  margin: 0;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  line-height: 0.96;
}

.lede {
  max-width: 720px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.05rem;
}

.panel,
.card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.panel {
  padding: 28px;
}

.login-panel {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.1fr 1fr;
}

form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  font-size: 0.94rem;
  color: var(--muted);
}

input,
select {
  width: 100%;
  border: 1px solid rgba(22, 17, 13, 0.14);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  background: rgba(255, 255, 255, 0.72);
}

button {
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  cursor: pointer;
}

button.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
}

button.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--line);
}

button.danger {
  background: linear-gradient(135deg, #a93b2a 0%, #7e2117 100%);
}

.message {
  min-height: 1.2rem;
  color: var(--accent-dark);
}

.message.success {
  color: var(--success);
}

.hidden {
  display: none !important;
}

.dashboard {
  margin-top: 28px;
}

body.mailbox-authenticated .dashboard {
  margin-top: 0;
}

body.mailbox-authenticated #mailbox-dashboard-panel {
  border: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  padding: 0;
}

.mailbox-app-shell {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 0;
  min-height: calc(100vh - 36px);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(248, 250, 253, 0.96);
  box-shadow: 0 28px 60px rgba(33, 56, 97, 0.16);
}

.mailbox-nav-rail {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 20px;
  padding: 18px 14px;
  background: linear-gradient(180deg, #2b3f5c 0%, #24354d 100%);
  color: #eef4ff;
}

.mailbox-app-mark-wrap {
  display: flex;
  justify-content: center;
}

.mailbox-nav-stack {
  display: grid;
  align-content: start;
  gap: 12px;
}

.mailbox-nav-icon {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 100%;
  padding: 10px 6px;
  border-radius: 18px;
  background: transparent;
  color: #dbe8ff;
}

.mailbox-nav-icon.active {
  background: rgba(255, 255, 255, 0.12);
}

.mailbox-nav-glyph {
  font-size: 1.1rem;
  line-height: 1;
}

.mailbox-nav-label {
  font-size: 0.72rem;
  font-weight: 700;
}

.mailbox-rail-footer {
  display: grid;
  gap: 10px;
}

.mailbox-main-surface {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
}

.mailbox-app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(39, 62, 101, 0.08);
  background: rgba(255, 255, 255, 0.86);
}

.mailbox-app-branding {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mailbox-app-mark {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2c5aa0 0%, #23406d 100%);
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.96rem;
  letter-spacing: 0.08em;
}

.dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.stat-card {
  padding: 18px;
  border-radius: 24px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  margin-top: 10px;
}

.two-columns {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
}

.mailbox-columns {
  margin-top: 20px;
}

.mailbox-topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: stretch;
  margin-top: 22px;
}

body.mailbox-authenticated .mailbox-topbar {
  margin-top: 18px;
}

.mailbox-search-shell {
  flex: 1 1 420px;
  display: grid;
  gap: 8px;
}

.mailbox-search-shell span {
  font-size: 0.9rem;
  color: var(--muted);
}

.mailbox-search-shell input {
  height: 52px;
  border-radius: 18px;
  padding-left: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.mailbox-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.mailbox-address-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: #eef4ff;
  overflow-wrap: anywhere;
}

.mailbox-client-layout {
  display: grid;
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr) minmax(260px, 320px);
  gap: 0;
  min-height: 0;
}

.mailbox-list-panel,
.mailbox-reader,
.mailbox-context-panel {
  min-height: 0;
}

body.mailbox-authenticated .mailbox-list-panel,
body.mailbox-authenticated .mailbox-list-panel,
body.mailbox-authenticated .mailbox-reader,
body.mailbox-authenticated .mailbox-context-panel {
  border-radius: 0;
  box-shadow: none;
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  background: transparent;
}

.mailbox-list-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  padding: 18px 18px 0;
  border-right: 1px solid rgba(39, 62, 101, 0.08);
  background: rgba(248, 250, 253, 0.92);
}

.mailbox-list-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.mailbox-list-caption {
  color: var(--muted);
  font-size: 0.9rem;
}

.mailbox-thread-list {
  display: grid;
  gap: 8px;
  align-content: start;
  padding-top: 14px;
  padding-right: 8px;
  max-height: calc(100vh - 220px);
  overflow: auto;
}

.mailbox-thread-list::-webkit-scrollbar {
  width: 10px;
}

.mailbox-thread-list::-webkit-scrollbar-thumb {
  background: rgba(35, 64, 109, 0.18);
  border-radius: 999px;
}

.mailbox-thread-item {
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(35, 64, 109, 0.08);
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 8px 20px rgba(52, 83, 130, 0.05);
}

.mailbox-thread-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.mailbox-thread-avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  color: #23406d;
  background: linear-gradient(135deg, rgba(44, 90, 160, 0.16) 0%, rgba(92, 143, 223, 0.14) 100%);
}

.mailbox-thread-main {
  min-width: 0;
  flex: 1;
}

.mailbox-thread-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.mailbox-thread-date {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.8rem;
  font-family: 'IBM Plex Mono', monospace;
}

.mailbox-thread-item strong {
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mailbox-thread-from,
.mailbox-thread-preview {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.mailbox-thread-preview {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mailbox-thread-item.active {
  border-color: rgba(44, 90, 160, 0.28);
  background: linear-gradient(135deg, rgba(44, 90, 160, 0.08) 0%, rgba(255, 255, 255, 0.98) 100%);
  box-shadow: 0 18px 34px rgba(52, 83, 130, 0.12);
}

.mailbox-empty-state {
  padding: 24px;
  border-radius: 22px;
  border: 1px dashed rgba(22, 17, 13, 0.18);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
}

.mailbox-reader {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  padding: 24px 28px;
  background: rgba(255, 255, 255, 0.96);
}

.mailbox-reader-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.mailbox-reader .email-viewer-body {
  min-height: calc(100vh - 280px);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  line-height: 1.65;
  font-size: 0.95rem;
}

.mailbox-context-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 22px 20px;
  border-left: 1px solid rgba(39, 62, 101, 0.08);
  background: rgba(245, 248, 252, 0.98);
}

.mailbox-sidebar-block {
  display: grid;
  gap: 12px;
}

.mailbox-sidebar-block h3 {
  margin: 0;
}

.mailbox-sidebar-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.card {
  padding: 22px;
}

.definition-list,
.email-item {
  margin: 0;
}

.definition-list {
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.definition-list li,
.email-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.definition-list li:last-child,
.email-item:last-child {
  border-bottom: 0;
}

.definition-list span,
.email-meta {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.emails-list {
  display: grid;
  gap: 6px;
}

.email-item {
  cursor: pointer;
}

.email-item strong {
  font-size: 0.98rem;
}

.management-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.stack-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pill {
  min-width: 42px;
  padding: 8px 12px;
  border-radius: 999px;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  background: rgba(196, 90, 45, 0.12);
  color: var(--accent-dark);
}

.compact-form {
  display: grid;
  gap: 12px;
}

.stack-list {
  display: grid;
  gap: 10px;
}

.stack-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
}

.stack-item strong,
.stack-item span {
  display: block;
}

.stack-item span {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 4px;
}

.stack-item code {
  display: block;
  margin-top: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  color: var(--accent-dark);
  overflow-wrap: anywhere;
}

.status-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-family: 'IBM Plex Mono', monospace;
  border: 1px solid var(--line);
}

.status-badge.ok {
  background: rgba(13, 108, 77, 0.12);
  color: var(--success);
}

.status-badge.pending {
  background: rgba(196, 90, 45, 0.12);
  color: var(--accent-dark);
}

.status-badge.warn {
  background: rgba(139, 40, 27, 0.12);
  color: var(--danger);
}

.status-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.status-list span {
  margin-top: 0;
}

.modal-shell {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 40;
}

.modal-shell.hidden,
.modal-output.hidden {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 17, 13, 0.42);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(640px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  padding: 24px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.modal-output {
  margin: 0;
  min-height: 120px;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.84rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.action-row button,
.action-row a {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  text-decoration: none;
}

.action-row a {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
}

.email-viewer-meta {
  color: var(--muted);
  font-size: 0.92rem;
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.email-viewer-body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: 'IBM Plex Mono', monospace;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  min-height: 220px;
}

@media (max-width: 860px) {
  .login-panel,
  .two-columns,
  .stats-grid,
  .management-grid {
    grid-template-columns: 1fr;
  }

  .mailbox-app-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .mailbox-nav-rail {
    grid-template-columns: 1fr;
  }

  .mailbox-client-layout {
    grid-template-columns: 1fr;
  }

  .mailbox-list-panel,
  .mailbox-reader,
  .mailbox-context-panel {
    border-right: 0;
    border-left: 0;
  }

  .mailbox-app-header {
    flex-direction: column;
    align-items: stretch;
  }

  .mailbox-topbar-actions {
    justify-content: flex-start;
  }

  .dashboard-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .modal-head {
    flex-direction: column;
  }
}

body.mailbox-authenticated {
  background: #eef2f7;
}

body.mailbox-authenticated .shell {
  width: min(1800px, calc(100% - 16px));
  padding: 8px 0;
}

body.mailbox-authenticated .mailbox-app-shell {
  grid-template-columns: 78px minmax(0, 1fr);
  min-height: calc(100vh - 16px);
  border-radius: 18px;
  background: #f7f9fc;
  box-shadow: 0 18px 40px rgba(30, 48, 78, 0.12);
}

body.mailbox-authenticated .mailbox-pro-rail {
  padding: 14px 10px;
  background: linear-gradient(180deg, #324050 0%, #273544 100%);
  color: #eaf2ff;
}

body.mailbox-authenticated .mailbox-app-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7bb2ff 0%, #4c89dd 100%);
  color: #ffffff;
  font-size: 0.82rem;
}

body.mailbox-authenticated .mailbox-pro-nav-stack {
  gap: 10px;
}

body.mailbox-authenticated .mailbox-nav-icon {
  padding: 10px 4px;
  border-radius: 14px;
  background: transparent;
  color: rgba(234, 242, 255, 0.82);
}

body.mailbox-authenticated .mailbox-nav-icon.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

body.mailbox-authenticated .mailbox-nav-glyph {
  font-size: 1rem;
}

body.mailbox-authenticated .mailbox-nav-label {
  font-size: 0.68rem;
  font-weight: 600;
}

body.mailbox-authenticated .mailbox-pro-rail-footer .secondary {
  width: 100%;
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

body.mailbox-authenticated .mailbox-pro-surface {
  grid-template-rows: auto minmax(0, 1fr);
  background: #f7f9fc;
}

body.mailbox-authenticated .mailbox-pro-header {
  padding: 16px 20px;
  background: #ffffff;
  border-bottom: 1px solid rgba(34, 50, 80, 0.08);
}

body.mailbox-authenticated .mailbox-pro-branding .section-label {
  color: #7f8da3;
}

body.mailbox-authenticated .mailbox-pro-branding h2 {
  font-size: 1.5rem;
  line-height: 1.1;
}

body.mailbox-authenticated .mailbox-pro-actions {
  gap: 12px;
}

body.mailbox-authenticated .mailbox-summary-pill {
  min-width: 122px;
  justify-content: center;
  background: #edf3ff;
  color: #355f9d;
}

body.mailbox-authenticated .mailbox-pro-search {
  min-width: 360px;
}

body.mailbox-authenticated .mailbox-pro-search span {
  display: none;
}

body.mailbox-authenticated .mailbox-pro-search input {
  height: 44px;
  border-radius: 10px;
  border: 1px solid #d8e0eb;
  background: #f4f7fb;
  box-shadow: none;
}

body.mailbox-authenticated .mailbox-pro-layout {
  grid-template-columns: 360px minmax(0, 1fr) 320px;
  gap: 0;
}

body.mailbox-authenticated .mailbox-pro-list-panel {
  padding: 0;
  background: #ffffff;
  border-right: 1px solid rgba(34, 50, 80, 0.08);
}

body.mailbox-authenticated .mailbox-pro-list-head {
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(34, 50, 80, 0.08);
}

body.mailbox-authenticated .mailbox-pro-list-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.mailbox-authenticated #mailbox-folder-count {
  min-width: auto;
  border-radius: 10px;
  background: #e9f1ff;
  color: #3566b6;
}

body.mailbox-authenticated #mailbox-nav-inbox-count {
  color: #7f8da3;
  font-size: 0.88rem;
}

body.mailbox-authenticated .mailbox-pro-thread-list {
  padding: 12px;
  max-height: calc(100vh - 155px);
  background: #ffffff;
}

body.mailbox-authenticated .mailbox-thread-item {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #ffffff;
  box-shadow: none;
  position: relative;
}

body.mailbox-authenticated .mailbox-thread-item:hover {
  background: #f5f8fc;
}

body.mailbox-authenticated .mailbox-thread-item.is-unread::before {
  content: '';
  position: absolute;
  top: 18px;
  right: 16px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4d82d6;
}

body.mailbox-authenticated .mailbox-thread-item.is-unread strong,
body.mailbox-authenticated .mailbox-thread-item.is-unread .mailbox-thread-from {
  color: #233552;
}

body.mailbox-authenticated .mailbox-thread-item.is-read {
  opacity: 0.82;
}

body.mailbox-authenticated .mailbox-thread-item.active {
  background: #eef5ff;
  border-color: #d7e5fb;
  box-shadow: none;
  opacity: 1;
}

body.mailbox-authenticated .mailbox-thread-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #eaf1fb;
  color: #3a5c92;
}

body.mailbox-authenticated .mailbox-thread-header strong {
  font-size: 0.95rem;
}

body.mailbox-authenticated .mailbox-thread-date,
body.mailbox-authenticated .mailbox-thread-preview,
body.mailbox-authenticated .mailbox-thread-from {
  color: #7f8da3;
}

body.mailbox-authenticated .mailbox-pro-reader {
  padding: 18px 22px;
  background: #ffffff;
}

body.mailbox-authenticated .mailbox-pro-reader-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(34, 50, 80, 0.08);
}

body.mailbox-authenticated .mailbox-reader-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.mailbox-authenticated .mailbox-reader-toolbar button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

body.mailbox-authenticated .mailbox-pro-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-bottom: 6px;
  color: #6e7d93;
}

body.mailbox-authenticated .mailbox-meta-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(34, 50, 80, 0.08);
  background: #f7f9fc;
}

body.mailbox-authenticated .mailbox-meta-card strong {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #789;
}

body.mailbox-authenticated .mailbox-meta-card span {
  color: #243244;
  word-break: break-word;
}

body.mailbox-authenticated .mailbox-pro-body {
  min-height: calc(100vh - 220px);
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(34, 50, 80, 0.08);
  background: #fbfcfe;
  box-shadow: none;
  color: #243244;
}

body.mailbox-authenticated .mailbox-pro-context-panel {
  padding: 18px;
  background: #f7f9fc;
  border-left: 1px solid rgba(34, 50, 80, 0.08);
}

body.mailbox-authenticated .mailbox-pro-account-header {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(34, 50, 80, 0.08);
}

body.mailbox-authenticated .mailbox-pro-context-panel .mailbox-address-chip {
  width: 100%;
  justify-content: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #d8e0eb;
  color: #3a4b61;
}

body.mailbox-authenticated .mailbox-pro-context-panel .definition-list li {
  padding: 10px 0;
}

@media (max-width: 1100px) {
  body.mailbox-authenticated .mailbox-pro-meta {
    grid-template-columns: 1fr;
  }
}

body.mailbox-authenticated .mailbox-pro-context-panel input {
  border-radius: 10px;
  border: 1px solid #d8e0eb;
  background: #ffffff;
}

body.mailbox-authenticated .mailbox-pro-context-panel button {
  border-radius: 12px;
  background: linear-gradient(135deg, #5d91e2 0%, #3566b6 100%);
}

@media (max-width: 1100px) {
  body.mailbox-authenticated .mailbox-pro-layout {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  body.mailbox-authenticated .mailbox-pro-context-panel {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid rgba(34, 50, 80, 0.08);
  }
}

@media (max-width: 860px) {
  body.mailbox-authenticated .mailbox-app-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  body.mailbox-authenticated .mailbox-nav-rail {
    grid-template-rows: auto auto auto;
    grid-template-columns: 1fr;
  }

  body.mailbox-authenticated .mailbox-pro-layout {
    grid-template-columns: 1fr;
  }

  body.mailbox-authenticated .mailbox-pro-search {
    min-width: 0;
    width: 100%;
  }
}