@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

/* ========== RESET ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

/* ========== BODY ========== */
body {
  min-height: 100vh;
  background: linear-gradient(135deg, #dfe6e9, #c8d6e5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ========== CONTAINER ========== */
.container {
  width: 900px;
  background-color: #ffffff;
  border-radius: 12px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* ========== LEDGER ========== */
.ledger {
  flex: 1;
  background: linear-gradient(180deg, #2f3542, #1e272e);
  padding: 30px;
  color: #ffffff;
}

.ledger h2 {
  color: #feca57;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.ledger h4 {
  font-weight: 400;
  opacity: 0.9;
}

.ledger h1 {
  font-size: 34px;
  margin: 10px 0 20px;
}

/* ========== INCOME / EXPENSE ========== */
.inc-exp-container {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

.inc-exp-container div {
  flex: 1;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.08);
}

.inc-exp-container h4 {
  font-size: 14px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.inc-exp-container p {
  font-size: 22px;
  font-weight: 600;
}

.inc {
  color: #1dd1a1;
}

.exp {
  color: #ee5253;
}

/* ========== FORM ========== */
#form {
  margin-top: 10px;
}

.form-control {
  margin-bottom: 15px;
}

label {
  font-size: 14px;
  margin-bottom: 5px;
  display: block;
  opacity: 0.9;
}

input {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  border: none;
  outline: none;
  font-size: 14px;
}

input:focus {
  outline: 2px solid #2e86de;
}

/* ========== BUTTON ========== */
.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #2e86de, #1e6fd9);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(46, 134, 222, 0.4);
}

/* ========== TRANSACTION SECTION ========== */
.transaction {
  flex: 1;
  padding: 30px;
  background-color: #f8f9fa;
  display: none;
  flex-direction: column;
}

.transaction h3 {
  text-transform: uppercase;
  font-size: 16px;
  letter-spacing: 1px;
  margin-bottom: 20px;
  color: #2f3542;
}

/* ========== TRANSACTION LIST ========== */
.trans {
  list-style: none;
}

.trans li {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 15px 18px;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
  transition: 0.3s ease;
}

.trans li:hover {
  transform: translateY(-2px);
}

.trans li.inc {
  border-left: 5px solid #1dd1a1;
}

.trans li.exp {
  border-left: 5px solid #ee5253;
}

/* ========== DELETE BUTTON ========== */
.btn-del {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background-color: #ee5253;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  transition: 0.2s ease;
}

.trans li:hover .btn-del {
  opacity: 1;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .container {
    flex-direction: column;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .ledger h1 {
    font-size: 26px;
  }

  .inc-exp-container {
    flex-direction: column;
  }

  .btn-del {
    opacity: 1;
  }
}
