/* Калькулятор НДС — компактная карточка в фирменном стиле KazKredit */

.nds-wrap {
    --nds-blue: #214a86;
    --nds-blue-2: #102a55;
    --nds-yellow: #ffd400;
    --nds-ink: #1b2a44;
    --nds-line: #e6e9f0;
    --nds-muted: #8a97ad;
    margin: 10px 0 30px;
}

.nds-card {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    background: #fff;
    border: 1px solid var(--nds-line);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 44px -20px rgba(20, 40, 80, .35);
}

/* ---- Левая колонка: управление ---- */
.nds-card__form {
    padding: 24px 26px;
}

.nds-seg {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 20px;
    background: #f2f4f8;
    border-radius: 12px;
}

.nds-seg__btn {
    flex: 1;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 10px 8px;
    border-radius: 9px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    color: #62718c;
    white-space: nowrap;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.nds-seg__btn:hover {
    color: var(--nds-ink);
}

.nds-seg__btn.active {
    background: var(--nds-yellow);
    color: var(--nds-ink);
    box-shadow: 0 2px 8px rgba(20, 40, 80, .18);
}

.nds-field {
    margin-bottom: 16px;
}

.nds-field:last-child {
    margin-bottom: 0;
}

.nds-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--nds-muted);
}

.nds-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 13px;
    border: 1.5px solid var(--nds-line);
    border-radius: 11px;
    font: inherit;
    font-size: 17px;
    font-weight: 600;
    color: var(--nds-ink);
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.nds-field input::-webkit-outer-spin-button,
.nds-field input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.nds-field input:focus {
    outline: none;
    border-color: var(--nds-yellow);
    box-shadow: 0 0 0 3px rgba(255, 212, 0, .3);
}

.nds-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.nds-hint {
    margin: 16px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--nds-muted);
}

/* ---- Правая колонка: результат ---- */
.nds-card__out {
    position: relative;
    overflow: hidden;
    padding: 24px 26px;
    background: linear-gradient(165deg, var(--nds-blue) 0%, var(--nds-blue-2) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
}

.nds-card__out::after {
    content: '';
    position: absolute;
    right: -45px;
    top: -45px;
    width: 170px;
    height: 170px;
    background: radial-gradient(circle, rgba(255, 212, 0, .22), transparent 70%);
    pointer-events: none;
}

.nds-out__cur {
    position: relative;
    margin-bottom: 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
}

.nds-res {
    position: relative;
    padding: 14px 0;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.nds-res:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.nds-res__label {
    display: block;
    margin-bottom: 3px;
    font-size: 13px;
    color: rgba(255, 255, 255, .7);
}

.nds-res__value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.01em;
    font-variant-numeric: tabular-nums;
}

.nds-res__words {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.45;
    color: rgba(255, 255, 255, .5);
}

.nds-res--main .nds-res__label {
    color: var(--nds-yellow);
    font-weight: 700;
}

.nds-res--main .nds-res__value {
    font-size: 30px;
    color: var(--nds-yellow);
}

.nds-res--main .nds-res__words {
    color: rgba(255, 255, 255, .6);
}

/* ---- Адаптив ---- */
@media (max-width: 640px) {
    .nds-card {
        grid-template-columns: 1fr;
    }

    .nds-res--main .nds-res__value {
        font-size: 26px;
    }
}
