.savings-card {
  border-radius: 16px;
  position: relative;
  margin-bottom: 20px;

  background-image: url("../img/wallet-bg.png");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.card-menu {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: var(--container-bg);
  border-radius: 12px;
  padding: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  margin: 10px;
  z-index: 2;
  position: relative;
  margin-top: -30px; /* ini akan geser naik dan overlap */
  border: 1px solid var(--table-border-color);
}

.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  padding: 5px;
}
.menu-item:hover {
  background: var(--infobox-info-bg);
}

.menu-item i {
  font-size: 24px;
  color: var(--btn-bg);
  /* margin-bottom: 2px; */
}

.menu-item span {
  font-size: 10px;
  color: var(--text-color);
}

/* styles.css */
.total-savings-card {
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1;
  padding: 10px 25px 40px 25px;
  border-radius: 20px;
  color: #fff;
  position: relative;

  /* background-image: url("../img/wallet-bg.png");
  background-size: cover;
  background-position: center;
  overflow: hidden; */
}

.total-savings-card-title {
  color: white;
  font-weight: 600;
  margin-bottom: 5px;
}

.total-savings-title {
  display: flex;
  flex-direction: row; /* default, bisa dihapus juga */
  align-items: center;
  /* gap: 5px; */
  color: white;
}

.total-savings-title p {
  color: white;
  white-space: nowrap;
  font-weight: 0px;
}

.toggle-amount-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: white;
  font-size: 14px;
  align-items: left;
  padding: 0;
  margin: 0;
  width: 25px;
  border-radius: 50px;
}

.toggle-amount-btn:hover {
  background: none;
  border: none;
}

.total-savings-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%; /* Changed from right to left for better control */
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 90%
  );
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-150%) translateY(-150%) rotate(45deg);
  }
  100% {
    transform: translateX(150%) translateY(150%) rotate(45deg);
  }
}

.total-savings-card h2 {
  font-size: 12px;
  margin: 0px;
  padding: 0px;
  color: white;
  position: relative;
  z-index: 1;
}

.total-amount {
  font-size: 20px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.payment-method-stats h3 {
  color: white;
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.4rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.payment-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

/* .payment-method-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-color);
} */

.payment-method-count {
  font-size: 12px;
  color: var(--text-color-desc);
}

.no-data-message {
  text-align: center;
  color: var(--text-color-desc);
  font-size: 12px;
  opacity: 0.8;
  padding: 20px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.payment-method-card {
  border-radius: 12px;
  /* box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); */
  padding: 8px;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--table-border-color);
}

.nabung-icon {
  height: 70px;
}

.card-body {
  margin-bottom: 10px;
  text-align: left;
  padding: 0px 10px;
}

.card-title {
  font-size: 10px;
  color: var(--text-color-desc);
}

.payment-method-amount {
  font-size: 16px;
  font-weight: 600;
  /* margin: 8px 0; */
  color: var(--text-color);
  /* padding-top: 5px; */
}

.card-footer {
  background-color: var(--infobox-info-bg);
  border-radius: 6px;
  padding: 5px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.payment-method-name {
  font-weight: 500;
  font-size: 12px;
  color: #333;
}

.card-footer .payment-logo {
  height: 20px;
  width: auto;
  max-width: 60px;
  object-fit: contain;
  margin: 0px;
  padding: 0px;
}

.savings-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
}

.savings-item {
  border-radius: 14px;
  padding: 10px;
  transition: transform 0.3s ease;
  border: 1px solid var(--table-border-color);
}

.category-meta {
  display: flex;
  align-items: center; /* align vertical */
  gap: 8px; /* jarak antar elemen */
}
.category-emoji {
  width: 30px;
  height: 30px;
  border-radius: 30%;
}

.savings-amount {
  font-size: 14px;
  font-weight: bold;
  color: #667eea;
}

.savings-method {
  background: var(--infobox-info-bg);
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10px;
  color: var(--text-color-desc);
  display: inline-block;
}

.savings-date {
  color: #999;
  font-size: 10px;
}

.savings-category {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.savings-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.savings-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* Rata kanan */
  text-align: right;
  gap: 2px;
}
.bottom-sheet.active {
  transform: translateY(0);
}

.bottom-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--container-bg);
  z-index: 10;
  padding: 12px 20px;
  border-bottom: 1px solid var(--table-border-color);
}

.title-bottom-sheet {
  margin: 0px;
}

.bottom-sheet-header h2 {
  color: #333;
  font-size: 14px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-sheet-content {
  padding: 20px;
}

.section {
  margin-bottom: 20px;
}

.section h3 {
  color: #333;
  margin-bottom: 20px;
  font-size: 1.3rem;
  border-bottom: 2px solid #667eea;
  padding-bottom: 10px;
}

.category-container {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.btn-add-category {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.stats-section .people-container {
  margin-bottom: 20px;
}

.btn-add-category:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 5px;
  border-radius: 14px;
  border: 1px solid transparent;
}

.category-item:hover {
  background: var(--infobox-info-bg);
}

.category-item.selected {
  color: white;
  border: 1px solid var(--btn-bg);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  background-color: rgba(112, 86, 236, 0.1); /* soft highlight */
}

.category-img {
  width: 50px;
  height: 50px;
  border-radius: 40%;
  margin-bottom: 8px;
}

.category-form {
  margin-top: 20px;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--table-border-color);
}

.category-form.hidden {
  display: none;
}

/* .form-group {
  margin-bottom: 20px;
} */

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-color);
  font-weight: 500;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.title-section {
  text-align: left;
  font-size: 14px;
  font-weight: 600;

  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  /* margin-top: 10px; */
}

/* Alert Styles */
.alert {
  padding: 5px 10px;
  margin-bottom: 20px;
  border-radius: 5px;
  font-weight: 500;
  font-size: 12px;
}

.alert-success {
  background: var(--achieved-bg);
  color: var(--achieved-color);
  border: 1px solid var(--achieved-border);
}

.alert-error {
  background: var(--expired-bg);
  color: var(--expired-color);
  border: 1px solid var(--expired-border);
}

/* Category */

.card-content {
  padding: 10px 10px 15px 10px;
  cursor: pointer;
  color: var(--container-bg);
}

.category-card {
  border-radius: 12px;
  margin-bottom: 15px;
  box-shadow: 0 0 0 1px var(--table-border-color);
}

.category-card:hover {
  transform: translateY(-2px) scale(1);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.category-cards {
  margin-bottom: 30px;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.category-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-icon {
  width: 30px;
  height: 30px;
  border-radius: 30%;
}

.category-details .category-name {
  font-weight: 600;
}

.category-details {
  text-align: left;
}

.category-name {
  color: var(--text-color);
  font-size: 12px;
}

.category-duration {
  color: var(--text-color-desc);
  font-size: 10px;
}

.category-amount {
  font-weight: bold;
  font-size: 16px;
  color: var(--text-color);
}

.category-percentage {
  background: #00bcd4;
  padding: 3px 5px;
  border-radius: 20px;
  font-size: 10px;
  color: white;
  display: inline-block;
}

.progress-container {
  width: 100%;
}

.progress-bar-wrapper {
  background: var(--input-bg);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(to right, #00bcd4, #4dd0e1);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.progress-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-color-desc);
}

/* Lihat Lainnya */
.savings-item.hidden {
  display: none;
}

.lihat-lainnya-button {
  background-color: transparent;
  color: var(--text-color-desc);
  border: none;
  cursor: pointer;
  font-size: 12px;
  padding-top: 20px;
}

.lihat-lainnya-button:hover {
  background-color: transparent;
  color: var(--text-color-desc);
  border: none;
  cursor: pointer;
  font-size: 12px;
}

/* DAILY SUGGESTION */
.daily-suggestion {
  padding: 6px 12px;
  border-radius: 0px 0px 12px 12px;
  font-size: 10px;
  /* font-weight: 500; */
  display: flex;
  align-items: center;
  gap: 2px;
}

.suggestion-achieved {
  background-color: var(--achieved-bg);
  color: var(--achieved-color);
  /* border: 1px solid var(--achieved-border); */
}

.suggestion-progress {
  background-color: var(--progress-bg);
  color: var(--progress-color);
  /* border: 1px solid var(--progress-border); */
}

.suggestion-expired {
  background-color: var(--expired-bg);
  color: var(--expired-color);
  /* border: 1px solid var(--expired-border); */
}

/* HIDE SOME ITEM WHEN EMPTY STATE */
.hidden {
  display: none;
}

.see-all-button {
  border: 1px solid var(--infobox-info-border-color);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: transparent;
  padding: 6px 10px;
  max-width: 90px;
  max-height: 30px;
}

.see-all-button:hover {
  background-color: var(--infobox-info-bg);
}
