* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--yy-primary); }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.3; letter-spacing: -.4px; }
h2 { font-size: 19px; line-height: 1.4; }
h3 { font-size: 15px; }
h4 { font-size: 13px; margin: 16px 0 8px; }
input, textarea { width: 100%; min-width: 0; border: 1px solid #bccbd5; border-radius: 8px; background: #fff; color: var(--yy-ink); padding: 10px 12px; min-height: 44px; }
textarea { resize: vertical; }
input::placeholder { color: #7b8d98; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--yy-danger); }
button, input, textarea { -webkit-tap-highlight-color: transparent; }
.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; }
.skip-link { position: fixed; top: 8px; left: 8px; transform: translateY(-160%); background: white; padding: 10px 14px; z-index: 20; border-radius: 8px; }
.skip-link:focus { transform: translateY(0); }
.site-header { background: var(--yy-nav); color: white; }
.header-inner { max-width: 1408px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-name, .brand-product { display: block; }
.brand-name { font-size: 17px; font-weight: 650; letter-spacing: 2px; }
.brand-product { color: var(--yy-nav-muted); font-size: 12px; margin-top: 2px; }
.session-tools { display: flex; align-items: center; gap: 18px; font-size: 13px; }
#session-user { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-button { background: transparent; border: 1px solid #5d7585; color: #fff; border-radius: 8px; min-height: 40px; padding: 8px 14px; }
.site-header :focus-visible { outline-color: #b4e2f5 !important; }
main { max-width: 1408px; padding: 30px 24px 0; margin: 0 auto; }
.boot-screen { text-align: center; color: var(--yy-muted); padding: 100px 0; }
.eyebrow { font-size: 11px; font-weight: 650; color: var(--yy-muted); letter-spacing: 1.2px; margin-bottom: 7px; }
.muted, .intro-copy { color: var(--yy-muted); }
.small { font-size: 12px; line-height: 1.6; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 9px 16px; border: 1px solid #bfcfd8; border-radius: 8px; background: white; color: var(--yy-ink); font-size: 13px; font-weight: 550; white-space: nowrap; }
.button:hover:enabled { background: #edf3f6; }
.button.primary { background: var(--yy-primary); color: white; border-color: var(--yy-primary); }
.button.primary:hover:enabled { background: var(--yy-primary-hover); }
.button.danger { color: var(--yy-danger); border-color: #dbb4b4; }
.button.danger:hover:enabled { background: #fff0ef; }
.button.compact { min-height: 36px; padding: 6px 12px; font-weight: 500; }
.text-button { color: var(--yy-primary); background: none; border: 0; min-height: 36px; padding: 7px 0 7px 12px; font-size: 13px; }
.icon-button { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; font-size: 26px; line-height: 1; color: var(--yy-muted); background: transparent; border: 0; border-radius: 8px; }
.icon-button:hover:enabled { background: #edf3f6; }
.login-screen { max-width: 1000px; margin: 60px auto 80px; display: grid; grid-template-columns: 1fr 400px; gap: 90px; align-items: start; }
.login-intro { padding-top: 20px; }
.login-intro h1 { font-size: 34px; margin: 12px 0 16px; }
.login-intro > p:last-of-type { color: var(--yy-muted); font-size: 15px; line-height: 1.8; }
.login-scope { margin-top: 44px; padding-left: 18px; border-left: 3px solid #c9dce5; }
.login-scope strong { font-size: 14px; }
.login-scope p { margin-top: 8px; color: var(--yy-muted); font-size: 13px; line-height: 1.8; }
.login-form { background: white; border: 1px solid var(--yy-border); border-radius: 12px; padding: 30px; box-shadow: 0 8px 28px #19364507; }
.login-form h2 { margin-bottom: 24px; }
.login-form > label { display: block; font-weight: 550; margin: 18px 0 7px; }
.login-form > .button { width: 100%; margin: 26px 0 14px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.intro-copy { margin-top: 8px; font-size: 13px; }
.notice { padding: 12px 16px; border: 1px solid #c8dce7; border-radius: 8px; color: #245e7d; background: #edf6fa; margin: 14px 0; overflow-wrap: anywhere; }
.notice[data-kind="error"], .danger-notice { color: var(--yy-danger); background: #fff3f1; border-color: #edd0cb; }
.notice[data-kind="warning"] { color: var(--yy-warning); background: #fff8e9; border-color: #ebddbc; }
.notice[data-kind="success"] { color: var(--yy-success); background: #eef7f3; border-color: #cde3da; }
.feed-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 18px; color: var(--yy-muted); font-size: 12px; }
.feed-bar > div { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.feed-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--yy-success); flex-shrink: 0; }
.feed-dot.warning { background: var(--yy-warning); }
.server-clock { color: #72838f; padding-left: 10px; border-left: 1px solid var(--yy-border); font-variant-numeric: tabular-nums; }
.overview { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--yy-border); border-radius: 12px; background: white; margin-bottom: 26px; }
.overview > div { padding: 19px 24px; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; }
.overview > div + div { border-left: 1px solid var(--yy-border); }
.overview span { color: var(--yy-muted); font-size: 13px; }
.overview strong { font-size: 30px; font-weight: 600; line-height: 1.3; grid-row: span 2; font-variant-numeric: tabular-nums; }
.overview small { font-size: 11px; color: #7b8d98; margin-top: 4px; }
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--yy-border); margin-bottom: 22px; }
.tab { min-height: 43px; background: none; border: 0; border-bottom: 2px solid transparent; padding: 6px 2px 14px; color: var(--yy-muted); font-size: 14px; }
.tab.active { color: var(--yy-primary); border-bottom-color: var(--yy-primary); font-weight: 600; }
.list-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.search-field { width: min(100%, 420px); }
.search-field span { display: block; font-size: 12px; font-weight: 550; margin-bottom: 6px; }
.search-field input { background: #fff; min-height: 42px; font-size: 13px; }
#search-count { padding-bottom: 10px; white-space: nowrap; }
.cards-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.cards-layout.has-detail { grid-template-columns: minmax(0, 1fr) 374px; }
.list-panel { background: white; border: 1px solid var(--yy-border); border-radius: 12px; min-width: 0; overflow: hidden; }
.cards-table { border-collapse: collapse; width: 100%; table-layout: fixed; }
.cards-table th { color: var(--yy-muted); font-size: 11px; font-weight: 550; padding: 14px 16px; text-align: left; background: #f9fbfc; border-bottom: 1px solid var(--yy-border); }
.cards-table th:nth-child(1) { width: 22%; }
.cards-table th:nth-child(2) { width: 24%; }
.cards-table th:nth-child(3) { width: 24%; }
.cards-table th:nth-child(4) { width: 21%; }
.cards-table th:nth-child(5) { width: 9%; padding-left: 0; padding-right: 8px; }
.cards-table td { padding: 19px 16px; border-bottom: 1px solid #e8edf0; vertical-align: top; overflow-wrap: anywhere; }
.cards-table tr:last-child td { border-bottom: 0; }
.cards-table tr.selected { background: #f1f7fa; }
.card-row-name { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; overflow-wrap: anywhere; }
.card-row-holder { display: block; color: var(--yy-muted); font-size: 12px; }
.card-row-id { display: block; font-size: 11px; line-height: 1.6; }
.card-row-terminal { margin-top: 4px; color: var(--yy-muted); }
.badge { display: inline-flex; align-items: center; border-radius: 5px; font-size: 11px; font-weight: 500; padding: 4px 7px; background: #edf1f4; color: #587181; line-height: 1.5; }
.badge.success { background: #eaf5f0; color: var(--yy-success); }
.badge.warning { background: #fff3dc; color: var(--yy-warning); }
.row-permission { display: block; margin-bottom: 5px; font-size: 11px; color: var(--yy-muted); }
.row-time { font-size: 12px; line-height: 1.7; }
.row-age { display: block; color: var(--yy-muted); font-size: 11px; }
.row-view { background: none; border: 0; color: var(--yy-primary); min-height: 36px; padding: 0; font-size: 12px; }
.cards-table td:last-child { padding-left: 0; padding-right: 8px; }
.empty-state { text-align: center; padding: 64px 24px; color: var(--yy-muted); }
.empty-state h2, .empty-state h3 { color: var(--yy-ink); font-size: 17px; }
.empty-state p { margin: 9px auto 20px; max-width: 420px; font-size: 13px; line-height: 1.8; }
.empty-mark { display: grid; place-items: center; margin: 0 auto 18px; height: 50px; width: 50px; color: #8ca7b7; border: 1px solid #dce7ed; border-radius: 50%; font-size: 27px; }
.detail-panel { border: 1px solid #c9dae4; background: white; border-radius: 12px; padding: 22px; min-width: 0; }
.panel-heading, .dialog-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-heading { align-items: flex-start; margin-bottom: 14px; }
.panel-heading h2 { overflow-wrap: anywhere; }
dl { margin: 0; }
dl > div { display: grid; gap: 10px; align-items: start; }
dt { color: var(--yy-muted); font-size: 12px; }
dd { margin: 0; font-size: 12px; min-width: 0; overflow-wrap: anywhere; }
.identity-details { margin: 20px 0; }
.identity-details > div { grid-template-columns: 104px minmax(0, 1fr); margin: 9px 0; }
.state-trio { border: 1px solid var(--yy-border); border-radius: 8px; padding: 4px 12px; }
.state-trio > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 12px; }
.state-trio > div + div { border-top: 1px solid #edf1f3; }
.state-trio span { color: var(--yy-muted); }
.state-trio strong { font-weight: 550; text-align: right; }
.callout { padding: 11px 12px; background: #f2f6f8; border-radius: 8px; color: #576e7c; font-size: 12px; line-height: 1.7; margin-top: 14px; }
.detail-section { padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--yy-border); }
.detail-section h3 { margin-bottom: 12px; }
.section-heading h3 { margin-bottom: 0; }
.profile-details, .receipt-details { margin-top: 12px; margin-bottom: 10px; }
.profile-details > div, .receipt-details > div { grid-template-columns: 74px minmax(0, 1fr); margin: 10px 0; }
.telemetry { background: #f7f9fa; border-radius: 8px; display: grid; grid-template-columns: 1fr 1fr; margin-top: 16px; padding: 12px; gap: 12px; }
.telemetry span { color: var(--yy-muted); font-size: 11px; }
.telemetry strong { display: block; margin-top: 4px; color: #667f8e; font-size: 12px; font-weight: 500; }
.protocol-details { margin-top: 20px; border-top: 1px solid var(--yy-border); padding-top: 16px; }
.protocol-details summary { cursor: pointer; color: var(--yy-primary); font-size: 12px; }
.counter-line { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; padding: 7px 0; border-bottom: 1px solid #edf1f4; }
.counter-line span { color: var(--yy-muted); }
.message-history { padding-left: 18px; color: var(--yy-muted); font-size: 11px; }
.message-history li { padding: 5px 0; }
.access-footer { border-top: 1px solid var(--yy-border); margin-top: 20px; padding-top: 20px; }
.access-footer .button { width: 100%; }
.access-footer p { margin-top: 10px; }
.audit-panel { padding: 24px; background: white; border: 1px solid var(--yy-border); border-radius: 12px; }
.audit-panel .section-heading { align-items: start; }
.audit-panel h2 + p { margin-top: 5px; }
.audit-list { list-style: none; padding: 0; margin: 20px 0 0; }
.audit-item { display: grid; grid-template-columns: 172px minmax(0, 1fr) 80px; gap: 24px; padding: 18px 0; border-top: 1px solid #e7edf1; font-size: 13px; }
.audit-item time { color: var(--yy-muted); font-size: 12px; }
.audit-item strong { display: block; font-weight: 550; }
.audit-item p { font-size: 12px; color: var(--yy-muted); margin-top: 5px; overflow-wrap: anywhere; }
.audit-result { text-align: right; color: var(--yy-muted); font-size: 12px; }
.audit-result.success { color: var(--yy-success); }
.audit-result.failure { color: var(--yy-danger); }
.load-more { text-align: center; margin-top: 20px; }
.page-footer { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--yy-border); padding: 22px 0 26px; margin-top: 40px; color: #7c8e9a; font-size: 11px; }
.management-dialog { padding: 0; width: min(610px, calc(100vw - 40px)); max-height: calc(100dvh - 48px); border: 1px solid #cfdae1; border-radius: 12px; color: var(--yy-ink); box-shadow: 0 20px 80px #152c3a2b; }
.management-dialog::backdrop { background: #142b3d66; }
.management-dialog > form { display: flex; flex-direction: column; max-height: calc(100dvh - 50px); }
.small-dialog { width: min(480px, calc(100vw - 40px)); }
.dialog-heading { padding: 22px 24px 18px; border-bottom: 1px solid var(--yy-border); flex-shrink: 0; }
.dialog-body { padding: 20px 24px; overflow-y: auto; overscroll-behavior: contain; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--yy-border); background: #fbfcfd; flex-shrink: 0; }
.form-message { background: #fff3f1; border: 1px solid #edcfca; border-radius: 8px; padding: 11px 12px; color: var(--yy-danger); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.form-message[data-kind="warning"] { color: var(--yy-warning); background: #fff8e9; border-color: #e7d9b8; }
.form-message[data-kind="success"] { color: var(--yy-success); background: #eef7f3; border-color: #cde3da; }
.form-message + fieldset, .form-message + .callout { margin-top: 18px; }
fieldset { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
fieldset:last-child { margin-bottom: 0; }
legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field label { font-size: 13px; font-weight: 500; }
.field small { font-size: 11px; line-height: 1.7; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.required { font-size: 10px; color: var(--yy-muted); background: #eef2f5; border-radius: 3px; padding: 2px 4px; margin-left: 4px; font-weight: 400; }
.checkbox-field { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; line-height: 1.7; padding: 6px 0; }
.checkbox-field input { flex: 0 0 17px; min-height: 17px; height: 17px; width: 17px; margin: 2px 0 0; accent-color: var(--yy-primary); }
.field-error { color: var(--yy-danger); font-size: 11px; }
.revision-review { background: #f1f7fa; border: 1px solid #cadfe9; border-radius: 8px; padding: 14px; }
.revision-review h3 { margin-bottom: 12px; }
.revision-review dl > div { grid-template-columns: 65px minmax(0, 1fr); margin: 7px 0; }
.revision-review p { margin: 12px 0; }
.target-name { font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
#access-terminal { font-size: 12px; margin-top: 5px; }
#access-effect { margin-top: 22px; line-height: 1.8; }
#access-message { margin-bottom: 18px; }
@media (max-width: 1200px) { .cards-layout.has-detail { grid-template-columns: minmax(0, 1fr); } .detail-panel { max-width: 720px; } }
@media (max-width: 760px) {
  main { padding: 24px 16px 0; }
  .header-inner { padding: 14px 16px; }
  .session-tools { gap: 8px; }
  #session-user { max-width: 95px; font-size: 11px; }
  .header-button { min-height: 44px; padding: 8px 10px; font-size: 12px; }
  .brand-name { font-size: 15px; letter-spacing: 1px; }
  .brand-product { font-size: 11px; }
  .brand { gap: 9px; }
  h1 { font-size: 26px; }
  .button, .button.compact, .text-button, .tab, .row-view { min-height: 44px; }
  .login-screen { margin: 12px auto 40px; grid-template-columns: 1fr; gap: 24px; max-width: 440px; }
  .login-intro { padding: 0; }
  .login-intro h1 { font-size: 28px; margin: 8px 0 12px; }
  .login-scope { margin-top: 24px; }
  .login-form { padding: 24px; }
  .page-heading { gap: 12px; align-items: flex-start; }
  .page-heading > .button { padding: 10px 12px; font-size: 12px; margin-top: 8px; }
  .intro-copy { line-height: 1.7; max-width: 210px; }
  .feed-bar { align-items: flex-start; }
  .feed-bar > div { row-gap: 4px; padding-top: 3px; }
  .server-clock { display: block; width: 100%; padding: 0 0 0 15px; border: 0; font-size: 10px; }
  .overview { margin-bottom: 22px; }
  .overview > div { display: flex; flex-direction: column; align-items: flex-start; padding: 14px 12px; gap: 8px; }
  .overview span { font-size: 11px; min-height: 33px; }
  .overview strong { font-size: 27px; }
  .overview small { font-size: 10px; line-height: 1.6; margin-top: 0; }
  .list-toolbar { flex-direction: column; align-items: stretch; gap: 6px; }
  .search-field { width: 100%; }
  #search-count { padding-bottom: 3px; }
  .list-panel { background: transparent; border: 0; border-radius: 0; overflow: visible; }
  .cards-table, .cards-table tbody { display: block; width: 100%; }
  .cards-table thead { display: none; }
  .cards-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; border: 1px solid var(--yy-border); border-radius: 10px; background: white; padding: 17px; margin-bottom: 12px; position: relative; }
  .cards-table tr.selected { border-color: #88b3c9; background: #f6fafc; }
  .cards-table td, .cards-table td:last-child { display: block; padding: 0; border: 0; }
  .cards-table td:nth-child(1) { grid-column: 1; padding-right: 12px; }
  .cards-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; padding-top: 14px; margin-top: 14px; border-top: 1px solid #edf1f4; }
  .cards-table td:nth-child(3) { grid-column: 1 / -1; grid-row: 3; padding-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
  .cards-table td:nth-child(4) { grid-column: 1 / -1; grid-row: 4; padding-top: 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .cards-table td:nth-child(4)::before { content: "最近收件"; font-size: 11px; color: var(--yy-muted); }
  .cards-table td:nth-child(5) { grid-column: 2; grid-row: 1; align-self: start; }
  .card-row-id { display: inline-block; margin-right: 12px; font-size: 11px; }
  .card-row-terminal { margin-top: 3px; }
  .row-permission { margin-bottom: 0; }
  .row-view { margin-top: -8px; padding-left: 8px; }
  .row-age { display: inline; margin-left: 7px; }
  .empty-state { border: 1px solid var(--yy-border); border-radius: 12px; background: white; padding: 48px 20px; }
  .detail-panel { padding: 20px; }
  .detail-panel .icon-button { height: 44px; width: 44px; }
  .audit-panel { padding: 20px 16px; }
  .audit-item { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 16px 0; }
  .audit-item time { grid-column: 1 / -1; font-size: 11px; }
  .audit-item > div:nth-child(2) { grid-column: 1; }
  .audit-result { grid-column: 2; }
  .page-footer { flex-direction: column; gap: 8px; margin-top: 30px; line-height: 1.8; }
  .management-dialog, .small-dialog { width: 100%; height: 100dvh; max-height: 100dvh; max-width: none; margin: 0; border: 0; border-radius: 0; }
  .management-dialog > form { height: 100%; max-height: 100dvh; }
  .dialog-heading { padding: 18px 20px; }
  .dialog-heading .icon-button { min-height: 44px; min-width: 44px; }
  .dialog-body { padding: 20px; flex: 1 1 auto; }
  .dialog-actions { padding: 14px 20px max(14px, env(safe-area-inset-bottom)); gap: 8px; }
  .dialog-actions .button { flex: 1 1 auto; padding: 10px 12px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .checkbox-field { min-height: 44px; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
