.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding: var(--s-16);
}
.stack{display:flex; flex-direction:column; gap: var(--s-12)}
.row{display:flex; gap: var(--s-12); align-items:center; flex-wrap:wrap}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 12px 14px;
  border-radius: 12px;
  border:1px solid var(--border);
  background: var(--surface);
  cursor:pointer;
  font-size: var(--fs-14);
  text-decoration:none;
  user-select:none;
}
.btn-primary{
  background: var(--primary);
  color: var(--primary-contrast);
  border-color: var(--primary);
}
.btn-ghost{
  background: transparent;
}
.input{
  width:100%;
  padding: 12px 12px;
  border-radius: 12px;
  border:1px solid var(--border);
  background: var(--surface);
  font-size: var(--fs-16);
}
.label{font-size: var(--fs-12); color: var(--muted)}
.list{
  border:1px solid var(--border);
  border-radius: var(--radius);
  overflow:hidden;
  background: var(--surface);
}
.list-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: var(--s-12);
  padding: 12px 12px;
  border-bottom:1px solid var(--border);
  cursor:pointer;
}
.list-item:last-child{border-bottom:none}
.list-item:hover{background:#f9fafb}
.badge{
  font-size: var(--fs-12);
  color: var(--muted);
}
.avatar{
  width: var(--avatar);
  height: var(--avatar);
  border-radius: 999px;
  border:1px solid var(--border);
  background:#f3f4f6;
  object-fit: cover;
}
.h1{font-size: var(--fs-28); margin: 0 0 var(--s-12) 0}
.h2{font-size: var(--fs-20); margin: 0 0 var(--s-8) 0}
.muted{color:var(--muted)}
.table{
  width:100%;
  border-collapse: collapse;
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius);
  overflow:hidden;
}
.table th,.table td{
  padding: 10px;
  border-bottom:1px solid var(--border);
  text-align:left;
  vertical-align:top;
  font-size: var(--fs-14);
}
.table th{font-size: var(--fs-12); color:var(--muted); font-weight:600}
.table tr:last-child td{border-bottom:none}

.table-wrap{
  border-radius: var(--radius);
  overflow:auto;
  border:1px solid var(--border);
  background: var(--surface);
}

.table{
  border: none;
  border-radius: 0;
}

.table thead th{
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.table-click tbody tr{
  cursor: pointer;
}
.table-click tbody tr:hover{
  background: #f9fafb;
}
.table-click tbody tr.is-selected{
  background: #f3f4f6;
}

.table th:nth-child(4),
.table td:nth-child(4){
  text-align: right;
  white-space: nowrap;
}

.summary{margin-top: 6px}
.summary-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: var(--s-12);
}
.metric{
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 12px;
  background: var(--surface);
}
.metric-total{
  grid-column: span 2;
}
.metric-label{font-size: var(--fs-12); color: var(--muted); margin-bottom: 6px}
.metric-value{font-size: 28px; font-weight: 800; letter-spacing: -0.02em}
.metric-mini{font-size: var(--fs-14); font-weight: 600; line-height: 1.35}
.metric-sub{margin-top: 6px; font-size: var(--fs-12); color: var(--muted); display:flex; flex-wrap:wrap; gap: 8px; align-items:center}
.metric-sub .dot{opacity:.7}
.kv{
  display:grid;
  grid-template-columns: 1fr 2fr;
  gap: 8px 12px;
}
.kv .k{font-size: var(--fs-12); color: var(--muted); word-break:break-word}
.kv .v{font-size: var(--fs-14); word-break:break-word}

@media (max-width: 520px){
  .topo-inner{padding: 10px 12px}
  .nav a{padding: 8px 8px}
  .kv{grid-template-columns:1fr}

  .table{
    table-layout: fixed;
  }

  .table th,
  .table td{
    font-size: 12px;
    padding: 6px 8px;
    line-height: 1.25;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .table th:nth-child(1),
  .table td:nth-child(1){
    width: 72px;
    white-space: nowrap;
  }

  .table th:nth-child(2),
  .table td:nth-child(2){
    width: 28%;
  }

  .table th:nth-child(3),
  .table td:nth-child(3){
    width: 32%;
  }

  .table th:nth-child(4),
  .table td:nth-child(4){
    width: 84px;
    white-space: nowrap;
    text-align: right;
  }

  .summary-grid{grid-template-columns: 1fr;}
  .metric-total{grid-column: auto;}
  .metric-value{font-size: 26px;}
}

@media (max-width: 900px){
  .summary-grid{grid-template-columns: repeat(2, minmax(0,1fr));}
  .metric-total{grid-column: span 2;}
  .metric-span2{grid-column: span 2;}
}