:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --bg-deep: #e8eef7;
  --panel: rgba(255, 255, 255, 0.86);
  --text: #08111f;
  --muted: #68748a;
  --muted-strong: #4c5870;
  --line: rgba(135, 151, 177, 0.26);
  --accent: #12b8a6;
  --accent-strong: #087f73;
  --ink: #101827;
  --ink-soft: #1c2738;
  --danger: #c9184a;
  --success: #087f73;
  --radius: 8px;
  --shadow: 0 28px 80px rgba(23, 35, 54, 0.14);
  --shadow-soft: 0 18px 50px rgba(23, 35, 54, 0.08);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Inter, sans-serif;
}

body { padding-bottom: var(--cookie-banner-space, 0px); }
.footer-privacy { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.footer-privacy a { margin: 0; font-size: 12px; }
.footer-privacy button { border: 0; background: none; padding: 0; color: var(--muted-strong); font: inherit; font-size: 12px; cursor: pointer; }
.footer-privacy button:hover { text-decoration: underline; text-underline-offset: 3px; }
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; background: #1c2839; color: #eef2f7; box-shadow: 0 -4px 24px #08111f18; }
.cookie-inner { width: min(1320px,100%); padding: 20px 28px; margin: auto; display: flex; gap: 32px; align-items: center; justify-content: space-between; }
.cookie-copy { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.cookie-copy > svg { color: #21c2b0; width: 22px; height: 22px; flex: 0 0 22px; margin-top: 2px; }
.cookie-copy p { font-size: 14px; line-height: 1.6; }
.cookie-copy a { color: #42d6c3; text-underline-offset: 3px; }
.cookie-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.cookie-actions button { min-width: 110px; min-height: 44px; padding: 10px 18px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 600; }
.cookie-accept { background: #0b998d; border: 1px solid #0b998d; color: white; }
.cookie-decline { border: 1px solid #8191a9; background: transparent; color: #f2f5fa; }
.cookie-accept:hover { background: #087f73; }
.cookie-decline:hover { background: #ffffff12; }
.cookie-actions button:focus-visible, .footer-privacy button:focus-visible { outline: 2px solid #42d6c3; outline-offset: 3px; }
.privacy-view { min-height: 80vh; padding: 40px 24px 72px; }
.privacy-header { max-width: 900px; margin: 0 auto 52px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.privacy-document { max-width: 780px; margin: auto; color: var(--muted-strong); }
.privacy-document h1 { color: var(--text); font-size: 36px; line-height: 1.2; overflow-wrap: anywhere; }
.privacy-document .privacy-updated { margin-top: 14px; color: var(--muted); font-size: 13px; }
.privacy-document h2 { font-size: 21px; line-height: 1.4; color: var(--text); margin-top: 34px; }
.privacy-document p { font-size: 15px; line-height: 1.8; margin-top: 18px; }
.privacy-contact { display: inline-block; color: var(--accent-strong); margin-top: 28px; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .cookie-inner { padding: 18px 20px; flex-direction: column; align-items: stretch; gap: 16px; }
  .cookie-actions button { flex: 1; }
  .privacy-view { padding: 28px 20px 52px; }
  .privacy-header { margin-bottom: 38px; }
  .privacy-document h1 { font-size: 28px; }
}

.nav-actions { display: flex; align-items: center; gap: 12px; }
.language-switch { display: inline-flex; flex: 0 0 auto; align-items: center; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.6); gap: 2px; }
.language-switch a { display: grid; place-items: center; width: 38px; min-height: 32px; border-radius: 5px; color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; }
.language-switch a[aria-current="page"] { background: #fff; color: var(--accent-strong); box-shadow: 0 1px 4px #182a3320; }
.registration-header { width: min(468px,100%); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sidebar-language { margin: 16px 0 20px; }
.sidebar-language .language-switch { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.14); }
.sidebar-language .language-switch a { width: 34px; min-height: 30px; color: #b8c8d5; }
.sidebar-language .language-switch a[aria-current="page"] { background: #20524f; color: #ecfffb; box-shadow: none; }
.sidebar-language .language-switch a:hover { color: #fff; background: rgba(255,255,255,.1); }
.sidebar-language .language-switch a:focus-visible { outline-color: #42d6c3; }
@media (max-width: 600px) { .nav-actions .desktop-register { display: none; } }

.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,.55); }
.footer-inner { width: min(1120px, 100%); padding: 24px; margin: auto; display: flex; justify-content: space-between; gap: 24px; font-size: 12px; line-height: 1.6; }
.footer-inner a { display: inline-block; margin-top: 3px; color: var(--muted-strong); font-size: 13px; text-decoration: none; overflow-wrap: anywhere; }
.footer-inner a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-support { text-align: right; }
@media (max-width: 420px) { .footer-inner { padding: 20px 16px; gap: 16px; } .footer-inner > div { min-width: 0; flex: 1; } .footer-inner a { font-size: 12px; } }

.password-field { position: relative; display: block; width: 100%; min-width: 0; }
.password-field input { padding-right: 52px; }
.password-toggle { position: absolute; right: 5px; top: 4px; width: 42px; height: 42px; padding: 10px; border: 0; border-radius: 6px; background: transparent; color: var(--muted-strong); display: grid; place-items: center; }
.password-toggle:hover { background: #e6f4f1; color: var(--accent-strong); }
.password-toggle svg { width: 20px; height: 20px; pointer-events: none; }
.password-toggle:focus-visible, a:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
.auth-footer { margin-top: 22px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.6; }
.auth-footer a { color: var(--accent-strong); font-weight: 700; text-underline-offset: 3px; }
.registration-view { min-height: 100vh; padding: 42px 20px 64px; display: flex; flex-direction: column; align-items: center; gap: 38px; }
.registration-brand { text-decoration: none; }
.registration-card { max-width: 468px; }
.registration-card h1 { font-size: 28px; line-height: 1.2; }
.registration-eyebrow { color: var(--accent-strong); font-weight: 700; font-size: 13px; margin-bottom: 12px; }
.email-compose { margin-top: 9px; display: grid; grid-template-columns: minmax(0, 1fr) 176px; }
.email-compose input { border-radius: 8px 0 0 8px; min-width: 0; }
.email-compose select { width: 100%; min-width: 0; min-height: 50px; border: 1px solid var(--line); border-left: 0; border-radius: 0 8px 8px 0; padding: 0 10px; color: var(--text); background: #eef6f5; font: inherit; font-size: 13px; }
.registration-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.registration-check { width: 48px; height: 48px; display: grid; place-items: center; background: #e1f5ed; color: var(--accent-strong); border-radius: 8px; margin-bottom: 24px; }
.created-email { margin-top: 18px; color: var(--muted-strong); overflow-wrap: anywhere; }
.auth-link-button { display: flex; align-items: center; justify-content: center; text-decoration: none; }
@media (max-width: 420px) {
  .registration-view { padding: 28px 16px 48px; gap: 28px; }
  .registration-card { padding: 24px 20px; }
  .email-compose { grid-template-columns: 1fr; gap: 8px; }
  .email-compose input, .email-compose select { border: 1px solid var(--line); border-radius: 8px; }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(circle at 18% 12%, rgba(18, 184, 166, 0.22), transparent 28%),
    radial-gradient(circle at 86% 4%, rgba(92, 124, 250, 0.18), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 46%, var(--bg-deep) 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

h1,
h2,
p {
  margin: 0;
}

.hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

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

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-row.compact {
  gap: 10px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: white;
  font-size: 27px;
  font-weight: 900;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), transparent 38%),
    linear-gradient(145deg, #17d3bf, #087f73);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), 0 12px 28px rgba(18, 184, 166, 0.24);
}

.brand-row h1,
.brand-row h2 {
  color: var(--text);
  line-height: 1.04;
  letter-spacing: 0;
}

.brand-row h1 {
  font-size: 31px;
}

.brand-row h2 {
  font-size: 18px;
}

.brand-row p {
  max-width: 230px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  position: absolute;
  top: 24px;
  left: 50%;
  z-index: 2;
  width: min(1120px, calc(100% - 40px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 18px 50px rgba(57, 70, 91, 0.09);
  backdrop-filter: blur(22px);
}

.site-nav .brand-mark {
  width: 38px;
  height: 38px;
  font-size: 20px;
}

.nav-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(135, 151, 177, 0.26);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.login-view {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 118px 24px 48px;
  overflow: hidden;
}

.login-view::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -220px;
  width: min(980px, 92vw);
  height: 520px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(18, 184, 166, 0.2), transparent 66%);
  pointer-events: none;
}

.login-hero {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 440px);
  gap: 44px;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(18, 184, 166, 0.24);
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(228, 251, 247, 0.76);
  font-size: 13px;
  font-weight: 850;
}

.hero-copy h1 {
  margin-top: 22px;
  color: var(--text);
  font-size: clamp(48px, 6vw, 76px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 560px;
  margin-top: 22px;
  color: var(--muted-strong);
  font-size: 21px;
  line-height: 1.5;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero-stats span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 12px 30px rgba(57, 70, 91, 0.08);
  font-size: 14px;
  font-weight: 800;
  backdrop-filter: blur(18px);
}

.login-card {
  width: 100%;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

label {
  display: grid;
  gap: 9px;
  margin-top: 18px;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.86);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input {
  min-height: 50px;
  padding: 0 15px;
}

input:focus,
textarea:focus {
  border-color: rgba(18, 184, 166, 0.72);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(18, 184, 166, 0.14);
}

.primary-button {
  width: 100%;
  min-height: 52px;
  margin-top: 24px;
  border: 0;
  border-radius: var(--radius);
  color: white;
  background: linear-gradient(145deg, #101827, #263348);
  box-shadow: 0 16px 36px rgba(16, 24, 39, 0.24);
  font-weight: 900;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 42px rgba(16, 24, 39, 0.28);
}

.primary-button:disabled {
  opacity: 0.68;
  cursor: wait;
  transform: none;
}

.form-error {
  min-height: 20px;
  margin-top: 13px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 750;
}

.form-error.success {
  color: var(--success);
}

.mail-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px minmax(340px, 460px) minmax(0, 1fr);
  background:
    radial-gradient(circle at 10% 0%, rgba(18, 184, 166, 0.13), transparent 26%),
    linear-gradient(135deg, #f7f9fd 0%, #edf3fb 100%);
}

.sidebar,
.message-list-panel,
.message-reader {
  min-height: 100vh;
}

.sidebar {
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
  background:
    radial-gradient(circle at 30% 0%, rgba(18, 184, 166, 0.28), transparent 32%),
    linear-gradient(180deg, #132033 0%, #0b1220 100%);
  padding: 24px 20px;
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04));
  pointer-events: none;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.sidebar .brand-mark {
  width: 42px;
  height: 42px;
  font-size: 22px;
}

.sidebar .brand-row h2 {
  color: #ffffff;
}

.sidebar .brand-row p {
  max-width: 160px;
  color: rgba(220, 229, 241, 0.74);
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-top .brand-row { min-width: 0; flex: 1; }
.sidebar-top .brand-row > div:last-child { min-width: 0; }
.sidebar-top .brand-row p { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon-button {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  color: currentColor;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
}

.message-list-panel .icon-button,
.close-button {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 28px rgba(23, 35, 54, 0.08);
}

.icon-refresh,
.icon-exit,
.icon-close {
  width: 18px;
  height: 18px;
  display: block;
  position: relative;
}

.icon-refresh::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

.icon-refresh::after {
  content: "";
  position: absolute;
  right: 1px;
  top: 3px;
  border-left: 6px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.icon-exit::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 3px;
  width: 9px;
  height: 12px;
  border: 2px solid currentColor;
  border-right: 0;
  border-radius: 2px;
}

.icon-exit::after {
  content: "";
  position: absolute;
  right: 0;
  top: 8px;
  width: 13px;
  height: 2px;
  background: currentColor;
  box-shadow: -3px -3px 0 -1px currentColor, -3px 3px 0 -1px currentColor;
}

.icon-close::before,
.icon-close::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.icon-close::before {
  transform: rotate(45deg);
}

.icon-close::after {
  transform: rotate(-45deg);
}

.sidebar-action {
  width: 100%;
  min-height: 46px;
  margin-top: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  color: #eef5ff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sidebar-action:hover {
  background: rgba(255, 255, 255, 0.14);
}

.folder-list {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.folder-button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: rgba(231, 237, 247, 0.78);
  background: transparent;
  padding: 0 12px;
  text-align: left;
  font-weight: 750;
}

.folder-button span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-button.active,
.folder-button:hover {
  border-color: rgba(255, 255, 255, 0.09);
  color: white;
  background: rgba(255, 255, 255, 0.12);
}

.folder-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(18, 184, 166, 0.12);
}

.message-list-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px);
}

.panel-toolbar {
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.panel-toolbar h2 {
  color: var(--text);
  font-size: 28px;
  line-height: 1.06;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.panel-toolbar p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.message-list {
  overflow: auto;
  padding: 14px;
}

.message-item {
  width: 100%;
  display: grid;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  padding: 17px;
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.message-item:hover,
.message-item.active {
  border-color: rgba(135, 151, 177, 0.24);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 42px rgba(23, 35, 54, 0.09);
}

.message-item:hover {
  transform: translateY(-1px);
}

.message-meta,
.message-item time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-item strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-item p {
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.message-skeleton,
.list-empty {
  margin: 8px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.message-skeleton {
  display: grid;
  gap: 10px;
}

.message-skeleton span,
.message-skeleton b,
.message-skeleton i {
  height: 10px;
  border-radius: 99px;
  background: #dfe6f0;
}

.message-skeleton span {
  width: 42%;
}

.message-skeleton b {
  width: 72%;
}

.message-skeleton i {
  width: 90%;
}

.list-empty,
.reader-loading {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.message-reader {
  overflow: auto;
  background:
    radial-gradient(circle at 80% 0%, rgba(18, 184, 166, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0, #fbfcff 100%);
}

.empty-reader,
.reader-loading {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 11px;
  padding: 24px;
  text-align: center;
}

.empty-reader h2 {
  color: var(--text);
  font-size: 26px;
}

.empty-reader p {
  max-width: 320px;
  color: var(--muted);
  line-height: 1.5;
}

.empty-icon {
  width: 58px;
  height: 42px;
  border: 2px solid rgba(135, 151, 177, 0.42);
  border-radius: var(--radius);
  position: relative;
  background: rgba(255, 255, 255, 0.72);
}

.empty-icon::before,
.empty-icon::after {
  content: "";
  position: absolute;
  top: 11px;
  width: 30px;
  height: 2px;
  background: rgba(135, 151, 177, 0.56);
}

.empty-icon::before {
  left: 3px;
  transform: rotate(31deg);
}

.empty-icon::after {
  right: 3px;
  transform: rotate(-31deg);
}

.reader-header {
  max-width: 980px;
  padding: 44px 58px 28px;
  border-bottom: 1px solid var(--line);
}

.reader-header span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.reader-header h1 {
  margin-top: 14px;
  color: var(--text);
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.reader-header dl {
  display: grid;
  gap: 9px;
  margin: 25px 0 0;
}

.reader-header div {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

.reader-header dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.reader-header dd {
  margin: 0;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.reader-body {
  max-width: 900px;
  padding: 38px 58px 72px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.74;
  overflow-wrap: anywhere;
  white-space: normal;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(9, 17, 31, 0.48);
  backdrop-filter: blur(12px);
}

.modal-card {
  width: min(430px, 100%);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 4px;
}

.modal-header h2 {
  color: var(--text);
  font-size: 24px;
}

.admin-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(18, 184, 166, 0.18), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(92, 124, 250, 0.14), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #eef3fa 100%);
  color: var(--text);
}

.admin-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0;
}

.admin-panel {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
  padding: 32px;
  backdrop-filter: blur(22px);
}

.admin-panel h1,
.admin-panel h2 {
  margin: 0;
  color: var(--text);
  letter-spacing: 0;
}

.admin-panel h1 {
  margin-top: 16px;
  font-size: 38px;
  line-height: 1.05;
}

.admin-workspace {
  display: grid;
  gap: 24px;
}

.admin-topbar,
.admin-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-title h1 {
  margin-top: 0;
}

.admin-form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.admin-form label {
  color: var(--muted-strong);
  font-weight: 850;
}

.admin-form input,
.admin-form textarea {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  padding: 14px 15px;
}

.admin-form textarea {
  resize: vertical;
  min-height: 190px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.55;
}

.admin-form button,
.admin-topbar button,
.admin-list-head button {
  min-height: 50px;
  border: 0;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(145deg, #101827, #263348);
  cursor: pointer;
  font-weight: 900;
  padding: 0 18px;
}

.admin-list-head button,
.admin-topbar button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
}

.admin-status {
  min-height: 22px;
  color: var(--danger);
  font-weight: 850;
}

.admin-status.ok {
  color: var(--success);
}

.admin-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
  background: rgba(255, 255, 255, 0.64);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid rgba(135, 151, 177, 0.18);
  padding: 15px 16px;
  text-align: left;
  white-space: nowrap;
}

.admin-table th {
  color: var(--muted-strong);
  background: rgba(248, 250, 253, 0.82);
  font-size: 13px;
  text-transform: uppercase;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 1040px) {
  .login-hero {
    grid-template-columns: 1fr;
  }

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

  .mail-view {
    grid-template-columns: 250px minmax(300px, 390px);
  }

  .message-reader {
    grid-column: 1 / -1;
    min-height: 48vh;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .site-nav {
    top: 14px;
    width: min(100% - 24px, 1120px);
  }

  .site-nav .brand-row p {
    display: none;
  }

  .login-view {
    padding: 94px 14px 24px;
  }

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

  .hero-lede {
    font-size: 18px;
  }

  .login-card {
    padding: 22px;
  }

  .mail-view {
    display: block;
  }

  .sidebar,
  .message-list-panel,
  .message-reader {
    min-height: auto;
  }

  .sidebar {
    padding: 16px;
  }

  .folder-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-top: 18px;
    padding-bottom: 4px;
  }

  .folder-button {
    width: auto;
    flex: 0 0 auto;
  }

  .message-list-panel {
    border-right: 0;
  }

  .message-list {
    max-height: 48vh;
  }

  .empty-reader,
  .reader-loading {
    min-height: 34vh;
  }

  .reader-header,
  .reader-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .reader-header h1 {
    font-size: 26px;
  }

  .admin-shell {
    width: min(100% - 20px, 1120px);
    padding: 20px 0;
  }

  .admin-panel {
    padding: 20px;
  }

  .admin-panel h1 {
    font-size: 31px;
  }

  .admin-topbar,
  .admin-list-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
