:root {
  font-family: Inter, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #252b29; background: #fafbfa; font-synthesis: none;
  --green: #146c55; --green-dark: #105441; --green-light: #e8f2ec;
  --line: #e5e9e6; --muted: #858c88; --text-soft: #626c65;
}
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; font-size: 14px; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
button { border: 0; background: none; }
button, a, input, select, textarea { outline-offset: 4px; }
:focus-visible { outline: 2px solid #219775; }
svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.7; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 244px; flex-shrink: 0; background: #f1f4f1; border-right: 1px solid var(--line); padding: 32px 18px 0; display: flex; flex-direction: column; min-height: 100vh; position: fixed; inset: 0 auto 0 0; z-index: 20; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 12px 31px; font-size: 25px; font-weight: 700; width: fit-content; }
.brand-icon { width: 40px; height: 42px; display: inline-flex; align-items: center; justify-content: center; background: var(--green); color: #fff; border-radius: 8px; }
.brand-icon svg { width: 24px; height: 24px; }
.brand-en { display: block; font-size: 9px; line-height: 1.5; font-weight: 500; color: #747e78; }
.account-switch { border: 1px solid #dfe5df; background: #fcfdfc; border-radius: 6px; padding: 11px 10px; display: flex; align-items: center; text-align: left; gap: 9px; width: 100%; margin-bottom: 32px; }
.account-logo { width: 30px; height: 30px; border-radius: 5px; background: #fae8e4; color: #ad4538; display: grid; place-items: center; font: 700 11px "Segoe UI", sans-serif; flex-shrink: 0; }
.account-switch > span:nth-child(2) { min-width: 0; flex: 1; }
.account-switch strong { display: block; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 126px; }
.account-switch small { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
.account-switch > svg { width: 13px; color: #919b94; }
.nav-label { color: #939b94; font-size: 11px; margin: 0 13px 11px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 13px; min-height: 42px; width: 100%; text-align: left; border-radius: 5px; color: #657066; font-size: 13px; margin-bottom: 4px; transition: background .15s; }
.nav-item:hover { background: #e6ebe6; }
.nav-item.active { color: var(--green); font-weight: 600; background: #deebe1; }
.nav-item span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.nav-item b { font-size: 11px; font-weight: 500; }
.institution-label { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; margin-bottom: 4px; }
.institution-label .icon-button { width: 26px; height: 26px; }
.institution-nav-item { font-size: 12px; }
.institution-dot { width: 7px; height: 7px; border-radius: 2px; flex: 0 0 7px !important; margin: 0 5px; background: #518a74; }
.tone-1 { background: #d4a55a !important; }
.tone-2 { background: #6f92b0 !important; }
.tone-3 { background: #ae7e91 !important; }
.tone-4 { background: #8c9070 !important; }
.sidebar-empty { padding: 8px 13px; font-size: 12px; }
.sidebar-bottom { margin-top: auto; padding-top: 40px; }
.privacy-status { display: flex; align-items: center; gap: 9px; margin: 0 13px 20px; font-size: 11px; color: #839087; }
.privacy-status svg { width: 14px; height: 14px; }
.sidebar-bottom .nav-item { font-size: 12px; }
.sidebar-footer { border-top: 1px solid #dfe5df; display: flex; justify-content: space-between; color: #9aa29c; font-size: 10px; padding: 20px 12px; margin-top: 20px; }
.workspace { min-width: 0; width: calc(100% - 244px); margin-left: 244px; }
.topbar { height: 73px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 0 40px; background: #fff; gap: 15px; }
.breadcrumb { display: flex; align-items: center; gap: 16px; font-size: 12px; color: #949b96; min-width: 0; }
.breadcrumb > svg { width: 13px; height: 13px; }
.breadcrumb strong { color: #515a53; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; gap: 7px; align-items: center; font-size: 11px; color: #889189; flex-shrink: 0; }
.connection-dot, .small-dot { display: inline-block; width: 5px; height: 5px; background: #a3ada6; border-radius: 50%; }
.connection-dot.online { background: #489778; }
.connection-dot.busy { background: #c4983c; }
.avatar { background: #eef1ed; color: #657366; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; margin-left: 17px; font-size: 11px; border: 1px solid #e4e9e2; }
main { max-width: 1540px; margin: 0 auto; padding: 37px 40px 24px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.eyebrow { font-size: 10px; line-height: 1.6; font-weight: 600; color: #85938b; margin-bottom: 7px; }
h1 { font-size: 28px; line-height: 1.45; font-weight: 650; }
.page-heading p { font-size: 12px; color: #909790; margin-top: 8px; }
.heading-actions { display: flex; gap: 10px; align-items: center; padding-top: 14px; flex-shrink: 0; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 10px 15px; min-height: 39px; border-radius: 5px; font-size: 12px; font-weight: 500; white-space: nowrap; transition: background .15s; }
.button svg { width: 15px; height: 15px; }
.primary { background: var(--green); color: #fff; border: 1px solid var(--green); box-shadow: 0 1px 2px #0b3d2e0d; }
.primary:hover:not(:disabled) { background: var(--green-dark); }
.secondary { background: #fff; border: 1px solid #dce2dd; color: #5a665d; box-shadow: 0 1px 2px #15201a04; }
.secondary:hover:not(:disabled) { background: #f1f5f1; }
.icon-button { padding: 0; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; color: #879188; flex-shrink: 0; }
.icon-button svg { width: 16px; height: 16px; }
.icon-button:hover:not(:disabled) { background: #e9efe9; color: #445c4b; }
.text-button { display: inline-flex; gap: 5px; align-items: center; color: var(--green); font-size: 11px; padding: 5px 0; }
.text-button svg { width: 14px; height: 14px; }
.stats-band { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 24px 0; margin-bottom: 26px; }
.stat { padding: 0 24px; border-left: 1px solid var(--line); min-width: 0; }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat:last-child { padding-right: 0; }
.stat > span { display: flex; gap: 5px; justify-content: space-between; align-items: center; color: #828d85; font-size: 11px; }
.stat > span svg { width: 14px; height: 14px; color: #9ca89f; }
.stat strong { display: block; font-size: 29px; font-weight: 550; line-height: 1.25; margin-top: 14px; font-variant-numeric: tabular-nums; }
.stat small { display: block; color: #a0a8a1; font-size: 10px; margin-top: 7px; }
.sync-stat strong { font-size: 21px; padding-top: 7px; }
.code-strip { display: flex; gap: 20px; align-items: center; min-height: 98px; padding: 18px 23px; background: #eef5ef; border-left: 3px solid #73a989; margin-bottom: 34px; }
.code-strip-label { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.key-icon { width: 35px; height: 38px; color: #739a7e; display: grid; place-items: center; }
.key-icon svg { width: 25px; height: 25px; }
.code-strip-label > div { min-width: 0; }
.section-kicker { display: block; font-size: 10px; color: #84958a; margin-bottom: 7px; }
.code-strip-label strong { font-size: 13px; font-weight: 550; display: block; overflow-wrap: anywhere; }
.latest-value { display: flex; align-items: center; gap: 19px; padding: 0 32px; border-right: 1px solid #dce7dc; }
#latest-code { font: 500 29px/1.5 "Consolas", "SFMono-Regular", monospace; color: #285d3e; white-space: nowrap; }
.latest-meta { min-width: 94px; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.latest-meta > span { font-size: 11px; color: #8b998d; }
.mail-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
h2 { font-size: 19px; font-weight: 600; }
.mail-section-title h2 { font-size: 15px; }
.mail-section-title h2 span { background: #ecefeb; color: #6f7a71; font-size: 10px; padding: 2px 7px; border-radius: 4px; margin-left: 8px; font-weight: 400; }
.saved-label { display: flex; gap: 5px; align-items: center; color: #a0aaa2; font-size: 10px; }
.saved-label svg { width: 12px; height: 12px; }
.filterbar { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 19px; }
.search-field { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: #fff; padding: 0 12px; height: 37px; border-radius: 5px; width: min(360px,45%); }
.search-field svg { width: 15px; height: 15px; color: #98a39b; }
.search-field input { border: 0; outline: 0; background: none; width: 100%; min-width: 0; font-size: 11px; height: 100%; }
input::placeholder, textarea::placeholder { color: #a3aaa5; }
.filters { display: flex; gap: 9px; min-width: 0; }
.select-wrap { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; border-radius: 5px; padding: 0 9px; min-width: 0; }
.select-wrap svg { width: 13px; height: 13px; color: #98a39b; }
.select-wrap select { background: transparent; border: 0; height: 35px; font-size: 11px; padding: 0 16px 0 0; max-width: 145px; outline-offset: -2px; min-width: 0; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
thead { background: #f2f5f2; }
th { text-align: left; font-size: 10px; font-weight: 500; color: #89958c; padding: 12px 11px; border-bottom: 1px solid var(--line); }
th svg { width: 12px; height: 12px; }
.star-column { width: 37px; padding-left: 12px; padding-right: 0; }
.sender-column { width: 22%; }
.code-column { width: 112px; }
.date-column { width: 116px; }
td { padding: 18px 11px; border-bottom: 1px solid var(--line); height: 83px; font-size: 12px; }
td.star-cell { padding: 0 0 0 5px; }
.mail-row { cursor: pointer; background: #fff; }
.mail-row:hover { background: #f5f8f5; }
.mail-row:focus-visible { outline-offset: -2px; }
.sender-cell { display: flex; gap: 10px; align-items: center; min-width: 0; }
.sender-mark { width: 32px; height: 32px; border-radius: 6px; color: #4e7760; background: #edf3ed; font-size: 11px; font-weight: 650; display: grid; place-items: center; flex-shrink: 0; }
.sender-mark.color-1 { background: #f6f0e5; color: #9b814b; }
.sender-mark.color-2 { background: #eaf0f5; color: #5e7c96; }
.sender-mark.color-3 { background: #f4eaef; color: #9d6f87; }
.sender-mark.color-4 { background: #eff0e8; color: #85885c; }
.sender-text { min-width: 0; }
.sender-text strong { display: block; font-size: 11px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sender-text small { display: block; font-size: 9px; margin-top: 6px; color: #a1a9a3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subject-text { font-size: 12px; font-weight: 450; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; display: flex; align-items: center; gap: 7px; }
.subject-text > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.unread-dot { display: inline-block; width: 5px; height: 5px; background: #529572; border-radius: 50%; flex-shrink: 0; }
.unread .subject-text { font-weight: 600; color: #303e33; }
.preview { font-size: 10px; color: #a2aaa4; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code-pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 27px; max-width: 100%; padding: 4px 7px; border: 1px solid #e8e0cc; border-radius: 4px; color: #8b774b; background: #fbf7eb; font: 12px/1.4 "Consolas", monospace; overflow-wrap: anywhere; }
.code-pill svg { width: 10px; height: 10px; }
.code-pill:hover { background: #f1e9d3; }
.no-code { color: #c1c9c3; font-size: 11px; }
.date-primary { font-size: 10px; color: #7a877e; font-variant-numeric: tabular-nums; }
.date-secondary { font-size: 9px; color: #a5aea7; margin-top: 6px; font-variant-numeric: tabular-nums; }
.starred { color: #b99340 !important; }
.starred svg { fill: #f4eacb; }
.pagination { display: flex; align-items: center; justify-content: space-between; color: #99a29a; font-size: 10px; min-height: 62px; border-bottom: 1px solid var(--line); }
.pagination > div { display: flex; align-items: center; gap: 10px; }
.pagination .icon-button { width: 26px; height: 26px; }
#page-indicator { min-width: 37px; text-align: center; }
.empty-state { text-align: center; background: #fff; padding: 44px 20px 48px; }
.empty-icon { display: inline-flex; color: #8aab95; margin-bottom: 17px; }
.empty-icon svg { width: 34px; height: 34px; stroke-width: 1.2; }
.empty-state h3 { font-size: 15px; font-weight: 500; }
.empty-state p { font-size: 12px; color: #94a096; margin: 9px 0 19px; }
.main-footer { display: flex; align-items: center; justify-content: space-between; font-size: 9px; color: #a5afa7; margin-top: 20px; gap: 20px; }
.main-footer > span { overflow-wrap: anywhere; }
.main-footer .small-dot { margin-right: 5px; background: #a2b7a6; }
.sync-banner { background: #f0f6f0; border: 1px solid #d9e6dc; border-radius: 5px; padding: 12px 15px; font-size: 12px; margin: -15px 0 24px; color: #4c7057; line-height: 1.7; }
.sync-banner.error { background: #fbefec; color: #a45b4b; border-color: #f0dbd5; }
.sync-banner svg { vertical-align: -3px; margin-right: 8px; width: 14px; height: 14px; }
.spinning { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
dialog { border: 1px solid #dce3dd; padding: 0; background: #fff; border-radius: 8px; color: #303b32; box-shadow: 0 20px 70px #10271922; max-height: calc(100dvh - 40px); max-width: calc(100vw - 32px); }
dialog::backdrop { background: #142b2059; backdrop-filter: blur(3px); }
.auth-dialog { width: 420px; padding: 34px; }
.auth-brand { display: flex; align-items: center; gap: 11px; font-size: 25px; font-weight: 650; margin-bottom: 33px; }
.auth-dialog h2 { font-size: 23px; }
.dialog-description { font-size: 12px; color: #8b978e; line-height: 1.9; margin: 10px 0 24px; }
.field { display: flex; flex-direction: column; gap: 9px; font-size: 12px; color: #626f64; margin-bottom: 19px; }
.field input, .field textarea, .field select { width: 100%; min-width: 0; border: 1px solid #dce3dc; background: #fff; border-radius: 5px; padding: 11px 12px; font-size: 13px; outline-offset: 2px; }
.field textarea { resize: vertical; min-height: 65px; line-height: 1.7; }
.field small { color: #98a29a; font-size: 10px; line-height: 1.7; }
.full-width { width: 100%; }
.auth-note { display: flex; justify-content: center; align-items: center; gap: 7px; color: #a2ada4; font-size: 10px; margin-top: 22px; }
.auth-note svg { width: 12px; height: 12px; }
.form-error { font-size: 12px; line-height: 1.8; color: #b05c4b; margin: 12px 0; overflow-wrap: anywhere; }
.form-error:empty, .form-success:empty { display: none; }
.form-success { font-size: 12px; line-height: 1.8; color: #43855e; margin: 12px 0; }
.settings-dialog { width: 620px; }
.dialog-heading { padding: 24px 28px 21px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.dialog-heading .eyebrow { margin-bottom: 4px; }
.dialog-scroll { padding: 24px 28px; max-height: calc(100dvh - 240px); overflow-y: auto; }
.settings-section { padding: 0 0 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.settings-section:last-of-type { border: 0; margin-bottom: 0; padding-bottom: 0; }
.settings-section h3 { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.settings-section h3 svg { width: 15px; height: 15px; color: #8b9b8f; }
.password-field { position: relative; display: flex; }
.password-field input { padding-right: 42px; }
.password-field .icon-button { position: absolute; top: 6px; right: 6px; }
.server-info { font-size: 10px; color: #8d9d91; display: flex; gap: 14px; align-items: center; }
.server-info span { display: flex; align-items: center; gap: 4px; }
.server-info svg { width: 11px; height: 11px; }
.section-heading { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.rule-row { display: grid; grid-template-columns: 135px minmax(0,1fr) 26px; gap: 9px; margin: 0 0 15px; }
.rule-row .field { margin: 0; font-size: 10px; gap: 6px; }
.rule-row .field input, .rule-row .field textarea { font-size: 11px; padding: 9px; }
.rule-row .field textarea { min-height: 60px; }
.rule-row > .icon-button { margin-top: 22px; width: 26px; }
.rule-empty { color: #9aa59c; font-size: 12px; padding-bottom: 4px; }
.dialog-footer { border-top: 1px solid var(--line); padding: 18px 28px; display: flex; justify-content: flex-end; gap: 10px; background: #fcfdfb; }
.history-dialog { width: 460px; }
.history-summary { display: grid; grid-template-columns: 70px minmax(0,1fr); gap: 12px; font-size: 12px; color: #8e9c92; margin: 22px 0; }
.history-summary strong { color: #607164; font-weight: 500; overflow-wrap: anywhere; }
.folder-options { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: #748879; }
.folder-options label { display: inline-flex; gap: 4px; align-items: center; }
.folder-options input { accent-color: var(--green); }
.message-dialog { width: 800px; }
.message-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 15px 24px; border-bottom: 1px solid var(--line); background: #fbfcfa; }
.message-toolbar .section-kicker { margin: 0; }
.message-toolbar > div { display: flex; gap: 5px; align-items: center; }
.toolbar-divider { height: 18px; width: 1px; background: var(--line); margin: 0 8px; }
.message-content { padding: 30px; overflow-y: auto; max-height: calc(100dvh - 130px); }
.message-content h2 { font-size: 22px; line-height: 1.7; overflow-wrap: anywhere; margin: 15px 0 20px; }
.message-institution { display: flex; align-items: center; gap: 7px; color: #819c87; font-size: 11px; }
.message-institution svg { width: 13px; height: 13px; }
.message-metadata { display: grid; grid-template-columns: 56px minmax(0,1fr); font-size: 11px; line-height: 1.8; gap: 6px; padding-bottom: 25px; border-bottom: 1px solid var(--line); color: #849689; }
.message-metadata strong { color: #637a6a; font-weight: 400; overflow-wrap: anywhere; }
.message-codes { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 19px 0 0; }
.message-codes > span { font-size: 11px; color: #98a091; }
.message-codes .code-pill { font-size: 20px; padding: 6px 12px; gap: 14px; }
.message-codes .code-pill svg { width: 13px; height: 13px; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; font: 13px/2 "Segoe UI", "Microsoft YaHei", sans-serif; color: #5c6c61; margin: 27px 0 15px; }
.attachments { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 25px; }
.attachments h3 { font-size: 12px; font-weight: 500; margin-bottom: 12px; }
.attachment { display: flex; align-items: center; gap: 10px; padding: 13px 0; font-size: 12px; border-bottom: 1px solid #f0f3ef; color: #748b79; }
.attachment > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.attachment small { color: #a0ada3; font-size: 10px; white-space: nowrap; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: #263f30; color: #f5f9f3; border: 1px solid #314f3c; border-radius: 6px; padding: 12px 19px; font-size: 12px; max-width: calc(100vw - 32px); box-shadow: 0 6px 24px #10241920; z-index: 100; text-align: center; line-height: 1.6; pointer-events: none; }
.muted { color: var(--muted); }
.mobile-menu { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (min-width: 1600px) { main { padding-top: 44px; } td { height: 89px; } }
@media (max-width: 1150px) {
  .sidebar { width: 216px; padding-left: 12px; padding-right: 12px; }
  .workspace { margin-left: 216px; width: calc(100% - 216px); }
  .topbar { padding: 0 28px; }
  main { padding-left: 28px; padding-right: 28px; }
  .latest-value { padding: 0 16px; }
  .code-strip { gap: 14px; padding-left: 14px; padding-right: 14px; }
  .key-icon { display: none; }
  .sender-column { width: 23%; }
  .sender-mark { display: none; }
  .date-column { width: 92px; }
  .code-column { width: 96px; }
  .stat { padding: 0 17px; }
  .select-wrap select { max-width: 122px; }
}
@media (max-width: 900px) {
  .sidebar { width: 205px; }
  .workspace { margin-left: 205px; width: calc(100% - 205px); }
  main { padding: 26px 22px; }
  .topbar { padding: 0 22px; }
  .page-heading { align-items: flex-start; }
  .heading-actions { padding-top: 22px; gap: 7px; }
  .heading-actions .button { padding-left: 10px; padding-right: 10px; font-size: 11px; gap: 5px; }
  .stat { padding: 0 11px; }
  .stat > span { font-size: 10px; }
  .stat > span svg { display: none; }
  .sync-stat strong { font-size: 17px; padding-top: 10px; }
  .latest-meta { min-width: 75px; }
  .latest-value { padding: 0 10px; gap: 6px; }
  #latest-code { font-size: 25px; }
  .code-strip-label strong { font-size: 12px; }
  .filterbar { flex-wrap: wrap; gap: 9px; }
  .search-field { width: 100%; }
  .filters { width: 100%; }
  .select-wrap { flex: 1; }
  .select-wrap select { width: 100%; max-width: none; }
  td { padding: 16px 7px; }
  .code-column { width: 88px; }
  .date-column { width: 77px; }
  .star-column { width: 27px; }
  td.star-cell { padding-left: 0; }
  .star-cell .icon-button { width: 25px; }
}
@media (max-width: 700px) {
  .sidebar { transform: translateX(-100%); width: 244px; transition: transform .2s; z-index: 40; }
  .sidebar.open { transform: translateX(0); }
  .workspace { width: 100%; margin-left: 0; }
  .mobile-menu { display: inline-flex; margin-left: -6px; }
  .mobile-backdrop { position: fixed; inset: 0; background: #1a36254d; z-index: 30; }
  .topbar { height: 60px; padding: 0 20px; }
  .breadcrumb { gap: 10px; font-size: 11px; }
  .breadcrumb > span { display: none; }
  .breadcrumb > svg { display: none; }
  .topbar-right { font-size: 10px; }
  .avatar { margin-left: 7px; width: 27px; height: 27px; }
  main { padding: 24px 20px; }
  .eyebrow { font-size: 9px; }
  h1 { font-size: 25px; }
  .page-heading { flex-wrap: wrap; gap: 17px; margin-bottom: 24px; }
  .page-heading p { font-size: 11px; }
  .heading-actions { width: 100%; padding: 0; }
  .heading-actions .button { flex: 1; min-height: 39px; font-size: 12px; }
  .heading-actions .primary { flex: 1.25; }
  .stats-band { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 0; margin-bottom: 20px; row-gap: 0; }
  .stat { padding: 18px !important; }
  .stat:nth-child(odd) { padding-left: 0 !important; border-left: 0; }
  .stat:nth-child(even) { padding-right: 0 !important; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stat > span { font-size: 10px; }
  .stat > span svg { display: block; width: 13px; }
  .stat strong { font-size: 26px; margin-top: 10px; }
  .stat small { font-size: 9px; margin-top: 5px; }
  .sync-stat strong { font-size: 21px; padding-top: 6px; }
  .code-strip { flex-wrap: wrap; gap: 6px 10px; margin-bottom: 26px; padding: 16px 14px; }
  .code-strip-label { flex: 1; min-width: 100px; }
  .latest-value { padding: 0; border: 0; gap: 4px; }
  #latest-code { font-size: 26px; }
  .latest-meta { width: 100%; display: flex; flex-direction: row; justify-content: space-between; padding-top: 7px; margin-top: 5px; border-top: 1px solid #dfeadd; }
  .latest-meta > span { font-size: 10px; }
  .latest-meta .text-button { font-size: 10px; }
  .mail-section-title { margin-bottom: 15px; }
  .filterbar { margin-bottom: 14px; }
  .filters { gap: 8px; }
  .select-wrap { padding: 0 7px; }
  .select-wrap select { font-size: 10px; }
  .table-wrap table, .table-wrap tbody { display: block; }
  thead { display: none; }
  .mail-row { display: grid; grid-template-columns: 25px minmax(0,1fr) 91px; border-top: 1px solid var(--line); padding: 16px 0 13px; align-items: start; }
  .mail-row:last-child { border-bottom: 1px solid var(--line); }
  td { display: block; border: 0; padding: 0; height: auto; min-width: 0; }
  .star-cell { grid-column: 1; grid-row: 1; margin-top: -5px; }
  .sender-td { grid-column: 2; grid-row: 1; }
  .subject-td { grid-column: 2 / 4; grid-row: 2; margin-top: 10px; padding-right: 10px; }
  .code-td { grid-column: 3; grid-row: 3; text-align: right; margin-top: 10px; padding-right: 5px; }
  .date-td { grid-column: 2; grid-row: 3; display: flex; align-items: center; gap: 7px; margin-top: 13px; }
  .date-secondary { margin: 0; }
  .sender-text small { display: none; }
  .sender-text strong { font-size: 11px; }
  .subject-text { font-size: 12px; }
  .preview { font-size: 10px; }
  .code-pill { font-size: 11px; min-height: 23px; }
  .no-code { display: none; }
  .pagination { min-height: 56px; }
  .empty-state { padding: 35px 15px; border-top: 1px solid var(--line); }
  .main-footer { font-size: 8px; }
  .dialog-heading { padding: 20px; }
  .dialog-scroll { padding: 20px; max-height: calc(100dvh - 215px); }
  .dialog-footer { padding: 16px 20px; }
  .dialog-footer .button { font-size: 11px; padding: 10px; }
  .auth-dialog { padding: 28px; }
  .rule-row { grid-template-columns: minmax(0,1fr) 26px; }
  .rule-row .field:first-child { grid-column: 1; }
  .rule-row .field:nth-child(2) { grid-column: 1; grid-row: 2; }
  .rule-row > .icon-button { grid-column: 2; grid-row: 1; }
  .message-content { padding: 22px; }
  .message-content h2 { font-size: 19px; }
  .message-metadata { font-size: 10px; }
  .message-toolbar { padding: 12px 17px; }
  .attachment { flex-wrap: wrap; }
  .toast { bottom: 20px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
