/* ============================================================
   IMPRESE / ACHIEVEMENT — stile dedicato
   File separato: per rimuovere tutto basta cancellarlo
   e togliere il <link> da index.html.
   ============================================================ */

/* ---------- classifica ---------- */
.ach-rank {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.ach-rank th {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.ach-rank td {
  padding: 10px 6px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.ach-rank .tl { text-align: left; }
.ach-rank tr.is-me { background: rgba(242, 181, 58, 0.08); }
.ach-pos { width: 44px; }
.ach-pos img { width: 22px; height: 22px; vertical-align: middle; }
.ach-pts {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--accent);
}

/* ---------- selettore giocatore ---------- */
.ach-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ach-picker label {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ach-picker select {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

/* ---------- barra di avanzamento ---------- */
.ach-progress { margin-bottom: 18px; }
.ach-prog-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  font-size: 0.9rem;
}
.ach-prog-top span { color: var(--text-dim); }
.ach-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--panel-2);
  overflow: hidden;
}
.ach-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.4s ease;
}

/* ---------- griglia delle imprese ---------- */
.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.ach-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel-2);
  position: relative;
  overflow: hidden;
}
.ach-card.locked { opacity: 0.55; }
.ach-card.got::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent);
}
.ach-card.got.tier-base::before     { background: var(--ok); }
.ach-card.got.tier-medio::before    { background: #6aa6ff; }
.ach-card.got.tier-avanzato::before { background: var(--accent); }

.ach-emoji {
  font-size: 1.8rem;
  line-height: 1;
  flex: 0 0 auto;
  width: 38px;
  text-align: center;
}
.ach-body { min-width: 0; flex: 1; }
.ach-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.ach-title {
  font-family: var(--font-display);
  font-size: 1rem;
}
.ach-badge {
  flex: 0 0 auto;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}
.ach-desc {
  margin: 0 0 6px;
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.4;
}
.ach-when {
  margin: 0;
  font-size: 0.82rem;
  color: var(--accent);
}
.ach-when.dim { color: var(--text-dim); font-style: italic; }

/* ---------- schermi stretti ---------- */
@media (max-width: 640px) {
  .ach-rank .hide-sm { display: none; }
  .ach-grid { grid-template-columns: 1fr; }
}
