:root {
    --credit-bg: #f5f5f7;
    --credit-card: #ffffff;
    --credit-card-soft: #fafafa;
    --credit-text: #111111;
    --credit-text-soft: #666b75;
    --credit-border: #e7e7eb;
    --credit-red: #ff2b2b;
    --credit-red-dark: #d91313;
    --credit-black: #111111;
    --credit-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    --credit-radius-xl: 26px;
    --credit-radius-lg: 20px;
    --credit-radius-md: 16px;
}

.credit-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.credit-hero {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border: 1px solid var(--credit-border);
    border-radius: var(--credit-radius-xl);
    box-shadow: var(--credit-shadow);
    padding: 28px;
}

.credit-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 43, 43, 0.08);
    color: var(--credit-red-dark);
    font-size: 0.88rem;
    font-weight: 800;
}

.credit-title {
    margin: 14px 0 10px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.04;
    color: var(--credit-black);
    letter-spacing: -0.03em;
}

.credit-title span {
    color: var(--credit-red);
}

.credit-subtitle {
    margin: 0;
    color: var(--credit-text-soft);
    font-size: 1rem;
    line-height: 1.7;
}

.credit-banner {
    padding: 22px;
    border-radius: 20px;
    border: 1px dashed rgba(17, 17, 17, 0.14);
    background: linear-gradient(135deg, #f3f3f5 0%, #ececef 100%);
    text-align: center;
}

.credit-banner__label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #888;
    margin-bottom: 6px;
}

.credit-banner__size {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--credit-black);
}

.credit-banner__sub {
    color: var(--credit-text-soft);
    margin-top: 4px;
}

.credit-main {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.credit-card {
    background: var(--credit-card);
    border: 1px solid var(--credit-border);
    border-radius: var(--credit-radius-xl);
    box-shadow: var(--credit-shadow);
    padding: 20px;
}

.credit-card__head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.credit-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 43, 43, 0.08);
    color: var(--credit-red-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex: 0 0 auto;
}

.credit-card__head h2 {
    margin: 0 0 4px;
    font-size: 1.25rem;
    color: var(--credit-black);
}

.credit-card__head p {
    margin: 0;
    color: var(--credit-text-soft);
    line-height: 1.55;
}

.credit-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.credit-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.credit-field label {
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 800;
    color: #444;
}

.credit-field label span {
    text-transform: none;
    font-weight: 700;
    color: #888;
}

.credit-field input[type="number"],
.credit-field input[type="text"],
.credit-table-tools input,
.credit-table-tools select {
    width: 100%;
    height: 50px;
    border: 1px solid var(--credit-border);
    background: #fff;
    color: var(--credit-black);
    border-radius: 14px;
    padding: 0 14px;
    outline: none;
    font-size: 0.98rem;
}

.credit-field small {
    color: var(--credit-text-soft);
    line-height: 1.45;
}

.credit-borrow-box {
    border: 1px solid var(--credit-border);
    border-radius: 18px;
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.credit-borrow-box__label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
    font-weight: 800;
}

.credit-borrow-box__formula {
    margin-top: 6px;
    color: var(--credit-text-soft);
    font-size: 0.94rem;
}

.credit-borrow-box__value {
    margin-top: 12px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--credit-black);
}

.credit-duration {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.credit-duration__mini {
    position: relative;
}

.credit-duration__mini input {
    width: 100%;
    height: 50px;
    border: 1px solid var(--credit-border);
    background: #fff;
    color: var(--credit-black);
    border-radius: 14px;
    padding: 0 70px 0 14px;
}

.credit-duration__mini span {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    font-size: 0.9rem;
    white-space: nowrap;
}

.credit-rate-row {
    display: grid;
    grid-template-columns: 1fr 90px;
    gap: 12px;
    align-items: center;
}

.credit-field input[type="range"] {
    width: 100%;
    accent-color: var(--credit-red);
    cursor: pointer;
}

.credit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.credit-btn {
    border: 1px solid var(--credit-border);
    background: #fff;
    color: var(--credit-black);
    min-height: 48px;
    border-radius: 14px;
    padding: 0 18px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.credit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.credit-btn--primary {
    background: linear-gradient(135deg, var(--credit-red) 0%, var(--credit-red-dark) 100%);
    border-color: transparent;
    color: #fff;
}

.credit-btn--dark {
    background: var(--credit-black);
    color: #fff;
    border-color: var(--credit-black);
}

.credit-results {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.credit-result-card {
    border: 1px solid var(--credit-border);
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
    border-radius: 18px;
    padding: 16px;
}

.credit-result-card__label {
    color: #666;
    font-size: 0.88rem;
    margin-bottom: 8px;
}

.credit-result-card__value {
    color: var(--credit-black);
    font-size: 1.25rem;
    font-weight: 800;
}

.credit-result-card__value--nowrap {
    white-space: nowrap;
    font-size: 1.05rem;
}

.credit-table-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.credit-table-tools input {
    width: 240px;
}

.credit-table-tools select {
    width: 180px;
}

.credit-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--credit-border);
    border-radius: 18px;
}

.credit-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
    background: #fff;
}

.credit-table thead th {
    background: #f6f6f8;
    color: #555;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid var(--credit-border);
}

.credit-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #efeff2;
    color: var(--credit-black);
}

.credit-empty-row {
    text-align: center;
    color: var(--credit-text-soft);
    padding: 22px !important;
}

.credit-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
}

.credit-note {
    min-height: 48px;
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(255, 43, 43, 0.05);
    border: 1px solid rgba(255, 43, 43, 0.12);
    color: #4d4d55;
    line-height: 1.5;
}

.credit-note--soft {
    background: #fafafa;
    border-color: var(--credit-border);
}

@media (max-width: 1100px) {
    .credit-results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .credit-hero,
    .credit-card {
        padding: 18px;
    }

    .credit-form {
        grid-template-columns: 1fr;
    }

    .credit-results {
        grid-template-columns: 1fr;
    }

    .credit-rate-row,
    .credit-duration {
        grid-template-columns: 1fr;
    }

    .credit-table-tools {
        flex-direction: column;
    }

    .credit-table-tools input,
    .credit-table-tools select,
    .credit-btn {
        width: 100%;
    }

    .credit-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .credit-result-card__value--nowrap {
        white-space: normal;
    }
}