:root {
  --bg: #f2efe7;
  --bg-deep: #e7e2d7;
  --surface: #fffdf8;
  --surface-2: #ebe6da;
  --ink: #121611;
  --ink-soft: #2a3029;
  --muted: #6f746b;
  --muted-2: #969b92;
  --line: #d8d2c4;
  --line-soft: #e9e4d9;
  --accent: #c8f36c;
  --accent-strong: #9edc3e;
  --forest: #1e5b3d;
  --forest-2: #2d7350;
  --danger: #b94735;
  --danger-soft: #f7dfd9;
  --warning: #a46b17;
  --warning-soft: #f6e8ca;
  --blue: #3c5fd7;
  --shadow: 0 18px 45px rgba(18, 22, 17, 0.08);
  --shadow-soft: 0 8px 24px rgba(18, 22, 17, 0.05);
  --radius: 22px;
  --radius-sm: 14px;
  --sidebar: 264px;
  --font: "Inter", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 4%, rgba(200, 243, 108, 0.22), transparent 25rem),
    radial-gradient(circle at 8% 92%, rgba(30, 91, 61, 0.08), transparent 28rem),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

body.modal-open,
body.drawer-open {
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

svg {
  display: block;
  flex: none;
}

::selection {
  background: var(--accent);
  color: var(--ink);
}

/* ---------- shell ---------- */

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 26px 18px 18px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 18% 0%, rgba(200, 243, 108, 0.16), transparent 15rem),
    #11160f;
  color: #f4f1e7;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--accent);
  color: #11160f;
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.07em;
}

.brand-name {
  display: block;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-sub {
  display: block;
  margin-top: 2px;
  color: #8e998b;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.25;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-section {
  margin: 11px 10px 7px;
  color: #707b6e;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 12px;
  color: #a5afa1;
  font-size: 13px;
  font-weight: 550;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nav-link.active {
  background: var(--accent);
  color: #11160f;
  font-weight: 750;
}

.nav-link.active::after {
  position: absolute;
  right: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #11160f;
  content: "";
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
}

.nav-badge {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #c3cbbf;
  font-size: 10px;
  font-weight: 750;
}

.nav-link.active .nav-badge {
  background: rgba(17, 22, 15, 0.12);
  color: #11160f;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.sidebar-note {
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
  color: #9ca69a;
  font-size: 11.5px;
  line-height: 1.45;
}

.sidebar-note strong {
  display: block;
  margin-bottom: 4px;
  color: #f4f1e7;
  font-size: 12px;
}

.sidebar-note .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 1px;
}

.sidebar-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: transparent;
  color: #b3bdb0;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  transition: background 160ms ease, color 160ms ease;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 78px;
  padding: 15px 32px;
  border-bottom: 1px solid rgba(216, 210, 196, 0.8);
  background: rgba(242, 239, 231, 0.84);
  backdrop-filter: blur(18px);
}

.topbar-left {
  min-width: 0;
}

.eyebrow {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 5px 0 0;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 260px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search:focus-within {
  border-color: var(--forest-2);
  box-shadow: 0 0 0 3px rgba(30, 91, 61, 0.08);
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
}

.search input::placeholder {
  color: var(--muted-2);
}

.staff-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 10px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.staff-chip .avatar {
  width: 30px;
  height: 30px;
  font-size: 10px;
}

.staff-chip-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.staff-chip-name {
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.1;
}

.staff-chip-role {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.2;
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e1ecd8;
  color: #2c5339;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.avatar.dark {
  background: var(--ink);
  color: var(--accent);
}

.avatar.accent {
  background: var(--accent);
  color: var(--ink);
}

.content {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px 32px 50px;
}

/* ---------- buttons and controls ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.45;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: #263126;
}

.btn-accent {
  background: var(--accent);
  color: var(--ink);
}

.btn-accent:hover:not(:disabled) {
  background: var(--accent-strong);
}

.btn-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn-sm {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 11.5px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
}

.btn-icon:hover:not(:disabled) {
  background: var(--surface);
  color: var(--ink);
}

.select,
.input {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px;
}

.select:focus,
.input:focus {
  border-color: var(--forest-2);
  box-shadow: 0 0 0 3px rgba(30, 91, 61, 0.08);
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--forest-2);
  font-size: 12px;
  font-weight: 700;
}

.link-button:hover {
  text-decoration: underline;
}

/* ---------- headings, panels ---------- */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.page-head h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1;
}

.page-head p {
  max-width: 620px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: 20px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.panel-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.toolbar .select {
  min-width: 150px;
}

.toolbar-spacer {
  flex: 1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stats-grid.stats-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid.stats-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 17px 18px;
}

.stat-card::after {
  position: absolute;
  right: -22px;
  bottom: -35px;
  width: 110px;
  height: 110px;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  content: "";
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #eef2e7;
  color: var(--forest);
}

.stat-card.accent .stat-icon {
  background: var(--accent);
  color: var(--ink);
}

.stat-label {
  margin-top: 17px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-value {
  margin-top: 2px;
  font-size: 33px;
  font-weight: 850;
  letter-spacing: -0.07em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10.5px;
}

.stat-meta strong {
  color: var(--forest-2);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.8fr);
  gap: 14px;
  margin-top: 14px;
}

.dashboard-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.activity-card {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  background: #fbf8f0;
}

.activity-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.activity-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 9px;
  background: #e8efe0;
  color: var(--forest);
}

.activity-title {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 800;
}
.activity-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
}

.activity-count {
  margin-top: 10px;
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -0.06em;
  line-height: 1;
}

.activity-count span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
}

.activity-progress {
  margin-top: 9px;
}

.activity-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9.5px;
}

.progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--forest-2);
}

.progress.accent > span {
  background: var(--accent-strong);
}

.progress.warn > span {
  background: var(--warning);
}

.merch-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.merch-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.merch-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
}

.merch-info {
  min-width: 0;
}

.merch-name {
  display: block;
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merch-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.merch-stock {
  text-align: right;
}

.merch-stock strong {
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.merch-stock span {
  color: var(--muted);
  font-size: 9.5px;
}

.merch-status-out {
  color: var(--danger);
}
.merch-status-low {
  color: var(--warning);
}

/* ---------- tables ---------- */

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table-participants {
  min-width: 900px;
}

.table-activities,
.table-merch,
.table-merch-issues {
  min-width: 720px;
}

.table-reports {
  min-width: 860px;
}

th {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  padding: 10px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
  vertical-align: middle;
}

tbody tr {
  transition: background 120ms ease;
}

tbody tr:hover {
  background: #faf7ef;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tr.is-clickable {
  cursor: pointer;
}

.person {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 170px;
}

.person-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: #e4eddb;
  color: #2f5039;
  font-size: 9px;
  font-weight: 800;
}

.person-name {
  display: block;
  max-width: 200px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-meta {
  display: block;
  max-width: 200px;
  overflow: hidden;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbf8f0;
  color: var(--ink-soft);
  font-family: "SF Mono", "Roboto Mono", Menlo, monospace;
  font-size: 9.5px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.points-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 32px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 850;
  white-space: nowrap;
}

.activity-dots {
  display: flex;
  align-items: center;
  gap: 3px;
}

.dot {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted-2);
  font-size: 7.5px;
  font-weight: 800;
}

.dot.done {
  border-color: var(--forest);
  background: var(--forest);
  color: #fff;
}

.dot.base {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 750;
  white-space: nowrap;
}

.badge.green {
  background: #e5f1d5;
  color: #2c5d34;
}

.badge.lime {
  background: #eef9d5;
  color: #3e671e;
}

.badge.warn {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.ink {
  background: var(--ink);
  color: var(--accent);
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 34px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
  font-size: 13px;
}

.empty-state span {
  max-width: 300px;
  font-size: 11.5px;
}

/* ---------- drawer ---------- */

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(17, 22, 15, 0.4);
  backdrop-filter: blur(3px);
  animation: fade-in 180ms ease both;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  width: min(430px, 100vw);
  height: 100vh;
  border-left: 1px solid var(--line);
  background: var(--bg);
  box-shadow: -20px 0 60px rgba(17, 22, 15, 0.18);
  animation: slide-in 220ms ease both;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.74);
}

.drawer-head .eyebrow {
  margin-bottom: 5px;
}

.drawer-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 32px;
}

.drawer-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.drawer-profile .avatar {
  width: 46px;
  height: 46px;
  font-size: 13px;
}

.drawer-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.drawer-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

.qr-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.qr-slot {
  flex: none;
  width: 108px;
  height: 108px;
}

.qr-image {
  display: block;
  width: 108px;
  height: 108px;
  padding: 6px;
  border-radius: 10px;
  background: #fff;
}

.fake-qr {
  display: grid;
  flex: none;
  grid-template-columns: repeat(21, 1fr);
  grid-template-rows: repeat(21, 1fr);
  width: var(--qr-size, 120px);
  height: var(--qr-size, 120px);
  padding: 7px;
  border-radius: 10px;
  background: #fff;
}

.fake-qr i {
  display: block;
  background: transparent;
}

.fake-qr i.on {
  background: #11160f;
}

.qr-code-wrap {
  min-width: 0;
}
.qr-code-wrap .code {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qr-caption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.drawer-section {
  margin-top: 20px;
}

.drawer-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.info-row {
  padding: 10px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--surface);
}

.info-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.info-value {
  margin-top: 3px;
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.points-card {
  padding: 14px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
}

.points-line {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.points-big {
  color: var(--accent);
  font-size: 42px;
  font-weight: 850;
  letter-spacing: -0.08em;
  line-height: 0.86;
}

.points-label {
  color: #aab4a4;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.points-caption {
  margin-top: 5px;
  color: #bdc7b8;
  font-size: 10.5px;
}

.points-card .progress {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.13);
}

.points-card .progress > span {
  background: var(--accent);
}

.points-breakdown {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  color: #aeb8a8;
  font-size: 9.5px;
}

.points-breakdown strong {
  color: #fff;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: var(--surface);
}

.activity-item.done {
  background: #f5f9ea;
  border-color: #dbe8c5;
}

.activity-item-check {
  display: grid;
  place-items: center;
  flex: none;
  width: 25px;
  height: 25px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted-2);
}

.activity-item.done .activity-item-check {
  border-color: var(--forest);
  background: var(--forest);
  color: #fff;
}

.activity-item-body {
  min-width: 0;
  flex: 1;
}

.activity-item-title {
  display: block;
  font-size: 11.5px;
  font-weight: 750;
}

.activity-item-meta {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.activity-action {
  flex: none;
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 16px;
}

.timeline::before {
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 4px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-item {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
}

.timeline-dot {
  position: absolute;
  top: 12px;
  left: -16px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--muted-2);
}

.timeline-item.activity .timeline-dot {
  background: var(--forest);
}
.timeline-item.merch .timeline-dot {
  background: var(--warning);
}
.timeline-item.registration .timeline-dot {
  background: var(--ink);
}
.timeline-item.checkin .timeline-dot {
  background: var(--accent-strong);
}

.timeline-content {
  min-width: 0;
}

.timeline-title {
  font-size: 11px;
  font-weight: 700;
}

.timeline-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.delta {
  flex: none;
  font-size: 11px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.delta.plus {
  color: var(--forest-2);
}
.delta.minus {
  color: var(--danger);
}

/* ---------- modal and toast ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 22, 15, 0.46);
  backdrop-filter: blur(4px);
  animation: fade-in 160ms ease both;
}

.modal {
  width: min(420px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 30px 100px rgba(17, 22, 15, 0.28);
  animation: pop-in 180ms ease both;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 0;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.modal-body {
  padding: 10px 18px 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.modal-body strong {
  color: var(--ink);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 18px 18px;
}

.toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 160;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 340px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 650;
  animation: toast-in 220ms ease both;
  pointer-events: auto;
}

.toast.success {
  border-color: #c8ddb0;
}
.toast.error {
  border-color: #efc7bd;
  color: var(--danger);
}
.toast.info {
  border-color: #c8d7ef;
}

/* ---------- import ---------- */

.import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 14px;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 220px;
  padding: 24px;
  border: 1.5px dashed #bfc7b5;
  border-radius: 18px;
  background: #fbf9f1;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
  cursor: pointer;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--forest-2);
  background: #f4f8e9;
}

.dropzone-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--accent);
  color: var(--ink);
}

.dropzone-title {
  font-size: 14px;
  font-weight: 800;
}

.dropzone-sub {
  max-width: 310px;
  color: var(--muted);
  font-size: 11px;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
}

.import-preview {
  margin-top: 16px;
}

.import-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.import-preview h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.error-text {
  color: var(--danger);
  font-size: 10.5px;
}
.success-text {
  color: var(--forest-2);
  font-size: 10.5px;
}
.muted {
  color: var(--muted);
}

.expected-table td,
.expected-table th {
  font-size: 11px;
}

.report-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.event-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.event-type.registration {
  background: #e6ebdf;
  color: #3f5b3d;
}
.event-type.checkin {
  background: #e8f5d2;
  color: #4a6b21;
}
.event-type.activity {
  background: #e5edf7;
  color: #395c9e;
}
.event-type.merch {
  background: var(--warning-soft);
  color: var(--warning);
}

/* ---------- scan page ---------- */

body.scan-page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  padding: 18px;
  background:
    radial-gradient(circle at 20% 0%, rgba(200, 243, 108, 0.12), transparent 30rem),
    #0d120d;
}

.scan-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  min-height: calc(100vh - 36px);
  overflow: hidden;
  border-radius: 30px;
  background: var(--bg);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
}

.scan-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(242, 239, 231, 0.9);
  backdrop-filter: blur(16px);
}

.scan-back {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
}

.scan-heading {
  min-width: 0;
  flex: 1;
}

.scan-eyebrow {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.15em;
  line-height: 1;
  text-transform: uppercase;
}

.scan-title {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1;
}

.scan-top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.staff-select {
  max-width: 86px;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: var(--surface);
  color: var(--ink);
  font-size: 10px;
  font-weight: 650;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border: 0;
  border-radius: 999px;
  background: #e6f4d1;
  color: #456b24;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.status-chip.offline {
  background: var(--warning-soft);
  color: var(--warning);
}

.scan-content {
  flex: 1;
  padding: 16px 16px 28px;
}

.scan-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.scan-intro {
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 18px;
  background:
    linear-gradient(120deg, rgba(200, 243, 108, 0.52), rgba(255, 253, 248, 0.1)),
    var(--surface);
  border: 1px solid #dbe7c4;
}

.scan-intro .eyebrow {
  color: #5e6f4f;
}

.scan-intro h2 {
  margin: 7px 0 0;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.scan-intro p {
  margin: 7px 0 0;
  color: #5e675b;
  font-size: 11px;
  line-height: 1.45;
}

.scanner {
  padding: 14px;
  border-radius: 22px;
  background: #11160f;
  color: #fff;
}

.scanner-frame {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 45%, rgba(200, 243, 108, 0.1), transparent 38%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 26px),
    #0b100b;
}

.scanner-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
}

.scanner-frame.camera-on .scanner-center,
.scanner-frame.camera-on .scan-line {
  display: none;
}

.corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--accent);
  border-style: solid;
}
.corner.tl {
  top: 18px;
  left: 18px;
  border-width: 2px 0 0 2px;
  border-radius: 8px 0 0 0;
}
.corner.tr {
  top: 18px;
  right: 18px;
  border-width: 2px 2px 0 0;
  border-radius: 0 8px 0 0;
}
.corner.bl {
  bottom: 18px;
  left: 18px;
  border-width: 0 0 2px 2px;
  border-radius: 0 0 0 8px;
}
.corner.br {
  right: 18px;
  bottom: 18px;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 8px 0;
}

.scan-line {
  position: absolute;
  right: 13%;
  left: 13%;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(200, 243, 108, 0.9), 0 0 40px rgba(200, 243, 108, 0.45);
  animation: scanline 2.6s ease-in-out infinite;
}

.scanner-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: #c6d0c1;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.scanner-center svg {
  color: var(--accent);
}

.scanner-caption {
  margin-top: 10px;
  color: #849080;
  font-size: 9.5px;
  text-align: center;
}

.scanner .btn {
  margin-top: 10px;
}

.manual-card {
  margin-top: 12px;
  padding: 14px;
}

.manual-card .panel-title {
  font-size: 12px;
}

.manual-row {
  display: flex;
  gap: 7px;
  margin-top: 9px;
}

.manual-row .input {
  min-width: 0;
  flex: 1;
  text-transform: uppercase;
}

.scan-error {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 10.5px;
  font-weight: 650;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.recent-item:hover {
  background: rgba(255, 253, 248, 0.7);
}

.recent-item:last-child {
  border-bottom: 0;
}

.recent-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #e4eddb;
  color: #2f5039;
  font-size: 8px;
  font-weight: 800;
}

.recent-body {
  min-width: 0;
  flex: 1;
}

.recent-action {
  display: block;
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-time {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
}

.participant-hero {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.participant-hero .avatar {
  width: 46px;
  height: 46px;
  font-size: 13px;
}

.participant-info {
  min-width: 0;
  flex: 1;
}

.participant-name {
  overflow: hidden;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-phone {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
}

.participant-code {
  margin-top: 5px;
}

.participant-status {
  flex: none;
}

.points-hero {
  margin-top: 11px;
  padding: 16px;
  border-radius: 20px;
  background: var(--ink);
  color: #fff;
}

.points-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.points-hero .label {
  color: #aab4a4;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.points-hero .big {
  margin-top: 5px;
  color: var(--accent);
  font-size: 49px;
  font-weight: 900;
  letter-spacing: -0.1em;
  line-height: 0.85;
  font-variant-numeric: tabular-nums;
}

.points-hero .max {
  color: #8e998a;
  font-size: 11px;
  font-weight: 650;
}

.points-hero .points-note {
  margin-top: 4px;
  color: #b6c0b0;
  font-size: 10px;
}

.points-hero .progress {
  margin-top: 13px;
  background: rgba(255, 255, 255, 0.13);
}

.points-hero .progress > span {
  background: var(--accent);
}

.points-hero-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: #a8b2a2;
  font-size: 9.5px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 1px 8px;
}

.section-title {
  margin: 0;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.section-caption {
  color: var(--muted);
  font-size: 9.5px;
}

.activity-list.scan {
  gap: 7px;
}

.activity-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: var(--surface);
}

.activity-row.done {
  border-color: #dbe8c5;
  background: #f5f9ea;
}

.activity-check {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted-2);
}

.activity-row.done .activity-check {
  border-color: var(--forest);
  background: var(--forest);
  color: #fff;
}

.activity-main {
  min-width: 0;
  flex: 1;
}

.activity-main-title {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
}

.activity-main-meta {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.activity-points {
  flex: none;
  color: var(--forest-2);
  font-size: 10px;
  font-weight: 850;
}

.activity-btn {
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 9.5px;
  font-weight: 750;
}

.activity-btn:disabled {
  opacity: 0.4;
}

.merch-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.merch-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: var(--surface);
}

.merch-option.disabled {
  background: #f7f4ec;
  opacity: 0.7;
}

.merch-option-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink-soft);
}

.merch-option-main {
  min-width: 0;
  flex: 1;
}

.merch-option-name {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
}

.merch-option-stock {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.merch-option-cost {
  flex: none;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef9d5;
  color: #3e671e;
  font-size: 9.5px;
  font-weight: 850;
  white-space: nowrap;
}

.merch-option-btn {
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--ink);
  font-size: 9.5px;
  font-weight: 800;
}

.merch-option-btn:disabled {
  opacity: 0.4;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.history-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}

.history-item:last-child {
  border-bottom: 0;
}

.history-main {
  min-width: 0;
}

.history-title {
  font-size: 10.5px;
  font-weight: 700;
}

.history-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.scan-footer {
  margin-top: 18px;
  padding-bottom: 4px;
}

.offline-banner {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  padding: 9px 11px;
  border: 1px solid #e8d2a4;
  border-radius: 10px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 10px;
  font-weight: 650;
}

.scan-toast {
  position: fixed;
  right: 50%;
  bottom: 22px;
  z-index: 200;
  max-width: 360px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  box-shadow: var(--shadow);
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  transform: translateX(50%);
  animation: toast-in 220ms ease both;
}

.scan-toast.error {
  background: var(--danger);
}

/* ---------- animations ---------- */

@keyframes scanline {
  0% {
    top: 14%;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  50% {
    top: 86%;
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    top: 14%;
    opacity: 0;
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-in {
  from { transform: translateX(30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes pop-in {
  from { transform: scale(0.97) translateY(4px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes toast-in {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  :root {
    --sidebar: 238px;
  }

  .content {
    padding: 24px 24px 44px;
  }

  .topbar {
    padding: 14px 24px;
  }

  .stats-grid,
  .stats-grid.stats-grid-3,
  .stats-grid.stats-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    height: auto;
    padding: 12px 16px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .brand {
    flex: none;
    padding: 0;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 14px;
  }

  .brand-name {
    font-size: 13px;
  }

  .brand-sub {
    display: none;
  }

  .nav {
    flex-direction: row;
    gap: 3px;
    min-width: max-content;
  }

  .nav-section,
  .nav-badge {
    display: none;
  }

  .nav-link {
    gap: 6px;
    padding: 8px 10px;
    font-size: 11px;
  }

  .nav-link.active::after {
    display: none;
  }

  .nav-icon {
    width: 16px;
    height: 16px;
  }

  .sidebar-footer {
    display: none;
  }

  .topbar {
    position: relative;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 0;
    padding: 16px 18px;
  }

  .topbar-actions {
    width: 100%;
    margin-left: 0;
  }

  .search {
    width: auto;
    flex: 1;
  }

  .staff-chip {
    margin-left: auto;
  }

  .content {
    padding: 18px 18px 40px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .page-head h2 {
    font-size: 26px;
  }

  .activity-grid {
    grid-template-columns: 1fr;
  }

  .import-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-stack {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar h1 {
    font-size: 21px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .stat-card {
    min-height: 118px;
    padding: 13px;
  }

  .stat-value {
    font-size: 27px;
  }

  .stat-label {
    margin-top: 13px;
  }

  .panel {
    padding: 14px;
  }

  .toolbar {
    gap: 6px;
  }

  .toolbar .select {
    min-width: 0;
    flex: 1;
  }

  .table-wrap {
    margin: 0 -14px;
    padding: 0 14px;
  }

  th,
  td {
    padding: 8px;
  }

  .drawer {
    width: 100vw;
  }

  .drawer-body {
    padding: 14px 16px 28px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .toast-root {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .toast {
    max-width: none;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions .btn {
    flex: 1;
  }
}

@media (max-width: 520px) {
  body.scan-page {
    padding: 0;
  }

  .scan-shell {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- login ---------- */

body.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 0%, rgba(200, 243, 108, 0.24), transparent 30rem),
    radial-gradient(circle at 90% 100%, rgba(30, 91, 61, 0.1), transparent 30rem),
    var(--bg);
}

.login-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(420px, 100%);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
}

.login-brand .brand-name {
  color: var(--ink);
}

.login-brand .brand-sub {
  color: var(--muted);
}

.login-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 1;
}

.login-card p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-field .input {
  min-height: 44px;
  font-size: 13px;
  letter-spacing: normal;
  text-transform: none;
}

.login-error {
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11px;
  font-weight: 650;
}

.login-hint {
  padding-top: 4px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.login-hint strong {
  color: var(--ink);
}

/* ---------- conferences ---------- */

.conference-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.conference-switch select {
  max-width: 190px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
}

.conference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.conference-card {
  display: flex;
  flex-direction: column;
  min-height: 190px;
}

.conference-card.current {
  border-color: #b9d78c;
  box-shadow: 0 0 0 3px rgba(200, 243, 108, 0.18);
}

.conference-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.conference-meta div {
  padding: 9px 10px;
  border-radius: 10px;
  background: #f8f5ed;
}

.conference-meta span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.conference-meta strong {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  line-height: 1.35;
}

.conference-actions {
  display: flex;
  gap: 7px;
  margin-top: auto;
  padding-top: 16px;
}

.conference-create {
  margin-bottom: 14px;
}

.conference-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.conference-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.conference-form .input,
.conference-form .select {
  width: 100%;
  min-height: 40px;
  font-size: 12px;
  letter-spacing: normal;
  text-transform: none;
}

.conference-check {
  grid-column: 1 / -1;
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  color: var(--muted) !important;
  font-size: 11px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.conference-form-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.staff-modal {
  width: min(560px, 100%);
}

.staff-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 300px;
  overflow-y: auto;
}

.staff-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbf8f0;
}

.staff-row strong {
  display: block;
  font-size: 11.5px;
}

.staff-row span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.staff-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px auto;
  gap: 7px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

@media (max-width: 920px) {
  .conference-switch {
    order: -1;
    width: 100%;
    justify-content: space-between;
  }

  .conference-switch select {
    max-width: none;
    flex: 1;
  }

  .conference-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .conference-form,
  .staff-add {
    grid-template-columns: 1fr;
  }

  .conference-meta {
    grid-template-columns: 1fr;
  }

  .conference-switch {
    display: none;
  }
}

.scan-conference-select {
  max-width: 132px;
  font-size: 9.5px;
}

@media (max-width: 520px) {
  .scan-conference-select {
    max-width: 108px;
  }
}
