:root {
  background: #eef1f5;
  color: #172033;
  color-scheme: light;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

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

button {
  align-items: center;
  background: #2454b6;
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
}

button:disabled {
  cursor: wait;
  opacity: .6;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid #c6ced9;
  border-radius: 6px;
  color: #172033;
  min-height: 40px;
  padding: 9px 11px;
  width: 100%;
}

label {
  color: #334155;
  display: grid;
  font-weight: 700;
  gap: 7px;
}

h1,
h2 {
  letter-spacing: 0;
  margin: 0;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 18px;
}

a {
  color: #2454b6;
}

.topbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #d9dee7;
  display: flex;
  justify-content: space-between;
  padding: 18px 28px;
}

.brand-line,
.muted {
  color: #667085;
}

.brand-line {
  font-size: 13px;
  font-weight: 700;
}

.shell {
  display: grid;
  gap: 18px;
  grid-template-columns: 360px minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1280px;
  padding: 22px;
}

.panel {
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(17, 24, 39, .07);
  min-width: 0;
  padding: 20px;
}

.left-stack,
.form,
.mail-layout,
.mail-list,
.mail {
  display: grid;
}

.left-stack {
  align-content: start;
  gap: 14px;
}

.form,
.mail-layout,
.mail {
  gap: 12px;
}

.section-title,
.mail-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.section-title {
  margin-bottom: 16px;
}

.message {
  margin-top: 12px;
  min-height: 22px;
}

.success {
  color: #067647;
}

.error {
  color: #b42318;
}

.mail-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.pill {
  background: #eef3fb;
  border-radius: 999px;
  color: #335078;
  display: inline-flex;
  font-size: 13px;
  padding: 5px 10px;
}

.mail-list {
  gap: 14px;
  max-height: calc(100vh - 190px);
  overflow: auto;
  padding-right: 4px;
}

.from,
.time,
.preview,
.meta {
  color: #526071;
  font-size: 13px;
  word-break: break-word;
}

.mail {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  gap: 8px;
  padding: 14px;
}

.subject {
  font-weight: 800;
  line-height: 1.45;
  word-break: break-word;
}

.folder {
  background: #eef6f1;
  border-radius: 999px;
  color: #14532d;
  flex: 0 0 auto;
  font-size: 12px;
  padding: 3px 8px;
}

.preview {
  line-height: 1.6;
  white-space: pre-wrap;
}

.mail-code {
  align-items: center;
  background: #effaf4;
  border: 1px solid #b7dbc8;
  border-radius: 6px;
  color: #14532d;
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
}

.mail-code span {
  font-size: 13px;
  font-weight: 700;
}

.mail-code strong {
  font-size: 24px;
  letter-spacing: 2px;
}

.empty,
.warn {
  background: #f8fafc;
  border: 1px solid #e5e8ef;
  border-radius: 8px;
  color: #667085;
  padding: 16px;
  text-align: center;
}

.warn {
  color: #b45309;
  text-align: left;
}

.code {
  background: #effaf4;
  border: 1px solid #b7dbc8;
  border-radius: 8px;
  color: #14532d;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-top: 12px;
  padding: 14px;
  text-align: center;
}

.linkbox {
  background: #f7fbff;
  border: 1px solid #d7e3f4;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 12px;
  padding: 12px;
  word-break: break-all;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .topbar {
    align-items: flex-start;
    display: grid;
    gap: 8px;
    padding: 16px;
  }

  .mail-list {
    max-height: none;
  }
}
