/* ==========================================================================
   ACHIEVEMENTS — Badges & Milestones · Green Accent #10b981
   ========================================================================== */

.ach-section {
    padding: 20px 0 60px;
}

/* ══════════════════════════════════════════════════════════════════════════
   STATS ROW
══════════════════════════════════════════════════════════════════════════ */
.ach-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.ach-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--v-card-bg);
    border: 1px solid var(--v-card-border);
    border-radius: 16px;
    box-shadow: var(--v-shadow);
    transition: all 0.3s;
}
.ach-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--v-shadow-hover);
}
.ach-stat-icon {
    font-size: 1.8rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--v-accent-soft);
    border-radius: 12px;
    flex-shrink: 0;
}
.ach-stat-lbl {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--v-text-muted);
}
.ach-stat-val {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--v-text);
    line-height: 1.1;
}

/* ══════════════════════════════════════════════════════════════════════════
   FILTER TABS
══════════════════════════════════════════════════════════════════════════ */
.ach-tabs {
    display: flex;
    gap: 6px;
    background: var(--v-nav-bg);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.ach-tab-btn {
    padding: 8px 18px;
    border-radius: 9px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--v-nav-text);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}
.ach-tab-btn:hover {
    color: var(--v-text);
}
.ach-tab-btn.active {
    background: #ffffff;
    color: var(--v-accent-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
[data-theme="dark"] .ach-tab-btn.active {
    background: #1e293b;
}

/* ══════════════════════════════════════════════════════════════════════════
   BADGE GRID
══════════════════════════════════════════════════════════════════════════ */
.ach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.ach-badge-card {
    text-align: center;
    padding: 24px 18px 20px;
    position: relative;
    overflow: hidden;
    cursor: default;
}
.ach-badge-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    opacity: 0;
    transition: opacity 0.3s;
}
.ach-badge-card.ach-unlocked::before {
    opacity: 1;
    background: linear-gradient(90deg, var(--v-accent), #34d399);
}
.ach-badge-card.ach-locked {
    opacity: 0.7;
}

.ach-badge-card.ach-locked .ach-icon-wrap {
    filter: grayscale(100%) contrast(70%);
    opacity: 0.5;
}

.ach-badge-card:hover {
    transform: translateY(-4px);
}

/* ─── Status tag ── */
.ach-status {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.ach-status-done {
    background: #d1fae5;
    color: #059669;
}
.ach-status-lock {
    background: #f1f5f9;
    color: #94a3b8;
}
.ach-status-near {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
    animation: ach-pulse 2s infinite;
}
@keyframes ach-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* ─── Icon ── */
.ach-icon-wrap {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--v-accent-soft), #d1fae5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 14px;
    box-shadow: 0 4px 12px rgba(16,185,129,0.1);
    transition: all 0.3s;
}
.ach-badge-card.ach-unlocked:hover .ach-icon-wrap {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 0 20px rgba(16,185,129,0.25);
}

.ach-badge-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--v-text);
    margin: 0 0 6px;
}
.ach-badge-desc {
    font-size: 0.78rem;
    color: var(--v-text-secondary);
    margin: 0 0 auto;
    line-height: 1.5;
    min-height: 2.2rem;
}

/* ─── Progress ── */
.ach-progress {
    margin-top: 16px;
    width: 100%;
}
.ach-progress-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--v-text-muted);
    margin-bottom: 4px;
}
.ach-progress-track {
    height: 6px;
    background: var(--v-progress-track);
    border-radius: 99px;
    overflow: hidden;
}
.ach-progress-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #fdba74, #f59e0b);
    transition: width 0.5s;
}
.ach-badge-card.ach-unlocked .ach-progress-fill {
    background: var(--v-progress-fill);
}

/* ─── Date ── */
.ach-date {
    text-align: center;
    font-size: 0.68rem;
    color: var(--v-text-muted);
    margin-top: 10px;
    font-weight: 600;
}

/* ─── Update button ── */
.ach-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 10px;
    background: var(--v-input-bg);
    border: 1px solid var(--v-card-border);
    color: var(--v-text-secondary);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    text-decoration: none;
}
.ach-btn-outline:hover {
    border-color: var(--v-accent-border);
    color: var(--v-accent-dark);
    background: var(--v-accent-soft);
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    .ach-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .ach-stat-card { padding: 12px 14px; }
    .ach-grid { grid-template-columns: 1fr; }
    .ach-tabs { gap: 4px; }
    .ach-tab-btn { padding: 6px 12px; font-size: 0.78rem; }
}
