/* ============ SCORES PREMIUM ============ */

.scores-page { padding-bottom: 48px; }

.scores-hero{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:16px; margin: 10px 0 18px;
  padding: 18px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(10px);
}

.scores-title{ margin:0; font-size: clamp(24px, 3vw, 34px); letter-spacing: .2px; }
.scores-subtitle{ margin:6px 0 0; opacity:.85; }

.scores-hero-actions{ display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }

.scores-kpis{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:12px;
  margin: 12px 0 16px;
}

.kpi-card{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  padding: 14px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  min-height: 92px;
}

.kpi-label{ font-size: 13px; opacity:.75; }
.kpi-value{ font-size: 26px; font-weight: 800; margin-top: 6px; }
.kpi-sub{ font-size: 12px; opacity:.70; margin-top: 4px; }

.scores-layout{
  display:grid;
  grid-template-columns: 360px 1fr;
  gap: 14px;
  margin-top: 8px;
}

.card{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  box-shadow: 0 12px 40px rgba(0,0,0,.20);
  overflow:hidden;
}

.card-header{ padding: 16px 16px 10px; }
.card-header.row{ display:flex; align-items:flex-end; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.card-title{ margin:0; font-size: 18px; font-weight: 800; }
.card-desc{ margin:6px 0 0; opacity:.75; font-size: 13px; }

.filters{ padding: 0 16px 16px; display:grid; gap: 12px; }
.field label{ display:block; font-size: 12px; opacity:.75; margin-bottom: 6px; }
.field select{
  width:100%; padding: 10px 12px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  color: inherit;
  outline: none;
}

.divider{
  height:1px; background: rgba(255,255,255,.10);
  margin: 4px 16px 14px;
}

.trend{ padding: 0 16px 16px; }
#trend-canvas{
  width:100%;
  height:140px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}
.trend-legend{ margin-top: 10px; font-size: 12px; opacity:.75; display:flex; align-items:center; gap:8px; }
.trend-legend .dot{
  width:10px; height:10px; border-radius:999px;
  background: rgba(255,255,255,.75);
  display:inline-block;
}

.focus-box{
  margin: 0 16px 16px;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}
.focus-title{ font-weight: 800; font-size: 14px; }
.focus-text{ margin-top: 6px; opacity:.80; font-size: 13px; line-height: 1.4; }

.scores-main .card-header{ padding-bottom: 14px; }
.history-actions{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.search{
  padding: 10px 12px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  color: inherit;
  outline:none;
  min-width: 220px;
}
#sort{
  padding: 10px 12px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  color: inherit;
  outline:none;
}

.scores-list{ padding: 0 16px 16px; display:grid; gap: 10px; }

.score-row{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.16);
  padding: 12px 12px;
  display:grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  cursor:pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.score-row:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.18);
  background: rgba(0,0,0,.20);
}
.score-main{
  display:flex; gap: 12px; align-items:center;
}
.badge{
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  opacity:.95;
  white-space:nowrap;
}
.score-meta{ display:flex; flex-direction:column; gap:4px; }
.score-title{ font-weight: 800; }
.score-sub{ font-size: 12px; opacity:.75; display:flex; gap:10px; flex-wrap:wrap; }

.score-right{
  display:flex; align-items:center; gap:10px;
}
.pill{
  padding: 8px 12px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  font-weight: 900;
}
.chev{ opacity:.65; font-size: 18px; margin-right: 2px; }

.list-footer{
  border-top: 1px solid rgba(255,255,255,.10);
  padding: 12px 16px;
  font-size: 12px;
  opacity:.75;
}

.empty-state{
  display:none;
  padding: 40px 16px 36px;
  text-align:center;
  opacity:.85;
}
.empty-emoji{ font-size: 34px; }
.empty-title{ font-weight: 900; margin-top: 10px; }
.empty-text{ opacity:.75; margin-top: 6px; }

/* Buttons */
.btn{
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  color: inherit;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  font-weight: 800;
}
.btn:hover{ transform: translateY(-1px); border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.08); }
.btn:disabled{ opacity:.55; cursor:not-allowed; transform:none; }

.btn-primary{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.20);
}
.btn-ghost{
  background: transparent;
}
.btn-danger{
  border-color: rgba(255,80,80,.35);
  background: rgba(255,80,80,.12);
}
.btn-danger:hover{
  border-color: rgba(255,80,80,.50);
  background: rgba(255,80,80,.18);
}

/* Drawer */
.drawer-backdrop{
  position: fixed;
  inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  display:none;
  z-index: 9998;
}
.drawer{
  position: fixed;
  top: 0;
  right: 0;
  width: min(520px, 92vw);
  height: 100vh;
  background: rgba(20,20,24,.92);
  border-left: 1px solid rgba(255,255,255,.10);
  transform: translateX(100%);
  transition: transform .18s ease;
  z-index: 9999;
  display:flex;
  flex-direction:column;
}
.drawer.open{ transform: translateX(0); }
.drawer-backdrop.open{ display:block; }

.drawer-header{
  padding: 16px 16px 12px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.drawer-title{ font-weight: 900; font-size: 18px; }
.drawer-sub{ opacity:.75; font-size: 12px; margin-top: 4px; }
.drawer-close{
  border-radius: 14px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  cursor:pointer;
}
.drawer-body{ padding: 14px 16px 18px; overflow:auto; }

.drawer-kpis{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap:10px;
  margin-bottom: 14px;
}
.mini-kpi{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  padding: 10px 10px;
}
.mini-label{ font-size: 12px; opacity:.75; }
.mini-value{ font-size: 16px; font-weight: 900; margin-top: 6px; }

.drawer-section{ margin-top: 14px; }
.drawer-section h3{ margin: 0 0 8px; font-size: 14px; font-weight: 900; }
.drawer-summary{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  padding: 12px 12px;
  opacity:.9;
  line-height: 1.45;
  font-size: 13px;
}
.drawer-json{
  margin:0;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.30);
  padding: 12px 12px;
  max-height: 280px;
  overflow:auto;
  font-size: 12px;
}
.drawer-actions{ margin-top: 14px; display:flex; gap:10px; }

/* Responsive */
@media (max-width: 980px){
  .scores-kpis{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .scores-layout{ grid-template-columns: 1fr; }
  .search{ min-width: 180px; width: 100%; }
}
