body {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
  /* background: linear-gradient(to bottom right, #B6CEFA, #73B1E8, #4A94DA, #3372C4, #1750AC, #003366); */
  /* background: linear-gradient(
    to bottom,
    #5c7fae,
    #406c9e,
    #2c5990,
    #1f4073,
    #10294d,
    #001933
  ); */
  background: #0f172a;
  color: #fff;
}

h1 {
  text-align: center;
  margin-top: 20px;
}

.container {
  max-width: 1200px;
  margin: 30px auto;
  padding: 20px;
}

.card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  margin: 20px 0;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

button {
  background: #ffffff20;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
  transition: background 0.3s, transform 0.2s;
}

button:hover {
  background: #ffffff40;
  transform: scale(1.05);
}

input {
  padding: 12px;
  margin: 8px 0;
  width: 100%;
  max-width: 100%;
  border: none;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
}

#expenseList div,
#budgetList div {
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.2);
  padding: 10px;
  border-radius: 8px;
  animation: fadeSlide 0.5s forwards;
  opacity: 0;
}

.logout-btn {
  margin-top: 20px;
  width: 100%;
}

@keyframes fadeSlide {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 💙 Responsive fix */
@media (max-width: 600px) {
  .container {
    padding: 10px;
  }

  .card {
    padding: 15px;
  }

  input,
  button {
    font-size: 14px;
  }
}

/* Navbar */
.navbar {
  background: #1e293b;
  padding: 12px 20px;
  display: flex;
  justify-content: flex-start;
}
.nav-links a {
  margin-right: 20px;
  text-decoration: none;
  color: #e2e8f0;
  font-weight: 500;
}
.nav-links a.active {
  color: #38bdf8;
  border-bottom: 2px solid #38bdf8;
}


/* Logout Button */
.logout-btn {
  display: block;
  margin: 30px auto;
  padding: 12px 20px;
  background: #ef4444;
  border: none;
  color: white;
  font-size: 16px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.logout-btn:hover {
  background: #dc2626;
}
/* Savings Section Styles */
.card label {
  display: block;
  margin-top: 10px;
  font-weight: 500;
}

#savingsGoal {
  width: 100%;
  margin-top: 6px;
  margin-bottom: 12px;
  accent-color: #333;
}

#savedAmount {
  padding: 10px;
  width: 100%;
  border-radius: 8px;
  border: none;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.progress-bar-container {
  width: 100%;
  background-color: #ffffff30;
  border-radius: 10px;
  height: 20px;
  margin-top: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background-color: #fff;
  border-radius: 10px;
  transition: width 0.4s ease-in-out;
}

/* 
.chart-container {
  height: 400px;
  width: 100%;
  overflow-x: auto;
}

@media (max-width: 768px) {
  .chart-container {
    height: 300px;
  }
} */


/* Toast styles */
#toastContainer {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none; /* to allow clicks through if necessary */
}

.toast {
  pointer-events: auto;
  background: #27ae60;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  transform: translateY(-12px);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  min-width: 180px;
  max-width: 320px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* error variant */
.toast.toast-error {
  background: #c0392b;
}

/* info variant */
.toast.toast-info {
  background: #2d9cdb;
}


.summary-card {
    width: 92%;
    margin: 0 auto 20px;
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.summary-item {
    text-align: left;
}

.summary-label {
    font-size: 14px;
    color: #fff;
    opacity: 0.75;
}

.summary-value {
    margin-top: 3px;
    font-size: 22px;
    font-weight: bold;
    color: #fff;
}

.dropdown-section {
    margin-top: 15px;
    background: rgba(255,255,255,0.05);
    padding: 12px;
    border-radius: 10px;
}

.dropdown-section summary {
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.dropdown-content {
    margin-top: 10px;
}

.budget-item {
    background: rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}


/* =====================
   DUE MODAL
===================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal.open {
  display: flex;
}

.modal-content {
  width: 90%;
  max-width: 420px;
  animation: fadeSlide 0.4s ease forwards;
}

.modal-content h3 {
  margin-bottom: 12px;
  text-align: center;
}

/* Form layout */
#addDueForm label {
  display: block;
  margin-top: 12px;
  font-weight: 500;
}

#addDueForm input,
#addDueForm select {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border-radius: 8px;
  border: none;
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

#addDueForm input::placeholder {
  color: #cbd5f5;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.modal-actions button {
  width: 100%;
}
/* =====================
   DUES HEADER
===================== */
.dues-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dues-header button {
  width: auto;
  padding: 10px 18px;
}
/* =====================
   DUES OVERVIEW
===================== */
.dues-overview {
  display: flex;
  gap: 14px;
  margin: 16px 0;
}

.dues-card {
  flex: 1;
  padding: 14px;
  border-radius: 14px;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.08);
}

.dues-card p {
  font-size: 13px;
  opacity: 0.75;
}

.dues-card h3 {
  margin-top: 4px;
  font-size: 22px;
}

.dues-card.receive h3 {
  color: #4ade80;
}

.dues-card.owe h3 {
  color: #f87171;
}
/* =====================
   DUE LIST ITEMS
===================== */
#dues-list {
  margin-top: 12px;
}

.due-item {
  background: rgba(255, 255, 255, 0.08);
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: fadeSlide 0.4s ease forwards;
}

.due-item.completed {
  opacity: 0.6;
}

.due-item .info small {
  display: block;
  font-size: 12px;
  opacity: 0.75;
}

.due-item .actions {
  display: flex;
  gap: 8px;
}

.due-item button {
  padding: 8px 14px;
  font-size: 13px;
}
/* Type dropdown - dark theme */
#addDueForm select {
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  border: none;
  outline: none;
}

/* Lent option */
#addDueForm option[value="LENT"] {
  color: #22c55e; /* dark green */
}

/* Borrow option */
#addDueForm option[value="BORROW"] {
  color: #ef4444; /* dark red */
}

@media (max-width: 600px) {
  .dues-overview {
    flex-direction: column;
  }

  .modal-content {
    max-width: 95%;
  }
}
