/* Responsive refinements for the board-only A-share dashboard. */
@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { grid-template-columns: 1fr 1fr 1fr; }
  .toolbar .search { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; -webkit-text-size-adjust: 100%; }
  body { font-size: 15px; background: #07111f; }
  header { position: static; padding: 15px 14px; }
  .topbar { display: block; }
  .brand h1 { font-size: 20px; line-height: 1.25; }
  .brand p { font-size: 13px; line-height: 1.5; }
  .status-badge { margin-top: 12px; width: 100%; justify-content: center; }

  body::after { opacity: .16; }
  .brand h1::after { display: none; }
  .metric::before, .board::before, .run-card::before { animation-duration: 8s; opacity: .2; }
  main { width: 100%; max-width: 100%; padding: 14px 12px 24px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric { padding: 12px; }
  .metric .value { font-size: 20px; }
  .toolbar { grid-template-columns: 1fr; gap: 9px; }
  .toolbar .search, .search, .btn { width: 100%; min-width: 0; min-height: 42px; }
  .board-switcher { grid-template-columns: 38px 1fr 38px; gap: 8px; margin: 4px 0 12px; }
  .switch-btn { width: 38px; min-width: 38px; }
  .board-tabs { gap: 7px; }
  .board-tab { min-height: 38px; padding: 8px 10px; font-size: 13px; }
  .board-grid { gap: 14px; }
  .board-head { display: block; padding: 12px; }
  .board-title h2 { font-size: 17px; }
  .board-title p { font-size: 12px; }
  .board-count { margin-top: 6px; }
  .table-shell { overflow: visible; }
  table, thead, tbody, tr, th, td { display: block; }
  table { min-width: 0; }
  thead { display: none; }
  tbody { display: grid; gap: 10px; padding: 10px; }
  tr { overflow: hidden; border: 1px solid rgba(36, 53, 79, .95); border-radius: 8px; background: rgba(12, 23, 40, .9); }
  td { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: start; padding: 9px 11px; border-bottom: 1px solid rgba(145, 163, 191, .13); white-space: normal; overflow-wrap: anywhere; }
  td::before { content: attr(data-label); color: var(--muted); font-size: 12px; }
  td:last-child { border-bottom: 0; }
  .sticky-col, th.sticky-col { position: static; background: transparent; }
  .empty { display: block; padding: 16px 12px; text-align: left; }
  .empty::before { content: none; }
  .section-title { display: block; margin: 18px 0 9px; }
  .section-title .hint { margin-top: 4px; text-align: left; font-size: 12px; }
  .run-list { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .metric-grid { grid-template-columns: 1fr; }
  td { grid-template-columns: 78px minmax(0, 1fr); }
}

@media (max-width: 360px) {
  header { padding-left: 12px; padding-right: 12px; }
  main { padding-left: 10px; padding-right: 10px; }
  .brand h1 { font-size: 18px; }
  .metric .value { font-size: 19px; }
}
