:root {
  color-scheme: light;
  --bg: #f2faf8; --surface: #fff; --line: #d8ece7; --text: #15342d;
  --muted: #64837b; --brand: #00a98f; --brand-dark: #087b69;
  --danger: #d9485f; --warning: #d98200;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; letter-spacing: 0; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 20px; border-right: 1px solid var(--line); background: #e9f7f3; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand img { width: 36px; height: 36px; padding: 8px; border-radius: 8px; background: var(--surface); }
.brand span { display: grid; gap: 2px; }
.brand strong { font-size: 17px; }
.brand small { color: var(--muted); }
.child-block { margin: 30px 0 20px; padding: 14px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 5px; }
.eyebrow { margin: 0; color: var(--brand-dark); font-size: 12px; font-weight: 700; text-transform: uppercase; }
nav { display: grid; gap: 5px; }
.nav-button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.nav-button:hover, .nav-button.active { color: var(--text); background: rgba(0, 169, 143, .12); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #9bb1ab; }
.dot.review { background: var(--warning); } .dot.blocked { background: var(--danger); }
.dot.ignored { background: #7c8d89; } .dot.macs { background: var(--brand); }
.back-link { margin-top: auto; color: var(--brand-dark); text-decoration: none; font-size: 13px; }
main { min-width: 0; padding: 40px clamp(24px, 5vw, 72px); }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; max-width: 1180px; margin: 0 auto 24px; }
h1 { margin: 7px 0 5px; font-size: 30px; letter-spacing: 0; } h2 { margin: 4px 0 0; font-size: 21px; }
.page-header p:last-child { margin: 0; color: var(--muted); }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--brand-dark); font-size: 22px; cursor: pointer; }
.status-strip { max-width: 1180px; margin: 0 auto 16px; padding: 12px 14px; border: 1px solid #f0c6ce; border-radius: 6px; background: #fff7f8; color: #9e2e42; }
.content { max-width: 1180px; margin: 0 auto; border-top: 1px solid var(--line); background: var(--surface); }
.toolbar { min-height: 58px; padding: 10px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.summary, .meta { color: var(--muted); font-size: 13px; }
.application-search { width: min(360px, 48vw); min-height: 38px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); font: inherit; }
.application-search:focus { outline: 2px solid #9be3d7; outline-offset: 1px; }
.primary, .secondary, .danger, .quiet { min-height: 36px; padding: 7px 13px; border-radius: 6px; cursor: pointer; }
.primary { border: 1px solid var(--brand); background: var(--brand); color: #fff; }
.secondary, .quiet { border: 1px solid var(--line); background: #fff; color: var(--text); }
.danger { border: 1px solid #f0a7b3; background: #fff; color: var(--danger); }
.application-row { display: grid; grid-template-columns: 40px minmax(220px, 1fr) minmax(170px, .55fr) auto; gap: 14px; align-items: center; padding: 15px 16px; border-bottom: 1px solid var(--line); }
.mac-row { display: grid; grid-template-columns: minmax(230px, 1.5fr) minmax(190px, 1fr) minmax(170px, .8fr) auto; gap: 18px; align-items: center; padding: 18px 16px; border-bottom: 1px solid var(--line); }
.application-row:last-child, .mac-row:last-child { border-bottom: 0; }
.application-entry { border-bottom: 1px solid var(--line); }
.application-entry:last-child, .application-entry .application-row { border-bottom: 0; }
.kind-label { display: inline-block; margin-right: 7px; color: var(--brand-dark); font-size: 11px; font-weight: 700; }
.application-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 7px; background: #e7f6f2; color: var(--brand-dark); font-weight: 800; }
.application-mark.large { width: 44px; height: 44px; font-size: 18px; }
.observation { display: grid; justify-items: start; gap: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 15px 16px; border-bottom: 1px solid var(--line); background: #fbfefd; }
.section-heading h2 { margin: 0; font-size: 16px; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.section-heading > span { color: var(--muted); font-size: 12px; }
.application-group { border-top: 8px solid var(--bg); }
.application-group > summary { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 15px 16px; cursor: pointer; color: var(--text); list-style-position: inside; }
.application-group > summary span:first-child { display: flex; flex-direction: column; gap: 3px; }
.application-group > summary small { color: var(--muted); font-weight: 400; }
.group-list { border-top: 1px solid var(--line); }
.compact-entry { background: #fbfcfc; }
.compact-entry .application-row { padding-top: 12px; padding-bottom: 12px; }
.nav-count { min-width: 20px; margin-left: auto; padding: 1px 6px; border-radius: 999px; background: #fff1d6; color: #9b5900; font-size: 11px; line-height: 18px; text-align: center; }
.identity { min-width: 0; } .identity strong { display: block; overflow-wrap: anywhere; }
.identity small { color: var(--muted); font-size: 12px; line-height: 1.6; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 999px; background: #edf6f3; color: var(--brand-dark); font-size: 12px; }
.badge.block { background: #fff0f2; color: var(--danger); } .badge.ignore { background: #f1f3f2; color: #61716d; }
.badge.pending { background: #fff7e8; color: #a76000; }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.empty { padding: 72px 24px; text-align: center; color: var(--muted); }
.compact-empty { padding: 34px 20px; }
dialog { width: min(520px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 8px; padding: 0; color: var(--text); }
dialog::backdrop { background: rgba(20, 49, 43, .3); }
.dialog-body { padding: 22px; display: grid; gap: 20px; }
.dialog-body label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
input, select { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: #fff; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.application-detail-dialog { width: min(640px, calc(100vw - 32px)); }
.detail-heading { display: flex; align-items: center; gap: 13px; }
.detail-heading h2 { margin: 2px 0 3px; overflow-wrap: anywhere; }
.detail-grid { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--line); }
.detail-grid > div { min-width: 0; padding: 11px 12px; background: #fff; }
.detail-grid dt { color: var(--muted); font-size: 11px; }
.detail-grid dd { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 13px; }
.detail-components h3 { margin: 0 0 8px; font-size: 14px; }
.detail-components h3 span { color: var(--muted); font-weight: 400; }
.detail-component-list { max-height: 180px; overflow: auto; border: 1px solid var(--line); border-radius: 7px; }
.detail-component-list > div { display: grid; gap: 3px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.detail-component-list > div:last-child { border-bottom: 0; }
.detail-component-list small, .detail-component-list code { overflow-wrap: anywhere; color: var(--muted); font-size: 11px; }
.detail-advanced { padding: 13px 14px; border: 1px solid #f2d8dc; border-radius: 7px; background: #fffafb; }
.detail-advanced > strong { display: block; margin-bottom: 4px; font-size: 13px; }
.detail-advanced-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.profile-ready { display: grid; gap: 4px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 6px; background: #f7fbfa; }
.profile-ready strong { overflow-wrap: anywhere; }
.profile-ready span { color: var(--muted); font-size: 13px; }
.muted { margin: 0; color: var(--muted); font-size: 13px; }
.merge-log { border-top: 1px solid var(--line); }
.merge-log summary { padding: 14px 16px; cursor: pointer; color: var(--muted); }
.merge-row { padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--line); }
@media (max-width: 820px) {
  .shell { grid-template-columns: 72px minmax(0, 1fr); } .sidebar { padding: 20px 10px; }
  .brand span, .child-block { display: none; }
  .nav-button { font-size: 0; justify-content: center; }
  .brand { justify-content: center; }
  .back-link { text-align: center; font-size: 0; } .back-link::after { content: "←"; font-size: 20px; }
  main { padding: 28px 16px; } .application-row { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; } .mac-row { grid-template-columns: 1fr; gap: 10px; }
  .application-row .observation, .application-row .actions { grid-column: 2; }
  .detail-grid { grid-template-columns: 1fr; }
  .application-search { width: 100%; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .nav-count { display: none; }
  .actions { justify-content: flex-start; }
}
