/* =====================================
   ROI CALCULATOR
===================================== */

.roi-page {
    min-height: calc(100vh - 78px);
    padding: 65px 20px 85px;
    background: #f6f8fb;
}

.roi-container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
}

/* PAGE HEADER */

.roi-heading {
    max-width: 760px;
    margin: 0 auto 40px;
    text-align: center;
}

.roi-icon {
    width: 66px;
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    border-radius: 18px;
    background: #e5f6f1;
    font-size: 30px;
}

.language-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    margin-bottom: 15px;
    background: #ffffff;
    border: 1px solid #e1e6ed;
    border-radius: 10px;
}

.language-control label {
    color: #647084;
    font-size: 13px;
}

.language-control select {
    border: none;
    outline: none;
    background: transparent;
    color: #172033;
    font-size: 13px;
    cursor: pointer;
}

.roi-heading h1 {
    margin: 0 0 12px;
    color: #172033;
    font-size: 40px;
    line-height: 1.25;
}

.roi-heading p {
    max-width: 680px;
    margin: 0 auto;
    color: #697386;
    font-size: 16px;
    line-height: 1.7;
}

/* MAIN CARD */

.roi-calculator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e9ef;
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(23, 32, 51, 0.08);
}

/* FORM PANEL */

.roi-form {
    padding: 40px;
    background: #ffffff;
}

.roi-section-title {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 30px;
}

.roi-title-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #e7f7f3;
    font-size: 21px;
}

.roi-section-title h2 {
    margin: 0 0 4px;
    color: #172033;
    font-size: 20px;
}

.roi-section-title p {
    margin: 0;
    color: #7a8494;
    font-size: 13px;
    line-height: 1.5;
}

/* FORM GROUP */

.roi-form-group {
    margin-bottom: 21px;
}

.roi-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 700;
}

.roi-form-group small {
    display: block;
    margin-top: 7px;
    color: #8992a1;
    font-size: 12px;
    line-height: 1.5;
}

/* SELECT */

.roi-select {
    width: 100%;
    height: 52px;
    padding: 0 14px;
    border: 1px solid #dfe4ea;
    border-radius: 10px;
    outline: none;
    background: #ffffff;
    color: #172033;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.roi-select:focus {
    border-color: #16a085;
    box-shadow: 0 0 0 4px rgba(22, 160, 133, 0.1);
}

/* NUMBER INPUT */

.roi-input-wrap {
    position: relative;
    width: 100%;
}

.roi-input-wrap input {
    box-sizing: border-box;
    width: 100%;
    height: 53px;
    padding: 0 15px 0 55px;
    border: 1px solid #dfe4ea;
    border-radius: 10px;
    outline: none;
    background: #ffffff;
    color: #172033;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.roi-input-wrap input:focus {
    border-color: #16a085;
    box-shadow: 0 0 0 4px rgba(22, 160, 133, 0.1);
}

.roi-prefix {
    position: absolute;
    top: 50%;
    left: 15px;
    z-index: 1;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
    pointer-events: none;
}

/* REMOVE NUMBER ARROWS */

.roi-input-wrap input::-webkit-inner-spin-button,
.roi-input-wrap input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.roi-input-wrap input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* BUTTONS */

.roi-calculate-btn,
.roi-reset-btn {
    width: 100%;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.roi-calculate-btn {
    height: 54px;
    margin-top: 3px;
    border: none;
    background: #16a085;
    color: #ffffff;
}

.roi-calculate-btn:hover {
    transform: translateY(-1px);
    background: #12816c;
    box-shadow: 0 8px 20px rgba(22, 160, 133, 0.2);
}

.roi-calculate-btn:active {
    transform: translateY(0);
}

.roi-reset-btn {
    height: 45px;
    margin-top: 10px;
    border: 1px solid #dfe4ea;
    background: #ffffff;
    color: #5d6675;
}

.roi-reset-btn:hover {
    background: #f5f7fa;
    border-color: #cbd2da;
}

/* RESULT PANEL */

.roi-result {
    padding: 40px;
    background: #172033;
    color: #ffffff;
}

.roi-result-heading .roi-title-icon {
    background: rgba(255, 255, 255, 0.08);
}

.roi-result-heading h2 {
    color: #ffffff;
}

.roi-result-heading p {
    color: #aeb7c7;
}

/* MAIN ROI VALUE */

.roi-main-result {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 23px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.06);
}

.roi-main-result > span:first-child {
    margin-bottom: 8px;
    color: #aeb7c7;
    font-size: 13px;
}

.roi-main-result strong {
    color: #4fd1a9;
    font-size: 36px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.roi-status {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 10px;
    border-radius: 20px;
    background: rgba(79, 209, 169, 0.12);
    color: #4fd1a9;
    font-size: 12px;
    font-weight: 600;
}

.roi-status.negative {
    background: rgba(248, 113, 113, 0.12);
    color: #fca5a5;
}

.roi-status.neutral {
    background: rgba(203, 213, 225, 0.12);
    color: #cbd5e1;
}

/* RESULT ROWS */

.roi-result-details {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.roi-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.roi-result-row:last-child {
    border-bottom: none;
}

.roi-result-row span {
    color: #aeb7c7;
    font-size: 13px;
}

.roi-result-row strong {
    color: #ffffff;
    font-size: 14px;
    text-align: right;
    overflow-wrap: anywhere;
}

.roi-result-row strong.roi-profit {
    color: #4fd1a9;
}

.roi-result-row strong.roi-loss {
    color: #fca5a5;
}

/* NOTE */

.roi-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    margin-top: 24px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

.roi-note span {
    flex-shrink: 0;
    font-size: 15px;
}

.roi-note p {
    margin: 0;
    color: #9da7b8;
    font-size: 12px;
    line-height: 1.7;
}

/* TABLET */

@media (max-width: 850px) {
    .roi-calculator {
        grid-template-columns: 1fr;
    }
}

/* MOBILE */

@media (max-width: 600px) {
    .roi-page {
        padding: 40px 15px 60px;
    }

    .roi-heading h1 {
        font-size: 32px;
    }

    .roi-heading p {
        font-size: 14px;
    }

    .roi-form,
    .roi-result {
        padding: 26px 21px;
    }

    .roi-main-result strong {
        font-size: 30px;
    }

    .roi-result-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .roi-result-row strong {
        text-align: left;
    }
}