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

body {
  min-height: 100vh;
  font-family: "Rubik", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding-top: 80px;
}

main {
  width: 100%;
  max-width: 600px;
  padding: 20px;
  border-radius: 10px;
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg,
      rgba(43, 32, 64, 0.95),
      rgba(31, 20, 54, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  z-index: 1000;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-color: rgba(28, 190, 102, 0.5);
}

.toast.error {
  border-color: rgba(242, 62, 87, 0.5);
}

.toast.delete {
  border-color: rgba(255, 150, 50, 0.5);
}

.toast-icon {
  font-size: 18px;
}

.toast-message {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1001;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: linear-gradient(135deg, rgb(55, 42, 82), rgb(43, 32, 64));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  max-width: 320px;
  width: 90%;
  transform: scale(0.9);
  transition: transform 0.2s ease;
}

.modal-overlay.show .modal {
  transform: scale(1);
}

.modal-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.modal h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.modal p {
  font-size: 14px;
  color: var(--other-color);
  margin-bottom: 20px;
}

.modal-buttons {
  display: flex;
  gap: 12px;
}

.modal-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-btn.cancel {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.modal-btn.cancel:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-btn.confirm {
  background: var(--red-btn);
  color: #fff;
}

.modal-btn.confirm:hover {
  opacity: 0.9;
}

.subHead {
  color: var(--other-color);
  margin-bottom: 30px;
}

.card {
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 1.4rem;
  box-shadow: var(--boxShadow);
  margin-bottom: 20px;
}

.incExpAddContainer {
  padding: 5px;
  display: flex;
}

.incExpAddContainer .btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
  background-color: transparent;
  color: white;
}

.expToggleActive {
  background-color: var(--red-btn) !important;
}

.incToggleActive {
  background-color: var(--green-btn) !important;
}

.formGroup {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, fit-content);
}

.formBtnContainer {
  grid-column: 1/3;
}

.formBtnContainer button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: var(--primary-btn);
  color: white;
}

.formBtnContainer button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.formBtnContainer button:active {
  transform: scale(0.98);
}

.formInp {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
  margin-right: 10px;
}

.formInp label {
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.formInp input,
.formInp select {
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  background-color: rgba(176, 168, 211, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  height: 100%;
  transition: border-color 0.2s ease;
}

.formInp input:focus,
.formInp select:focus {
  outline: none;
  border-color: var(--primary-btn);
}

.formInp input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.formInp select option {
  background-color: var(--card-bg);
  color: #fff;
}

.seeHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.seeHeadActions {
  display: flex;
  gap: 8px;
}

.filterContainer {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.filterBtn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filterBtn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.filterBtn.active {
  background: rgba(110, 73, 238, 0.2);
  border-color: rgba(110, 73, 238, 0.5);
  color: #fff;
}

.filter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.income-dot {
  background: var(--green-btn);
}

.expense-dot {
  background: var(--red-btn);
}

.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.8;
}

.empty-state h4 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #fff;
}

.empty-state p {
  font-size: 14px;
  color: var(--other-color);
}

.seeTransCardContainer {
  margin-top: 20px;
}

.seeTransCard {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.seeTransCard::-webkit-scrollbar {
  width: 6px;
}

.seeTransCard::-webkit-scrollbar-track {
  background: transparent;
}

.seeTransCard::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.scard {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-radius: 14px;
  position: relative;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scard:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.scardP1 {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.deleteBtn {
  cursor: pointer;
  background: rgba(242, 62, 87, 0.1);
  border: none;
  padding: 6px;
  border-radius: 8px;
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--red-btn);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deleteBtn:hover {
  background: rgba(242, 62, 87, 0.2);
  transform: scale(1.1);
}

.sCat {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}

.sdate {
  font-size: 12px;
  color: #b8b8c7;
}

.snote {
  font-size: 12px;
  color: #9a9ab0;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scardP2 {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-right: 30px;
}

.sAmt {
  font-size: 17px;
  font-weight: 700;
}

.sAmt.income {
  color: #2bd576;
}

.sAmt.expense {
  color: #ff5c5c;
}

.seeIncExp {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  width: fit-content;
  margin-left: auto;
  text-transform: capitalize;
  font-weight: 500;
}

.sincome {
  background: linear-gradient(135deg,
      rgba(46, 213, 115, 0.25),
      rgba(46, 213, 115, 0.15));
  border: 1px solid rgba(46, 213, 115, 0.4);
  color: #2bd576;
}

.sexpense {
  background: linear-gradient(135deg,
      rgba(255, 92, 92, 0.25),
      rgba(255, 92, 92, 0.15));
  border: 1px solid rgba(255, 92, 92, 0.4);
  color: #ff5c5c;
}

.expBtn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e8e8f0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.expBtn svg {
  width: 18px;
  height: 18px;
  fill: #e8e8f0;
  transition: transform 0.2s ease;
}

.expBtn:hover {
  background: linear-gradient(135deg,
      rgba(46, 213, 115, 0.25),
      rgba(46, 213, 115, 0.15));
  border-color: rgba(46, 213, 115, 0.4);
  color: #2bd576;
}

.expBtn:hover svg {
  fill: #2bd576;
  transform: translateY(-2px);
}

.expBtn:active {
  transform: scale(0.97);
}

@media (max-width: 480px) {
  .formGroup {
    display: block;
  }

  .seeHead h3 {
    font-size: 1rem;
  }

  .seeHead span {
    display: none;
  }

  .nav-header {
    flex-wrap: wrap;
  }

  .nav-link {
    padding: 8px 14px;
    font-size: 13px;
  }

  .filterContainer {
    flex-wrap: wrap;
  }

  .filterBtn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .scard {
    padding: 14px;
  }

  .snote {
    max-width: 120px;
  }

  .toast {
    left: 20px;
    right: 20px;
    top: auto;
    bottom: 20px;
  }
}