:root {
  --ops-canvas: #f5f7f8;
  --ops-surface: #ffffff;
  --ops-surface-muted: #f8faf9;
  --ops-ink: #172126;
  --ops-muted: #68747b;
  --ops-line: #dce3e2;
  --ops-brand: #0f766e;
  --ops-brand-dark: #0b5f58;
  --ops-brand-soft: #e4f3ef;
  --ops-navy: #14262c;
  --ops-warning: #a76511;
  --ops-danger: #c43d31;
  --ops-shadow: 0 12px 28px rgba(25, 43, 45, 0.07);
}

body {
  background: var(--ops-canvas);
  color: var(--ops-ink);
}

button,
input,
select,
textarea {
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease, color 140ms ease;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 1px;
}

.auth-shell {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #10272a 0%, #17333a 54%, #345248 100%);
}

.auth-shell::before,
.auth-shell::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.auth-shell::before {
  width: 520px;
  height: 520px;
  top: -280px;
  right: -190px;
}

.auth-shell::after {
  width: 390px;
  height: 390px;
  bottom: -245px;
  left: -145px;
}

.auth-panel {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  padding: 32px;
  border: 1px solid rgba(220, 227, 226, 0.88);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(2, 16, 20, 0.26);
}

.brand {
  gap: 14px;
  margin-bottom: 28px;
}

.brand-mark,
.identity::before {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--ops-brand);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.brand h1 {
  font-size: 21px;
}

.brand span {
  margin-top: 3px;
  color: var(--ops-muted);
}

.segments {
  padding: 4px;
  border-color: var(--ops-line);
  background: var(--ops-surface-muted);
}

.segments button.active {
  background: var(--ops-surface);
  color: var(--ops-brand-dark);
  box-shadow: 0 2px 5px rgba(25, 43, 45, 0.1);
}

.field {
  color: #4f5d64;
  font-weight: 650;
}

.field input,
.field select,
.field textarea {
  border-color: #cad5d3;
  border-radius: 6px;
  background: #ffffff;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #9db5b0;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--ops-brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  outline: none;
}

.button {
  border-radius: 6px;
  background: var(--ops-brand);
  box-shadow: none;
  font-weight: 700;
}

.button:hover {
  background: var(--ops-brand-dark);
}

.button.secondary {
  border-color: #ccd7d5;
  background: #ffffff;
  color: #2f4145;
}

.button.secondary:hover {
  border-color: #82a49e;
  background: var(--ops-brand-soft);
  color: var(--ops-brand-dark);
}

.button.danger {
  background: var(--ops-danger);
}

.message {
  padding-top: 2px;
  color: var(--ops-muted);
}

.app {
  background: var(--ops-canvas);
}

.topbar {
  min-height: 68px;
  padding: 10px clamp(18px, 4vw, 56px);
  border-bottom-color: #233a3e;
  background: var(--ops-navy);
  box-shadow: 0 2px 10px rgba(11, 29, 32, 0.13);
}

.identity {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #ffffff;
}

.identity::before {
  content: "LKN";
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  background: #e5a92f;
  color: #172126;
  font-size: 11px;
}

.identity strong,
.identity span {
  display: block;
}

.identity strong {
  font-size: 14px;
}

.identity span {
  color: #aac0bd;
}

.topbar .button.secondary {
  border-color: #5d7777;
  background: transparent;
  color: #eff6f4;
}

.topbar .button.secondary:hover {
  border-color: #a7c5bf;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.workspace {
  width: min(1380px, 100%);
  padding: 30px clamp(18px, 4vw, 48px) 72px;
}

.page-head {
  min-height: 46px;
  margin: 0 0 16px;
}

.page-head h2 {
  color: #172126;
  font-size: 23px;
  font-weight: 800;
}

.page-head h2::after {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  margin-top: 7px;
  border-radius: 2px;
  background: #e5a92f;
}

.panel {
  padding: 20px;
  border-color: var(--ops-line);
  border-radius: 8px;
  background: var(--ops-surface);
  box-shadow: var(--ops-shadow);
}

.panel-head {
  min-height: 30px;
  padding-bottom: 13px;
  border-bottom: 1px solid #e6eceb;
}

.panel h3 {
  color: #1d2d31;
  font-size: 15px;
  font-weight: 800;
}

.claim-grid {
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.5fr) minmax(170px, 0.9fr) auto;
}

.table-wrap {
  border: 1px solid #e4ebea;
  border-radius: 6px;
}

table {
  font-size: 13px;
}

th,
td {
  padding: 13px 12px;
  border-bottom-color: #e7eceb;
}

th {
  background: #f4f7f6;
  color: #56666a;
  font-size: 11px;
  font-weight: 800;
}

tbody tr {
  transition: background 130ms ease;
}

tbody tr:hover {
  background: #f5faf8;
}

tbody tr:last-child td {
  border-bottom: 0;
}

code {
  color: #496064;
  font-size: 11px;
}

a {
  color: var(--ops-brand-dark);
  font-weight: 700;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef2f1;
  color: #536265;
  font-size: 12px;
}

.status.active {
  background: #e4f3ef;
  color: #0b6b52;
}

.status.awaiting_approval,
.status.pending {
  background: #fff4db;
  color: var(--ops-warning);
}

.status.suspended,
.status.expired {
  background: #feebea;
  color: var(--ops-danger);
}

.order-settlement {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.order-settlement.coin {
  color: #8a5a00;
  background: #fff3cf;
  border: 1px solid #efd48a;
}

.order-settlement.rmb {
  color: #1769aa;
  background: #e9f2fa;
  border: 1px solid #c7dced;
}

[data-manage-panel="orders"] table {
  min-width: 980px;
}

#manageView:not(.hidden) {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  align-items: start;
  column-gap: 22px;
}

#manageView > .page-head {
  grid-column: 1 / -1;
}

#manageView > .tabs {
  position: sticky;
  top: 88px;
  grid-column: 1;
  grid-row: 2 / span 12;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  padding: 8px;
  overflow: visible;
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  background: var(--ops-surface);
  box-shadow: var(--ops-shadow);
}

#manageView > .tabs::before {
  content: "商城工作区";
  padding: 8px 9px 11px;
  border-bottom: 1px solid #e7eceb;
  color: #6b787a;
  font-size: 11px;
  font-weight: 800;
}

#manageView > .tabs button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 4px;
  color: #5b6a6d;
  text-align: left;
}

#manageView > .tabs button:hover {
  background: #f1f6f4;
  color: #1e5651;
}

#manageView > .tabs button.active {
  border-bottom-color: transparent;
  border-left-color: var(--ops-brand);
  background: var(--ops-brand-soft);
  color: #0d625b;
}

#manageView > section[data-manage-panel] {
  grid-column: 2;
  min-width: 0;
  margin-bottom: 0;
}

.subhead {
  color: #2c3d40;
}

.switch-grid,
.item-row {
  border-color: #dbe5e2;
  background: #f7faf9;
}

details {
  padding: 10px 0;
}

summary {
  color: var(--ops-brand-dark);
  font-weight: 700;
}

dialog {
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(10, 28, 30, 0.34);
}

dialog::backdrop {
  background: rgba(13, 29, 32, 0.58);
}

dialog .panel {
  box-shadow: none;
}

@media (max-width: 960px) {
  #manageView:not(.hidden) {
    display: block;
  }

  #manageView > .tabs {
    position: static;
    display: flex;
    flex-direction: row;
    margin-bottom: 16px;
    overflow-x: auto;
  }

  #manageView > .tabs::before {
    display: none;
  }

  #manageView > .tabs button {
    width: auto;
    min-width: max-content;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }

  #manageView > .tabs button.active {
    border-left-color: transparent;
    border-bottom-color: var(--ops-brand);
  }

  #manageView > section[data-manage-panel] {
    margin-bottom: 16px;
  }
}

@media (max-width: 760px) {
  .auth-panel {
    padding: 24px;
  }

  .workspace {
    padding: 20px 14px 54px;
  }

  .topbar {
    min-height: 62px;
    flex-direction: row;
    align-items: center;
  }

  .identity strong {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar .button {
    min-width: 58px;
    padding: 0 10px;
  }

  .panel {
    padding: 15px;
  }

  .page-head {
    align-items: center;
  }

  .page-head h2 {
    font-size: 19px;
  }
}
