:root {
  --bg: #f5f5f5;
  --surface: #fff;
  --surface-2: #fafafa;
  --text: #17202a;
  --muted: #6b7280;
  --line: #e0e0e0;
  --primary: #202124;
  --primary-dark: #000;
  --teal: #202124;
  --shadow: 0 18px 50px rgba(31, 41, 55, 0.09);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: var(--text);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 0, #fff 0, transparent 24rem), var(--bg);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.hidden {
  display: none !important;
}
.muted {
  color: var(--muted);
  margin: 0.25rem 0;
}
.fine-print {
  font-size: 0.78rem;
  color: #8b93a1;
  text-align: center;
  margin: 1.5rem 0 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.brand-logo {
  display: block;
  flex: none;
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 5px 14px rgba(17, 24, 39, 0.16);
}
.brand-login {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 4rem);
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(248, 250, 255, 0.95), rgba(243, 241, 249, 0.96)),
    #f5f6fa;
}
.login-layout {
  width: min(980px, 100%);
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  overflow: hidden;
  border: 1px solid rgba(33, 35, 54, 0.08);
  border-radius: 34px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(35, 29, 70, 0.16);
}
.login-intro {
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 12% 92%, rgba(255, 121, 64, 0.92), transparent 30%),
    radial-gradient(circle at 88% 16%, rgba(43, 192, 255, 0.62), transparent 31%),
    linear-gradient(145deg, #1a1532 4%, #39236c 52%, #722e89 100%);
}
.login-intro::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 250px;
  height: 250px;
  right: -86px;
  bottom: 74px;
  border-radius: 42% 58% 62% 38%;
  background: linear-gradient(135deg, #ffdc62, #ff4f9a 55%, #7e55ff);
  filter: blur(1px);
  transform: rotate(-18deg);
  opacity: 0.82;
}
.login-intro::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 0.8px, transparent 0.8px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
}
.login-intro .brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
}
.login-orbit {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}
.login-orbit-one {
  width: 380px;
  height: 380px;
  top: -130px;
  right: -110px;
}
.login-orbit-two {
  width: 240px;
  height: 240px;
  top: -58px;
  right: -42px;
}
.login-intro-copy {
  position: relative;
  z-index: 2;
  margin: auto 0;
  max-width: 420px;
}
.login-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.16em;
}
.login-intro-copy h1 {
  margin: 1.4rem 0 1.2rem;
  font-size: clamp(2.35rem, 4vw, 3.65rem);
  line-height: 1.14;
  letter-spacing: -0.055em;
}
.login-intro-copy p {
  max-width: 370px;
  margin: 0;
  color: rgba(255, 255, 255, 0.73);
  font-size: 0.98rem;
  line-height: 1.75;
}
.login-spectrum {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 0.45rem;
  margin-bottom: 1.6rem;
}
.login-spectrum span {
  width: 23px;
  height: 5px;
  border-radius: 999px;
  background: #ff5f85;
}
.login-spectrum span:nth-child(2) { background: #ffb14a; }
.login-spectrum span:nth-child(3) { background: #ffe46a; }
.login-spectrum span:nth-child(4) { background: #43dcbd; }
.login-spectrum span:nth-child(5) { background: #5eb7ff; }
.login-intro-foot {
  position: relative;
  z-index: 2;
  margin: 0;
  color: rgba(255, 255, 255, 0.47);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.login-card {
  width: 100%;
  padding: 4.2rem 3.5rem 2.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}
.login-form-header {
  position: relative;
  margin-bottom: 2.2rem;
}
.login-form-mark {
  display: block;
  width: 34px;
  height: 4px;
  margin-bottom: 1.5rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff607c, #8b5cf6, #39bdf8);
}
.login-form-header p {
  margin: 0 0 0.65rem;
  color: #8b5cf6;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.17em;
}
.login-form-header h2 {
  margin: 0;
  color: #211d2f;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.04em;
}
.login-form-header > span:last-child {
  display: block;
  margin-top: 0.55rem;
  color: #858092;
  font-size: 0.86rem;
}
.login-card .stack-lg {
  gap: 1.05rem;
}
.login-card label {
  gap: 0.5rem;
  color: #4d475c;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.login-card input {
  min-height: 50px;
  border-color: #e4e1e9;
  border-radius: 13px;
  background: #faf9fc;
  padding: 0.82rem 0.95rem;
}
.login-card input::placeholder {
  color: #aaa5b2;
}
.login-card input:focus {
  border-color: #8c64da;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(140, 100, 218, 0.1);
}
.login-card .captcha-row {
  grid-template-columns: 1fr 145px;
  gap: 0.7rem;
  margin-top: -0.5rem;
}
.login-card .captcha-box {
  height: 50px;
  border-color: #e4e1e9;
  border-radius: 13px;
  background: #faf9fc;
}
.login-submit.button.primary {
  min-height: 52px;
  margin-top: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border-radius: 13px;
  background: linear-gradient(105deg, #2a213f, #553780 58%, #7f3c91);
  box-shadow: 0 12px 28px rgba(66, 40, 105, 0.24);
}
.login-submit.button.primary:hover {
  background: linear-gradient(105deg, #211a33, #472d6d 58%, #713480);
  transform: translateY(-1px);
}
.login-submit span {
  font-size: 1.1rem;
  transition: transform 0.18s ease;
}
.login-submit:hover span {
  transform: translateX(3px);
}
.login-security-note {
  margin: 1.8rem 0 0;
  color: #aaa5b2;
  text-align: center;
  font-size: 0.7rem;
}
.login-security-note span {
  margin-right: 0.28rem;
  color: #43bd99;
  font-size: 0.55rem;
}
.stack,
.stack-lg {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.stack-lg {
  gap: 1.2rem;
}
label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.86rem;
  font-weight: 650;
  color: #3d4652;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #dfe3e9;
  border-radius: 11px;
  background: #fff;
  padding: 0.76rem 0.9rem;
  outline: none;
  color: var(--text);
  transition: 0.18s;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #9aa0a6;
  box-shadow: 0 0 0 3px rgba(32, 33, 36, 0.1);
}
textarea {
  resize: vertical;
}
.captcha-row {
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 0.65rem;
}
.captcha-box {
  height: 52px;
  border: 1px solid #dfe3e9;
  border-radius: 11px;
  padding: 0;
  overflow: hidden;
  background: white;
}
.captcha-box img {
  display: block;
  width: 100%;
  height: 100%;
}
.button {
  border: 0;
  border-radius: 11px;
  padding: 0.72rem 1.05rem;
  font-weight: 700;
  color: #354052;
  background: #edf0f4;
}
.button.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 7px 18px rgba(32, 33, 36, 0.18);
}
.button.primary:hover {
  background: var(--primary-dark);
}
.button.ghost {
  background: #fff;
  border: 1px solid var(--line);
}
.button.danger-ghost {
  background: #fff;
  border: 1px solid #f2b8b5;
  color: #c5221f;
}
.button.danger-ghost:hover {
  background: #fce8e6;
  border-color: #e67c73;
}
.button.danger {
  color: #fff;
  background: #c5221f;
  box-shadow: 0 7px 18px rgba(197, 34, 31, 0.2);
}
.button.danger:hover {
  background: #a50e0e;
}
.button.full {
  width: 100%;
  padding: 0.85rem;
}
.app-shell {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.55rem 1.2rem;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.83);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(20px);
}
.sidebar .brand {
  padding: 0.2rem 0.5rem 1.5rem;
}
.compose {
  width: 100%;
  margin-bottom: 1.25rem;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.nav button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: transparent;
  color: #56606d;
  padding: 0.72rem 0.85rem;
  border-radius: 10px;
  text-align: left;
}
.nav button:hover {
  background: #f5f6f8;
}
.nav button.active {
  background: #e8eaed;
  color: #202124;
  font-weight: 800;
}
.nav button b {
  font-size: 0.72rem;
  background: #3c4043;
  color: #fff;
  padding: 0.08rem 0.42rem;
  border-radius: 1rem;
}
.admin-nav {
  border-top: 1px solid var(--line);
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}
.admin-nav small {
  color: #9aa1ac;
  text-transform: uppercase;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.25rem 0.85rem;
  letter-spacing: 0.1em;
}
.blocked-senders-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.blocked-senders-heading h2,
.blocked-senders-heading p {
  margin: 0;
}
.blocked-senders-heading p {
  margin-top: 0.3rem;
}
.blocked-sender-modal {
  width: min(500px, calc(100vw - 2rem));
}
.blocked-sender-modal header p {
  margin: 0.25rem 0 0;
}
.blocked-sender-modal .modal-body {
  display: grid;
  gap: 0.85rem;
}
.blocked-sender-modal .modal-body label {
  display: grid;
  gap: 0.45rem;
  color: #3c4043;
  font-size: 0.82rem;
  font-weight: 650;
}
.blocked-sender-modal .compose-error {
  margin: 0;
}
.blocked-sender-scope {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  color: #4b5563;
  background: #f6f8fb;
  font-size: 0.78rem;
  line-height: 1.45;
}
.blocked-sender-list {
  display: grid;
  gap: 0.65rem;
}
.blocked-sender-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(390px, 1.4fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.blocked-sender-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.blocked-sender-identity > div {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}
.blocked-sender-identity strong,
.blocked-sender-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.blocked-sender-identity small,
.blocked-sender-stats {
  color: var(--muted);
  font-size: 0.76rem;
}
.blocked-sender-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fce8e6;
  color: #b3261e;
}
.blocked-sender-icon .toolbar-svg {
  width: 20px;
  height: 20px;
}
.blocked-sender-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}
.blocked-sender-stats span {
  display: grid;
  gap: 0.15rem;
}
.blocked-sender-stats strong {
  color: #303846;
}
.compact-empty {
  min-height: 180px;
}
.account-card {
  margin-top: auto;
  position: relative;
  padding: 0.8rem 0.55rem;
  border-top: 1px solid var(--line);
}
.account-menu-trigger {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem;
  text-align: left;
}
.account-menu-trigger:hover,
.account-menu-trigger[aria-expanded="true"] {
  background: #f1f3f4;
}
.account-copy {
  min-width: 0;
}
.account-copy strong,
.account-copy small {
  display: block;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-copy strong {
  font-size: 0.83rem;
}
.account-copy small {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.account-menu-chevron {
  color: #77818e;
  font-size: 0.9rem;
  transition: transform 0.16s ease;
}
.account-menu-trigger[aria-expanded="true"] .account-menu-chevron {
  transform: rotate(180deg);
}
.account-menu {
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: calc(100% + 0.4rem);
  z-index: 30;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(38, 47, 61, 0.16);
}
.account-menu button {
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #303846;
  padding: 0.65rem 0.75rem;
  text-align: left;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
}
.account-menu button:hover {
  background: #f1f3f4;
}
.account-language-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.55rem 0.55rem 0.75rem;
  border-bottom: 1px solid #edf0f3;
  color: #303846;
  font-size: 0.82rem;
  font-weight: 700;
}
.account-language-item select {
  width: auto;
  min-width: 88px;
  height: 32px;
  padding: 0 1.45rem 0 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: #fff;
  color: #3c4043;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding-top: 2px;
  background: #e7f5f3;
  color: var(--teal);
  font-weight: 900;
  line-height: 1;
}
.avatar.account-logo-avatar {
  overflow: hidden;
  padding: 0;
  background: #fff;
}
.account-logo-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.icon-button {
  border: 0;
  background: transparent;
  color: #77818e;
  font-size: 1.3rem;
  padding: 0.25rem;
}
.workspace {
  min-width: 0;
}
.topbar {
  min-height: 100px;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.78);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar h2 {
  margin: 0;
  font-size: 1.45rem;
}
.top-actions {
  display: flex;
  gap: 0.65rem;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.topbar-refresh {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5f6368;
  cursor: pointer;
}
.topbar-refresh:hover,
.topbar-refresh:focus-visible {
  background: #e9eef6;
}
.topbar-refresh:focus-visible {
  outline: 2px solid #9aa0a6;
  outline-offset: 1px;
}
.topbar-refresh svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.search {
  min-width: 280px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 0.75rem;
}
.search input {
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
  box-shadow: none;
  padding: 0.68rem 0.25rem;
}
.search-field {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
}
.search input::-webkit-search-cancel-button {
  display: none;
}
.search-clear {
  position: relative;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.search-clear.hidden {
  display: none;
}
.search-clear:hover,
.search-clear:focus,
.search-clear:focus-visible,
.search-clear:active {
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
}
.search-clear:focus-visible {
  outline: 0;
}
.search-clear > span {
  display: block;
  color: #202124;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  transform: translateY(-1px);
}
.content {
  padding: 1.5rem 2rem 3rem;
}
.mail-layout {
  display: grid;
  grid-template-columns: minmax(360px, 43%) minmax(420px, 1fr);
  min-height: calc(100vh - 150px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(31, 41, 55, 0.04);
}
.message-list {
  border-right: 1px solid var(--line);
  overflow: auto;
}
.message-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.15rem;
  text-align: left;
  background: #fff;
  color: inherit;
}
.message-row:hover,
.message-row.selected {
  background: #fff8f5;
}
.message-row.unread .sender,
.message-row.unread .subject {
  font-weight: 850;
}
.message-row .sender {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.message-row time {
  font-size: 0.72rem;
  color: var(--muted);
}
.message-row .subject {
  grid-column: 1/-1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.88rem;
}
.message-row .preview {
  grid-column: 1/-1;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.77rem;
}
.empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 3rem;
}
.empty .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
}
.message-detail {
  min-width: 0;
  background: #fff;
}
.detail-empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: #a1a8b1;
}
.detail-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.detail-header h3 {
  font-size: 1.32rem;
  margin: 0.4rem 0 1rem;
}
.detail-address {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0.35rem;
  font-size: 0.82rem;
  margin: 0.28rem 0;
}
.detail-address span {
  color: var(--muted);
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.detail-body {
  padding: 1rem 1.5rem;
}
.mail-frame {
  width: 100%;
  height: 470px;
  border: 0;
  background: #fff;
}
.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0 1.5rem 1.5rem;
}
.attachment {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  text-decoration: none;
  color: #384250;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  font-size: 0.78rem;
}
.paperclip-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.attachment .paperclip-icon {
  color: #4f5965;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.audit-summary {
  margin-bottom: 1rem;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: 0 5px 20px rgba(31, 41, 55, 0.035);
}
.card h3 {
  margin: 0.15rem 0 0.4rem;
}
.card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.domain-list {
  display: grid;
  gap: 0.55rem;
}
.domain-row {
  min-height: 60px;
  display: grid;
  grid-template-columns: minmax(170px, 1.35fr) minmax(130px, 0.9fr) minmax(100px, 0.65fr) auto minmax(110px, auto);
  align-items: center;
  gap: 0.8rem;
  padding: 0.55rem 0.85rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(31, 41, 55, 0.025);
}
.domain-identity {
  min-width: 0;
}
.domain-identity h3 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.98rem;
}
.domain-identity .muted {
  display: block;
  margin-top: 0.08rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
}
.domain-fact {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.76rem;
  white-space: nowrap;
}
.domain-fact span {
  color: var(--muted);
}
.domain-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
}
.domain-actions .button {
  min-height: 34px;
  padding: 0.42rem 0.65rem;
  font-size: 0.74rem;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .domain-row {
    grid-template-columns: minmax(150px, 1fr) auto auto auto;
  }
  .domain-actions {
    grid-column: 1/-1;
    margin-top: -0.15rem;
  }
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
}
.status.on {
  background: #e8f7ef;
  color: #16764a;
}
.status.off {
  background: #f1f3f5;
  color: #737b86;
}
.metric {
  font-size: 2.1rem;
  font-weight: 850;
  letter-spacing: -0.04em;
  margin: 0.5rem 0;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.alias-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.alias-search {
  width: min(290px, 32vw);
  min-width: 220px;
  height: 44px;
  background: #fff;
}
.table-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.data-table th,
.data-table td {
  text-align: left;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7b8490;
  background: #fafbfc;
}
.data-table tr:last-child td {
  border-bottom: 0;
}
.data-table .alias-identity small {
  display: block;
  margin-top: 0.12rem;
}
.pill {
  padding: 0.2rem 0.45rem;
  border-radius: 8px;
  background: #f2f4f7;
  font-size: 0.7rem;
}
.switch-row {
  flex-direction: row;
  align-items: center;
}
.switch-row input {
  width: auto;
}
.inline-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}
.modal {
  border: 0;
  border-radius: 20px;
  padding: 0;
  width: min(650px, calc(100vw - 2rem));
  box-shadow: 0 28px 80px rgba(20, 30, 45, 0.24);
}
.modal::backdrop {
  background: rgba(30, 38, 49, 0.45);
  backdrop-filter: blur(4px);
}
.modal header,
.modal footer {
  padding: 1.2rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.modal header h3 {
  margin: 0;
}
.modal footer {
  border: 0;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
  gap: 0.6rem;
}
.modal-body {
  padding: 1.3rem 1.4rem;
  max-height: 68vh;
  overflow: auto;
}
.confirm-modal {
  width: min(440px, calc(100vw - 2rem));
}
.modal .confirm-modal-header {
  justify-content: flex-start;
  gap: 0.9rem;
}
.confirm-modal-header p {
  margin: 0.25rem 0 0;
}
.confirm-modal-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #c5221f;
  background: #fce8e6;
}
.confirm-modal-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.alias-sync-modal .confirm-modal-icon {
  color: #30343a;
  background: #f1f3f4;
}
.confirm-modal-body p {
  margin: 0.85rem 0 0;
  line-height: 1.5;
}
.confirm-modal-body .confirm-message {
  margin-top: 0;
  color: #202124;
  font-weight: 600;
}
.confirm-address {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1rem;
}
.confirm-safe-note {
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  color: #4b5563;
  background: #f6f8fb;
  font-size: 0.82rem;
}
.compose-modal {
  width: min(980px, calc(100vw - 3rem));
  height: min(760px, calc(100vh - 4rem));
  max-width: none;
  max-height: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(32, 33, 36, 0.3);
}
.compose-modal form {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.compose-modal .compose-header {
  min-height: 44px;
  padding: 0.65rem 1rem;
  border-bottom: 0;
  background: #f2f6fc;
}
.compose-modal .compose-header h3 {
  color: #1f1f1f;
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0;
}
.modal header > .icon-button.close-dialog {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  position: relative;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(32, 33, 36, 0.16);
  border-radius: 50%;
  background: #fff;
  color: transparent;
  font-size: 0;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(32, 33, 36, 0.08);
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.12s ease;
}
.modal header > .icon-button.close-dialog::before,
.modal header > .icon-button.close-dialog::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 1.5px;
  border-radius: 999px;
  background: #3c4043;
}
.modal header > .icon-button.close-dialog::before {
  transform: rotate(45deg);
}
.modal header > .icon-button.close-dialog::after {
  transform: rotate(-45deg);
}
.modal header > .icon-button.close-dialog:hover {
  border-color: rgba(32, 33, 36, 0.25);
  background: #f1f3f4;
  box-shadow: 0 2px 5px rgba(32, 33, 36, 0.12);
}
.modal header > .icon-button.close-dialog:active {
  transform: scale(0.94);
}
.modal header > .icon-button.close-dialog:focus {
  outline: none;
}
.modal header > .icon-button.close-dialog:focus-visible {
  outline: 2px solid rgba(32, 33, 36, 0.28);
  outline-offset: 2px;
}
.compose-error {
  margin: 0.65rem 1rem 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid #f3b4ae;
  border-radius: 8px;
  color: #b3261e;
  background: #fce8e6;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
}
.compose-error.pending {
  border-color: #d5d9dd;
  color: #4f555b;
  background: #f4f5f6;
}
.compose-modal .compose-body {
  min-height: 0;
  max-height: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 1rem;
  overflow: auto;
}
.compose-field {
  min-height: 48px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.8rem;
  border-bottom: 1px solid #e7eaf0;
  color: #5f6368;
  font-size: 0.82rem;
  font-weight: 500;
}
.compose-field > span {
  flex: 0 0 72px;
}
.compose-field > input {
  min-width: 0;
  flex: 1;
  padding: 0.7rem 0;
  border: 0;
  border-radius: 0;
  color: #202124;
  background: transparent;
  box-shadow: none;
}
.compose-field > input:focus {
  border: 0;
  box-shadow: none;
}
.compose-recipient-block {
  position: relative;
  border-bottom: 1px solid #e7eaf0;
}
.compose-recipient-block > .compose-field {
  padding-right: 7.5rem;
  border-bottom: 0;
}
.compose-copy-options > summary {
  position: absolute;
  top: 0;
  right: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 0.35rem;
  color: #3c4043;
  font-size: 0.78rem;
  font-weight: 500;
  list-style: none;
}
.compose-copy-options > summary::-webkit-details-marker {
  display: none;
}
.compose-copy-options > summary:hover {
  color: #202124;
}
.compose-copy-options .split {
  margin: 0;
  padding: 0.35rem 0 0.7rem 5.3rem;
}
.compose-copy-options .split label {
  gap: 0.3rem;
  color: #5f6368;
  font-size: 0.75rem;
  font-weight: 500;
}
.compose-copy-options .split input {
  padding: 0.6rem 0;
  border: 0;
  border-bottom: 1px solid #e7eaf0;
  border-radius: 0;
  box-shadow: none;
}
.compose-message-field {
  min-height: 250px;
  flex: 1 1 250px;
  display: flex;
  padding: 0;
}
.compose-message-field textarea {
  min-height: 250px;
  flex: 1;
  padding: 1rem 0.15rem;
  border: 0;
  border-radius: 0;
  color: #202124;
  line-height: 1.55;
  resize: none;
  box-shadow: none;
}
.compose-message-field textarea:focus {
  border: 0;
  box-shadow: none;
}
.compose-modal .compose-quote {
  margin: 0 0 0.7rem;
  border: 1px solid #e7eaf0;
  border-radius: 8px;
  overflow: hidden;
}
.compose-attachments {
  min-height: 54px;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 0.15rem;
  border: 0;
  border-top: 1px solid #e7eaf0;
  border-radius: 0;
}
.compose-attachments .file-picker-row {
  margin: 0;
  gap: 0.65rem;
}
.compose-attachments .file-picker-button {
  min-height: 34px;
  padding: 0.35rem 0.65rem;
  border: 0;
  border-radius: 18px;
  color: #3c4043;
  background: #f1f3f4;
  font-size: 0.78rem;
}
.compose-attachments .file-picker-button::before {
  width: 16px;
  height: 16px;
  content: "";
  margin-right: 0.35rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16.5 6.5v10a4.5 4.5 0 0 1-9 0v-11a3 3 0 0 1 6 0v10.5a1.5 1.5 0 0 1-3 0V7h1.5v9a.001.001 0 0 0 .002.002L12 5.5a1.5 1.5 0 0 0-3 0v11a3 3 0 0 0 6 0v-10h1.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16.5 6.5v10a4.5 4.5 0 0 1-9 0v-11a3 3 0 0 1 6 0v10.5a1.5 1.5 0 0 1-3 0V7h1.5v9a.001.001 0 0 0 .002.002L12 5.5a1.5 1.5 0 0 0-3 0v11a3 3 0 0 0 6 0v-10h1.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.compose-attachments .file-picker-button:hover {
  background: #e8eaed;
}
.compose-attachments .file-picker-status {
  font-size: 0.76rem;
}
.compose-attachments > .muted {
  margin: 0;
  color: #80868b;
  font-size: 0.7rem;
  white-space: nowrap;
}
.compose-modal .compose-footer {
  min-height: 62px;
  justify-content: flex-start;
  padding: 0.7rem 1rem;
  border-top: 1px solid #e7eaf0;
  background: #fff;
}
.compose-footer .button.primary {
  order: -1;
  min-width: 94px;
  border-radius: 20px;
  padding: 0.65rem 1.15rem;
  background: #202124;
  box-shadow: 0 2px 6px rgba(32, 33, 36, 0.22);
}
.compose-footer .button.primary:hover {
  background: #000;
}
.compose-footer .button.ghost {
  border: 0;
  color: #5f6368;
  background: transparent;
}
.compose-footer .button.ghost:hover {
  background: #f1f3f4;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.8rem;
}
details summary {
  cursor: pointer;
  color: #69727e;
  font-size: 0.82rem;
}
.file-label {
  border: 1px dashed #cfd5dc;
  border-radius: 11px;
  padding: 0.8rem;
}
.file-picker-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  margin: 0.55rem 0 0.65rem;
}
.file-picker-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 36px;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #273142;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.file-picker-button:hover {
  background: #f6f8fb;
}
.file-label:focus-within .file-picker-button {
  outline: 2px solid #9aa0a6;
  outline-offset: 2px;
}
.file-picker-status {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.toast {
  position: fixed;
  z-index: 100;
  right: 1.5rem;
  top: 1.5rem;
  max-width: 360px;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: #1f2937;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: 0.2s;
}
.toast[popover] {
  bottom: auto;
  left: auto;
  margin: 0;
  border: 0;
}
.toast.show {
  opacity: 1;
  transform: none;
}
.toast.error {
  background: #b42318;
}
@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 78px 1fr;
  }
  .sidebar {
    padding: 1rem 0.65rem;
  }
  .sidebar .brand span:last-child,
  .compose:not(:focus),
  .nav button span,
  .admin-nav small,
  .account-copy,
  .account-menu-chevron {
    font-size: 0;
  }
  .sidebar .brand {
    justify-content: center;
    padding: 0.2rem 0 1.2rem;
  }
  .compose {
    font-size: 0;
  }
  .compose::after {
    content: "＋";
    font-size: 1.2rem;
  }
  .nav button {
    justify-content: center;
  }
  .nav button::before {
    font-size: 1.05rem;
  }
  .nav button[data-view="inbox"]::before {
    content: "✉";
  }
  .nav button[data-view="starred"]::before {
    content: "★";
  }
  .nav button[data-view="sent"]::before {
    content: "➤";
  }
  .nav button[data-view="trash"]::before {
    content: "⌫";
  }
  .nav button[data-view="junk"]::before {
    content: "♢";
  }
  .nav button[data-view="blocked"]::before {
    content: "⊘";
  }
  .nav button[data-view="domains"]::before {
    content: "◇";
  }
  .nav button[data-view="aliases"]::before {
    content: "♙";
  }
  .nav button[data-view="audit"]::before {
    content: "≣";
  }
  .account-copy,
  .account-menu-chevron {
    display: none;
  }
  .account-card {
    padding-left: 0;
    padding-right: 0;
  }
  .account-menu-trigger {
    display: flex;
    justify-content: center;
    padding: 0.25rem 0;
  }
  .account-menu {
    left: calc(100% + 0.5rem);
    right: auto;
    bottom: 0;
    width: 210px;
  }
  .mail-layout {
    grid-template-columns: 1fr;
  }
  .message-detail {
    position: fixed;
    inset: 0 0 0 78px;
    z-index: 20;
    overflow: auto;
  }
  .detail-hidden {
    display: none;
  }
  .search {
    min-width: 180px;
  }
  .topbar,
  .content {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
@media (max-width: 600px) {
  .compose-modal {
    width: 100vw;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  .compose-field {
    gap: 0.45rem;
  }
  .compose-field > span {
    flex-basis: 58px;
  }
  .compose-recipient-block > .compose-field {
    padding-right: 6.5rem;
  }
  .compose-copy-options .split {
    grid-template-columns: 1fr;
    padding-left: 0;
  }
  .compose-attachments {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .compose-attachments > .muted {
    white-space: normal;
  }
  .topbar {
    align-items: center;
    gap: 0.65rem;
    flex-direction: row;
  }
  .topbar-actions {
    gap: 0.4rem;
  }
  .search {
    min-width: 0;
    flex: 1;
  }
  .content {
    padding: 0.75rem;
  }
  .captcha-row {
    grid-template-columns: 1fr;
  }
  .login-screen {
    display: block;
    min-height: 100svh;
    padding: 0;
    background: #fff;
  }
  .login-layout {
    min-height: 100svh;
    grid-template-columns: 1fr;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .login-intro {
    min-height: 185px;
    padding: 1.4rem 1.5rem;
  }
  .login-intro::before {
    width: 170px;
    height: 170px;
    right: -52px;
    bottom: -68px;
  }
  .login-intro .brand-logo {
    width: 40px;
    height: 40px;
  }
  .brand-login {
    font-size: 1rem;
  }
  .login-intro-copy {
    margin: auto 0 0;
  }
  .login-intro-copy h1 {
    margin: 1rem 0 0;
    font-size: 1.72rem;
    line-height: 1.18;
  }
  .login-intro-copy h1 br,
  .login-intro-copy p,
  .login-spectrum,
  .login-intro-foot,
  .login-kicker,
  .login-orbit {
    display: none;
  }
  .login-card {
    min-height: calc(100svh - 185px);
    padding: 2.35rem 1.5rem 1.7rem;
    justify-content: flex-start;
  }
  .login-form-header {
    margin-bottom: 1.8rem;
  }
  .login-form-mark {
    margin-bottom: 1.2rem;
  }
  .login-form-header h2 {
    font-size: 1.75rem;
  }
  .login-card .captcha-row {
    grid-template-columns: 1fr 128px;
  }
  .login-security-note {
    margin-top: 1.35rem;
  }
  .message-detail {
    left: 78px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .domain-row {
    grid-template-columns: 1fr auto;
    gap: 0.55rem 0.75rem;
    padding: 0.75rem;
  }
  .domain-fact {
    grid-column: 1/-1;
  }
  .domain-actions {
    grid-column: 1/-1;
    justify-content: flex-start;
  }
}
