/* 邮件分类 · 01.1 POA 邮件：专属极简视觉层 */

#appView #nemePoaModuleView {
  --poa-ink: #10283f;
  --poa-muted: #7b8998;
  --poa-line: rgba(18, 45, 70, .1);
  --poa-line-soft: rgba(18, 45, 70, .065);
  --poa-gold: #b78a38;
  --poa-blue: #245f88;
  --poa-green: #25856f;
  font-family: "Avenir Next", "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
    "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--poa-ink);
  -webkit-font-smoothing: antialiased;
}

#appView #nemePoaModuleView .poa-mail-hero {
  position: relative;
  min-height: 132px;
  padding: 27px 30px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  border: 1px solid rgba(222, 188, 116, .22);
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 12%, rgba(102, 157, 191, .24), transparent 34%),
    linear-gradient(120deg, #0b2139 0%, #102f4e 58%, #173d5d 100%);
  box-shadow: 0 20px 50px rgba(10, 31, 52, .16);
}

#appView #nemePoaModuleView .poa-mail-hero::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e1c17e 18%, #f1dda9 50%, transparent);
  pointer-events: none;
}

#appView #nemePoaModuleView .poa-mail-hero .hero-copy {
  min-width: 0;
}

#appView #nemePoaModuleView .poa-mail-hero .eyebrow {
  color: #d7b66c;
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 2.2px;
}

#appView #nemePoaModuleView .poa-mail-hero h2 {
  margin: 10px 0 0;
  color: #fff;
  font-family: "Songti SC", "STSong", "Iowan Old Style", Georgia, serif;
  font-size: clamp(29px, 3vw, 37px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.035em;
}

#appView #nemePoaModuleView .poa-mail-hero .module-number {
  width: 42px;
  height: 25px;
  color: #e2c076;
  border-color: rgba(226, 192, 118, .42);
  border-radius: 6px;
  background: rgba(255, 255, 255, .035);
  font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace;
  font-size: 9.5px;
}

#appView #nemePoaModuleView .poa-hero-tools {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

#appView #nemePoaModuleView .poa-hero-tools .module-mail-picker {
  width: min(280px, 34vw);
  display: grid;
  gap: 6px;
  color: #afc2d3;
  font-size: 10.5px;
  font-weight: 650;
}

#appView #nemePoaModuleView .poa-hero-tools select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .19);
  border-radius: 10px;
  color: #e9f0f7;
  background: rgba(255, 255, 255, .1);
  outline: 0;
}

#appView #nemePoaModuleView .poa-hero-tools select option {
  color: #17314b;
  background: #fff;
}

#appView #nemePoaModuleView .poa-hero-tools .btn.gold {
  min-width: 78px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 10px;
  color: #172d44;
  background: linear-gradient(135deg, #e1bd76, #bd8e3c);
  box-shadow: 0 8px 18px rgba(8, 25, 44, .28);
  font-size: 12px;
  font-weight: 780;
}

#appView #nemePoaModuleView .poa-hero-tools .btn.gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 11px 22px rgba(8, 25, 44, .34);
}

/* 指标 */
#appView #nemePoaModuleView .neme-poa-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

#appView #nemePoaModuleView .neme-poa-stat {
  --poa-metric: var(--poa-blue);
  position: relative;
  min-height: 102px;
  padding: 18px 20px 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  justify-content: space-between;
  gap: 13px;
  border: 1px solid var(--poa-line);
  border-radius: 15px;
  background: linear-gradient(180deg, #fff, #fcfdfe);
  box-shadow: 0 8px 24px rgba(18, 41, 66, .045);
}

#appView #nemePoaModuleView .neme-poa-stat:nth-child(2) {
  --poa-metric: var(--poa-green);
}

#appView #nemePoaModuleView .neme-poa-stat:nth-child(3) {
  --poa-metric: var(--poa-gold);
}

#appView #nemePoaModuleView .neme-poa-stat:nth-child(4) {
  --poa-metric: #536f8b;
}

#appView #nemePoaModuleView .neme-poa-stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--poa-metric), transparent 72%);
}

#appView #nemePoaModuleView .neme-poa-stat span {
  color: var(--poa-muted);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .25px;
  line-height: 1.4;
}

#appView #nemePoaModuleView .neme-poa-stat b {
  color: #17334e;
  font-family: "Iowan Old Style", "Baskerville", Georgia, serif;
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}

/* 收件 / 发送切换 */
#appView #nemePoaModuleView .poa-view-switch {
  width: max-content;
  display: inline-flex;
  gap: 4px;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--poa-line);
  border-radius: 12px;
  background: #edf1f5;
}

#appView #nemePoaModuleView .poa-view-switch .neme-poa-subtab {
  min-width: 112px;
  padding: 9px 18px;
  border: 0;
  border-radius: 9px;
  color: #68798a;
  background: transparent;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.4;
}

#appView #nemePoaModuleView .poa-view-switch .neme-poa-subtab::after {
  display: none;
}

#appView #nemePoaModuleView .poa-view-switch .neme-poa-subtab:hover {
  color: #234e70;
  background: rgba(255, 255, 255, .6);
}

#appView #nemePoaModuleView .poa-view-switch .neme-poa-subtab.active {
  color: #153b5b;
  background: #fff;
  box-shadow: 0 3px 10px rgba(18, 41, 66, .1);
}

/* 邮件列表 */
#appView #nemePoaModuleView .poa-list-panel {
  margin: 0;
  padding: 21px 22px;
  border: 1px solid var(--poa-line);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 11px 32px rgba(18, 41, 66, .05);
}

#appView #nemePoaModuleView .poa-list-panel::before {
  display: none;
}

#appView #nemePoaModuleView .poa-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 15px;
  padding: 0 0 13px;
  border-bottom: 1px solid var(--poa-line-soft);
}

#appView #nemePoaModuleView .poa-list-toolbar h3 {
  margin: 0;
  color: var(--poa-ink);
  font-size: 15px;
  font-weight: 720;
  line-height: 1.4;
}

#appView #nemePoaModuleView .poa-count {
  color: #7f8d9b;
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
}

#appView #nemePoaModuleView .neme-poa-list {
  display: grid;
  gap: 9px;
}

#appView #nemePoaModuleView .neme-poa-card {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 14px 15px 13px 17px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--poa-line-soft);
  border-radius: 12px;
  color: inherit;
  background: linear-gradient(135deg, #fbfcfd, #f8fafb);
  box-shadow: none;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease,
    transform .16s ease;
}

#appView #nemePoaModuleView .neme-poa-card::before {
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, #b88a38, #e3c98e);
}

#appView #nemePoaModuleView .neme-poa-card:hover,
#appView #nemePoaModuleView .neme-poa-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(183, 138, 56, .3);
  outline: 0;
  background: #fff;
  box-shadow: 0 9px 22px rgba(18, 41, 66, .07);
}

#appView #nemePoaModuleView .neme-poa-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

#appView #nemePoaModuleView .neme-poa-tags {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

#appView #nemePoaModuleView .inbox-client-code {
  padding: 4px 8px;
  border: 1px solid rgba(36, 95, 136, .16);
  border-radius: 6px;
  color: #285878;
  background: #eef5f9;
  font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace;
  font-size: 9.5px;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: .02em;
}

#appView #nemePoaModuleView .neme-poa-tags .badge {
  padding: 4px 8px;
  font-size: 9.5px;
  line-height: 1.25;
}

#appView #nemePoaModuleView .poa-open-mark {
  flex: 0 0 auto;
  color: #9ca8b4;
  font-size: 13px;
  line-height: 1;
  transition: color .16s ease, transform .16s ease;
}

#appView #nemePoaModuleView .neme-poa-card:hover .poa-open-mark,
#appView #nemePoaModuleView .neme-poa-card:focus-visible .poa-open-mark {
  color: #a47627;
  transform: translate(1px, -1px);
}

#appView #nemePoaModuleView .neme-poa-card h4 {
  margin: 0;
  color: #1c374f;
  font-size: 13px;
  font-weight: 680;
  line-height: 1.5;
  letter-spacing: -.005em;
  overflow-wrap: anywhere;
}

#appView #nemePoaModuleView .neme-poa-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #84919f;
  font-size: 10.5px;
  line-height: 1.4;
}

#appView #nemePoaModuleView .neme-poa-meta > span:first-child {
  max-width: min(420px, 54vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#appView #nemePoaModuleView .neme-poa-meta time {
  color: #98a3af;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#appView #nemePoaModuleView .neme-poa-meta .has-attachment {
  padding-left: 10px;
  border-left: 1px solid var(--poa-line);
  color: #80705a;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

#appView #nemePoaModuleView .poa-subject-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#appView #nemePoaModuleView .neme-poa-attachments {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 1px 0 0;
  padding: 8px 0 0;
  border-top: 1px dashed rgba(18, 45, 70, .075);
}

#appView #nemePoaModuleView .neme-poa-att {
  max-width: 100%;
  padding: 4px 8px;
  overflow: hidden;
  border: 1px solid rgba(36, 95, 136, .12);
  border-radius: 6px;
  color: #60768a;
  background: #f4f7f9;
  font-size: 9.5px;
  font-weight: 580;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#appView #nemePoaModuleView .unread-dot {
  width: 7px;
  height: 7px;
  margin: 0;
  background: #db4a58;
  box-shadow: 0 0 0 3px rgba(219, 74, 88, .12);
}

#appView #nemePoaModuleView .empty {
  min-height: 170px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #929daa;
  font-size: 11.5px;
}

#appView #nemePoaModuleView .module-error {
  margin: 0;
  font-size: 11.5px;
}

/* ==========================================================================
   POA 邮件详情：只保留标题、附件、正文和处理操作
   ========================================================================== */

#appView #inboxModuleView .inbox-detail-panel {
  padding: 0;
  overflow: hidden;
}

#appView #inboxModuleView .inbox-detail.is-poa {
  display: grid;
  gap: 0;
  color: #172f47;
  font-family: "Avenir Next", "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
    "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#appView #inboxModuleView .poa-detail-head {
  padding: 23px 25px 18px;
  border-bottom: 1px solid rgba(18, 45, 70, .075);
  background: linear-gradient(180deg, #fff, #fcfdfe);
}

#appView #inboxModuleView .poa-detail-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 11px;
}

#appView #inboxModuleView .poa-detail-tags .badge {
  padding: 4px 9px;
  font-size: 10px;
  line-height: 1.3;
}

#appView #inboxModuleView .poa-detail-client {
  color: #5c7184;
  font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace;
  font-size: 9.5px;
  font-weight: 680;
  letter-spacing: .015em;
}

#appView #inboxModuleView .poa-detail-client.unmatched {
  color: #a07828;
}

#appView #inboxModuleView .poa-detail-head h3 {
  margin: 0;
  color: #142f48;
  font-size: 19px;
  font-weight: 690;
  line-height: 1.45;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}

#appView #inboxModuleView .poa-detail-head > p {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 9px 0 0;
  color: #84919e;
  font-size: 10.5px;
  line-height: 1.5;
}

#appView #inboxModuleView .poa-detail-head > p span {
  max-width: min(440px, 62vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#appView #inboxModuleView .poa-detail-head > p time {
  padding-left: 10px;
  border-left: 1px solid rgba(18, 45, 70, .12);
  color: #98a3ae;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#appView #inboxModuleView .poa-detail-content {
  display: grid;
  gap: 12px;
  padding: 18px 25px 23px;
}

#appView #inboxModuleView .poa-detail-card {
  overflow: hidden;
  border: 1px solid rgba(18, 45, 70, .09);
  border-radius: 12px;
  background: #fff;
}

#appView #inboxModuleView .poa-detail-card > header {
  min-height: 38px;
  padding: 9px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(18, 45, 70, .065);
  background: #f8fafb;
}

#appView #inboxModuleView .poa-detail-card > header b {
  color: #43596d;
  font-size: 10.5px;
  font-weight: 720;
  letter-spacing: .3px;
}

#appView #inboxModuleView .poa-detail-card > header span {
  color: #8c98a4;
  font-size: 9.5px;
  font-weight: 650;
}

#appView #inboxModuleView .poa-detail-file-list {
  display: grid;
}

#appView #inboxModuleView .poa-detail-file {
  min-width: 0;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgba(18, 45, 70, .055);
}

#appView #inboxModuleView .poa-detail-file:first-child {
  border-top: 0;
}

#appView #inboxModuleView .poa-detail-file-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

#appView #inboxModuleView .poa-detail-file-main span {
  overflow: hidden;
  color: #29445c;
  font-size: 11.5px;
  font-weight: 620;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#appView #inboxModuleView .poa-detail-file-main small {
  color: #98a3ae;
  font-size: 9.5px;
  line-height: 1.4;
}

#appView #inboxModuleView .poa-detail-download {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(36, 95, 136, .14);
  border-radius: 7px;
  color: #275b7e;
  background: #f1f6f9;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

#appView #inboxModuleView .poa-detail-download:hover {
  color: #fff;
  border-color: #245f88;
  background: #245f88;
}

#appView #inboxModuleView .poa-detail-no-files {
  min-height: 39px;
  padding: 8px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px dashed rgba(18, 45, 70, .11);
  border-radius: 10px;
  color: #8b97a3;
  background: #fafbfc;
  font-size: 10.5px;
}

#appView #inboxModuleView .poa-detail-link {
  padding: 3px 0;
  border: 0;
  color: #2b658b;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

#appView #inboxModuleView .poa-detail-original {
  max-height: 390px;
  overflow: auto;
  padding: 15px 16px;
  color: #40566a;
  background: #fff;
  font-family: "Avenir Next", "SF Pro Text", "PingFang SC", sans-serif;
  font-size: 11.5px;
  line-height: 1.78;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#appView #inboxModuleView .poa-detail-review {
  padding: 13px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 13px;
  border: 1px solid rgba(18, 45, 70, .09);
  border-radius: 12px;
  background: #f8fafb;
}

#appView #inboxModuleView .poa-detail-review label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: #758493;
  font-size: 9.5px;
  font-weight: 680;
}

#appView #inboxModuleView .poa-detail-review select {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(18, 45, 70, .12);
  border-radius: 8px;
  color: #243d54;
  background: #fff;
  outline: 0;
}

#appView #inboxModuleView .poa-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#appView #inboxModuleView .poa-detail-actions .btn {
  min-width: 70px;
  min-height: 36px;
  padding: 8px 14px;
  font-size: 11px;
}

#appView #inboxModuleView .poa-detail-content > .email-issues {
  margin: 0;
  font-size: 10.5px;
}

@media (max-width: 1080px) {
  #appView #nemePoaModuleView .poa-mail-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  #appView #nemePoaModuleView .poa-hero-tools {
    width: 100%;
  }

  #appView #nemePoaModuleView .poa-hero-tools .module-mail-picker {
    width: min(420px, calc(100% - 88px));
  }
}

@media (max-width: 760px) {
  #appView #nemePoaModuleView {
    gap: 16px;
  }

  #appView #nemePoaModuleView .poa-mail-hero {
    min-height: 0;
    padding: 23px 20px;
    border-radius: 17px;
  }

  #appView #nemePoaModuleView .poa-mail-hero h2 {
    font-size: 29px;
  }

  #appView #nemePoaModuleView .poa-hero-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #appView #nemePoaModuleView .poa-hero-tools .module-mail-picker {
    width: 100%;
  }

  #appView #nemePoaModuleView .neme-poa-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #appView #nemePoaModuleView .neme-poa-stat {
    min-height: 92px;
    padding: 15px 16px;
  }

  #appView #nemePoaModuleView .neme-poa-stat b {
    font-size: 30px;
  }

  #appView #nemePoaModuleView .poa-list-panel {
    padding: 17px 15px;
    border-radius: 15px;
  }

  #appView #nemePoaModuleView .neme-poa-card {
    padding: 13px 12px 12px 15px;
  }

  #appView #nemePoaModuleView .neme-poa-meta > span:first-child {
    max-width: 100%;
  }

  #appView #inboxModuleView .poa-detail-head,
  #appView #inboxModuleView .poa-detail-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  #appView #inboxModuleView .poa-detail-review {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  #appView #inboxModuleView .poa-detail-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 520px) {
  #appView #nemePoaModuleView .poa-hero-tools {
    grid-template-columns: 1fr;
  }

  #appView #nemePoaModuleView .poa-hero-tools .btn.gold {
    width: 100%;
  }

  #appView #nemePoaModuleView .poa-view-switch {
    width: 100%;
  }

  #appView #nemePoaModuleView .poa-view-switch .neme-poa-subtab {
    flex: 1;
  }

  #appView #nemePoaModuleView .neme-poa-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  #appView #nemePoaModuleView .neme-poa-meta .has-attachment {
    padding-left: 0;
    border-left: 0;
  }

  #appView #inboxModuleView .poa-detail-head h3 {
    font-size: 17px;
  }

  #appView #inboxModuleView .poa-detail-file {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  #appView #inboxModuleView .poa-detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #appView #inboxModuleView .poa-detail-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  #appView #nemePoaModuleView .neme-poa-card,
  #appView #nemePoaModuleView .poa-open-mark {
    transition: none !important;
  }
}
