/* ===== استایل‌های نهایی ماشین حساب ===== */
.calc-final-container {
    height: 100vh;              /* ← به جای 100% */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}


.calc-final-wrapper {
    width: 100%;
    max-width: 1300px;
    background: white;
    border-radius: 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    max-height: 98%;
    box-sizing: border-box;
}

/* هدر */
.calc-final-header {
    text-align: center;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.calc-final-header h2 {
    color: #0A2F5C;
    font-size: 24px;
    margin: 0 0 5px;
}

.calc-final-header p {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

/* تب‌ها */
.calc-final-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.calc-tab {
    padding: 12px 28px;
    border: none;
    border-radius: 40px;
    background: #f1f3f5;
    color: #495057;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.calc-tab.active {
    background: linear-gradient(135deg, #0A2F5C, #00B09B);
    color: white;
    box-shadow: 0 8px 15px rgba(0, 176, 155, 0.2);
}

/* کانتینر اصلی دو ستونه */
.calc-final-main {
    display: flex;
    gap: 25px;
    flex: 1;
    min-height: 450px;
    overflow: hidden;
}

/* ستون راست - ماشین حساب */
.calc-final-right {
    flex: 1.1;
    min-width: 300px;
}

.calc-machine {
    background: #f8f9fa;
    border-radius: 24px;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.02);
}

.calc-screen {
    position: relative;
    margin-bottom: 15px;
}

.calc-display {
    width: 100%;
    height: 70px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 0 15px;
    font-size: 28px;
    font-weight: 600;
    text-align: left;
    direction: ltr;
    color: #0A2F5C;
    font-family: monospace;
    box-sizing: border-box;
}

.calc-operation {
    position: absolute;
    top: 5px;
    right: 15px;
    font-size: 14px;
    color: #adb5bd;
    direction: ltr;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    flex: 1;
}

.calc-btn {
    padding: 15px 5px;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 600;
    background: white;
    color: #212529;
    box-shadow: 0 3px 6px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.1s;
    font-family: monospace;
}

.calc-btn:active {
    transform: scale(0.95);
    background: #e9ecef;
}

.calc-btn.num { color: #0A2F5C; }
.calc-btn.operator { background: #e3f2fd; color: #0A2F5C; }
.calc-btn.func { background: #f1f3f5; color: #fd7e14; }
.calc-btn.equal { background: #00B09B; color: white; }

.calc-note {
    text-align: center;
    margin-top: 12px;
    color: #868e96;
    font-size: 12px;
}

/* ستون چپ - فرم‌ها */
.calc-final-left {
    flex: 1.5;
    min-width: 350px;
    background: #f8f9fa;
    border-radius: 24px;
    padding: 20px;
    overflow-y: auto;
}

.calc-tab-content {
    display: none;
    height: 100%;
}

.calc-tab-content.active {
    display: block;
}

.calc-form, .calc-result {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.calc-form h3 {
    color: #0A2F5C;
    margin: 0 0 15px;
    font-size: 18px;
    border-right: 4px solid #00B09B;
    padding-right: 12px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    color: #495057;
    font-size: 13px;
    font-weight: 500;
}

.calc-input {
    width: 100%;
    padding: 9px 9px;
    border: 1px solid #ced4da;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    box-sizing: border-box;
}

.calc-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #0A2F5C, #00B09B);
    color: white;
    border: none;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    font-family: inherit;
    transition: all 0.2s;
}

.calc-submit:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 176, 155, 0.2);
}

/* استایل نتایج */
.calc-result {
    padding: 10px 0;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.result-item.highlight {
    background: #e8f5e9;
    padding: 12px 15px;
    border-radius: 12px;
    margin: 10px 0;
    border-bottom: none;
}

.result-value {
    font-size: 18px;
    font-weight: 700;
    color: #0A2F5C;
    direction: ltr;
}

.result-unit {
    color: #868e96;
    font-size: 13px;
    margin-right: 5px;
}

.back-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #0A2F5C;
    border: 1px solid #0A2F5C;
    border-radius: 40px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 15px;
    font-family: inherit;
}

.back-btn:hover {
    background: #0A2F5C;
    color: white;
}

/* فوتر */
.calc-footer {
    text-align: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
    color: #868e96;
    font-size: 12px;
    flex-shrink: 0;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .calc-final-main {
        flex-direction: column;
    }
    .calc-final-right {
        display: none;
    }
    .calc-final-left {
        min-width: auto;
    }
}