/* /today (DAB): above-the-fold layout — keep sync; full Bootstrap/oddsgpt/dab.css load async */
*, *::before, *::after { box-sizing: border-box; }
body {
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}
.container-fluid {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}
.container-fluid.px-0 {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
}
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}
.row.no-gutters {
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
}
.no-gutters > .col,
.no-gutters > [class*="col-"] {
  padding-right: 0;
  padding-left: 0;
}
[class*="col-"] {
  position: relative;
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}
.bg-light { background-color: #f8f9fa !important; }

.sidebar {
  padding: 0;
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
  background-color: #f8f9fa;
  min-height: 100vh;
}
#leftMenu { padding: 0; overflow-x: hidden; }
#leftMenu.loaded { opacity: 1 !important; }

#mainContent {
  min-height: min(70vh, 900px);
  padding: 20px;
  padding-right: 30px;
  position: relative;
  z-index: 1;
}
@media (max-width: 991px) {
  #mainContent { min-height: 48vh; }
}
@media (min-width: 768px) {
  .container-fluid.px-0 > .row.no-gutters {
    min-height: 100vh;
    height: 100vh;
    max-height: 100vh;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    overflow: hidden;
  }
  nav.sidebar,
  .sidebar.d-md-block {
    position: relative !important;
    top: auto;
    align-self: stretch;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    flex: 0 0 auto;
    overflow-y: auto;
    overflow-x: hidden;
    width: 300px !important;
    flex: 0 0 300px !important;
    max-width: 480px !important;
    min-width: 260px !important;
  }
  #mainContent,
  main.dab-main {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0 !important;
    height: auto !important;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .d-md-block { display: block !important; }
}
@media (max-width: 767.98px) {
  .sidebar,
  .sidebar.d-md-block {
    display: block !important;
    position: fixed !important;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    width: 300px !important;
    background-color: #f8f9fa !important;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .sidebar.active,
  .sidebar.d-md-block.active {
    transform: translateX(0) !important;
  }
  #mainContent {
    width: 100% !important;
    margin-left: 0 !important;
    padding: 10px;
    padding-right: 20px;
    padding-top: 56px;
  }
}

.mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: #fff;
  z-index: 999;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid #dee2e6;
  align-items: center;
  padding: 0 12px;
}
.mobile-topbar .mobile-logo,
.mobile-topbar picture.mobile-logo-picture img {
  height: 30px;
  width: auto;
  margin-left: 8px;
}
.menu-toggle {
  display: none;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  cursor: pointer;
  padding: 10px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border: 1px solid #dee2e6;
  min-width: 44px;
  min-height: 44px;
}
.mobile-topbar .menu-toggle {
  position: static;
  background: transparent;
  border: none;
  box-shadow: none;
  min-width: auto;
  min-height: auto;
  padding: 8px;
  flex-shrink: 0;
}
@media (max-width: 767.98px) {
  .mobile-topbar { display: flex !important; }
  .sidebar .menu-toggle,
  #menuToggle {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}
.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #333;
  margin: 5px 0;
}
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1039;
}
.overlay.active { display: block; }

/* Homepage /today shell */
.hp-main {
  padding: 0;
}

/* DAB first screen */
.dab-main {
  padding: 12px 12px 32px;
  background: #f5f7fb;
  min-height: 100vh;
  color: #1f2937;
}
@media (min-width: 641px) {
  .dab-main { padding: 16px 20px 40px; }
}
.dab-wukong-link {
  margin: 0 0 12px;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
}
.dab-wukong-link a {
  color: #c47a00;
  text-decoration: none;
}
.dab-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.dab-header h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111827;
}
@media (min-width: 641px) {
  .dab-header h1 { font-size: 1.55rem; }
}
.dab-subtitle {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: #6b7280;
}
.dab-header .hp-range-tabs,
.hp-range-tabs {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.dab-header .hp-date-selector,
.hp-date-selector { display: flex; align-items: center; }
.dab-header .hp-date-nav-btn,
.hp-date-nav-btn {
  background: #fff;
  border: none;
  color: #667eea;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.8rem;
}
.dab-header #hpDateSelect,
#hpDateSelect {
  border: none;
  background: #fff;
  color: #222;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 10px;
  min-width: 96px;
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
}

.dab-kpi-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
@media (min-width: 641px) and (max-width: 1100px) {
  .dab-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1101px) {
  .dab-kpi-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(140px, 180px);
  }
}
.dab-kpi {
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.dab-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.dab-kpi-icon.blue { background: #e8f1fe; color: #1a73e8; }
.dab-kpi-icon.green { background: #e8f8ef; color: #12b76a; }
.dab-kpi-icon.orange { background: #fff4e5; color: #f79009; }
.dab-kpi-icon.purple { background: #f3e8ff; color: #7a5af8; }
.dab-kpi-body { min-width: 0; flex: 1; }
.dab-kpi-body .dab-kpi-label {
  font-size: 0.72rem;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 2px;
}
.dab-kpi-body .dab-kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.15;
}