body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #fafbfc;
  color: #222;
}

.dashboard-header {
  max-width: 700px;
  margin: 0 auto 0 auto;
  background: #fff;
  border-bottom: 2px solid #e6e6e6;
  padding: 14px 0 4px 0;
  box-shadow: 0 2px 6px 0 #e9e9e9;
  text-align: center;
}

.dashboard-title {
  font-size: 2.0em;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 0.1em;
}

.dashboard-quote {
  font-size: 1.0em;
  font-style: italic;
  color: #5889b5;
  margin-bottom: 0.7em;
}

main#main-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 6px;
}

.card {
  background: #fff;
  border-radius: 8px;
  margin: 14px 0;
  box-shadow: 0 2px 8px 0 #f0f0f0;
  padding: 16px 14px 10px 14px;
}

.card h2 {
  font-size: 1.23em;
  margin: 0 0 8px 0;
}

ul {
  list-style: none;
  padding-left: 0;
  margin: 0 0 4px 0;
}

li {
  padding: 5px 0 3px 0;
  font-size: 1.03em;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #f1f1f1;
}

li:last-child {
  border-bottom: none;
}

/* Totals Row */
.totals-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}

.card.totals {
  padding: 10px 8px 10px 10px;
  text-align: center;
  min-width: 120px;
  max-width: 170px;
  flex: 1 1 150px;
  font-size: 1.06em;
}

#pie-chart-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  max-width: 80px;
  margin: 0 4px;
  padding: 0;
}

#pie-chart {
  display: block;
}

#income-amt, #bills-amt {
  font-size: 1.13em;
  font-weight: 700;
  margin-top: 6px;
}

.done {
  color: #aaa !important;
  text-decoration: line-through;
}

/* Buttons, Inputs, Forms */
button {
  background: #2979ff;
  color: #fff;
  border: none;
  padding: 5px 15px;
  border-radius: 6px;
  font-size: 1em;
  margin-left: 7px;
  cursor: pointer;
  font-weight: 500;
}

button:hover {
  background: #005ecc;
}

input, select, textarea {
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1em;
  padding: 4px 8px;
  margin-right: 7px;
  margin-bottom: 4px;
  margin-top: 4px;
  max-width: 220px;
}

input[type="checkbox"] {
  margin: 0 8px 0 0;
  min-width: 17px;
}

textarea {
  width: 97%;
  min-height: 58px;
  max-width: 96%;
}

.editable {
  background: #f9ffe5;
  cursor: pointer;
  border-radius: 4px;
  padding: 2px 6px;
}

.admin-x {
  color: #c00;
  font-size: 1.05em;
  margin-left: 10px;
  font-weight: bold;
  cursor: pointer;
}

.admin-x:hover {
  color: #800;
}

/* Chat section */
.chat-section ul {
  margin-top: 8px;
  margin-bottom: 8px;
}

.chat-section li {
  border: none;
  padding: 6px 0;
  margin-bottom: 2px;
  align-items: flex-start;
  flex-direction: column;
  background: #f6fafd;
  border-radius: 7px;
  box-shadow: 0 1px 3px #f2f2f2;
  margin-right: 2px;
  margin-left: 2px;
  position: relative;
  min-height: 32px;
}

.chat-section li b {
  color: #2979ff;
  margin-right: 7px;
}

#chat-add-box {
  display: flex;
  align-items: center;
  margin-top: 6px;
  margin-bottom: 0;
}
#chat-add-box input {
  flex: 1 1 auto;
  min-width: 0;
}

/* Outback Payoff tracker */
.outback-payoff-section {
  background: #f9f5ec;
}

.progressbar-outer {
  width: 100%;
  background: #eee;
  border-radius: 6px;
  height: 23px;
  margin-bottom: 8px;
  margin-top: 0;
  overflow: hidden;
  position: relative;
  box-shadow: 0 1px 3px #ececec;
}
.progressbar-inner {
  height: 100%;
  background: linear-gradient(90deg,#42e382,#2979ff 90%);
  color: #fff;
  font-weight: bold;
  text-align: right;
  font-size: 1em;
  border-radius: 6px 0 0 6px;
  line-height: 23px;
  padding-right: 7px;
  min-width: 24px;
  transition: width 0.35s cubic-bezier(.4,1.4,.7,1.2);
  box-shadow: 0 1px 3px #c6e7d5;
}

.outback-payoff-section ul {
  margin-top: 6px;
  margin-bottom: 6px;
}

.outback-payoff-section li {
  background: #fff;
  border-radius: 6px;
  border: 1px solid #eee;
  margin: 4px 0;
  padding: 6px 8px 6px 6px;
  font-size: 1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Responsive */
@media (max-width: 680px) {
  main#main-content, .dashboard-header {
    max-width: 99vw;
    padding-left: 0;
    padding-right: 0;
  }
  .totals-row {
    flex-direction: column;
    gap: 0;
  }
  .card.totals {
    max-width: 97vw;
    min-width: 90vw;
    margin-bottom: 7px;
  }
  #pie-chart-container {
    margin: 8px 0 8px 0;
  }
}


/* limit chat box to latest 5 msgs and scroll */
.chat-section ul {
  max-height: 240px;       /* ~5 × approximate message height */
  overflow-y: auto;
}

/* limit Chris-actions box to 8 items and scroll */
.chris-actions-section ul {
  max-height: 224px;       /* ~8 × approximate item height */
  overflow-y: auto;
}
