/* Botrich admin theme. Loaded after style.css and overrides it.
   Colours come from the Botrich logo. */
:root {
  --bt-bg: #f4f5fa;
  --bt-surface: #ffffff;
  --bt-ink: #171a2e;
  --bt-mute: #656b86;
  --bt-line: #e0e3ee;
  --bt-soft: #ecedf7;
  --bt-accent: #4a3fd0;
  --bt-accent-ink: #ffffff;
  --bt-ok: #187a52;
  --bt-ok-bg: #dff3ea;
  --bt-warn: #8a5a00;
  --bt-warn-bg: #fbefd2;
  --bt-bad: #a1261d;
  --bt-bad-bg: #f8dedb;
  --bt-radius: 10px;
  --bt-side-w: 232px;
  --bt-font: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
    system-ui, sans-serif;
  --bt-mono: ui-monospace, "SF Mono", Consolas, Menlo, monospace;
}

body,
button,
input,
select,
textarea {
  font-family: var(--bt-font) !important;
}
body {
  background: var(--bt-bg);
  color: var(--bt-ink);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- Shell ---------- */
.bt-shell.wrapper {
  background: var(--bt-bg);
}
.bt-shell .body-content {
  overflow: visible;
  align-items: stretch;
  min-height: 100vh;
}
.bt-side {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--bt-side-w);
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: var(--bt-surface);
  border-right: 1px solid var(--bt-line);
  padding: 18px 12px;
  overflow-y: auto;
}
.bt-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 10px 14px;
}
.bt-brand img {
  display: block;
}
.bt-group-name {
  font-size: 11.5px;
  color: var(--bt-mute);
  letter-spacing: 0.08em;
  padding: 14px 10px 4px;
}
.bt-item {
  display: block;
  padding: 7px 10px;
  margin-bottom: 2px;
  border-radius: var(--bt-radius);
  color: var(--bt-ink);
  font-size: 14px;
  text-decoration: none;
}
.bt-item:hover {
  background: var(--bt-soft);
  color: var(--bt-ink);
}
.bt-item.is-on,
.bt-item.is-on:hover {
  background: var(--bt-ink);
  color: var(--bt-bg);
  font-weight: 600;
}
.bt-shade {
  display: none;
}
.bt-shell .body-content .page__content {
  padding: 0 28px 0 calc(var(--bt-side-w) + 28px);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.bt-shell .body-content .page__content header.bt-top {
  position: static;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 56px;
  margin: 0 -28px;
  padding: 0 28px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  border-bottom: 1px solid var(--bt-line);
}
.bt-menu-btn {
  display: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: var(--bt-ink);
  padding: 4px 8px;
}
.bt-crumb {
  color: var(--bt-mute);
  font-size: 13px;
}
.bt-crumb b {
  color: var(--bt-ink);
  font-weight: 600;
}
.bt-who {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.bt-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  border-bottom: 1px solid var(--bt-line);
  margin-top: 18px;
}
.bt-tab {
  padding: 8px 0;
  color: var(--bt-mute);
  font-weight: 500;
  text-decoration: none;
}
.bt-tab:hover {
  color: var(--bt-ink);
}
.bt-tab.is-on {
  color: var(--bt-ink);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--bt-accent);
}
.bt-shell .body-content .page__content .body__panel {
  padding: 22px 0 40px;
  min-height: 0;
  flex: 1;
}
.bt-shell .body-content .page__content footer {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  border-top: 1px solid var(--bt-line);
  padding: 14px 0;
  font-size: 12.5px;
  color: var(--bt-mute);
}

@media (max-width: 991px) {
  .bt-side {
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  .bt-menu-open .bt-side {
    transform: none;
  }
  .bt-menu-open .bt-shade {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 39;
    background: rgba(23, 26, 46, 0.4);
  }
  .bt-menu-btn {
    display: block;
  }
  .bt-shell .body-content .page__content {
    padding: 0 16px;
  }
  .bt-shell .body-content .page__content header.bt-top {
    margin: 0 -16px;
    padding: 0 16px;
  }
  .bt-shell .body-content .page__content .body__panel {
    padding: 18px 0 32px;
  }
}

/* ---------- Buttons ---------- */
.bt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--bt-ink);
  border-radius: var(--bt-radius);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  background: transparent;
  color: var(--bt-ink);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.bt-btn:hover {
  background: var(--bt-soft);
  color: var(--bt-ink);
}
.bt-btn-pri,
.bt-btn-pri:hover {
  background: var(--bt-accent);
  border-color: var(--bt-accent);
  color: var(--bt-accent-ink);
}
.bt-btn-pri:hover {
  filter: brightness(1.08);
}
.bt-btn-sm {
  padding: 4px 10px;
  font-size: 12.5px;
}
.bt-btn-lg {
  padding: 12px 34px;
  font-size: 16px;
}
.bt-btn-danger {
  border-color: var(--bt-bad);
  color: var(--bt-bad);
}
button.bt-btn:disabled {
  background: var(--bt-soft);
  border-color: var(--bt-line);
  color: var(--bt-mute);
  padding: 7px 14px;
  border-radius: var(--bt-radius);
  opacity: 1;
}
button.bt-btn-sm:disabled {
  padding: 4px 10px;
}
button.bt-btn-lg:disabled {
  padding: 12px 34px;
}

/* ---------- Page heading ---------- */
.bdy-top-heading-area {
  border: 0;
  padding: 0 0 14px;
  align-items: flex-end;
  gap: 10px;
}
.bdy-top-heading-area:before,
.bdy-top-heading-area:after {
  display: none;
}
.bdy-top-heading-area h2,
.bdy-top-heading-area h4,
.bdy-top-heading-area .heading,
.body__panel > .heading {
  font-size: 24px;
  font-weight: 700;
  color: var(--bt-ink);
  line-height: 1.25;
  margin-top: 0;
}
.bdy-top-heading-area .hdn-add-button {
  background: var(--bt-accent);
  color: var(--bt-accent-ink);
  border-radius: var(--bt-radius);
  padding: 9px 16px;
  margin-top: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  transition: none;
}
.bdy-top-heading-area .hdn-add-button:hover {
  box-shadow: none;
  transform: none;
  filter: brightness(1.08);
}
.bdy-top-heading-area .hdn-add-button img {
  height: 12px;
  margin-right: 8px;
}
.hdnsearchprt {
  margin-top: 0;
}
.hdnsearchprt input[type="text"] {
  box-shadow: none;
  border: 1px solid var(--bt-line);
  border-radius: var(--bt-radius);
  background: var(--bt-surface);
  padding: 7px 36px 7px 12px;
  font-weight: 400;
  font-size: 13px;
  max-width: 100%;
}
.hdnsearchprt:after {
  top: 6px;
  right: 12px;
  font-size: 14px;
}

/* ---------- Tables ---------- */
.bdy-data-table {
  margin-top: 4px;
}
.datatable {
  background: var(--bt-surface);
  border: 1px solid var(--bt-line);
  border-radius: var(--bt-radius);
  /* No overflow here: the row menus open over the edge of the table. */
}
.datatable table {
  border-spacing: 0;
  border-collapse: separate;
  font-size: 13.5px;
}
.datatable table tr {
  box-shadow: none;
  border-radius: 0;
  background: transparent;
  transition: none;
}
.datatable table tr td,
.datatable table tr th,
.bdy-data-table .datatable table tr td,
.bdy-data-table .datatable table tr th {
  border-radius: 0 !important;
  border-bottom: 1px solid var(--bt-line);
  padding: 11px 14px;
  text-align: left;
  vertical-align: middle;
}
.datatable table tr th,
.bdy-data-table .datatable table tr th {
  background: var(--bt-soft);
  color: var(--bt-mute);
  font-size: 12px;
  font-weight: 600;
  padding: 9px 14px;
}
.datatable table tr td,
.bdy-data-table .datatable table tr td {
  color: var(--bt-ink);
  font-size: 13.5px;
  font-weight: 400;
  word-break: normal;
  overflow-wrap: anywhere;
}
.datatable table tbody tr:last-child td {
  border-bottom: 0;
}
.datatable table tr td:last-child,
.datatable table tr th:last-child,
.bdy-data-table .datatable table tr td:last-child,
.bdy-data-table .datatable table tr th:last-child {
  text-align: right;
}
.datatable table tbody tr:hover {
  background-color: #f7f7fc !important;
  cursor: default;
}
.datatable table tbody tr:hover td,
.datatable table tbody tr:hover td a {
  color: var(--bt-ink);
}
.datatable table tbody tr:hover td span {
  color: inherit;
}
.datatable table tr td a {
  color: var(--bt-ink);
}
.bdy-data-table .datatable table tr td .small-td-one,
.bdy-data-table .datatable table tr td .small-td-two {
  width: auto;
  max-width: 320px;
  margin: 0;
}
.datatable td.catImg img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* Row menu */
.three-dots {
  font-size: 18px;
  color: var(--bt-mute);
  padding: 0 6px;
  text-decoration: none;
}
.more-action {
  border: 1px solid var(--bt-line);
  border-radius: var(--bt-radius);
  box-shadow: 0 8px 24px rgba(23, 26, 46, 0.12);
}
.viewcode .more-action li a {
  color: var(--bt-ink);
}
.viewcode .more-action li a:hover {
  background: var(--bt-soft);
}

/* Status pills used across lists */
.bt-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
  background: var(--bt-soft);
  color: var(--bt-mute);
}
.bt-pill-ok {
  background: var(--bt-ok-bg);
  color: var(--bt-ok);
}
.bt-pill-warn {
  background: var(--bt-warn-bg);
  color: var(--bt-warn);
}
.bt-pill-bad {
  background: var(--bt-bad-bg);
  color: var(--bt-bad);
}
.bt-pill-accent {
  background: var(--bt-accent);
  color: var(--bt-accent-ink);
}
.bt-mono {
  font-family: var(--bt-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}
.bt-mute {
  color: var(--bt-mute);
}

/* ---------- Pagination ---------- */
.pagination li a {
  width: auto;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--bt-line);
  border-radius: 8px;
  background: var(--bt-surface);
  color: var(--bt-ink);
  font-size: 13px;
}
.pagination li.active a {
  background: var(--bt-ink);
  border-color: var(--bt-ink);
  color: var(--bt-bg);
}

/* ---------- Panels ---------- */
.bt-shell .body-content .page__content .body__panel .panel,
.bt-panel {
  background: var(--bt-surface);
  border: 1px solid var(--bt-line);
  border-radius: var(--bt-radius);
  box-shadow: none;
}
.bt-panel {
  padding: 16px 18px;
}
.bt-panel h6 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--bt-ink);
}
.bt-panel h6 small {
  display: block;
  margin-top: 2px;
  font-weight: 400;
  font-size: 12.5px;
  color: var(--bt-mute);
}
.bt-field label {
  display: block;
  font-size: 12px;
  color: var(--bt-mute);
  margin: 10px 0 4px;
}
.bt-input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--bt-line);
  border-radius: var(--bt-radius);
  background: var(--bt-bg);
  padding: 7px 10px;
  font-size: 13px;
  color: var(--bt-ink);
  box-sizing: border-box;
}

/* ---------- Small helpers ---------- */
.bt-sub {
  margin: 2px 0 0;
  color: var(--bt-mute);
  font-size: 13px;
}
.bt-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.bt-section {
  margin: 26px 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--bt-ink);
}
.bt-notice {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  margin: 0 0 14px;
  border-radius: var(--bt-radius);
  font-weight: 600;
  font-size: 13.5px;
}
.bt-notice.is-ok {
  background: var(--bt-ok-bg);
  color: var(--bt-ok);
}
.bt-notice.is-bad {
  background: var(--bt-bad-bg);
  color: var(--bt-bad);
}
.bt-notice button {
  background: transparent;
  color: inherit;
  font-size: 16px;
  line-height: 1;
}
.bt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.bt-chip {
  border: 1px solid var(--bt-line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12.5px;
  background: var(--bt-surface);
  color: var(--bt-ink);
}
.bt-chip.is-on {
  border-color: var(--bt-ink);
  background: var(--bt-ink);
  color: var(--bt-bg);
}
.bt-chips .bt-input {
  width: 260px;
  max-width: 100%;
  background: var(--bt-surface);
}
.bt-chips .bt-count {
  margin-left: auto;
  color: var(--bt-mute);
  font-size: 12.5px;
}

/* ---------- Live draw console ---------- */
.bt-console {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
  align-items: start;
}
.bt-panel.is-alert {
  border-color: #e8b04a;
}
.bt-pool {
  display: flex;
  gap: 26px;
  margin-bottom: 14px;
}
.bt-pool b {
  display: block;
  font-size: 24px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.bt-pool span {
  font-size: 12.5px;
  color: var(--bt-mute);
}
.bt-prizes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.bt-prize {
  text-align: left;
  background: var(--bt-surface);
  border: 1px solid var(--bt-line);
  border-radius: var(--bt-radius);
  padding: 10px 12px;
  color: var(--bt-ink);
}
.bt-prize.is-on {
  border: 2px solid var(--bt-accent);
  padding: 9px 11px;
}
.bt-prize.is-done {
  opacity: 0.55;
}
.bt-prize b {
  display: block;
  font-size: 15px;
}
.bt-prize span {
  display: block;
  font-size: 12.5px;
  color: var(--bt-mute);
}
.bt-prize .bt-prize-name {
  color: var(--bt-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bt-prize i {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--bt-soft);
  margin-top: 8px;
  overflow: hidden;
}
.bt-prize i u {
  display: block;
  height: 100%;
  background: var(--bt-accent);
}
.bt-go {
  display: flex;
  gap: 12px;
  align-items: center;
}
.bt-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--bt-line);
  border-radius: var(--bt-radius);
  overflow: hidden;
}
.bt-stepper button,
.bt-stepper span {
  min-width: 44px;
  padding: 10px 0;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  background: var(--bt-surface);
  color: var(--bt-ink);
}
.bt-stepper button:disabled {
  background: var(--bt-surface);
  color: var(--bt-line);
  padding: 10px 0;
  border-radius: 0;
  opacity: 1;
}
.bt-stepper span {
  border-left: 1px solid var(--bt-line);
  border-right: 1px solid var(--bt-line);
  font-variant-numeric: tabular-nums;
}
.bt-lock {
  margin: 10px 0 0;
  font-size: 12.5px;
}
.bt-pend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--bt-line);
}
.bt-pend-who {
  flex: 1;
  min-width: 180px;
}
.bt-pend-who b {
  display: block;
  font-size: 16px;
}
.bt-pend-who span {
  display: block;
  font-size: 12.5px;
  color: var(--bt-mute);
  overflow-wrap: anywhere;
}
.bt-pend-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* ---------- Attendee list with the add drawer ---------- */
.bt-with-drawer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}
.bt-drawer {
  background: var(--bt-surface);
  border: 1px solid var(--bt-ink);
  border-radius: var(--bt-radius);
  padding: 16px;
}
.bt-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.bt-drawer-head b {
  font-size: 15px;
}
.bt-found {
  border: 1px dashed var(--bt-line);
  border-radius: var(--bt-radius);
  padding: 10px;
  margin-top: 10px;
  font-size: 13px;
}
.bt-found span {
  display: block;
  color: var(--bt-mute);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}
.bt-found .bt-btn {
  margin-top: 8px;
}
.bt-or {
  border-top: 1px solid var(--bt-line);
  margin-top: 14px;
  padding-top: 10px;
  font-size: 12.5px;
  color: var(--bt-mute);
}
@media (max-width: 1100px) {
  .bt-with-drawer {
    grid-template-columns: minmax(0, 1fr);
  }
  .bt-drawer {
    order: -1;
  }
}
.bt-bad-text {
  color: var(--bt-bad) !important;
}

/* Official events list */
.bt-ev {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bt-ev img {
  flex: none;
}
.bt-ev b {
  font-weight: 600;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bt-row-acts {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
}
.bt-row-acts .viewcode {
  position: relative;
}
.datatable table thead tr:first-child th:first-child {
  border-top-left-radius: var(--bt-radius) !important;
}
.datatable table thead tr:first-child th:last-child {
  border-top-right-radius: var(--bt-radius) !important;
}
.datatable table tr td.catImg img,
.bdy-data-table .datatable table tr td.catImg img {
  width: 44px !important;
  height: 44px !important;
  max-width: none;
  object-fit: cover;
  border-radius: 8px;
}
.datatable table tr td.bt-mono,
.datatable table tr td.bt-nowrap {
  white-space: nowrap;
  overflow-wrap: normal;
}
.bt-ev b {
  max-width: 300px;
}
/* A cell that takes the spare width and shortens its text to fit. */
.datatable table tr td.bt-grow {
  width: 100%;
  max-width: 0;
}
.bt-ev-text {
  flex: 1;
  min-width: 0;
}
.bt-ev-text b,
.bt-ev-text span {
  display: block;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.three-dots {
  display: inline-block;
  white-space: nowrap;
  overflow-wrap: normal;
  line-height: 1;
}
.bt-row-acts .bt-btn {
  flex: none;
}

/* style.css turns table cells into inline blocks on narrow screens. Keep real
   tables and let them scroll sideways instead. */
@media (max-width: 1024px) {
  .datatable {
    overflow-x: auto;
  }
  .datatable table tr td {
    display: table-cell;
    padding: 11px 14px;
  }
  .datatable table tr td::before {
    content: none;
  }
  .datatable table tr td:last-child {
    text-align: right !important;
  }
  .datatable table tr td.bt-grow {
    width: auto;
    max-width: none;
    min-width: 220px;
  }
}

/* style.css gives every submit button a large blue look. */
button.bt-btn[type="submit"] {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  background: transparent;
  color: var(--bt-ink);
  padding: 7px 14px;
  margin-top: 0;
  border-radius: var(--bt-radius);
  box-shadow: none;
  transform: none;
}
button.bt-btn-sm[type="submit"] {
  padding: 4px 10px;
  font-size: 12.5px;
}
button.bt-btn-pri[type="submit"] {
  background: var(--bt-accent);
  color: var(--bt-accent-ink);
}
@media (max-width: 1024px) {
  .datatable table tr td,
  .datatable table tr th {
    white-space: nowrap;
    overflow-wrap: normal;
  }
}
