/* 管理端全局样式：布局、表格、表单、弹层与响应式规则按区段排列。 */
:root {
  --top: #30006a;
  --accent: #d91657;
  --purple: #6a43c8;
  --purple-dark: #4a2495;
  --text: #101018;
  --muted: #6b6f7a;
  --line: #d9d9df;
  --panel: #ffffff;
  --soft: #f6f6f8;
  --warn: #ff0000;
  --ok: #008c20;
  --link: #001dff;
  --space: 16px;
  --space-lg: 24px;
  --page-bg: #f3f4f8;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 1080px;
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

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

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.is-busy {
  opacity: 0.78;
}

.top-strip {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 8px 28px;
  background: var(--top);
  color: #fff;
  gap: 16px;
}

.top-strip strong,
.top-strip b {
  color: #ffce3a;
}

.top-strip .loss {
  color: #ff6b6b;
}

.top-right {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-action {
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: linear-gradient(135deg, #f6f6f8, #ffffff 45%, #f5eef8);
}

.login-panel {
  width: 390px;
  border: 1px solid #d9d9df;
  border-radius: 6px;
  padding: 30px 34px 34px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(40, 20, 80, 0.16);
}

.login-title {
  margin-bottom: 24px;
  color: var(--top);
  font-size: 24px;
  font-weight: 700;
  text-align: center;
}

.login-panel label {
  display: block;
  margin-bottom: 16px;
  color: #333;
  font-weight: 700;
}

.login-panel input {
  display: block;
  width: 100%;
  height: 40px;
  margin-top: 8px;
  border: 1px solid #c7c7c7;
  border-radius: 4px;
  padding: 0 10px;
  background: #fff;
}

.login-submit {
  width: 100%;
  margin-top: 6px;
}

.main-nav {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 96px;
  padding: 0 8px 0 12px;
  border-bottom: 1px solid #e4e4e4;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
  background: #fff;
  overflow-x: auto;
}

.nav-item {
  flex: 1 1 0;
  min-width: 76px;
  max-width: 120px;
  padding: 8px 6px 10px;
  border: 0;
  border-right: 1px solid #f0f0f2;
  background: #fff;
  color: #111;
  font-size: 13px;
  line-height: 1.35;
}

.nav-item.active {
  background: #fbf1f5;
  color: var(--accent);
  font-weight: 700;
}

.nav-icon {
  display: block;
  margin: 6px auto 6px;
  color: #838383;
  font-size: 26px;
  line-height: 30px;
}

.nav-item.active .nav-icon {
  color: var(--accent);
}

/* 假人玩法多选：一行放下四个复选框 */
.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-right: 8px;
  white-space: nowrap;
}
.play-type-cell {
  min-width: 230px;
}

/* 待审上下分小标签：跟随「上下分」导航项，替代自动弹窗提醒 */
.nav-badge {
  display: inline-block;
  min-width: 16px;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 9px;
  background: #f0004d;
  color: #fff;
  font-size: 11px;
  line-height: 15px;
  vertical-align: 1px;
}

/* 假人头像单元格：预览图 + 上传 + 恢复默认 */
.fake-avatar-cell {
  min-width: 150px;
}

.fake-avatar-preview {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 6px;
  background: #f2f2f2;
}

.fake-avatar-placeholder {
  text-align: center;
  line-height: 32px;
  font-size: 18px;
}

.fake-avatar-file {
  max-width: 170px;
  font-size: 12px;
}

/* 用户列表备注列：过长省略，悬停看全文 */
.user-note {
  display: inline-block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.notice-area {
  flex: 0 0 260px;
  align-self: center;
  min-width: 200px;
  max-width: 280px;
  margin-left: 8px;
  padding: 10px 12px;
}

.notice-pill {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  padding: 6px 12px;
  border-radius: 14px;
  color: var(--top);
  background: #eee8f5;
  text-align: center;
  line-height: 1.4;
  font-size: 12px;
}

.notice-pill:last-child {
  margin-bottom: 0;
}

.notice-pill.alert {
  color: #f0004d;
  background: #faedf2;
}

.page-shell {
  padding: 20px 28px 32px;
}

.page-shell.with-side {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  gap: 0;
  padding: 0;
  min-height: calc(100vh - 136px);
}

.side-menu {
  min-height: calc(100vh - 136px);
  border-right: 1px solid #d5d8e4;
  color: #45506c;
  background: #fafbfe;
}

.side-title {
  padding: 16px 18px 12px;
  border-bottom: 1px solid #d5d8e4;
  color: #333;
  font-size: 16px;
  font-weight: 700;
}

.side-menu button {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 8px 18px;
  border: 0;
  background: transparent;
  color: #45506c;
  text-align: left;
}

.side-menu button.active {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.side-content {
  min-width: 0;
  padding: 20px 28px 32px;
  overflow: auto;
}

.toolbar,
.panel {
  margin-bottom: 18px;
  border: 1px solid #dedede;
  border-radius: 6px;
  background: var(--panel);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  min-height: 0;
  padding: 14px 18px;
  overflow: visible;
}

.panel-body > .toolbar,
.panel-body > form.toolbar,
.panel > .toolbar {
  margin: 14px 0 4px;
  border: 0;
  box-shadow: none;
  padding: 4px 0 10px;
  min-height: 0;
  background: transparent;
}

.toolbar input,
.toolbar select,
.form-table input,
.form-table select,
.compact-input {
  height: 36px;
  min-width: 96px;
  border: 1px solid #c7c7c7;
  border-radius: 4px;
  padding: 4px 10px;
  background: #fff;
}

.toolbar label {
  white-space: nowrap;
  color: #445;
}

.primary-btn,
.danger-btn,
.gray-btn {
  min-width: 88px;
  height: 36px;
  border: 0;
  border-radius: 4px;
  padding: 0 16px;
  color: #fff;
  font-weight: 700;
}

.primary-btn {
  background: var(--purple);
}

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

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

.gray-btn {
  background: linear-gradient(#bcbcbc, #777);
}

.profit-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.profit-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.profit-card.is-locked {
  border-color: #c98585;
}

.profit-card.is-finalized {
  background: #fafafa;
}

.profit-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
  background: #f7f7f7;
}

.profit-card-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.profit-card-meta {
  color: var(--muted);
  font-size: 13px;
}

.profit-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 16px;
}

.profit-card-nums,
.profit-card-stats,
.profit-card-decision {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}

.profit-card-nums div,
.profit-card-stats div,
.profit-card-decision div {
  min-width: 0;
}

.profit-card-nums span,
.profit-card-stats span,
.profit-card-decision span {
  display: block;
  color: #666;
  font-size: 12px;
  margin-bottom: 2px;
}

.profit-open-num,
.profit-card-nums code,
.profit-card-decision code {
  display: block;
  font-size: 13px;
  word-break: break-word;
}

.profit-card-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.profit-card-bets {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.profit-card-bets .table-wrap {
  margin: 0;
}

.profit-card-bets table {
  min-width: 0;
}

.profit-bet-excluded {
  color: #999;
}

.profit-threshold-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 8px;
}

.profit-threshold-form label {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: #445;
}

.profit-threshold-form input[name="percent"] {
  width: 88px;
  min-width: 88px;
  height: 36px;
  text-align: right;
}

.profit-threshold-hint {
  margin: 0 0 8px;
}

.profit-card-form {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.profit-card-form label {
  display: block;
  font-size: 12px;
  color: #666;
}

.profit-card-form input {
  width: 100%;
  margin-top: 4px;
  height: 36px;
}

.profit-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profit-tag.finalized {
  background: #ececec;
  color: #555;
}

.profit-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.profit-metrics div {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 12px 14px;
  background: #fafafa;
}

.profit-metrics span {
  display: block;
  color: #666;
  font-size: 12px;
  margin-bottom: 4px;
}

.profit-positive {
  color: #1b7a2b;
}

.profit-negative {
  color: #b42318;
}

.profit-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.profit-tag.manual {
  background: #fdeeee;
  color: #a94442;
}

.profit-tag.live {
  background: #eef8ff;
  color: #1f6fb2;
}

.profit-manual-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px;
  align-items: end;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fffdf5;
}

.profit-manual-form label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}

.profit-manual-form input {
  width: 100%;
}

.profit-seal-meta {
  margin-left: auto;
  font-size: 13px;
  line-height: 1.5;
}

.profit-board-table .monitor-countdown {
  font-variant-numeric: tabular-nums;
}

.game-sale-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin: 14px 0 6px;
}

.game-sale-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f5f5f5;
  color: #666;
  cursor: pointer;
  text-align: left;
}

.game-sale-btn.is-on {
  border-color: #4caf50;
  background: linear-gradient(#f3fff4, #e8f8ea);
  color: #1b5e20;
}

.game-sale-btn.is-off {
  border-color: #d9534f;
  background: linear-gradient(#fff5f5, #fdeeee);
  color: #a94442;
}

.game-sale-btn:hover:not(:disabled) {
  filter: brightness(0.97);
}

.game-sale-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.game-sale-name {
  font-weight: 700;
  font-size: 14px;
}

.game-sale-status {
  font-size: 12px;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0 4px;
}

.summary-line {
  height: auto;
  margin: 0 0 14px;
  padding: 10px 14px;
  line-height: 1.65;
  background: #fbfac9;
  border-radius: 4px;
  font-weight: 600;
}

.summary-line b {
  color: red;
}

.summary-line.muted {
  background: #f3f5f8;
  font-weight: 400;
  color: #555;
}

.seal-seconds-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 14px 0 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.seal-seconds-label {
  font-weight: 700;
  white-space: nowrap;
}

.seal-timing-table input[type="number"] {
  width: 5.5rem;
}

.broadcast-game-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 12px 0;
}

.broadcast-group {
  margin: 18px 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.broadcast-group h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.broadcast-item {
  margin-bottom: 16px;
}

.broadcast-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 6px;
}

.broadcast-item textarea {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.broadcast-preview {
  margin: 8px 0 0;
  padding: 10px 12px;
  background: #f7f8fa;
  border: 1px dashed #cfd5df;
  white-space: pre-wrap;
  font-size: 13px;
  max-height: 200px;
  overflow: auto;
}

.form-table textarea[name="homeNoticeTemplate"] {
  width: 100%;
  min-height: 3.2rem;
  resize: vertical;
}

.notice-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 4px;
}

.notice-chip {
  border: 1px solid #c5cdd8;
  background: #eef1f6;
  color: #334155;
  border-radius: 999px;
  padding: 2px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  cursor: pointer;
}

.notice-chip:hover {
  background: #e2e8f0;
}

.home-notice-preview {
  margin-top: 8px;
  background: #f4f5f7;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  height: 32px;
}

.home-notice-preview-track {
  height: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.home-notice-preview-text {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  color: #333;
  font-size: 13px;
  line-height: 32px;
}

.home-notice-preview-text.is-playing {
  animation: home-notice-marquee 10s linear infinite;
}

@keyframes home-notice-marquee {
  100% {
    transform: translate3d(-100%, 0, 0);
  }
}

.broadcast-vars-help {
  margin: 10px 0 16px;
}

.broadcast-vars-help .var-list {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 13px;
}

.seal-seconds-readonly {
  font-weight: 600;
  color: var(--accent, #c0392b);
}

.seal-seconds-bar--fixed .seal-seconds-value {
  color: var(--top);
  font-size: 18px;
}

.seal-seconds-note {
  color: var(--muted);
  font-size: 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin: 0 0 12px;
}

.score-totals-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 0 0 20px;
}

.score-totals-bar .muted {
  flex: 1 1 280px;
}

.metric-card {
  min-height: 92px;
  border: 1px solid #d9dde5;
  border-left: 4px solid #296e52;
  border-radius: 6px;
  padding: 16px 18px;
  background: #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.metric-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

.metric-card strong {
  font-size: 22px;
}

.metric-card.danger {
  border-left-color: #c72b45;
}

.operation-alert,
.health-line {
  margin-bottom: 12px;
  border-radius: 5px;
  padding: 12px 16px;
}

.operation-alert {
  border: 1px solid #e6a4af;
  background: #fff4f5;
}

.operation-alert-title {
  margin-bottom: 7px;
  color: #a51632;
  font-weight: 700;
}

.operation-alert-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
  border-top: 1px solid #f0ced4;
}

.operation-alert-row time {
  color: var(--muted);
  white-space: nowrap;
}

.health-line {
  border: 1px solid #afd6c4;
  background: #f1faf6;
  color: #1f6b4e;
}

.table-wrap {
  width: 100%;
  max-height: calc(100vh - 240px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 14px 2px 2px;
  color: var(--muted);
}

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

.pager button {
  min-width: 72px;
  height: 32px;
  border: 1px solid #b8bec9;
  border-radius: 4px;
  background: #fff;
  color: #303744;
}

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

.profit-board-table,
.dense-table,
.data-table {
  min-width: 980px;
}

.profit-card-bets .dense-table {
  min-width: 0;
}

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

th {
  height: auto;
  min-height: 44px;
  background: #f7f7f7;
  font-weight: 700;
}

td {
  height: auto;
  min-height: 42px;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
}

.data-table input[type="number"] {
  width: 140px;
  height: 36px;
}

.dense-table th,
.dense-table td {
  padding: 9px 10px;
  white-space: nowrap;
}

.blue-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--link);
  text-decoration: none;
}

.danger-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #d00030;
}

.red-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #d00030;
  font-weight: 700;
}

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

.red {
  color: var(--warn);
  font-weight: 700;
}

.green {
  color: var(--ok);
  font-weight: 700;
}

.smile {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 4px, transparent 5px), #ffd21e;
  border: 1px solid #e3b500;
  color: #111;
  font-size: 16px;
}

.broken-avatar {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 1px solid #c7c7c7;
  background: #f1f1f1;
}

.home-links {
  margin-bottom: 16px;
  padding: 12px 16px;
  line-height: 1.6;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  background: #fff;
  color: var(--link);
}

.copy-btn {
  height: 28px;
  min-width: 64px;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #333;
  background: linear-gradient(#fff, #e6e6e6);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 0 0 16px;
}

.tabs button {
  min-width: 96px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #d2d2d2;
  border-radius: 4px;
  background: #fff;
}

.tabs button.active {
  border-color: var(--top);
  background: var(--purple);
  color: #fff;
  box-shadow: 0 0 0 2px #111 inset;
}

.odds-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(480px, 1fr);
  gap: 28px 40px;
  align-items: start;
}

.odds-section-title {
  padding: 12px 0 8px;
  color: red;
}

.form-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
}

.field-hint {
  margin-top: 6px;
  color: #888;
  font-size: 12px;
  line-height: 1.5;
}

.stake-preset-row,
.stake-range-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.stake-preset-row button {
  min-width: 120px;
  height: 40px;
  font-size: 14px;
}

.fake-bet-controls {
  margin-bottom: 16px;
}

.fake-bet-controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-bottom: 10px;
}

.fake-bet-controls-row select {
  min-width: 120px;
  height: 36px;
  margin-left: 8px;
}

.fake-users-panel .panel-body {
  overflow-x: auto;
}

.fake-users-panel .form-table {
  min-width: 1480px;
}

.fake-range-cell {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.fake-users-panel .form-table input.fake-compact,
.fake-users-panel .form-table select.fake-compact {
  width: 76px;
  max-width: 76px;
  min-width: 76px;
}

.fake-users-panel .form-table select.fake-compact {
  width: 132px;
  max-width: 132px;
  min-width: 120px;
}

.form-table th,
.form-table td {
  height: auto;
  min-height: 44px;
  padding: 10px 14px;
  background: #fff;
  text-align: left;
}

.form-table th {
  width: 168px;
  background: #f7f7f7;
}

.form-table input[type="number"],
.form-table input[type="text"],
.form-table input:not([type]) {
  width: 100%;
  max-width: 280px;
}

.odds-grid .form-table {
  table-layout: fixed;
}

.odds-grid .form-table input {
  width: 100%;
  min-width: 0;
}

.odds-limits-section {
  margin: 0 0 18px;
}

.limits-table {
  table-layout: auto;
  max-width: 960px;
}

.limits-table thead th {
  width: auto;
  white-space: nowrap;
  text-align: center;
  background: #f7f7f7;
}

.limits-table .limits-play {
  width: 180px;
  white-space: nowrap;
  color: #c00;
  text-align: left;
  font-weight: 600;
}

.limits-table td {
  text-align: center;
}

.limits-table input[type="number"] {
  width: 140px;
}

.room-settings h2,
.panel h2 {
  margin: 0;
  padding: 16px 20px 10px;
  font-size: 18px;
  border-bottom: 1px solid #f0f0f2;
}

.panel-body {
  padding: 16px 20px 20px;
  overflow-x: auto;
}

.monitor-card {
  margin: 14px 20px;
  border: 1px solid #e2e2e2;
}

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

.monitor-card .dense-table th,
.monitor-card .dense-table td {
  padding: 6px 8px;
  line-height: 1.3;
}

.monitor-bet {
  display: inline-block;
  white-space: nowrap;
  text-align: left;
}

.monitor-bet .red {
  color: red;
}

.monitor-head {
  display: flex;
  justify-content: center;
  gap: 20px;
  min-height: 52px;
  padding: 14px 12px;
  color: blue;
  font-weight: 700;
  flex-wrap: wrap;
}

.monitor-head .red {
  color: red;
}

.monitor-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 12px 10px;
}

.monitor-room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin: 0 20px 16px;
}

.monitor-room-card {
  border: 1px solid #d8d8d8;
  border-radius: 5px;
  background: #fafafa;
  padding: 14px 16px;
}

.monitor-room-card.is-active {
  border-color: #371073;
  box-shadow: inset 0 0 0 1px #371073;
}

.monitor-room-card-title {
  font-weight: 700;
  color: #371073;
  margin-bottom: 8px;
}

.monitor-room-card-games {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.monitor-room-game {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.monitor-room-game-name {
  font-weight: 700;
  color: #222;
}

.monitor-room-game-period {
  color: #666;
}

.monitor-countdown {
  font-weight: 700;
}

.monitor-countdown-open {
  color: #0a7a2f;
}

.monitor-countdown-sealed {
  color: #d9480f;
}

.monitor-countdown-waiting {
  color: #1864ab;
}

.monitor-countdown-muted {
  color: #666;
}

.modal-shade {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: start center;
  padding-top: 110px;
  background: rgba(0, 0, 0, 0.36);
}

.modal {
  width: 600px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border: 1px solid #371073;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.28);
}

.modal-title {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 56px;
  background: var(--top);
  color: #fff;
  font-weight: 700;
  font-size: 19px;
}

.modal-close {
  position: absolute;
  right: 13px;
  top: 9px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
}

.modal-body {
  padding: 18px 22px 24px;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding-top: 14px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
}

.textarea-cell {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  padding: 8px 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 120;
  transform: translateX(-50%);
  min-width: 220px;
  padding: 12px 22px;
  border-radius: 6px;
  background: rgba(30, 30, 36, 0.92);
  color: #fff;
  text-align: center;
}

.empty {
  padding: 48px;
  color: #777;
  text-align: center;
}

.admin-info-panel h3 {
  margin: 20px 0 10px;
  font-size: 16px;
}

.permission-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.permission-list span {
  border: 1px solid #b9c7d4;
  border-radius: 4px;
  padding: 5px 9px;
  background: #f4f7f9;
  color: #29465c;
}

@media (max-width: 1200px) {
  html,
  body {
    min-width: 960px;
  }

  .main-nav {
    padding-left: 8px;
    overflow-x: auto;
  }

  .notice-area {
    min-width: 220px;
    max-width: 320px;
    padding-right: 12px;
  }

  .page-shell {
    padding: 16px;
  }

  .page-shell.with-side {
    grid-template-columns: 168px minmax(0, 1fr);
  }

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

  .metric-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .profit-card-grid {
    grid-template-columns: 1fr;
  }

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