/* ============================================================
   企业邮箱 · 样式表
   ============================================================ */

:root {
  --pri:      #2f6fd0;
  --pri-d:    #2459ad;
  --pri-l:    #edf3fd;
  --pri-l2:   #e2ecfb;
  --bg:       #f4f6f9;
  --panel:    #ffffff;
  --bd:       #e6e9ef;
  --bd-2:     #f0f2f6;
  --tx:       #1e2633;
  --tx-2:     #586374;
  --tx-3:     #8d97a8;
  --danger:   #d9484b;
  --ok:       #16a06a;
  --shadow:   0 4px 20px rgba(24, 43, 74, .10);
  --shadow-lg:0 18px 50px rgba(20, 36, 64, .22);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--tx);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, li { margin: 0; padding: 0; }
ul { list-style: none; }
button, input, textarea { font-family: inherit; font-size: inherit; outline: none; }

.ico {
  width: 18px; height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.ico.tiny { width: 14px; height: 14px; }

.avatar {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
  flex: none;
  user-select: none;
}
.avatar.lg { width: 44px; height: 44px; border-radius: 12px; font-size: 14px; }

/* ============================================================
   登录页
   ============================================================ */

.login-body {
  background: linear-gradient(135deg, #eef3fa 0%, #e3ecf9 45%, #dfe9f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-wrap { width: 100%; max-width: 940px; }

.login-card {
  display: flex;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(21, 42, 78, .18);
  min-height: 560px;
}

.login-brand {
  width: 400px;
  flex: none;
  padding: 44px 40px;
  color: #fff;
  background: linear-gradient(160deg, #1f4f9e 0%, #2f6fd0 55%, #3f86e8 100%);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.login-brand::after {
  content: "";
  position: absolute;
  right: -90px; bottom: -110px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.login-brand::before {
  content: "";
  position: absolute;
  right: 40px; top: -70px;
  width: 170px; height: 170px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
}

.brand-logo {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700;
  margin-bottom: 26px;
}
.login-brand h1 { font-size: 23px; font-weight: 600; letter-spacing: .5px; }
.brand-sub { margin-top: 10px; font-size: 13px; color: rgba(255, 255, 255, .78); }

.brand-points { margin-top: 34px; position: relative; z-index: 1; }
.brand-points li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 15px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .9);
}
.brand-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .75);
}

.brand-foot {
  margin-top: auto;
  font-size: 12px;
  color: rgba(255, 255, 255, .55);
  letter-spacing: 1px;
  position: relative; z-index: 1;
}

.login-form {
  flex: 1;
  padding: 46px 46px 36px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.login-form h2 { font-size: 21px; font-weight: 600; }
.login-form .sub { margin-top: 7px; font-size: 13px; color: var(--tx-3); }

.login-form form { margin-top: 26px; }
.login-form label {
  display: block;
  font-size: 12.5px;
  color: var(--tx-2);
  margin-bottom: 7px;
  margin-top: 16px;
}
.login-form input[type=text],
.login-form input[type=password] {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--bd);
  border-radius: 9px;
  background: #fbfcfe;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.login-form input:focus {
  border-color: var(--pri);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 111, 208, .13);
}

.btn-primary {
  height: 44px;
  padding: 0 26px;
  border: none;
  border-radius: 9px;
  background: var(--pri);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background .16s, transform .08s;
}
.btn-primary:hover { background: var(--pri-d); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { background: #a9bcd8; cursor: not-allowed; }
.btn-block { width: 100%; margin-top: 26px; }

.alert {
  margin-top: 18px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fdecec;
  border: 1px solid #f6cfcf;
  color: #b53434;
  font-size: 13px;
}

.demo-accounts { margin-top: auto; padding-top: 26px; }
.demo-title {
  font-size: 12px;
  color: var(--tx-3);
  margin-bottom: 10px;
  letter-spacing: .5px;
}
.demo-list { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--bd);
  border-radius: 10px;
  background: #fbfcfe;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
  text-align: left;
}
.demo-item:hover {
  border-color: var(--pri);
  background: var(--pri-l);
  box-shadow: 0 2px 10px rgba(47, 111, 208, .12);
}
.demo-item .avatar { width: 28px; height: 28px; border-radius: 8px; font-size: 11px; }
.demo-meta { display: flex; flex-direction: column; line-height: 1.35; }
.demo-meta b { font-size: 12.5px; font-weight: 600; }
.demo-meta i { font-size: 11px; color: var(--tx-3); font-style: normal; }
.demo-tip { margin-top: 12px; font-size: 12px; color: var(--tx-3); }
.demo-tip b { color: var(--pri); }

/* ============================================================
   主应用框架
   ============================================================ */

.app-body { overflow: hidden; }

.app { display: flex; flex-direction: column; height: 100vh; }

.topbar {
  height: 58px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 16px 0 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--bd);
  position: relative;
  z-index: 30;
}

.tb-left { display: flex; align-items: center; gap: 10px; flex: none; }
.tb-logo {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(140deg, #2f6fd0, #3f86e8);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
}
.tb-title { font-size: 15px; font-weight: 600; color: var(--tx); white-space: nowrap; }

.tb-search {
  flex: 1;
  max-width: 520px;
  position: relative;
  display: flex;
  align-items: center;
}
.tb-search .ico {
  position: absolute;
  left: 12px;
  color: var(--tx-3);
  width: 16px; height: 16px;
}
.tb-search input {
  width: 100%;
  height: 38px;
  padding: 0 38px 0 36px;
  border: 1px solid var(--bd);
  border-radius: 19px;
  background: #f5f7fa;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.tb-search input:focus {
  border-color: var(--pri);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 111, 208, .12);
}
.search-clear {
  position: absolute;
  right: 8px;
  width: 24px; height: 24px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--tx-3);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: none;
}
.search-clear:hover { background: #e9edf4; color: var(--tx); }
.tb-search.has-value .search-clear { display: block; }

.tb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }

.tb-icon-btn {
  width: 36px; height: 36px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--tx-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.tb-icon-btn:hover { background: #f1f4f9; color: var(--pri); }
.tb-icon-btn.spin .ico { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.tb-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 9px 4px 4px;
  border-radius: 20px;
  cursor: pointer;
  position: relative;
  transition: background .15s;
}
.tb-user:hover { background: #f1f4f9; }
.tb-user-name { font-size: 13.5px; font-weight: 500; }
.tb-user .avatar { width: 30px; height: 30px; border-radius: 8px; font-size: 11px; }
.tb-user .ico.tiny { color: var(--tx-3); }

.user-drop {
  position: absolute;
  right: 0; top: 46px;
  width: 248px;
  background: #fff;
  border: 1px solid var(--bd);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .16s, transform .16s, visibility .16s;
  z-index: 60;
}
.tb-user.open .user-drop { opacity: 1; visibility: visible; transform: translateY(0); }
.ud-head {
  display: flex;
  gap: 11px;
  padding: 10px;
  border-bottom: 1px solid var(--bd-2);
  margin-bottom: 6px;
}
.ud-head b { display: block; font-size: 14px; }
.ud-head i { display: block; font-style: normal; font-size: 12px; color: var(--tx-3); margin-top: 3px; }
.ud-head em { display: block; font-style: normal; font-size: 11.5px; color: var(--pri); margin-top: 4px; }
.ud-head > div { min-width: 0; overflow: hidden; }
.ud-head i, .ud-head em { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ud-item {
  display: block;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--tx-2);
}
.ud-item:hover { background: #fdf0f0; color: var(--danger); }

.main { flex: 1; display: flex; min-height: 0; }

/* ============================================================
   左侧文件夹
   ============================================================ */

.sidebar {
  width: 226px;
  flex: none;
  background: #fbfcfe;
  border-right: 1px solid var(--bd);
  padding: 16px 12px 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.btn-compose {
  height: 42px;
  border: none;
  border-radius: 10px;
  background: var(--pri);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(47, 111, 208, .28);
  transition: background .16s, box-shadow .16s, transform .08s;
  margin-bottom: 18px;
}
.btn-compose:hover { background: var(--pri-d); box-shadow: 0 6px 18px rgba(47, 111, 208, .34); }
.btn-compose:active { transform: translateY(1px); }

.folders { display: flex; flex-direction: column; gap: 2px; }

.folder-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 11px;
  border-radius: 9px;
  color: var(--tx-2);
  font-size: 13.5px;
  transition: background .14s, color .14s;
  cursor: pointer;
}
.folder-item:hover { background: #eef2f8; color: var(--tx); }
.folder-item.active { background: var(--pri-l); color: var(--pri); font-weight: 600; }
.folder-item.active .f-ico { stroke-width: 2.2; }
.f-ico { width: 17px; height: 17px; }
.f-name { flex: 1; }
.f-count {
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
  background: var(--pri);
  border-radius: 9px;
  padding: 1px 7px;
  min-width: 18px;
  text-align: center;
  display: none;
}
.f-count.show { display: inline-block; }
.folder-item[data-folder="spam"] .f-count { background: #e08a2c; }
.folder-item.active .f-count { background: var(--pri-d); }

.sidebar-foot { margin-top: auto; padding: 12px 4px 0; }
.usage-top {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--tx-3);
  margin-bottom: 7px;
}
.usage .bar {
  height: 5px;
  border-radius: 3px;
  background: #e6eaf1;
  overflow: hidden;
}
.usage .bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #4f8ae0, #2f6fd0); }
.foot-note { margin-top: 12px; font-size: 11px; color: #aab3c2; text-align: center; letter-spacing: .3px; }

/* ============================================================
   中间列表
   ============================================================ */

.listpane {
  width: 396px;
  flex: none;
  background: var(--panel);
  border-right: 1px solid var(--bd);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.list-head {
  flex: none;
  height: 54px;
  padding: 0 14px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--bd);
}
.lh-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.lh-title h2 { font-size: 15px; font-weight: 600; white-space: nowrap; }
.lh-count { font-size: 12px; color: var(--tx-3); white-space: nowrap; }
.lh-tools { display: flex; gap: 6px; flex: none; }

.mini-btn {
  height: 28px;
  padding: 0 11px;
  border: 1px solid var(--bd);
  border-radius: 7px;
  background: #fff;
  color: var(--tx-2);
  font-size: 12px;
  cursor: pointer;
  transition: all .14s;
  white-space: nowrap;
}
.mini-btn:hover { border-color: var(--pri); color: var(--pri); background: var(--pri-l); }
.mini-btn.danger:hover { border-color: var(--danger); color: var(--danger); background: #fdf0f0; }

.list-body { flex: 1; overflow-y: auto; min-height: 0; }

.day-sep {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 9px 16px 7px;
  background: #fbfcfe;
  border-bottom: 1px solid var(--bd-2);
  font-size: 11.5px;
  color: var(--tx-3);
  letter-spacing: .4px;
}

.mail-item {
  display: flex;
  gap: 11px;
  padding: 13px 14px 13px 18px;
  border-bottom: 1px solid var(--bd-2);
  cursor: pointer;
  position: relative;
  transition: background .14s;
}
.mail-item:hover { background: #f8fafd; }
.mail-item.active { background: var(--pri-l); }
.mail-item.active::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--pri);
}
.mail-item.unread::before {
  content: "";
  position: absolute;
  left: 7px; top: 21px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--pri);
}

.mi-avatar {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  flex: none;
  user-select: none;
}
.mi-main { flex: 1; min-width: 0; }
.mi-line1 { display: flex; align-items: center; gap: 8px; }
.mi-peer {
  font-size: 13.5px;
  color: var(--tx-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.mail-item.unread .mi-peer { color: var(--tx); font-weight: 600; }
.mi-time { font-size: 11.5px; color: var(--tx-3); flex: none; }
.mi-subject {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--tx-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mail-item.unread .mi-subject { color: var(--tx); font-weight: 600; }
.mail-item.active .mi-subject { color: var(--pri); }
.mi-preview {
  margin-top: 4px;
  font-size: 12px;
  color: var(--tx-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mi-tags { display: flex; align-items: center; gap: 6px; flex: none; margin-top: 2px; }
.mi-att { color: var(--tx-3); display: flex; }
.mi-att .ico { width: 14px; height: 14px; }
.mi-star {
  color: #d8dde6;
  cursor: pointer;
  display: flex;
  transition: color .14s, transform .14s;
}
.mi-star:hover { color: #f0a41d; transform: scale(1.12); }
.mi-star.on { color: #f0a41d; }
.mi-star .ico { width: 15px; height: 15px; fill: currentColor; stroke: none; }

.list-foot {
  flex: none;
  padding: 10px 14px;
  border-top: 1px solid var(--bd);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--tx-3);
  min-height: 42px;
}
.page-btn {
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--bd);
  border-radius: 6px;
  background: #fff;
  color: var(--tx-2);
  font-size: 12px;
  cursor: pointer;
}
.page-btn:hover:not(:disabled) { border-color: var(--pri); color: var(--pri); }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }

.loading, .list-empty {
  padding: 50px 20px;
  text-align: center;
  color: var(--tx-3);
  font-size: 13px;
}

/* ============================================================
   右侧阅读窗格
   ============================================================ */

.readpane {
  flex: 1;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}

.read-empty {
  margin: auto;
  text-align: center;
  color: var(--tx-3);
  padding: 40px;
}
.empty-ico {
  width: 62px; height: 62px;
  fill: none;
  stroke: #cfd7e3;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 16px;
}
.empty-title { font-size: 14.5px; color: var(--tx-2); margin-bottom: 6px; }
.empty-sub { font-size: 12.5px; color: var(--tx-3); }

.read-head {
  flex: none;
  padding: 20px 30px 14px;
  border-bottom: 1px solid var(--bd);
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 5;
}
.rh-subject { font-size: 19px; font-weight: 600; line-height: 1.45; padding-right: 10px; }
.rh-meta { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.rh-from { flex: 1; min-width: 0; }
.rh-from b { font-size: 13.5px; font-weight: 600; }
.rh-from i {
  font-style: normal;
  font-size: 12px;
  color: var(--tx-3);
  margin-left: 7px;
}
.rh-time { font-size: 12px; color: var(--tx-3); flex: none; }
.rh-actions { display: flex; gap: 6px; flex: none; }
.ra-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--bd);
  border-radius: 9px;
  background: #fff;
  color: var(--tx-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .14s;
}
.ra-btn:hover { border-color: var(--pri); color: var(--pri); background: var(--pri-l); }
.ra-btn.star.on { color: #f0a41d; border-color: #f4d69a; background: #fef8ec; }
.ra-btn.star.on .ico { fill: currentColor; }

.rh-recipients {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--tx-3);
  line-height: 1.7;
}
.rh-recipients b { color: var(--tx-2); font-weight: 500; }
.chip-inline {
  display: inline-block;
  padding: 1px 8px;
  margin: 0 3px 3px 0;
  border-radius: 11px;
  background: #f1f4f9;
  color: var(--tx-2);
  font-size: 12px;
}

.read-body {
  padding: 24px 30px 40px;
  font-size: 14px;
  line-height: 1.85;
  color: #2b3444;
  word-break: break-word;
}
.read-body p { margin: 0 0 14px; }
.read-body ul, .read-body ol { margin: 0 0 14px; padding-left: 22px; list-style: revert; }
.read-body li { margin-bottom: 6px; }
.read-body h1, .read-body h2, .read-body h3 { margin: 20px 0 12px; font-weight: 600; line-height: 1.4; }
.read-body h1 { font-size: 18px; }
.read-body h2 { font-size: 16.5px; }
.read-body h3 { font-size: 15px; }
.read-body blockquote {
  margin: 0 0 14px;
  padding: 10px 16px;
  border-left: 3px solid var(--pri);
  background: #f7f9fc;
  color: var(--tx-2);
  border-radius: 0 8px 8px 0;
}
.read-body table { border-collapse: collapse; width: 100%; margin: 0 0 16px; font-size: 13px; }
.read-body th, .read-body td { border: 1px solid var(--bd); padding: 8px 12px; text-align: left; }
.read-body th { background: #f5f7fa; font-weight: 600; }
.read-body a { color: var(--pri); text-decoration: underline; }
.read-body .sig { color: var(--tx-2); }
.read-body hr { border: none; border-top: 1px solid var(--bd); margin: 20px 0; }

.att-box {
  margin: 0 30px 26px;
  padding: 14px 16px;
  border: 1px solid var(--bd);
  border-radius: 10px;
  background: #fbfcfe;
}
.att-box-title { font-size: 12.5px; color: var(--tx-3); margin-bottom: 11px; }
.att-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.att-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px 8px 8px;
  background: #fff;
  border: 1px solid var(--bd);
  border-radius: 9px;
  min-width: 178px;
  transition: all .15s;
  cursor: pointer;
}
.att-item:hover { border-color: var(--pri); box-shadow: 0 3px 12px rgba(47, 111, 208, .12); }
.att-ext {
  width: 32px; height: 32px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .3px;
  flex: none;
}
.att-meta { min-width: 0; }
.att-meta b {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
.att-meta i { font-style: normal; font-size: 11px; color: var(--tx-3); }

.thread-box {
  margin: 0 30px 40px;
  border-top: 1px solid var(--bd);
  padding-top: 18px;
}
.thread-title { font-size: 12.5px; color: var(--tx-3); margin-bottom: 12px; }
.thread-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--tx-2);
  cursor: pointer;
  transition: background .14s;
}
.thread-item:hover { background: #f5f8fc; }
.thread-item .t-from { font-weight: 600; color: var(--tx); flex: none; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-item .t-subject { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-item .t-time { flex: none; color: var(--tx-3); font-size: 11.5px; }
.thread-item .t-badge {
  flex: none;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--pri-l);
  color: var(--pri);
}

/* ============================================================
   写信 / 通讯录弹层
   ============================================================ */

.compose-mask, .picker-mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 32, 54, .42);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.compose-mask.show, .picker-mask.show { display: flex; }

.compose {
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: pop .18s ease-out;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

.compose-head {
  flex: none;
  height: 52px;
  padding: 0 18px;
  border-bottom: 1px solid var(--bd);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fbfcfe;
}
.compose-head h3 { font-size: 15px; font-weight: 600; }
.compose-close {
  width: 30px; height: 30px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  color: var(--tx-3);
  cursor: pointer;
}
.compose-close:hover { background: #eef1f6; color: var(--tx); }

.compose-body { flex: 1; overflow-y: auto; padding: 6px 18px 18px; }

.field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--bd-2);
}
.field > label {
  width: 52px;
  flex: none;
  font-size: 13px;
  color: var(--tx-3);
  padding-top: 6px;
}
.field.row input[type=text] { flex: 1; border: none; background: transparent; padding: 6px 0; font-size: 13.5px; }
.field.row { flex-wrap: wrap; }
.field.col { flex-direction: column; gap: 8px; border-bottom: none; padding-top: 14px; }
.field.col > label { padding-top: 0; }
.field.textarea-field { border-bottom: none; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.field .chips:empty { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 8px 0 4px;
  border-radius: 14px;
  background: var(--pri-l2);
  color: var(--pri-d);
  font-size: 12.5px;
}
.chip .avatar { width: 20px; height: 20px; border-radius: 6px; font-size: 9.5px; }
.chip em { font-style: normal; opacity: .65; font-size: 11px; }
.chip button {
  border: none;
  background: transparent;
  color: var(--pri-d);
  opacity: .55;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}
.chip button:hover { opacity: 1; }

.chip-input {
  flex: 1;
  min-width: 140px;
  border: none;
  background: transparent;
  padding: 6px 0;
  font-size: 13.5px;
}
.field .chips + .chip-input { flex: 0 0 160px; }
.link-btn {
  border: none;
  background: transparent;
  color: var(--pri);
  font-size: 12.5px;
  cursor: pointer;
  padding: 6px 0;
  flex: none;
}
.link-btn:hover { text-decoration: underline; }

#bodyInput {
  width: 100%;
  min-height: 220px;
  padding: 14px;
  border: 1px solid var(--bd);
  border-radius: 10px;
  background: #fbfcfe;
  font-size: 13.5px;
  line-height: 1.8;
  resize: vertical;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
#bodyInput:focus {
  border-color: var(--pri);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 111, 208, .11);
}

.att-row { align-items: center; border-bottom: none; flex-wrap: wrap; }
.att-list { display: flex; flex-wrap: wrap; gap: 7px; flex: 1; min-width: 0; }
.att-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 6px 0 10px;
  border: 1px solid var(--bd);
  border-radius: 7px;
  background: #fbfcfe;
  font-size: 12px;
  color: var(--tx-2);
}
.att-pill span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-pill i { font-style: normal; color: var(--tx-3); font-size: 11px; }
.att-pill button {
  border: none; background: transparent; cursor: pointer;
  color: var(--tx-3); font-size: 14px; line-height: 1; padding: 0 3px;
}
.att-pill button:hover { color: var(--danger); }

.compose-foot {
  flex: none;
  padding: 13px 18px;
  border-top: 1px solid var(--bd);
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fbfcfe;
}
.btn-ghost {
  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--bd);
  border-radius: 9px;
  background: #fff;
  color: var(--tx-2);
  font-size: 13.5px;
  cursor: pointer;
  transition: all .15s;
}
.btn-ghost:hover { border-color: var(--pri); color: var(--pri); }
.compose-msg { font-size: 12.5px; color: var(--tx-3); margin-left: auto; }
.compose-msg.ok { color: var(--ok); }
.compose-msg.err { color: var(--danger); }

/* 通讯录 */
.picker {
  width: 100%;
  max-width: 480px;
  max-height: 76vh;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: pop .18s ease-out;
}
.picker-head {
  flex: none;
  height: 50px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--bd);
}
.picker-head h3 { font-size: 14.5px; font-weight: 600; }
.picker-head button {
  width: 28px; height: 28px; border: none; background: transparent;
  border-radius: 7px; font-size: 19px; line-height: 1; color: var(--tx-3); cursor: pointer;
}
.picker-head button:hover { background: #eef1f6; color: var(--tx); }
#pickerSearch {
  flex: none;
  margin: 12px 16px 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--bd);
  border-radius: 9px;
  background: #f7f9fc;
}
#pickerSearch:focus { border-color: var(--pri); background: #fff; }
.picker-list { flex: 1; overflow-y: auto; padding: 8px 10px 14px; min-height: 0; }
.picker-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .14s;
}
.picker-item:hover { background: #f3f7fd; }
.picker-item .avatar { width: 34px; height: 34px; }
.picker-item .p-meta { min-width: 0; flex: 1; }
.picker-item .p-meta b { display: block; font-size: 13.5px; font-weight: 500; }
.picker-item .p-meta i {
  display: block; font-style: normal; font-size: 11.5px; color: var(--tx-3); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.picker-item .p-add {
  font-size: 12px; color: var(--pri); border: 1px solid var(--pri-l2);
  background: var(--pri-l); border-radius: 6px; padding: 3px 9px; flex: none;
}
.picker-item.added .p-add { color: var(--tx-3); border-color: var(--bd); background: #f4f6f9; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 42px;
  transform: translate(-50%, 16px);
  padding: 11px 22px;
  border-radius: 9px;
  background: #23303f;
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 200;
  box-shadow: 0 8px 26px rgba(20, 32, 54, .3);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d6dce6; border-radius: 5px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b9c2d0; background-clip: content-box; }

/* 窄屏适配 */
@media (max-width: 1180px) {
  .listpane { width: 330px; }
  .sidebar { width: 200px; }
}
@media (max-width: 900px) {
  .sidebar { display: none; }
  .listpane { width: 300px; }
  .login-brand { display: none; }
  .login-card { min-height: auto; }
  .login-form { padding: 36px 28px; }
}
