:root {
  color-scheme: light;
  font-family: "Segoe UI Variable", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  color: #142738;
  background: #f2f5f8;
  --background: #f2f5f8;
  --sidebar: #10252e;
  --primary: #08695d;
  --primary-hover: #07554b;
  --primary-light: #e4f4ec;
  --text: #142738;
  --muted: #4c6270;
  --border: #dce5eb;
  --surface: #fff;
  --focus: #087cc5;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 18.5rem; }
h1, h2, h3, p, ul, dl { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .68; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.brand { display: inline-flex; align-items: center; gap: .7rem; color: #fff; font-weight: 760; font-size: 1.08rem; letter-spacing: .012em; white-space: nowrap; }
.brand-icon { display: inline-grid; align-items: end; grid-auto-flow: column; justify-content: center; gap: .18rem; width: 1.95rem; height: 1.95rem; padding: .47rem; border-radius: .55rem; background: #18483e; }
.brand-icon i { width: .17rem; height: 58%; min-height: .27rem; border-radius: .06rem; background: #8ae7c3; }
.brand-icon i:nth-child(2) { height: 100%; }
.brand-icon i:nth-child(3) { height: 78%; }

.auth-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: 100svh; }
.auth-identity { display: flex; flex-direction: column; justify-content: space-between; gap: 4rem; min-height: 32rem; padding: clamp(2rem, 6vw, 6rem); color: #fff; background: radial-gradient(ellipse at 102% 34%, #295a4f 0%, transparent 57%), linear-gradient(150deg, #10252e, #133a38); position: relative; isolation: isolate; overflow: hidden; }
.auth-identity::after { content: ""; position: absolute; z-index: -1; width: 26rem; height: 26rem; right: -8rem; bottom: -10rem; border-radius: 35%; transform: rotate(-22deg); background: repeating-linear-gradient(90deg, transparent 0 28px, #afd5b528 29px 30px); }
.auth-intro h1 { font-size: clamp(2.4rem, 6vw, 5.45rem); line-height: 1.14; font-weight: 750; letter-spacing: -.055em; }
.auth-intro p { max-width: 19rem; margin-top: 1.1rem; font-size: 1rem; color: #c5e0d8; line-height: 1.65; }
.auth-endpoint { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; color: #c5e0d8; font-size: .84rem; }
.auth-endpoint code { padding: .42rem .54rem; border: 1px solid #a8d5c542; border-radius: .38rem; color: #fff; font: .88rem ui-monospace, Consolas, monospace; }
.auth-content { display: grid; place-items: center; padding: 2rem; }
.login-card { width: min(100%, 25rem); padding: clamp(1.5rem, 4vw, 2.25rem); border: 1px solid var(--border); border-radius: 1rem; background: var(--surface); box-shadow: 0 20px 64px #14313c0d; }
.login-card h2 { font-size: 1.7rem; font-weight: 760; }
.login-card > p { margin-top: .55rem; color: var(--muted); font-size: .95rem; }
.login-card form { display: grid; gap: 1rem; margin-top: 1.4rem; }
.login-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin-top: .95rem; }
.login-methods [aria-pressed="true"] { color: var(--primary); border-color: #8bbaaa; background: var(--primary-light); }
#account-fields { display: grid; gap: .7rem; }
.login-card .auth-status { margin-top: .95rem; }
.login-card .button-primary { justify-content: space-between; }

.workspace { min-height: 100svh; display: grid; grid-template-columns: 15.25rem minmax(0, 1fr); }
.sidebar { min-height: 100svh; height: 100svh; position: sticky; top: 0; overflow: auto; display: flex; flex-direction: column; align-items: stretch; gap: 1.5rem; padding: 1.2rem .85rem .9rem; background: var(--sidebar); color: #d6e3e7; scrollbar-color: #38626b var(--sidebar); z-index: 2; }
.sidebar .brand { padding-inline: .55rem; }
.sidebar nav { display: flex; flex-direction: column; gap: .32rem; }
.nav-group { display: flex; flex-direction: column; gap: .2rem; }
.nav-group p { padding: 1rem .65rem .25rem; color: #94afb8; font-size: .75rem; font-weight: 700; }
.nav-link { display: flex; gap: .62rem; align-items: center; min-height: 2.46rem; width: 100%; padding: .45rem .65rem; border: 1px solid transparent; border-radius: .44rem; background: transparent; color: #d6e3e7; font-size: .9rem; text-align: left; }
.nav-link:hover { color: #fff; background: #234048; }
.nav-link[aria-current="page"] { color: #f1fff9; border-color: #2b675d; background: #1d4a40; font-weight: 725; }
.nav-link[aria-current="page"] .nav-icon { color: #94e1c4; }
.nav-icon { position: relative; flex: 0 0 .95rem; height: .95rem; color: #a6c0c7; }
.nav-icon::before, .nav-icon::after { position: absolute; }
.nav-grid { background: linear-gradient(currentColor 0 0) left top / 6px 6px, linear-gradient(currentColor 0 0) right top / 6px 6px, linear-gradient(currentColor 0 0) left bottom / 6px 6px, linear-gradient(currentColor 0 0) right bottom / 6px 6px; background-repeat: no-repeat; }
.nav-signal::before { content: ""; inset: .08rem .06rem; background: currentColor; clip-path: polygon(0 53%, 22% 53%, 41% 13%, 62% 73%, 76% 44%, 100% 44%, 100% 54%, 82% 54%, 62% 93%, 40% 34%, 29% 64%, 0 64%); }
.nav-key::before { content: ""; width: .56rem; height: .56rem; border: 1.5px solid currentColor; border-radius: 50%; top: .04rem; left: .03rem; }
.nav-key::after { content: ""; height: 1.5px; width: .66rem; right: -.04rem; bottom: .2rem; background: currentColor; transform: rotate(44deg); }
.nav-stack::before { content: ""; inset: .08rem .03rem auto; height: .32rem; border: 1.5px solid currentColor; border-radius: .1rem; }
.nav-stack::after { content: ""; inset: auto .03rem .08rem; height: .32rem; border: 1.5px solid currentColor; border-radius: .1rem; }
.nav-price { text-align: center; font-size: .92rem; line-height: .95rem; font-weight: 650; border: 1px solid currentColor; border-radius: 50%; }
.nav-box { border: 1.5px solid currentColor; border-radius: .13rem; }
.nav-box::before { content: ""; inset: .16rem 0 auto; border-bottom: 1px solid currentColor; }
.nav-document::before { content: ""; inset: .02rem .1rem; border: 1.5px solid currentColor; border-radius: .12rem; }
.nav-document::after { content: ""; width: .37rem; left: .28rem; top: .3rem; height: .26rem; border-block: 1px solid currentColor; }
.nav-system { border: 1.5px solid currentColor; border-radius: .16rem; }
.nav-system::before { content: ""; inset: 0 .13rem auto; height: .3rem; border-bottom: 1px solid currentColor; }
.nav-system::after { content: ""; width: .17rem; height: .17rem; bottom: .12rem; left: .15rem; background: currentColor; border-radius: 50%; }
.nav-user::before { content: ""; width: .43rem; height: .43rem; top: 0; left: .26rem; border: 1px solid currentColor; border-radius: 50%; }
.nav-user::after { content: ""; height: .42rem; inset: auto .03rem .01rem; border: 1px solid currentColor; border-radius: .24rem .24rem .11rem .11rem; }
.sidebar-footer { display: flex; justify-content: space-between; align-items: center; gap: .45rem; margin-top: auto; padding: .75rem .44rem .02rem; border-top: 1px solid #314851; }
.health { color: var(--muted); font-size: .8rem; display: inline-flex; align-items: center; gap: .42rem; }
.health::before { content: ""; height: .46rem; width: .46rem; flex: none; border-radius: 50%; background: #8196a2; }
.health[data-state="ready"]::before { background: #1b9b77; }
.health[data-state="error"]::before { background: #cc643f; }
.sidebar .health { color: #c2d5dc; }
.sidebar .health[data-state="ready"]::before { background: #8ae7c3; }
.sidebar .health[data-state="error"]::before { background: #ffad83; }

.workspace-body { min-width: 0; }
.workspace-topbar { min-height: 3.85rem; position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .5rem clamp(.9rem, 3vw, 2.8rem); background: #ffffffed; border-bottom: 1px solid var(--border); }
.breadcrumb, .topbar-actions { display: flex; align-items: center; gap: .7rem; }
.breadcrumb { min-width: 0; color: var(--muted); font-size: .88rem; }
.breadcrumb .divider { color: #79909d; }
#breadcrumb-page { color: #254152; font-weight: 700; white-space: nowrap; }
#updated-at { color: var(--muted); font-size: .8rem; }
.mobile-navigation { display: none !important; }
.hamburger { width: 1.15rem; height: .76rem; display: block; border-block: 2px solid currentColor; position: relative; }
.hamburger::before { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 1px); border-top: 2px solid currentColor; }
.nav-backdrop { display: none; }

.workspace-main { width: min(100%, 89rem); padding: 1.8rem clamp(.9rem, 3vw, 2.8rem) 2.6rem; margin-inline: auto; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.15rem; }
.page-header h2 { font-size: clamp(1.55rem, 3vw, 2.28rem); font-weight: 780; letter-spacing: -.035em; line-height: 1.23; }
.page-header .hint { margin-top: .38rem; }
.hint { font-size: .9rem; color: var(--muted); line-height: 1.55; }
.overview-service { display: grid; grid-template-columns: 1fr minmax(12rem, .45fr); align-items: center; gap: 2.2rem; padding: clamp(1rem, 2.2vw, 1.55rem) clamp(1rem, 3vw, 1.9rem); position: relative; isolation: isolate; overflow: hidden; background: radial-gradient(ellipse at 87% 74%, #276156 0%, transparent 62%), #103840; color: #fff; border-radius: .76rem; }
.overview-service::after { position: absolute; z-index: -1; content: ""; inset: -50% -3% -50% 70%; transform: skewX(-20deg); background: repeating-linear-gradient(90deg, #acd5ca16 0 1px, transparent 1px 30px); }
.overview-service-main { display: grid; justify-items: start; gap: .62rem; }
.overview-service-main h3 { color: #cce9de; font-size: .87rem; font-weight: 670; }
.overview-service-main code { font: 650 clamp(.96rem, 2.6vw, 1.43rem) ui-monospace, Consolas, monospace; }
.service-list { padding: 0; list-style: none; display: grid; grid-template-columns: 1fr; gap: .38rem; }
.service-list li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .4rem .56rem; border: 1px solid #e3fcf52a; border-radius: .28rem; background: #122e3375; font-size: .85rem; }
.service-signal { color: #e1edf0; display: inline-flex; align-items: center; gap: .38rem; }
.service-signal::before { content: ""; width: .42rem; height: .42rem; border-radius: 50%; background: #98afb5; }
.service-signal[data-state="ready"]::before { background: #88e8bd; }
.service-signal[data-state="error"]::before { background: #ffb08e; }

.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .72rem; margin-block: .92rem; }
.summary > div { min-width: 0; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: .55rem; background: var(--surface); box-shadow: 0 2px 4px #122d3c05; }
.summary dt { color: var(--muted); font-size: .84rem; font-weight: 640; }
.summary dd { margin: .32rem 0 0; font-size: clamp(1.3rem, 3vw, 2.07rem); font-weight: 775; font-variant-numeric: tabular-nums; line-height: 1.14; overflow-wrap: anywhere; }
.overview-grid { display: grid; grid-template-columns: minmax(14rem, .75fr) minmax(0, 1.45fr); gap: .85rem; }
.panel { border: 1px solid var(--border); border-radius: .63rem; background: var(--surface); min-width: 0; box-shadow: 0 2px 4px #122d3c05; }
.panel-header { padding: .8rem .88rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.panel-header h3, .system-card h3 { font-size: 1.03rem; font-weight: 760; }
.overview-grid .table-container { border-radius: 0 0 .63rem .63rem; }
.resources { padding: .03rem .78rem .52rem; }
.resource-row { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .5rem; padding: .7rem .18rem; border: 0; border-top: 1px solid var(--border); text-align: left; background: transparent; color: var(--text); }
.resource-row:hover { color: var(--primary); background: #f4faf7; }
.resource-row small { font-size: .74rem; font-weight: 450; color: var(--muted); display: block; margin-top: .13rem; }
.resource-row strong { font-weight: 760; font-variant-numeric: tabular-nums; white-space: nowrap; }

.table-container { overflow-x: auto; }
.table-container:focus-visible { outline-offset: -3px; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; white-space: nowrap; }
thead { background: #edf3f6; color: #345061; }
th, td { text-align: left; padding: .65rem .85rem; vertical-align: middle; }
th { font-size: .78rem; font-weight: 720; }
tbody tr + tr { border-top: 1px solid #eaf0f3; }
tbody tr:hover { background: #f7fafb; }
.cell-actions { display: flex; align-items: center; gap: .06rem; }
.cell-name strong, .cell-name small { display: block; max-width: 16.5rem; white-space: normal; overflow-wrap: anywhere; }
.cell-name small { margin-top: .2rem; color: var(--muted); }
.status { display: inline-block; padding: .18rem .4rem; border-radius: .28rem; background: #edf1f3; color: #465b69; white-space: nowrap; font-size: .78rem; font-weight: 675; }
.status-on { background: #def2ea; color: #0b5849; }
.status-error { background: #faeaeb; color: #862934; }
.status-warning { background: #fff0d9; color: #785108; }
.numeric { font-variant-numeric: tabular-nums; }
.monospace { font-family: ui-monospace, Consolas, monospace; }
.empty { padding: 2.4rem 1rem; text-align: center; color: var(--muted); white-space: normal; }
.system-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.system-card { padding: .95rem; }
.system-card dl { margin-top: .7rem; }
.system-card dl > div { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: .65rem; border-top: 1px solid var(--border); padding: .62rem 0; font-size: .89rem; }
.system-card dt { color: var(--muted); }
.system-card dd { margin: 0; overflow-wrap: anywhere; text-align: right; }
#system-import { margin-top: .8rem; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: .36rem; flex-shrink: 0; padding: .46rem .7rem; min-height: 2.22rem; border: 1px solid transparent; border-radius: .42rem; font-weight: 670; font-size: .84rem; line-height: 1.25; white-space: nowrap; }
.button-block { width: 100%; }
.button-primary { color: #fff; background: var(--primary); }
.button-primary:hover:not(:disabled) { background: var(--primary-hover); }
.button-secondary { color: #244152; background: #fff; border-color: #b9cad3; }
.button-secondary:hover:not(:disabled) { background: #eef5f7; }
.button-dark { min-height: 1.86rem; padding: .3rem .45rem; color: #e5f0f2; background: #213c44; border-color: #45616c; font-size: .75rem; }
.button-dark:hover { background: #355761; }
.button-bright { min-height: 1.95rem; background: #d9f1e5; color: #17453d; }
.button-bright:hover { background: #edfdf5; }
.button-danger { color: #fff; background: #9e2739; }
.button-danger:hover:not(:disabled) { background: #811e2e; }
.button-link, .button-plain { color: #16586d; padding-inline: .43rem; min-height: 1.9rem; background: transparent; }
.button-link:hover:not(:disabled), .button-plain:hover:not(:disabled) { background: #e9f2f6; }
.button-link-danger { color: #9e2739; }
.notice { padding: .63rem .72rem; border-radius: .4rem; font-size: .86rem; line-height: 1.45; }
.notice-error { background: #fff0ee; color: #822b37; border: 1px solid #edc6c7; }
.notice-success { background: #e6f6ef; color: #075445; border: 1px solid #c0ded0; }
.workspace-main > .notice { margin-bottom: .7rem; }
dialog { width: min(100% - 2rem, 33rem); max-height: min(91dvh, 47rem); margin: auto; padding: 0; border: 1px solid var(--border); border-radius: .72rem; box-shadow: 0 1.25rem 4rem #132c4560; background: var(--surface); color: var(--text); }
dialog::backdrop { background: #142d3a80; }
.dialog-form { display: grid; gap: .77rem; padding: 1.1rem; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: .45rem; }
.dialog-header h2 { font-size: 1.23rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .45rem; }
.field { display: grid; gap: .29rem; min-width: 0; font-size: .85rem; font-weight: 640; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; min-height: 2.4rem; padding: .46rem .54rem; background: #fbfdfe; border: 1px solid #a9bac5; border-radius: .38rem; color: var(--text); font-weight: 450; }
.field textarea { min-height: 4.4rem; resize: vertical; }
.field input::placeholder { color: #5a6f7e; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .52rem; }
.form-grid input { font-variant-numeric: tabular-nums; }
.checkbox { display: inline-flex; align-items: center; gap: .43rem; font-size: .87rem; }
.checkbox input { margin: 0; accent-color: var(--primary); width: 1rem; height: 1rem; flex: none; }
#catalog-fields { display: grid; gap: .72rem; }
.member-field { min-width: 0; margin: 0; padding: .55rem .62rem; border: 1px solid var(--border); border-radius: .4rem; }
.member-field legend { padding-inline: .25rem; font-size: .86rem; font-weight: 660; }
.member-choices { display: grid; gap: .42rem; max-height: 9.5rem; overflow: auto; overflow-wrap: anywhere; }
.secret { font-family: ui-monospace, Consolas, monospace; }

.operation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.operation-card { min-width: 0; }
.operation-card > .hint { margin-inline: .9rem; }
.operation-form { display: grid; align-content: start; gap: .65rem; padding: .8rem .9rem; }
.operation-form h4 { margin: 0; font-size: .94rem; }
.operation-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.operation-actions a, .operation-card .panel-header a { text-decoration: none; }
.operation-card .table-container { border-top: 1px solid var(--border); }
.operation-card .table-container table { min-width: 100%; }
.reference-switcher, .reference-filters, .reference-actions, .reference-page-control { display: flex; gap: .65rem; flex-wrap: wrap; }
.reference-switcher { margin: 0 0 .85rem; }
.reference-panel-header, .reference-page-control { align-items: center; justify-content: space-between; }
.reference-panel-header .field { min-width: min(100%, 12rem); }
.reference-filters, .reference-page-control { padding: .85rem 1rem; }
.reference-filters { align-items: end; }
.reference-filters .field { flex: 1 0 9.5rem; }
.reference-panel .table-container { border-block: 1px solid var(--border); }
.reference-panel td { max-width: 18rem; overflow: hidden; text-overflow: ellipsis; }
.reference-detail { display: grid; grid-template-columns: minmax(7rem, auto) minmax(0, 1fr); gap: .45rem .9rem; margin: 0; }
.reference-detail dt { color: var(--muted); }
.reference-detail dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.reference-changes { display: grid; gap: .7rem; padding: .75rem; margin: .2rem 0 0; border: 1px solid var(--border); border-radius: .6rem; }
.reference-changes legend { padding: 0 .35rem; }
#reference-dialog { max-height: 90dvh; overflow-y: auto; }
.operation-billing { margin-top: .9rem; }
#operations-error { margin-bottom: .75rem; }
@media (max-width: 68rem) {
  .operation-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 65rem) {
  .workspace { grid-template-columns: 12.6rem minmax(0, 1fr); }
  .sidebar-footer { flex-wrap: wrap; }
}
@media (max-width: 53rem) {
  .workspace { display: block; }
  .sidebar { display: none; position: fixed; width: min(16rem, 82vw); height: 100dvh; z-index: 4; }
  .workspace.nav-open .sidebar { display: flex; }
  .workspace.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 3; width: 100%; height: 100%; padding: 0; border: 0; background: #102a3e70; }
  .mobile-navigation { display: inline-flex !important; color: var(--text); padding: .31rem; }
  .sidebar-footer { flex-wrap: nowrap; }
  .auth-identity { padding: 2.3rem; }
}
@media (max-width: 39rem) {
  .auth-layout { display: flex; flex-direction: column; }
  .auth-identity { padding: 1.4rem 1.2rem; min-height: 0; gap: 2.1rem; }
  .auth-intro h1 { font-size: 2.05rem; }
  .auth-intro h1 br { display: none; }
  .auth-intro p { margin-top: .48rem; }
  .auth-content { padding: 1.2rem .65rem; }
  .overview-grid, .system-grid { grid-template-columns: 1fr; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .48rem; }
  .summary > div { padding: .65rem .7rem; }
  .page-header { align-items: flex-start; }
  .workspace-main { padding-top: 1.18rem; }
  #updated-at { display: none; }
}
@media (max-width: 29rem) {
  .breadcrumb > span:first-of-type, .breadcrumb .divider { display: none; }
  .overview-service { grid-template-columns: 1fr; gap: .68rem; }
  .service-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
  .service-list li { white-space: nowrap; align-items: flex-start; flex-direction: column; gap: .25rem; padding: .4rem; font-size: .8rem; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
