:root {
  --ink: #202124; --text: #475467; --muted: #667085; --line: #e4e7ec;
  --bg: #f6f7f9; --surface: #fff; --primary: #2563eb; --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff; --red: #b42318; --green: #166534; --sidebar: 232px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px; color: var(--ink); background: var(--bg); letter-spacing: 0;
}
* {box-sizing: border-box}
body {margin: 0; min-width: 320px; line-height: 1.6}
[hidden] {display: none !important}
button, input, select, textarea {font: inherit; color: inherit}
button, a, input, select, textarea {-webkit-tap-highlight-color: transparent}
button {cursor: pointer}
button:disabled {cursor: not-allowed; opacity: .5}
button, input, select, textarea {border-radius: 5px}
a {color: var(--primary-dark); text-decoration: none}
a:hover {text-decoration: underline}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #93c5fd; outline-offset: 3px;
}
h1, h2, h3, p {margin: 0}
h1 {font-size: 23px; line-height: 1.4; font-weight: 650}
h2 {font-size: 16px; line-height: 1.5; font-weight: 650}
small {font-size: 12px}
svg.icon {width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0}
.btn {border: 1px solid #d0d5dd; background: var(--surface); color: var(--text); min-height: 35px; padding: 7px 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 13px; font-weight: 550}
.btn:hover, .icon-btn:hover {border-color: #93c5fd; background: var(--primary-soft); color: var(--primary-dark)}
.btn.primary {background: var(--primary); border-color: var(--primary); color: #fff}
.btn.primary:hover {background: var(--primary-dark)}
.btn.danger {color: var(--red); border-color: #f3c6c2}
.btn.danger.solid {background: var(--red); color: #fff; border-color: var(--red)}
.icon-btn {width: 33px; height: 33px; padding: 0; border: 1px solid #d0d5dd; background: #fff; display: inline-grid; place-items: center; color: var(--muted); flex-shrink: 0}
.icon-btn.danger {color: var(--red)}
.text-button {border: 0; padding: 0; background: none; color: var(--primary-dark); text-align: left; overflow-wrap: anywhere}
.text-button:hover {text-decoration: underline}
.muted {color: var(--muted)}
.mono, code, pre {font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; overflow-wrap: anywhere}
.badge {display: inline-flex; align-items: center; gap: 5px; border: 1px solid transparent; border-radius: 4px; padding: 1px 7px; font-size: 11px; line-height: 1.7; color: #475467; background: #f2f4f7; white-space: nowrap}
.badge.blue {color: #1d4ed8; background: #eff6ff; border-color: #dbeafe}
.badge.green {color: var(--green); background: #ecfdf3}
.badge.amber {color: #92400e; background: #fffbeb}
.tag-list {display: flex; flex-wrap: wrap; gap: 5px; min-width: 0}
input, select, textarea {background: #fff; border: 1px solid #d0d5dd; padding: 9px 10px; min-height: 38px; max-width: 100%; min-width: 0}
input::placeholder, textarea::placeholder {color: #98a2b3}
textarea {resize: vertical; line-height: 1.7}
label {font-size: 13px; font-weight: 550; color: var(--text)}
.form-error {color: var(--red); font-size: 13px; overflow-wrap: anywhere; white-space: pre-line}
.form-error:not(:empty) {padding: 11px 12px; background: #fff5f4; border: 1px solid #f4d4cf; border-radius: 5px; margin: 13px 0}
.login-view {min-height: 100dvh; display: flex; flex-direction: column; background: #fff}
.login-brand {display: flex; align-items: center; gap: 12px; padding: 24px 38px; border-bottom: 1px solid var(--line)}
.login-brand img {object-fit: contain}
.login-brand strong {display: block; font-size: 19px; font-weight: 650}
.login-brand span {display: block; color: var(--muted); font-size: 12px}
.login-main {width: min(100% - 40px, 362px); margin: auto; padding: 62px 0 100px}
.eyebrow {color: var(--muted); font-size: 11px; font-weight: 600}
.login-heading h1 {margin: 10px 0 30px; font-size: 27px}
.login-form {display: grid; gap: 9px}
.login-form label:not(:first-child) {margin-top: 12px}
.login-form input {width: 100%; min-height: 44px}
.password-field {position: relative}
.password-field input {padding-right: 48px}
.password-field .icon-btn {position: absolute; right: 5px; top: 6px; border: 0; background: transparent}
.login-submit {min-height: 44px; width: 100%; margin-top: 13px}
.startup-status {font-size: 12px; color: var(--muted); margin-top: 18px; text-align: center}
.login-footer {display: flex; justify-content: space-between; gap: 14px; padding: 18px 38px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted)}
.sidebar {position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: #23252b; color: #c7cdd7; display: flex; flex-direction: column; z-index: 40}
.brand {display: flex; align-items: center; gap: 11px; padding: 22px 18px; color: #f2f4f7; min-height: 91px; border-bottom: 1px solid #3c3f46; margin: 0 12px}
.brand:hover {text-decoration: none}
.brand img {object-fit: contain; flex-shrink: 0}
.brand strong {display: block; font-size: 16px; white-space: nowrap}
.brand small {display: block; color: #9ca6b5; font-size: 11px; margin-top: 3px}
.sidebar nav {overflow: auto; padding: 16px 11px}
.nav-group {font-size: 11px; color: #8993a3; padding: 10px 12px 6px}
.nav-item {display: flex; align-items: center; gap: 11px; padding: 11px 13px; color: #c7cdd7; border-radius: 6px; margin: 3px 0; font-size: 13px; min-height: 42px}
.nav-item:hover {background: #303238; color: #fff; text-decoration: none}
.nav-item.active {color: #dbeafe; background: #23354d; box-shadow: inset 3px 0 0 #60a5fa}
.nav-item.active .icon {color: #93c5fd}
.sidebar-footer {display: flex; gap: 7px; align-items: center; margin-top: auto; border-top: 1px solid #3c3f46; padding: 17px 18px; font-size: 10px; color: #a0a9b7}
.environment-dot {width: 6px; height: 6px; border-radius: 50%; background: #75be90; flex-shrink: 0}
.version {margin-left: auto; font-family: monospace}
.workspace {margin-left: var(--sidebar); min-height: 100dvh; display: flex; flex-direction: column; min-width: 0}
.topbar {height: 65px; padding: 0 26px; border-bottom: 1px solid var(--line); background: #fff; display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 25}
.breadcrumbs {display: flex; gap: 11px; align-items: center; color: var(--muted); font-size: 12px}
.breadcrumbs strong {color: var(--ink); font-weight: 550}
.topbar-account {display: flex; align-items: center; gap: 13px; margin-left: auto; min-width: 0}
.account {display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: 12px; min-width: 0}
.account:hover {text-decoration: none}
.account-name {max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.avatar {width: 31px; height: 31px; background: var(--primary-soft); color: var(--primary-dark); border-radius: 6px; display: grid; place-items: center; font-weight: 650; flex-shrink: 0}
.mobile-menu {display: none}
.content {padding: 25px 28px 40px; min-width: 0; flex: 1}
.page-head {display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 67px; padding-bottom: 19px; margin-bottom: 23px; border-bottom: 1px solid var(--line)}
.page-head .subline {font-size: 12px; color: var(--muted); margin-top: 7px}
.head-actions {display: flex; gap: 8px; align-items: center; flex-shrink: 0}
.toolbar {display: flex; align-items: center; gap: 11px; flex-wrap: wrap; margin-bottom: 18px}
.search-form {display: flex; gap: 8px; width: min(100%, 365px)}
.search-field {position: relative; min-width: 0; flex: 1}
.search-field .icon {position: absolute; left: 11px; top: 11px; color: var(--muted)}
.search-field input {padding-left: 35px; width: 100%; min-height: 36px; font-size: 12px}
.count {color: var(--muted); margin-left: auto; font-size: 12px}
.table-surface {background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line)}
.table-wrap {overflow: auto; width: 100%}
.data-table {width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; table-layout: fixed; min-width: 820px}
.data-table th {background: #f9fafb; font-weight: 550; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line)}
.data-table td {padding: 15px 14px; border-bottom: 1px solid #edf0f3; color: var(--text); vertical-align: middle; overflow-wrap: anywhere}
.data-table tr:last-child td {border-bottom: 0}
.data-table tr:hover td {background: #fafcff}
.data-table .service-col {width: 24%}
.data-table .category-col {width: 12%}
.data-table .owners-col {width: 15%}
.data-table .tags-col {width: 16%}
.data-table .status-col {width: 8%}
.data-table .time-col {width: 14%}
.data-table .actions-col {width: 118px}
.service-name {font-size: 13px; font-weight: 600; display: block; margin-bottom: 3px}
.service-key {font-size: 11px; color: var(--muted); overflow-wrap: anywhere}
.row-actions {display: flex; gap: 7px}
.row-actions .icon-btn {width: 28px; height: 28px; border-color: transparent; background: transparent}
.row-actions .icon-btn:hover {border-color: #dbeafe; background: var(--primary-soft)}
.row-actions .icon {width: 15px; height: 15px}
.owner-names {display: flex; flex-direction: column; gap: 2px}
.owner-names small {font-size: 10px; color: var(--muted)}
.pager {display: flex; align-items: center; justify-content: flex-end; gap: 9px; font-size: 12px; color: var(--muted); margin-top: 18px; flex-wrap: wrap}
.pager select {min-height: 32px; padding: 4px 6px; font-size: 12px; max-width: 110px}
.empty, .loading {padding: 65px 20px; text-align: center; color: var(--muted); font-size: 13px}
.empty > .icon, .loading > .icon {width: 31px; height: 31px; margin-bottom: 12px; color: #98a2b3}
.empty p {margin-bottom: 17px}
.error-state {padding: 26px 0; border-top: 1px solid #f4d4cf}
.error-state p {color: var(--red); margin: 0 0 14px; overflow-wrap: anywhere}
.error-state small {display: block; margin-bottom: 12px; color: var(--muted)}
.stats {display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-bottom: 1px solid var(--line); margin: 0 0 33px}
.stat {padding: 5px 22px 27px; min-width: 0; border-right: 1px solid var(--line)}
.stat:first-child {padding-left: 0}
.stat:last-child {border-right: 0}
.stat-top {display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px}
.stat-top .icon {color: var(--primary)}
.stat:nth-child(2) .icon {color: var(--green)}
.stat:nth-child(3) .icon {color: #92400e}
.stat strong {font-size: 33px; line-height: 1.5; display: block; margin-top: 9px; font-weight: 600}
.section-head {display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px}
.section-head a {display: flex; align-items: center; gap: 5px; font-size: 12px}
.profile {max-width: 850px; border-top: 1px solid var(--line); background: #fff}
.info-list {display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 0; margin: 0}
.info-list dt, .info-list dd {padding: 14px 18px; border-bottom: 1px solid #edf0f3; margin: 0; overflow-wrap: anywhere; font-size: 13px}
.info-list dt {color: var(--muted); background: #fafbfc}
.info-list dd {white-space: pre-wrap}
.workspace-footer {display: flex; gap: 15px; justify-content: space-between; border-top: 1px solid var(--line); padding: 13px 28px; font-size: 10px; color: #7d8796}
.labels-table {min-width: 540px}
.labels-table th:first-child {width: 55px}
.labels-table th:nth-child(2) {width: 32%}
.labels-table th:last-child {width: 110px}
dialog {width: min(650px, calc(100% - 28px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 25px 90px #20212433; color: var(--ink)}
dialog::backdrop {background: #20212466}
.modal-head {display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 23px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2}
.modal-head h2 {font-size: 17px}
.modal-body {padding: 22px 23px}
.form-grid {display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px 18px}
.field {display: flex; flex-direction: column; gap: 7px; min-width: 0}
.field.full {grid-column: 1 / -1}
.field input, .field select, .field textarea {width: 100%; font-size: 13px}
.field label {display: flex; align-items: center; gap: 4px}
.field .required {color: var(--red)}
.field .char-count {margin-left: auto; color: var(--muted); font-size: 11px; font-weight: 400}
.field input:disabled {color: var(--muted); background: #f9fafb}
.owner-select {display: flex; gap: 8px}
.owner-select select {flex: 1; width: auto}
.owner-list {list-style: none; margin: 5px 0 0; padding: 0; display: grid; gap: 7px}
.owner-list li {display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 5px; min-height: 43px}
.owner-list .owner-label {flex: 1; min-width: 0; overflow-wrap: anywhere}
.owner-list .icon-btn {width: 25px; height: 25px; border: 0; background: #f9fafb}
.owner-list .icon {width: 14px; height: 14px}
.modal-footer {display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; padding-top: 18px; margin-top: 21px; border-top: 1px solid var(--line)}
.dialog-message {font-size: 14px; overflow-wrap: anywhere}
.dialog-warning {font-size: 12px; color: var(--muted); margin-top: 12px}
.dialog-detail .info-list {border-top: 1px solid var(--line)}
.detail-name {font-size: 20px; margin-bottom: 4px; overflow-wrap: anywhere}
.detail-subline {font-size: 12px; color: var(--muted); margin-bottom: 20px}
.toast {position: fixed; bottom: 26px; left: calc(50% + var(--sidebar) / 2); transform: translateX(-50%); z-index: 110; background: #202124; color: #fff; padding: 11px 18px; border-radius: 6px; font-size: 13px; width: max-content; max-width: calc(100% - 34px); overflow-wrap: anywhere; box-shadow: 0 8px 25px #20212422}
.drawer-shade {position: fixed; inset: 0; border: 0; border-radius: 0; background: #20212466; z-index: 35}
@media (min-width: 1650px) {.content {padding: 30px 38px 45px}.data-table td {padding-top: 18px; padding-bottom: 18px}}
@media (max-width: 1100px) {:root {--sidebar: 205px}.brand {padding-left: 8px; padding-right: 8px}.brand strong {font-size: 15px}.content {padding: 23px 21px 35px}.topbar {padding: 0 21px}}
@media (max-width: 760px) {
  :root {--sidebar: 0px}
  .sidebar {width: 232px; transform: translateX(-100%); transition: transform .15s}
  .drawer-open .sidebar {transform: translateX(0)}
  .workspace {margin-left: 0}
  .mobile-menu {display: inline-grid}
  .topbar {height: 59px; padding: 0 13px; gap: 10px}
  .breadcrumbs {font-size: 11px; gap: 6px}
  .topbar-account {gap: 8px}
  .account-name {max-width: 74px; font-size: 11px}
  .account .badge {display: none}
  .avatar {width: 27px; height: 27px; font-size: 12px}
  .content {padding: 19px 14px 30px}
  h1 {font-size: 21px}
  .page-head {gap: 10px; min-height: 70px; flex-wrap: wrap; margin-bottom: 20px}
  .head-actions .btn {font-size: 12px; padding: 7px 10px}
  .toolbar {gap: 8px}
  .search-form {width: 100%}
  .count {margin-left: 0}
  .stats {margin-bottom: 26px}
  .stat {padding: 3px 11px 19px}
  .stat-top {font-size: 11px; gap: 5px}
  .stat-top .icon {width: 14px; height: 14px}
  .stat strong {font-size: 27px}
  .section-head h2 {font-size: 15px}
  .table-wrap {overscroll-behavior-x: contain}
  .workspace-footer {padding: 12px 14px}
  .form-grid {grid-template-columns: 1fr}
  .modal-head {padding: 14px 16px}
  .modal-body {padding: 18px 16px}
  .modal-head h2 {font-size: 16px}
  .info-list {grid-template-columns: 92px minmax(0, 1fr)}
  .info-list dt, .info-list dd {padding: 12px 10px; font-size: 12px}
  .login-brand {padding: 20px}
  .login-main {padding: 44px 0 65px}
  .login-footer {padding: 16px 20px; font-size: 10px}
  .toast {bottom: 18px}
}
@media (prefers-reduced-motion: reduce) {* {transition: none !important; animation: none !important}}
