:root {
  color-scheme: light;
  --ink: #172332;
  --sub: #536578;
  --line: #d7e0e7;
  --surface: #fff;
  --canvas: #f3f6f8;
  --nav: #132d3e;
  --brand: #10695d;
  --green-soft: #e2f1ed;
  --red: #9d3232;
  --shadow: 0 3px 13px rgba(18, 43, 54, .045);
  font: 100% / 1.55 "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: wait; opacity: .65; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #37838b; outline-offset: 3px; }
:where(h1, h2, h3, p) { margin: 0; }
h1 { font-size: clamp(1.85rem, 3vw, 2.55rem); line-height: 1.25; letter-spacing: -.055em; font-weight: 700; }
h2 { font-size: 1.13rem; line-height: 1.4; letter-spacing: -.025em; }
h3 { font-size: 1rem; line-height: 1.45; }
small, .tiny { font-size: .81rem; }
.skip-link { position: fixed; top: -8rem; left: .8rem; z-index: 12; background: white; color: #104d44; padding: .65rem 1rem; border-radius: 5px; }
.skip-link:focus { top: .55rem; }
.boot { min-height: 84vh; display: grid; place-items: center; font-size: 1rem; color: var(--sub); }
.shell { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); min-height: 100vh; }
.sidebar { color: #eff6f8; background: var(--nav); padding: 1.9rem 1rem 1.1rem; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh; }
.brand { display: inline-flex; align-items: center; gap: .75rem; font-weight: 650; font-size: 1.34rem; letter-spacing: -.045em; white-space: nowrap; }
.sidebar > .brand { padding: 0 .7rem; }
.brand-mark { position: relative; flex: 0 0 2.2rem; width: 2.2rem; height: 2.2rem; border-radius: .63rem; overflow: hidden; background: #a4e3cd; display: inline-block; }
.brand-mark::before, .brand-mark::after { position: absolute; content: ""; transform: skewY(-29deg); width: .55rem; background: #183f42; border-radius: .07rem; }
.brand-mark::before { height: 1.12rem; left: .52rem; top: .71rem; }
.brand-mark::after { height: 1.17rem; left: 1.13rem; top: .38rem; }
.nav { display: grid; gap: .25rem; margin-top: 2.8rem; }
.nav a { display: flex; align-items: center; gap: .84rem; padding: .7rem .85rem; color: #c5d6dc; text-decoration: none; border-radius: .55rem; font-size: .94rem; }
.nav a:hover { background: #1d3b4b; color: #fff; }
.nav a[aria-current=page] { color: #fff; background: #2c4956; box-shadow: inset 3px 0 #a4e3cd; font-weight: 600; }
.nav-ico { display: inline-flex; width: 1.25rem; justify-content: center; font: 1.2rem / 1 "Segoe UI Symbol", sans-serif; }
.profile { margin-top: auto; padding: 1.25rem .55rem 0; border-top: 1px solid #36515e; display: flex; align-items: center; gap: .62rem; min-width: 0; }
.profile .avatar { flex: 0 0 auto; }
.avatar, .tile-icon { width: 2.3rem; height: 2.3rem; border-radius: .55rem; display: grid; place-items: center; font-weight: 650; }
.avatar { color: #cee8e1; background: #355464; }
.profile-text { display: grid; flex: 1; min-width: 0; }
.profile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; font-weight: 600; }
.profile small { color: #b6cbd1; }
.signout { background: none; border: 0; color: #d2e6e7; padding: .45rem .15rem; font-size: .86rem; text-underline-offset: .2rem; }
.signout:hover { text-decoration: underline; }
.main-wrap { min-width: 0; }
.topbar { min-height: 4.2rem; background: #fff; border-bottom: 1px solid var(--line); padding: .78rem clamp(1rem, 4vw, 3.7rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.breadcrumb { color: var(--sub); font-size: .91rem; display: flex; align-items: center; gap: .65rem; }
.breadcrumb b { font-weight: 550; color: var(--ink); }
.crumb-divider { color: #a6b4bf; }
.top-domain, .domain { font-family: "IBM Plex Mono", Consolas, ui-monospace, monospace; overflow-wrap: anywhere; }
.top-domain { color: #405561; font-size: .83rem; text-align: right; }
.main { max-width: 87rem; margin: 0 auto; padding: clamp(1.6rem, 3.7vw, 3.2rem) clamp(1rem, 4vw, 3.7rem) 3.4rem; outline: 0; }
.page-head, .panel-head, .actions, .account-summary, .pill-row { display: flex; align-items: center; gap: .7rem; }
.page-head, .panel-head, .account-summary { justify-content: space-between; }
.page-head { margin-bottom: 1.65rem; align-items: flex-end; }
.subhead { color: var(--sub); margin-top: .46rem; font-size: .97rem; overflow-wrap: anywhere; }
.actions, .pill-row { flex-wrap: wrap; }
.btn { min-height: 2.6rem; display: inline-flex; align-items: center; justify-content: center; gap: .38rem; border: 1px solid #c8d5dc; background: #fff; color: #293f49; padding: .52rem .95rem; border-radius: .52rem; font-size: .9rem; font-weight: 570; line-height: 1.4; text-decoration: none; }
.btn:hover { background: #f2f6f7; border-color: #a2b5bd; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #0a544b; border-color: #0a544b; }
.btn.danger { color: #922d2d; }
.btn.destructive { color: #fff; background: var(--red); border-color: var(--red); }
.btn.destructive:hover { background: #852828; }
.btn.compact { min-height: 2.22rem; padding: .35rem .72rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14.5rem, 100%), 1fr)); gap: .9rem; margin-bottom: 1.25rem; }
.tile, .panel, .note { border-radius: .85rem; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); min-width: 0; }
.tile { padding: 1.05rem 1.2rem 1.18rem; }
.tile header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; color: var(--sub); font-size: .91rem; }
.tile-icon { height: 2rem; width: 2rem; background: #edf2f5; color: #425e6d; }
.tile-value { margin-top: .5rem; font-size: clamp(1.35rem, 2.3vw, 1.8rem); font-weight: 680; letter-spacing: -.043em; line-height: 1.3; overflow-wrap: anywhere; }
.tile-value.domain { font-size: clamp(1.1rem, 1.8vw, 1.45rem); letter-spacing: -.045em; }
.tile.accent { background: #e5f2ed; border-color: #c4dfd3; }
.tile.accent .tile-icon { color: #175746; background: #cfe6da; }
.panel { padding: 1.2rem 1.35rem; margin-bottom: 1.2rem; }
.panel-head { margin-bottom: 1rem; gap: .8rem; }
.panel-head.no-gap { margin-bottom: 0; }
.secondary { color: var(--sub); }
.empty { padding: 1.3rem 1.1rem; background: #f6f8f9; border: 1px dashed #ced9df; border-radius: .56rem; }
.empty strong { font-size: .98rem; display: block; }
.empty p { color: var(--sub); font-size: .9rem; margin-top: .22rem; }
.account-summary { padding-top: .3rem; }
.account-title { font-size: 1.08rem; }
.account-meta { margin-top: .23rem; color: var(--sub); font-size: .89rem; overflow-wrap: anywhere; }
.pill { font-size: .81rem; font-weight: 570; padding: .15rem .55rem; border-radius: 100px; background: #edf1f4; color: #435462; display: inline-block; }
.pill.on { background: #e1f2e8; color: #255f45; }
.pill.off { background: #f9ebe0; color: #834617; }
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); gap: .8rem; }
.note { padding: 1rem; box-shadow: none; display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; min-width: 0; }
.note h3 { overflow-wrap: anywhere; }
.note p { color: var(--sub); font-size: .94rem; white-space: pre-line; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.note small { color: #617282; margin-top: auto; padding-top: .4rem; }
.note .actions { gap: .45rem; margin-top: .3rem; }
.text-link { color: var(--brand); padding: .2rem .12rem; background: none; border: 0; font-weight: 600; font-size: .88rem; text-underline-offset: .2rem; text-decoration: underline; }
.text-link.danger { color: var(--red); }
.note .text-link + .text-link { margin-left: .4rem; }
.registry { min-width: 0; }
.registry-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 1rem; padding: .82rem 0; overflow-wrap: anywhere; }
.registry-row + .registry-row { border-top: 1px solid #e2e9ec; }
.registry-note { margin-top: .15rem; color: var(--sub); font-size: .91rem; white-space: pre-line; }
.registry-date { font-size: .82rem; }
.registry-search { display: block; border: 1px solid #b4c4cc; border-radius: .48rem; padding: .53rem .72rem; width: min(100%, 22rem); background: #fff; color: var(--ink); margin-bottom: .7rem; font: inherit; font-size: .92rem; }
.filter-status { color: var(--sub); font-size: .85rem; }
.filter-status:not(:empty) { margin-bottom: .5rem; }
.audit-list { list-style: none; margin: 0; padding: 0; }
.audit-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(5rem, .8fr) auto; gap: 1rem; padding: .82rem 0; align-items: baseline; overflow-wrap: anywhere; }
.audit-row + .audit-row { border-top: 1px solid #e2e9ec; }
.audit-row small, .audit-row time { font-size: .86rem; color: var(--sub); }
.audit-row strong { font-weight: 560; }
.login-page { min-height: 100vh; min-height: 100dvh; padding: 1.1rem; display: grid; place-items: center; }
.login-card { width: min(100%, 28rem); background: #fff; border: 1px solid var(--line); box-shadow: 0 12px 45px rgba(28, 52, 62, .08); border-radius: 1.1rem; padding: clamp(1.4rem, 4.6vw, 2.6rem); }
.login-card .brand { color: var(--nav); margin-bottom: 2.1rem; }
.login-card h1 { font-size: 1.85rem; }
.login-card form { margin-top: 1.65rem; }
.login-card form .btn { width: 100%; margin-top: .25rem; }
.field { display: grid; gap: .4rem; color: var(--ink); font-size: .93rem; font-weight: 570; margin-bottom: 1rem; }
.field input, .field textarea { display: block; width: 100%; border: 1px solid #acbdc7; color: var(--ink); background: #fff; font-size: 1rem; font-weight: normal; border-radius: .46rem; padding: .62rem .75rem; min-width: 0; }
.field textarea { resize: vertical; min-height: 8rem; }
.error { color: #8c2626; padding: .62rem .8rem; background: #fff0f0; border-radius: .5rem; font-size: .9rem; margin-bottom: .8rem; }
.error:empty { display: none; }
.toast { position: fixed; bottom: 1.1rem; left: 50%; transform: translateX(-50%); background: #203e46; color: #fff; padding: .62rem 1rem; border-radius: .6rem; z-index: 15; max-width: min(90vw, 35rem); box-shadow: 0 8px 28px #173b4026; }
dialog { width: min(34rem, calc(100vw - 2rem)); border: 1px solid #cdd9df; border-radius: .86rem; padding: 1.45rem; color: var(--ink); background: #fff; box-shadow: 0 20px 70px #142a4833; max-height: calc(100dvh - 2rem); }
dialog::backdrop { background: rgba(13, 32, 42, .48); }
dialog h2 { font-size: 1.27rem; margin-bottom: .45rem; }
.dialog-scope { margin-bottom: 1.25rem; color: var(--sub); font-size: .92rem; overflow-wrap: anywhere; }
.dialog-actions { justify-content: flex-end; margin-top: 1.1rem; }
.dialog-copy { overflow-wrap: anywhere; }
@media (max-width: 930px) {
  .shell { grid-template-columns: 13.6rem minmax(0, 1fr); }
  .sidebar { padding-inline: .75rem; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { position: static; height: auto; padding: .75rem 1rem .52rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .72rem; }
  .sidebar > .brand { padding: 0; font-size: 1.15rem; }
  .brand-mark { height: 2rem; width: 2rem; flex-basis: 2rem; }
  .nav { grid-column: 1/-1; grid-row: 2; grid-template-columns: repeat(auto-fit, minmax(3.5rem, 1fr)); gap: .15rem; margin: 0; }
  .nav a { justify-content: center; font-size: .84rem; padding: .48rem .1rem; gap: .3rem; }
  .nav a[aria-current=page] { box-shadow: inset 0 -2px #a4e3cd; }
  .nav-ico { display: none; }
  .profile { padding: 0; border: 0; justify-self: end; gap: .45rem; }
  .profile .avatar, .profile small { display: none; }
  .profile-name { max-width: 6.5rem; }
  .signout { padding: .3rem; }
  .topbar { min-height: 3rem; }
  .tiles { gap: .6rem; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tiles > :first-child:nth-last-child(3) { grid-column: 1/-1; }
  .tile { padding: .85rem; }
  .tile-icon { display: none; }
  .panel { padding: 1rem; }
  .registry-row { grid-template-columns: minmax(0, 1fr) auto; gap: .22rem .65rem; }
  .registry-date { grid-column: 1; grid-row: 2; }
  .registry-row .actions { grid-column: 2; grid-row: 1/3; }
}
@media (max-width: 460px) {
  .page-head, .account-summary { align-items: flex-start; flex-wrap: wrap; }
  .top-domain { font-size: .77rem; }
  .breadcrumb { font-size: .82rem; gap: .32rem; }
  .main { padding-inline: .8rem; }
  .page-head { margin-bottom: 1.15rem; }
  .panel { padding: .85rem; }
  .audit-row { grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .5rem; }
  .audit-row time { grid-column: 1/-1; }
  .nav a { font-size: .8rem; }
}
