/* achievements.css — страница «Все достижения». Scoped под .ach-page. */

.ach-page {
    font-family: var(--font-ui);
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
.ach-page *, .ach-page *::before, .ach-page *::after { box-sizing: border-box; }
.ach-page a { color: inherit; text-decoration: none; }

/* Header — общий стиль с settings */
.ach-header {
    position: sticky; top: 0; z-index: 10;
    background: rgba(245, 244, 240, 0.92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--divider);
    padding: 12px 32px;
    display: flex; align-items: center; gap: 18px;
}
.ach-back {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 8px;
    background: transparent; border: 1.5px solid var(--divider);
    color: var(--ink); font-size: 13px; font-weight: 600;
}
.ach-back:hover { background: var(--surface); }
.ach-logo { display: flex; align-items: center; gap: 8px; margin-left: 4px; }
.ach-logo__mark {
    width: 28px; height: 28px; border-radius: 7px;
    background: var(--brand-grad);
    display: grid; place-items: center;
    color: #fff; font-family: var(--font-mono); font-weight: 700; font-size: 12px;
}
.ach-logo__name { font-weight: 800; font-size: 14px; }
.ach-crumb { font-size: 14px; color: var(--sub); font-family: var(--font-mono); letter-spacing: 0.06em; }

/* Body */
.ach-main { max-width: 1100px; margin: 0 auto; padding: 32px 24px 80px; }
.ach-title-row {
    display: flex; align-items: baseline; gap: 14px;
    margin-bottom: 28px;
}
.ach-h1 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.ach-count {
    padding: 4px 12px; border-radius: 999px;
    background: var(--accent-bg); color: var(--accent);
    font-family: var(--font-mono); font-size: 12px; font-weight: 700;
    letter-spacing: 0.04em;
}

.ach-group { margin-bottom: 32px; }
.ach-group__title {
    margin: 0 0 12px;
    font-size: 13px; font-weight: 700; color: var(--sub);
    font-family: var(--font-mono); letter-spacing: 0.06em;
    text-transform: uppercase;
}
.ach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.ach-card {
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: var(--r-lg);
    padding: 16px;
    display: flex; gap: 14px; align-items: flex-start;
    transition: transform 0.12s ease;
}
.ach-card--earned {
    border-color: var(--success);
    background: linear-gradient(180deg, var(--surface), var(--success-bg));
}
.ach-card:not(.ach-card--earned) { opacity: 0.7; }
.ach-card__icon {
    width: 44px; height: 44px; border-radius: 10px;
    background: var(--bg-alt);
    display: grid; place-items: center;
    font-size: 22px; flex-shrink: 0;
}
.ach-card--earned .ach-card__icon { background: var(--success-bg); }
.ach-card:not(.ach-card--earned) .ach-card__icon { filter: grayscale(1); opacity: 0.7; }
.ach-card__body { flex: 1; min-width: 0; }
.ach-card__label {
    font-size: 13.5px; font-weight: 700; color: var(--ink);
    line-height: 1.25;
}
.ach-card__desc {
    font-size: 11.5px; color: var(--sub); margin-top: 3px; line-height: 1.4;
}
.ach-card__progress {
    margin-top: 8px;
    display: flex; align-items: center; gap: 8px;
}
.ach-card__bar {
    flex: 1; height: 4px;
    background: var(--divider); border-radius: 999px;
    overflow: hidden;
}
.ach-card__bar-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.3s ease; }
.ach-card__bar-fill--done { background: var(--success); }
.ach-card__counter {
    font-family: var(--font-mono); font-size: 10.5px;
    color: var(--sub); white-space: nowrap;
}

/* Responsive */
@media (max-width: 540px) {
    .ach-header { padding: 10px 16px; gap: 10px; }
    .ach-crumb { display: none; }
    .ach-main { padding: 24px 16px 60px; }
    .ach-h1 { font-size: 26px; }
    .ach-grid { grid-template-columns: 1fr; }
}
