:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif;
  color: #18201c;
  background: #f3f5f3;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #f3f5f3; }
h1, h2, p { margin: 0; }
h1 { font-size: 21px; font-weight: 680; letter-spacing: 0; }
h2 { font-size: 19px; font-weight: 680; letter-spacing: 0; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  color: #f7faf8;
  background: #17201b;
  border-bottom: 1px solid #29362f;
}
.header-inner {
  max-width: 1280px;
  min-height: 76px;
  margin: 0 auto;
  padding: 13px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark, .login-badge {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 7px;
  background: #2c8a5b;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.eyebrow, .section-kicker {
  color: #84968c;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 780;
  letter-spacing: .08em;
}
.brand-lockup .eyebrow { color: #91a198; margin-bottom: 2px; }
.header-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

main { max-width: 1280px; margin: 0 auto; padding: 28px; }
section { padding: 26px 0; border-bottom: 1px solid #dce2de; }
section:first-child { padding-top: 0; }
.protected-section[hidden], .admin-control[hidden], .control-login[hidden] { display: none; }

.control-login {
  width: min(860px, 100%);
  min-height: 460px;
  margin: 48px auto 24px;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(320px, 1.1fr);
  overflow: hidden;
  background: #fff;
  border: 1px solid #d9e0dc;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgb(25 39 31 / 8%);
}
.login-intro {
  padding: 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #f5f8f6;
  background: #1b2720;
}
.login-intro .login-badge { width: 54px; height: 54px; margin-bottom: 32px; }
.login-intro .eyebrow { color: #8fa298; margin-bottom: 7px; }
.login-intro h2 { font-size: 28px; margin-bottom: 10px; }
.login-intro > p:last-child { max-width: 250px; color: #b7c2bc; font-size: 14px; line-height: 1.65; }
.login-fields { padding: 46px; display: grid; align-content: center; gap: 18px; }

label { display: grid; gap: 7px; color: #45534b; font-size: 13px; font-weight: 650; }
input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #bac5bf;
  border-radius: 6px;
  padding: 10px 12px;
  color: #17201b;
  background: #fff;
  font: inherit;
  outline: none;
}
input:focus { border-color: #2c8a5b; box-shadow: 0 0 0 3px rgb(44 138 91 / 12%); }

button {
  appearance: none;
  min-height: 36px;
  border: 1px solid #b9c4be;
  border-radius: 6px;
  padding: 8px 12px;
  color: #29352e;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 680;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
}
button:hover { border-color: #78877f; background: #f7f9f7; }
button.primary { border-color: #246f4c; color: #fff; background: #246f4c; }
button.primary:hover { border-color: #1e6041; background: #1e6041; }
button.danger { color: #9b352d; }
button:disabled { opacity: .5; cursor: default; }
.quiet-button { border-color: #405048; color: #dce4df; background: transparent; }
.quiet-button:hover { border-color: #687a70; background: #243029; }

.status, .pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}
.status { padding: 7px 11px; }
.pill { padding: 5px 9px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.good, .pill.active { color: #17613b; background: #dff1e6; }
.status.bad, .pill.revoked { color: #8c3028; background: #f8e2df; }
.status.neutral, .pill.pending { color: #56645c; background: #e6ebe8; }
.app-header .status.good { color: #c3f0d5; background: #263e31; }
.app-header .status.bad { color: #ffd0cb; background: #492c2a; }
.app-header .status.neutral { color: #d6dfda; background: #2b3730; }

.checkpoint { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 18px; }
.section-copy > p:last-child, .workstation-heading > div > p:last-child { margin-top: 7px; color: #68766e; font-size: 13px; }
.section-kicker { margin-bottom: 5px; }
.recognition {
  grid-column: 1 / -1;
  min-height: 126px;
  padding: 24px 26px;
  display: flex;
  align-items: center;
  gap: 17px;
  border: 1px solid transparent;
  border-radius: 8px;
}
.recognition-indicator { width: 12px; height: 64px; flex: 0 0 12px; border-radius: 3px; background: currentColor; opacity: .8; }
.recognition strong { display: block; font-size: 28px; line-height: 1.2; }
.recognition span { display: block; margin-top: 7px; font-size: 14px; }
.recognition.waiting { border-color: #dce2de; color: #59675f; background: #eef1ef; }
.recognition.accepted { border-color: #bee0ca; color: #135d37; background: #e1f3e7; }
.recognition.denied { border-color: #edc7c2; color: #8a2d25; background: #fae6e3; }

.section-heading { min-height: 42px; margin-bottom: 15px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.workstation-heading { align-items: flex-end; }
.actions { display: flex; align-items: center; gap: 7px; }
.count-label { color: #647168; font-size: 13px; font-weight: 650; }
.table-wrap { width: 100%; overflow: auto; border: 1px solid #dce2de; border-radius: 7px; background: #fff; }
table { width: 100%; min-width: 940px; border-collapse: collapse; table-layout: auto; }
#events-section table { min-width: 700px; }
th, td { padding: 13px 14px; border-bottom: 1px solid #e4e9e6; text-align: left; vertical-align: middle; font-size: 13px; line-height: 1.35; }
th { color: #59675f; background: #f4f6f4; font-size: 11px; font-weight: 750; text-transform: uppercase; white-space: nowrap; }
tbody tr:hover { background: #fafbfa; }
tr:last-child td { border-bottom: 0; }
td strong { font-weight: 700; }
td small { display: block; max-width: 310px; margin-top: 3px; overflow: hidden; color: #758179; text-overflow: ellipsis; white-space: nowrap; }
td.actions { min-width: max-content; }
.empty { padding: 36px; color: #7b8781; text-align: center; }

footer { max-width: 1280px; margin: 0 auto; padding: 0 28px 28px; color: #78847d; font-size: 11px; }
dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid #ccd5d0; border-radius: 8px; box-shadow: 0 24px 70px rgb(18 29 23 / 22%); }
dialog::backdrop { background: rgb(14 23 18 / 45%); }
dialog form, .activation-content { padding: 22px; display: grid; gap: 16px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.activation-content p { color: #627068; font-size: 13px; }
.activation-content output { display: block; padding: 17px; overflow-wrap: anywhere; border: 1px solid #cfd8d3; border-radius: 6px; background: #f4f6f4; font: 700 16px ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; }

body.compact .header-inner, body.compact main, body.compact footer { max-width: 560px; }
body.compact .header-inner { min-height: 64px; padding: 10px 16px; }
body.compact .brand-mark, body.compact .eyebrow, body.compact .details-section, body.compact footer { display: none; }
body.compact h1 { font-size: 17px; }
body.compact main { padding: 16px; }
body.compact .checkpoint { padding: 0; border-bottom: 0; }
body.compact .recognition { min-height: 150px; }

@media (max-width: 760px) {
  .header-inner { min-height: 68px; padding: 11px 16px; align-items: flex-start; }
  .brand-mark { display: none; }
  .header-tools { flex-wrap: wrap; }
  .header-tools .quiet-button { display: none; }
  main { padding: 20px 16px; }
  .control-login { min-height: 0; margin: 16px auto; grid-template-columns: 1fr; }
  .login-intro { padding: 30px; }
  .login-intro .login-badge { margin-bottom: 22px; }
  .login-fields { padding: 30px; }
  .section-heading, .workstation-heading { align-items: stretch; flex-direction: column; }
  .section-heading .actions { overflow-x: auto; padding-bottom: 2px; }
  .checkpoint { grid-template-columns: 1fr; }
  .checkpoint > .status { justify-self: start; }
  .recognition { grid-column: 1; min-height: 118px; padding: 20px; }
  .recognition strong { font-size: 23px; }
  footer { padding: 0 16px 20px; }
}
