*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  font-size: 62.5%;
  font-family: "Geist";
}
body {
  background: white;
  color: black;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}
.navbar {
  height: 8.8rem;
  padding: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: white;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

#expense-tracker {
  font-size: 3rem;
  color: rgb(88, 88, 251);
}
#manage-finance {
  font-size: 1.4rem;
  color: rgb(99, 98, 98);
}
.navright-part {
  background-color: rgb(249, 245, 245);
  height: 4rem;
  width: 4rem;
  border-radius: 0.5rem;
  padding: 0.8rem;
}

.navright-part i {
  height: 2.4rem;
  width: 2.4rem;
  font-size: 2rem;
  cursor: pointer;
}

/* dark-mode-feature */

body.dark-mode {
  background: rgb(2, 6, 23);
  color: #f9fafb;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

body.dark-mode .navbar {
  background-color: #0f2e43;
}
body.dark-mode .navbar #expense-tracker {
  background: linear-gradient(to right, rgb(140, 140, 249), cyan);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.dark-mode #manage-finance {
  color: rgb(199, 197, 197);
}

body.dark-mode .navright-part {
  background-color: #355267;
}

body.dark-mode main {
  background-color: #001328;
}

body.dark-mode .total-balance {
  background-color: #0f2e43;
  border: transparent;
}

body.dark-mode .balance-wallet span {
  color: rgb(203, 203, 203);
}

body.dark-mode #balance-amount {
  color: rgb(84, 146, 239);
}

body.dark-mode .total-income {
  background-color: #0f2e43;
  border: transparent;
}

body.dark-mode .income-wallet span {
  color: rgb(203, 203, 203);
}
body.dark-mode #income-amount {
  color: rgb(90, 199, 85);
}

body.dark-mode .total-expense {
  background-color: #0f2e43;
  border: transparent;
}

body.dark-mode .expense-wallet span {
  color: rgb(203, 203, 203);
}
body.dark-mode #expense-amount {
  color: rgb(246, 99, 99);
}
body.dark-mode .left-part {
  background-color: #0f2e43;
  border: transparent;
}

body.dark-mode .left-part h2 {
  color: rgb(234, 233, 233);
}
body.dark-mode #income-btn {
  background-color: #2b4a5f;
  color: rgb(190, 190, 190);
}

body.dark-mode #expense-btn {
  background-color: rgb(254, 43, 43);
}

body.dark-mode .amount p {
  color: rgb(190, 190, 190);
}

body.dark-mode .amount input {
  background-color: #2b4a5f;
  border: transparent;
}

body.dark-mode .category p {
  color: rgb(190, 190, 190);
}

body.dark-mode .category input {
  background-color: #2b4a5f;
  border: transparent;
}

body.dark-mode .description p {
  color: rgb(190, 190, 190);
}

body.dark-mode .description input {
  background-color: #2b4a5f;
  border: transparent;
}

body.dark-mode .date p {
  color: rgb(190, 190, 190);
}

body.dark-mode .date input {
  background-color: #2b4a5f;
  border: transparent;
}

body.dark-mode .first-right-section {
  background-color: #0f2e43;
  border: transparent;
}
body.dark-mode .barchart h2 {
  color: rgb(234, 233, 233);
}

body.dark-mode .second-right-section {
  background-color: #0f2e43;
  border: transparent;
}

body.dark-mode .filters h3 {
  color: rgb(234, 233, 233);
}

body.dark-mode .start-date p {
  color: rgb(217, 214, 214);
}

body.dark-mode .start-date input {
  background-color: #2b4a5f;
  border: transparent;
}

body.dark-mode .end-date p {
  color: rgb(217, 214, 214);
}
body.dark-mode .end-date input {
  background-color: #2b4a5f;
  border: transparent;
}

body.dark-mode .reset-btn button {
  background-color: #2b4a5f;
  border: transparent;
  color: rgb(239, 238, 238);
}

body.dark-mode .third-right-section {
  background-color: #0f2e43;
  border: transparent;
  color: rgb(239, 238, 238);
}
/* main-section */
main {
  padding: 12rem 1.6rem 3.2rem 1.6rem;
  background-color: whitesmoke;
}
.first-section {
  height: 14.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
}

.total-balance {
  border: 1px solid rgb(231, 231, 231);
  border-radius: 2rem;
  padding: 2.4rem;
  background-color: #ffffff;
}

.total-balance:hover {
  box-shadow: 0 4px 12px rgba(32, 33, 36, 0.35);
  transition: 0.2s ease-in;
}
.balance-wallet {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 1.6rem;

  font-size: 1.4rem;
}

.balance-wallet span {
  font-size: 1.4rem;
  font-weight: 500;
  color: rgb(94, 93, 93);
}
.wallet-icon {
  border-radius: 0.5rem;
  background-color: rgb(138, 138, 248);
  height: 4.4rem;
  width: 4.4rem;
  font-size: medium;
  padding: 1.2rem;
}
.wallet-icon i {
  font-size: 1.8rem;
}
#balance-amount {
  font-size: 3rem;
  color: rgb(94, 94, 227);
}

.total-income {
  border: 1px solid rgb(231, 231, 231);
  border-radius: 2rem;
  padding: 2.4rem;
  margin: 0, 0, 1.6rem;
  background-color: #ffffff;
}
.total-income:hover {
  box-shadow: 0 4px 12px rgba(32, 33, 36, 0.35);
  transition: 0.2s ease-in;
}
.right-arrow {
  border-radius: 0.5rem;
  background-color: rgb(61, 202, 61);
  height: 4.4rem;
  width: 4.4rem;
  font-size: medium;
  padding: 1.2rem;
}
.income-wallet {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 1.6rem;
  font-size: 1.4rem;
}

.income-wallet span {
  font-size: 1.4rem;
  color: rgb(94, 93, 93);
  font-weight: 500;
}

#income-amount {
  color: rgb(17, 175, 17);
  font-size: 3rem;
}

.total-expense {
  border: 1px solid rgb(231, 231, 231);
  border-radius: 2rem;
  padding: 2.4rem;
  margin: 0, 0, 1.6rem;
  background-color: #ffffff;
}

.total-expense:hover {
  box-shadow: 0 4px 12px rgba(32, 33, 36, 0.35);
  transition: 0.2s ease-in;
}
.left-arrow {
  border-radius: 0.5rem;
  background-color: rgb(248, 65, 65);
  height: 4.4rem;
  width: 4.4rem;
  font-size: medium;
  padding: 1.2rem;
}
.expense-wallet {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 1.6rem;
  font-size: 1.4rem;
}

.expense-wallet span {
  font-size: 1.4rem;
  color: rgb(94, 93, 93);
  font-weight: 500;
}

#expense-amount {
  color: rgb(195, 6, 6);
  font-size: 3rem;
}

/* second-section */
.second-section {
  margin: 3.2rem 0 0;
  display: flex;
  gap: 3rem;
  width: 100%;
}

.left-part {
  position: sticky;
  top: 10rem;
  background-color: #ffffff;
  border: 1px solid rgb(232, 230, 230);
  border-radius: 1rem;
  padding: 2.4rem;
  width: 30%;
  height: fit-content;
}
.left-part h2 {
  font-size: 2rem;
  margin: 0 0 2.4rem;
  color: rgb(22, 22, 22);
}
.buttons {
  display: flex;
  gap: 1.5rem;
  margin: 0 0 1.6rem;
  width: 100%;
}

#income-btn {
  background-color: rgb(210, 208, 208);
  padding: 0.8rem 0.12rem;
  font-size: 1.6rem;
  color: rgb(68, 67, 67);
  border: 1px solid transparent;
  border-radius: 0.5rem;
  width: 50%;
  font-weight: 500;
  cursor: pointer;
}

#expense-btn {
  background-color: #f53f3f;
  padding: 0.8rem 0.12rem;
  font-size: 1.6rem;
  color: rgb(68, 67, 67);
  border: 1px solid transparent;
  border-radius: 0.5rem;
  width: 50%;
  color: #ffffff;
  font-weight: 500;
  cursor: pointer;
}

.amount {
  margin: 0 0 1.6rem;
}

.amount p {
  font-size: 1.5rem;
  margin: 0 0 0.8rem;
  color: rgb(42, 41, 41);
  font-weight: 600;
}
.amount input {
  width: 100%;
  padding: 10px 35px 12px 14px;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
  color: #111827;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.amount input:hover {
  border-color: #cbd5e1;
  background-color: #f3f4f6;
}
.amount input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background-color: #ffffff;
}
.amount {
  position: relative;
}

body.dark-mode .amount input {
  background-color: #1f2937;
  border: 1px solid #374151;
  color: #f9fafb;
}

body.dark-mode .amount input:hover {
  background-color: #273549;
}

body.dark-mode .amount input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

body.dark-mode .amount::after {
  color: #9ca3af;
}

.category {
  margin: 0 0 1.6rem;
}

.category p {
  font-size: 1.5rem;
  margin: 0 0 0.8rem;
  color: rgb(42, 41, 41);
  font-weight: 600;
}

.category::after {
  content: "▾";
  position: absolute;
  right: 30px;
  top: 48%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #6b7280;
  pointer-events: none;
}

.custom-select {
  position: relative;
  width: 100%;
  cursor: pointer;
}

.selected {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
  font-size: 16px;
  transition: 0.2s;
}

.selected:hover {
  background-color: #f3f4f6;
}

.custom-select.active .selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.options {
  position: absolute;
  width: 100%;
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  margin-top: 6px;
  display: none;
  overflow: hidden;
  z-index: 10;
}

.custom-select.active .options {
  display: block;
}

.option {
  padding: 12px 16px;
  font-size: 14px;
  transition: 0.2s;
}

.option:hover {
  background-color: #3b82f6;
  color: white;
}

body.dark-mode .selected {
  background-color: #1f2937;
  border: 1px solid #374151;
  color: #f9fafb;
}

body.dark-mode .options {
  background-color: #1f2937;
  border: 1px solid #374151;
}

body.dark-mode .option:hover {
  background-color: #2563eb;
}

body.dark-mode #category-input {
  background-color: #1f2937;
  border: 1px solid #374151;
  color: #f9fafb;
}

body.dark-mode #category-input:hover {
  background-color: #273549;
}

body.dark-mode #category-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
}

body.dark-mode .category::after {
  color: #9ca3af;
}

.description {
  margin: 0 0 1.6rem;
}

.description p {
  font-size: 1.5rem;
  margin: 0 0 0.8rem;
  color: rgb(42, 41, 41);
  font-weight: 600;
}

.description input {
  width: 100%;
  padding: 10px 35px 12px 14px;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
  color: #111827;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.description input:hover {
  border-color: #cbd5e1;
  background-color: #f3f4f6;
}
.description input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background-color: #ffffff;
}
.description {
  position: relative;
}

body.dark-mode .description input {
  background-color: #1f2937;
  border: 1px solid #374151;
  color: #f9fafb;
}

body.dark-mode .description input:hover {
  background-color: #273549;
}

body.dark-mode .description input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

body.dark-mode .description::after {
  color: #9ca3af;
}

.date {
  margin: 0 0 1.6rem;
}

.date p {
  font-size: 1.5rem;
  margin: 0 0 0.8rem;
  color: rgb(42, 41, 41);
  font-weight: 600;
}
.date input {
  width: 100%;
  padding: 10px 35px 12px 14px;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
  color: #111827;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.date input:hover {
  border-color: #cbd5e1;
  background-color: #f3f4f6;
}
.date input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background-color: #ffffff;
}
.date {
  position: relative;
}

body.dark-mode .date input {
  background-color: #1f2937;
  border: 1px solid #374151;
  color: #f9fafb;
}

body.dark-mode .date input:hover {
  background-color: #273549;
}

body.dark-mode .date input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

body.dark-mode .date::after {
  color: #9ca3af;
}

.add-btn {
  margin: 0 0 1.6rem;
}
.add-btn button {
  background-color: #f53f3f;
  border-radius: 0.8rem;
  width: 200px;
  height: 35px;
  border: 1px solid transparent;
  color: white;
  font-weight: 600;
  width: 100%;
  padding: 10px 35px 12px 14px;
  font-size: 16px;
  cursor: pointer;
}

.right-part {
  width: 80%;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.first-right-section {
  padding: 2.4rem;
  background-color: #ffffff;
  border: 1px solid rgb(232, 230, 230);
  border-radius: 1rem;
}

.barchart h2 {
  margin: 0 0 1.6rem;
  font-size: 2.4rem;
  color: rgb(32, 32, 32);
}

.second-right-section {
  background-color: #ffffff;
  border: 1px solid rgb(232, 230, 230);
  border-radius: 1rem;

  padding: 2.4rem;
}

.first-right-pie {
  background-color: #ffffff;
  border: 1px solid rgb(232, 230, 230);
  border-radius: 1rem;
  padding: 2.4rem;
}

body.dark-mode .first-right-pie {
  background-color: #0f2e43;
  border: transparent;
}

.filters {
  width: 80%;
}
.filters h3 {
  margin: 0 0 1.6rem;
  font-size: 1.8rem;
  color: rgb(34, 33, 33);
}

.category p {
  font-weight: 500;
}

.dates {
  display: flex;
  gap: 2rem;
  margin: 0 0 1.6rem;
}
.start-date p {
  margin: 0 0 0.8rem;
  font-size: 1.4rem;
  font-weight: 500;
}

.start-date input {
  padding: 0.8rem 1.6rem;
  background-color: #ffffff;
  border: 1.5px solid rgb(201, 199, 199);
  border-radius: 0.8rem;
}

.end-date p {
  margin: 0 0 0.8rem;
  font-size: 1.4rem;
  font-weight: 500;
}
.end-date input {
  padding: 0.8rem 1.6rem;
  background-color: #ffffff;
  border: 1.5px solid rgb(201, 199, 199);
  border-radius: 0.8rem;
}

.reset-btn button {
  padding: 0.8rem 1.6rem;
  font-size: 1.6rem;
  background-color: #f5f5f5;
  width: 95%;
  border: 1.5px solid rgb(201, 199, 199);
  border-radius: 1rem;
}

.third-right-section {
  background-color: #ffffff;
  border: 1px solid rgb(232, 230, 230);
  border-radius: 1rem;
  padding: 3.2rem;
}

.third-right-section p {
  font-size: 1.8rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.transaction-item small {
  color: gray;
}

.transaction-item span.income {
  color: #10b981;
  font-weight: bold;
}

.transaction-item span.expense {
  color: #ef4444;
  font-weight: bold;
}

.calendar-icon {
  position: absolute;
  right: 12px;
  top: 68%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #6b7280;
  pointer-events: none;
}

.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: #f9fafb;
  transition: 0.2s ease;
}

.transaction-item:hover {
  transform: translateY(-2px);
}

.transaction-item .left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.transaction-item .icon {
  font-size: 3rem;
}

.transaction-item .info h4 {
  margin: 0;
  font-size: 1.3rem;
}

.transaction-item .info p {
  margin: 0;
  font-size: 12px;
  color: gray;
}

body.dark-mode .transaction-item {
  background: #1f2937;
}

.action-icons {
  margin-left: 10px;
  cursor: pointer;
}

.action-icons i {
  margin-left: 6px;
  font-size: 14px;
  transition: 0.2s;
}

.right span {
  font-weight: 600;
  font-size: 1.3rem;
}
.action-icons i:hover {
  transform: scale(1.2);
}

.recent-transaction {
  margin-bottom: 2rem;
}

.transaction-item .icon {
  width: 40px;
  height: 40px;
  background: #e0f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 18px;
  color: #2563eb;
}

body.dark-mode .transaction-item .icon {
  background: #1e3a8a;
  color: #60a5fa;
}

.action-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-icons i {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.1s ease;
}

.edit-btn {
  background: #e0f2fe;
  color: #2563eb;
}

.edit-btn:hover {
  background: #2563eb;
  color: white;
}

.delete-btn {
  background: #fee2e2;
  color: #ef4444;
}

.delete-btn:hover {
  background: #ef4444;
  color: white;
}

.transaction-item .right {
  display: flex;
  align-items: center;
  gap: 12px;
}

#cancel-edit-btn {
  margin-top: 10px;
  background: #e5e7eb;
  color: #374151;
  border-radius: 8px;
  padding: 10px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
}

#cancel-edit-btn:hover {
  background: #d1d5db;
}

.description-text {
  font-size: 13px;
  color: #6b7280;
  margin: 2px 0;
}

.date-text {
  font-size: 12px;
  color: #9ca3af;
}

.dark-mode .description-text {
  color: #9ca3af;
}

.dark-mode .date-text {
  color: #6b7280;
}

.expense-breakdown {
  margin-top: 1rem;
  font-size: 1.3rem;
}
body.dark-mode .expense-breakdown {
  color: #eae9e9;
}

.pie-wrapper {
  width: 300px;
  height: 250px;
  margin: 0 auto;
  position: relative;
}

.filter-section {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 10px;
}

.filter-section h2 {
  margin-bottom: 15px;
  font-size: 19px;
  font-weight: 700;
}

body.dark-mode .filter-section h2 {
  color: #efeeee;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  align-items: end;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-field label {
  font-size: 14px;
  font-weight: 500;
}

body.dark-mode .filter-field label {
  color: #e4e2e2;
}

body.dark-mode .filter-field select {
  background-color: #273549;
  border: transparent;
  color: rgb(211, 211, 211);
}
body.dark-mode .filter-field input {
  background-color: #273549;
  border: transparent;
}

body.dark-mode .date-wrapper input {
  color: rgb(211, 211, 211);
}

.filter-field input,
.filter-field select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  outline: none;
  transition: 0.2s ease;
}

.filter-field input:focus,
.filter-field select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.filter-field select {
  cursor: pointer;
  background: white;
}

.date-wrapper {
  position: relative;
}

.date-wrapper input {
  padding-right: 35px;
}

.date-wrapper .calendar-icon {
  position: absolute;
  right: 10px;
  bottom: 10px;
  color: #6b7280;
  cursor: pointer;
}

.reset-btn {
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: #f53f3f;
  color: white;
  cursor: pointer;
  font-weight: 500;
  transition: 0.2s;
}

.reset-btn:hover {
  opacity: 0.9;
}

.footer {
  margin-top: 3rem;
  padding: 1.5rem;
  text-align: center;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  font-size: 1.4rem;
  color: #6b7280;
}

.footer .name {
  color: #2563eb;
  font-weight: 600;
}

.footer p {
  margin: 0;
}

body.dark-mode .footer {
  background: #0f2e43;
  border-top: 1px solid #1f2937;
  color: #9ca3af;
}

body.dark-mode .footer .name {
  color: #60a5fa;
}
