/* DCO CYBER LABS — ACHIEVEMENT CENTRE */

.achievement-page {
  margin: 20px 0;
}

.achievement-intro {
  padding: 24px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(120deg, #10243a, #101a2b);
}

.achievement-intro h2 {
  margin: 9px 0;
  font-size: clamp(23px, 4vw, 32px);
  color: #edf6ff;
}

.achievement-intro p {
  color: #a8b8cc;
  line-height: 1.7;
  max-width: 700px;
}

.achievement-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.achievement-stat {
  padding: 17px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.achievement-stat strong {
  display: block;
  font-size: 27px;
  color: #eaf4ff;
}

.achievement-stat span {
  font-size: 10px;
  color: #91a5bd;
  letter-spacing: 1px;
}

.achievement-progress {
  height: 9px;
  margin-top: 12px;
  overflow: hidden;
  background: #26354a;
  border-radius: 20px;
}

.achievement-progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #168bd1, #39d5c1);
  border-radius: inherit;
  transition: width .5s ease;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.achievement-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 22px 15px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: transform .2s, border-color .2s;
}

.achievement-card:hover {
  transform: translateY(-3px);
  border-color: #347bb4;
}

.achievement-card.locked {
  opacity: .68;
}

.achievement-emblem {
  display: grid;
  place-items: center;
  width: 116px;
  height: 116px;
  margin-bottom: 15px;
  border-radius: 50%;
  background: #15263b;
  border: 1px solid #31516e;
}

.achievement-emblem svg {
  width: 94px;
  height: 94px;
  max-width: 100%;
}

.achievement-card h3 {
  margin: 5px 0 8px;
  color: #e7f2ff;
  font-size: 17px;
}

.achievement-card p {
  min-height: 42px;
  color: #9aabc0;
  font-size: 12px;
  line-height: 1.6;
}

.achievement-status {
  margin: 10px 0 15px;
  padding: 6px 11px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
  background: #293447;
  color: #aebbd0;
}

.achievement-card.unlocked .achievement-status {
  color: #65e5c6;
  background: #123b38;
}

.achievement-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

.achievement-actions button {
  padding: 9px 12px;
  border: 1px solid #315675;
  border-radius: 7px;
  background: #142b43;
  color: #d9edff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.achievement-actions button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.achievement-actions button:not(:disabled):hover {
  background: #1d4263;
}

.achievement-note {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: #91a5bd;
  font-size: 11px;
  line-height: 1.7;
}

@media(max-width: 800px) {
  .achievement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media(max-width: 520px) {
  .achievement-overview {
    grid-template-columns: 1fr;
  }

  .achievement-grid {
    grid-template-columns: 1fr;
  }

  .achievement-card {
    padding: 20px;
  }
}

@media(prefers-reduced-motion: reduce) {
  .achievement-card,
  .achievement-progress-fill {
    transition: none;
  }
}

/* Match the Achievement trophy to the muted sidebar icon palette */
#dco-sidebar .nav-item > .nav-achievement-icon {
  filter: grayscale(1) saturate(0) brightness(.85);
  opacity: .8;
}
