/* Google Font (optional but recommended) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

/* ===== BODY ===== */
body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #2c6e8b, #133643, #2c5364);
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  transition: all 0.4s ease;
}

/* ===== CONTAINER ===== */
.container {
  width: 95%;
  max-width: 900px; /* bigger for desktop */
  margin: auto;
  padding: 25px;
  border-radius: 25px;
}

/* ===== TITLE ===== */
h2 {
  text-align: center;
  margin-bottom: 10px;
}

/* ===== TOP BAR ===== */
.top-bar {
  display: flex;
  justify-content: space-between;
}

/* ===== BALANCE CARD ===== */
.balance-card {
  background: linear-gradient(135deg, #00c6ff, #0072ff);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  margin: 15px 0;
  box-shadow: 0 0 30px rgba(0,198,255,0.6);
  animation: pulseGlow 2s infinite alternate;
}

.balance-card h1 {
  margin: 5px 0;
}

/* ===== INPUTS ===== */
input {
  width: 100%;
  padding: 10px;
  margin: 6px 0;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: white;
  transition: 0.2s;
}

input::placeholder {
  color: #ccc;
}

input:focus {
  outline: none;
  border: 1px solid #00c6ff;
  box-shadow: 0 0 10px #00c6ff;
  transform: scale(1.03);
}

/* ===== BUTTONS ===== */
button {
  width: 100%;
  padding: 10px;
  margin: 6px 0;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #ff7e5f, #feb47b);
  color: white;
  font-weight: bold;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: 0.3s;
}

button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 25px rgba(255,126,95,0.5);
}

/* Ripple Effect */
button span {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.6s linear;
  background: rgba(255,255,255,0.5);
}

/* ===== SEARCH ===== */
#search {
  margin-top: 10px;
}

/* ===== CHART ===== */
.chart-card {
  background: #000;
  border-radius: 20px;
  padding: 15px;
  margin-top: 10px;
  box-shadow: 0 0 25px #00ffcc;
}

/* ===== TABLE ===== */
table {
  width: 100%;
  margin-top: 10px;
  border-collapse: separate;
  border-spacing: 0 10px;
}

th {
  color: #e8cbcb;
  font-size: 14px;
}

tr {
  background: rgba(7, 7, 7, 0.08);
  border-radius: 12px;
  transition: 0.2s;
  animation: slideIn 0.4s ease;
}

tr:hover {
  transform: scale(1.02);
  background: rgba(22, 19, 19, 0.15);
}

td {
  padding: 12px;
  text-align: center;
}

.delete {
  color: rgb(114, 5, 5);
  cursor: pointer;
  font-size: 18px;
}

/* ===== DARK MODE ===== */
.dark {
  background: #121212;
  color: white;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes pulseGlow {
  from {
    box-shadow: 0 0 20px rgba(0,198,255,0.4);
  }
  to {
    box-shadow: 0 0 40px rgba(0,198,255,0.9);
  }
}
/* ================= MOBILE RESPONSIVE ================= */
@media (max-width: 600px) {

  body {
    padding: 10px;
  }

  .container {
    padding: 15px;
    border-radius: 15px;
  }

  h2 {
    font-size: 20px;
  }

  /* Inputs */
  input, button {
    font-size: 14px;
    padding: 12px;
  }

  /* Top bar buttons */
  .top-bar button {
    width: 48%;
    font-size: 14px;
  }

  /* Chart */
  .chart-card {
    padding: 10px;
  }

  /* Table → scrollable */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  th, td {
    font-size: 12px;
    padding: 8px;
  }

  /* Balance card */
  .balance-card h1 {
    font-size: 22px;
  }
}
input {
  font-size: 16px;
}
.form {
  display: grid;
  grid-template-columns: 1fr; /* always single column by default */
  gap: 12px;
}

.form button {
  grid-column: span 2;
}

@media (min-width: 900px) {
  .dashboard {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
  }
}
* {
  box-sizing: border-box;
}
@media (min-width: 900px) {
  .form {
    grid-template-columns: 1fr 1fr;
  }

  .form button {
    grid-column: span 2;
  }
}
input, button {
  width: 100%;
  max-width: 100%;
}
.form input {
  min-width: 0;
}
.form input, .form button {
  width: 100%;
}