﻿/*!
 * РђРІС‚РѕСЂ: Р§РµРїРµР»Р° Р”Р°РЅРёСЌР»СЊ РњР°РєСЃРёРјРѕРІРёС‡ x0do.it
 * GitHub: https://github.com/x0doit
 * РљРѕРґ Р·Р°СЂРµРіРёСЃС‚СЂРёСЂРѕРІР°РЅ РєР°Рє РїСЂРѕРіСЂР°РјРјР° РґР»СЏ Р­Р’Рњ. РСЃРїРѕР»СЊР·РѕРІР°РЅРёРµ, РєРѕРїРёСЂРѕРІР°РЅРёРµ,
 * РјРѕРґРёС„РёРєР°С†РёСЏ Рё СЂР°СЃРїСЂРѕСЃС‚СЂР°РЅРµРЅРёРµ Р±РµР· Р»РёС†РµРЅР·РёРё Р°РІС‚РѕСЂР° Р·Р°РїСЂРµС‰РµРЅС‹.
 */

:root {
  color-scheme: dark;
  --bg: #0b0b0e;
  --panel: #15151a;
  --panel-2: #1c1b22;
  --panel-3: #24222b;
  --line: #2a2833;
  --line-soft: #201f27;
  --text: #f1effa;
  --text-soft: #c8c2d8;
  --muted: #807991;
  --muted-2: #5e596e;
  --accent: #7c5cff;
  --accent-2: #a88cff;
  --success: #3bd179;
  --danger: #ef6c79;
  --warning: #f4b84f;
  --shadow: 0 24px 80px rgba(0, 0, 0, .5);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
}

body[data-theme="graphite"] {
  --bg: #101114;
  --panel: #191b20;
  --panel-2: #20232a;
  --panel-3: #292d35;
  --line: #323743;
  --line-soft: #262a33;
  --text: #f3f5f8;
  --text-soft: #c6ccd8;
  --muted: #8a91a0;
  --accent: #8f7cff;
}

body[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6fa;
  --panel: #ffffff;
  --panel-2: #f0f2f7;
  --panel-3: #e7eaf2;
  --line: #d7dce7;
  --line-soft: #e2e6ef;
  --text: #171821;
  --text-soft: #343848;
  --muted: #737a8d;
  --muted-2: #8e96a8;
  --shadow: 0 24px 80px rgba(16, 24, 40, .18);
}

body[data-typography="jetbrains-mono"] {
  --font: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

body[data-typography="system"] {
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-density="compact"] {
  font-size: 13px;
}

body[data-density="comfortable"] {
  font-size: 15px;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

.mail-shell {
  min-height: 100vh;
  background: var(--bg);
}

.boot-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  gap: 14px;
  color: var(--muted);
}

.boot-screen > div:last-child {
  display: grid;
  gap: 4px;
  text-align: center;
}

.boot-screen strong {
  color: var(--text);
  font-size: 17px;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #6f4dff);
  box-shadow: 0 10px 28px rgba(124, 92, 255, .3);
}

.brand-mark svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-frame {
  display: grid;
  grid-template-columns: 240px 344px minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  background: var(--bg);
}

.app-frame > * {
  min-width: 0;
  min-height: 0;
}

body[data-layout="wide-reader"] .app-frame {
  grid-template-columns: 240px 304px minmax(0, 1fr);
}

body[data-layout="wide-list"] .app-frame {
  grid-template-columns: 240px minmax(420px, 42vw) minmax(0, 1fr);
}

body[data-layout="focused"] .app-frame {
  grid-template-columns: 0 360px minmax(0, 1fr);
}

body[data-layout="focused"] .sidebar {
  visibility: hidden;
  pointer-events: none;
}

.app-frame.sidebar-collapsed {
  grid-template-columns: 0 344px minmax(0, 1fr);
}

.sidebar {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100vh;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--line-soft);
  background: #151519;
}

.sidebar-collapsed .sidebar {
  visibility: hidden;
  border-right: 0;
  pointer-events: none;
}

.sidebar-top {
  height: auto;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 61px;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.auth-brand {
  border: 0;
  padding: 0;
}

.brand-name {
  display: inline-flex;
  align-items: baseline;
  min-width: 0;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-name span:last-child {
  color: var(--accent-2);
}

.icon-btn,
.plain-btn,
.nav-item,
.folder-action,
.seg-btn,
.settings-tab,
.mail-action {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-btn {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
}

.icon-btn:hover,
.icon-btn:focus-visible {
  background: var(--panel-2);
  color: var(--text);
  outline: none;
}

.brand-row .icon-btn {
  margin-left: auto;
}

.icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: currentColor;
}

.icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.compose-main {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: calc(100% - 20px);
  height: 40px;
  margin: 13px 10px;
  padding: 0 16px;
  gap: 10px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 9px 24px rgba(124, 92, 255, .25);
}

.compose-main:hover,
.compose-main:focus-visible {
  background: #8b72ff;
  outline: none;
}

.nav-section {
  padding: 0 8px 8px;
}

.nav-rule {
  height: 1px;
  margin: 8px 4px;
  background: var(--line-soft);
}

.nav-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 31px;
  margin: 1px 0;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--text-soft);
  text-align: left;
}

.nav-item:hover,
.nav-item:focus-visible {
  background: #22212a;
  color: var(--text);
  outline: none;
}

.nav-item.active {
  background: var(--panel-3);
  color: var(--text);
}

.nav-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.count-pill {
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--panel-3);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.account-card {
  padding: 8px 8px 3px;
}

.account-head {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 30px;
  align-items: center;
  min-height: 50px;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--text-soft);
}

.account-settings-btn {
  width: 28px;
  height: 28px;
  justify-self: end;
}

.account-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.account-name {
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-email {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-list {
  padding-left: 24px;
}

.folder-action {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 27px;
  padding: 4px 10px;
  color: var(--muted);
  text-align: left;
}

.folder-inline {
  display: grid;
  grid-template-columns: 1fr 24px 24px;
  gap: 3px;
  align-items: center;
  padding: 3px 10px 3px 50px;
}

.folder-inline input {
  width: 100%;
  height: 26px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text);
  padding: 0 8px;
}

.folder-inline button {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: var(--panel-3);
  color: var(--text);
  cursor: pointer;
}

.sidebar-footer {
  z-index: 1;
  display: grid;
  gap: 3px;
  padding: 10px 8px 12px;
  border-top: 1px solid var(--line-soft);
  background: #151519;
  box-shadow: 0 -10px 24px rgba(0, 0, 0, .18);
}

.message-list {
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-width: 0;
  border-right: 1px solid var(--line-soft);
  background: #101014;
}

.list-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 51px;
  padding: 11px 16px 8px;
}

.mobile-menu-btn {
  display: none;
}

.sidebar-collapsed .mobile-menu-btn {
  display: inline-grid;
  flex: 0 0 auto;
}

.list-title {
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-total {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 13px;
}

.seg-btn,
.list-size {
  height: 27px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
}

.seg-btn {
  min-width: 56px;
  padding: 0 10px;
}

.seg-btn.active {
  border-color: rgba(124, 92, 255, .7);
  color: var(--text);
}

.list-size {
  width: 58px;
  padding: 0 8px;
}

.search-row {
  padding: 0 16px 10px;
}

.search-box {
  position: relative;
}

.search-box .icon {
  position: absolute;
  top: 10px;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--muted-2);
}

.search-box input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--text);
  padding: 0 12px 0 36px;
  outline: none;
}

.search-box input:focus {
  border-color: rgba(124, 92, 255, .75);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, .14);
}

.messages-scroll {
  min-height: 0;
  overflow: auto;
  border-top: 1px solid var(--line-soft);
}

.message-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 10px;
  min-height: 76px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}

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

.message-row.active {
  background: var(--panel-3);
}

.message-row.unread .message-from,
.message-row.unread .message-subject {
  color: var(--text);
}

.message-from {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.unread-dot {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.read-spacer {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
}

.message-date {
  color: var(--muted);
  font-size: 12px;
}

.message-subject,
.message-snippet {
  grid-column: 1 / 3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-subject {
  color: var(--text-soft);
  font-weight: 650;
}

.message-snippet {
  color: var(--muted);
  font-size: 13px;
}

.list-empty,
.list-end {
  padding: 26px 12px;
  color: var(--muted-2);
  text-align: center;
  font-size: 12px;
}

.reader {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  background: var(--bg);
}

.reader-toolbar {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 28px;
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
  scrollbar-width: thin;
}

.mail-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  height: 34px;
  min-width: 0;
  padding: 0 8px;
  color: var(--text-soft);
  border-radius: 7px;
}

.mail-action span:not(.icon) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-action:hover,
.mail-action:focus-visible {
  background: var(--panel);
  color: var(--text);
  outline: none;
}

.reader-spacer {
  flex: 1 1 auto;
}

.reader-body {
  min-height: 0;
  overflow: auto;
  padding: 28px;
}

.empty-reader {
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--muted);
}

.empty-reader-inner {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.empty-reader .empty-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, .035);
  color: var(--muted);
}

.message-card {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #111115;
}

.message-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.message-head h1 {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.25;
}

.sender-line {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.sender-meta {
  min-width: 0;
}

.sender-main {
  overflow: hidden;
  color: var(--text);
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sender-main span {
  color: var(--muted);
  font-weight: 500;
}

.sender-sub {
  color: var(--muted);
  font-size: 13px;
}

.message-time {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.account-chip::before {
  width: 6px;
  height: 6px;
  content: "";
  border-radius: 50%;
  background: var(--accent);
}

.message-content {
  min-width: 0;
  max-width: 900px;
  padding: 26px 0 0;
  color: var(--text);
  font-size: 15px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-plain {
  line-height: 1.65;
}

.message-html-frame {
  width: min(100%, 980px);
  min-height: 68vh;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.attachment-panel {
  width: min(100%, 980px);
  min-width: 0;
  overflow: hidden;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.attachment-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--text);
}

.attachment-panel-head span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 10px;
}

.attachment-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 118px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111115;
  color: var(--text);
  font: inherit;
  text-align: left;
}

.attachment-main {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.attachment-card.previewable {
  border-color: rgba(124, 92, 255, .25);
}

.attachment-card:hover,
.attachment-card:focus-within {
  border-color: rgba(124, 92, 255, .7);
  outline: none;
}

.attachment-thumb {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  background: var(--panel-2);
}

.attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attachment-file-icon {
  color: var(--muted);
}

.attachment-thumb.is-pdf {
  background: linear-gradient(145deg, rgba(124, 92, 255, .18), rgba(255, 255, 255, .04));
}

.attachment-file-icon.is-pdf {
  display: grid;
  place-items: center;
  gap: 6px;
  color: var(--text);
}

.attachment-file-icon .icon {
  width: 28px;
  height: 28px;
}

.attachment-pdf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 18px;
  border: 1px solid rgba(124, 92, 255, .55);
  border-radius: 5px;
  background: rgba(124, 92, 255, .18);
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.attachment-meta {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 4px;
}

.attachment-meta strong,
.attachment-meta span,
.attachment-meta em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-meta strong {
  font-size: 13px;
}

.attachment-meta span {
  color: var(--muted);
  font-size: 12px;
}

.attachment-meta em {
  color: var(--accent-2);
  font-size: 12px;
  font-style: normal;
}

.attachment-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 6px;
  min-width: 0;
}

.attachment-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.attachment-action:hover,
.attachment-action:focus-visible {
  border-color: rgba(124, 92, 255, .75);
  background: rgba(124, 92, 255, .16);
  outline: none;
}

.attachment-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.attachment-viewer-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, .78);
}

.attachment-viewer-panel {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(1120px, 96vw);
  max-height: 92vh;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.attachment-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.attachment-viewer-head div {
  min-width: 0;
}

.attachment-viewer-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.attachment-viewer-actions .attachment-action {
  min-height: 30px;
}

.attachment-viewer-head strong,
.attachment-viewer-head span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-viewer-head span {
  color: var(--muted);
  font-size: 12px;
}

.attachment-viewer-body {
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: auto;
  padding: 16px;
  background: #09090c;
}

.attachment-viewer-body.is-document {
  align-items: stretch;
  justify-items: stretch;
  padding: 0;
  background: #111116;
}

.attachment-viewer-body img {
  max-width: 100%;
  max-height: calc(92vh - 84px);
  object-fit: contain;
  border-radius: 6px;
}

.attachment-pdf-frame {
  width: 100%;
  min-height: calc(92vh - 58px);
  border: 0;
  background: #fff;
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1fr) 430px;
  background: radial-gradient(circle at 18% 20%, rgba(124, 92, 255, .16), transparent 25%), var(--bg);
}

.auth-copy {
  align-self: center;
  max-width: 720px;
  padding: 64px;
}

.auth-copy h1 {
  max-width: 780px;
  margin: 18px 0 18px;
  color: var(--text);
  font-size: clamp(44px, 6vw, 82px);
  line-height: .92;
}

.auth-copy p {
  max-width: 560px;
  color: var(--text-soft);
  font-size: 18px;
}

.security-grid {
  display: grid;
  max-width: 780px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.security-tile {
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
}

.security-tile strong {
  display: block;
  margin-bottom: 8px;
}

.security-tile span {
  color: var(--muted);
  font-size: 13px;
}

.auth-panel {
  align-self: center;
  margin-right: 54px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-panel h2 {
  margin: 0;
  font-size: 26px;
}

.auth-panel p {
  margin: 6px 0 22px;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--text);
  outline: none;
}

.field input,
.field select {
  height: 38px;
  padding: 0 12px;
}

.field textarea {
  min-height: 170px;
  padding: 10px 12px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(124, 92, 255, .75);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, .14);
}

.primary-btn,
.soft-btn,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  gap: 8px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 750;
}

.primary-btn {
  border: 0;
  background: var(--accent);
  color: #fff;
}

.primary-btn:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.soft-btn {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
}

.danger-btn {
  border: 1px solid rgba(239, 108, 121, .45);
  background: rgba(239, 108, 121, .08);
  color: #ff98a2;
}

.login-error {
  min-height: 20px;
  color: var(--danger);
  font-size: 13px;
}

.auth-recovery-link {
  display: block;
  min-height: 44px;
  margin-top: 8px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.auth-recovery-link:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.auth-panel .auth-feedback { margin: 16px 0; color: var(--text); line-height: 1.6; }
.auth-panel [aria-busy="true"], .auth-panel button:disabled { opacity: .65; cursor: wait; }
@media (max-width: 760px) {
  .auth-screen-recovery .auth-copy > h1,
  .auth-screen-recovery .auth-copy > p,
  .auth-screen-recovery .security-grid { display: none; }
  .auth-screen-recovery .auth-copy { padding-bottom: 0; }
}

.settings-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .72);
}

.settings-dialog {
  display: grid;
  width: min(1120px, 100%);
  height: min(820px, calc(100vh - 48px));
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.settings-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 12px 16px;
  min-width: 0;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.settings-label {
  grid-column: 1 / 2;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.settings-nav-list {
  display: flex;
  grid-column: 1 / 2;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 2px 4px;
  scrollbar-width: thin;
}

.settings-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  width: auto;
  min-height: 40px;
  max-width: 190px;
  padding: 0 14px;
  gap: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--text-soft);
  text-align: left;
  white-space: nowrap;
}

.settings-tab span:not(.icon) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-tab:hover,
.settings-tab.active {
  background: var(--panel-3);
  color: var(--text);
}

.settings-tab.active {
  border-color: rgba(124, 92, 255, .8);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .5);
}

.settings-close {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  align-self: center;
  justify-self: end;
  color: var(--muted);
}

.settings-panel {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 28px 30px 34px;
}

.settings-panel h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.settings-panel > p {
  margin: 0 0 24px;
  color: var(--muted);
}

.setting-list {
  display: grid;
  gap: 12px;
}

.option-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text-soft);
  text-align: left;
}

.option-card.selected {
  border-color: rgba(124, 92, 255, .8);
  box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .5);
}

.option-card strong {
  color: var(--text);
}

.option-card span,
.muted {
  color: var(--muted);
}

.account-settings-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.account-portal {
  margin-top: 2px;
  font-size: 11px;
}

.mailbox-switcher {
  display: grid;
  max-height: 188px;
  gap: 6px;
  overflow: auto;
  margin: 10px 0 12px 18px;
  padding-right: 2px;
  scrollbar-width: thin;
}

.mailbox-switcher-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.mailbox-add-btn {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
}

.mailbox-add-btn:hover:not(:disabled) {
  border-color: rgba(124, 92, 255, .65);
  color: var(--text);
}

.mailbox-add-btn:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.mailbox-pill {
  display: flex;
  width: 100%;
  min-height: 30px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #191821;
  padding: 0 8px;
  color: #d8d1ee;
  font-size: 12px;
  font-weight: 750;
  text-align: left;
}

.mailbox-pill-email {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mailbox-pill.active,
.mailbox-pill:hover {
  border-color: rgba(124, 92, 255, .65);
  background: rgba(124, 92, 255, .16);
  color: #fff;
}

.account-settings-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.status-dot {
  color: var(--success);
  font-size: 12px;
}

.server-line {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 12px 16px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.settings-form,
.credentials-grid {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.settings-form h2 {
  margin: 0;
}

.credentials-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.credentials-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.credentials-grid input,
.settings-form input,
.settings-form select {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #101015;
  color: var(--text);
  padding: 0 10px;
  outline: none;
}

.toggle-line {
  display: flex;
  align-items: center;
  min-height: 38px;
  gap: 10px;
  color: var(--text-soft);
}

.toggle-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.credentials-grid input {
  font-family: var(--mono);
  font-size: 12px;
}

.mailbox-create-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
  align-items: end;
  gap: 8px;
}

.mailbox-create-line > span {
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: var(--mono);
}

.mailbox-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.mailbox-row.active {
  border-color: rgba(124, 92, 255, .7);
}

.mailbox-row div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.mailbox-row span {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warning-box {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 197, 87, .45);
  border-radius: 8px;
  background: rgba(255, 197, 87, .08);
  color: #ffd98a;
}

.security-key {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  font-family: var(--mono);
}

.key-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.telegram-panel {
  margin-top: 18px;
}

.telegram-status {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .025);
}

.telegram-status.linked {
  border-color: rgba(59, 209, 121, .45);
}

.telegram-status strong {
  color: var(--text);
}

.telegram-status span {
  color: var(--muted);
}

.telegram-code-box {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(124, 92, 255, .45);
  border-radius: 8px;
  background: rgba(124, 92, 255, .08);
}

.telegram-code-box span {
  color: var(--muted);
  font-size: 12px;
}

.telegram-code-box code {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 800;
}

.compose-window {
  position: fixed;
  right: 24px;
  bottom: 0;
  z-index: 25;
  display: grid;
  width: min(540px, calc(100vw - 48px));
  max-height: min(620px, calc(100vh - 80px));
  grid-template-rows: auto auto auto auto minmax(120px, 1fr) auto auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.compose-head {
  display: flex;
  align-items: center;
  min-height: 43px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.compose-head strong {
  font-size: 14px;
}

.compose-head .icon-btn {
  width: 25px;
  height: 25px;
  margin-left: auto;
}

.compose-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 38px;
  border-bottom: 1px solid var(--line-soft);
}

.compose-row label {
  display: grid;
  place-items: center start;
  padding-left: 14px;
  color: var(--muted);
}

.compose-row input,
.compose-row select {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
  padding: 0 10px;
}

.compose-body {
  min-height: 120px;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
  overflow: auto;
  padding: 16px;
  resize: none;
}

.compose-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
}

.compose-actions .primary-btn,
.compose-actions .soft-btn {
  min-width: 0;
  flex: 0 1 auto;
}

.compose-actions .plain-btn {
  margin-left: auto;
  color: var(--muted);
}

.compose-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.compose-attachments {
  display: grid;
  max-height: 118px;
  gap: 6px;
  overflow: auto;
  padding: 8px 14px;
  border-top: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .025);
}

.compose-attachment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, .16);
}

.compose-attachment span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.compose-attachment .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex: 0 0 auto;
}

.compose-attachment strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.compose-attachment em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.compose-attachment .icon-btn {
  width: 24px;
  height: 24px;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 260px;
  max-width: 360px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  box-shadow: var(--shadow);
}

.toast.error {
  border-color: rgba(239, 108, 121, .5);
}

.mobile-scrim {
  display: none;
}

@media (max-width: 1040px) {
  .app-frame {
    grid-template-columns: 240px minmax(320px, 38vw) minmax(0, 1fr);
  }

  .app-frame.sidebar-collapsed {
    grid-template-columns: 0 minmax(320px, 38vw) minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  body {
    overflow: hidden;
  }

  .settings-backdrop {
    padding: 0;
  }

  .app-frame {
    grid-template-columns: 1fr;
  }

  .app-frame.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 45;
    width: min(320px, 82vw);
    transform: translateX(-105%);
    transition: transform .18s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-scrim {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    border: 0;
    background: rgba(0, 0, 0, .68);
  }

  .message-list {
    grid-column: 1;
    border-right: 0;
  }

  .mobile-menu-btn {
    display: inline-grid;
    flex: 0 0 auto;
  }

  .list-header {
    padding-left: 12px;
    gap: 6px;
  }

  .list-title {
    font-size: 15px;
  }

  .reader {
    position: fixed;
    inset: 0;
    z-index: 20;
    transform: translateX(100%);
    transition: transform .18s ease;
  }

  .reader.has-message {
    transform: translateX(0);
  }

  .reader-toolbar {
    padding: 0 12px;
    gap: 4px;
  }

  .mail-action {
    padding: 0 7px;
  }

  .mail-action span:not(.icon) {
    display: none;
  }

  .mail-action[data-action="back-to-list"] span:not(.icon) {
    display: inline;
  }

  .reader-body {
    padding: 16px;
  }

  .message-head {
    grid-template-columns: 1fr;
  }

  .message-time {
    text-align: left;
  }

  .attachment-panel,
  .message-html-frame {
    width: 100%;
  }

  .attachment-viewer {
    padding: 10px;
  }

  .attachment-viewer-panel {
    width: 100%;
    max-height: 96vh;
    border-radius: 8px;
  }

  .attachment-viewer-body {
    padding: 10px;
  }

  .attachment-viewer-body img {
    max-height: calc(96vh - 76px);
  }

  .auth-screen {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .auth-copy {
    padding: 32px 20px 10px;
  }

  .auth-copy h1 {
    font-size: 42px;
  }

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

  .auth-panel {
    margin: 12px 16px 32px;
  }

  .settings-dialog {
    width: 100vw;
    height: 100vh;
    grid-template-rows: auto minmax(0, 1fr);
    border-radius: 0;
  }

  .settings-nav {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 10px;
    padding: 14px 12px 10px;
  }

  .settings-label {
    grid-column: 1 / 2;
    align-self: center;
  }

  .settings-nav-list {
    grid-column: 1 / -1;
    align-items: center;
    padding: 2px 2px 5px;
  }

  .settings-tab {
    flex: 0 0 auto;
    width: auto;
    max-width: 180px;
    min-height: 36px;
    overflow: hidden;
    white-space: nowrap;
  }

  .settings-tab span {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .settings-panel {
    min-height: 0;
    padding: 24px 22px 64px;
  }

  .settings-close {
    position: static;
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    align-self: center;
    justify-self: end;
  }

  .credentials-grid,
  .mailbox-create-line,
  .mailbox-row {
    grid-template-columns: 1fr;
  }

  .account-settings-head {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .account-settings-head .primary-btn {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .compose-window {
    inset: auto 0 0;
    width: 100vw;
    max-height: 78vh;
    border-radius: 12px 12px 0 0;
  }
}

@media (max-width: 520px) {
  .settings-nav {
    padding: 12px 8px 8px;
  }

  .settings-label {
    padding: 0 4px;
  }

  .settings-tab {
    max-width: 150px;
    padding: 0 10px;
  }

  .settings-panel {
    padding: 22px 16px 64px;
  }

  .settings-form,
  .credentials-grid {
    padding: 12px;
  }

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

  .attachment-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .attachment-thumb {
    width: 58px;
    height: 56px;
  }

  .attachment-main {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .attachment-actions {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  }

  .compose-actions .plain-btn {
    margin-left: 0;
  }

  .compose-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .compose-actions .primary-btn,
  .compose-actions .soft-btn,
  .compose-actions .plain-btn {
    width: 100%;
  }

  .compose-attachment {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .compose-attachment em {
    display: none;
  }

  .account-settings-head {
    padding: 14px;
  }

  .server-line {
    gap: 8px;
    padding: 12px 14px;
  }

  .server-line span {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.landing-body {
  overflow: auto;
  background: #09090c;
  color: #f7f4ff;
}

.landing-body a {
  color: inherit;
}

.landing-page,
.landing-footer {
  width: 100%;
}

.landing-nav {
  display: flex;
  width: min(1080px, calc(100% - 48px));
  min-height: 79px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f7f4ff;
  font-size: 18px;
  font-weight: 850;
  text-decoration: none;
}

.landing-brand span span {
  color: #a88cff;
}

.landing-nav-actions,
.landing-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.language-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  color: #d9d3ea;
  text-decoration: none;
}

.nav-login,
.quiet-link {
  color: #f0ecfa;
  font-weight: 650;
  text-decoration: none;
}

.landing-hero {
  display: grid;
  width: min(1080px, calc(100% - 48px));
  min-height: 653px;
  align-content: center;
  margin: 0 auto;
  padding: 60px 32px 86px;
}

.landing-eyebrow,
.section-kicker {
  margin: 0 0 28px;
  color: #8f7cff;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.landing-hero h1 {
  max-width: 880px;
  margin: 0;
  color: #f8f5ff;
  font-size: clamp(58px, 8.8vw, 112px);
  font-weight: 850;
  line-height: .82;
}

.landing-lead {
  max-width: 570px;
  margin: 28px 0 34px;
  color: #aca6bd;
  font-size: 20px;
  line-height: 1.45;
}

.primary-link {
  display: inline-flex;
  min-height: 49px;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  border: 1px solid rgba(168, 140, 255, .55);
  border-radius: 8px;
  background: #7c5cff;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 18px 46px rgba(124, 92, 255, .24);
}

.primary-link span {
  font-weight: 900;
}

.landing-trust {
  display: grid;
  width: min(1080px, calc(100% - 48px));
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 auto;
  padding: 34px 32px 96px;
  border-top: 1px solid rgba(255, 255, 255, .045);
  color: #c9c2dc;
  font-family: var(--mono);
  font-size: 13px;
}

.landing-mail-window {
  width: min(1016px, calc(100% - 48px));
  margin: 0 auto 140px;
  color: #d9d4e8;
}

.preview-caption {
  width: fit-content;
  margin: 0 0 14px 90px;
  color: #746d88;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
}

.landing-mail-frame {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  min-height: 358px;
  overflow: hidden;
  border: 1px solid #222029;
  border-radius: 8px;
  background: #0d0d12;
  box-shadow: 0 34px 110px rgba(0, 0, 0, .46);
}

.landing-mail-folders {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 16px;
  border-right: 1px solid #201e27;
  background: #111117;
}

.landing-mail-folders div {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-radius: 7px;
  color: #9f98b3;
}

.landing-mail-folders .active {
  background: #1d1b25;
  color: #f8f5ff;
}

.landing-mail-folders span {
  color: #8f7cff;
}

.landing-mail-list {
  display: grid;
  align-content: start;
}

.landing-mail-list article {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  min-height: 68px;
  align-items: center;
  column-gap: 12px;
  padding: 0 22px;
  border-bottom: 1px solid #201e27;
}

.landing-mail-list .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7c5cff;
}

.landing-mail-list strong {
  display: block;
  color: #f7f4ff;
}

.landing-mail-list p {
  grid-column: 2;
  margin: -18px 0 0;
  color: #777086;
}

.landing-mail-list time {
  grid-column: 3;
  grid-row: 1 / span 2;
  color: #807991;
  font-size: 12px;
}

.landing-section,
.landing-explain,
.landing-cta {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
}

.landing-stack {
  padding: 150px 32px 140px;
}

.landing-section h2,
.landing-explain h2,
.landing-cta h2 {
  max-width: 820px;
  margin: 0;
  color: #f8f5ff;
  font-size: clamp(44px, 6vw, 78px);
  font-weight: 850;
  line-height: .92;
}

.section-lead {
  max-width: 680px;
  margin: 26px 0 76px;
  color: #a7a0b5;
  font-size: 19px;
  line-height: 1.45;
}

.landing-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.landing-card-grid article {
  min-height: 177px;
  padding: 24px;
  border: 1px solid #24222c;
  border-radius: 8px;
  background: #101016;
}

.landing-card-grid span,
.row-meta,
.principles-grid span,
.feature-grid span {
  color: #8f7cff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.landing-card-grid h3,
.explain-row h3,
.principles-grid h3,
.feature-grid h3 {
  margin: 14px 0 10px;
  color: #f7f4ff;
  font-size: 22px;
  line-height: 1.16;
}

.landing-card-grid p,
.explain-row p,
.inside-note p,
.principles-grid p,
.feature-grid p,
.landing-cta p,
.landing-footer {
  color: #9f98b0;
  line-height: 1.5;
}

.landing-explain {
  max-width: 880px;
  padding: 0 32px 130px;
}

.explain-row {
  padding: 57px 0;
  border-top: 1px solid #211f28;
}

.explain-row:first-of-type {
  margin-top: 72px;
}

.row-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}

.explain-row h3 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(30px, 4vw, 44px);
}

.explain-row > p {
  max-width: 816px;
  margin: 0 0 18px;
  font-size: 18px;
}

.inside-note {
  margin-top: 26px;
  padding: 18px 22px;
  border: 1px solid #25222d;
  border-radius: 8px;
  background: #111117;
}

.inside-note strong {
  color: #8f7cff;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.inside-note p {
  margin: 10px 0 0;
}

.landing-principles {
  padding: 140px 32px 105px;
  border-top: 1px solid #211f28;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 64px 56px;
  margin-top: 52px;
}

.principles-grid article,
.feature-grid article {
  min-width: 0;
}

.principles-grid h3 {
  font-size: 24px;
}

.landing-features {
  padding: 120px 32px;
  border-top: 1px solid #211f28;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px;
  margin-top: 62px;
}

.landing-cta {
  padding: 140px 32px 160px;
  border-top: 1px solid #211f28;
}

.landing-cta p {
  max-width: 560px;
  margin: 24px 0 32px;
  font-size: 19px;
}

.landing-footer {
  display: flex;
  min-height: 93px;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1080px) / 2 + 32px));
  border-top: 1px solid #211f28;
  background: #0a0a0d;
}

.landing-footer > div,
.landing-footer nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-footer strong {
  color: #f7f4ff;
}

.landing-footer a {
  color: #b9b1ca;
  text-decoration: none;
}

.legal-body {
  min-height: 100vh;
}

.legal-page {
  width: min(980px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 48px;
}

.legal-page .landing-nav {
  width: 100%;
}

.legal-hero {
  padding: 76px 0 28px;
}

.legal-hero h1 {
  max-width: 820px;
  margin: 0;
  color: #f8f5ff;
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 850;
  letter-spacing: 0;
  line-height: .95;
}

.legal-lead {
  max-width: 760px;
  margin: 24px 0 0;
  color: #aca6bd;
  font-size: 18px;
  line-height: 1.65;
}

.legal-card {
  margin: 14px 0;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(19, 18, 24, .92), rgba(12, 12, 16, .96));
}

.legal-card h2 {
  margin: 0 0 14px;
  color: #f7f4ff;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: 0;
}

.legal-card p,
.legal-card li {
  color: #bdb6ce;
  font-size: 15px;
  line-height: 1.75;
}

.legal-card p {
  margin: 0 0 12px;
}

.legal-card ul {
  margin: 0 0 12px;
  padding-left: 22px;
}

.legal-card a {
  color: #a88cff;
}

.legal-footer {
  margin-top: 0;
}

.brand-mark.mini {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.brand-mark.mini svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 980px) {
  .landing-nav,
  .landing-hero,
  .landing-trust,
  .landing-mail-window,
  .landing-section,
  .landing-explain,
  .landing-cta {
    width: min(100% - 28px, 720px);
  }

  .landing-hero {
    min-height: 610px;
    padding: 44px 12px 64px;
  }

  .landing-hero h1 {
    font-size: clamp(52px, 16vw, 76px);
    line-height: .88;
  }

  .landing-lead {
    font-size: 17px;
  }

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

  .landing-trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 26px 12px 60px;
  }

  .preview-caption {
    margin-left: 0;
  }

  .landing-mail-frame {
    grid-template-columns: 1fr;
  }

  .landing-mail-folders {
    display: none;
  }

  .landing-stack,
  .landing-principles,
  .landing-features,
  .landing-cta {
    padding-right: 12px;
    padding-left: 12px;
  }

  .landing-card-grid,
  .principles-grid,
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .landing-explain {
    padding-right: 12px;
    padding-left: 12px;
  }

  .landing-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    padding-top: 24px;
    padding-bottom: 24px;
  }
}

@media (max-width: 620px) {
  .landing-nav {
    min-height: 72px;
  }

  .language-pill {
    display: none;
  }

  .landing-mail-list article {
    grid-template-columns: 12px minmax(0, 1fr);
    padding: 14px;
  }

  .landing-mail-list time {
    grid-column: 2;
    grid-row: auto;
  }

  .landing-mail-list p {
    margin: 4px 0 0;
  }
}

/* 2026 correction: current CrazyDev-like dark editorial mail UI. */
:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --panel: #15151a;
  --panel-2: #1c1b22;
  --panel-3: #292832;
  --line: #282631;
  --line-soft: #201f28;
  --text: #f7f4ff;
  --text-soft: #c8c1dc;
  --muted: #817991;
  --muted-2: #5f586d;
  --accent: #7b5cff;
  --accent-2: #a88cff;
  --success: #3bd179;
  --danger: #ef6c79;
  --warning: #f4b84f;
  --shadow: 0 26px 80px rgba(0, 0, 0, .55);
  --font: "DM Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: Fraunces, Georgia, "Times New Roman", serif;
}

html,
body,
body[data-theme="minimal"],
body[data-theme="light"],
body[data-theme="graphite"] {
  color-scheme: dark;
  --bg: #0b0b0d;
  --panel: #15151a;
  --panel-2: #1c1b22;
  --panel-3: #292832;
  --line: #282631;
  --line-soft: #201f28;
  --text: #f7f4ff;
  --text-soft: #c8c1dc;
  --muted: #817991;
  --muted-2: #5f586d;
  --accent: #7b5cff;
  --accent-2: #a88cff;
  --shadow: 0 26px 80px rgba(0, 0, 0, .55);
  background: var(--bg);
  color: var(--text);
}

body[data-theme="graphite"] {
  --bg: #101114;
  --panel: #191b20;
  --panel-2: #20232a;
  --panel-3: #292d35;
  --line: #323743;
  --line-soft: #262a33;
}

body[data-typography="jetbrains-mono"] {
  --font: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

body[data-typography="system"] {
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mail-shell,
.app-frame,
.reader {
  background: var(--bg);
}

.app-frame {
  grid-template-columns: 240px 340px minmax(0, 1fr);
}

body[data-layout="wide-reader"] .app-frame {
  grid-template-columns: 240px 304px minmax(0, 1fr);
}

body[data-layout="wide-list"] .app-frame {
  grid-template-columns: 240px minmax(420px, 38vw) minmax(0, 1fr);
}

.app-frame.sidebar-collapsed {
  grid-template-columns: 0 340px minmax(0, 1fr);
}

.sidebar,
.sidebar-footer {
  background: #151519;
  border-color: var(--line-soft);
  box-shadow: none;
}

.brand-row {
  min-height: 63px;
  padding: 14px 12px;
  border-color: var(--line-soft);
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #7b5cff;
  box-shadow: none;
}

.brand-mark svg {
  width: 18px;
  height: 18px;
}

.brand-name {
  color: #fff;
  font-family: var(--display);
  font-size: 18px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.brand-name span:last-child {
  color: #fff;
  font-family: var(--font);
  font-style: normal;
  font-weight: 900;
}

.icon-btn {
  color: #736d83;
}

.compose-main {
  justify-content: flex-start;
  width: calc(100% - 20px);
  height: 42px;
  margin: 13px 10px 16px;
  padding: 0 16px;
  border-radius: 999px;
  background: #ededf3;
  color: #08080a;
  box-shadow: none;
  font-weight: 850;
}

.compose-main:hover,
.compose-main:focus-visible {
  background: #fff;
  color: #08080a;
}

.nav-section {
  padding: 0 8px 8px;
}

.nav-rule {
  margin: 10px 4px 15px;
  background: transparent;
}

.nav-item,
.folder-action,
.account-head {
  color: #aaa3bb;
}

.nav-item {
  min-height: 36px;
  border-radius: 6px;
}

.nav-item:hover,
.nav-item:focus-visible,
.folder-action:hover,
.folder-action:focus-visible {
  background: #22212a;
  color: #f7f4ff;
}

.nav-item.active {
  background: #2a2932;
  color: #fff;
}

.nav-item.active .icon {
  color: var(--accent-2);
}

.account-card {
  padding-top: 14px;
}

.account-head {
  grid-template-columns: 12px minmax(0, 1fr) 24px;
  min-height: 50px;
}

.account-name {
  color: #fff;
  font-weight: 850;
}

.account-email,
.account-portal,
.mailbox-switcher-head,
.folder-action,
.count-pill {
  color: #777086;
}

.account-dot,
.unread-dot,
.account-chip::before {
  background: #c47aad;
}

.folder-list {
  padding-left: 24px;
}

.mailbox-switcher {
  max-height: 176px;
  margin: 10px 0 10px 18px;
}

.mailbox-pill {
  min-height: 30px;
  border-color: #24222d;
  background: #1b1a22;
  color: #cfc7e3;
}

.mailbox-pill.active,
.mailbox-pill:hover {
  border-color: rgba(123, 92, 255, .76);
  background: rgba(123, 92, 255, .18);
  color: #fff;
}

.message-list {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  background: #101014;
  border-color: var(--line-soft);
}

.list-header {
  min-height: 51px;
  padding: 11px 16px 8px;
}

.list-title {
  color: #fff;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

.list-total {
  color: #70687e;
}

.seg-btn,
.list-size,
.soft-btn {
  border-color: #2c2936;
  background: #17161d;
  color: #7d758d;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.seg-btn.active,
.soft-btn:hover,
.soft-btn:focus-visible {
  border-color: rgba(123, 92, 255, .75);
  background: #17161d;
  color: #efeaff;
}

.search-box input {
  height: 38px;
  border-color: #2a2833;
  background: #1b1a21;
  color: #efeaff;
}

.stream-tabs {
  display: flex;
  min-width: 0;
  gap: 2px;
  overflow-x: auto;
  padding: 0 16px 7px;
  border-bottom: 1px solid var(--line-soft);
  scrollbar-width: none;
}

.stream-tabs::-webkit-scrollbar {
  display: none;
}

.stream-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 34px;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 0 0 5px 5px;
  background: transparent;
  color: #6f6880;
  cursor: pointer;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 400;
}

.stream-tab strong {
  color: var(--accent-2);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 800;
}

.stream-tab:hover,
.stream-tab:focus-visible,
.stream-tab.active {
  border-color: rgba(123, 92, 255, .78);
  border-top-color: transparent;
  background: #211f2a;
  color: #fff;
  outline: none;
}

.messages-scroll {
  border-top: 0;
  border-color: var(--line-soft);
}

.message-row {
  min-height: 85px;
  padding: 12px 16px 13px;
  border-color: var(--line-soft);
}

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

.message-row.active {
  background: #25232d;
}

.message-from {
  color: #bfb7d2;
  font-size: 13px;
  font-weight: 750;
}

.message-subject {
  color: #d9d2e6;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 400;
}

.message-snippet,
.message-date,
.list-empty,
.list-end {
  color: #756e83;
}

.shortcut-rail {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  min-height: 84px;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--line-soft);
  background: #101014;
  color: #625b70;
  font-size: 12px;
}

.shortcut-rail span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.shortcut-rail kbd {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid #2b2935;
  border-radius: 5px;
  background: #191820;
  color: #cfc7e3;
  font: 700 11px/1 var(--mono);
  box-shadow: none;
}

.reader-toolbar {
  min-height: 46px;
  padding: 0 24px;
  border-color: var(--line-soft);
  background: #0b0b0d;
}

.reader-toolbar:empty,
.reader-toolbar > span:only-child {
  display: none;
}

.mail-action {
  color: #aaa3bb;
  font-weight: 750;
}

.mail-action:hover,
.mail-action:focus-visible {
  background: #1c1b22;
  color: #fff;
}

.reader-body {
  padding: 28px;
}

.empty-reader {
  color: #736d83;
}

.empty-reader-inner {
  gap: 16px;
  text-align: center;
}

.empty-reader .empty-icon {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: transparent;
  color: var(--accent-2);
}

.empty-reader .empty-icon .icon {
  width: 28px;
  height: 28px;
}

.empty-reader h1 {
  max-width: 320px;
  margin: 0;
  color: #fff;
  font-family: var(--display);
  font-size: clamp(38px, 4.6vw, 50px);
  font-weight: 300;
  line-height: .98;
}

.empty-reader p {
  margin: 0;
  color: #625b70;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .28em;
  text-transform: uppercase;
}

.message-card,
.attachment-panel,
.attachment-card,
.settings-form,
.credentials-grid,
.account-settings-card,
.option-card,
.settings-dialog,
.compose-window,
.toast,
.security-tile,
.auth-panel {
  border-color: var(--line);
  background: #111115;
}

.message-card {
  max-width: min(1100px, 100%);
  border-radius: 7px;
  box-shadow: none;
}

.message-head h1 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
}

.message-content {
  max-width: 980px;
  color: #eee8fb;
}

.message-html-frame {
  width: min(100%, 980px);
  min-height: 70vh;
  border-color: var(--line);
  background: #fff;
}

.attachment-thumb,
.folder-inline input,
.credentials-grid input,
.settings-form input,
.settings-form select,
.field input,
.field textarea,
.field select {
  background: #101015;
  color: #f7f4ff;
}

.attachment-action {
  border-color: #2c2936;
  background: #191820;
  color: #f1ecfb;
}

.attachment-action:hover,
.attachment-action:focus-visible {
  border-color: rgba(123, 92, 255, .75);
  background: rgba(123, 92, 255, .16);
}

.attachment-viewer-backdrop,
.settings-backdrop {
  background: rgba(0, 0, 0, .76);
  backdrop-filter: blur(10px);
}

.attachment-viewer-panel,
.settings-dialog,
.compose-window {
  background: #141319;
  box-shadow: var(--shadow);
}

.auth-screen {
  grid-template-columns: minmax(0, 1fr) 430px;
  background: radial-gradient(circle at 22% 18%, rgba(123, 92, 255, .16), transparent 28%), #0b0b0d;
}

.auth-copy h1,
.landing-hero h1,
.landing-section h2,
.landing-explain h2,
.landing-cta h2,
.legal-hero h1 {
  font-family: var(--display);
  font-weight: 300;
  letter-spacing: 0;
}

.auth-panel {
  margin-right: 54px;
}

.primary-btn {
  background: #ededf3;
  color: #08080a;
  box-shadow: none;
}

.primary-btn:hover,
.primary-btn:focus-visible {
  background: #fff;
}

.settings-backdrop {
  z-index: 70;
  padding: 18px;
}

.settings-dialog {
  width: min(980px, calc(100vw - 36px));
  height: min(760px, calc(100vh - 36px));
  grid-template-columns: 210px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  border-radius: 10px;
}

.settings-nav {
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

.settings-label {
  grid-column: auto;
  grid-row: auto;
  padding: 0 6px;
  letter-spacing: .18em;
}

.settings-nav-list {
  display: grid;
  grid-column: auto;
  gap: 4px;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
}

.settings-tab {
  width: 100%;
  max-width: none;
  min-height: 40px;
  padding: 0 10px;
  border-color: transparent;
  background: transparent;
}

.settings-tab:hover,
.settings-tab.active {
  border-color: #2d2a36;
  background: #211f28;
}

.settings-tab.active {
  box-shadow: inset 0 0 0 1px rgba(123, 92, 255, .42);
}

.settings-close {
  grid-column: auto;
  grid-row: auto;
  justify-self: stretch;
}

.settings-panel {
  padding: 24px 28px 30px;
}

.settings-panel h2 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 300;
}

.option-card.selected {
  border-color: rgba(123, 92, 255, .8);
  background: rgba(123, 92, 255, .12);
}

.compose-window {
  right: 22px;
  width: min(540px, calc(100vw - 44px));
  max-height: min(600px, calc(100vh - 72px));
  border-radius: 9px 9px 0 0;
}

.landing-body {
  overflow: auto;
  background: #09090c;
  color: #f7f4ff;
}

.landing-nav {
  border-bottom-color: rgba(255, 255, 255, .04);
}

.landing-brand,
.nav-login,
.quiet-link,
.landing-hero h1,
.landing-section h2,
.landing-explain h2,
.landing-cta h2,
.landing-card-grid h3,
.explain-row h3,
.principles-grid h3,
.feature-grid h3,
.landing-footer strong,
.legal-hero h1,
.legal-card h2 {
  color: #f8f5ff;
}

.landing-brand span span {
  color: #fff;
}

.language-pill {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  color: #d9d3ea;
}

.landing-eyebrow,
.section-kicker,
.landing-card-grid span,
.row-meta,
.principles-grid span,
.feature-grid span,
.inside-note strong {
  color: #8f7cff;
}

.landing-lead,
.section-lead,
.landing-card-grid p,
.explain-row p,
.inside-note p,
.principles-grid p,
.feature-grid p,
.landing-cta p,
.landing-footer,
.legal-lead,
.legal-card p,
.legal-card li {
  color: #9f98b0;
}

.primary-link,
body.landing-body .primary-link,
body.landing-body .primary-link:visited,
body.landing-body .primary-link span {
  border-color: rgba(168, 140, 255, .55);
  background: #ededf3;
  color: #08080a;
  box-shadow: none;
}

.landing-trust,
.landing-principles,
.landing-features,
.landing-cta,
.explain-row,
.landing-footer {
  border-color: #211f28;
}

.landing-mail-frame {
  border-color: #222029;
  background: #0d0d12;
  box-shadow: 0 34px 110px rgba(0, 0, 0, .46);
}

.landing-mail-folders,
.landing-card-grid article,
.inside-note,
.legal-card {
  border-color: #24222c;
  background: #101016;
}

.landing-mail-folders .active,
.landing-mail-list article:hover {
  background: #1d1b25;
}

.landing-mail-list article {
  border-color: #201e27;
}

.landing-mail-list strong {
  color: #f7f4ff;
}

.landing-mail-list p,
.landing-mail-list time,
.preview-caption {
  color: #777086;
}

.landing-footer {
  background: #0a0a0d;
}

.landing-footer a,
.legal-card a {
  color: #b9b1ca;
}

@media (max-width: 1120px) {
  .app-frame,
  body[data-layout="wide-reader"] .app-frame,
  body[data-layout="wide-list"] .app-frame {
    grid-template-columns: 240px minmax(316px, 36vw) minmax(0, 1fr);
  }

  .app-frame.sidebar-collapsed {
    grid-template-columns: 0 minmax(316px, 38vw) minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .app-frame,
  body[data-layout="wide-reader"] .app-frame,
  body[data-layout="wide-list"] .app-frame,
  body[data-layout="focused"] .app-frame,
  .app-frame.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .message-list {
    width: 100vw;
    height: 100vh;
  }

  .sidebar {
    width: min(320px, 86vw);
  }

  .reader.has-message {
    z-index: 55;
  }

  .reader-toolbar {
    min-height: 50px;
    padding: 0 10px;
  }

  .reader-body {
    padding: 14px;
  }

  .message-card,
  .message-html-frame,
  .attachment-panel {
    width: 100%;
  }

  .message-head {
    padding: 16px;
  }

  .message-head h1 {
    font-size: 20px;
  }

  .message-html-frame {
    min-height: calc(100vh - 210px);
  }

  .auth-screen {
    grid-template-columns: 1fr;
  }

  .auth-copy {
    padding: 34px 22px 12px;
  }

  .auth-copy h1 {
    font-size: clamp(44px, 13vw, 68px);
  }

  .auth-panel {
    margin: 10px 16px 32px;
  }

  .settings-backdrop {
    padding: 0;
  }

  .settings-dialog {
    width: 100vw;
    height: 100vh;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    border-radius: 0;
  }

  .settings-nav {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 10px;
    padding: 14px 12px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .settings-label {
    grid-column: 1 / 2;
    grid-row: 1;
  }

  .settings-close {
    grid-column: 2 / 3;
    grid-row: 1;
    justify-self: end;
  }

  .settings-nav-list {
    display: flex;
    grid-column: 1 / -1;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 3px;
  }

  .settings-tab {
    flex: 0 0 auto;
    width: auto;
    min-width: 128px;
    max-width: 178px;
  }

  .settings-panel {
    padding: 22px 18px 72px;
  }

  .compose-window {
    inset: auto 0 0;
    width: 100vw;
    max-height: 82vh;
    border-radius: 12px 12px 0 0;
  }
}

@media (max-width: 520px) {
  .brand-name {
    font-size: 16px;
  }

  .list-header {
    padding: 10px 10px 6px;
  }

  .list-title {
    max-width: 38vw;
    font-size: 18px;
  }

  .list-total {
    margin-left: 0;
  }

  .search-row,
  .stream-tabs {
    padding-right: 10px;
    padding-left: 10px;
  }

  .stream-tab {
    min-height: 32px;
    padding: 0 10px;
    font-size: 14px;
  }

  .message-row {
    min-height: 74px;
    padding: 10px;
  }

  .shortcut-rail {
    min-height: 52px;
    padding: 8px 10px;
    gap: 6px 10px;
  }

  .shortcut-rail span:nth-child(n+4) {
    display: none;
  }

  .settings-tab {
    min-width: 118px;
    max-width: 152px;
  }

  .settings-panel {
    padding: 20px 14px 72px;
  }

  .account-settings-head {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .compose-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* Authorized Mail CrazyDev token transfer: warm ink, bone text, honey accent. */
:root,
html,
body,
body[data-theme="minimal"],
body[data-theme="light"],
body[data-theme="graphite"] {
  color-scheme: dark;
  --bg: #100e0b;
  --panel: #16130f;
  --panel-2: #1d1813;
  --panel-3: #241e17;
  --line: rgba(240, 228, 205, .12);
  --line-soft: rgba(240, 228, 205, .07);
  --text: #f5efe3;
  --text-soft: rgba(245, 239, 227, .66);
  --muted: rgba(245, 239, 227, .4);
  --muted-2: rgba(245, 239, 227, .28);
  --accent: #e0a63f;
  --accent-2: #e0a63f;
  --success: #7f9c6c;
  --danger: #ef5f52;
  --warning: #e0a63f;
  --shadow: 0 8px 32px rgba(0, 0, 0, .45);
  --font: "Outfit", "DM Sans", -apple-system, system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  background: var(--bg);
  color: var(--text);
}

body {
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

.mail-shell,
.app-frame,
.reader,
.reader-toolbar {
  background: var(--bg);
}

.sidebar,
.sidebar-footer,
.auth-panel,
.settings-dialog,
.compose-window,
.toast {
  background: var(--panel);
  border-color: var(--line-soft);
}

.message-list,
.shortcut-rail {
  background: var(--bg);
}

.brand-mark {
  background: var(--accent);
  color: #100e0b;
}

.brand-mark svg {
  stroke: #100e0b;
}

.brand-name {
  font-family: var(--font);
  font-style: normal;
  font-weight: 600;
  letter-spacing: -.01em;
}

.brand-name span:last-child {
  color: var(--text);
  font-weight: 700;
}

.compose-main,
.primary-btn,
.primary-link,
body.landing-body .primary-link,
body.landing-body .primary-link:visited,
body.landing-body .primary-link span {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.compose-main:hover,
.compose-main:focus-visible,
.primary-btn:hover,
.primary-btn:focus-visible,
.primary-link:hover {
  background: #fff8eb;
  color: var(--bg);
}

.nav-item:hover,
.nav-item:focus-visible,
.folder-action:hover,
.folder-action:focus-visible,
.stream-tab.active,
.stream-tab:hover,
.stream-tab:focus-visible,
.message-row.active,
.message-row:hover,
.settings-tab:hover,
.settings-tab.active,
.landing-mail-folders .active,
.landing-mail-list article:hover {
  background: rgba(245, 235, 215, .05);
}

.nav-item.active {
  background: var(--panel-3);
}

.nav-item.active .icon,
.stream-tab strong,
.empty-reader .empty-icon,
.landing-eyebrow,
.section-kicker,
.landing-card-grid span,
.row-meta,
.principles-grid span,
.feature-grid span,
.inside-note strong {
  color: var(--accent);
}

.account-dot,
.unread-dot,
.account-chip::before,
.landing-mail-list .dot {
  background: var(--accent);
}

.search-box input,
.seg-btn,
.list-size,
.mailbox-pill,
.shortcut-rail kbd,
.attachment-action,
.field input,
.field textarea,
.field select,
.credentials-grid input,
.settings-form input,
.settings-form select {
  border-color: var(--line);
  background: var(--panel-2);
  color: var(--text);
}

.message-card,
.attachment-panel,
.attachment-card,
.settings-form,
.credentials-grid,
.account-settings-card,
.option-card,
.security-tile,
.landing-card-grid article,
.inside-note,
.legal-card,
.landing-mail-frame,
.landing-mail-folders {
  border-color: var(--line);
  background: var(--panel);
}

.message-subject,
.message-head h1,
.empty-reader h1,
.list-title,
.landing-hero h1,
.landing-section h2,
.landing-explain h2,
.landing-cta h2,
.legal-hero h1 {
  color: var(--text);
  font-family: var(--display);
  font-weight: 300;
  letter-spacing: -.025em;
}

.message-from,
.sender-main,
.account-name,
.landing-mail-list strong,
.option-card strong,
.settings-panel h2 {
  color: var(--text);
}

.message-snippet,
.message-date,
.list-empty,
.list-end,
.account-email,
.account-portal,
.mailbox-switcher-head,
.folder-action,
.count-pill,
.landing-lead,
.section-lead,
.landing-card-grid p,
.explain-row p,
.inside-note p,
.principles-grid p,
.feature-grid p,
.landing-cta p,
.landing-footer,
.legal-lead,
.legal-card p,
.legal-card li {
  color: var(--text-soft);
}

.stream-tab,
.shortcut-rail,
.empty-reader p,
.preview-caption,
.landing-mail-list p,
.landing-mail-list time {
  color: var(--muted);
}

.stream-tab.active,
.stream-tab:hover,
.stream-tab:focus-visible,
.mailbox-pill.active,
.mailbox-pill:hover,
.settings-tab.active,
.option-card.selected {
  border-color: rgba(224, 166, 63, .28);
  background: rgba(224, 166, 63, .12);
  color: var(--text);
}

.seg-btn.active,
.soft-btn:hover,
.soft-btn:focus-visible,
.attachment-action:hover,
.attachment-action:focus-visible {
  border-color: rgba(224, 166, 63, .38);
  background: rgba(224, 166, 63, .12);
  color: var(--text);
}

.auth-screen {
  background: radial-gradient(circle at 18% 20%, rgba(224, 166, 63, .12), transparent 28%), var(--bg);
}

.landing-body,
.landing-footer {
  background: var(--bg);
}

.landing-trust,
.landing-principles,
.landing-features,
.landing-cta,
.explain-row,
.landing-footer,
.landing-nav,
.messages-scroll,
.message-row,
.reader-toolbar,
.stream-tabs,
.sidebar,
.message-list,
.brand-row,
.compose-head,
.compose-row {
  border-color: var(--line-soft);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--line);
}

.settings-nav-list,
.stream-tabs {
  scrollbar-width: none;
}

.settings-nav-list::-webkit-scrollbar,
.stream-tabs::-webkit-scrollbar {
  display: none;
}

.brand-mark,
.attachment-thumb.is-pdf {
  box-shadow: none;
}

.search-box input:focus,
.field input:focus,
.field textarea:focus,
.field select:focus,
.credentials-grid input:focus,
.settings-form input:focus,
.settings-form select:focus {
  border-color: rgba(224, 166, 63, .38);
  box-shadow: 0 0 0 2px rgba(224, 166, 63, .12);
}

.attachment-card.previewable,
.attachment-card:hover,
.attachment-card:focus-within,
.mailbox-add-btn:hover:not(:disabled),
.mailbox-row.active,
.telegram-code-box {
  border-color: rgba(224, 166, 63, .28);
}

.attachment-thumb.is-pdf,
.telegram-code-box {
  background: rgba(224, 166, 63, .08);
}

.attachment-pdf-badge {
  border-color: rgba(224, 166, 63, .38);
  background: rgba(224, 166, 63, .12);
  color: var(--accent);
}

.attachment-meta em,
.telegram-code-box code,
.landing-footer a,
.legal-card a {
  color: var(--accent);
}

@media (min-width: 901px) {
  .app-frame,
  body[data-layout="wide-reader"] .app-frame,
  body[data-layout="wide-list"] .app-frame {
    grid-template-columns: 240px var(--mail-list-width, 340px) minmax(0, 1fr);
  }

  .app-frame.sidebar-collapsed,
  body[data-layout="focused"] .app-frame {
    grid-template-columns: 0 var(--mail-list-width, 340px) minmax(0, 1fr);
  }
}

.message-list {
  position: relative;
  overflow: visible;
  container-type: inline-size;
}

.list-header {
  display: flex;
  min-width: 0;
  gap: 8px;
  overflow: hidden;
  padding-right: 10px;
}

.list-heading {
  display: flex;
  flex: 1 1 auto;
  align-items: baseline;
  min-width: 0;
  gap: 7px;
}

.list-title {
  flex: 0 1 auto;
  min-width: 0;
  max-width: none;
}

.list-total {
  flex: 0 0 auto;
  margin-left: 0;
}

.list-actions {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  max-width: 100%;
  gap: 6px;
  overflow: hidden;
}

.list-actions .icon-btn {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
}

.list-actions .seg-btn {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 148px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-actions .list-size {
  flex: 0 0 58px;
}

.pane-resizer {
  position: absolute;
  top: 0;
  right: -5px;
  bottom: 0;
  z-index: 20;
  width: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
}

.pane-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 4px;
  width: 1px;
  background: transparent;
  transition: background .16s ease, box-shadow .16s ease;
}

.pane-resizer:hover::after,
.pane-resizer:focus-visible::after,
body.is-resizing-list .pane-resizer::after {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 166, 63, .12);
}

body.is-resizing-list {
  cursor: col-resize;
  user-select: none;
}

body.is-resizing-list iframe {
  pointer-events: none;
}

@container (max-width: 370px) {
  .list-header {
    gap: 6px;
  }

  .list-actions {
    gap: 5px;
  }

  .list-actions .list-size {
    display: none;
  }
}

@container (max-width: 335px) {
  .list-total {
    display: none;
  }

  .list-actions .seg-btn {
    max-width: 104px;
    padding-inline: 8px;
  }
}

@media (max-width: 900px) {
  .pane-resizer {
    display: none;
  }
}

/* Settings system: every saved Appearance/Typography/Layout/Density option has a visible effect. */
:root,
body[data-theme="minimal"] {
  color-scheme: dark;
  --bg: #100e0b;
  --panel: #16130f;
  --panel-2: #1d1813;
  --panel-3: #241e17;
  --line: rgba(240, 228, 205, .14);
  --line-soft: rgba(240, 228, 205, .08);
  --text: #f5efe3;
  --text-soft: rgba(245, 239, 227, .68);
  --muted: rgba(245, 239, 227, .42);
  --muted-2: rgba(245, 239, 227, .3);
  --accent: #e0a63f;
  --accent-2: #f0c46e;
  --accent-contrast: #100e0b;
  --success: #7f9c6c;
  --danger: #ef5f52;
  --warning: #e0a63f;
  --shadow: 0 8px 32px rgba(0, 0, 0, .45);
}

body[data-theme="graphite"] {
  color-scheme: dark;
  --bg: #0f1012;
  --panel: #17191d;
  --panel-2: #1f2228;
  --panel-3: #292d35;
  --line: rgba(217, 225, 239, .16);
  --line-soft: rgba(217, 225, 239, .08);
  --text: #f3f5f8;
  --text-soft: rgba(243, 245, 248, .68);
  --muted: rgba(243, 245, 248, .45);
  --muted-2: rgba(243, 245, 248, .31);
  --accent: #9aa3b5;
  --accent-2: #c0c7d4;
  --accent-contrast: #0f1012;
  --success: #83aa85;
  --danger: #f0706a;
  --warning: #c9a96a;
}

body[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f2e9;
  --panel: #fffaf0;
  --panel-2: #f0eadf;
  --panel-3: #e5ddcf;
  --line: rgba(58, 45, 28, .17);
  --line-soft: rgba(58, 45, 28, .1);
  --text: #17130d;
  --text-soft: rgba(23, 19, 13, .72);
  --muted: rgba(23, 19, 13, .52);
  --muted-2: rgba(23, 19, 13, .38);
  --accent: #b7791f;
  --accent-2: #8f5f18;
  --accent-contrast: #fffaf0;
  --success: #4d7f43;
  --danger: #c4483d;
  --warning: #b7791f;
  --shadow: 0 18px 48px rgba(58, 45, 28, .16);
}

body[data-theme="midnight"] {
  color-scheme: dark;
  --bg: #080d16;
  --panel: #0f1724;
  --panel-2: #172235;
  --panel-3: #1f2f49;
  --line: rgba(180, 207, 255, .15);
  --line-soft: rgba(180, 207, 255, .08);
  --text: #e6f0ff;
  --text-soft: rgba(230, 240, 255, .68);
  --muted: rgba(230, 240, 255, .43);
  --muted-2: rgba(230, 240, 255, .3);
  --accent: #6aa6ff;
  --accent-2: #9ec5ff;
  --accent-contrast: #06101f;
  --success: #78c6a3;
  --danger: #ff736f;
  --warning: #f4c86b;
}

body[data-theme="forest"] {
  color-scheme: dark;
  --bg: #08110c;
  --panel: #101a13;
  --panel-2: #18251b;
  --panel-3: #203222;
  --line: rgba(221, 242, 201, .14);
  --line-soft: rgba(221, 242, 201, .08);
  --text: #e9f6df;
  --text-soft: rgba(233, 246, 223, .68);
  --muted: rgba(233, 246, 223, .42);
  --muted-2: rgba(233, 246, 223, .3);
  --accent: #8fbf73;
  --accent-2: #b0d690;
  --accent-contrast: #071108;
  --success: #95d07d;
  --danger: #ef6b61;
  --warning: #dbb866;
}

body[data-theme="rose"] {
  color-scheme: dark;
  --bg: #140912;
  --panel: #1e111b;
  --panel-2: #2a1925;
  --panel-3: #382230;
  --line: rgba(255, 218, 232, .15);
  --line-soft: rgba(255, 218, 232, .08);
  --text: #f8e9ef;
  --text-soft: rgba(248, 233, 239, .68);
  --muted: rgba(248, 233, 239, .43);
  --muted-2: rgba(248, 233, 239, .3);
  --accent: #d77a9b;
  --accent-2: #efa5bd;
  --accent-contrast: #150711;
  --success: #9ec17d;
  --danger: #ff706e;
  --warning: #e3bb69;
}

body[data-theme="high-contrast"] {
  color-scheme: dark;
  --bg: #000;
  --panel: #080808;
  --panel-2: #111;
  --panel-3: #1b1b1b;
  --line: rgba(255, 255, 255, .34);
  --line-soft: rgba(255, 255, 255, .2);
  --text: #fff;
  --text-soft: rgba(255, 255, 255, .82);
  --muted: rgba(255, 255, 255, .62);
  --muted-2: rgba(255, 255, 255, .45);
  --accent: #ffd23f;
  --accent-2: #ffe680;
  --accent-contrast: #000;
  --success: #6dff78;
  --danger: #ff5f5f;
  --warning: #ffd23f;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .18);
}

body[data-typography="outfit"] {
  --font: "Outfit", "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
}

body[data-typography="dm-sans"] {
  --font: "DM Sans", "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "DM Sans", "Outfit", sans-serif;
}

body[data-typography="inter"] {
  --font: Inter, "DM Sans", "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
}

body[data-typography="fraunces"] {
  --font: "Fraunces", Georgia, "Times New Roman", serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
}

body[data-typography="jetbrains-mono"] {
  --font: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --display: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

body[data-typography="syne"] {
  --font: "Syne", "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Syne", "Outfit", sans-serif;
}

body[data-typography="system"] {
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: ui-serif, Georgia, "Times New Roman", serif;
}

body,
.mail-shell,
.app-frame,
.reader,
.reader-toolbar,
.landing-body,
.landing-footer {
  background: var(--bg);
  color: var(--text);
}

.sidebar,
.sidebar-footer,
.settings-dialog,
.settings-nav,
.compose-window,
.auth-panel,
.toast,
.account-settings-card,
.settings-form,
.option-card,
.mailbox-row,
.attachment-panel {
  background: var(--panel);
  border-color: var(--line-soft);
}

.message-list,
.shortcut-rail,
.message-row,
.search-box input,
.settings-form input,
.settings-form select,
.field input,
.field textarea,
.field select,
.credentials-grid input,
.mailbox-pill,
.compose-row input,
.compose-row textarea,
.compose-attachment,
.telegram-code-box {
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--text);
}

.message-row:hover,
.message-row.active,
.stream-tab:hover,
.stream-tab:focus-visible,
.stream-tab.active,
.settings-tab:hover,
.settings-tab.active,
.option-card.selected,
.mailbox-pill.active,
.mailbox-pill:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, var(--panel-2));
  color: var(--text);
}

.brand-mark,
.primary-btn,
.compose-main {
  background: var(--accent);
  color: var(--accent-contrast);
}

.brand-mark svg,
.primary-btn svg,
.compose-main svg {
  stroke: var(--accent-contrast);
}

.seg-btn.active,
.soft-btn:hover,
.soft-btn:focus-visible,
.attachment-action:hover,
.attachment-action:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 48%, transparent);
  background: color-mix(in srgb, var(--accent) 13%, var(--panel-2));
  color: var(--text);
}

.theme-swatches {
  display: inline-flex;
  gap: 5px;
  margin-bottom: 8px;
}

.theme-swatches i {
  display: block;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.preference-card-theme strong,
.preference-card-typography strong {
  font-size: 15px;
}

body[data-density="compact"] {
  font-size: 13px;
}

body[data-density="compact"] .message-row {
  min-height: 74px;
  padding: 9px 14px;
}

body[data-density="compact"] .list-header {
  min-height: 46px;
  padding-block: 8px 6px;
}

body[data-density="compact"] .settings-panel,
body[data-density="compact"] .reader-body {
  padding-top: 18px;
}

body[data-density="dense"] {
  font-size: 12px;
}

body[data-density="dense"] .message-row {
  min-height: 62px;
  padding: 7px 12px;
}

body[data-density="dense"] .list-header {
  min-height: 42px;
  padding-block: 6px 5px;
}

body[data-density="dense"] .stream-tab {
  min-height: 29px;
  padding-inline: 10px;
}

body[data-density="comfortable"] {
  font-size: 15px;
}

body[data-density="comfortable"] .message-row {
  min-height: 104px;
  padding: 15px 18px;
}

body[data-density="comfortable"] .list-header {
  min-height: 58px;
  padding-block: 14px 10px;
}

@media (min-width: 901px) {
  body[data-layout="wide-reader"] .app-frame {
    grid-template-columns: 240px var(--mail-list-width, 304px) minmax(0, 1fr);
  }

  body[data-layout="wide-list"] .app-frame {
    grid-template-columns: 240px var(--mail-list-width, 470px) minmax(0, 1fr);
  }

  body[data-layout="focused"] .app-frame,
  body[data-layout="focused"] .app-frame.sidebar-collapsed {
    grid-template-columns: 0 var(--mail-list-width, 360px) minmax(0, 1fr);
  }

  body[data-layout="focused"] .sidebar {
    visibility: hidden;
    border-right: 0;
    pointer-events: none;
  }

  body[data-layout="wide-reader"] .app-frame.sidebar-collapsed,
  body[data-layout="wide-list"] .app-frame.sidebar-collapsed {
    grid-template-columns: 0 var(--mail-list-width, 340px) minmax(0, 1fr);
  }
}

.admin-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.admin-panel-head h2,
.admin-panel-head p {
  margin-inline: 0;
}

.admin-panel-head p {
  margin: 0;
  color: var(--muted);
}

.admin-panel-head .soft-btn {
  flex: 0 0 auto;
}

.admin-status {
  margin-bottom: 16px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.admin-loading {
  height: 2px;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.admin-loading::before {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  animation: admin-loading-slide 1.1s ease-in-out infinite;
  content: "";
}

@keyframes admin-loading-slide {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(260%);
  }
}

.admin-users {
  display: grid;
  gap: 14px;
}

.admin-user-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.admin-user-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.admin-user-head strong,
.admin-user-head span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-head span,
.admin-user-dates,
.admin-domain-title span {
  color: var(--muted);
  font-size: 12px;
}

.admin-reset-btn {
  min-height: 34px;
  padding-inline: 12px;
  white-space: nowrap;
}

.admin-user-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-family: var(--mono);
}

.admin-mailboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-mailbox-pill {
  display: inline-flex;
  max-width: 100%;
  min-height: 30px;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 0 10px;
  background: var(--panel);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 12px;
}

.admin-mailbox-pill.active {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 16%, var(--panel));
  color: var(--text);
}

.admin-mailbox-pill em {
  flex: 0 0 auto;
  color: var(--accent);
  font-style: normal;
  font-weight: 800;
}

.admin-domain-form {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.admin-domain-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
}

.domain-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.domain-check {
  display: flex;
  min-width: 0;
  min-height: 36px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 0 10px;
  background: var(--panel);
  color: var(--text-soft);
  cursor: pointer;
}

.domain-check input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.domain-check span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.domain-check:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 13%, var(--panel));
  color: var(--text);
}

.admin-domain-form .primary-btn {
  justify-self: end;
}

@media (max-width: 720px) {
  .admin-panel-head,
  .admin-domain-title {
    display: grid;
  }

  .admin-panel-head .soft-btn,
  .admin-domain-form .primary-btn {
    width: 100%;
    justify-content: center;
  }

  .admin-user-head {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .admin-reset-btn {
    grid-column: 1 / -1;
    justify-content: center;
    width: 100%;
  }

  .domain-checkbox-grid {
    grid-template-columns: 1fr;
  }
}
