:root {
  --forest-950: #071f17;
  --forest-900: #0b3427;
  --forest-700: #1d6248;
  --yellow: #f2c334;
  --paper: #f4f6f3;
  --white: #ffffff;
  --ink: #17231d;
  --muted: #657269;
  --line: #d8dfda;
  --danger: #b83a2e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.55;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px clamp(18px, 4vw, 56px);
  background: var(--forest-950);
  color: var(--white);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 900;
}

.brand > span:last-child {
  display: grid;
}

.brand small {
  color: var(--yellow);
  font-size: 9px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--yellow);
  color: var(--forest-950);
  font-size: 20px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

main {
  width: min(1280px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(42px, 6vw, 80px) 0;
}

.login-panel {
  width: min(440px, 100%);
  margin: 5vh auto 0;
  padding: clamp(28px, 5vw, 46px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 18px 44px rgba(7, 31, 23, 0.1);
}

.login-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 50%;
  background: #eaf2ec;
  color: var(--forest-700);
}

.login-icon .icon {
  width: 22px;
  height: 22px;
}

.kicker {
  margin: 0 0 8px;
  color: var(--forest-700);
  font-size: 11px;
  font-weight: 900;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
}

.login-panel > p:not(.kicker),
.dashboard-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.login-panel form {
  margin-top: 30px;
}

.login-panel label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
}

.password-field {
  position: relative;
}

.password-field input {
  width: 100%;
  height: 48px;
  padding: 0 52px 0 14px;
  border: 1px solid #bdc8c0;
  border-radius: 4px;
  background: #fbfcfb;
  outline: none;
}

.password-field input:focus {
  border-color: var(--forest-700);
  box-shadow: 0 0 0 3px rgba(29, 98, 72, 0.12);
}

.password-field button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.password-field .eye-off,
.password-field.is-visible .eye-on {
  display: none;
}

.password-field.is-visible .eye-off {
  display: block;
}

.status-text {
  min-height: 22px;
  margin: 8px 0;
  color: var(--danger);
  font-size: 12px;
}

.primary-button,
.icon-text-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  width: 100%;
  background: var(--yellow);
  color: var(--forest-950);
}

.primary-button:disabled,
.icon-text-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.icon-text-button {
  border-color: #bdc8c0;
  background: var(--white);
  color: var(--forest-900);
}

.icon-text-button:hover {
  border-color: var(--forest-700);
  background: #edf3ef;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--white);
}

.metrics article {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.metrics article:last-child {
  border-right: 0;
}

.metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metrics strong {
  font-size: 32px;
  line-height: 1;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 150px auto auto;
  gap: 10px;
  margin-top: 20px;
}

.toolbar input,
.toolbar select {
  width: 100%;
  height: 44px;
  border: 1px solid #bdc8c0;
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  outline: none;
}

.toolbar input:focus,
.toolbar select:focus {
  border-color: var(--forest-700);
  box-shadow: 0 0 0 3px rgba(29, 98, 72, 0.12);
}

.toolbar select {
  padding: 0 12px;
}

.search-field {
  position: relative;
}

.search-field .icon {
  position: absolute;
  top: 13px;
  left: 13px;
  color: var(--muted);
}

.search-field input {
  padding: 0 14px 0 42px;
}

.dashboard-status {
  min-height: 24px;
  margin: 12px 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-status.is-error {
  color: var(--danger);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--white);
}

table {
  width: 100%;
  min-width: 1020px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #edf2ee;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

td {
  font-size: 13px;
}

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

.cell-stack {
  display: grid;
  gap: 3px;
}

.cell-stack strong {
  font-size: 13px;
}

.cell-stack span,
.cell-stack small {
  color: var(--muted);
}

.contact-link {
  color: var(--forest-700);
  font-weight: 700;
}

.message {
  max-width: 300px;
  margin-top: 7px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.status-select {
  min-width: 100px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid #bdc8c0;
  border-radius: 4px;
  background: var(--white);
}

.empty-state {
  padding: 54px 20px;
  color: var(--muted);
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 860px) {
  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .metrics article:nth-child(2) {
    border-right: 0;
  }

  .metrics article:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .search-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  main {
    width: min(100% - 24px, 1280px);
    padding-top: 30px;
  }

  .admin-header {
    padding-inline: 14px;
  }

  .back-link {
    font-size: 0;
  }

  .back-link .icon {
    width: 22px;
    height: 22px;
  }

  .dashboard-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .metrics article {
    min-height: 94px;
    padding: 16px;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .search-field {
    grid-column: auto;
  }

  .toolbar .icon-text-button {
    width: 100%;
  }
}
