:root {
  font:
    16px/1.6 "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  color: #18362e;
  background: #f3f6f5;
  --primary: #23654e;
  --line: #dce6e1;
  --muted: #64786e;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 9px;
  color: #18362e;
  font-weight: 600;
}
button:hover {
  background: #eaf3ee;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
button.danger {
  color: #a23434;
}
input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #b9cbc1;
  border-radius: 8px;
  background: white;
  color: #18362e;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
  height: 20px;
  accent-color: var(--primary);
}
label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}
:focus-visible {
  outline: 3px solid #75b093;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0 0 14px;
}
h1 {
  font-size: 28px;
  line-height: 1.35;
}
h2 {
  font-size: 19px;
}
h3 {
  font-size: 16px;
}
small,
.meta {
  font-size: 13px;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 6px;
}
.ops-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
}
.ops-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #173b32;
  color: white;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.brand {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand small {
  display: block;
  color: #b1cbbd;
  font-size: 12px;
  letter-spacing: 0.12em;
  margin-top: 3px;
}
.ops-nav {
  display: grid;
  gap: 9px;
}
.ops-nav button {
  text-align: left;
  background: transparent;
  color: #deebe4;
  border-color: transparent;
}
.ops-nav button:hover,
.ops-nav button.active {
  background: #2d5847;
  color: white;
}
.sidebar-note {
  margin-top: auto;
  font-size: 12px;
  color: #b1cbbd;
}
.ops-main {
  min-width: 0;
  padding: 30px 36px 60px;
}
.topbar,
.heading,
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.topbar p {
  margin: 0;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.heading {
  margin-bottom: 22px;
  align-items: flex-start;
}
.heading p {
  margin: 5px 0 0;
}
.card {
  background: white;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 20px;
  min-width: 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.metric {
  margin: 0;
}
.metric .value {
  font-size: 29px;
  line-height: 1.35;
  font-weight: 700;
  margin-bottom: 4px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.stack {
  display: grid;
  gap: 18px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.language-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 5px 12px;
}
.notice {
  border: 1px solid #e5cf91;
  background: #fff7e3;
  color: #795713;
  border-radius: 10px;
  padding: 13px 16px;
  margin-bottom: 20px;
  font-size: 14px;
}
.badge {
  display: inline-block;
  border-radius: 20px;
  padding: 3px 9px;
  font-size: 12px;
  white-space: nowrap;
  background: #eef3ef;
  color: #3e6150;
}
.badge.paid,
.badge.success {
  background: #e0f3e6;
  color: #27613e;
}
.badge.processing,
.badge.pending {
  background: #fff2d9;
  color: #805b10;
}
.badge.failed {
  background: #fbe7e4;
  color: #9b3434;
}
.table-wrap {
  overflow: auto;
  max-width: 100%;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  background: #f7f9f8;
}
td {
  overflow-wrap: anywhere;
}
td small {
  display: block;
  white-space: nowrap;
}
td .order-id {
  display: block;
  max-width: 190px;
  font-size: 12px;
  color: var(--muted);
}
.filters {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 150px auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 20px;
}
.empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
}
.login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 960px;
  margin: 12vh auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: white;
}
.login-story {
  padding: 64px 44px;
  background: #173b32;
  color: white;
}
.login-story h1 {
  font-size: 36px;
  margin: 48px 0 20px;
}
.login-story p {
  color: #bed5c8;
}
.login-form {
  padding: 56px 44px;
}
.login-form form {
  display: grid;
  gap: 16px;
}
.loading {
  padding: 30px;
  color: var(--muted);
}
#operator-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(90vw, 700px);
  padding: 12px 20px;
  background: #173b32;
  color: white;
  border-radius: 10px;
  z-index: 100;
  box-shadow: 0 8px 30px #19382c30;
}
#operator-toast:empty {
  display: none;
}
dialog {
  width: min(92vw, 600px);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  color: #18362e;
}
dialog::backdrop {
  background: #112a2355;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
@media (max-width: 1100px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ops-main {
    padding: 24px;
  }
  .ops-shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
}
@media (max-width: 720px) {
  .ops-shell {
    display: block;
  }
  .ops-sidebar {
    position: static;
    height: auto;
    padding: 20px;
    gap: 18px;
  }
  .ops-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }
  .ops-nav button {
    text-align: center;
    padding: 8px 4px;
    font-size: 13px;
  }
  .sidebar-note {
    display: none;
  }
  .ops-main {
    padding: 20px 14px 40px;
  }
  .topbar {
    align-items: flex-start;
  }
  .heading {
    display: block;
  }
  .heading .toolbar {
    margin-top: 12px;
  }
  .card {
    padding: 18px;
  }
  .grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .metrics {
    gap: 10px;
  }
  .metric .value {
    font-size: 23px;
  }
  .filters {
    grid-template-columns: 1fr;
  }
  .login {
    display: block;
    margin: 24px 16px;
  }
  .login-story {
    padding: 28px;
  }
  .login-story h1 {
    font-size: 29px;
    margin: 26px 0 14px;
  }
  .login-form {
    padding: 28px;
  }
  .topbar .meta {
    display: none;
  }
  h1 {
    font-size: 25px;
  }
}
