body {
  font-family: Arial;
  margin: 0;
  background: #f8fafc;
}

.page {
  padding: 20px 30px;
}

.hero {
  margin-bottom: 20px;
}

.workspace {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}

.panel {
  background: #ffffff;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.sidebar {
  height: fit-content;
}

.input-list label,
.scenario-panel label {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
  font-size: 13px;
}

.input-list input,
.input-list select,
.scenario-panel input,
.scenario-panel select {
  margin-top: 4px;
  padding: 6px;
  font-size: 14px;
}

.input-error {
  border: 1px solid #dc2626 !important;
  background: #fff7f7;
}

.field-error {
  color: #b91c1c;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.soft-warnings {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 8px;
  border-radius: 6px;
  font-size: 12px;
  margin-top: 10px;
}

.soft-warnings div + div {
  margin-top: 4px;
}

.scenario-panel {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}

.scenario-panel h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
}

.scenario-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.scenario-actions button {
  flex: 1;
}

.actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

.main-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 420px;
}

#projectionChart {
  display: block;
}

.table-wrap {
  overflow: auto;
  max-height: 420px;
  scrollbar-gutter: stable;
  padding-right: 12px;
  box-sizing: border-box;
}

#projectionTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

#projectionTable th:nth-child(1),
#projectionTable th:nth-child(2) {
  text-align: center;
}

#projectionTable th:nth-child(n+3) {
  text-align: right;
}

#projectionTable th {
  padding: 6px 8px;
  border-bottom: 2px solid #ddd;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 3;
}

#projectionTable td {
  padding: 4px 8px;
}

#projectionTable td.text-center {
  text-align: center;
}

#projectionTable td.money {
  text-align: right;
}

#projectionTable td.money.negative {
  color: #dc2626;
}

#projectionTable td.money.positive-withdrawal {
  color: #dc2626;
}

#projectionTable td.money.negative-withdrawal {
  color: #16a34a;
}

#projectionTable tr:nth-child(even) {
  background: #f9fafb;
}

#projectionTable tr.retirement-row {
  background: #e0f2fe;
  font-weight: 600;
}

#projectionTable td:nth-child(1),
#projectionTable th:nth-child(1) {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 2;
}

#projectionTable td:nth-child(2),
#projectionTable th:nth-child(2) {
  position: sticky;
  left: 60px;
  background: #fff;
  z-index: 2;
}

#projectionTable th:nth-child(1),
#projectionTable th:nth-child(2) {
  z-index: 4;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

h1 {
  color: #333;
}

h2 {
  margin-bottom: 10px;
}

.message {
  margin-bottom: 10px;
  line-height: 1.4;
}

.message.subtle {
  color: #555;
}
