/* Reset and base */
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  font-family: Arial, sans-serif;
  background: #121212;
  color: #e0e0e0;
}

body {
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 10px;
}

.calculator {
  background: #1e1e1e;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  max-width: 1000px;
  width: 100%;
  display: flex;
  height: 670px; /* reduced height */
  overflow: hidden;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 24px;
  overflow: hidden;
}

h1 {
  text-align: center;
  margin: 0 0 12px 0;
  font-size: 1.5rem;
  color: #00bcd4;
  flex-shrink: 0;
}

.start-bank-container {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 12px;
  max-width: 300px;
}

.start-bank-container label {
  font-size: 0.9rem;
  color: #ccc;
  white-space: nowrap;
}

#startBank {
  flex: 1;
  padding: 6px 8px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #444;
  background: #2a2a2a;
  color: #fff;
  text-align: left;
}

button#clearBtn {
  padding: 6px 12px;
  font-size: 1rem;
  border-radius: 6px;
  border: none;
  background: #00bcd4;
  color: white;
  cursor: pointer;
  transition: background 0.2s;
}
button#clearBtn:hover {
  background: #0097a7;
}

/* Grid of inputs */
form#money-form {
  flex: 1;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 16px;
}

h2 {
  grid-column: 1 / -1;
  margin: 12px 0 6px 0;
  font-size: 1.1rem;
  color: #ffca28;
  border-bottom: 1px solid #333;
  padding-bottom: 4px;
}

label {
  display: block;
  font-size: 0.85rem;
  color: #ccc;
  margin-bottom: 4px;
}

input[type="number"] {
  width: 100%;
  padding: 6px 8px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #444;
  background: #2a2a2a;
  color: #fff;
}

input[type="number"]:focus {
  outline: none;
  border-color: #00bcd4;
  box-shadow: 0 0 5px #00bcd4;
}

/* Totals fixed at bottom of main-content */
.totals {
  margin-top: 12px;
  font-size: 1.25rem;
  font-weight: bold;
  color: #4caf50;
  text-align: center;
  flex-shrink: 0;
}

.totals .deposit {
  color: #ff9800;
  margin-left: 16px;
}

/* Side panel fixed width */
.side-panel {
  width: 320px;
  background: #222;
  border-left: 2px solid #333;
  padding: 16px 24px;
  color: #ccc;
  border-radius: 0 12px 12px 0;
  display: flex;
  flex-direction: column;
}

.side-panel h3 {
  margin: 0 0 12px 0;
  font-size: 1.2rem;
  color: #00bcd4;
  flex-shrink: 0;
}

#breakdownList {
  flex-grow: 1;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
}

#breakdownList li {
  padding: 4px 0;
  border-bottom: 1px solid #333;
  font-size: 0.9rem;
}

/* Remove scrollbars if you want by forcing max height to fit */
#breakdownList::-webkit-scrollbar {
  width: 6px;
}
#breakdownList::-webkit-scrollbar-thumb {
  background-color: #444;
  border-radius: 3px;
}
