body {
    font-family: Arial, sans-serif;
    margin: 30px;
    background: #f7f7f7;
    color: #333;
}

h1, h2, h3 {
    margin-top: 0;
}

.container {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
    align-items: start;
}

.box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

.chart-box {
    margin-top: 24px;
}

.section {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    border-bottom: 1px solid #eee;
    padding: 8px;
    text-align: left;
    vertical-align: middle;
}

th {
    background: #fafafa;
    font-size: 14px;
}

td input {
    margin-top: 0;
}

.btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    margin-right: 8px;
}

.btn-add {
    background: #222;
    color: white;
}

.btn-remove {
    background: #c62828;
    color: white;
    width: auto;
    padding: 6px 10px;
    margin-top: 0;
}

.result {
    font-size: 16px;
    margin: 10px 0;
    padding: 10px 12px;
    background: #fafafa;
    border-radius: 6px;
}

.muted {
    color: #666;
    font-size: 13px;
}

.profit-positive {
    color: #0a7a22;
    font-weight: bold;
}

.profit-negative {
    color: #b42318;
    font-weight: bold;
}

@media (max-width: 950px) {
    .container {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    table {
        display: block;
        overflow-x: auto;
    }
}

.chart-box {
    margin-top: 24px;
}

.chart-header {
    margin-bottom: 12px;
}

.chart-wrap {
    position: relative;
    width: 600px;
    height: 400px;
    max-width: 100%;
    margin: 0 auto;
}

.chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}