* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: #edf2fb;
  color: #1f2d4f;
}

.bo-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.bo-sidebar {
  background: #141f4b;
  color: #d9e2ff;
  padding: 16px 12px;
}

.bo-brand {
  display: inline-flex;
  align-items: center;
  margin: 4px 8px 18px;
  text-decoration: none;
}

.bo-brand-logo {
  display: block;
  width: 148px;
  max-width: 100%;
  height: auto;
}

@media (max-width: 1200px) {
  .bo-brand-logo { width: 138px; }
}

@media (max-width: 860px) {
  .bo-brand-logo { width: 132px; }
}

@media (max-width: 520px) {
  .bo-brand-logo { width: 120px; }
}

.bo-menu-group {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #8090c6;
  margin: 16px 8px 8px;
}

.bo-menu {
  display: grid;
  gap: 4px;
}

.bo-menu a {
  text-decoration: none;
  color: #dce6ff;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
}

.bo-menu a:hover,
.bo-menu a.is-active {
  background: linear-gradient(120deg, #5f53e8, #7266f0);
  color: #fff;
}

.bo-main {
  padding: 10px 14px 18px;
}

.bo-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.bo-search-wrap {
  flex: 1;
  max-width: 320px;
}

.bo-search {
  width: 100%;
  min-height: 33px;
  border: 1px solid #d9e1f1;
  border-radius: 5px;
  background: #fff;
  padding: 0 11px;
  font-size: 12px;
  color: #36456d;
}

.bo-topbar-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.bo-live-refresh {
  border-radius: 999px;
  background: #e7f8ec;
  color: #16743a;
  border: 1px solid #cdeed8;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
}

.bo-live-refresh.is-hidden {
  display: none;
}

.bo-maint {
  font-size: 12px;
  color: #1f2d4f;
  font-weight: 600;
}

.bo-user {
  border-radius: 999px;
  border: 1px solid #e6ebf7;
  background: #fff;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.bo-page {
  background: #fff;
  border: 1px solid #e3e9f6;
  border-radius: 14px;
  padding: 12px;
}

.bo-breadcrumb {
  font-size: 12px;
  color: #7b8bb6;
  margin-bottom: 10px;
}

.bo-breadcrumb a {
  color: #4f46e5;
  text-decoration: none;
  font-weight: 600;
}

.bo-breadcrumb a:hover {
  text-decoration: underline;
}

.bo-breadcrumb-current {
  color: #2563eb;
  font-weight: 700;
}

.bo-hero {
  border-radius: 10px;
  background: linear-gradient(120deg, #5f53e8, #7662ed);
  padding: 18px;
  color: #fff;
  margin-bottom: 12px;
}

.bo-hero h1 {
  margin: 0;
  font-size: 31px;
  line-height: 1.1;
  font-weight: 800;
}

.bo-hero p {
  margin: 6px 0 0;
  color: #f0ebff;
  font-size: 13px;
}

.bo-login-body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 10% 10%, #e7ecff 0, #f6f8fe 35%, #eef3ff 100%);
  display: grid;
  place-items: center;
}

.bo-login-shell {
  width: 100%;
  max-width: 460px;
  padding: 16px;
}

.bo-login-card {
  background: #fff;
  border: 1px solid #dee7fb;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(31, 45, 79, 0.12);
  padding: 18px;
}

.bo-login-hero {
  position: relative;
  margin: -4px -4px 14px;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 21 / 8;
  display: grid;
  place-items: center;
  background: #141f4b;
}

.bo-login-hero::after {
  display: none;
}

.bo-login-hero-image {
  display: block;
  width: min(72%, 260px);
  height: auto;
  max-height: 72%;
  object-fit: contain;
  object-position: center;
}

.bo-login-card h1 {
  margin: 0;
  color: #1f2d4f;
  font-size: 23px;
}

.bo-login-card p {
  margin: 7px 0 12px;
  color: #63739e;
  font-size: 12px;
}

.bo-form-error {
  display: block;
  color: #b4232f;
  font-size: 11px;
  margin-top: 4px;
}

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

.bo-card {
  background: #fff;
  border-radius: 11px;
  border: 1px solid #e6ecf9;
  padding: 13px;
}

.bo-kpi {
  position: relative;
  overflow: hidden;
}

.bo-kpi h3 {
  margin: 0;
  font-size: 11px;
  color: #53648f;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bo-kpi p {
  margin: 6px 0 0;
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
  color: #1f2d4f;
}

.bo-kpi-aqua { border-top: 4px solid #28c7f7; }
.bo-kpi-green { border-top: 4px solid #22c55e; }
.bo-kpi-orange { border-top: 4px solid #f59e0b; }
.bo-kpi-purple { border-top: 4px solid #6f62eb; }

.bo-section-title {
  margin: 0 0 8px;
  font-size: 18px;
  color: #1f2d4f;
}

.bo-section-title-inline {
  margin: 0;
}

.bo-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bo-sub {
  margin: 0 0 10px;
  color: #7a88ae;
  font-size: 13px;
}

.bo-tournament-access-code {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 720px);
}

.bo-tournament-access-code input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid #c8d8ff;
  border-radius: 10px;
  background: #f8faff;
  color: #263353;
  font-size: 15px;
  font-weight: 700;
}

.bo-tournament-access-code .bo-btn {
  min-height: 44px;
  white-space: nowrap;
}

.bo-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4861ad;
  font-size: 11px;
  font-weight: 700;
}

.bo-chip-warn { background: #fff5dc; color: #a4690f; }
.bo-chip-ok { background: #e7f8ec; color: #16743a; }
.bo-chip-info { background: #e7f1ff; color: #1f5fbf; }
.bo-chip-danger { background: #fee9ea; color: #bb2533; }

.bo-thread-preview {
  margin-top: 4px;
  color: #7284ad;
  font-size: 11px;
  line-height: 1.4;
}

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

.bo-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.bo-table th,
.bo-table td {
  text-align: left;
  border-bottom: 1px solid #edf1fb;
  padding: 8px;
  font-size: 12px;
  vertical-align: top;
}

.bo-table th {
  color: #63739e;
  font-weight: 700;
}
.bo-grid-full {
  grid-column: 1 / -1;
}
.bo-action-form {
  display: inline-block;
  margin-left: 0.4rem;
}
.bo-sub {
  color: var(--bo-text-muted);
}

.bo-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.bo-pagination a {
  display: inline-flex;
  min-width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 7px;
  background: var(--bo-panel-muted, #263247);
  color: var(--bo-text, #f4f7fb);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.bo-pagination a:hover,
.bo-pagination a.is-active {
  background: var(--bo-info, #3182ce);
  color: #fff;
}

.bo-btn {
  border: 0;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}

.bo-btn.icon {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
}

.bo-btn.icon i {
  font-size: 12px;
}
@media (max-width: 820px) {
  .bo-inline-filters {
    grid-template-columns: 1fr;
  }

  .bo-action-form {
    margin-left: 0;
    margin-top: 0.3rem;
  }
}

.bo-btn.ok { background: #16a34a; }
.bo-btn.info { background: #2563eb; }
.bo-btn.danger { background: #ef4444; }

.bo-action-form {
  display: inline-block;
  margin: 0 4px 4px 0;
}

.bo-messages {
  margin-bottom: 10px;
  display: grid;
  gap: 7px;
}

.bo-logout-form {
  margin: 0;
}

.bo-message {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}

.bo-message.success { background: #e9f9ee; color: #126b36; border: 1px solid #b9ebca; }
.bo-message.error { background: #fff0f0; color: #a32525; border: 1px solid #f3c0c0; }
.bo-message.warning { background: #fff8ea; color: #9a5e12; border: 1px solid #f3dcab; }
.bo-message.info { background: #eef4ff; color: #1f4ea9; border: 1px solid #c8d8ff; }

.bo-mt-16 { margin-top: 16px; }
.bo-mt-12 { margin-top: 12px; }

.bo-flex-gap-10 {
  display: flex;
  gap: 10px;
}

.bo-table-actions {
  display: flex;
  gap: 6px;
}

.bo-form p { margin: 0 0 10px; }

.bo-form label {
  display: block;
  margin-bottom: 5px;
  color: #4c5b81;
  font-size: 12px;
  font-weight: 700;
}

.bo-form input,
.bo-form select,
.bo-form textarea {
  width: 100%;
  border: 1px solid #dce4f5;
  border-radius: 8px;
  min-height: 38px;
  padding: 8px 10px;
  font-size: 13px;
  color: #263353;
  background: #ffffff;
}

.bo-description-blocks {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.bo-description-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid #dce4f5;
  border-radius: 8px;
  background: #f8faff;
}

.bo-description-block label {
  grid-column: 1 / -1;
}

.bo-description-block-field--heading {
  min-height: 46px;
  font-size: 15px;
  font-weight: 700;
}

.bo-description-block-field--paragraph,
.bo-description-block-field--list {
  min-height: 132px;
  line-height: 1.5;
  resize: vertical;
}

.bo-description-block .bo-btn {
  height: 38px;
}

.bo-submit {
  border: 0;
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(120deg, #5f53e8, #7662ed);
  font-size: 12px;
  font-weight: 800;
}

.bo-inline-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) 180px auto;
  gap: 8px;
  margin-bottom: 12px;
}

.bo-inline-filters input,
.bo-inline-filters select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #dce4f5;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
}

.bo-user-message-box {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.bo-user-message-item {
  border: 1px solid #e4eaf8;
  border-radius: 9px;
  padding: 8px 9px;
  font-size: 12px;
  color: #273757;
  background: #f8fbff;
}

.bo-user-message-item.is-staff {
  background: #eef4ff;
  border-color: #cfddff;
}

.bo-user-message-item.is-user {
  background: #f6fff7;
  border-color: #ccefd2;
}

.bo-user-message-meta {
  font-size: 11px;
  color: #6f80a8;
  margin-bottom: 4px;
}

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

.bo-game-card {
  border: 1px solid #e5ebf8;
  border-radius: 10px;
  background: #fff;
  padding: 9px;
}

.bo-game-name {
  color: #1f2d4f;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.3;
  min-height: 32px;
}

.bo-game-meta {
  font-size: 11px;
  color: #7284ad;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bo-game-footer {
  margin-top: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.bo-empty {
  border: 1px dashed #dce4f5;
  border-radius: 10px;
  padding: 14px;
  color: #7284ad;
  font-size: 12px;
}

.bo-empty-info {
  background: #eef7ff;
  border-color: #bfdcff;
  color: #184e94;
}

.bo-copy-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bo-copy-text {
  display: inline-block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bo-btn.copy {
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid #d8e1f2;
  background: #f7f9fd;
  color: #29406e;
  font-size: 11px;
}

.bo-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 25, 45, 0.58);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}

.bo-modal-backdrop.is-open {
  display: flex;
}

.bo-modal {
  width: min(100%, 760px);
  background: #fff;
  border-radius: 14px;
  border: 1px solid #dfe6f5;
  box-shadow: 0 24px 64px rgba(31, 45, 79, 0.28);
  overflow: hidden;
}

.bo-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(120deg, #5f53e8, #7662ed);
  color: #fff;
}

.bo-modal-head h3 {
  margin: 0;
  font-size: 18px;
}

.bo-modal-close {
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
}

.bo-modal-body {
  padding: 16px;
}

.bo-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}

@media (max-width: 1200px) {
  .bo-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bo-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bo-grid-2 { grid-template-columns: 1fr; }
  .bo-game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .bo-shell { grid-template-columns: 1fr; }
  .bo-main { padding: 10px; }
  .bo-page { padding: 10px; }

  .bo-tournament-access-code {
    width: 100%;
  }
  .bo-hero { padding: 14px; }
  .bo-hero h1 { font-size: 23px; }
  .bo-topbar { flex-direction: column; align-items: stretch; }
  .bo-search-wrap { max-width: none; }
  .bo-topbar-right { justify-content: space-between; }
  .bo-menu { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bo-grid-3 { grid-template-columns: 1fr; }
  .bo-inline-filters { grid-template-columns: 1fr; }
  .bo-game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bo-btn.icon { width: 34px; height: 34px; }
  .bo-modal-body { padding: 12px; }
}

@media (max-width: 520px) {
  .bo-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bo-modal { border-radius: 12px; }
  .bo-modal-head { padding: 12px 14px; }
  .bo-modal-head h3 { font-size: 16px; }
  .bo-login-hero { aspect-ratio: 12 / 5; }
}
