:root {
  color-scheme: light;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #14201d;
  background: #f7f4ed;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.topbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(87, 109, 99, 0.24);
  background: #fffdf7;
}
.brand { color: #14201d; font-weight: 700; text-decoration: none; }
.topbar span { color: #64736d; font-size: 14px; }
.topbar button { margin-left: auto; border: 1px solid rgba(87, 109, 99, 0.42); border-radius: 6px; padding: 7px 10px; color: #14201d; background: #fffdf7; }

main { width: min(1100px, calc(100% - 32px)); margin: 42px auto; }
.site-footer {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 40px;
  text-align: center;
  font-size: 13px;
  color: #64736d;
}
.site-beian {
  color: inherit;
  text-decoration: none;
}
.site-beian:hover {
  color: #14201d;
  text-decoration: underline;
}
.site-footer-company { margin: 0 0 6px; color: #42524b; font-weight: 600; letter-spacing: 0.02em; }
.site-footer-meta { margin: 0; color: #64736d; display: inline-flex; flex-wrap: wrap; gap: 6px 10px; justify-content: center; align-items: center; }
.site-footer-divider { color: #8a9a93; }
.site-contact { color: inherit; text-decoration: none; }
.site-contact:hover { color: #14201d; text-decoration: underline; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: 22px; }
h2 { font-size: 15px; }
p { color: #64736d; font-size: 14px; }

.auth-panel { width: min(420px, 100%); }
form { display: grid; gap: 14px; }
label { display: grid; gap: 7px; color: #42524b; font-size: 14px; }
input, select { min-width: 0; height: 38px; padding: 0 10px; border: 1px solid rgba(39, 105, 91, 0.42); border-radius: 6px; color: #14201d; background: #fffdf7; }
form > button, .issued button { min-height: 38px; border: 0; border-radius: 6px; color: #fffdf7; background: #27695b; }
.feedback { min-height: 20px; margin: 12px 0 0; color: #a13d35; }

.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-heading button { border: 1px solid rgba(39, 105, 91, 0.42); border-radius: 6px; min-height: 34px; padding: 0 12px; color: #27695b; background: #fffdf7; }
.admin-block { margin-top: 30px; }
.block-heading { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.block-heading h2, .block-heading p { margin-bottom: 0; }
.grant-form { grid-template-columns: minmax(220px, 1fr) minmax(170px, 220px) 110px; align-items: end; padding: 18px 0; border-top: 1px solid rgba(87, 109, 99, 0.2); border-bottom: 1px solid rgba(87, 109, 99, 0.2); }

.issued { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 20px 0; padding: 14px; border-left: 3px solid #27695b; background: #eef4f0; }
.issued h2 { margin: 0; }
.issued output { overflow-wrap: anywhere; color: #14201d; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.issued button { width: 64px; }

.token-table-wrap { overflow-x: auto; margin-top: 24px; border-top: 1px solid rgba(87, 109, 99, 0.2); }
table { width: 100%; min-width: 780px; border-collapse: collapse; text-align: left; font-size: 13px; }
th, td { padding: 13px 10px; border-bottom: 1px solid rgba(87, 109, 99, 0.18); vertical-align: middle; }
th { color: #64736d; font-weight: 600; }
td { color: #25342e; }
.status-active { color: #27695b; }
.status-revoked { color: #a13d35; }
.revoke { border: 1px solid rgba(161, 61, 53, 0.5); border-radius: 5px; padding: 5px 8px; color: #a13d35; background: transparent; }
.secondary { border: 1px solid rgba(39, 105, 91, 0.42); border-radius: 5px; padding: 5px 8px; color: #27695b; background: transparent; white-space: nowrap; }
.revoke:disabled { cursor: default; opacity: 0.45; }
.secondary:disabled { cursor: default; opacity: 0.45; }

@media (max-width: 680px) {
  .topbar { padding: 0 16px; }
  main { width: min(100% - 24px, 1100px); margin: 26px auto; }
  .grant-form { grid-template-columns: 1fr; }
  .issued { grid-template-columns: 1fr; }
  .issued button { width: 100%; }
}
