/* Фича «Прогрес атестації» - стили блока в кабинете. Все классы с префиксом atst- */

.atst-block {
    text-align: left;
    background: #f8f9fa;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    padding: 18px 22px;
    margin: 15px 0 5px 0;
    font-family: "Roboto", sans-serif;
    color: #212121;
}

.atst-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
}

.atst-title {
    font-size: 18px;
}

.atst-settings-toggle {
    font-size: 14px;
    color: #6e6286;
    text-decoration: none;
    white-space: nowrap;
}

.atst-settings-toggle:hover {
    color: #16bd7e;
}

.atst-fromlabel {
    font-size: 13px;
    color: #7f7f7f;
    margin-bottom: 8px;
}

.atst-hint {
    font-size: 13px;
    background: #fff8e1;
    border: 1px solid #ffe6a1;
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 10px;
}

.atst-hint a {
    color: #16bd7e;
    font-weight: bold;
}

/* --- сетка карточек: 3 в ряд на ПК, авто-перенос, столбик на мобильном --- */

.atst-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 6px;
}

.atst-card {
    position: relative;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 10px 10px 12px 10px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.atst-card-done {
    border-color: #bfe8d7;
    background: #f6fdfa;
}

/* галочка виконаної нормы - внутри кольца, под часами */
.atst-ring-check {
    color: #0e9c66;
    font-size: 12px;
    line-height: 13px;
    font-weight: bold;
}

.atst-card-title {
    font-size: 14px;
    font-weight: 500;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 17px;
}

.atst-card-title a {
    color: #212121;
    text-decoration: none;
    border-bottom: 1px dashed #b5b5b5;
}

.atst-card-title a:hover {
    color: #16bd7e;
    border-bottom-color: #16bd7e;
}

/* --- кольцевой индикатор --- */

.atst-ring {
    position: relative;
    width: 88px;
    height: 88px;
    margin: 6px auto 0 auto;
}

.atst-ring svg {
    width: 88px;
    height: 88px;
    transform: rotate(-90deg); /* старт заполнения сверху */
}

.atst-ring-track {
    fill: none;
    stroke: #e9e9e9;
    stroke-width: 10;
}

.atst-ring-bar {
    fill: none;
    stroke: #16bd7e;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.9s ease;
}

.atst-card-done .atst-ring-bar {
    stroke: #0e9c66;
}

/* часы внутри кольца: крупное значение + мелкая цель */
.atst-ring-center {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.atst-ring-val {
    font-size: 19px;
    font-weight: bold;
    color: #212121;
    line-height: 20px;
}

.atst-card-done .atst-ring-val {
    color: #0e9c66;
}

.atst-ring-sub {
    font-size: 9px;
    color: #8a8a8a;
    line-height: 11px;
}

/* --- форма настроек --- */

.atst-settings {
    border-top: 1px dashed #ccc;
    margin-top: 16px;
    padding-top: 12px;
}

.atst-form-caption {
    font-size: 14px;
    font-weight: 500;
    margin: 10px 0 4px 0;
}

.atst-form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 14px;
}

.atst-form-row label {
    margin: 0;
    min-width: 320px;
}

.atst-form-row input {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 14px;
    width: 160px;
    background: #fff;
}

.atst-form-row input.atst-invalid {
    border-color: #de4b4b;
    background: #fff5f5;
}

.atst-form-error {
    color: #de4b4b;
    font-size: 13px;
    margin-top: 8px;
}

.atst-save-btn {
    margin-top: 12px;
}

.atst-saved {
    color: #0e9c66;
    font-weight: bold;
    margin-left: 10px;
}

@media (max-width: 575px) {
    .atst-block {
        padding: 14px 12px;
    }

    /* мобильный: три компактные карточки В ОДИН РЯД (просьба владельца) -
       кольца меньше, заголовки мельче, блок втрое ниже */
    .atst-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .atst-card {
        padding: 8px 4px 10px 4px;
    }

    .atst-card-title {
        min-height: 27px;
        font-size: 11px;
        line-height: 13px;
    }

    .atst-ring,
    .atst-ring svg {
        width: 62px;
        height: 62px;
    }

    .atst-ring-val {
        font-size: 14px;
        line-height: 15px;
    }

    .atst-ring-sub {
        font-size: 8px;
        line-height: 9px;
    }

    .atst-ring-check {
        font-size: 10px;
        line-height: 10px;
    }

    .atst-form-row label {
        min-width: 100%;
    }
}
