:root {
  --ink: #223b35;
  --soft: #647871;
  --green: #236955;
  --mint: #edf4ee;
  --line: #dce4dc;
  --paper: #f7f8f4;
  --amber: #935c1d;
  --red: #9c4136;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 20% 0%, #e8f1e8, var(--paper) 55%);
  color: var(--ink);
  font: 15px/1.7 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
.card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px 30px;
  box-shadow: 0 18px 60px #234e3a14;
}
h1 { font-size: 25px; margin: 0 0 6px; letter-spacing: 1px; }
.sub { color: var(--soft); font-size: 13px; margin: 0 0 24px; }
label { display: block; font-size: 13px; font-weight: 650; margin: 16px 0 6px; }
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
  outline: none;
}
input:focus { border-color: var(--green); box-shadow: 0 0 0 3px #2369551a; }
button {
  width: 100%;
  margin-top: 22px;
  border: 0;
  border-radius: 9px;
  padding: 12px;
  background: var(--green);
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
button:disabled { opacity: .6; cursor: default; }
.link { display: block; margin-top: 18px; text-align: center; font-size: 13px; color: var(--green); text-decoration: none; }
.error { background: #fff0ed; color: var(--red); border: 1px solid #f0d3cc; border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-top: 14px; }
.ok { background: var(--mint); color: var(--green); border: 1px solid #d4e2d4; border-radius: 8px; padding: 12px; font-size: 13px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 16px; }
.table th, .table td { text-align: left; border-bottom: 1px solid var(--line); padding: 10px 8px; }
.table th { background: var(--mint); }
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.badge { display: inline-block; border-radius: 5px; padding: 2px 7px; font-size: 12px; background: var(--mint); color: var(--green); }
.badge.pending { background: #fff5e6; color: var(--amber); }
.badge.blocked { background: #fff0ed; color: var(--red); }
.actions { display: flex; gap: 8px; }
.actions button { width: auto; margin: 0; padding: 5px 10px; font-size: 12px; }
.actions .plain { background: #fff; color: var(--green); border: 1px solid var(--line); }
.wide { max-width: 860px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.topbar a, .topbar button { color: var(--green); font-size: 13px; }
.topbar button { width: auto; margin: 0; background: none; padding: 0; }
.muted { color: var(--soft); font-size: 12px; }
.tab {
  width: auto;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  font-size: 13px;
  font-weight: 650;
}
.tab:hover { border-color: var(--green); }

@media (max-width: 720px) {
  body { padding: 10px; align-items: flex-start; }
  .card { padding: 20px 16px; border-radius: 14px; }
  .wide { max-width: 100%; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .topbar .actions { width: 100%; flex-wrap: wrap; gap: 12px; }
  .topbar a, .topbar button { white-space: nowrap; }
  .topbar h1 { font-size: 20px !important; }
  #tabs { gap: 8px !important; }
  .tab { flex: 0 0 auto; }
  .table-scroll { overflow: visible; margin: 0; padding: 0; }
  .table { min-width: 0; width: 100%; margin-top: 8px; }
  .table thead { display: none; }
  .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr {
    border: 1px solid var(--line);
    border-radius: 12px;
    margin: 10px 0;
    padding: 8px 12px;
    background: #fff;
  }
  .table td {
    border: 0;
    padding: 5px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    white-space: normal;
    font-size: 13px;
  }
  .table td::before {
    content: attr(data-label);
    color: var(--soft);
    font-size: 12px;
    flex: 0 0 62px;
  }
  .table td:last-child {
    border-top: 1px dashed var(--line);
    margin-top: 6px;
    padding-top: 8px;
  }
  .table td.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
  }
  .table td.actions::before { flex-basis: 62px; }
  .table td.actions button { width: auto; margin: 0; }
}
