* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: #f2f5f9; color: #1c2733; }
header { background: linear-gradient(135deg, #0f62fe, #0043ce); color: #fff; padding: 28px 20px 22px; text-align: center; }
.logo { font-size: 30px; font-weight: 800; letter-spacing: .3px; }
.logo span { color: #a6c8ff; }
.tagline { margin-top: 6px; opacity: .92; font-size: 14px; }
main { max-width: 1020px; margin: 22px auto 40px; padding: 0 14px; }
.address-bar { background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 2px 10px rgba(16, 42, 86, .08); }
.addr-input { display: flex; align-items: stretch; border: 2px solid #0f62fe; border-radius: 10px; overflow: hidden; }
.addr-input input { flex: 1; border: 0; padding: 13px 14px; font-size: 17px; outline: none; min-width: 0; }
.addr-input .at { display: flex; align-items: center; color: #5b6b7f; font-weight: 700; padding: 0 2px 0 6px; font-size: 16px; }
.addr-input select { border: 0; background: #e8f0fe; color: #0043ce; font-weight: 700; padding: 0 10px; font-size: 16px; outline: none; cursor: pointer; max-width: 46%; }
.addr-buttons { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
button { border: 1px solid #c6d4e8; background: #fff; color: #1c2733; border-radius: 8px; padding: 10px 16px; font-size: 14px; cursor: pointer; }
button:hover { background: #eef4ff; }
button.primary { background: #0f62fe; border-color: #0f62fe; color: #fff; font-weight: 700; }
button.primary:hover { background: #0043ce; }
button.danger { color: #b42318; border-color: #f0b8b2; }
button.danger:hover { background: #fdf0ef; }
.hint { color: #5b6b7f; font-size: 13px; margin: 12px 2px 0; line-height: 1.5; }
.hidden { display: none !important; }
#inboxSection { margin-top: 20px; background: #fff; border-radius: 14px; box-shadow: 0 2px 10px rgba(16, 42, 86, .08); overflow: hidden; }
.inbox-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #e4ebf5; flex-wrap: wrap; }
.inbox-head h2 { font-size: 16px; margin: 0; word-break: break-all; }
.status { color: #5b6b7f; font-size: 12px; margin-right: 8px; }
.inbox-body { display: grid; grid-template-columns: 340px 1fr; min-height: 380px; }
.message-list { border-right: 1px solid #e4ebf5; overflow-y: auto; max-height: 560px; }
.msg-item { padding: 12px 14px; border-bottom: 1px solid #eef2f8; cursor: pointer; }
.msg-item:hover { background: #f5f9ff; }
.msg-item.active { background: #e8f0fe; }
.msg-item .from { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-item.unread .from::after { content: " •"; color: #0f62fe; }
.msg-item .subject { font-size: 13px; color: #33475e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-item.unread .subject { font-weight: 700; color: #1c2733; }
.msg-item .meta { font-size: 12px; color: #8496ad; margin-top: 3px; }
.msg-item .snippet { font-size: 12px; color: #8496ad; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.message-view { padding: 18px; overflow-y: auto; max-height: 560px; }
.message-view h3 { margin: 0 0 6px; font-size: 18px; }
.message-view .mv-meta { color: #5b6b7f; font-size: 13px; line-height: 1.6; border-bottom: 1px solid #eef2f8; padding-bottom: 10px; margin-bottom: 12px; }
.message-view iframe { width: 100%; border: 0; min-height: 300px; background: #fff; }
.message-view pre { white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 14px; line-height: 1.6; }
.att { display: inline-block; margin: 4px 6px 4px 0; padding: 7px 11px; background: #eef4ff; border-radius: 7px; font-size: 13px; text-decoration: none; color: #0043ce; }
.empty { color: #8496ad; text-align: center; padding: 34px 10px; font-size: 14px; line-height: 1.6; }
footer { max-width: 1020px; margin: 0 auto 30px; padding: 0 14px; color: #8496ad; font-size: 12px; line-height: 1.6; text-align: center; }
@media (max-width: 760px) {
  .inbox-body { grid-template-columns: 1fr; }
  .message-list { border-right: 0; border-bottom: 1px solid #e4ebf5; max-height: 300px; }
  .logo { font-size: 24px; }
}
