body.page-admin {
  padding-bottom: 32px;
  background: #f3f5f8;
}

.admin-kicker {
  margin: 12px 0 0;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: var(--gold);
}

.admin-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-gate-card {
  width: min(400px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(15, 39, 68, 0.06);
}

.admin-gate-card img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 16px;
}

.admin-gate-card h1 {
  margin: 6px 0 0;
  font-size: 1.35rem;
  color: var(--navy);
  letter-spacing: -0.03em;
}

.admin-gate-lead {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 6px 0 22px;
}

.admin-gate-card .field {
  text-align: left;
}

.admin-gate-card .btn {
  width: 100%;
}

.admin-back {
  display: inline-block;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
}

.admin-top {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.admin-top-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
}

.admin-brand p {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: var(--gold);
  font-weight: 700;
}

.admin-brand strong {
  display: block;
  color: var(--navy);
  font-size: 0.92rem;
}

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

.admin-top-actions a,
.admin-top-actions button {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
}

.admin-shell {
  width: min(1120px, calc(100% - 24px));
  margin: 20px auto 0;
}

.admin-tabs {
  display: flex;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 16px;
}

.admin-tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  min-height: 40px;
  border-radius: 8px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}

.admin-tabs button.is-on {
  background: var(--navy);
  color: #fff;
}

.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.kpi-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.kpi span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.kpi strong {
  display: block;
  margin-top: 2px;
  font-size: 1.45rem;
  color: var(--navy);
  letter-spacing: -0.04em;
}

.charts-grid {
  display: grid;
  gap: 12px;
}

.chart-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.chart-card h2 {
  margin: 0;
  font-size: 1rem;
}

.chart-help {
  margin: 4px 0 16px;
  color: var(--muted);
  font-size: 0.8rem;
}

.cong-panel {
  margin-top: 12px;
  overflow: visible;
}

.cong-select-wrap {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  width: min(360px, 100%);
}

.cong-select-wrap p {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.cong-dropdown {
  position: relative;
}

.cong-dropdown .combo-trigger svg {
  transition: transform 0.15s ease;
}

.cong-dropdown.is-open .combo-trigger svg {
  transform: rotate(180deg);
}

.cong-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(15, 39, 68, 0.16);
  max-height: min(320px, 50vh);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.cong-menu[hidden] {
  display: none;
}

.cong-menu li + li {
  margin-top: 2px;
}

.cong-menu button {
  width: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  padding: 10px 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}

.cong-menu button em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cong-menu button.is-placeholder {
  color: var(--muted);
  font-weight: 500;
}

.cong-menu button[aria-selected="true"] {
  background: #eef2f7;
}

.cong-menu button:hover,
.cong-menu button:active {
  background: #f4f6fa;
}

.cong-board {
  display: grid;
  gap: 14px;
}

.cong-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
  overflow: hidden;
}

.cong-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.cong-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cong-card-head strong {
  display: block;
  color: var(--navy);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.cong-card-head span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.cong-total {
  margin-left: auto;
  font-size: 1.45rem;
  color: var(--navy);
  letter-spacing: -0.04em;
  line-height: 1;
}

.cong-days {
  display: grid;
  gap: 10px;
  padding: 12px 14px 14px;
}

.cong-day {
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
}

.cong-day-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.cong-day-head i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.cong-day-head span {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--navy);
}

.cong-day-head strong {
  margin-left: auto;
  font-size: 0.95rem;
  color: var(--navy);
}

.cong-sess-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cong-sess {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f4f6fa;
  border-radius: 999px;
  padding: 6px 10px 6px 12px;
  color: var(--muted);
}

.cong-sess em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cong-sess b {
  font-size: 0.85rem;
  color: var(--navy);
}

.cong-sess.is-on {
  background: #eef2ff;
  color: var(--navy);
}

.donut-box {
  display: grid;
  gap: 16px;
  align-items: center;
}

.donut {
  position: relative;
  width: 168px;
  height: 168px;
  margin: 0 auto;
}

.donut svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-center {
  position: absolute;
  inset: 34px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-content: center;
  text-align: center;
}

.donut-center b {
  font-size: 1.5rem;
  color: var(--navy);
  line-height: 1;
}

.donut-center small {
  color: var(--muted);
  font-size: 0.72rem;
}

.legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}

.legend i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend em {
  margin-left: auto;
  font-style: normal;
  color: var(--muted);
  font-weight: 700;
}

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

.day-orb {
  text-align: center;
}

.day-orb b {
  width: 80px;
  height: 80px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.15rem;
  box-shadow: 0 8px 20px rgba(15, 39, 68, 0.12);
}

.day-orb span {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
}

.empty-note {
  color: var(--muted);
  font-size: 0.88rem;
  padding: 18px 4px 12px;
}

.filter-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 22px 20px;
  margin-bottom: 18px;
  box-shadow: 0 10px 30px rgba(15, 39, 68, 0.04);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f4f6fa;
  border-radius: 14px;
  padding: 4px 16px;
  margin-bottom: 22px;
}

.search-ico {
  color: var(--muted);
  font-size: 1.1rem;
}

.search-box input {
  border: 0;
  background: transparent;
  box-shadow: none;
  min-height: 42px;
  padding: 0;
}

.search-box input:focus {
  box-shadow: none;
}

.filter-block {
  margin-top: 4px;
}

.filter-block p {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.filter-row {
  display: grid;
  gap: 20px;
  margin-bottom: 22px;
}

.picked {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  min-height: 0;
}

.picked:empty {
  display: none;
}

.picked-chip {
  border: 0;
  background: #eef2f7;
  color: var(--navy);
  border-radius: 999px;
  padding: 6px 8px 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.picked-chip span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  line-height: 1;
}

.picker-foot {
  padding: 12px 16px calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--line);
}

.picker-foot .btn {
  width: 100%;
}

.page-admin .city-list {
  flex: 1;
}

.city-list li button[aria-selected="true"]::after {
  content: "✓";
  margin-left: auto;
  color: var(--navy);
}

.page-admin .select-wrap select,
.page-admin .combo-trigger {
  background: #f4f6fa;
  border: 0;
  min-height: 48px;
}

.page-admin .combo-trigger.has-value span {
  color: var(--navy);
  font-weight: 700;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip {
  border: 0;
  background: #f4f6fa;
  color: var(--navy);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.chip:hover {
  transform: translateY(-1px);
}

.chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.chip.is-on {
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 39, 68, 0.16);
}

.filter-schedule {
  margin-top: 22px;
}

.filter-schedule p {
  margin-bottom: 14px;
}

.session-filter-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.session-day-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.session-day-name {
  min-width: 3.2rem;
  margin-right: 4px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--navy);
}

.chips-sessions {
  gap: 12px;
}

.chips-sessions .chip {
  padding: 8px 14px;
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  .session-day-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .cong-select-wrap {
    width: 100%;
  }

  .cong-menu {
    max-height: min(280px, 45vh);
  }
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn-soft {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: #f4f6fa;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
  padding: 0 18px;
}

.filter-actions .btn {
  flex: 1;
  min-width: 160px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.result-line {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.table-wrap {
  overflow: auto;
  max-height: min(70vh, 720px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.people-table {
  min-width: 980px;
}

.people-table thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
  padding: 14px 16px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.people-table td {
  padding: 14px 16px;
  vertical-align: top;
}

.sess-cell {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.sess-group {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.sess-day {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  border-radius: 999px;
  padding: 3px 8px;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.sess-items {
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  padding-top: 1px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.pager-info {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.pager-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pager-nav span {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
}

.pager-nav button {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  padding: 0 12px;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--line);
}

.pager-nav button:disabled {
  opacity: 0.4;
  cursor: default;
}

.people-table tbody tr {
  cursor: pointer;
}

.people-table tbody tr:hover {
  background: #f7f8fb;
}

.people-table .muted {
  color: var(--muted);
  font-weight: 400;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.drawer[hidden] {
  display: none !important;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 39, 68, 0.45);
}

.drawer-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: min(92dvh, 100%);
  background: #fff;
  padding: 18px 18px calc(18px + var(--safe-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 40px rgba(15, 39, 68, 0.16);
}

.drawer-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.drawer-panel h2 {
  margin: 0;
  font-size: 1.05rem;
}

.drawer-panel dl {
  margin: 0;
}

.drawer-panel dl > div {
  display: grid;
  grid-template-columns: minmax(72px, 110px) 1fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.drawer-panel dt {
  color: var(--muted);
  font-size: 0.8rem;
}

.drawer-panel dd {
  margin: 0;
  font-weight: 600;
}

.drawer-panel ul {
  margin: 8px 0 0;
  padding-left: 16px;
}

.drawer-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ecfdf3;
  color: #166534;
  font-size: 0.82rem;
  font-weight: 600;
}

.drawer-actions {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.drawer-edit .field {
  margin: 0 0 12px;
}

.drawer-edit label,
.drawer-edit .label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.drawer-edit input,
.drawer-edit select,
.drawer-edit textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

.drawer-day {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.drawer-day h4 {
  margin: 0 0 8px;
  font-size: 0.88rem;
}

.drawer-session {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  font-weight: 600;
}

.drawer-session em {
  margin-left: auto;
  font-style: normal;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (min-width: 800px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .chart-wide {
    grid-column: 1 / -1;
  }

  .donut-box {
    grid-template-columns: 180px 1fr;
  }

  .day-orbs {
    grid-template-columns: repeat(7, 1fr);
  }

  .cong-board {
    grid-template-columns: 1fr 1fr;
  }

  .filter-row {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 28px;
  }

  .filter-actions {
    justify-content: flex-end;
  }

  .filter-actions .btn-soft,
  .filter-actions .btn {
    flex: none;
  }

  .intro-admin {
    letter-spacing: 0.08em;
  }

  .drawer {
    display: block;
  }

  .drawer-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(420px, 100%);
    max-height: none;
    border-radius: 0;
    padding: 18px;
    box-shadow: -12px 0 40px rgba(15, 39, 68, 0.12);
  }
}
