body {
  background: #aca59b;
  color: #37352f;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  margin: 0;
  padding: 0;
}
.container { max-width: 760px; margin: auto; padding: 0 2vw; }
h1, h2 { font-size: 2rem; word-break: break-word; color: #37352f;}
.dashboard {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
  background-color: #f4ead8;
  padding: 1rem;
  border-radius: 12px;
}
.dashbox {
  background: #fff9f5;
  padding: 1.2rem 0.65rem;
  border-radius: 12px;
  flex: 1;
  text-align: center;
  min-width: 120px;
  margin-bottom:0;
  font-size: 1.05rem;
  box-shadow: 0 1px 6px rgba(160,160,153,0.09);
}
.dashbox h2 {
  color: #BC5215;
  font-size: 2rem;
  margin: 0;
  font-weight: 700;
}
.dashbox span {
  display: block;
  margin-top: 0.5rem;
  color: #a49e8e;
  font-size: 1rem;
  font-weight: 400;
}
.section { margin-top: 2rem; }
.task {
  background: #fff9f5;
  margin-bottom: 1rem;
  border-radius: 10px;
  padding: 1.1rem 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #fff9f5;
  flex-wrap: wrap;
  font-size: 1.05rem;
  word-break: break-word;
  box-shadow: 0 1px 10px rgba(180,161,146,0.03);
}
.task > div:first-child {
  min-width: 0;
  word-break: break-word;
  flex:2 2 160px;
}
.task > div:last-child {
  font-size: 1.35rem;
  padding-left:1rem;
  color: #BC5215;
  font-weight: bold;
}
.label {
  background: #205EA6;
  color: #fff9f5;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  margin-right: 0.5rem;
  font-weight: bold;
}
.filter {
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1vw 0.3rem;
  align-items: center;
  font-size: 1.05rem;
}
.filter button {
  background: #24837B;
  color: #f9f4ef;
  border: none;
  border-radius: 6px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  margin-right: 0.4rem;
  flex: 0 0 auto;
  font-size: 1.05rem;
}
.filter button.active { background: #AF3029; color: #fff9f5; }
.spendbox {
  background: #f4ead8;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 2rem;
  box-shadow:0 1px 8px rgba(160,140,110,0.02);
}
form.spendform {
  background: #fff9f5;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 0.5rem;
}
.spend-list {
  margin-top: 1rem;
  margin-bottom: 1rem;
  background: #fff9f5;
  padding: 1rem;
  border-radius: 12px;
}
.spend-btn {
  background: #AD8301;
  color: #fff9f5;
  border: none;
  border-radius: 6px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.05rem;
}
.remove-btn, .history-x-btn {
  background: transparent;
  color: #AF3029;
  border: none;
  border-radius: 4px;
  font-size: 1.3rem;
  font-weight: bold;
  cursor: pointer;
  vertical-align: middle;
  padding: 1px 6px;
}
.zero-btn {
  background: #AF3029;
  color: #fff9f5;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.05rem;
  width: 100%;
  margin-bottom: 1rem;
}
.bottom-controls {
  margin: 3rem 0 2rem 0;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.bottom-row {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: nowrap;
  width: 100%;
  margin-bottom: 1rem;
}
.save-btn, .restore-btn {
  display: block;
  width: 50%;
  white-space: nowrap;
  margin-bottom: 0;
  font-size: 1.05rem;
  padding: 0.55rem 0.5rem;
  font-weight: bold;
  font-size: 1.05rem;
  box-sizing: border-box;
  outline: none;
  border: none;
  box-shadow: none;
  border-radius: 6px;
}
.save-btn { background: #205EA6; color:#fff9f5; }
.restore-btn { background: #66800B; color:#fff9f5; text-align:center; }
.save-btn:focus,
.save-btn:active,
.restore-btn:focus,
.restore-btn:active {
  outline: none;
  box-shadow: none;
  border: none;
}
#restoreDataInput {
  display:none;
}
.history { 
  background-color: #fff9f5;
  padding: 1rem;
  border-radius: 12px;
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-size: 1rem;
}
.history-table, .spend-table {
  width:100%;
  border-collapse:collapse;
  margin-top:0.75rem;
}
.history-table th, .history-table td,
.spend-table th, .spend-table td {
  text-align:left;
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid #f4ead8;
}
.spend-table td:last-child {
  text-align: right;
}
.history-table th, .spend-table th { font-weight:600; background:#f4ead8; color:#37352f;}
.history-table tr:last-child td,
.spend-table tr:last-child td { border-bottom:none;}
#paginationControls {
  text-align:center;
  margin-top:1rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  font-size: 1.06rem;
}
.spend-options {
    margin-top: 1.25rem;
}
#paginationControls button {
  background: #5F3D99;
  color: #f9f4ef;
  border:none;
  border-radius: 6px;
  padding: 5px 14px;
  margin: 4px 4px;
  font-size: 1.01rem;
}
input, select, textarea {
  font-size: 1.07rem;
  border-radius: 6px;
  border: none;
  margin-bottom: 8px;
  box-sizing: border-box;
  background: #f9f4ef;
  color: #37352f;
  border:1px solid #f4ead8;
  outline:none;
}
input[type="text"], input[type="number"] {
  padding: 0.54rem;
  margin-bottom: 0.6rem;
  width: 98%;
  box-sizing: border-box;
  display:inline-block;
  margin-right:4px;
}
input[type="file"] {
  display:none;
}
input[type="text"]:focus, input[type="number"]:focus {
  border-color: #24837B;
  background:#fff9f5;
}
@media (max-width:600px) {
  .bottom-row {
    flex-direction: row;
    gap: 0.5rem;
  }
  .save-btn, .restore-btn {
    width: 50%;
  }
  .dashboard { flex-direction: column; gap:0.2rem;}
  .dashbox {
    min-width: 0;
    width:99%;
    padding: 0.65rem 0.25rem;
    margin-bottom:0.6rem;
    font-size: 1rem;
  }
  .dashbox h2 { font-size: 2rem; }
  .dashbox span { font-size: 0.98rem; }
  .spendbox, .section { padding-left:0.1rem; padding-right:0.1rem;}
  form#addSpendForm input, form#addSpendForm button {
    width:99%; margin-bottom:9px; display:block;
  }
  .task { flex-direction: row; align-items: flex-start; padding:1rem 0.55rem;}
  .task > div:last-child { padding-left:0; margin-top:8px;}
  #paginationControls { flex-direction: column; gap:2px; }
  h1, h2 { font-size: 1.2rem; }
  .history-table th, .history-table td,
  .spend-table th, .spend-table td { padding: 0.35rem 0.3rem;}
  .spend-table td:last-child { text-align: right; }
}
::selection { background:#BC5215; color:#fff9f5;}

.tasks-section {
  background: #f4ead8;
  border-radius: 16px;
  padding: 2rem 1.2rem;
  box-shadow: 0 2px 12px rgba(44,39,32,0.04);
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}
@media (max-width:600px) {
  .tasks-section {
    padding: 1.1rem 0.5rem;
    margin-top: 1.1rem;
    margin-bottom: 1.1rem;
  }
}

.addpointsbox {
  background: #fff9f5;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 2rem;
  box-shadow: 0 1px 8px rgba(160,140,110,0.03);
}

.addpoints-btn {
  background: #66800B;
  color: #fff9f5;
  border: none;
  border-radius: 6px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.05rem;
  margin-top: 0.1rem;
}
