:root {
  --sidebar: #171922;
  --sidebar-2: #20232d;
  --active: #4778ff;
  --border: #e6e8ef;
  --text: #262b36;
  --muted: #7f8797;
  --bg: #f6f7fb;
  --green: #1fa463;
  --red: #ef4444;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
}
button, input, select { font: inherit; }
.app { display: flex; min-height: 100vh; background: #fff; }
.sidebar {
  width: 172px;
  min-height: 100vh;
  background: var(--sidebar);
  color: #d8dce7;
  flex: none;
}
.brand {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 16px;
}
.brand-mark {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3e7cff, #46d0ff);
  position: relative;
}
.brand-mark:before, .brand-mark:after {
  content: "";
  position: absolute;
  border: 2px solid #fff;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  top: 9px;
}
.brand-mark:before { left: 7px; }
.brand-mark:after { left: 13px; }
.brand-title { line-height: 1.2; font-weight: 700; color: #fff; }
.brand-title span { display: block; font-size: 11px; font-weight: 500; opacity: .82; }
.menu { padding: 8px 10px 18px; }
.menu-entry {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  color: #d9dce6;
}
.menu-entry:hover { background: #222632; }
.menu-entry.active, .submenu-item.active { background: var(--active); color: #fff; }
.menu-icon { width: 15px; text-align: center; opacity: .92; }
.chevron { margin-left: auto; font-size: 13px; color: #8991a4; }
.submenu { margin: 3px 0 7px; }
.submenu-item {
  height: 34px;
  display: flex;
  align-items: center;
  padding-left: 45px;
  border-radius: 4px;
  cursor: pointer;
  color: #c8cedb;
}
.main { min-width: 0; flex: 1; background: #fff; }
.topbar {
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 0 18px;
  background: #fff;
}
.crumb { display: flex; align-items: center; gap: 13px; color: #8b93a2; }
.hamburger { font-size: 17px; color: #4b5565; }
.top-actions { display: flex; align-items: center; gap: 15px; color: #828a98; }
.circle-btn { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 16px; }
.avatar {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4c5565;
}
.avatar-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #fff 0 10%, #f4d7c5 11% 22%, #c7a18a 23% 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
.tabs {
  height: 42px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 8px;
  overflow: hidden;
}
.tab {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 3px;
  color: #717b8e;
  background: #fff;
}
.tab.active {
  color: var(--active);
  background: #eef3ff;
  border: 1px solid #dbe5ff;
}
.tab:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.page { padding: 13px 18px 28px; }
.page-title { margin: 0 0 14px; font-size: 16px; font-weight: 700; }
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.32fr .98fr;
  gap: 8px;
}
.panel {
  border: 1px solid var(--border);
  background: #fff;
  min-height: 122px;
}
.panel-title {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  font-weight: 700;
  color: #2b313d;
}
.merchant-lines {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 14px;
  padding: 8px 15px 16px;
}
.merchant-lines b { font-weight: 600; margin-right: 4px; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  padding: 10px;
}
.stat-tile {
  height: 45px;
  background: #faf8e8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.25;
}
.stat-tile strong { font-size: 13px; }
.online {
  margin-left: auto;
  text-align: center;
  font-size: 12px;
  color: #222;
}
.online strong { display: block; font-size: 20px; line-height: 1; }
.dashboard-lower {
  display: grid;
  grid-template-columns: 1fr 1fr .98fr;
  gap: 8px;
  margin-top: 8px;
}
.login-table, .data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.login-table th, .login-table td, .data-table th, .data-table td {
  border-bottom: 1px solid #eef0f4;
  padding: 9px 10px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.data-table th {
  background: #f7f9fc;
  color: #303746;
  font-weight: 700;
}
.revenue {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 8px;
  padding: 8px 12px 12px;
}
.game-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.game-card {
  height: 53px;
  background: #f1fffb;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.pie {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: conic-gradient(#5470c6 0 58%, #91cc75 58% 74%, #fac858 74% 87%, #ee6666 87% 95%, #73c0de 95%);
  margin: 6px auto;
}
.chart-panel { margin-top: 8px; border: 1px solid var(--border); padding: 8px 10px 14px; }
.segmented { display: flex; gap: 0; margin-bottom: 8px; }
.segmented button {
  border: 1px solid #d9dfe9;
  background: #fff;
  height: 27px;
  min-width: 43px;
  color: #5f6878;
}
.segmented button.active { background: var(--active); color: #fff; border-color: var(--active); }
.bar-chart {
  height: 170px;
  position: relative;
  border-top: 1px solid #edf0f5;
  border-bottom: 1px solid #edf0f5;
  background: repeating-linear-gradient(to bottom, transparent, transparent 33px, #edf0f5 34px);
}
.bar {
  position: absolute;
  bottom: 0;
  width: 13px;
  background: #67c23a;
  left: calc(var(--i) * 5% + 18px);
  height: var(--h);
}
.notice-list { padding: 58px 20px 0; }
.notice-list div { border-bottom: 1px solid #e8ebf1; padding: 10px 0; }
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.field { display: flex; align-items: center; gap: 7px; color: #3f4652; }
.control {
  height: 32px;
  min-width: 132px;
  border: 1px solid #dce2ec;
  border-radius: 3px;
  background: #fff;
  color: #9aa2af;
  padding: 0 10px;
}
.btn {
  height: 32px;
  border: 0;
  border-radius: 3px;
  padding: 0 14px;
  color: #fff;
  background: var(--active);
  cursor: pointer;
}
.btn.secondary { background: #5c7cff; }
.btn.ghost { background: #fff; color: var(--active); border: 1px solid #dbe4ff; }
.table-wrap {
  border: 1px solid var(--border);
  overflow: auto;
  background: #fff;
}
.data-table { min-width: 1180px; }
.tag-green { color: var(--green); font-weight: 700; }
.tag-red { color: var(--red); font-weight: 700; }
.pager {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #687184;
}
.pager span, .pager button {
  min-width: 28px;
  height: 28px;
  border: 1px solid #e1e5ee;
  background: #fff;
  border-radius: 3px;
}
.pager .current { background: #f0f4ff; color: var(--active); border-color: #cddaff; }
.simple-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.metric {
  border: 1px solid var(--border);
  background: #fff;
  padding: 14px;
}
.metric strong { display: block; font-size: 20px; margin-top: 8px; }
@media (max-width: 1100px) {
  .dashboard-grid, .dashboard-lower { grid-template-columns: 1fr; }
  .simple-grid { grid-template-columns: repeat(2, 1fr); }
}
