
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #f3f7f4;
  color: #172b25;
  font-family: Arial, sans-serif;
}

.app {
  max-width: 480px;
  margin: auto;
  padding: 25px 20px;
}

.header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.logo {
  background: #176b4d;
  color: white;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  font-size: 28px;
  font-weight: bold;
}

.header h1 {
  font-size: 25px;
}

.header p {
  font-size: 9px;
  color: #819087;
  letter-spacing: 1px;
}

.welcome span {
  color: #176b4d;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1px;
}

.welcome h2 {
  font-size: 34px;
  margin: 12px 0;
  line-height: 1.15;
}

.welcome p {
  color: #829088;
  font-size: 14px;
  margin-bottom: 25px;
}

.balance-card {
  background: linear-gradient(135deg, #102d23, #176b4d);
  padding: 25px;
  border-radius: 22px;
  color: white;
  box-shadow: 0 12px 25px #176b4d25;
}

.balance-card p {
  color: #c6dfd3;
  font-size: 13px;
}

.balance-card h2 {
  font-size: 34px;
  margin: 15px 0 25px;
}

.totals {
  display: flex;
  gap: 35px;
}

.totals span {
  display: block;
  color: #c6dfd3;
  font-size: 12px;
  margin-bottom: 7px;
}

.totals strong {
  font-size: 15px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0 35px;
}

.actions button {
  border: 0;
  padding: 16px 8px;
  border-radius: 13px;
  background: white;
  color: #176b4d;
  font-weight: bold;
  cursor: pointer;
}

.movements h3 {
  font-size: 19px;
  margin-bottom: 17px;
}

.empty {
  background: white;
  padding: 25px;
  text-align: center;
  border-radius: 15px;
  color: #849189;
  font-size: 13px;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: #0009;
  padding: 20px;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 25px;
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  position: relative;
}

.modal-content h2 {
  margin-bottom: 20px;
}

.close {
  position: absolute;
  right: 18px;
  top: 12px;
  border: 0;
  background: none;
  font-size: 27px;
}

form label {
  display: block;
  font-size: 13px;
  margin: 14px 0 7px;
}

form input, form select {
  width: 100%;
  padding: 13px;
  border: 1px solid #dce6df;
  border-radius: 10px;
  font-size: 14px;
}

.save {
  background: #176b4d;
  color: white;
  border: 0;
  width: 100%;
  padding: 15px;
  border-radius: 12px;
  margin-top: 22px;
  font-weight: bold;
}

[hidden] {
  display: none !important;
}

.auth-panel {
  max-width: 450px;
  margin: 35px auto;
}

.auth-panel label,
#transactionForm label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 600;
}

.auth-panel input,
#transactionForm input,
#transactionForm select {
  width: 100%;
  padding: 13px;
  border: 1px solid #dce5df;
  border-radius: 10px;
  font-size: 16px;
  box-sizing: border-box;
}

#authForm button,
#transactionForm button {
  width: 100%;
  margin-top: 18px;
}

.secondary {
  background: #e9f5ef;
  color: #08734f;
  margin-top: 12px;
}

.welcome-row,
.summary,
.transaction-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.balance-card {
  background: #0c8f65;
  color: white;
}

.summary {
  margin-top: 20px;
}

.summary div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.transaction-item {
  padding: 14px 0;
  border-bottom: 1px solid #e5eae7;
  flex-wrap: wrap;
}

.transaction-item div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.transaction-item small {
  color: #777;
}

.ingreso {
  color: #078650;
}

.gasto {
  color: #d44848;
}

.delete-button {
  background: #fcecec;
  color: #b42323;
  padding: 8px 12px;
  width: auto;
}
