[hidden] { display: none !important; }
.topbar > #back-to-mail-btn { margin-left: 0; }
.topbar > .system-monitor { justify-content: flex-end; }
.topbar > .topbar-actions { flex: 0 0 auto; width: auto; flex-direction: row; align-items: center; }
.app-version { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 10px; border: 1px solid #e4e0ef; border-radius: 6px; background: #f3f0fa; color: #817099; font: 500 11px/1.5 "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.production-error { color: #b45c72; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.production-note { color: #9793a8; font-size: 11px; line-height: 1.8; }
.production-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.production-actions .btn { margin: 0; }
.production-code { display: block; white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; background: #f7f5fc; border: 1px solid #e9e3f2; border-radius: 7px; color: #786c8b; font: 11px/1.8 Consolas, monospace; }
.production-field { display: grid; gap: 7px; margin: 15px 0; font-size: 12px; color: #858197; min-width: 0; }
.production-field .text-field { width: 100%; min-width: 0; margin: 0; }
.production-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; }
.production-checkbox { display: flex; gap: 8px; align-items: center; font-size: 11px; line-height: 1.8; color: #8a8299; margin-top: 12px; }
.production-checkbox input { accent-color: var(--purple); }
.production-result { display: block; min-height: 38px; font-size: 28px; color: #7864bd; letter-spacing: 5px; padding: 15px; background: #f5f1fd; border-radius: 8px; margin: 18px 0; overflow-wrap: anywhere; }
.production-key-list { max-height: 160px; overflow-y: auto; margin-bottom: 12px; }
.production-key-select { width: 100%; }
.reader-plain { font: 13px/1.9 "Segoe UI", "Microsoft YaHei", sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; margin: 16px 0; }
#reader.reader-modal { width: min(980px, 100%); }
.reader .reader-toolbar { flex-wrap: wrap; height: auto; min-height: 58px; padding-block: 10px; gap: 10px; }
.reader .reader-content { min-width: 0; padding: 18px 24px 24px; }
.reader .reader-body { margin-top: 16px; min-width: 0; }
.reader-message-header { padding-bottom: 15px; border-bottom: 1px solid #efedf4; }
.reader-title-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 20px; min-width: 0; }
.reader .reader-title { flex: 1 1 auto; min-width: 0; max-width: 100%; margin: 0; font-size: 21px; line-height: 1.4; letter-spacing: -.3px; overflow-wrap: anywhere; }
.reader .reader-date { flex: 0 0 auto; align-self: auto; margin: 0; max-width: none; color: #9295a7; font-size: 11px; line-height: 1.5; white-space: nowrap; text-align: left; }
.reader-addresses { display: grid; gap: 5px; margin-top: 12px; }
.reader-address-line { display: grid; grid-template-columns: 51px minmax(0, 1fr); align-items: start; gap: 5px; font-size: 12px; line-height: 1.8; }
.reader-address-label { color: #9790a6; white-space: nowrap; }
.reader-address-value { min-width: 0; color: #625d70; overflow-wrap: anywhere; }
.reader-address-value strong { font-weight: 600; }
.reader-copy-address { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; width: 24px; height: 22px; margin-left: 5px; padding: 3px; border-radius: 4px; color: #8b79b8; white-space: nowrap; }
.reader-copy-address:hover { color: #7158bc; background: #f1ecfa; }
.reader-copy-address svg { width: 13px; height: 13px; }
.reader-body-toolbar { display: flex; gap: 4px; padding-bottom: 12px; }
.reader-view-button { padding: 7px 12px; border-radius: 6px; color: #93899f; font-size: 12px; }
.reader-view-button[aria-pressed="true"] { background: #f1ecfa; color: #7862ac; font-weight: 600; }
.reader-image-controls { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 7px; padding: 9px 12px; margin-bottom: 10px; border-radius: 6px; background: #f8f6fc; color: #92869e; font-size: 11px; }
.reader-image-controls .text-button { font-size: 11px; color: #8068ad; }
#reader-html-slot { width: 100%; min-width: 0; }
.reader-html { display: block; width: 100%; height: clamp(340px, 58dvh, 720px); border: 1px solid #ede9f5; border-radius: 6px; background: white; }
.reader .reader-toolbar-actions { flex-wrap: wrap; }
.reader .attachment-card { text-decoration: none; }
.reader .sender-email { overflow-wrap: anywhere; }
.dialog-body .production-actions { margin-bottom: 3px; }
.job-status { padding: 14px; background: #f7f4fc; border-radius: 7px; font-size: 12px; line-height: 1.9; color: #87739c; }
.settings-menu { z-index: 90; }
.dialog-card.settings-wide-dialog { width: min(960px, calc(100vw - 32px)); max-width: 960px; scroll-padding-top: 80px; }
.settings-wide-dialog .dialog-header { position: sticky; top: 0; z-index: 2; background: #fff; border-bottom: 1px solid #f2eef7; margin-bottom: 16px; }
.settings-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.settings-panel-heading .btn { margin-top: 0; }
.settings-switch { display: flex; align-items: center; gap: 12px; font-size: 12px; cursor: pointer; }
.settings-switch input, .limit-input input[type=checkbox] { appearance: none; width: 30px; height: 18px; border: 0; border-radius: 12px; background: #d8d2e3; flex: 0 0 auto; position: relative; cursor: pointer; transition: background .15s; }
.settings-switch input::after, .limit-input input[type=checkbox]::after { content: ""; position: absolute; width: 12px; height: 12px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #65577230; transition: transform .15s; }
.settings-switch input:checked, .limit-input input[type=checkbox]:checked { background: var(--purple); }
.settings-switch input:checked::after, .limit-input input[type=checkbox]:checked::after { transform: translateX(12px); }
.settings-switch strong { display: block; font-weight: 600; color: #625b75; }
.settings-switch small { display: block; margin-top: 4px; color: #928aa1; line-height: 1.7; font-size: 11px; }
.settings-status { background: #f6f3fb; padding: 11px 14px; color: #7b6a96; border-radius: 7px; font-size: 11px; line-height: 1.9; }
.settings-status .text-button { margin-left: 10px; color: #7962b5; }
.settings-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
.settings-table { border-collapse: collapse; width: 100%; font-size: 11px; line-height: 1.6; color: #776d86; }
.settings-table th, .settings-table td { text-align: left; padding: 12px 9px; border-bottom: 1px solid #eeebf3; vertical-align: middle; }
.settings-table thead th { color: #958ba4; font-size: 10px; font-weight: 500; background: #faf9fc; white-space: nowrap; }
.settings-table tbody th { font-weight: 500; color: #6b627a; }
.limits-table { min-width: 650px; }
.limit-input { display: flex; align-items: center; gap: 7px; }
.limit-input .text-field { width: 112px; min-width: 0; margin: 0; padding: 8px; }
.settings-state { display: inline-flex; padding: 3px 7px; border-radius: 5px; background: #f3f1f7; font-size: 10px; white-space: nowrap; }
.settings-state[data-state=ok] { background: #edf7f1; color: #54856c; }
.settings-state[data-state=pending] { background: #fff5e6; color: #a67c35; }
.settings-section { border-top: 1px solid #eae5f1; padding-top: 18px; margin-top: 24px; }
.settings-section h3 { font-size: 13px; font-weight: 600; color: #655b77; margin: 0 0 8px; }
.storage-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.storage-cards > div { display: grid; gap: 9px; padding: 16px; background: #faf8fd; border: 1px solid #ece7f3; border-radius: 9px; }
.storage-cards span { font-size: 11px; color: #94879e; }
.storage-cards strong { font-size: 17px; font-weight: 600; color: #6c5985; overflow-wrap: anywhere; }
.storage-cards small { font-size: 10px; line-height: 1.7; color: #9b91a5; }
.storage-facts { display: flex; flex-wrap: wrap; gap: 7px 20px; font-size: 10px; color: #91859e; line-height: 1.8; margin: 14px 0; }
.storage-facts strong { font-weight: 500; color: #786c87; }
.storage-table-details { font-size: 11px; color: #8e80a1; }
.storage-table-details summary { cursor: pointer; padding-block: 9px; }
.settings-confirm { margin-top: 18px; border: 1px solid #ead3db; background: #fdf6f8; border-radius: 8px; padding: 16px; color: #a26679; font-size: 12px; line-height: 1.8; }
.api-page .api-fields { display: grid; grid-template-columns: 1fr 1fr; }
.api-page .api-fields .production-field { margin-top: 0; }
.api-page .api-tool-body .production-field:first-child { margin-top: 0; }
.bl-form-message:empty { display: none; }
.mail-row.is-checked { background: #f8f5ff; }
.mail-row button:disabled { opacity: .6; cursor: wait; }
.account-form-note code { font-size: 10px; }
.production-boot { padding: 32px; font-size: 14px; color: #817692; }
.mobile-mail-filters { display: none; }
button:disabled { cursor: not-allowed; }
@media (max-width: 700px) {
  .dialog-card.settings-wide-dialog { width: calc(100vw - 20px); }
  .storage-cards { grid-template-columns: 1fr; }
  .storage-cards > div { gap: 5px; padding: 12px; }
  .settings-panel-heading { align-items: flex-start; }
  .limits-table, .limits-table tbody { display: block; min-width: 0; }
  .limits-table thead { display: none; }
  .limits-table tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; padding: 14px 0; border-bottom: 1px solid #eeebf3; }
  .limits-table tbody th { grid-column: 1 / -1; }
  .limits-table tbody th, .limits-table tbody td { display: block; border: 0; padding: 0; }
  .limits-table tbody td:nth-child(2) { display: flex; align-items: center; justify-content: space-between; grid-column: 1 / -1; }
  .limits-table tbody td::before { display: block; color: #a297ae; font-size: 10px; margin-bottom: 4px; }
  .limits-table tbody td:nth-child(2)::before { content: "本次设置"; margin: 0; }
  .limits-table tbody td:nth-child(3)::before { content: "已保存"; }
  .limits-table tbody td:nth-child(4)::before { content: "实际运行"; }
  .limits-table tbody td:nth-child(5)::before { content: "状态"; }
  .topbar > .topbar-actions { order: 1; margin-left: auto; }
  .topbar > .system-monitor { order: 2; flex-basis: 100%; }
  .topbar > #back-to-mail-btn { order: 3; }
  .production-grid, .api-page .api-fields { grid-template-columns: 1fr; }
  .reader .reader-content { padding: 15px 14px; }
  .reader .reader-toolbar { padding-inline: 12px; }
  .reader .reader-toolbar-actions { gap: 5px; margin-left: auto; }
  .reader .reader-toolbar-actions .text-button { font-size: 10px; }
  .reader .reader-title { font-size: 18px; }
  .reader .reader-date { font-size: 10px; }
  .reader-address-line { grid-template-columns: 49px minmax(0, 1fr); gap: 4px; font-size: 11px; }
  .reader-html { height: clamp(360px, 60dvh, 650px); }
  .mobile-mail-filters { display: flex; padding: 0 14px 12px; gap: 8px; min-width: 0; }
  .mobile-mail-filters label { flex: 1; min-width: 0; }
  .mobile-mail-filters select { width: 100%; min-width: 0; padding: 7px; border: 1px solid #e7e3f0; border-radius: 6px; color: #8d859f; background: white; font-size: 10px; }
}
