:root {
  --text-main: #303641;
  --text-sub: #9399a3;
  --brand: #639af2;
  --brand-deep: #4385e7;
  --brand-soft: #edf4ff;
  --line: #e7eaf0;
  --shadow: 0 2px 10px #27324808;
}
body { background: #edf0f5; }
button, input, select, textarea { font-family: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid #89b8ff; outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .6; }
.admin-layout { --sidebar-width: 224px; }
.sidebar { width: var(--sidebar-width); inset: 0 auto 0 0; padding: 0 0 20px; background: #535b65; color: #f3f5f8; border: 0; border-radius: 0; box-shadow: none; z-index: 1000; }
.sidebar-logo { height: 76px; padding: 15px 24px; color: #78a3e2; display: block; border: 0; margin: 0; font-size: 30px; }
.sidebar-logo::before { content: none; }
.sidebar-logo small { display: block; color: #b4bac4; font-size: 11px; font-weight: 400; letter-spacing: 1px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-search.input { width: calc(100% - 32px); margin: 14px 16px 18px; background: #ffffff0c; color: #fff; border-color: #ffffff26; border-radius: 5px; }
.menu-search::placeholder { color: #c0c5ce; }
.menu-group { margin-bottom: 6px; }
.menu-group-heading { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: transparent; border: 0; color: #f2f4f8; cursor: pointer; text-align: left; font-size: 15px; }
.menu-group-heading svg { width: 21px; height: 21px; flex-shrink: 0; }
.menu-arrow { margin-left: auto; color: #b6beca; }
.menu-group-items { padding: 3px 10px 6px; }
.menu-link { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 12px; background: transparent; border: 0; border-radius: 5px; color: #e0e4eb; cursor: pointer; text-align: left; font-size: 13px; }
.menu-link:hover { background: #ffffff0b; color: #fff; }
.menu-link.active { background: #ffffff0d; color: #f4d276; }
.menu-link .menu-icon { background: transparent; color: inherit; border: 1px solid #aab7c03d; border-radius: 3px; width: 23px; height: 23px; font-size: 10px; font-weight: 400; }
.menu-empty { color: #ccd2dc; padding: 20px; font-size: 13px; }
.main-content { margin-left: var(--sidebar-width); padding: 0; min-width: 0; }
.workspace-shell { min-height: 100vh; border: 0; border-radius: 0; padding: 0 20px 24px; background: #edf0f5; box-shadow: none; }
.workspace-topbar { min-height: 64px; margin: 0 -20px; padding: 10px 20px; background: #535b65; color: #fff; gap: 16px; }
.workspace-title { display: flex; align-items: center; gap: 20px; min-width: 0; }
.workspace-breadcrumb { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 13px; color: #c7ced8; }
.workspace-title h1 { margin: 0; font-size: 14px; font-weight: 500; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-tools { gap: 8px; color: #e1e6ee; }
.topbar-button { color: inherit; border: 1px solid #ffffff26; background: transparent; padding: 7px 12px; border-radius: 5px; font-size: 12px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.workspace-title > .topbar-button { font-size: 21px; border: 0; padding: 0; color: #8ab5f3; }
.topbar-button:hover { background: #ffffff12; }
.account-menu { position: relative; }
.account-menu summary { padding: 8px 12px; border: 1px solid #ffffff26; border-radius: 20px; list-style: none; cursor: pointer; white-space: nowrap; }
.account-menu > div { position: absolute; right: 0; top: calc(100% + 8px); z-index: 1100; background: #fff; padding: 6px; min-width: 132px; border-radius: 6px; box-shadow: 0 6px 24px #13203826; }
.account-menu button { display: block; width: 100%; border: 0; text-align: left; background: #fff; color: #545e6b; padding: 10px 12px; cursor: pointer; }
.account-menu button:hover { background: #edf4ff; color: #4385e7; }
.tab-bar { background: #fff; margin: 0 -20px 20px; padding: 8px 20px; gap: 5px; border-bottom: 1px solid #e4e7ec; align-items: center; }
.tab-item { padding: 7px 10px; border-radius: 4px; border: 1px solid #e6eaf0; font-size: 12px; gap: 7px; background: #fff; }
.tab-item.active { color: #568ee3; background: #edf4ff; border-color: #c5daff; box-shadow: none; }
.tab-item .menu-icon { display: none; }
.tab-close { width: 16px; height: 16px; border: 0; background: transparent; color: #9aa5b7; font-size: 14px; cursor: pointer; }
.close-other-tabs { margin-left: auto; flex-shrink: 0; background: #fff; border: 0; font-size: 12px; color: #8c97a8; padding: 8px; cursor: pointer; }
.page-header { border-radius: 6px; border-color: #e7eaf0; padding: 15px 20px; box-shadow: none; }
.page-header h2 { font-size: 17px; font-weight: 600; }
.card { border-radius: 7px; border-color: #e7eaf0; padding: 20px; box-shadow: var(--shadow); overflow-x: auto; }
.btn { border: 1px solid #dce1e8; background: #fff; color: #606a78; min-height: 32px; border-radius: 4px; }
.btn-primary { background: #649af1; border-color: #649af1; color: #fff; }
.btn-success { background: #5bbb8d; border-color: #5bbb8d; color: #fff; }
.btn-danger { background: #ed7474; border-color: #ed7474; color: #fff; }
.btn-sm { min-height: 26px; padding: 3px 8px; }
.input { border-radius: 4px; border-color: #dce1e8; background: #fff; min-height: 34px; padding: 8px 11px; }
.input:focus { border-color: #88b4f4; box-shadow: 0 0 0 2px #79aaf21a; }
.search-bar { flex-wrap: wrap; padding: 4px 0 16px; border-bottom: 1px solid #f0f2f5; }
table { color: #5c6572; }
th { background: #f5f7fa; color: #636d7b; font-weight: 500; white-space: nowrap; border-bottom-color: #e8ebf0; }
td { border-bottom-color: #edf0f4; }
tr:hover { background: #f7faff; }
td:last-child { min-width: 140px; }
td .btn { margin: 2px; }
tbody:empty::after { content: '暂无数据'; display: table-cell; padding: 30px 16px; color: #a4adba; }
.modal, .modal-box { max-height: 90dvh; overflow-y: auto; border-radius: 8px; box-shadow: 0 12px 44px #18253633; }
.admin-toast { background: #344153; color: #fff; z-index: 1500; }
.odds-room-card { background: #fff; border-color: #e1e7ef; border-radius: 6px; color: #6f7b8d; }
.odds-room-card.active { background: #edf4ff; border-color: #9dc1f7; color: #548ce0; box-shadow: none; }
.manual-draw-item { min-width: 0; border-color: #e4e8ef; box-shadow: var(--shadow); }
.manual-draw-history { overflow-x: auto; }
.manual-draw-history-table th { background: #f5f7fa; color: #7b8a9f; }
.manual-draw-lh-extra { flex-wrap: wrap; }
.game-switch-item { background: #fff; border-color: #e2e8f1; }
.dashboard-welcome { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 30px; background: linear-gradient(110deg, #eef4ff, #fafbfe); border: 1px solid #e3e9f2; border-radius: 12px; margin-bottom: 18px; }
.dashboard-welcome p { font-size: 13px; color: #8992a0; line-height: 1.8; }
.dashboard-welcome h2 { font-size: 24px; margin: 5px 0 8px; font-weight: 600; }
.dashboard-update { padding: 12px 18px; border: 1px solid #e5eaf2; background: #fff; color: #9099a7; font-size: 12px; border-radius: 7px; flex-shrink: 0; }
.dashboard-update strong { display: block; margin-top: 7px; font-weight: 500; color: #61738c; }
.dashboard-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.dashboard-filter label { display: flex; gap: 8px; align-items: center; font-size: 12px; color: #8b96a6; }
.dashboard-filter .input { width: 156px; }
.dashboard-section-heading { display: flex; align-items: center; justify-content: space-between; padding: 7px 2px 16px; gap: 12px; }
.dashboard-section-heading h3, .dashboard-shortcuts h3 { font-size: 16px; font-weight: 600; }
.dashboard-section-heading > span { font-size: 12px; color: #8b96a5; }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card { display: flex; gap: 15px; align-items: center; text-align: left; background: #fff; padding: 24px 18px; border: 1px solid #e4e8ef; border-radius: 12px; box-shadow: none; cursor: pointer; min-width: 0; }
.stat-card:hover { border-color: #aac8f6; background: #fcfdff; }
.stat-card > div { min-width: 0; }
.stat-icon { display: grid; place-items: center; width: 43px; height: 48px; flex-shrink: 0; background: #eef4ff; border-radius: 12px; color: #6d9fea; font-size: 21px; }
.stat-icon.green { color: #62b8a5; background: #ecf8f5; }
.stat-icon.red { color: #dcb25e; background: #fff7e8; }
.stat-card .label { font-size: 13px; margin-bottom: 9px; color: #89919e; }
.stat-card .value { font-size: clamp(18px, 1.7vw, 27px); color: #394557; font-weight: 600; overflow-wrap: anywhere; }
.stat-card .value.red { color: #cf7758; }
.stat-card .value.green { color: #469d88; }
.stat-card .value.blue { color: #5f91df; }
.stat-card small { display: block; color: #a2abb8; font-size: 10px; margin-top: 8px; line-height: 1.5; }
.dashboard-note { color: #97a0ad; font-size: 12px; line-height: 1.8; margin-bottom: 20px; }
.dashboard-error { background: #fff2ec; border: 1px solid #f1c7b5; border-radius: 6px; padding: 12px 16px; color: #aa694e; margin-bottom: 15px; }
.dashboard-error button { margin-left: 12px; }
.dashboard-shortcuts > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.dashboard-shortcuts button { display: flex; align-items: center; gap: 10px; min-width: 0; text-align: left; padding: 14px; border: 1px solid #e9edf4; background: #fff; color: #77849b; border-radius: 6px; font-size: 12px; cursor: pointer; }
.dashboard-shortcuts button:hover { background: #f5f9ff; border-color: #b6d0f7; }
.dashboard-shortcuts button > span:last-child { margin-left: auto; }
.dashboard-shortcuts .menu-icon { background: #edf4ff; color: #649af1; border-radius: 4px; font-size: 11px; }
.login-page { background: radial-gradient(at 20% 20%, #deebff, transparent 55%), linear-gradient(145deg, #e9eef8, #f6f8fc); }
.login-box { width: 420px; max-width: calc(100% - 36px); background: #fff; border: 1px solid #e4eaf3; border-radius: 14px; padding: 38px; box-shadow: 0 20px 65px #4a65921a; }
.login-mark { color: #6998df; font-size: 31px; font-weight: 700; text-align: center; margin-bottom: 10px; }
.login-box h2 { color: #445167; font-size: 21px; margin-bottom: 8px; text-align: center; }
.login-caption { font-size: 12px; color: #a1aaba; text-align: center; margin-bottom: 28px; }
.login-box label { display: block; font-size: 12px; color: #7e899b; margin-bottom: 8px; }
.login-box .input { width: 100%; margin-bottom: 20px; min-height: 44px; background: #f9fbfe; }
.login-box > .btn { width: 100%; min-height: 44px; margin-top: 5px; }
.business-table { min-width: 1080px; table-layout: auto; }
.business-table td { white-space: normal; min-width: 145px; vertical-align: top; line-height: 1.9; overflow-wrap: anywhere; }
.business-table td:first-child { min-width: 45px; }
.business-table small { color: #8993a5; }
.business-table .list-actions { min-width: 200px; }
.business-table .list-actions .btn { margin: 2px; }
.business-table .bet-detail { white-space: pre-line; }
.list-summary { background: #f3f7ff; border: 1px solid #e1eafb; padding: 12px; color: #526780; line-height: 1.8; margin: 10px 0; font-size: 13px; }
.list-error { padding: 12px; color: #a54737; background: #fff0ed; margin: 10px 0; }
.list-loading, .list-empty { padding: 15px; color: #8993a5; }
.list-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-size: 12px; }
.list-pager .input { width: 105px; }
.list-dates label { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.list-dates .input { width: 155px; }
.order-qr { width: 48px; height: 48px; object-fit: contain; cursor: pointer; }
.content-preview { max-width: 300px; white-space: normal; overflow-wrap: anywhere; }
@media (min-width: 769px) {
  .sidebar-collapsed { --sidebar-width: 70px; }
  .sidebar-collapsed .sidebar-logo { padding: 22px 10px; font-size: 16px; height: 64px; }
  .sidebar-collapsed .sidebar-logo small, .sidebar-collapsed .menu-search, .sidebar-collapsed .menu-text, .sidebar-collapsed .menu-group-heading > span { display: none; }
  .sidebar-collapsed .menu-group-heading { padding: 12px 24px; }
  .sidebar-collapsed .menu-link { justify-content: center; padding: 9px; }
}
@media (min-width: 769px) and (max-width: 1150px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-shortcuts > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .sidebar { width: 224px; left: -224px; top: 0; bottom: 0; height: 100dvh; border-radius: 0; }
  .sidebar.open { left: 0; }
  .sidebar-overlay.show { z-index: 999; }
  .main-content { margin-left: 0; padding: 0; width: 100%; }
  .workspace-shell { padding: 0 12px 20px; min-height: 100dvh; border-radius: 0; }
  .workspace-topbar { flex-direction: row; align-items: center; margin: 0 -12px; padding: 12px; gap: 8px; flex-wrap: wrap; }
  .workspace-title { gap: 12px; flex: 1; }
  .workspace-breadcrumb > span { display: none; }
  .workspace-tools { flex-wrap: wrap; }
  .workspace-tools > a, .fullscreen-button { display: none; }
  .topbar-button, .account-menu summary { font-size: 11px; padding: 6px 8px; }
  .tab-bar { margin: 0 -12px 12px; padding: 8px 12px; }
  .card { padding: 14px; max-width: 100%; }
  table { display: table; min-width: 660px; border-collapse: collapse; }
  thead { display: table-header-group; }
  tbody { display: table-row-group; }
  tr { display: table-row; box-shadow: none; padding: 0; }
  td, th { display: table-cell; padding: 10px 12px; font-size: 12px; }
  td::before { content: none; }
  .dashboard-welcome { padding: 20px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .dashboard-welcome h2 { font-size: 20px; }
  .dashboard-update { padding: 8px 12px; width: 100%; }
  .dashboard-update strong { display: inline; margin-left: 8px; }
  .dashboard-filter > strong { width: 100%; }
  .dashboard-filter label { width: 100%; }
  .dashboard-filter label .input { flex: 1; width: auto !important; min-width: 0; }
  .dashboard-filter > span { display: none; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .stat-card { padding: 15px 12px; gap: 8px; flex-direction: column; align-items: flex-start; }
  .stat-icon { width: 34px; height: 34px; font-size: 17px; border-radius: 8px; }
  .stat-card .value { font-size: 20px; }
  .stat-card .label { font-size: 12px; }
  .dashboard-shortcuts > div { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dashboard-shortcuts button { padding: 10px; gap: 6px; font-size: 11px; }
  .dashboard-section-heading { align-items: flex-start; flex-direction: column; }
  .login-box { padding: 28px 24px; }
}
