/* web/styles/admin/foundation.css */
:root {
  font-family:
    "Helvetica Neue",
    Arial,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #20362c;
  background: #f7f7f2;
  font-synthesis: none;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button {
  border: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid #b59b61;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -0.05em;
  font-weight: 550;
  margin-bottom: 0;
}
h2 {
  font-size: 19px;
  font-weight: 550;
}
h3 {
  font-size: 15px;
  font-weight: 550;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.11em;
  color: #6c7b71;
  line-height: 1.7;
}
.muted,
.page-description {
  color: #5e6d64;
  line-height: 1.9;
}
.primary,
.secondary {
  padding: 11px 16px;
  border-radius: 8px;
  min-height: 40px;
  white-space: nowrap;
}
.primary {
  background: #1f4033;
  color: white;
}
.secondary {
  background: #fff;
  border: 1px solid #dbe1d8;
  color: #3f5a4b;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.brand b {
  font-size: 36px;
  letter-spacing: -0.09em;
}
.brand span {
  color: #b59b61;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #5e6d64;
}
input,
select,
textarea {
  color: #20362c;
  border: 1px solid #dbe1d8;
  border-radius: 8px;
  background: white;
  padding: 11px 12px;
  min-width: 0;
  max-width: 100%;
}

/* web/styles/admin/login.css */
.login-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
}
.login-card {
  width: 100%;
  max-width: 435px;
  background: white;
  border: 1px solid #dbe1d8;
  border-radius: 20px;
  padding: 36px;
}
.login-card h1 {
  font-size: 29px;
  margin-bottom: 18px;
}
.login-card input {
  width: 100%;
  margin-top: 8px;
}
.login-card .primary {
  width: 100%;
}
.login-card form {
  margin-top: 28px;
}
.login-card .back-link {
  font-size: 12px;
  display: inline-block;
  margin-top: 24px;
  color: #5e6d64;
}
.message {
  min-height: 18px;
  font-size: 12px;
  line-height: 1.7;
  color: #796030;
  margin: 14px 0;
}
.security-message {
  font-size: 12px;
  color: #5e6d64;
}
.security-cancel {
  font-size: 12px;
  text-decoration: underline;
  background: transparent;
  color: #5e6d64;
}
#login-challenge:not(:empty) {
  margin-top: 18px;
}

/* web/styles/admin/layout.css */
.admin-shell {
  display: flex;
  min-height: 100dvh;
}
.sidebar {
  width: 222px;
  flex: 0 0 222px;
  position: sticky;
  top: 0;
  height: 100dvh;
  border-right: 1px solid #dbe1d8;
  background: #f1f3ec;
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
}
.sidebar .brand {
  margin-bottom: 6px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 30px;
}
.sidebar nav button {
  text-align: left;
  background: none;
  padding: 12px 14px;
  border-radius: 8px;
  color: #5e6d64;
  font-size: 13px;
}
.sidebar nav button.active {
  background: #1f4033;
  color: white;
}
.sidebar nav span {
  font-size: 10px;
  color: #7b877e;
  margin: 22px 14px 6px;
}
.sidebar-bottom {
  margin-top: auto;
  font-size: 11px;
  color: #7b877e;
  padding-top: 20px;
}
.sidebar-bottom button {
  background: none;
  color: #3f5a4b;
  padding: 8px 0;
}
.admin-main {
  padding: 38px 42px;
  min-width: 0;
  flex: 1;
  max-width: 1650px;
}
.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.admin-top .eyebrow {
  margin-bottom: 10px;
}
.page-description {
  font-size: 12px;
  margin: 16px 0 22px;
}
.filters {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px;
  background: #fff;
  border: 1px solid #dbe1d8;
  border-radius: 12px;
}
.filters input {
  font-size: 12px;
}
.filters label {
  gap: 7px;
  font-size: 11px;
}
#search-label {
  flex: 1;
  min-width: 170px;
}

/* web/styles/admin/reports.css */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin: 20px 0;
}
.metric {
  background: #fff;
  padding: 23px;
  border: 1px solid #dbe1d8;
  border-radius: 12px;
  min-width: 0;
}
.metric p {
  color: #5e6d64;
  font-size: 12px;
  margin-bottom: 13px;
}
.metric strong {
  font-size: 30px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  letter-spacing: -0.025em;
}
.metric small {
  display: block;
  color: #859084;
  font-size: 10px;
  line-height: 1.7;
  margin-top: 12px;
}
.metric.featured {
  background: #1f4033;
  color: white;
  border-color: #1f4033;
}
.metric.featured p,
.metric.featured small {
  color: #cbd6ca;
}
.report-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  margin: 18px 0;
}
.card {
  border: 1px solid #dbe1d8;
  border-radius: 12px;
  background: white;
  padding: 24px;
  margin-bottom: 18px;
  min-width: 0;
}
.report-grid .card {
  margin-bottom: 0;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.card-head span {
  font-size: 10px;
  color: #859084;
}
.empty {
  text-align: center;
  padding: 45px 18px;
  color: #859084;
  font-size: 13px;
  line-height: 1.8;
}
.table-scroll {
  overflow: auto;
  border: 1px solid #dbe1d8;
  border-radius: 12px;
  background: white;
  margin: 20px 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
  font-size: 12px;
}
th {
  background: #eff2ea;
  color: #5e6d64;
  font-size: 11px;
  font-weight: 500;
  padding: 15px 17px;
  border-bottom: 1px solid #dbe1d8;
}
td {
  padding: 16px 17px;
  border-bottom: 1px solid #eef0e9;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fafbf7;
}
.id-link {
  font: inherit;
  color: #3d6b51;
  background: none;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.tag {
  font-size: 10px;
  border-radius: 5px;
  background: #e8eee2;
  padding: 5px 8px;
  color: #3f624c;
}
.tag.hold,
.tag.expired {
  background: #f5e8dd;
  color: #8b5d39;
}
.tag.observe,
.tag.pending {
  background: #f5efdf;
  color: #796030;
}
.tag.cleared,
.tag.claimed {
  background: #e8eee2;
  color: #3f624c;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #5e6d64;
}
.pagination > div {
  display: flex;
  gap: 9px;
}
.admin-footnote {
  font-size: 11px;
  line-height: 1.8;
  color: #859084;
  margin-top: 28px;
}
.chart {
  height: 190px;
  display: flex;
  gap: 4px;
  align-items: flex-end;
  margin-top: 28px;
  border-bottom: 1px solid #dbe1d8;
  padding: 0 4px;
}
.chart-bar {
  background: #8fae92;
  flex: 1;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  position: relative;
}
.chart-bar:hover {
  background: #1f4033;
}
.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 10px;
  color: #859084;
}
.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid #eef0e9;
  font-size: 13px;
}
.breakdown-row:last-child {
  border-bottom: 0;
}
.breakdown-row small {
  font-size: 10px;
  color: #859084;
  margin-left: 7px;
}
.reconciliation {
  padding: 17px 20px;
  border: 1px solid #dbe1d8;
  background: #e8eee2;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.8;
}
.reconciliation.error {
  background: #f5e8dd;
}

/* web/styles/admin/details.css */
.detail-dialog {
  width: min(900px, calc(100% - 32px));
  max-height: 90dvh;
  border: 1px solid #dbe1d8;
  border-radius: 16px;
  padding: 26px;
  color: #20362c;
  background: #f7f7f2;
}
.detail-dialog::backdrop {
  background: #122c2155;
  backdrop-filter: blur(4px);
}
.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
}
.detail-head h2 {
  margin: 0;
}
.detail-head button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e8eee2;
  font-size: 22px;
  color: #3f624c;
}
.detail-dialog .metrics {
  grid-template-columns: repeat(3, 1fr);
}
.detail-dialog .metric {
  padding: 18px;
}
.detail-dialog .metric strong {
  font-size: 24px;
}
.detail-dialog .table-scroll {
  margin: 12px 0 24px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.detail-grid dt {
  color: #859084;
}
.detail-grid dd {
  margin: 0;
}
.review-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}
.review-form textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
}
.review-form .primary {
  justify-self: start;
}
.inline-note {
  font-size: 11px;
  color: #859084;
  line-height: 1.9;
}
.pool-progress {
  width: 100%;
  height: 9px;
  accent-color: #1f4033;
}
.activity-message {
  padding: 12px 0;
  border-bottom: 1px solid #dbe1d8;
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
}
.activity-message small {
  display: block;
  color: #859084;
}
.error-text {
  color: #9e5136;
}
@media (max-width: 1100px) {
  .admin-main {
    padding: 30px 24px;
  }
  .sidebar {
    width: 190px;
    flex-basis: 190px;
    padding: 25px 18px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .report-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .admin-shell {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 18px 20px;
    border-bottom: 1px solid #dbe1d8;
    border-right: 0;
  }
  .sidebar > .eyebrow {
    display: none;
  }
  .sidebar .brand {
    margin-bottom: 12px;
  }
  .sidebar .brand img {
    width: 30px;
    height: 30px;
  }
  .sidebar .brand b {
    font-size: 28px;
  }
  .sidebar nav {
    flex-direction: row;
    overflow-x: auto;
    margin: 0;
    gap: 5px;
    padding-bottom: 3px;
  }
  .sidebar nav button {
    white-space: nowrap;
    padding: 10px 12px;
  }
  .sidebar nav span,
  .sidebar-bottom p {
    display: none;
  }
  .sidebar-bottom {
    position: absolute;
    right: 20px;
    top: 14px;
    padding: 0;
    font-size: 12px;
  }
  .admin-main {
    padding: 26px 18px;
  }
  .admin-top h1 {
    font-size: 28px;
  }
  .admin-top .secondary {
    font-size: 12px;
    padding: 9px;
  }
  .filters {
    padding: 14px;
    gap: 10px;
  }
  .filters label {
    flex: 1;
    min-width: 120px;
  }
  .filters button {
    flex: 1;
  }
  .metric {
    padding: 18px;
  }
  .metric strong {
    font-size: 25px;
  }
  .metrics {
    gap: 10px;
  }
  .card {
    padding: 20px;
  }
  .detail-dialog {
    padding: 20px;
  }
  .detail-dialog .metrics {
    grid-template-columns: 1fr;
  }
  .detail-grid {
    grid-template-columns: 85px 1fr;
  }
  .login-card {
    padding: 28px;
  }
  .pagination {
    gap: 8px;
    font-size: 11px;
  }
  .pagination button {
    font-size: 11px;
    padding: 8px;
  }
}

/* web/styles/admin.css */
