.subpage-trail nav, .subpage-heading, .monitor-freshness, .directory-top, .directory-group-head {
  display: flex;
  align-items: center;
}
.subpage-trail nav { gap: 12px; color: #5a6d82; font-size: .82rem; }
.subpage-trail nav a { color: inherit; text-decoration: none; }
.subpage-trail nav a:hover, .admin-store-link:hover { color: #2559ab; text-decoration: underline; }
.subpage-trail nav [aria-hidden] { color: #9caec1; }
.subpage-trail nav strong { color: #263b54; font-weight: 620; }
.subpage-heading { justify-content: space-between; gap: 18px; margin: 3px 0 26px; }
.subpage-heading h1, .access-form h1 {
  margin: 0; color: #162841; font-size: clamp(1.9rem, 3.2vw, 2.75rem);
  line-height: 1.23; letter-spacing: -.045em; font-weight: 730;
}
.subpage-heading p { margin: 9px 0 0; color: #5a6d82; font-size: .875rem; }
.subpage-heading .button, .directory-more, .management-module .button {
  font-size: .82rem; border-radius: 8px;
}
.monitor-freshness { flex-wrap: wrap; justify-content: flex-end; gap: 8px 14px; }
.monitor-freshness p { margin: 0; font-size: .78rem; }
.subpage-heading .button, .management-module .button-quiet {
  background: #fff; border: 1px solid #d4e0ec; color: #435773; min-height: 37px;
}
.subpage-heading .button:is(:hover,:focus-visible), .management-module .button-quiet:hover {
  border-color: #85a8d6; color: #2559ab; background: #f8fbff;
}
.monitor-metrics {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 27px;
}
.monitor-metric {
  --metric-tint: #e4efff; --metric-ink: #2559ab;
  display: grid; min-width: 0; min-height: 102px; padding: 15px clamp(12px,1.5vw,23px);
  grid-template-columns: minmax(0,1fr) auto; grid-template-rows: auto 1fr; align-content: center; align-items: center;
  gap: 2px 6px; border: 1px solid #d4e0ec; border-radius: 13px; background: #fff; text-align: left; color: #263b54;
}
.monitor-metric[data-state=healthy] { --metric-tint:#e4f6f1; --metric-ink:#0d7577; }
.monitor-metric[data-state=fault] { --metric-tint:#fff0de; --metric-ink:#98531f; }
.monitor-metric[data-state=unknown] { --metric-tint:#ecf1f7; --metric-ink:#58718b; }
.monitor-metric:is(:hover,:focus-visible) { border-color: var(--metric-ink); }
.monitor-metric[aria-pressed=true] {
  border-color: var(--metric-ink);
  box-shadow: inset 0 -3px var(--metric-ink);
}
.metric-glyph {
  grid-area:1/2/3; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px;
  background: var(--metric-tint); color: var(--metric-ink); align-self: start;
}
.metric-glyph .work-icon { width: 16px; height: 16px; }
.metric-label { color: #5a6d82; font-size: .78rem; }
.monitor-metric strong { font: 600 clamp(1.65rem,2.7vw,2.25rem)/1.2 "DM Sans", "Segoe UI", sans-serif; font-variant-numeric:tabular-nums; }
.monitor-directory, .management-module {
  min-width: 0; padding: clamp(16px, 2.1vw, 30px);
  border: 1px solid #d4e0ec; border-radius: 17px; background: #fff;
}
.directory-top { justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.directory-top h2, .admin-section .section-heading h2 {
  margin: 0; color: #162841; font-size: 1.28rem; line-height: 1.4; letter-spacing: -.025em;
}
.directory-search {
  width: min(285px,100%); display: flex; align-items: center; gap: 10px; padding: 0 12px;
  border: 1px solid #c9d6e2; border-radius: 8px; background: #f8fbff; color: #5a6d82;
}
.search-mark { position: relative; flex: none; width: 13px; height: 13px; border: 1.6px solid currentColor; border-radius: 50%; margin: 0 1px 2px 0; }
.search-mark::after { content: ""; position: absolute; width: 6px; height: 1.6px; border-radius: 3px; background: currentColor; right: -4px; bottom: -2px; transform: rotate(45deg); }
.directory-search:focus-within { outline: 2px solid #2563eb; outline-offset: 2px; }
.directory-search input { width: 100%; min-width: 0; height: 38px; padding: 0; border: 0; background: transparent; color: #162841; font-size:.85rem; }
.directory-search input:focus-visible { outline: none; }
.directory-group { margin-top: 15px; border-radius: 12px; border: 1px solid #d4e0ec; overflow: hidden; }
.directory-group-head { justify-content: space-between; gap: 12px; padding: 12px 16px; background: #f3f7fc; border-bottom: 1px solid #d4e0ec; }
.directory-group-head { background: linear-gradient(100deg,#eef5fc 0%,#f4fafb 85%); }
.directory-group-head h3 { margin: 0; color: #435773; font-size: .9rem; }
.directory-group-head span, .directory-time { color: #5a6d82; font-size: .78rem; }
.directory-table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: left; }
.directory-table th, .directory-table td { padding: 10px 16px; }
.directory-table thead th { color: #5a6d82; font-size: .73rem; font-weight: 500; border-bottom: 1px solid #e4edf6; }
.directory-table th:first-child { width: 42%; }
.directory-table th:nth-child(2) { width: 15%; }
.directory-table th:nth-child(3) { width: 18%; }
.directory-table tbody tr + tr { border-top: 1px solid #e4edf6; }
.directory-alias { overflow-wrap: anywhere; color: #263b54; font: 560 .84rem/1.5 "IBM Plex Mono", Consolas, monospace; }
.directory-table .model-status-badge { padding: 3px 8px; font-size: .72rem; }
.directory-rate { font-size: .86rem; font-variant-numeric: tabular-nums; }
.directory-time small { display: block; font-size: .72rem; }
.directory-more {
  display: block; width: 100%; padding: 9px 12px; background: #fff; color: #2559ab; border: 0; border-top: 1px solid #e4edf6; border-radius: 0;
}
.directory-more:hover { background: #f8fbff; }
.directory-more:focus-visible { outline-offset: -3px; }

.admin-store-link { color: #5a6d82; font-size: .82rem; text-decoration:none; }
.management-module { margin: 0; scroll-margin-top:75px; }
.management-module + .management-module { margin-top: 0; }
.management-module .section-heading { margin: 0 0 19px; gap: 10px; }
.management-module .section-heading p { margin-top: 6px; font-size: .83rem; }
.management-module .table-wrap { max-width: 100%; border-color: #d4e0ec; border-radius: 10px; }
.management-module .admin-table { font-size: .82rem; }
.management-module .admin-table thead th { background: #f3f7fc; color: #5a6d82; font-weight: 600; }
.management-module .admin-table th, .management-module .admin-table td { padding: 12px; }
.management-module .admin-table tbody td, .management-module .admin-table tbody th { border-color: #e4edf6; }
.management-module .admin-table tbody tr:hover td { background: #f8fbff; }
.management-module .admin-model-toolbar { padding: 13px 15px; margin: 0 0 17px; background: #f3f7fc; border: 1px solid #e4edf6; border-radius: 10px; }
.management-module .admin-model-toolbar .field { max-width: 350px; }
.record-search {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 9px;
  margin: 0 0 18px; padding: 15px; border: 1px solid #dce7f1; border-radius: 10px;
  background: linear-gradient(110deg, #f2f7fd, #f7fafc);
}
.record-search .field { flex: 1 1 260px; max-width: 420px; min-width: 0; color: #435773; font-size: .83rem; }
.record-search .button { min-height: 39px; }
.order-channel-check { margin-top: 18px; border-top: 1px solid #e4edf6; }
.order-channel-check summary { cursor: pointer; padding: 12px 0 3px; font-size: .85rem; color: #435773; }
.order-channel-check .record-search { margin: 9px 0; }
.orders-pager { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 12px; color: #5a6d82; font-size: .8rem; }
.order-actions .button { display: block; white-space: nowrap; }
.order-actions .button + .button { margin-top: 5px; }
.management-module .button.delete-order { color: #9a3b26; }
.management-module .button.delete-order:hover { border-color: #b45437; background: #fff7ed; }
.button.delete-confirm { color: #fff; background: #984026; border-color: #984026; }
.button.delete-confirm:hover { background: #78301b; }
.management-module .field input { border-color: #bacbdc; min-height: 39px; font-size: .86rem; }
.management-module .model-table-wrap { max-height: 65vh; }
.management-module .model-table-wrap thead { position: sticky; top: 0; z-index: 1; }
.management-module .pool-card { border-radius: 12px; border-color: #d4e0ec; }
.management-module .pool-card h3 { color: #263b54; }
.admin-content .admin-actions { gap: 9px; }
.admin-workspace .rail-foot { margin-top: auto; }

.access-content { display: grid; min-height: min(650px, calc(100vh - 110px)); align-items: center; }
.access-card {
  display: grid; grid-template-columns: minmax(145px,.86fr) 1fr; width: min(820px,100%); margin-inline: auto;
  border-radius: 18px; overflow: hidden; border: 1px solid #d4e0ec; background: white; box-shadow: 0 18px 48px #253d5a0a;
}
.access-art { position: relative; min-height: 430px; background: linear-gradient(150deg,#e0f5f8,#e4edfe); border-right: 1px solid #d4e0ec; }
.access-art img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: 72% 47%; }
.access-form { align-self: center; padding: clamp(24px,3vw,47px); min-width: 0; }
.access-lock { display:grid; place-items:center; width: 40px; height:40px; border-radius:12px; color: #2559ab; background: #e4efff; margin-bottom: 16px; }
.access-lock .work-icon { width:20px; height:20px; }
.access-form h1 { font-size: clamp(1.5rem,2.2vw,2rem); margin-bottom:24px; }
.access-form .form-grid { grid-template-columns: 1fr; gap: 16px; }
.access-form .field { color:#435773; font-size:.85rem; gap:6px; }
.access-form input { border-color:#bacbdc; }
.access-form form > .button {
  width:100%; margin-top:23px; border-color:#245ace; background:#2563df;
  color:white; border-radius:9px;
}
.access-form form > .button:hover { background:#1d4db7; }

@media (max-width: 1080px) {
  .monitor-metric { padding: 13px; }
  .metric-glyph { width: 25px; height: 25px; border-radius: 8px; }
  .directory-table th, .directory-table td { padding-inline: 10px; }
}
@media (max-width: 860px) {
  .subpage-heading { align-items: flex-start; flex-wrap: wrap; margin-bottom:20px; }
  .monitor-freshness { justify-content: flex-start; }
  .monitor-metrics { gap:8px; }
  .admin-workspace .admin-store-link { display:inline; }
}
@media (min-width: 861px) { .admin-workspace .admin-store-link { display: none; } }
@media (max-width: 600px) {
  .subpage-heading { gap: 12px; }
  .monitor-freshness { width:100%; justify-content:space-between; }
  .monitor-metrics { grid-template-columns: 1fr 1fr; margin-bottom:16px; }
  .monitor-metric { min-height:78px; }
  .monitor-directory, .management-module { padding: 14px; border-radius: 12px; }
  .directory-top { align-items: stretch; flex-direction:column; gap:10px; }
  .directory-search { width:100%; }
  .directory-group-head { padding:10px; }
  .directory-table thead { position:absolute; width:1px; height:1px; clip-path: inset(50%); overflow:hidden; }
  .directory-table tbody { display:block; }
  .directory-table tbody tr { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; column-gap:6px; row-gap: 4px; padding:10px; }
  .directory-table tbody th, .directory-table tbody td { padding:0; width:auto; }
  .directory-table tbody th:first-child { width:auto; }
  .directory-time { grid-column:1; grid-row:2; font-size:.71rem; }
  .directory-rate { grid-column:1/-1; grid-row:3; font-size:.71rem; color:#5a6d82; }
  .directory-rate::before { content:attr(data-label) " "; }
  .directory-table .directory-state { grid-column:2; grid-row:1/3; }
  .directory-table .model-status-badge { white-space: nowrap; }
  .management-module .section-heading { align-items:flex-start; flex-direction:column; }
  .management-module .admin-model-toolbar { flex-wrap:wrap; gap:9px; padding:12px; }
  .management-module .admin-model-toolbar .field { flex-basis:100%; max-width:none; }
  .record-search { padding: 12px; }
  .record-search .field { flex-basis: 100%; max-width: none; }
  :is(#orders, #accounts) .admin-table { min-width: 0; }
  :is(#orders, #accounts) .admin-table thead { position: absolute; clip-path: inset(50%); height: 1px; width: 1px; overflow: hidden; }
  :is(#orders, #accounts) .admin-table tbody { display: block; }
  :is(#orders, #accounts) .admin-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; padding: 13px; }
  :is(#orders, #accounts) .admin-table tbody tr + tr { border-top: 1px solid #d4e0ec; }
  :is(#orders, #accounts) .admin-table td { min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
  :is(#orders, #accounts) .admin-table td::before { content: attr(data-label); display: block; color: #5a6d82; font-size: .73rem; }
  :is(#orders, #accounts) .admin-table :is(td:first-child,td:last-child,td[data-label="邮箱"]) { grid-column: 1 / -1; }
  :is(#orders, #accounts) .admin-table :is(.order-actions,.row-actions) { display: flex; flex-wrap: wrap; gap: 5px; white-space: normal; }
  :is(#orders, #accounts) .admin-table :is(.order-actions,.row-actions)::before { display: none; }
  :is(#orders, #accounts) .admin-table .button { margin: 0; }
  .admin-content .admin-actions { flex-wrap:wrap; }
  .access-card { grid-template-columns: 1fr; }
  .access-art { min-height: 92px; border: 0; border-bottom: 1px solid #d4e0ec; }
  .access-art img { object-position: center 45%; }
  .access-content { min-height:0; }
  .access-form { padding: 24px; }
}

