@font-face { font-family: system-fallback; src: local("PingFang SC"); font-display: swap; }
:root { --paper: #f8f8f4; --white: #fff; --ink: #292f28; --muted: #8c9288; --line: #e9ece4; --green: #42553b; --light-green: #e8eee1; --sidebar: #f0f2eb; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-fallback, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
input:focus-visible, textarea:focus-visible { outline: 0; }
[hidden] { display: none !important; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { background: var(--sidebar); border-right: 1px solid #e3e7dc; padding: 37px 22px 20px; display: flex; flex-direction: column; min-height: 100vh; }
.brand { display: flex; gap: 12px; align-items: center; margin: 0 5px 55px; font-size: 18px; font-weight: 650; letter-spacing: 1px; }
.brand-mark { background: var(--green); color: #fff; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; box-shadow: 0 3px 6px #3d503519; }
.brand-mark .icon { width: 23px; height: 23px; }
.brand small { display: block; font-size: 8px; font-weight: 500; letter-spacing: 1.6px; color: #858d7c; margin-top: 3px; }
.space-label { display: flex; align-items: center; justify-content: space-between; padding: 0 13px; font-size: 10px; letter-spacing: 1.5px; color: #8b9283; margin-bottom: 12px; }
.space-label span { font: 10px ui-monospace, monospace; color: #a4aa9c; }
.workspace-nav { display: grid; gap: 7px; }
.nav-item { color: #718260; display: flex; align-items: center; gap: 13px; border-radius: 9px; padding: 12px 14px; font-weight: 600; font-size: 13px; }
.nav-item:hover { background: #e8ede1; }
.nav-item[aria-current="page"] { background: #e1e8d8; color: #3e5336; }
.nav-item .icon { width: 18px; height: 18px; }
.nav-dot { width: 5px; height: 5px; border-radius: 50%; background: #728366; margin-left: auto; }
.sender-note { margin: auto 13px; padding: 54px 0 56px; color: #707b66; }
.note-mark { font: italic 56px Georgia, serif; letter-spacing: -5px; color: #aebaa2; }
.sender-note p { font-size: 19px; line-height: 1.8; font-weight: 450; letter-spacing: 2px; margin: 12px 0 13px; }
.sender-note > span { font-size: 10px; color: #929b87; letter-spacing: 1px; }
.note-line { width: 28px; height: 1px; background: #b9c1af; margin-top: 26px; }
.sidebar-bottom { margin-top: auto; }
.privacy { display: flex; gap: 7px; align-items: center; font-size: 10px; color: #7f8974; padding: 0 12px 17px; }
.privacy .icon { width: 13px; height: 13px; }
.account { display: flex; align-items: center; padding: 17px 4px 0; border-top: 1px solid #dfe4d7; gap: 10px; }
.avatar { width: 34px; height: 34px; background: #dce3d1; color: #58694b; display: grid; place-items: center; border-radius: 50%; font: italic 24px Georgia, serif; }
.account-details { min-width: 0; }
.account-details strong { display: block; font-size: 12px; font-weight: 600; }
.account-details span { display: block; font-size: 10px; color: #87907b; overflow: hidden; text-overflow: ellipsis; }
#logout { margin-left: auto; color: #929b86; padding: 5px; display: flex; }
#logout .icon { width: 16px; height: 16px; }
main { min-width: 0; }
.topbar { height: 82px; border-bottom: 1px solid var(--line); padding: 0 46px; display: flex; align-items: center; justify-content: space-between; }
.breadcrumb { display: flex; gap: 13px; align-items: center; font-size: 11px; color: #959c8d; }
.breadcrumb span { color: #c1c6bb; }
.breadcrumb strong { color: #5d6755; font-weight: 500; }
.domain-badge { border: 1px solid #e1e6d9; background: #f2f5ed; display: flex; align-items: center; gap: 7px; border-radius: 20px; font-size: 11px; padding: 5px 12px; color: #718260; font-weight: 500; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: #869b6a; }
.workspace { max-width: 1080px; padding: 43px 46px 22px; margin: 0 auto; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 29px; }
.eyebrow { font-size: 9px; letter-spacing: 2.2px; color: #8b957e; font-weight: 500; margin-bottom: 10px; }
h1 { font-size: 29px; line-height: 1.4; letter-spacing: -0.6px; font-weight: 600; margin: 0 0 9px; }
h1 span { display: inline-block; color: #a5b08f; font-size: 27px; font-weight: 400; margin-left: 15px; }
#page-title { color: inherit; font: inherit; margin-left: 0; }
.page-heading p { margin: 0; color: #969d8e; font-size: 12px; }
.page-index { font: 9px ui-monospace, monospace; color: #acb2a4; letter-spacing: 1.3px; padding-bottom: 5px; }
.compose-card { background: var(--white); border: 1px solid #e2e6db; border-radius: 13px; overflow: hidden; box-shadow: 0 4px 24px #2e432006; }
.compose-heading { display: flex; align-items: center; justify-content: space-between; padding: 17px 26px; background: #fcfdfa; border-bottom: 1px solid var(--line); }
.compose-heading > div { display: flex; align-items: center; gap: 9px; }
.compose-heading strong { font-size: 12px; font-weight: 500; color: #727b68; }
.paper-dot { width: 6px; height: 6px; background: #a5b38e; border-radius: 50%; }
.private-tag { display: flex; align-items: center; gap: 5px; font-size: 10px; color: #a0a795; }
.private-tag .icon { width: 12px; height: 12px; }
.address-fields { padding: 0 26px; }
.field-row { min-height: 58px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid #eef0e9; }
.field-row:focus-within { border-bottom-color: #a0b18c; }
.field-label { flex-shrink: 0; width: 52px; font-size: 12px; color: #979e8e; }
.field-row input { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; color: #424c39; font-size: 13px; padding: 17px 0; }
input::placeholder, textarea::placeholder { color: #b6bcaf; }
.sender-chip { display: flex; align-items: center; gap: 8px; font-size: 11px; background: #f3f5ef; color: #5f6b54; border: 1px solid #e8ecdf; padding: 4px 10px 4px 5px; border-radius: 6px; max-width: 100%; }
.sender-chip .icon { color: #8b9a78; width: 12px; height: 12px; margin-left: 6px; }
.mini-avatar { width: 20px; height: 20px; background: #e4eadb; display: grid; place-items: center; border-radius: 4px; font: italic 15px Georgia, serif; }
.text-button { border: 0; background: transparent; color: #8a957b; padding: 5px 4px; font-size: 11px; }
.text-button:hover { color: var(--green); }
.recipients-toggle { white-space: nowrap; font-size: 10px; }
.subject-row { border-bottom: 0; }
.subject-row input { font-weight: 500; }
.editor-toolbar { border-top: 1px solid var(--line); border-bottom: 1px solid #f0f2eb; padding: 10px 25px; display: flex; justify-content: space-between; align-items: center; background: #fcfdfa; }
.format-control { display: inline-flex; background: #f0f3eb; padding: 3px; border-radius: 6px; gap: 2px; }
.format-button { border: 0; background: transparent; color: #9ba38f; padding: 4px 11px; font-size: 10px; border-radius: 4px; }
.format-button.active { color: #4c6240; background: #fff; box-shadow: 0 1px 3px #20381012; }
.code-icon { font-size: 10px; padding-right: 3px; }
#format-hint { color: #a9b09e; font-size: 10px; }
textarea { display: block; width: 100%; min-height: 290px; border: 0; resize: vertical; padding: 26px; color: #4c5544; font-size: 13px; line-height: 2; background: #fff; }
textarea.html-mode { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.8; }
textarea:focus { box-shadow: inset 3px 0 #c3d0b3; }
.compose-footer { display: flex; justify-content: space-between; align-items: center; padding: 17px 24px; border-top: 1px solid var(--line); }
.footer-actions { display: flex; align-items: center; gap: 18px; }
.send-button { display: inline-flex; align-items: center; gap: 9px; color: #fff; background: var(--green); border: 1px solid #3a4c33; padding: 10px 21px; border-radius: 7px; font-size: 12px; font-weight: 500; box-shadow: 0 2px 4px #42553b17; transition: background 150ms; }
.send-button:hover:enabled { background: #33462c; }
.send-button:disabled { cursor: default; opacity: 0.5; }
.send-button .icon { width: 15px; height: 15px; }
.clear-button { color: #a0a794; }
.character-count { color: #929d86; font: 10px ui-monospace, monospace; }
.character-count > span:last-child { color: #c0c7b8; }
.below-compose { display: flex; justify-content: space-between; gap: 16px; align-items: center; color: #a5ad9a; font-size: 10px; padding: 16px 3px; }
.below-compose > span:first-child { display: flex; gap: 7px; align-items: center; }
.below-compose .icon { width: 13px; height: 13px; }
.workspace-footer { display: flex; justify-content: space-between; gap: 12px; color: #b4bcaa; margin-top: 35px; border-top: 1px solid var(--line); padding-top: 16px; font-size: 9px; letter-spacing: 1px; }
.workspace-footer > span:last-child { font-size: 8px; letter-spacing: 1.7px; }
.notice { margin-bottom: 17px; padding: 13px 17px; border: 1px solid #e1e8d7; color: #587049; background: #f0f5e9; border-radius: 8px; font-size: 12px; overflow-wrap: anywhere; }
.notice.error { background: #fff4ee; color: #9f5239; border-color: #f0dccf; }
.notice a { text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.outbox-list { list-style: none; margin: 0; padding: 0; }
.outbox-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: #fff; padding: 19px 26px; color: var(--ink); }
.outbox-row:hover { background: #f7f9f3; }
.outbox-row-main { min-width: 0; }
.outbox-subject { display: block; font-size: 13px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.outbox-to { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.outbox-row-meta { display: grid; justify-items: end; gap: 6px; font-size: 10px; color: var(--muted); }
.mail-status { font-size: 10px; background: var(--light-green); color: var(--green); padding: 2px 9px; border-radius: 12px; }
.mail-status.failed { background: #fff0e8; color: #9f5239; }
.outbox-empty { text-align: center; color: var(--muted); padding: 46px 20px; margin: 0; font-size: 12px; }
.outbox-footer { display: flex; justify-content: space-between; align-items: center; padding: 14px 26px; color: var(--muted); font-size: 11px; }
.mail-detail-content { padding: 26px; }
.mail-detail-content h2 { margin: 0 0 22px; font-size: 21px; overflow-wrap: anywhere; }
.detail-addresses { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 9px 16px; font-size: 12px; margin: 0 0 25px; }
.detail-addresses dt { color: var(--muted); }
.detail-addresses dd { margin: 0; overflow-wrap: anywhere; }
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.9; margin: 20px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.mail-body.html-source { font: 12px/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; }
@media (min-width: 1500px) { .workspace { padding-top: 58px; } textarea { min-height: 350px; } }
@media (max-width: 1050px) { .app-shell { grid-template-columns: 210px minmax(0,1fr); } .sidebar { padding-left: 15px; padding-right: 15px; } .topbar { padding: 0 30px; } .workspace { padding-left: 30px; padding-right: 30px; } }
@media (max-width: 760px) {
  .app-shell { display: block; } .sidebar { min-height: auto; padding: 17px 20px; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
  .brand { margin: 0; gap: 9px; font-size: 15px; } .brand-mark { width: 34px; height: 34px; border-radius: 10px; } .brand small { font-size: 7px; letter-spacing: 1px; }
  .space-label, .sender-note, .privacy, .avatar, .account-details strong { display: none; } .sidebar-bottom { margin: 0; } .account { padding: 0; border: 0; gap: 8px; } .account-details span { max-width: 135px; font-size: 11px; }
  .workspace-nav { order: 3; width: 100%; grid-template-columns: 1fr 1fr; } .nav-item { padding: 9px 12px; font-size: 12px; }
  .outbox-row { padding: 17px 18px; gap: 10px; } .outbox-row-meta { font-size: 9px; } .mail-detail-content { padding: 20px 18px; } .detail-addresses { gap: 8px; }
  .topbar { height: 57px; padding: 0 22px; } .workspace { padding: 28px 20px 20px; } .page-heading { margin-bottom: 22px; } h1 { font-size: 25px; } .page-index { display: none; }
  .compose-heading { padding: 15px 18px; } .address-fields { padding: 0 18px; } .field-row { gap: 8px; } .field-label { width: 46px; font-size: 11px; } .sender-chip { font-size: 10px; gap: 6px; padding-right: 7px; } .sender-chip .icon { margin-left: 0; } .mini-avatar { display: none; }
  .field-row input { font-size: 12px; } .recipients-toggle { font-size: 9px; } .editor-toolbar { padding: 10px 17px; } #format-hint { display: none; } textarea { padding: 21px 18px; min-height: 280px; }
  .compose-footer { padding: 16px 17px; } .footer-actions { gap: 12px; } .send-button { padding: 10px 16px; } .character-count { font-size: 9px; } .below-compose { font-size: 9px; gap: 8px; flex-wrap: wrap; } .workspace-footer { margin-top: 22px; letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; }
.login-panel { width: min(100%, 460px); background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 40px; box-shadow: 0 16px 60px #292f2808; }
.login-brand { margin: 0 0 42px; }
.login-brand .brand-mark { font: 600 18px Georgia, serif; }
.login-panel h1 { margin: 8px 0; font-size: 29px; }
.login-description { color: var(--muted); margin: 0 0 26px; }
.login-form { display: grid; gap: 10px; }
.login-form label { font-size: 12px; font-weight: 600; margin-top: 6px; }
.login-form input, .login-form select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; }
.login-form input:focus-visible, .login-form select:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.login-form .send-button { justify-content: center; min-height: 46px; margin-top: 8px; }
.login-hint { font-size: 11px; color: var(--muted); margin: 0; }
.login-divider { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 11px; margin: 24px 0; }
.login-divider::before, .login-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.access-login { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.access-login:hover { background: var(--light-green); }
.login-footer { margin-top: 32px; color: var(--muted); font-size: 9px; letter-spacing: 2px; text-align: center; }
@media (max-width: 480px) { .login-panel { padding: 28px 24px; } }
