.container {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 20px;
padding: 20px;
max-width: 1200px;
margin: auto;
}

.calculator, .chart-container {
background: #fff;
padding: 20px;
border-radius: 15px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
flex: 1;
min-width: 320px;
max-width: 600px;
}

.toggle-title {
color: #007bff;
}

.input-group {
margin-bottom: 15px;
}

label {
font-weight: 600;
display: block;
margin-bottom: 5px;
}

input {
width: 100%;
padding: 10px 12px;
border: 1px solid #ccc;
border-radius: 8px;
font-size: 1rem;
}

button {
margin-top: 20px;
width: 100%;
padding: 14px;
font-size: 1rem;
font-weight: bold;
border: none;
border-radius: 8px;
background-color: #28a745;
color: white;
transition: background 0.3s ease;
cursor: pointer;
}

button\:hover {
background-color: #218838;
}

.results {
margin-top: 20px;
font-size: 1.1rem;
}

.results p {
background: #e9f7ef;
padding: 10px 15px;
margin: 10px 0;
border-left: 4px solid #28a745;
border-radius: 5px;
display: flex;
justify-content: space-between;
}

.accordion .toggle-title {
cursor: pointer;
background: #ffffff;
border: 1px solid #dce7f1;
padding: 16px 20px;
margin-top: 16px;
border-radius: 12px;
box-shadow: 0 4px 8px rgba(0, 123, 255, 0.05);
display: flex;
justify-content: space-between;
align-items: center;
font-size: 1.05rem;
font-weight: 600;
color: #007bff;
transition: all 0.3s ease;
}

.accordion .toggle-title\:hover {
background-color: #f0f8ff;
box-shadow: 0 6px 14px rgba(0, 123, 255, 0.1);
}

.accordion-content {
display: none;
  transition: all 0.3s ease;
overflow: hidden;
}

.accordion-header.active + .accordion-content {
display: block;
}

.toggle-title {
cursor: pointer;
display: flex;
justify-content: space-between;
background: #eee;
padding: 10px;
border-radius: 5px;
margin-top: 10px;
}

.toggle-icon {
font-size: 20px;
color: #007bff;
transition: transform 0.3s ease;
font-weight: bold;
}

.toggle-title.open .toggle-icon {
transform: rotate(45deg);
}

.toggle-content {
display: none;
padding: 18px 20px 10px 20px;
background: #f9fbfc;
border: 1px solid #e0e8f0;
border-radius: 12px 12px 12px 12px;
margin-bottom: 10px;
margin-top: 10px;
animation: smoothDrop 0.3s ease-in-out;
}

.toggle-content.active {
display: block;
}

@keyframes smoothDrop {
from {
opacity: 0;
transform: translateY(-6px);
}
to {
opacity: 1;
transform: translateY(0);
}
}

.chart-container canvas {
max-width: 100%;
height: auto;
}

@media (max-width: 768px) {
.container {
flex-direction: column;
padding: 15px;
}

.calculator, .chart-container {
width: 100%;
}
}

.chart-container ul {
padding-left: 20px;
list-style-type: disc;
color: #333;
margin-top: 10px;
}
.chart-container h3 {
font-family: Roboto;
font-size: 20px;
font-weight: 600;
margin-top: 30px;
}

.breakdown {
margin-top: 30px;
}

.breakdown h3 {
font-size: 1.2rem;
margin-bottom: 5px;
}

.breakdown p\:first-of-type {
font-style: italic;
margin-bottom: 15px;
color: #666;
}

.description {
font-size: 0.9rem;
color: #555;
margin-top: -10px;
margin-bottom: 10px;
}

.warning {
color: red;
font-weight: bold;
}

.percentage {
font-size: 0.95rem;
color: #333;
margin-bottom: 10px;
}

.summary-report p {
background-color: #fdf5e6;
padding: 10px;
border-left: 4px solid #ffc107;
margin-top: 10px;
border-radius: 6px;
}

.summary-list li {
padding: 6px 0;
font-weight: 500;
}
.over-budget { color: red; }
.under-budget { color: green; }
.on-budget { color: goldenrod; }

.summary-table {
width: 100%;
border-collapse: collapse;
margin-top: 1rem;
}
.summary-table th,
.summary-table td {
border: 1px solid #ccc;
padding: 0.5rem;
text-align: center;
}
.over-budget {
color: #dc2626;
font-weight: bold;
}
.under-budget {
color: #16a34a;
font-weight: bold;
}
.on-budget {
color: #2563eb;
font-weight: bold;
}

.summary-table {
width: 100%;
margin-top: 20px;
border-collapse: collapse;
box-shadow: 0 0 10px rgba(0,0,0,0.05);
border-radius: 12px;
overflow: hidden;
}

.summary-table thead {
background-color: #2563eb;
color: #fff;
}

.summary-table th, .summary-table td {
padding: 0.70rem;
text-align: center;
font-size: 0.95rem;
}

.summary-table tbody tr\:nth-child(even) {
background-color: #f9f9f9;
}

.summary-table tbody tr\:hover {
background-color: #f0f4ff;
}

.summary-table td span {
display: inline-block;
padding: 0.25rem 0.5rem;
border-radius: 4px;
font-size: 0.85rem;
font-weight: 600;
}

.over-budget {
color: #dc2626;
background-color: #fee2e2;
}

.under-budget {
color: #16a34a;
background-color: #dcfce7;
}

.on-budget {
color: #2563eb;
background-color: #dbeafe;
}

\#summaryChart {
max-width: 100%;
margin-top: 30px;
}

.status-over {
  background-color: #f8d7da; /* light red */
  color: #721c24;
  font-weight: bold;
}

.status-within {
  background-color: #d4edda; /* light green */
  color: #155724;
  font-weight: bold;
}

.status-over {
  background-color: #ffcccc !important;
}

.status-within {
  background-color: #ccffcc !important;
}

.over-budget-row td {
  background-color: #f8d7da;
  color: #721c24;
}

.under-budget-row td {
  background-color: #d4edda;
  color: #155724;
}

