/* Layout & Reset */
.pro-calc-wrapper {
    width: 1350px;
    margin: 50px auto;
    font-family: inherit;
    color: #1e293b;
    box-sizing: border-box;
    padding: 0 20px;
}
.pro-calc-wrapper * { box-sizing: border-box; }

/* Container */
.pro-calc-container {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    overflow: hidden;
}

/* Header */
.pro-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem 2rem;
}
.pro-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0.5rem 0 0.25rem 0;
    line-height: 1.3;
}
.pro-header p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

/* Dashboard Grid */
.pro-dashboard-grid {
    display: grid;
    grid-template-columns: 320px 1fr 340px;
    min-height: 520px;
}

/* Panels */
.pro-panel {
    padding: 1.5rem;
    border-right: 1px solid #f1f5f9;
}
.pro-panel:last-child { border-right: none; }

.panel-header {
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f1f5f9;
}
.panel-header h2 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #475569;
    margin: 0;
    letter-spacing: 0.05em;
}

/* --- INPUT YAPISI (GÜÇLENDİRİLDİ) --- */
.input-panel { background: #fff; }
.input-dense-group { margin-bottom: 1.25rem; }

.input-dense-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

/* Flex Container */
.input-wrapper {
    display: flex;
    align-items: stretch;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    transition: all 0.2s;
    width: 100%;
}
.input-wrapper:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-wrapper input {
    flex: 1; 
    /* KRİTİK: Inputun tamamen yok olmasını engeller */
    min-width: 60px; 
    border: none;
    padding: 10px 12px;
    font-size: 1rem;
    font-weight: 500;
    color: #1e293b;
    font-family: inherit;
}
.input-wrapper input:focus { outline: none; }

/* Birim Etiketi */
.unit-sign {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-left: 1px solid #cbd5e1;
    padding: 0 10px;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    /* Etiketin maksimum genişliğini sınırlayabiliriz ama şimdilik gerek yok */
}

/* FLEX WRAP ROW */
.flex-wrap-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* KRİTİK DÜZELTME: Min-Width Arttırıldı */
.sm-wrapper { 
    flex: 1; 
    /* Eğer alan 200px'ten darsa yan yana durma, aşağı in */
    min-width: 200px; 
}

.separator-line { height: 1px; background: #e2e8f0; margin: 1.5rem 0; }
.input-dense-group small { display: block; font-size: 0.75rem; color: #94a3b8; margin-top: 0.35rem; }

.calc-action button {
    width: 100%;
    padding: 10px;
    background: #1e293b;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: background 0.2s;
}
.calc-action button:hover { background: #0f172a; }

/* Results */
.result-panel { background: #fdfdfd; text-align: center; }

.result-card.primary {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.rc-label { display: block; font-size: 0.8rem; font-weight: 700; color: #60a5fa; text-transform: uppercase; margin-bottom: 1rem; }

.rc-val-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.val-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #e0e7ff;
    min-width: 80px;
}
.val-unit span {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e40af;
    line-height: 1;
}
.val-unit small {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    margin-top: 5px;
    font-weight: 600;
}

/* Diff Box */
.diff-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}
.diff-label { font-size: 0.75rem; font-weight: 600; color: #64748b; text-transform: uppercase; }
.diff-val { display: block; font-size: 1.25rem; color: #0f172a; margin: 0.25rem 0; }
.diff-box p { margin: 0; font-size: 0.8rem; color: #64748b; }

/* Bar Chart */
.bar-chart-box {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    text-align: left;
}
.bar-chart-box h3 { font-size: 0.8rem; font-weight: 700; color: #475569; margin: 0 0 1rem 0; text-transform: uppercase; }

.chart-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 5px;
}
.c-label { font-size: 0.75rem; font-weight: 600; color: #64748b; }
.c-val-text { font-size: 0.85rem; font-weight: 700; color: #1e293b; }

.c-track { height: 10px; background: #f1f5f9; border-radius: 5px; overflow: hidden; margin-bottom: 0.8rem; }
.c-bar { height: 100%; transition: width 0.5s ease; border-radius: 5px; }
.b-glasses { background: #94a3b8; }
.b-contacts { background: #4f46e5; }

/* Info Panel */
.info-panel { background: #fff; }

.info-list ul { list-style: none; padding: 0; margin: 0; }
.info-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.7rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
}
.info-list li span { color: #64748b; }
.info-list li strong { color: #1e293b; }
.c-blue { color: #2563eb !important; }
.c-orange { color: #ea580c !important; }
.info-list .total-row { 
    border-top: 2px solid #e2e8f0; 
    border-bottom: none; 
    margin-top: 1rem; 
    padding-top: 1rem;
}

.formula-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
}
.fb-title { display: block; font-size: 0.8rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; margin-bottom: 1rem; }

.html-formula {
    display: inline-flex;
    align-items: center;
    font-family: inherit;
    font-style: italic;
    font-size: 1.1rem;
    color: #1e293b;
}
.html-formula .var { font-weight: bold; margin-right: 6px; }
.html-formula .fraction {
    display: inline-flex;
    flex-direction: column;
    text-align: center;
    margin: 0 5px;
}
.html-formula .numerator { border-bottom: 1px solid #334155; padding-bottom: 2px; margin-bottom: 2px; }
.html-formula .denominator { padding-top: 2px; }

.warning-box {
    display: flex;
    gap: 0.75rem;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 2rem;
}
.wb-icon {
    width: 20px;
    height: 20px;
    background: #f97316;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    flex-shrink: 0;
}
.warning-box p { margin: 0; font-size: 0.8rem; color: #9a3412; line-height: 1.4; }

/* MEDIA QUERY */
@media (max-width: 1024px) {
    .pro-calc-wrapper { width: 100%; margin: 20px auto; }
    .pro-dashboard-grid { grid-template-columns: 1fr; }
    .pro-panel { border-right: none; border-bottom: 1px solid #f1f5f9; }
    
    /* Inputlar için sığma sorunu çözümü */
    .sm-wrapper {
        min-width: 100%; /* Mobilde tam genişlik */
    }
}