:root {
  --bg: #f5f7f7;
  --surface: #fff;
  --ink: #202727;
  --muted: #747e7e;
  --line: #e5e9e8;
  --green: #167a61;
  --green-soft: #eaf5ef;
  --amber: #a96b19;
  --red: #bc4940;
}
* {
  box-sizing: border-box;
  letter-spacing: 0;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font:
    14px/1.55 "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--green);
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
button:hover {
  background: #f0f4f2;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
button img {
  width: 17px;
  height: 17px;
  flex: none;
}
button.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
  font-weight: 500;
}
button.primary:hover {
  background: #11644f;
}
button.primary img {
  filter: brightness(0) invert(1);
}
button.icon-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 8px;
  flex: none;
}
button.text-button {
  border: 0;
  background: transparent;
  padding: 6px 10px;
  color: var(--green);
}
input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #dce2df;
  border-radius: 5px;
  background: white;
  padding: 9px 12px;
  color: var(--ink);
}
input::placeholder,
textarea::placeholder {
  color: #99a1a0;
}
textarea {
  resize: vertical;
}
label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
}
input[readonly] {
  background: #f4f6f5;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  line-height: 1.4;
  font-weight: 650;
}
h2 {
  font-size: 19px;
  font-weight: 600;
}
.eyebrow {
  font-size: 10px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 5px;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
.green {
  color: var(--green);
}
.amber {
  color: var(--amber);
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 230px;
  background: #191f1f;
  color: #b9c2bf;
  display: flex;
  flex-direction: column;
  padding: 27px 17px 18px;
  z-index: 20;
}
.brand {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 14px 28px;
  font-size: 21px;
  font-weight: 650;
}
.brand img {
  filter: brightness(0) invert(1);
}
.brand small {
  font-size: 10px;
  font-weight: 500;
  color: #86948f;
  margin-left: 5px;
}
.workspace {
  padding: 14px 10px;
  border-top: 1px solid #333a37;
  border-bottom: 1px solid #333a37;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 25px;
  font-size: 12px;
  color: #e5e9e7;
}
.workspace small {
  display: block;
  color: #8c9a94;
  font-size: 10px;
}
.workspace-mark {
  background: #35443d;
  border: 1px solid #4e6356;
  border-radius: 5px;
  display: grid;
  place-items: center;
  width: 29px;
  height: 31px;
  font-size: 15px;
  color: #cce4d5;
}
.tag-outline {
  font-size: 8px;
  color: #a3b7ab;
  border: 1px solid #435249;
  border-radius: 3px;
  padding: 2px 4px;
  margin-left: auto;
}
.nav-section {
  font-size: 10px;
  color: #75867d;
  padding: 0 13px 9px;
}
nav {
  display: grid;
  gap: 4px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #aab6b0;
  text-decoration: none;
  padding: 12px 13px;
  border-radius: 5px;
  font-size: 13px;
}
nav a img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(0.68);
}
nav a:hover {
  background: #232d28;
}
nav a.active {
  background: #30443a;
  color: #eaf6ee;
  border-left: 2px solid #78b994;
  padding-left: 11px;
}
nav a.active img {
  filter: brightness(0) invert(1);
}
.nav-count {
  margin-left: auto;
  color: #c5d8cb;
  background: #43584b;
  border-radius: 4px;
  padding: 0 6px;
  font-size: 10px;
}
.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  font-size: 10px;
  padding: 18px 10px 0;
  border-top: 1px solid #333a37;
}
.sidebar-bottom > span:last-child {
  margin-left: auto;
  color: #78877f;
}
.status-dot {
  width: 6px;
  height: 6px;
  background: #7daf8f;
  border-radius: 50%;
}
.main {
  margin-left: 230px;
  min-width: 0;
}
.topbar {
  height: 67px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 33px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  gap: 16px;
}
.breadcrumb {
  font-size: 12px;
  color: #8a9490;
  display: flex;
  align-items: center;
  gap: 13px;
  white-space: nowrap;
}
.breadcrumb strong {
  font-weight: 500;
  color: #424e48;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 12px;
  min-width: 0;
}
.topbar-right #admin-login {
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #606d65;
}
.environment {
  font-size: 9px;
  font-weight: 650;
  background: #f5f0e1;
  color: #937935;
  border: 1px solid #ebe0bd;
  border-radius: 3px;
  padding: 3px 7px;
}
.topbar button {
  border: 0;
}
.content {
  max-width: 1650px;
  margin: 0 auto;
  padding: 32px 33px 0;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 29px;
}
.heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.heading-actions .muted {
  margin-right: 6px;
}
.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 21px 0 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 29px;
}
.summary-strip > div {
  padding: 0 25px;
  border-right: 1px solid var(--line);
}
.summary-strip > div:first-child {
  padding-left: 0;
}
.summary-strip > div:last-child {
  border: 0;
}
.summary-strip span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 7px;
}
.summary-strip strong {
  font-size: 29px;
  line-height: 1.2;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.data-section {
  min-width: 0;
}
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 17px;
}
.view-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
}
.count-badge {
  font-size: 11px;
  background: #e7ece9;
  color: #728176;
  padding: 1px 7px;
  border-radius: 4px;
  min-width: 24px;
  text-align: center;
}
.filter-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.search {
  position: relative;
  width: 280px;
  font-weight: 400;
}
.search img {
  position: absolute;
  width: 15px;
  height: 15px;
  left: 11px;
  top: 12px;
  opacity: 0.5;
}
.search input {
  min-height: 38px;
  height: 38px;
  padding-left: 34px;
  background: white;
  font-size: 12px;
}
.table-wrap {
  width: 100%;
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 5px 5px 0 0;
}
table {
  border-collapse: collapse;
  white-space: nowrap;
  width: 100%;
  min-width: 750px;
  font-size: 12px;
}
thead {
  background: #f0f4f2;
  color: #6b7770;
}
th {
  font-size: 11px;
  font-weight: 500;
  text-align: left;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}
td {
  height: 69px;
  padding: 12px 18px;
  border-bottom: 1px solid #edf0ee;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fafcfb;
}
.cell-primary {
  font-weight: 550;
  color: #34463b;
}
.cell-sub {
  font-size: 10px;
  color: #94a096;
  margin-top: 3px;
  max-width: 215px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 33px;
  border: 1px solid #dce7df;
  background: #edf3ee;
  color: #567660;
  border-radius: 6px;
  flex: none;
  font-size: 12px;
  font-weight: 600;
}
.user-cell {
  display: flex;
  align-items: center;
  gap: 11px;
}
.mono {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}
.numeric {
  font-variant-numeric: tabular-nums;
  font-family: "SFMono-Regular", Consolas, monospace;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1.4;
  color: #78817c;
  background: #f0f2f1;
}
.pill:before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.pill.ok {
  background: #eaf4ee;
  color: #367353;
}
.pill.wait {
  background: #fbf1df;
  color: #a17728;
}
.pill.bad {
  background: #fbebea;
  color: #a7534a;
}
.cell-actions {
  display: flex;
  gap: 3px;
  align-items: center;
}
.cell-actions button {
  min-height: 30px;
  font-size: 11px;
  padding: 4px 7px;
  border: 0;
  color: var(--green);
  background: transparent;
}
.cell-actions button:hover {
  background: var(--green-soft);
}
.cell-actions button.icon-button {
  width: 29px;
  height: 29px;
}
.cell-actions img {
  width: 14px;
  height: 14px;
}
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-top: 0;
  background: white;
  border-radius: 0 0 5px 5px;
  color: #8a938f;
  font-size: 11px;
}
.table-footer > div {
  display: flex;
  align-items: center;
  gap: 13px;
}
.table-footer button {
  width: 29px;
  height: 29px;
  min-height: 29px;
  border: 0;
}
.empty {
  border: 1px solid var(--line);
  background: white;
  text-align: center;
  padding: 63px 20px;
  color: #8b9690;
}
.empty img {
  opacity: 0.35;
  margin-bottom: 12px;
}
.empty h2 {
  font-size: 15px;
  color: #616d65;
  margin-bottom: 5px;
}
.empty p {
  font-size: 12px;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 10px;
  color: #98a39c;
  padding: 20px 0 22px;
}
.banner {
  border: 1px solid #edd5d1;
  padding: 11px 15px;
  background: #fff3ef;
  color: var(--red);
  border-radius: 5px;
  margin-bottom: 16px;
  font-size: 12px;
}
.login-brand {
  position: absolute;
  top: 40px;
  left: 45px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 21px;
}
.login-brand strong span {
  color: #8c9891;
  font-size: 12px;
  font-weight: 500;
}
.login-form {
  width: min(380px, calc(100% - 40px));
  margin: 140px auto 30px;
}
.login-form h1 {
  margin-bottom: 28px;
  font-size: 26px;
}
.login-form label {
  margin-bottom: 20px;
}
.login-form .primary {
  width: 100%;
  justify-content: space-between;
  margin-top: 10px;
}
.login-footer {
  border-top: 1px solid var(--line);
  margin-top: 36px;
  padding-top: 16px;
  color: #7c8981;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
}
.form-error {
  color: var(--red);
  font-size: 12px;
  min-height: 16px;
  white-space: normal;
}
.form-error:not(:empty) {
  margin: 8px 0;
}
dialog {
  width: min(460px, calc(100% - 32px));
  border: 1px solid #dce4df;
  border-radius: 8px;
  padding: 25px;
  color: var(--ink);
  box-shadow: 0 18px 80px #14211926;
  max-height: calc(100dvh - 32px);
  overflow: auto;
}
dialog::backdrop {
  background: #18221d66;
}
dialog label {
  margin: 18px 0;
}
dialog p {
  font-size: 13px;
  line-height: 1.7;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}
.dialog-heading .icon-button {
  border: 0;
  margin: -7px -7px -7px 0;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 19px;
  margin-top: 23px;
}
.pending-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 12px;
  background: #fbf4e5;
  border-radius: 4px;
  color: #956d25;
}
.pending-notice img {
  width: 17px;
  height: 17px;
  opacity: 0.55;
}
.detail-dialog {
  width: min(550px, calc(100% - 32px));
}
.detail-grid {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px 16px;
  margin: 18px 0 28px;
  font-size: 12px;
}
.detail-grid dt {
  color: var(--muted);
}
.detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.detail-actions {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.detail-actions button {
  font-size: 12px;
}
.key-user-search {
  margin-bottom: 7px;
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 30px);
  padding: 12px 22px;
  border-radius: 6px;
  background: #22352a;
  color: white;
  font-size: 13px;
  box-shadow: 0 4px 20px #13211622;
  z-index: 100;
}
#menu-button {
  display: none;
}
#table-wrap[aria-busy="true"] {
  opacity: 0.5;
}
@media (min-width: 1600px) {
  .content {
    padding-top: 42px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 205px;
    padding-inline: 13px;
  }
  .main {
    margin-left: 205px;
  }
  .content {
    padding: 25px 24px 0;
  }
  .topbar {
    padding: 0 24px;
  }
  .heading-actions .muted {
    display: none;
  }
  .search {
    width: 235px;
  }
  .workspace {
    gap: 5px;
  }
  .workspace-mark {
    display: none;
  }
}
@media (max-width: 760px) {
  .sidebar {
    transform: translateX(-100%);
    width: 230px;
    box-shadow: 12px 0 70px #12211833;
  }
  .sidebar.open {
    transform: none;
  }
  .main {
    margin-left: 0;
  }
  .topbar {
    height: 58px;
    padding: 0 15px;
    gap: 10px;
  }
  #menu-button {
    display: inline-flex;
  }
  .breadcrumb {
    margin-right: auto;
  }
  .topbar-right {
    gap: 8px;
  }
  .topbar-right #admin-login {
    display: none;
  }
  .content {
    padding: 22px 16px 0;
  }
  .page-heading {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 23px;
  }
  h1 {
    font-size: 24px;
  }
  .heading-actions {
    gap: 6px;
    padding-top: 7px;
  }
  .heading-actions button.primary {
    font-size: 12px;
    padding: 7px 10px;
  }
  .heading-actions button.icon-button {
    display: none;
  }
  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 0;
    padding: 20px 0;
  }
  .summary-strip > div:nth-child(odd) {
    padding-left: 0;
  }
  .summary-strip > div:nth-child(even) {
    border: 0;
  }
  .summary-strip strong {
    font-size: 26px;
  }
  .table-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .filter-controls {
    width: 100%;
    min-width: 0;
  }
  .search {
    width: 100%;
    min-width: 0;
  }
  .search input {
    font-size: 14px;
  }
  .page-footer span:last-child {
    display: none;
  }
  dialog {
    padding: 21px;
  }
  input,
  select,
  textarea {
    font-size: 16px;
  }
  .dialog-heading h2 {
    font-size: 18px;
  }
  .detail-grid {
    grid-template-columns: 100px minmax(0, 1fr);
  }
  .login-brand {
    left: 22px;
    top: 25px;
  }
  .login-form {
    margin-top: 125px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }
}
