* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Microsoft YaHei", sans-serif;
  background: #f5f6f8;
  color: #1f2328;
}
.view { max-width: 720px; margin: 0 auto; padding: 24px; }
.login-box {
  max-width: 320px;
  margin: 80px auto;
  padding: 24px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  text-align: center;
}
.login-box h1, header h1 { font-size: 20px; margin: 0 0 16px; }
input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  font-size: 14px;
}
button {
  width: 100%;
  padding: 10px;
  background: #1a7f37;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
button:hover { background: #166a2e; }
.search-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.search-bar input { margin-bottom: 0; }
.search-bar button { width: 96px; flex-shrink: 0; }
.msg { color: #cf222e; font-size: 13px; min-height: 18px; }
.card {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.card h2 { margin: 0 0 12px; font-size: 18px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
table td { padding: 6px 0; border-bottom: 1px solid #eee; }
table td:first-child { color: #656d76; width: 140px; }
.card button.secondary {
  width: auto;
  display: inline-block;
  margin: 12px 8px 0 0;
  padding: 8px 16px;
  background: #fff;
  color: #1a7f37;
  border: 1px solid #1a7f37;
}
.card button.secondary:hover { background: #f0fdf4; }
#report-text {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.main-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.main-header h1 { margin: 0; }
.tabs { display: flex; gap: 4px; }
.tab {
  width: auto;
  padding: 8px 16px;
  background: #fff;
  color: #656d76;
  border: 1px solid #d0d7de;
}
.tab.active { background: #1a7f37; color: #fff; border-color: #1a7f37; }
.hint { color: #656d76; font-size: 13px; margin: 0 0 10px; }
.dimension-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}
.dimension-item { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.dimension-item input { width: auto; margin: 0; }
.dimension-item.disabled { color: #afb8c1; }
#watch-table, #events-table { width: 100%; border-collapse: collapse; font-size: 13px; }
#watch-table th, #events-table th {
  text-align: left; padding: 6px 8px; border-bottom: 2px solid #d0d7de; color: #656d76;
}
#watch-table td, #events-table td { padding: 6px 8px; border-bottom: 1px solid #eee; }
.link-btn {
  width: auto; padding: 2px 8px; font-size: 12px; background: #fff; color: #cf222e; border: 1px solid #cf222e;
}
.collapsible h3.collapse-toggle {
  margin: 0;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.collapse-arrow {
  display: inline-block;
  transition: transform 0.15s ease;
  font-size: 12px;
  color: #656d76;
}
.collapsible.collapsed .collapse-arrow { transform: rotate(-90deg); }
.collapsible.collapsed .collapse-body { display: none; }
.collapse-body { margin-top: 12px; }
.count-badge {
  font-size: 12px;
  color: #656d76;
  font-weight: normal;
}
