:root {
  color-scheme: light;
  --paper: #f5f4ed;
  --surface: #fffef9;
  --ink: #203c34;
  --muted: #627168;
  --green: #163f35;
  --green-hover: #245949;
  --line: #dce1d7;
  --mint: #e7eee1;
  --lime: #d6e99b;
  --red: #a12e2e;
  --red-bg: #fff0eb;
  --amber: #785013;
  --amber-bg: #fff5dc;
  --radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
a {
  color: var(--green);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #53872c;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  letter-spacing: -0.055em;
  line-height: 1.15;
  margin-bottom: 12px;
  font-weight: 650;
}
h2 {
  font-size: 1.3rem;
  letter-spacing: -0.025em;
  line-height: 1.3;
}
h3 {
  font-size: 1.05rem;
  margin-bottom: 7px;
}
h1,
h2,
h3,
td,
.course-meta {
  overflow-wrap: anywhere;
}
p {
  margin-bottom: 16px;
}
small,
.small {
  font-size: 0.82rem;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 14px;
}
.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;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 20;
  background: var(--surface);
  padding: 14px;
  border: 2px solid var(--green);
}
.skip-link:focus {
  top: 16px;
}
.boot {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 100dvh;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: inherit;
}
.brand-logo {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}
.brand strong {
  display: block;
  font-size: 1rem;
  letter-spacing: -0.03em;
}
.brand small {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
}
.app-shell {
  min-height: 100dvh;
  padding-left: 236px;
}
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  background: var(--green);
  color: #f5f4ed;
  display: flex;
  flex-direction: column;
  padding: 34px 22px 24px;
  z-index: 5;
}
.rail .brand {
  margin-bottom: 54px;
}
.rail-label {
  color: #bdcdc4;
  margin-left: 13px;
  margin-bottom: 12px;
}
.navigation {
  display: grid;
  gap: 7px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #dbe5dc;
  background: none;
  border: 0;
  border-radius: 9px;
  padding: 13px;
  font-size: 0.92rem;
  text-align: left;
  min-height: 48px;
}
.nav-item:hover {
  background: #ffffff10;
}
.nav-item[aria-current="page"] {
  background: var(--lime);
  color: var(--green);
  font-weight: 700;
}
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rail-bottom {
  margin-top: auto;
  padding-top: 32px;
  font-size: 0.8rem;
}
.rail-bottom a {
  color: #dbe5dc;
}
.rail-note {
  border-top: 1px solid #ffffff25;
  padding-top: 20px;
  color: #bdcdc4;
  font-size: 0.76rem;
  line-height: 1.7;
  margin: 24px 0 0;
}
.user-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}
.avatar {
  display: grid;
  place-items: center;
  height: 34px;
  width: 34px;
  border-radius: 50%;
  background: #ffffff15;
  flex-shrink: 0;
  font-weight: 700;
}
.rail-bottom .btn {
  color: #eaf0e9;
  border-color: #ffffff40;
  width: 100%;
}
.topbar {
  min-height: 77px;
  padding: 20px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}
.topbar .brand {
  display: none;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #53872c;
  margin-right: 7px;
}
.workspace {
  max-width: 1420px;
  margin: auto;
  padding: 38px 44px 48px;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 30px;
}
.page-head p:last-child {
  margin-bottom: 0;
}
.page-head .eyebrow {
  margin-bottom: 10px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}
.btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  font-weight: 650;
  font-size: 0.86rem;
  text-decoration: none;
  line-height: 1.3;
}
.btn:hover:not(:disabled) {
  background: var(--mint);
}
.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.btn-primary:hover:not(:disabled) {
  background: var(--green-hover);
}
.btn-danger {
  color: var(--red);
  border-color: #d8afaa;
}
.btn-danger:hover:not(:disabled) {
  background: var(--red-bg);
}
.btn-small {
  padding: 8px 12px;
  min-height: 40px;
  font-size: 0.78rem;
}
.btn-plain {
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-wide {
  width: 100%;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.stat {
  padding: 20px 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.stat strong {
  font-size: 1.8rem;
  font-weight: 550;
  letter-spacing: -0.045em;
}
.stat span {
  font-size: 0.8rem;
  color: var(--muted);
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}
.panel-head h2 {
  margin-bottom: 4px;
}
.panel-head p {
  margin-bottom: 0;
}
.scanner-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(270px, 1fr);
  gap: 24px;
  align-items: start;
}
.scanner-panel {
  padding: 0;
  overflow: hidden;
}
.scanner-panel > .panel-head,
.scanner-controls {
  padding: 26px;
  margin: 0;
}
.step {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 9px;
}
.camera-stage {
  background: #14392f;
  color: #f2f4eb;
  min-height: 265px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 24px;
  text-align: center;
  position: relative;
}
.camera-frame {
  width: 108px;
  height: 108px;
  border: 1px solid #91a790;
  border-radius: 17px;
  position: relative;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.camera-frame::before,
.camera-frame::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: var(--lime);
  border-style: solid;
}
.camera-frame::before {
  left: -2px;
  top: -2px;
  border-width: 3px 0 0 3px;
  border-top-left-radius: 17px;
}
.camera-frame::after {
  right: -2px;
  bottom: -2px;
  border-width: 0 3px 3px 0;
  border-bottom-right-radius: 17px;
}
.camera-frame .icon {
  width: 38px;
  height: 38px;
  color: var(--lime);
}
.camera-stage p {
  color: #c4d2c4;
  font-size: 0.82rem;
  max-width: 310px;
  margin-bottom: 0;
}
.camera-stage .btn {
  margin-top: 18px;
  background: var(--lime);
  color: var(--green);
  border-color: var(--lime);
}
#qr-reader {
  width: 100%;
  max-width: 520px;
  border: 0 !important;
}
#qr-reader video {
  max-width: 100%;
  border-radius: 8px;
}
.camera-stage:has(#qr-reader:not(:empty)) .camera-placeholder {
  display: none;
}
.camera-placeholder {
  display: grid;
  justify-items: center;
}
.scanner-controls .field {
  margin-bottom: 20px;
}
.manual-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.manual-row input {
  min-width: 0;
  flex: 1;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}
.manual-row .btn {
  flex-shrink: 0;
}
.divider-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.73rem;
  color: var(--muted);
  margin: 22px 0;
}
.divider-label::before,
.divider-label::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 17px;
  min-width: 0;
}
.field label,
.field-label {
  font-size: 0.8rem;
  font-weight: 650;
}
.field input,
.field select,
.field textarea,
.search-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #bfcabe;
  border-radius: 8px;
  color: var(--ink);
  background: #fffefa;
  padding: 11px 12px;
  font-size: 0.9rem;
}
.field input:disabled,
.field select:disabled {
  background: #efefe8;
}
.field textarea {
  resize: vertical;
  min-height: 84px;
}
.hint {
  color: var(--muted);
  font-size: 0.76rem;
}
.check-field {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 0.86rem;
  margin: 18px 0;
}
.check-field input {
  width: 19px;
  height: 19px;
  accent-color: var(--green);
  flex-shrink: 0;
  margin: 2px 0 0;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 17px;
}
.span-full {
  grid-column: 1 / -1;
}
.notice {
  padding: 15px 17px;
  border-radius: 9px;
  background: var(--mint);
  font-size: 0.84rem;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}
.notice p:last-child {
  margin-bottom: 0;
}
.notice-error {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid #edc9c0;
}
.notice-warning {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid #ead6a9;
}
.notice-success {
  background: var(--mint);
  border: 1px solid #c6d9bc;
}
.notice:empty {
  display: none;
}
.scan-result {
  margin: 20px 0 0;
}
.result-value {
  display: block;
  font-size: 1.4rem;
  margin-bottom: 4px;
  letter-spacing: -0.025em;
}
.instruction-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: steps;
}
.instruction-list li {
  counter-increment: steps;
  display: flex;
  gap: 13px;
  margin: 20px 0;
  font-size: 0.83rem;
}
.instruction-list li::before {
  content: counter(steps, decimal-leading-zero);
  color: #718665;
  font-weight: 650;
  font-size: 0.72rem;
  padding-top: 3px;
}
.instruction-list strong {
  display: block;
  margin-bottom: 3px;
}
.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.recent-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.recent-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.recent-marker {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  background: var(--mint);
  border-radius: 50%;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.recent-copy {
  min-width: 0;
  flex: 1;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}
.recent-copy strong {
  display: block;
}
.recent-time {
  font-size: 0.71rem;
  color: var(--muted);
  flex-shrink: 0;
}
.stack {
  display: grid;
  gap: 24px;
}
.badge {
  border-radius: 5px;
  padding: 4px 8px;
  display: inline-flex;
  font-size: 0.69rem;
  font-weight: 650;
  line-height: 1.4;
  white-space: nowrap;
  background: var(--mint);
  color: var(--green);
}
.badge-warning {
  background: var(--amber-bg);
  color: var(--amber);
}
.badge-danger {
  background: var(--red-bg);
  color: var(--red);
}
.badge-neutral {
  background: #eceee8;
  color: var(--muted);
}
.toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.toolbar .field {
  max-width: 440px;
  width: 100%;
  margin-bottom: 0;
}
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.83rem;
  text-align: left;
}
th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: #eef0e7;
}
th,
td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: 0;
}
td strong {
  display: block;
  font-weight: 650;
}
td .muted {
  font-size: 0.74rem;
  display: block;
  margin-top: 3px;
}
td .actions {
  flex-wrap: nowrap;
}
.balance {
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.course-card {
  display: flex;
  flex-direction: column;
}
.standard-card {
  background: var(--mint);
  margin-bottom: 24px;
}
.standard-card .panel-head {
  flex-wrap: wrap;
}
.standard-card .badge {
  white-space: normal;
}
.standard-card .course-price {
  margin: 0 0 20px;
}
.public-main > form + .standard-card {
  margin-top: 24px;
}
.course-description {
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.course-card .actions {
  margin-top: auto;
  padding-top: 20px;
}
.course-card h2 {
  margin: 16px 0 8px;
}
.course-meta {
  display: grid;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 16px;
}
.course-price {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  margin-top: 18px;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.course-price strong {
  font-size: 1.2rem;
  display: block;
  font-weight: 650;
}
.course-price > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.empty {
  text-align: center;
  padding: 48px 24px;
  border: 1px dashed #bdc9b6;
  border-radius: 12px;
  background: #f9f9f2;
}
.empty .icon {
  width: 34px;
  height: 34px;
  margin-bottom: 13px;
  color: #778c6c;
}
.empty p {
  color: var(--muted);
  max-width: 370px;
  margin: 0 auto;
  font-size: 0.86rem;
}
.empty h2 {
  font-size: 1.15rem;
}
.footer {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  padding: 30px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}
.footer a {
  color: var(--muted);
}
dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: var(--surface);
  padding: 0;
  box-shadow: 0 24px 100px #0d2e3435;
}
dialog::backdrop {
  background: #0e302a99;
  backdrop-filter: blur(3px);
}
.dialog-body {
  padding: 28px;
}
.dialog-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 23px;
}
.dialog-head h2 {
  margin: 4px 0 0;
}
.dialog-close {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 6px;
  flex-shrink: 0;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
  flex-wrap: wrap;
}
.link-box {
  font-size: 0.8rem !important;
}
.public-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 5vw;
  border-bottom: 1px solid var(--line);
}
.public-header > a:not(.brand) {
  font-size: 0.82rem;
}
.public-main {
  width: min(960px, calc(100% - 40px));
  margin: 55px auto;
  flex: 1;
}
.public-main.narrow {
  max-width: 510px;
}
.public-main > .eyebrow,
.public-main > h1,
.public-intro {
  text-align: center;
}
.public-intro {
  max-width: 590px;
  margin: 0 auto 30px;
  color: var(--muted);
}
.public-footer {
  width: min(960px, calc(100% - 40px));
  margin: 0 auto 24px;
}
.login-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100dvh;
}
.login-story {
  padding: 50px clamp(32px, 6vw, 110px);
  display: flex;
  flex-direction: column;
  background: var(--green);
  color: var(--surface);
  position: relative;
  overflow: hidden;
}
.login-story .brand-logo {
  width: 64px;
  height: 64px;
}
.login-story-copy {
  margin: auto 0;
  padding: 60px 0;
  position: relative;
  z-index: 1;
}
.login-story .eyebrow {
  color: var(--lime);
}
.login-story h1 {
  font-size: clamp(3rem, 5.5vw, 5.3rem);
  font-weight: 500;
  max-width: 570px;
  line-height: 1.04;
  letter-spacing: -0.065em;
}
.login-story h1 span {
  color: var(--lime);
}
.login-story-copy > p:last-child {
  max-width: 330px;
  color: #bfcec0;
  font-size: 0.94rem;
  margin: 26px 0 0;
}
.login-story-note {
  color: #bfcec0;
  font-size: 0.72rem;
  position: relative;
  z-index: 1;
}
.field-lines {
  position: absolute;
  width: 470px;
  height: 470px;
  border: 1px solid #9fbb7e25;
  border-radius: 50%;
  right: -300px;
  bottom: -90px;
  box-shadow:
    0 0 0 60px #163f35,
    0 0 0 61px #9fbb7e20,
    0 0 0 120px #163f35,
    0 0 0 121px #9fbb7e15;
}
.login-side {
  display: flex;
  flex-direction: column;
  padding: 35px clamp(24px, 6vw, 90px);
}
.login-form-wrap {
  width: 100%;
  max-width: 380px;
  margin: auto;
  padding: 50px 0;
}
.login-form-wrap h2 {
  font-size: 2rem;
  letter-spacing: -0.045em;
  margin-bottom: 10px;
}
.login-form-wrap form {
  margin-top: 30px;
}
.login-form-wrap .btn {
  margin-top: 5px;
}
.login-side .footer {
  max-width: 380px;
  width: 100%;
  margin: 0 auto;
}
.login-admin-note {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 22px;
  font-size: 0.78rem;
  color: var(--muted);
}
.membership-card {
  background: var(--surface);
  border-radius: 22px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.membership-top {
  background: var(--green);
  color: var(--surface);
  padding: 27px;
}
.membership-top .brand {
  margin-bottom: 28px;
}
.membership-top .brand-logo {
  width: 64px;
  height: 64px;
}
.membership-top h1 {
  font-size: 1.9rem;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}
.membership-top p {
  color: #d0ddcb;
  margin-bottom: 0;
  font-size: 0.85rem;
}
.membership-body {
  padding: 27px;
  text-align: center;
}
.qr-image {
  display: block;
  width: min(240px, 100%);
  height: auto;
  margin: 0 auto 14px;
  image-rendering: pixelated;
}
.manual-id {
  overflow-wrap: anywhere;
  display: block;
  font-size: 0.8rem;
}
.card-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  text-align: left;
  margin: 26px 0 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.card-facts strong {
  display: block;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}
.card-facts dt {
  font-size: 0.73rem;
  color: var(--muted);
  margin-bottom: 5px;
}
.card-facts dd {
  margin: 0;
}
.privacy-content h2 {
  margin-top: 30px;
}
.privacy-content li {
  margin-bottom: 10px;
}
.privacy-content {
  overflow-wrap: anywhere;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1500px) {
  .workspace {
    padding-top: 48px;
  }
  .camera-stage {
    min-height: 320px;
  }
}
@media (max-width: 1150px) {
  .app-shell {
    padding-left: 207px;
  }
  .rail {
    width: 207px;
    padding-inline: 16px;
  }
  .workspace {
    padding: 30px 25px;
  }
  .topbar {
    padding-inline: 25px;
  }
  .scanner-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, 1fr);
    gap: 18px;
  }
  .panel {
    padding: 21px;
  }
  th,
  td {
    padding: 14px;
  }
  .stat {
    padding: 17px;
  }
}
@media (max-width: 860px) {
  .app-shell {
    padding-left: 0;
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }
  .rail {
    inset: auto 0 0;
    width: 100%;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid #ffffff20;
  }
  .rail > .brand,
  .rail-label,
  .rail-bottom {
    display: none;
  }
  .navigation {
    display: flex;
    justify-content: space-around;
    gap: 3px;
  }
  .nav-item {
    flex-direction: column;
    gap: 4px;
    font-size: 0.65rem;
    padding: 8px 4px;
    min-width: 0;
    flex: 1;
    max-width: 100px;
    border-radius: 9px;
  }
  .nav-item .icon {
    width: 22px;
    height: 22px;
  }
  .topbar {
    padding: 16px 24px;
    min-height: 78px;
    background: var(--surface);
  }
  .topbar .brand {
    display: flex;
  }
  .topbar-label {
    display: none;
  }
  .topbar .brand-logo {
    width: 40px;
    height: 40px;
  }
  .mobile-account {
    display: flex;
    align-items: center;
    gap: 9px;
  }
  .workspace {
    padding: 28px 24px;
  }
  .login-layout {
    grid-template-columns: 0.9fr 1fr;
  }
  .login-story {
    padding-inline: 30px;
  }
  .login-story h1 {
    font-size: 3.2rem;
  }
  .login-side {
    padding-inline: 26px;
  }
}
@media (min-width: 861px) {
  .mobile-account {
    display: none;
  }
}
@media (max-width: 640px) {
  .workspace {
    padding: 26px 16px;
  }
  .topbar {
    padding-inline: 17px;
  }
  .topbar .brand strong {
    font-size: 0.9rem;
  }
  .topbar .brand small {
    font-size: 0.58rem;
  }
  .mobile-account .badge {
    display: none;
  }
  .page-head {
    align-items: flex-start;
    margin-bottom: 23px;
    flex-wrap: wrap;
    gap: 17px;
  }
  .page-head h1 {
    font-size: 2rem;
  }
  .page-head p {
    font-size: 0.84rem;
  }
  .page-head .actions {
    width: 100%;
  }
  .page-head .actions .btn {
    flex: 1;
  }
  .stats {
    gap: 8px;
    margin-bottom: 19px;
  }
  .stat {
    padding: 12px;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 0;
  }
  .stat strong {
    font-size: 1.5rem;
  }
  .stat span {
    font-size: 0.68rem;
  }
  .scanner-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .panel {
    padding: 20px;
  }
  .scanner-panel {
    padding: 0;
  }
  .scanner-panel > .panel-head,
  .scanner-controls {
    padding: 21px;
  }
  .camera-stage {
    min-height: 240px;
  }
  .camera-frame {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
  }
  .scanner-help {
    display: none;
  }
  .manual-row {
    flex-wrap: wrap;
  }
  .manual-row input {
    flex-basis: 180px;
  }
  .manual-row .btn {
    flex: 1;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }
  .toolbar .field {
    max-width: none;
  }
  .responsive-table {
    overflow: visible;
    border: 0;
    background: none;
  }
  .responsive-table table,
  .responsive-table tbody {
    display: block;
  }
  .responsive-table thead {
    display: none;
  }
  .responsive-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 16px;
    gap: 13px;
  }
  .responsive-table td {
    padding: 0;
    border: 0;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .responsive-table td:first-child,
  .responsive-table td:last-child {
    grid-column: 1 / -1;
  }
  .responsive-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.63rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 4px;
  }
  .responsive-table td .actions {
    flex-wrap: wrap;
  }
  .responsive-table td .actions .btn {
    flex: 1;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .dialog-body {
    padding: 23px 20px;
  }
  .dialog-actions .btn {
    flex: 1;
  }
  .public-header {
    padding: 20px;
  }
  .public-header .brand strong {
    font-size: 0.9rem;
  }
  .public-header .brand small {
    font-size: 0.57rem;
  }
  .public-header > a:not(.brand) {
    font-size: 0.76rem;
  }
  .public-main {
    margin-block: 34px;
    width: calc(100% - 32px);
  }
  .public-footer {
    width: calc(100% - 32px);
  }
  .login-layout {
    display: flex;
    flex-direction: column;
  }
  .login-story {
    padding: 25px;
  }
  .login-story-copy {
    padding: 40px 0 8px;
  }
  .login-story h1 {
    font-size: 2.9rem;
    margin-bottom: 16px;
  }
  .login-story-copy > p:last-child,
  .login-story-note {
    display: none;
  }
  .login-story-copy .eyebrow {
    font-size: 0.65rem;
  }
  .login-side {
    flex: 1;
    padding: 30px 25px 24px;
  }
  .login-form-wrap {
    padding: 0;
  }
  .login-form-wrap h2 {
    font-size: 1.6rem;
  }
  .login-side .footer {
    margin-top: 30px;
  }
  .login-admin-note {
    margin-top: 24px;
    padding-top: 17px;
  }
  .footer {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.7rem;
  }
}
@media (prefers-reduced-motion: no-preference) {
  dialog[open] {
    animation: arrive 0.16s ease-out;
  }
  @keyframes arrive {
    from {
      opacity: 0;
      transform: translateY(7px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
@media print {
  .public-header,
  .public-footer,
  .membership-body .btn,
  .public-intro,
  .skip-link {
    display: none;
  }
  .public-main {
    margin: 0 auto;
  }
  .membership-card {
    break-inside: avoid;
  }
}
