:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #64748b;
  --line: #d8dee7;
  --panel: #ffffff;
  --page: #f7f7f8;
  --primary: #cf2030;
  --primary-dark: #a71927;
  --warn: #64666a;
  --warn-bg: #f2f2f3;
  --ok: #cf2030;
  --ok-bg: #fff0f2;
  --danger: #991b1b;
  --font-sans: "Noto Sans SC", "Microsoft YaHei", "Microsoft JhengHei", "PingFang SC", "Heiti SC", Arial, Helvetica, sans-serif;
  --font-admin: Montserrat, "Noto Sans SC", "Microsoft YaHei", "Microsoft JhengHei", "PingFang SC", "Heiti SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: var(--font-sans);
  line-height: 1.5;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 44px);
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 2;
}

.brand {
  color: var(--ink);
  font-weight: 800;
}

.public-logo {
  display: block;
  max-width: 220px;
  max-height: 46px;
  object-fit: contain;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
}

body:not(.admin-body) > .topbar {
  justify-content: center;
}

body:not(.admin-body) > .topbar .brand {
  margin-inline: auto;
}

.page {
  width: min(1120px, calc(100% - 28px));
  margin: 28px auto;
}

.panel,
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.panel {
  padding: clamp(18px, 4vw, 32px);
  margin-bottom: 22px;
}

.narrow {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}

.panel h1 {
  font-size: clamp(24px, 3vw, 34px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary-dark);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0;
}

.subtitle,
.muted {
  color: var(--muted);
}

.error-text {
  color: var(--danger);
}

.file-error {
  flex-basis: 100%;
  margin: 2px 0 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

.checkin-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.checkin-choice {
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--ink);
  display: grid;
  place-items: center;
  gap: 9px;
  text-align: center;
}

.checkin-choice i {
  color: var(--primary);
  font-size: 28px;
}

.checkin-choice.is-active,
.checkin-choice:hover {
  border-color: var(--primary);
  background: #fff0f2;
}

.public-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(180px, 0.7fr);
  gap: 12px;
  margin: 18px 0 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.member-card {
  min-height: 166px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--ink);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.member-card-body,
.member-card-body strong,
.member-card-body span {
  display: block;
}

.member-card-body span {
  color: var(--muted);
  margin-top: 3px;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.member-card-image,
.member-card-image img,
.member-card-placeholder {
  width: 100px;
  height: 124px;
  border-radius: 8px;
}

.member-card-image {
  flex: 0 0 auto;
  overflow: hidden;
  background: #f2f2f3;
}

.member-card-image img {
  display: block;
  object-fit: cover;
}

.member-card-placeholder {
  display: grid;
  place-items: center;
  color: var(--primary);
  background: #fff0f2;
  font-size: 34px;
}

.member-card-body {
  min-width: 0;
}

.button,
button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
}

.button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.button.primary:hover {
  background: var(--primary-dark);
}

.button.large {
  width: 100%;
  min-height: 56px;
  font-size: 18px;
}

.icon-button {
  width: 42px;
  min-width: 42px;
  padding: 0;
}

.icon-button i {
  font-size: 18px;
  line-height: 1;
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.notice,
.warning,
.success,
.danger {
  border-radius: 8px;
  padding: 14px 16px;
  margin: 16px 0;
}

.notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  width:100%;
}

.warning {
  background: var(--warn-bg);
  border: 1px solid #fed7aa;
  color: var(--warn);
}

.success {
  background: var(--ok-bg);
  color: var(--ok);
}

.success span {
  display: block;
}

.checkin-result-welcome {
  margin: 10px 0 22px;
  color: #111827;
}

.checkin-result-welcome h1 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 32px;
  font-weight: 900;
  line-height: 1.15;
}

.checkin-result-welcome p {
  margin: 0;
  color: #111827;
  font-size: 17px;
  font-weight: 600;
}

.checkin-featured-poster {
  margin: 0 0 22px;
}

.checkin-featured-poster h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
}

.checkin-featured-poster img {
  display: block;
  width: 100%;
  max-height: 520px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.brag-checkin-card {
  display: grid;
  gap: 6px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid #d7e4dd;
  border-radius: 8px;
  background: #f7fbf8;
  color: #111827;
}

.brag-checkin-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.brag-checkin-card strong {
  color: var(--forest);
  font-size: 24px;
  line-height: 1.15;
}

.brag-checkin-card p {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 800;
}

.brag-ranking-card {
  margin: -4px 0 18px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.brag-ranking-card h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.brag-ranking-card ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: brag-rank;
}

.brag-ranking-card li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #edf0ed;
  border-radius: 8px;
  background: #f8faf8;
  counter-increment: brag-rank;
}

.brag-ranking-card li::before {
  content: counter(brag-rank);
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.brag-ranking-card li.is-current {
  border-color: #d7e4dd;
  background: #f0f8f2;
}

.brag-ranking-card span {
  min-width: 0;
  color: #111827;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.brag-ranking-card strong {
  color: var(--forest);
  font-size: 14px;
  white-space: nowrap;
}

.checkin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.42);
}

.checkin-modal-backdrop[hidden] {
  display: none;
}

.checkin-modal {
  position: relative;
  width: min(560px, 100%);
  padding: 42px 44px;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  text-align: center;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.22);
}

.checkin-modal strong,
.checkin-modal span {
  display: block;
  width: 100%;
  text-align: center;
  font-weight: 900;
}

.checkin-modal strong {
  margin-bottom: 10px;
  font-size: 34px;
  line-height: 1.1;
}

.checkin-modal span {
  font-size: 24px;
  line-height: 1.3;
}

.checkin-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  box-shadow: none;
}

.danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
}

.compact {
  display: inline-block;
}

.form {
  display: grid;
  gap: 14px;
}

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

label {
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}

.field {
  display: grid;
  gap: 6px;
}

.field-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 11px;
  color: var(--ink);
  font: inherit;
  background: #ffffff;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.check {
  align-content: end;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.check input {
  width: auto;
}

.wide,
.grid-form .actions {
  grid-column: 1 / -1;
}

.image-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfdff;
}

.member-image-preview,
.image-placeholder {
  width: 42px;
  height: 42px;
  border-radius: 7px;
}

.member-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.member-image-preview {
  flex: 0 0 auto;
  overflow: hidden;
  background: #eef2f7;
}

.member-image-preview img,
.member-thumb {
  display: block;
  object-fit: cover;
}

.member-image-preview img {
  width: 100%;
  height: 100%;
}

.image-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  font-size: 10px;
  line-height: 1.15;
  text-align: center;
}

.image-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.member-thumb {
  width: 48px;
  height: 48px;
}

.thumb-empty {
  color: var(--muted);
  font-size: 13px;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat {
  padding: 18px;
}

.stat span {
  display: block;
  color: var(--muted);
}

.stat strong {
  display: block;
  font-size: 30px;
  margin-top: 4px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.section-title h1 {
  margin: 0;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.row-actions form {
  display: inline;
}

.row-actions button {
  min-height: 0;
  padding: 0;
  border: 0;
  color: var(--primary-dark);
  background: transparent;
  font-weight: 400;
}

.badge {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
}

.badge.paid {
  color: var(--ok);
  background: var(--ok-bg);
}

.badge.outstanding {
  color: var(--warn);
  background: var(--warn-bg);
}

code {
  background: #eef2f7;
  border-radius: 5px;
  padding: 2px 5px;
}

body.admin-body {
  --forest: #cf2030;
  --forest-2: #9f1724;
  --gold: #64666a;
  --gold-2: #7b7d82;
  --paper: #ffffff;
  --muted: #64666a;
  --line: #e2e3e5;
  --surface: #f7f7f8;
  --shadow: 0 22px 58px rgba(100, 102, 106, 0.11);
  margin: 0;
  background: radial-gradient(circle at top left, rgba(207, 32, 48, 0.09), transparent 34%),
    linear-gradient(135deg, #f8f1f2, #f5f5f6);
  color: #1e241f;
  font-family: var(--font-admin);
  font-size: 14px;
  line-height: 1.55;
}

.admin-body .admin-shell {
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.24s ease;
}

.admin-body .sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: linear-gradient(180deg, var(--forest), var(--forest-2));
  color: #ffffff;
  box-shadow: 18px 0 50px rgba(100, 102, 106, 0.18);
  transition: padding 0.24s ease;
}

.admin-body .sidebar-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}

.admin-body .brand.admin-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  padding: 12px;
  color: #ffffff;
}

.admin-body .brand-logo {
  display: block;
  max-width: 174px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
}

.admin-body .brand-logo-image {
  display: block;
  width: 100%;
  max-width: 174px;
  max-height: 100px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.admin-body .brand-icon {
  display: none;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.admin-body .brand-icon-image {
  display: none;
  width: 34px;
  height: 34px;
  object-fit: contain;
  padding: 5px;
  border-radius: 12px;
  background: #fff;
}

.admin-body .sidebar-toggle {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.admin-body .sidebar-toggle:hover {
  background: var(--forest);
  transform: translateY(-1px);
}

.admin-body .topbar-sidebar-toggle {
  display: none;
  flex: 0 0 auto;
}

.admin-body .nav-list {
  display: grid;
  gap: 9px;
}

.admin-body .nav-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 15px;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.76);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, padding 0.24s ease;
}

.admin-body .nav-list a.is-active,
.admin-body .nav-list a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transform: translateX(2px);
}

.admin-body .nav-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #ffffff;
  font-size: 13px;
}

.admin-body .nav-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.18s ease, width 0.24s ease;
}

.admin-body .nav-arrow {
  margin-left: auto;
  transition: opacity 0.18s ease;
}

.admin-body .main {
  min-width: 0;
}

.admin-body .topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 82px;
  padding: 0 clamp(20px, 3vw, 38px);
  border-bottom: 1px solid rgba(207, 32, 48, 0.1);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
}

.admin-body .topbar h1 {
  margin: 0;
  color: var(--forest);
  font-size: clamp(25px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
}

.admin-body .top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-body .topbar-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-body .topbar-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-body .content {
  padding: clamp(20px, 3vw, 38px);
}

.admin-body .panel {
  margin-bottom: 24px;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid rgba(207, 32, 48, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.admin-body .panel h1,
.admin-body .panel h2 {
  margin: 0 0 16px;
  color: var(--forest);
  font-size: 22px;
  font-weight: 700;
}

.admin-body .dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-body .stat {
  padding: 22px;
  border: 1px solid rgba(207, 32, 48, 0.16);
  border-radius: 22px;
  background: linear-gradient(145deg, #ffffff, #fff0f2);
  box-shadow: var(--shadow);
}

.admin-body .stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.admin-body .stat strong {
  display: block;
  margin-top: 10px;
  color: var(--forest);
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
}

.admin-body .grid-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-body label {
  display: grid;
  gap: 7px;
  color: #3d493f;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-body .field {
  display: grid;
  gap: 7px;
}

.admin-body .field-label {
  color: #3d493f;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-body input,
.admin-body textarea,
.admin-body select {
  width: 100%;
  min-height: 0;
  border: 1px solid #e2e3e5;
  border-radius: 14px;
  padding: 13px 14px;
  background: #fff;
  color: #1e241f;
  font: inherit;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-body input:focus,
.admin-body textarea:focus,
.admin-body select:focus {
  outline: 0;
  border-color: rgba(207, 32, 48, 0.72);
  box-shadow: 0 0 0 4px rgba(207, 32, 48, 0.12);
}

.admin-body textarea {
  min-height: 110px;
}

.admin-body .check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-body .check input {
  width: auto;
}

.admin-body .actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.admin-body .btn,
.admin-body .button,
.admin-body button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 19px;
  border: 0;
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(207, 32, 48, 0.16);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.admin-body .btn:hover,
.admin-body .button:hover,
.admin-body button:hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
}

.admin-body .btn.secondary,
.admin-body .button.secondary {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 12px 24px rgba(100, 102, 106, 0.18);
}

.admin-body .button.danger-button {
  background: #8f1f2b;
  color: #fff;
  box-shadow: 0 12px 24px rgba(143, 31, 43, 0.18);
}

.admin-body .icon-button {
  width: 44px;
  min-width: 44px;
  padding: 0;
  background: #f2f2f3;
  color: var(--forest);
  box-shadow: none;
}

.admin-body .hint,
.admin-body .muted {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.admin-body .notice,
.admin-body .success {
  margin-bottom: 22px;
  padding: 14px 16px;
  border: 0;
  border-radius: 16px;
  background: #fff0f2;
  color: var(--forest);
  font-weight: 700;
}

.admin-body .warning {
  border: 0;
  border-radius: 16px;
  background: #f2f2f3;
  color: var(--gold);
  font-weight: 700;
}

.admin-body .danger {
  border: 0;
  border-radius: 16px;
}

.admin-body .table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e3e5;
  border-radius: 18px;
  background: #fff;
}

.admin-body table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.admin-body th,
.admin-body td {
  padding: 14px 16px;
  border-bottom: 1px solid #e8ece3;
  text-align: left;
  vertical-align: top;
}

.admin-body th {
  color: var(--forest);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #f7f7f8;
}

.admin-body td {
  color: #2f3831;
  font-size: 13px;
}

.admin-body tr:last-child td {
  border-bottom: 0;
}

.admin-body .badge,
.admin-body .status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f2f2f3;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-body .badge.paid {
  background: #fff0f2;
  color: var(--forest);
}

.admin-body .image-field {
  border: 1px solid #e2e3e5;
  border-radius: 14px;
  background: #fff;
}

.admin-body .member-image-preview,
.admin-body .image-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #f7f7f8;
}

.admin-body .brand-logo-preview {
  width: 96px;
}

.admin-body .brand-logo-preview img {
  object-fit: contain;
  padding: 4px;
}

.admin-body .poster-image-field {
  align-items: flex-start;
}

.admin-body .poster-image-preview {
  width: 132px;
  height: 86px;
}

.admin-body .poster-image-preview img {
  object-fit: cover;
}

.admin-body .member-thumb {
  border-radius: 12px;
}

.admin-body .row-actions button {
  min-height: auto;
  padding: 0;
  background: transparent;
  color: var(--forest);
  box-shadow: none;
  font-weight: 600;
}

.admin-body .section-title {
  align-items: center;
}

.admin-body .member-filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(190px, 1fr) minmax(160px, 0.8fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid #e2e3e5;
  border-radius: 18px;
  background: #fff;
}

.admin-body .member-filter-actions {
  margin-top: 0;
  justify-content: flex-start;
}

.admin-body .fee-filter-form {
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 0.8fr) minmax(160px, 0.8fr) auto;
}

.admin-body .bulk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-body .bulk-actions label {
  min-width: 190px;
}

.admin-body .select-cell {
  width: 42px;
  text-align: center;
}

.admin-body .sort-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--forest);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.admin-body .sort-link i {
  color: var(--muted);
  font-size: 12px;
}

.admin-body .icon-action {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #fff0f2;
  color: var(--forest);
  box-shadow: none;
  text-decoration: none;
}

.admin-body .icon-action.danger-action {
  background: #f2f2f3;
  color: #64666a;
}

.admin-body .row-actions .icon-action {
  min-height: 34px;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
}

.admin-body .media-upload-form {
  display: grid;
  gap: 16px;
}

.admin-body .compact-repeater-head {
  margin-bottom: 10px;
}

.admin-body .power-team-repeater {
  display: grid;
  gap: 10px;
}

.admin-body .power-team-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #e2e3e5;
  border-radius: 16px;
  background: #fff;
}

.admin-body .media-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.admin-body .media-picker[hidden] {
  display: none;
}

.admin-body .media-picker {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(100, 102, 106, 0.62);
  backdrop-filter: blur(8px);
}

.admin-body .media-picker__dialog {
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: 22px;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
}

.admin-body .media-picker__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-body .media-picker__head h2 {
  margin: 0;
  color: var(--forest);
}

.admin-body .media-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.admin-body .media-pick-card {
  overflow: hidden;
  display: block;
  min-height: 0;
  padding: 0;
  border: 1px solid #e2e6dc;
  border-radius: 16px;
  background: #fff;
  color: var(--forest);
  text-align: left;
  box-shadow: none;
}

.admin-body .media-pick-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f2f2f3;
}

.admin-body .media-pick-card span {
  display: block;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.admin-body .media-library-card {
  overflow: hidden;
  border: 1px solid #e2e3e5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(100, 102, 106, 0.08);
}

.admin-body .media-library-card.is-assigned {
  border-color: rgba(207, 32, 48, 0.18);
  background: #fffafa;
}

.admin-body .media-library-thumb {
  background: #f2f2f3;
}

.admin-body .media-library-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.admin-body .media-library-body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.admin-body .media-library-body strong {
  color: var(--forest);
  overflow-wrap: anywhere;
}

.admin-body .media-library-body span,
.admin-body .media-library-body small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.admin-body .brag-group-grid,
.admin-body .brag-score-grid,
.admin-body .brag-objective-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.admin-body .brag-group-card,
.admin-body .brag-score-card,
.admin-body .brag-objective-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e2e3e5;
  border-radius: 18px;
  background: #fff;
}

.admin-body .brag-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.admin-body .brag-member-repeater {
  display: grid;
  gap: 8px;
}

.admin-body .brag-member-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-body .brag-member-row select {
  min-width: 0;
}

.admin-body .brag-group-card strong {
  color: var(--forest);
  font-size: 22px;
}

.admin-body .brag-score-card h2 {
  margin-bottom: 2px;
}

.admin-body .brag-score-card .check {
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f1;
}

.admin-body .brag-score-card .check:last-child {
  border-bottom: 0;
}

.admin-body .brag-score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f1;
}

.admin-body .brag-score-row:last-child {
  border-bottom: 0;
}

.admin-body .brag-score-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-body .brag-score-row strong {
  color: #2f3831;
  font-size: 13px;
  line-height: 1.25;
}

.admin-body .brag-score-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-body .brag-score-row input {
  width: 86px;
  text-align: center;
}

.admin-body .brag-winner-row td {
  background: #fff0f2;
  color: var(--forest);
}

.admin-body .media-select {
  justify-content: flex-start;
  color: var(--forest);
  text-transform: none;
  letter-spacing: 0;
}

.admin-body .button i,
.admin-body .btn i,
.admin-body button i {
  margin-right: 8px;
}

.admin-body .icon-button i,
.admin-body .sidebar-toggle i,
.admin-body .nav-icon i,
.admin-body .row-actions button i {
  margin-right: 0;
}

.admin-body .dashboard-empty {
  padding: 18px;
  border: 1px dashed #d7d7da;
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.admin-body .admin-shell.is-sidebar-collapsed {
  grid-template-columns: 92px minmax(0, 1fr);
}

.admin-body .admin-shell.is-sidebar-collapsed .sidebar {
  display: flex;
  flex-direction: column;
  padding-inline: 14px;
}

.admin-body .admin-shell.is-sidebar-collapsed .sidebar-head {
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-body .admin-shell.is-sidebar-collapsed .brand {
  flex: 0 0 auto;
  justify-content: center;
  width: 54px;
  height: 54px;
  padding: 10px;
  border-radius: 18px;
}

.admin-body .admin-shell.is-sidebar-collapsed .brand-logo {
  display: none;
}

.admin-body .admin-shell.is-sidebar-collapsed .brand-logo-image {
  display: none;
}

.admin-body .admin-shell.is-sidebar-collapsed .brand-icon {
  display: block;
}

.admin-body .admin-shell.is-sidebar-collapsed .brand-icon-image {
  display: block;
}

.admin-body .admin-shell.is-sidebar-collapsed .nav-text,
.admin-body .admin-shell.is-sidebar-collapsed .nav-arrow {
  display: none;
}

.admin-body .admin-shell.is-sidebar-collapsed .nav-list {
  align-content: center;
  flex: 1;
  margin-top: 0;
  padding-bottom: 96px;
}

.admin-body .admin-shell.is-sidebar-collapsed .nav-list a {
  display: grid;
  place-items: center;
  justify-content: center;
  width: 54px;
  min-height: 48px;
  margin-inline: auto;
  padding: 0;
  gap: 0;
}

.admin-body .admin-shell.is-sidebar-collapsed .nav-icon {
  width: 100%;
  height: 100%;
  font-size: 16px;
}

@media (max-width: 900px) {
  .topbar,
  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard,
  .grid-form,
  .checkin-choice-grid,
  .public-filter {
    grid-template-columns: 1fr;
  }

  .page {
    margin-top: 16px;
  }

  .table-wrap,
  .admin-body .table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .table-wrap table,
  .admin-body table {
    min-width: 0;
  }

  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap th,
  .table-wrap td {
    display: block;
    width: 100%;
  }

  .table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .table-wrap tbody {
    display: grid;
    gap: 12px;
  }

  .table-wrap tbody tr {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .admin-body .table-wrap tbody tr {
    border-color: #e2e3e5;
  }

  .table-wrap td,
  .admin-body .table-wrap td {
    display: grid;
    grid-template-columns: minmax(104px, 38%) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 44px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
  }

  .admin-body .table-wrap td {
    border-bottom-color: #e8ece3;
  }

  .table-wrap td:last-child,
  .admin-body .table-wrap td:last-child {
    border-bottom: 0;
  }

  .table-wrap td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .admin-body .table-wrap td::before {
    color: var(--forest);
  }

  .table-wrap td[data-label=""],
  .admin-body .table-wrap td[data-label=""] {
    display: block;
    text-align: center;
  }

  .table-wrap td[data-label=""]::before {
    display: none;
  }

  .table-wrap td.select-cell,
  .admin-body .table-wrap td.select-cell {
    grid-template-columns: minmax(104px, 38%) auto;
    justify-content: space-between;
  }

  .table-wrap td.row-actions,
  .admin-body .table-wrap td.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
  }

  .table-wrap td.row-actions::before,
  .admin-body .table-wrap td.row-actions::before {
    flex: 0 0 min(38%, 140px);
  }
}

@media (max-width: 900px) {
  .admin-body .admin-shell {
    grid-template-columns: 84px minmax(0, 1fr);
    overflow-x: hidden;
  }

  .admin-body .admin-shell.is-sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-body .admin-shell.is-sidebar-collapsed .main {
    grid-column: 1;
    width: 100%;
    max-width: 100vw;
  }

  .admin-body .sidebar {
    display: flex;
    flex-direction: column;
    position: relative;
    top: auto;
    width: 84px;
    height: auto;
    min-height: 100vh;
    padding: 18px 14px;
    overflow: hidden;
    transition: transform 0.2s ease;
  }

  .admin-body .admin-shell.is-sidebar-collapsed .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    transform: translateX(-84px);
  }

  .admin-body .sidebar-head,
  .admin-body .admin-shell.is-sidebar-collapsed .sidebar-head {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 16px;
  }

  .admin-body .sidebar-head .sidebar-toggle {
    display: none;
  }

  .admin-body .topbar-sidebar-toggle {
    display: inline-grid;
    place-items: center;
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 14px;
    background: var(--forest);
    color: #fff;
  }

  .admin-body .brand,
  .admin-body .admin-shell.is-sidebar-collapsed .brand {
    flex: 0 0 auto;
    justify-content: center;
    width: 54px;
    height: 54px;
    padding: 10px;
    border-radius: 18px;
  }

  .admin-body .brand-logo,
  .admin-body .brand-logo-image,
  .admin-body .nav-text,
  .admin-body .nav-arrow,
  .admin-body .admin-shell.is-sidebar-collapsed .brand-logo,
  .admin-body .admin-shell.is-sidebar-collapsed .brand-logo-image,
  .admin-body .admin-shell.is-sidebar-collapsed .nav-text,
  .admin-body .admin-shell.is-sidebar-collapsed .nav-arrow {
    display: none;
  }

  .admin-body .brand-icon,
  .admin-body .brand-icon-image,
  .admin-body .admin-shell.is-sidebar-collapsed .brand-icon,
  .admin-body .admin-shell.is-sidebar-collapsed .brand-icon-image {
    display: block;
  }

  .admin-body .nav-list,
  .admin-body .admin-shell.is-sidebar-collapsed .nav-list {
    align-content: start;
    flex: 1;
    width: 100%;
    margin-top: 0;
    padding-bottom: 96px;
  }

  .admin-body .nav-list a,
  .admin-body .admin-shell.is-sidebar-collapsed .nav-list a {
    display: grid;
    place-items: center;
    justify-content: center;
    width: 54px;
    min-height: 48px;
    margin-inline: auto;
    padding: 0;
    gap: 0;
  }

  .admin-body .nav-icon,
  .admin-body .admin-shell.is-sidebar-collapsed .nav-icon {
    width: 100%;
    height: 100%;
    font-size: 16px;
  }

  .admin-body .dashboard,
  .admin-body .grid-form,
  .admin-body .power-team-row,
  .admin-body .member-filter-form {
    grid-template-columns: 1fr;
  }

  .admin-body .topbar {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .admin-body .topbar-title {
    flex: 1 1 220px;
  }

  .admin-body .topbar-title-row h1 {
    min-width: 0;
  }
}
