body.dark-theme {
  background: #f5f8fa;
  color: #10223b;
  font-family: Inter, system-ui, sans-serif;
}
.app-container,
#toast-container {
  display: none;
}
#harbor-ui {
  min-height: 100vh;
}
.ih-lock {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #f5f8fa;
}
.ih-lock > div {
  width: min(410px, calc(100% - 32px));
  padding: 42px;
  background: #fff;
  border: 1px solid #e1e9ee;
  border-radius: 18px;
  box-shadow: 0 22px 60px #10223b12;
}
.ih-lock h1 {
  font:
    400 32px Georgia,
    serif;
  margin: 18px 0 8px;
  color: #10223b;
}
.ih-lock p {
  color: #718096;
  line-height: 1.6;
}
.ih-lock input,
.ih-field input {
  width: 100%;
  padding: 11px;
  border: 1px solid #d9e3e9;
  border-radius: 8px;
  margin: 12px 0;
  color: #10223b;
}
.ih-button {
  border: 0;
  border-radius: 8px;
  background: #1678a2;
  color: #fff;
  padding: 10px 15px;
  font-weight: 650;
  cursor: pointer;
}
.ih-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
  background: #f5f8fa;
}
.ih-side {
  background: #0d2239;
  color: #d8e5ed;
  padding: 30px 18px;
  display: flex;
  flex-direction: column;
}
.ih-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 8px 35px;
}
.ih-mark {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 11px;
  background: #2687a7;
  color: white;
  font: 700 12px Georgia;
}
.ih-brand b {
  color: #fff;
  display: block;
}
.ih-brand small {
  color: #8ba1b2;
}
.ih-nav {
  display: grid;
  gap: 5px;
}
.ih-nav button {
  border: 0;
  background: transparent;
  color: #a4b8c6;
  text-align: left;
  border-radius: 8px;
  padding: 11px;
  cursor: pointer;
}
.ih-nav button.active {
  background: #1a3b56;
  color: #fff;
}
.ih-local {
  margin-top: auto;
  font-size: 12px;
  color: #8fc9c8;
  padding: 8px;
}
.ih-main {
  padding: 34px 5.5vw 84px;
  max-width: 1500px;
  width: 100%;
  margin: auto;
}
.ih-head,
.ih-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.ih-head {
  margin-bottom: 28px;
}
.ih-eyebrow {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: #6e8b9e;
  font-weight: bold;
  margin: 0 0 7px;
}
.ih-head h2,
.ih-section-head h2 {
  margin: 0;
  font-size: 25px;
}
.ih-page {
  display: none;
}
.ih-page.active {
  display: block;
}
.ih-hero {
  background: linear-gradient(120deg, #102b46, #18506e);
  border-radius: 18px;
  color: #fff;
  padding: 39px 44px;
  min-height: 230px;
  display: flex;
  align-items: end;
  justify-content: space-between;
}
.ih-hero h1 {
  font: 400 clamp(29px, 3vw, 44px)/1.15 Georgia;
  margin: 8px 0;
  max-width: 570px;
}
.ih-hero p,
.ih-hero span {
  color: #b8d2db;
}
.ih-number {
  text-align: right;
}
.ih-number b {
  font: 400 64px Georgia;
  display: block;
}
.ih-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  margin: 17px 0;
}
.ih-card {
  background: #fff;
  border: 1px solid #e1e9ee;
  border-radius: 13px;
  padding: 19px;
}
.ih-card span {
  color: #718096;
}
.ih-card b {
  font: 400 30px Georgia;
  display: block;
  margin-top: 9px;
}
.ih-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
}
.ih-channels {
  display: grid;
  gap: 10px;
}
.ih-channel {
  background: #fff;
  border: 1px solid #e1e9ee;
  border-radius: 12px;
  padding: 16px;
}
.ih-channel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ih-channel-name {
  font-weight: 650;
}
.ih-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 13px;
}
.ih-field label {
  font-size: 11px;
  color: #617885;
}
.ih-guide {
  position: sticky;
  top: 20px;
  height: max-content;
}
.ih-guide p {
  line-height: 1.65;
  color: #637988;
}
.ih-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e8eef1;
  padding: 15px 0;
  gap: 12px;
}
.ih-account:last-child {
  border: 0;
}
.ih-muted {
  color: #718096;
}
.ih-mobile {
  display: none;
}
@media (max-width: 768px) {
  .ih-shell {
    display: block;
  }
  .ih-side {
    display: none;
  }
  .ih-main {
    padding: 24px 18px 80px;
  }
  .ih-hero {
    padding: 28px;
    display: block;
  }
  .ih-number {
    text-align: left;
    margin-top: 27px;
  }
  .ih-number b {
    font-size: 48px;
  }
  .ih-stats {
    gap: 8px;
  }
  .ih-card {
    padding: 14px;
  }
  .ih-layout {
    grid-template-columns: 1fr;
  }
  .ih-guide {
    position: static;
  }
  .ih-fields {
    grid-template-columns: 1fr;
  }
  .ih-mobile {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e1e9ee;
    padding: 7px;
    z-index: 3;
  }
  .ih-mobile button {
    border: 0;
    background: transparent;
    color: #647d8c;
    padding: 8px;
  }
  .ih-mobile button.active {
    background: #eaf5f8;
    color: #1678a2;
    border-radius: 7px;
  }
}

/* Mail center: fixed app chrome, compact list and calm reading surface. */
@media (min-width: 769px) {
  .ih-shell {
    display: block;
  }
  .ih-side {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;
    width: 240px;
    overflow-y: auto;
  }
  .ih-main {
    margin-left: 240px;
    width: calc(100% - 240px);
  }
}
.ih-mail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 2px 0 24px;
}
.ih-mail-head h1 {
  margin: 0;
  color: #10223b;
  font: 650 clamp(28px, 3vw, 38px)/1.1 Inter, system-ui, sans-serif;
  letter-spacing: -0.04em;
}
.ih-mail-head p {
  margin: 8px 0 0;
  color: #6c8190;
  font-size: 14px;
}
.ih-mail-head-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ih-mail-head-actions > span {
  color: #6c8190;
  font-size: 13px;
}
.ih-mail-categories {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  border-bottom: 1px solid #dfe8ec;
}
.ih-mail-categories button {
  flex: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #647b89;
  padding: 11px 14px 13px;
  font: 650 13px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}
.ih-mail-categories button.active {
  border-color: #1678a2;
  color: #0e5674;
}
.ih-mail-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(190px, 280px);
  gap: 10px;
  padding: 15px 0;
}
.ih-mail-tools label {
  display: grid;
  gap: 6px;
  color: #637988;
  font: 650 11px/1 Inter, system-ui, sans-serif;
}
.ih-mail-tools input,
.ih-mail-tools select,
.ih-compose-card input,
.ih-compose-card select,
.ih-compose-card textarea {
  width: 100%;
  min-height: 42px;
  margin: 0;
  border: 1px solid #d5e0e6;
  border-radius: 8px;
  background: #fff;
  color: #173148;
  padding: 10px 12px;
  font: 500 13px/1.4 Inter, system-ui, sans-serif;
}
.ih-mail-workspace {
  display: grid;
  grid-template-columns: minmax(310px, 0.78fr) minmax(420px, 1.22fr);
  min-height: 620px;
  overflow: hidden;
  border: 1px solid #dce6eb;
  border-radius: 10px;
  background: #fff;
}
.ih-mail-list {
  max-height: 720px;
  overflow-y: auto;
  border-right: 1px solid #dfe8ec;
  background: #fbfcfd;
}
.ih-mail-row {
  display: grid;
  width: 100%;
  gap: 7px;
  border: 0;
  border-bottom: 1px solid #e5ecef;
  background: transparent;
  padding: 17px 18px;
  color: #173148;
  text-align: left;
  cursor: pointer;
}
.ih-mail-row:hover {
  background: #f4f8fa;
}
.ih-mail-row.active {
  background: #eef6f8;
  box-shadow: inset 3px 0 #1678a2;
}
.ih-mail-row-top,
.ih-mail-row-meta,
.ih-reader-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ih-mail-row-top b {
  overflow: hidden;
  font: 650 12px/1.3 Inter, system-ui, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ih-mail-row time,
.ih-reader-meta time {
  flex: none;
  color: #8495a0;
  font-size: 11px;
}
.ih-mail-row strong {
  overflow: hidden;
  font: 650 14px/1.4 Inter, system-ui, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ih-mail-preview {
  display: -webkit-box;
  overflow: hidden;
  color: #6c8190;
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.ih-mail-row-meta small {
  overflow: hidden;
  color: #8495a0;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ih-mail-tag {
  width: max-content;
  border-radius: 5px;
  background: #edf2f5;
  color: #506a79;
  padding: 5px 8px;
  font: 700 10px/1 Inter, system-ui, sans-serif;
}
.ih-mail-tag-验证码 { background: #e7f6f2; color: #226e5c; }
.ih-mail-tag-通知 { background: #edf4fa; color: #356482; }
.ih-mail-tag-账单 { background: #fff4df; color: #8b641e; }
.ih-mail-tag-社交 { background: #f0eef9; color: #5d5185; }
.ih-mail-tag-推广 { background: #f9eeee; color: #895151; }
.ih-mail-tag-已发送 { background: #edf3fb; color: #365f87; }
.ih-mail-reader {
  min-width: 0;
  max-height: 720px;
  padding: clamp(24px, 3vw, 42px);
  overflow-x: hidden;
  overflow-y: auto;
}
.ih-reader-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.ih-reader-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.ih-reader-actions select { min-height: 38px; border: 1px solid #ccdce4; border-radius: 8px; background: #fff; padding: 0 10px; }
.ih-mail-reader h2 {
  margin: 14px 0 20px;
  color: #10223b;
  font: 650 clamp(22px, 2.4vw, 30px)/1.3 Inter, system-ui, sans-serif;
  letter-spacing: -0.025em;
}
.ih-reader-meta {
  padding-bottom: 20px;
  border-bottom: 1px solid #e3eaee;
}
.ih-reader-meta div {
  display: grid;
  gap: 4px;
}
.ih-reader-meta b { color: #18354a; font-size: 13px; }
.ih-reader-meta span { color: #7b8d98; font-size: 12px; }
.ih-mail-recipients { display: grid; gap: 4px; margin-top: 12px; color: #718692; font-size: 12px; }
.ih-attachments { display: grid; gap: 8px; margin-top: 22px; padding: 16px; border: 1px solid #dce7ec; border-radius: 10px; background: #f8fbfc; color: #526a79; font-size: 12px; }
.ih-code-box {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 5px 18px;
  margin: 24px 0;
  padding: 18px 20px;
  border: 1px solid #cfe4df;
  border-radius: 9px;
  background: #f2faf7;
}
.ih-code-box > span { color: #5f7e75; font-size: 11px; }
.ih-code-box strong {
  grid-row: 2;
  color: #155b4b;
  font: 650 30px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.1em;
}
.ih-code-box button { grid-column: 2; grid-row: 1 / 3; }
.ih-mail-body {
  overflow-wrap: anywhere;
  color: #314d60;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
}
.ih-mail-empty {
  display: grid;
  place-content: center;
  min-height: 260px;
  gap: 7px;
  padding: 30px;
  color: #7c8e99;
  text-align: center;
}
.ih-mail-empty b { color: #385265; font-size: 14px; }
.ih-mail-empty span { font-size: 12px; }
.ih-mail-pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px 0 0; color: #6c8190; font-size: 12px; }
.ih-compose-dialog { width: min(620px, calc(100% - 28px)); }
.ih-compose-card { width: 100%; }
.ih-compose-card textarea { resize: vertical; line-height: 1.65; }

@media (max-width: 980px) and (min-width: 769px) {
  .ih-mail-workspace { grid-template-columns: minmax(270px, 0.9fr) minmax(340px, 1.1fr); }
}
@media (max-width: 768px) {
  .ih-mail-head { align-items: flex-start; margin-top: 0; }
  .ih-mail-head-actions { align-items: flex-end; flex-direction: column-reverse; gap: 8px; }
  .ih-mail-tools { grid-template-columns: 1fr; }
  .ih-mail-workspace { display: block; min-height: 0; overflow: visible; }
  .ih-mail-list { max-height: 440px; border-right: 0; border-bottom: 1px solid #dfe8ec; }
  .ih-mail-reader { min-height: 420px; max-height: 620px; padding: 24px 18px; }
  .ih-code-box { grid-template-columns: 1fr; align-items: stretch; }
  .ih-code-box button { grid-column: 1; grid-row: 3; margin-top: 10px; }
  .ih-code-box strong { font-size: 27px; }
}
@media (max-width: 390px) {
  .ih-main {
    padding-left: 14px;
    padding-right: 14px;
  }
  .ih-hero {
    padding: 22px;
  }
  .ih-hero h1 {
    font-size: 30px;
  }
  .ih-card {
    padding: 11px;
  }
  .ih-card b {
    font-size: 25px;
  }
}
@media (min-width: 769px) {
  .ih-shell { display: block; }
  .ih-side {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;
    width: 240px;
    overflow-y: auto;
  }
  .ih-main {
    margin: 0 0 0 240px;
    width: calc(100% - 240px);
    max-width: none;
  }
}

/* Connector setup: guided, readable, and safe for first-time operators. */
.ih-connector-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.ih-config-state {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #dce6eb;
  border-radius: 9px;
  background: #fff;
}
.ih-config-state > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 800;
}
.ih-config-state.ready > span {
  background: #e7f7f1;
  color: #23755d;
}
.ih-config-state.missing > span {
  background: #fff4e5;
  color: #9b6522;
}
.ih-config-state b,
.ih-config-state small {
  display: block;
}
.ih-config-state b {
  color: #17364c;
  font-size: 13px;
}
.ih-config-state small {
  margin-top: 3px;
  color: #718692;
  font-size: 12px;
}
.ih-connector-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}
.ih-connector-form {
  overflow: hidden;
  border: 1px solid #dce6eb;
  border-radius: 10px;
  background: #fff;
}
.ih-setup-block {
  padding: 24px;
  border-bottom: 1px solid #e5ecef;
}
.ih-setup-heading {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}
.ih-setup-heading > span {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #e9f4f8;
  color: #116383;
  font:
    750 13px Inter,
    system-ui,
    sans-serif;
}
.ih-setup-heading h2,
.ih-setup-aside h2 {
  margin: 2px 0 5px;
  color: #14334a;
  font:
    650 17px/1.3 Inter,
    system-ui,
    sans-serif;
}
.ih-setup-heading p {
  margin: 0;
  color: #6c818e;
  font-size: 13px;
  line-height: 1.55;
}
.ih-setup-block .ih-field-label {
  margin-left: 41px;
}
.ih-field-label input {
  width: 100%;
  height: 42px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #d4e0e5;
  border-radius: 7px;
  background: #fff;
  color: #173148;
  font:
    500 13px Inter,
    system-ui,
    sans-serif;
}
.ih-field-label input:disabled {
  background: #f3f6f8;
  color: #788a94;
  cursor: not-allowed;
}
.ih-field-label small {
  color: #7a8e99;
  font:
    400 12px/1.55 Inter,
    system-ui,
    sans-serif;
}
.ih-copy-field {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: 15px 0 0 41px;
}
.ih-copy-field code {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  border: 1px solid #dce6eb;
  border-radius: 7px;
  background: #f5f8fa;
  color: #315267;
  font:
    12px/1.5 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
}
.ih-callback-note {
  margin: 9px 0 0 54px;
  color: #5d7380;
  font-size: 12px;
  line-height: 1.6;
}
.ih-clear-secret {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0 41px;
  color: #6a7f8b;
  font-size: 12px;
}
.ih-clear-secret input {
  width: 16px;
  height: 16px;
  accent-color: #1678a2;
}
.ih-tutorial {
  margin: 17px 0 0 41px;
  border-top: 1px solid #edf1f3;
  padding-top: 14px;
}
.ih-tutorial summary {
  width: max-content;
  color: #176f92;
  font:
    650 13px Inter,
    system-ui,
    sans-serif;
  cursor: pointer;
}
.ih-tutorial ol,
.ih-setup-aside ol {
  margin: 13px 0 0;
  padding-left: 21px;
  color: #586f7d;
  font-size: 13px;
  line-height: 1.75;
}
.ih-tutorial code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #eef4f6;
  color: #214b62;
}
.ih-connector-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  background: #fafcfd;
}
.ih-connector-actions #cx-result {
  color: #667e8b;
  font-size: 12px;
  line-height: 1.5;
}
.ih-connector-actions #cx-result.success {
  color: #23755d;
}
.ih-connector-actions #cx-result.error {
  color: #a03a3a;
}
.ih-setup-aside {
  position: sticky;
  top: 20px;
  padding: 21px;
  border: 1px solid #dce6eb;
  border-radius: 10px;
  background: #f7fafb;
}
.ih-setup-aside p {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid #dfe8ec;
  color: #6a7e89;
  font-size: 12px;
  line-height: 1.65;
}

@media (max-width: 900px) {
  .ih-connector-layout {
    grid-template-columns: 1fr;
  }
  .ih-setup-aside {
    position: static;
    order: -1;
  }
  .ih-connector-status {
    grid-template-columns: 1fr;
  }
}
.ih-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.ih-guide-grid .ih-card {
  min-width: 0;
}
.ih-guide-grid .ih-card h2 {
  margin: 0 0 13px;
  color: #14334a;
  font: 650 17px/1.3 Inter, system-ui, sans-serif;
}
.ih-guide-grid .ih-card p {
  margin-bottom: 0;
  font-size: 12px;
  line-height: 1.6;
}
.ih-command {
  max-width: 100%;
  overflow-x: auto;
  margin: 0;
  padding: 14px;
  border: 1px solid #dce6eb;
  border-radius: 7px;
  background: #f5f8fa;
  color: #264b61;
  font: 12px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre;
}
@media (max-width: 900px) {
  .ih-guide-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .ih-setup-block {
    padding: 20px 16px;
  }
  .ih-setup-block .ih-field-label,
  .ih-copy-field,
  .ih-clear-secret,
  .ih-callback-note,
  .ih-tutorial {
    margin-left: 0;
  }
  .ih-copy-field {
    flex-direction: column;
  }
  .ih-copy-field .ih-button,
  .ih-connector-actions .ih-button {
    width: 100%;
    min-height: 44px;
  }
  .ih-connector-actions {
    align-items: stretch;
    flex-direction: column;
    padding: 16px;
  }
  .ih-tutorial summary {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .ih-setup-aside {
    padding: 17px;
  }
}
/* InboxHarbor visual refinements: quiet, editorial, touch-friendly. */
body.dark-theme,
.ih-shell,
.ih-lock {
  background: #fff;
}
.ih-main {
  background: #fff;
}
.ih-hero {
  background: #102b46;
  border-radius: 10px;
}
.ih-card,
.ih-channel {
  border-radius: 9px;
  box-shadow: none;
}
.ih-eyebrow {
  display: none;
}
.ih-channel-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ih-test {
  appearance: none;
  border: 1px solid #c8d7df;
  background: #fff;
  color: #155f7d;
  border-radius: 7px;
  padding: 7px 11px;
  font:
    600 12px Inter,
    system-ui,
    sans-serif;
  cursor: pointer;
}
.ih-test:hover {
  border-color: #1678a2;
  background: #f4fafc;
}
.ih-test:disabled {
  opacity: 0.55;
  cursor: wait;
}
.ih-example {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 16px;
  padding: 13px;
  background: #f3f7f9;
  border: 1px solid #dce6eb;
  border-radius: 7px;
  color: #29475a;
  font:
    12px/1.65 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
}
.ih-channel input[type="checkbox"],
.ih-section-head input[type="checkbox"],
.ih-account input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #1678a2;
}
.ih-button:focus-visible,
.ih-test:focus-visible,
input:focus-visible {
  outline: 3px solid #8fc9df;
  outline-offset: 2px;
}
.ih-account-tools,
.ih-pager,
.ih-account-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ih-account-tools {
  padding-bottom: 14px;
  border-bottom: 1px solid #e8eef1;
}
.ih-account-tools input,
.ih-account-tools select,
.ih-pager input {
  border: 1px solid #d9e3e9;
  border-radius: 7px;
  padding: 8px;
  background: white;
  color: #10223b;
}
.ih-account-tools input {
  flex: 1;
  min-width: 170px;
}
.ih-account-actions {
  justify-content: flex-end;
}
.ih-account-actions label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.ih-pager {
  padding-top: 14px;
  justify-content: flex-end;
}
@media (max-width: 768px) {
  .ih-account {
    align-items: flex-start;
    flex-direction: column;
  }
  .ih-account-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .ih-account-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .ih-account-tools input {
    grid-column: span 2;
    min-width: 0;
  }
  .ih-pager {
    justify-content: flex-start;
  }
  .ih-account-actions .ih-button {
    padding: 8px 10px;
  }
}
@media (max-width: 768px) {
  .ih-channel {
    padding: 15px 14px;
  }
  .ih-channel-top {
    min-height: 34px;
  }
  .ih-test {
    min-height: 40px;
    padding-inline: 14px;
  }
  .ih-guide {
    position: fixed;
    inset: auto 0 0;
    z-index: 6;
    max-height: 72vh;
    overflow: auto;
    border-radius: 14px 14px 0 0;
    padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
    box-shadow: 0 -18px 45px #10223b24;
  }
  .ih-mobile {
    padding-bottom: calc(7px + env(safe-area-inset-bottom));
  }
}

/* Account workspace: dense on desktop, touch-first on mobile. */
*,
*::before,
*::after {
  box-sizing: border-box;
}
.ih-head {
  justify-content: flex-end;
  min-height: 40px;
  margin-bottom: 18px;
}
.ih-section-head {
  margin-bottom: 22px;
}
.ih-section-head h1 {
  margin: 0;
  color: #10223b;
  font:
    600 clamp(26px, 3vw, 34px)/1.15 Inter,
    system-ui,
    sans-serif;
  letter-spacing: -0.035em;
}
.ih-section-copy {
  margin: 8px 0 0;
  color: #6c8190;
  font-size: 14px;
}
.ih-section-actions {
  display: flex;
  gap: 9px;
}
.ih-button {
  min-height: 40px;
  font:
    650 13px/1 Inter,
    system-ui,
    sans-serif;
  transition:
    background 0.16s,
    border-color 0.16s,
    opacity 0.16s;
}
.ih-button:disabled,
.ih-page-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.ih-button-quiet {
  border: 1px solid #cddae1;
  background: #fff;
  color: #17445b;
}
.ih-button-quiet:hover:not(:disabled) {
  background: #f3f8fa;
  border-color: #91b4c3;
}
.ih-button-danger {
  border: 1px solid #e4c7c7;
  background: #fff;
  color: #a03a3a;
}
.ih-button-danger:hover {
  background: #fff5f5;
}
.ih-account-surface {
  overflow: hidden;
  border: 1px solid #dce6eb;
  border-radius: 10px;
  background: #fff;
}
.ih-provider-tabs {
  display: flex;
  gap: 3px;
  padding: 18px 20px 0;
  border-bottom: 1px solid #e4ecef;
  overflow-x: auto;
}
.ih-provider-tabs button {
  flex: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #647b89;
  padding: 10px 14px 12px;
  font:
    650 13px/1 Inter,
    system-ui,
    sans-serif;
  cursor: pointer;
}
.ih-provider-tabs button.active {
  border-color: #1678a2;
  color: #0e5674;
}
.ih-account-tools {
  padding: 16px 20px;
  background: #fbfcfd;
  border-bottom: 1px solid #e4ecef;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ih-account-tools input,
.ih-account-tools select {
  height: 40px;
  margin: 0;
  border: 1px solid #d6e1e6;
  border-radius: 7px;
  background: #fff;
  color: #173148;
  font:
    500 13px Inter,
    system-ui,
    sans-serif;
}
.ih-account-tools input {
  max-width: 360px;
  padding: 0 13px;
}
.ih-account-tools select {
  padding: 0 34px 0 11px;
}
.ih-account-table {
  width: 100%;
}
.ih-account-row {
  display: grid;
  grid-template-columns:
    minmax(220px, 2fr) minmax(100px, 0.8fr) minmax(96px, 0.8fr)
    minmax(210px, 1.35fr) minmax(145px, 1fr) minmax(268px, 1.25fr);
  align-items: center;
  min-height: 72px;
  border-bottom: 1px solid #e7edef;
}
.ih-account-row > div {
  min-width: 0;
  padding: 14px 12px;
}
.ih-account-row > div:first-child {
  padding-left: 20px;
}
.ih-account-row > div:last-child {
  padding-right: 20px;
}
.ih-account-row-head {
  min-height: 44px;
  background: #fbfcfd;
  color: #6d818d;
  font:
    650 11px/1.2 Inter,
    system-ui,
    sans-serif;
  letter-spacing: 0.03em;
}
.ih-account-row-head > div {
  padding-top: 12px;
  padding-bottom: 12px;
}
.ih-account-identity strong {
  display: block;
  overflow: hidden;
  color: #123047;
  font:
    600 14px/1.35 Inter,
    system-ui,
    sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ih-mobile-meta {
  display: none;
}
.ih-provider,
.ih-status {
  width: max-content;
  border-radius: 6px;
  padding: 6px 9px !important;
  font:
    650 11px/1 Inter,
    system-ui,
    sans-serif;
}
.ih-provider-google {
  background: #f1f5fb;
  color: #365c86;
}
.ih-provider-microsoft {
  background: #eef7f8;
  color: #216875;
}
.ih-status {
  position: relative;
  padding-left: 19px !important;
  background: #f4f7f8;
  color: #536a77;
}
.ih-status::before {
  position: absolute;
  left: 8px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8da0aa;
  content: "";
  transform: translateY(-50%);
}
.ih-status-active {
  background: #edf8f4;
  color: #24705c;
}
.ih-status-active::before {
  background: #2ba57f;
}
.ih-status-invalid {
  background: #fff2f2;
  color: #9e4141;
}
.ih-status-invalid::before {
  background: #d35656;
}
.ih-permissions {
  display: flex;
  gap: 14px;
}
.ih-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  cursor: pointer;
}
.ih-switch input {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
}
.ih-switch-track {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 20px;
  background: #bccbd2;
  transition: background 0.16s;
}
.ih-switch-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px #10223b28;
  content: "";
  transition: transform 0.16s;
}
.ih-switch input:checked + .ih-switch-track {
  background: #1678a2;
}
.ih-switch input:checked + .ih-switch-track::after {
  transform: translateX(14px);
}
.ih-switch input:focus-visible + .ih-switch-track {
  outline: 3px solid #8fc9df;
  outline-offset: 2px;
}
.ih-switch-label {
  color: #5f7684 !important;
  font-size: 12px;
}
.ih-last-checked {
  color: #6c818d;
  font-size: 12px;
  line-height: 1.35;
}
.ih-account-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: nowrap;
}
.ih-account-actions .ih-button {
  min-height: 34px;
  padding: 8px 11px;
  flex: 0 0 auto;
  white-space: nowrap;
  word-break: keep-all;
}
.ih-share-settings {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(150px, auto);
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px 20px;
  border: 1px solid #d7e5ea;
  border-radius: 12px;
  background: linear-gradient(135deg, #f7fbfc 0%, #fff 72%);
  box-shadow: 0 8px 24px rgba(18, 48, 71, 0.05);
}
.ih-share-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #e3f3f7;
  color: #147ea8;
  font-size: 20px;
}
.ih-share-copy h3 {
  margin: 0 0 5px;
  color: #123047;
  font-size: 15px;
}
.ih-share-copy p {
  margin: 0;
  color: #6c818d;
  font-size: 12px;
  line-height: 1.6;
}
.ih-share-field {
  display: grid;
  gap: 6px;
  color: #415f70;
  font-size: 12px;
  font-weight: 650;
}
.ih-share-input {
  display: grid;
  grid-template-columns: 72px auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid #cddde4;
  border-radius: 9px;
  background: #fff;
}
.ih-share-input input {
  width: 72px;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  outline: 0;
  color: #123047;
  font: 650 14px Inter, system-ui, sans-serif;
}
.ih-share-input b {
  padding-right: 12px;
  color: #78909c;
  font-size: 12px;
}
.ih-share-field small {
  color: #8a9ba4;
  font-weight: 500;
}
.ih-save-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.ih-save-row span {
  color: #7b8e99;
  font-size: 12px;
}
.ih-empty {
  padding: 54px 20px;
  text-align: center;
  color: #718692;
}
.ih-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 68px;
  padding: 12px 20px;
  background: #fbfcfd;
}
.ih-pager-summary {
  margin-right: auto;
  color: #667d8a;
  font-size: 12px;
}
.ih-pager select,
.ih-page-jump input {
  height: 36px;
  border: 1px solid #d6e1e6;
  border-radius: 7px;
  background: #fff;
  color: #18364c;
  font:
    500 12px Inter,
    system-ui,
    sans-serif;
}
.ih-pager select {
  padding: 0 28px 0 9px;
}
.ih-page-buttons {
  display: flex;
  gap: 4px;
}
.ih-page-button {
  min-width: 34px;
  height: 34px;
  border: 1px solid #d6e1e6;
  border-radius: 7px;
  background: #fff;
  color: #315166;
  font:
    650 12px Inter,
    system-ui,
    sans-serif;
  cursor: pointer;
}
.ih-page-button.active {
  border-color: #1678a2;
  background: #1678a2;
  color: #fff;
}
.ih-page-jump {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ih-page-jump input {
  width: 58px;
  padding: 0 8px;
}
.ih-page-jump .ih-button {
  min-height: 36px;
  padding: 8px 10px;
}
.ih-dialog {
  position: fixed;
  inset: 0;
  width: min(540px, calc(100% - 28px));
  max-height: min(720px, calc(100% - 28px));
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
}
.ih-dialog::backdrop {
  background: #0a1e30a8;
  backdrop-filter: blur(2px);
}
.ih-dialog-card {
  padding: 25px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 70px #07192835;
}
.ih-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.ih-dialog-head h2 {
  margin: 0;
  color: #10223b;
  font-size: 23px;
}
.ih-dialog-head p,
.ih-dialog-help {
  color: #6b808d;
  font-size: 13px;
  line-height: 1.55;
}
.ih-dialog-close {
  border: 0;
  background: transparent;
  color: #667d89;
  font-size: 25px;
  cursor: pointer;
}
.ih-field-label {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  color: #314f62;
  font:
    650 12px Inter,
    system-ui,
    sans-serif;
}
.ih-field-label select,
.ih-field-label textarea {
  width: 100%;
  border: 1px solid #d4e0e5;
  border-radius: 8px;
  background: #fff;
  color: #173148;
  padding: 11px;
  font:
    500 14px/1.5 Inter,
    system-ui,
    sans-serif;
  resize: vertical;
}
.ih-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

@media (max-width: 1450px) {
  .ih-account-row {
    grid-template-columns:
      minmax(200px, 1.5fr) 90px 88px minmax(190px, 1.15fr)
      minmax(260px, 1.2fr);
  }
  .ih-account-row > div:nth-child(5) {
    display: none;
  }
  .ih-account-row > div:nth-child(6) {
    grid-column: 5;
  }
  .ih-account-row-head > div:nth-child(5) {
    display: none;
  }
  .ih-account-row-head > div:nth-child(6) {
    grid-column: 5;
  }
}
@media (max-width: 1250px) {
  .ih-account-row {
    grid-template-columns:
      minmax(190px, 1.4fr) 88px minmax(180px, 1.1fr)
      minmax(245px, 1.2fr);
  }
  .ih-account-row > div:nth-child(2),
  .ih-account-row-head > div:nth-child(2) {
    display: none;
  }
  .ih-account-row > div:nth-child(6),
  .ih-account-row-head > div:nth-child(6) {
    grid-column: 4;
  }
  .ih-account-actions {
    gap: 5px;
  }
  .ih-account-actions .ih-button {
    padding-inline: 9px;
  }
}
@media (max-width: 1060px) and (min-width: 1001px) {
  .ih-account-row {
    grid-template-columns:
      minmax(175px, 1.35fr) 82px minmax(168px, 1fr)
      minmax(220px, 1.15fr);
  }
  .ih-account-actions {
    flex-wrap: wrap;
  }
  .ih-account-actions .ih-button {
    flex: 1 0 calc(50% - 5px);
  }
}
@media (max-width: 1000px) {
  .ih-share-settings {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 16px;
  }
  .ih-share-icon {
    width: 40px;
    height: 40px;
  }
  .ih-share-field {
    grid-column: 1 / -1;
  }
  .ih-share-input {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .ih-share-input input {
    width: 100%;
  }
  .ih-save-row {
    align-items: stretch;
    flex-direction: column;
  }
  .ih-head {
    margin-bottom: 10px;
  }
  .ih-section-head {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 16px;
  }
  .ih-section-actions {
    width: 100%;
  }
  .ih-section-actions .ih-button {
    flex: 1;
    min-height: 44px;
  }
  .ih-account-surface {
    border-radius: 8px;
  }
  .ih-provider-tabs {
    padding: 8px 8px 0;
  }
  .ih-provider-tabs button {
    min-height: 44px;
  }
  .ih-account-tools {
    display: grid;
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .ih-account-tools input {
    max-width: none;
    min-width: 0;
  }
  .ih-account-tools input,
  .ih-account-tools select {
    width: 100%;
    height: 44px;
  }
  .ih-account-table {
    display: grid;
    gap: 10px;
    padding: 10px;
    background: #f6f8f9;
  }
  .ih-account-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 11px;
    min-height: 0;
    padding: 16px;
    border: 1px solid #dce6eb;
    border-radius: 8px;
    background: #fff;
  }
  .ih-account-row.ih-account-row-head {
    display: none;
  }
  .ih-account-row > div,
  .ih-account-row > div:first-child,
  .ih-account-row > div:last-child {
    padding: 0;
  }
  .ih-account-identity {
    grid-column: 1;
    grid-row: 1;
  }
  .ih-account-identity strong {
    font-size: 15px;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .ih-mobile-meta {
    display: block;
    margin-top: 5px;
    color: #6c818d !important;
    font-size: 12px;
  }
  .ih-provider,
  .ih-status {
    display: none;
  }
  .ih-permissions {
    grid-column: 1;
    grid-row: 2;
    gap: 18px;
    padding: 12px 0 !important;
    border-block: 1px solid #edf1f3;
  }
  .ih-last-checked {
    display: block !important;
    grid-column: 1;
    grid-row: 3;
    align-self: center;
  }
  .ih-last-checked::before {
    content: "最近检查 ";
    color: #91a0a8;
  }
  .ih-account-actions {
    grid-column: 1;
    grid-row: 4;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .ih-account-actions .ih-button {
    min-height: 44px;
  }
  .ih-pager {
    align-items: stretch;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 14px 12px;
  }
  .ih-pager-summary {
    width: 100%;
    margin: 0;
  }
  .ih-page-buttons {
    order: 3;
  }
  .ih-page-jump {
    order: 4;
  }
  .ih-dialog-card {
    padding: 20px;
  }
  .ih-dialog-actions .ih-button {
    min-height: 44px;
    flex: 1;
  }
}
@media (max-width: 390px) {
  .ih-pager {
    gap: 9px;
  }
  .ih-page-buttons
    .ih-page-button:not(:first-child):not(:last-child):not(.active) {
    display: none;
  }
  .ih-page-jump {
    margin-left: auto;
  }
  .ih-section-copy {
    font-size: 13px;
  }
}
