.pd-head-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.pd-btn-add {
    color: #fff;
    border: 1px solid rgba(22, 163, 74, .3);
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 4px 12px rgba(22, 163, 74, .25);
}

.pd-btn-add:hover,
.pd-btn-add:focus-visible {
    color: #fff;
    background: linear-gradient(135deg, #34d399 0%, #16a34a 100%);
    box-shadow: 0 6px 16px rgba(22, 163, 74, .32);
}

.pd-btn-add:disabled,
.pd-btn-reset:disabled {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
}

.pd-btn-reset {
    color: #64748b;
    border: 1px solid #dbe3ef;
    background: #f8fafc;
}

.pd-btn-reset:hover,
.pd-btn-reset:focus-visible {
    color: #475569;
    background: #eef2f7;
}

/* ── Плавное появление в стиле pension/agreement ──────────────────────────── */
.pd-animate-in {
    animation: cinematic-fade-up .9s cubic-bezier(.22, 1, .36, 1) .08s both;
}

.pd-animate-in .calc-panel,
.pd-animate-in #pd-no-data-block,
.pd-animate-in #pd-results-block,
.pd-animate-in .calc-lawyer-card,
.pd-animate-in .alert-info,
.pd-animate-in .calc-feedback-cta {
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(.992);
    animation: cinematic-fade-up .72s cubic-bezier(.22, 1, .36, 1) both;
}

.pd-animate-in .calc-panel { animation-delay: .14s; }
.pd-animate-in #pd-no-data-block,
.pd-animate-in #pd-results-block { animation-delay: .22s; }
.pd-animate-in .alert-info { animation-delay: .3s; }
.pd-animate-in .calc-lawyer-card { animation-delay: .36s; }
.pd-animate-in .calc-feedback-cta { animation-delay: .42s; }

@media (prefers-reduced-motion: reduce) {
    .pd-animate-in,
    .pd-animate-in .calc-panel,
    .pd-animate-in #pd-no-data-block,
    .pd-animate-in #pd-results-block,
    .pd-animate-in .calc-lawyer-card,
    .pd-animate-in .alert-info,
    .pd-animate-in .calc-feedback-cta {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ── Визуальный стиль блока "Результаты появятся здесь" как в pension ───── */
.calc-empty-right {
    padding: 2.25rem 1.3rem;
    text-align: center;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 1.1rem;
    box-shadow: 0 6px 22px rgba(30, 64, 175, .12);
    border: 1.5px dashed #93c5fd;
    min-height: 248px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.calc-empty-right-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #dbeafe, #ede9fe);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .8rem;
    animation: pd-pulse 3s ease-in-out infinite;
}

.calc-empty-right-icon .bi {
    font-size: 1.6rem;
    color: #3b82f6;
}

.calc-empty-right h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: .35rem;
}

.calc-empty-right p {
    font-size: .83rem;
    color: #64748b;
    margin: 0;
    max-width: 280px;
}

.calc-empty-right__cta {
    margin-top: .9rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .28);
}

@keyframes pd-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, .18); }
    50% { box-shadow: 0 0 0 11px rgba(37, 99, 235, 0); }
}

/* ── Карточка "Нужна помощь специалиста?" в стиле pension ───────────────── */
.calc-lawyer-card {
    background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%);
    border: 1px solid #bfdbfe;
    border-radius: 1rem;
    padding: .95rem 1.05rem;
    position: relative;
    overflow: hidden;
}

.calc-lawyer-card::before {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 90px;
    height: 90px;
    background: radial-gradient(circle, rgba(37, 99, 235, .1) 0%, transparent 70%);
}

.calc-lawyer-card p {
    font-size: .8rem;
    margin: 0 0 .65rem;
    color: #475569;
}

.calc-lawyer-card .card-title {
    font-size: .88rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: .3rem;
}

.pd-title {
    color: #1e3a8a;
    font-size: .92rem;
    font-weight: 700;
}

/* ── Виджет версии в стиле pension ─────────────────────────────────────────── */
.calc-version-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin: .25rem 0 .85rem;
    padding: .32rem .7rem;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .95) !important;
    background: rgba(255, 255, 255, .16) !important;
    border: 1px solid rgba(255, 255, 255, .28) !important;
    letter-spacing: .01em;
    box-shadow: none;
}

.calc-version-chip .ver-sep {
    opacity: .65;
    font-weight: 500;
}

.calc-version-chip .ver-date {
    opacity: .9;
    font-weight: 500;
}

.pd-sticky-wrap {
    position: sticky;
    top: 72px;
}

/* ── Панель периодов в стиле pension ──────────────────────────────────────── */
.calc-panel {
    background: #fff;
    border-radius: 1.1rem;
    box-shadow: 0 2px 16px rgba(30, 64, 175, .08), 0 1px 4px rgba(30, 64, 175, .04);
    overflow: hidden;
}

.calc-panel-head {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    padding: .9rem 1rem .78rem;
    position: relative;
    overflow: hidden;
}

.calc-panel-head::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, .08) 0%, transparent 62%);
    pointer-events: none;
}

.calc-panel-head-title {
    font-size: .96rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: .45rem;
}

.calc-panel-head-sub {
    font-size: .76rem;
    color: rgba(255, 255, 255, .86);
    margin-top: .22rem;
    padding-left: 1.45rem;
}

.calc-panel-body {
    padding: .82rem .9rem .9rem;
}

/* ── Карточка результатов в стиле pension ─────────────────────────────────── */
.results-card {
    border-radius: 1.1rem;
    box-shadow: 0 2px 16px rgba(30, 64, 175, .08);
    overflow: hidden;
    background: #fff;
}

.results-card-head {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 55%, #3b82f6 100%);
    padding: .82rem 1rem;
}

.results-card-head h2 {
    font-size: .92rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: .35rem;
}

.results-card-body {
    padding: .95rem 1rem;
}

.pd-table thead th {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #64748b;
    border-bottom-color: #dbeafe;
    padding: .42rem .5rem;
}

.pd-table tbody td {
    background: #fff;
    border-bottom: 1px solid #eef2ff;
    padding: .38rem .5rem;
}

.pd-table .form-control,
.pd-table .form-select {
    font-size: .86rem;
    min-height: 30px;
    padding: .22rem .45rem;
    line-height: 1.2;
}

.pd-table .form-select {
    padding-right: 1.7rem;
    background-position: right .55rem center;
    background-size: 14px 10px;
}

.pd-date-input {
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

.pd-date-input::placeholder {
    color: #94a3b8;
}

.pd-row-result {
    font-weight: 600;
    color: #1e293b;
}

.pd-action-icon-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pd-action-icon-btn .bi {
    font-size: .9rem;
}

.pd-row-result--muted {
    color: #94a3b8;
    font-weight: 500;
}

.pd-summary {
    border: 1px solid #dbeafe;
    background: linear-gradient(135deg, #f8fbff 0%, #eff6ff 100%);
    border-radius: .85rem;
    padding: .7rem .82rem;
}

.pd-summary__label {
    font-size: .78rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: .2rem;
}

.pd-summary__value {
    font-size: 1.18rem;
    font-weight: 700;
    color: #1e3a8a;
    line-height: 1.2;
}

.pd-summary__subvalue {
    margin-top: .2rem;
    font-size: .92rem;
    font-weight: 600;
    color: #334155;
}

.pd-summary__line {
    display: flex;
    align-items: baseline;
    gap: .45rem;
    flex-wrap: wrap;
}

.pd-summary__line + .pd-summary__line {
    margin-top: .2rem;
}

.pd-summary__line-label {
    font-size: .78rem;
    font-weight: 600;
    color: #64748b;
}

.pd-summary__meta {
    margin-top: .15rem;
    font-size: .8rem;
    color: #64748b;
}

.pd-row-invalid .form-control,
.pd-row-invalid .form-select {
    border-color: #fca5a5;
}

/* ── Карточная раскладка строк для мобильных и средних экранов ────────────── */
@media (max-width: 991.98px) {
    .pd-sticky-wrap {
        position: static;
        top: auto;
    }

    .pd-table-thead { display: none; }

    .pd-table,
    .pd-table tbody,
    .pd-table tr {
        display: block;
    }

    .pd-table tr {
        border: 1px solid #dbeafe;
        border-radius: .75rem;
        margin-bottom: .5rem;
        background: #fff;
        overflow: hidden;
        box-shadow: 0 1px 6px rgba(30, 64, 175, .06);
    }

    .pd-table tr.pd-row-invalid {
        border-color: #fca5a5;
    }

    .pd-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .35rem;
        padding: .34rem .56rem;
        border-bottom: 1px solid #f0f5ff;
    }

    .pd-table td:last-child {
        border-bottom: none;
        justify-content: flex-end;
    }

    .pd-table td::before {
        content: attr(data-label);
        font-size: .72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: #64748b;
        flex-shrink: 0;
        white-space: nowrap;
        margin-right: .25rem;
    }

    .pd-table td .pd-date-input,
    .pd-table td .form-select {
        flex: 1;
        min-width: 0;
        width: 100%;
    }

    .pd-table td .pd-date-input {
        font-size: .88rem;
        max-width: 140px;
        margin-left: auto;
    }

    .pd-table td .form-select {
        font-size: .84rem;
        max-width: 180px;
        margin-left: auto;
    }
}

