body { font-family: -apple-system, Segoe UI, Microsoft YaHei, sans-serif; background: #f4f6f9; color: #1f2937; padding: 20px; }
.wrap { max-width: 1280px; margin: 0 auto; }
h1 { font-size: 20px; margin-bottom: 4px; }
.hint { color: #6b7280; font-size: 12px; margin-bottom: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card { background: #fff; border: 1px solid #e3e8ef; border-radius: 10px; padding: 14px 16px; }
.card .num { font-size: 26px; font-weight: 700; }
.card .lbl { font-size: 12px; color: #6b7280; margin-top: 2px; }
.sec { background: #fff; border: 1px solid #e3e8ef; border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.sec h2 { font-size: 15px; margin-bottom: 12px; }
.bar-row { display: flex; align-items: center; margin: 6px 0; font-size: 13px; }
.bar-name { width: 110px; flex-shrink: 0; display: flex; align-items: center; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; flex-shrink: 0; }
/* 24 小时趋势图 */
.hour-chart { display: flex; align-items: flex-end; gap: 4px; height: 130px; padding-top: 6px; }
.hour-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.hour-bar { width: 70%; background: linear-gradient(180deg, #3b82f6, #60a5fa); border-radius: 4px 4px 0 0; min-height: 2px; }
.hour-num { font-size: 10px; color: #334155; margin-bottom: 2px; }
.hour-lbl { font-size: 10px; color: #6b7280; margin-top: 4px; }
.bar-track { flex: 1; background: #eef1f5; border-radius: 6px; height: 20px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: linear-gradient(90deg, #3b82f6, #60a5fa); border-radius: 6px; min-width: 2px; }
.bar-num { width: 80px; text-align: right; flex-shrink: 0; color: #6b7280; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid #e3e8ef; text-align: left; white-space: nowrap; }
th { background: #f8fafc; color: #6b7280; font-weight: 600; position: sticky; top: 0; }
tr:hover td { background: #f8fafc; }
td.wrap-cell { white-space: normal; word-break: break-all; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
#startDate, #endDate { min-width: 140px; width: 140px; flex-shrink: 0; }
#domainSearch { min-width: 240px; flex: 1 1 240px; max-width: 420px; }
button { background: #2563eb; color: #fff; border: none; border-radius: 8px; padding: 8px 18px; cursor: pointer; font-size: 13px; }
button.ghost { background: #fff; color: #2563eb; border: 1px solid #2563eb; }
#loginBox { max-width: 360px; margin: 80px auto; background: #fff; border: 1px solid #e3e8ef; border-radius: 10px; padding: 30px; display: none; }
#loginBox input { width: 100%; padding: 10px; margin: 8px 0 16px; border: 1px solid #e3e8ef; border-radius: 8px; }
.err { color: #dc2626; font-size: 13px; margin-top: 8px; }
.scrollbox { max-height: 480px; overflow: auto; }
.navbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; background: rgba(255,255,255,.92); border-bottom: 1px solid #e3e8ef; position: sticky; top: 0; z-index: 10; }
.navbar .logo { font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.navbar .logo span { color: #2563eb; }
.navbar .right { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; color: #1f2937; text-decoration: none; border: 1px solid #e3e8ef; border-radius: 999px; font-size: 13px; font-weight: 600; background: #fff; transition: all .2s; }
.nav-link:hover, .nav-link.active { border-color: #2563eb; color: #2563eb; }

.sel { background: #fff; border: 1px solid #e3e8ef; border-radius: 8px; padding: 8px 12px; font-size: 13px; min-width: 260px; }
h3 { font-size: 13px; color: #6b7280; margin: 14px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: #eef1f5; border: 1px solid #e3e8ef; border-radius: 999px; padding: 3px 10px; font-size: 12px; }
#domTable tbody tr { cursor: pointer; }
#domTable tbody tr:hover td { background: #eef4ff; }

.pos { color: #16a34a; font-weight: 700; }
.neg { color: #dc2626; font-weight: 700; }

/* 宽表格横向滚动，避免挤压串行 */
#domTable, #urlTable, #recentTable, #durlTable { min-width: 760px; }

/* 小屏适配 */
@media (max-width: 720px) {
  body { padding: 10px; }
  .wrap { max-width: 100%; }
  h1 { font-size: 18px; }
  .cards { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
  .card .num { font-size: 22px; }
  .navbar { flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
  .navbar .right { flex-wrap: wrap; gap: 6px; }
  .toolbar { gap: 6px; }
  .toolbar button { padding: 7px 12px; font-size: 12px; }
  .hour-chart { gap: 2px; height: 110px; }
  .hour-lbl { font-size: 9px; }
  .hour-num { display: none; }
}
