:root {
  --bg: #e0e5ec;
  --shadow-light: #ffffff;
  --shadow-dark: #a3b1c6;
  --text: #44474a;
  --accent: #27ae60;
  --danger: #e74c3c;
}

[data-theme="dark"] {
  --bg: #2d3436;
  --shadow-light: #3b4446;
  --shadow-dark: #1e2324;
  --text: #dfe6e9;
  --accent: #2ecc71;
  --danger: #ff7675;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  transition: all 0.4s ease;
}

body {
  min-height: 100vh;
  padding: 0 20px;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  max-width: 500px;
  margin: auto;
  padding: 30px;
  border-radius: 40px;
  background: var(--bg);
  box-shadow:
    10px 10px 20px var(--shadow-dark),
    -10px -10px 20px var(--shadow-light);

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

    h1 {
      margin: 0;
      font-size: 1.2rem;
    }

    .neu-btn-circle {
      width: 45px;
      height: 45px;
      border-radius: 50%;
      background: var(--bg);
      border: none;
      box-shadow:
        5px 5px 10px var(--shadow-dark),
        -5px -5px 10px var(--shadow-light);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.2rem;

      &:active {
        box-shadow:
          inset 5px 5px 10px var(--shadow-dark),
          inset -5px -5px 10px var(--shadow-light);
      }
    }
  }
}

.dashboard {
  margin-bottom: 30px;

  .neu-card {
    padding: 20px;
    border-radius: 25px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow:
      inset 5px 5px 10px var(--shadow-dark),
      inset -5px -5px 10px var(--shadow-light);

    .balance-val {
      font-size: 2rem;
      font-weight: 800;
      color: var(--text);
      margin: 10px 0;
    }

    .savings-val {
      color: var(--accent);
      font-weight: bold;
    }
  }
}

input,
select {
  width: 100%;
  border: none;
  outline: none;
  padding: 15px;
  border-radius: 15px;
  background: var(--bg);
  color: var(--text);
  margin-bottom: 15px;
  box-shadow:
    inset 3px 3px 6px var(--shadow-dark),
    inset -3px -3px 6px var(--shadow-light);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2344474A'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 10px center;
  background-size: 30px;
}

.btn-group {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.neu-button {
  flex: 1;
  padding: 15px;
  border-radius: 15px;
  border: none;
  background: var(--bg);
  color: var(--text);
  font-weight: bold;
  cursor: pointer;
  box-shadow:
    6px 6px 12px var(--shadow-dark),
    -6px -6px 12px var(--shadow-light);

  &.w100 {
    width: 100%;
    margin-top: 25px;
  }

  &:active {
    box-shadow:
      inset 4px 4px 8px var(--shadow-dark),
      inset -4px -4px 8px var(--shadow-light);
  }

  &.btn-green {
    color: var(--accent);
  }

  &.btn-red {
    color: var(--danger);
  }
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
  z-index: 1000;

  align-items: center;
  justify-content: center;

  .modal-content {
    background: var(--bg);
    width: 90%;
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    border-radius: 30px;
    box-shadow:
      15px 15px 30px var(--shadow-dark),
      -15px -15px 30px var(--shadow-light);
    position: relative;
    translate: 0 calc(50vh - 50%);

    h3 {
      text-align: center;
      margin-bottom: 20px;
    }

    p {
      text-align: center;
      margin-bottom: 20px;
    }
  }

  .history-item {
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 15px;
    box-shadow:
      4px 4px 8px var(--shadow-dark),
      -4px -4px 8px var(--shadow-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

.backup-section {
  margin-top: 25px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;

  .small-btn {
    font-size: 0.75rem;
    opacity: 0.7;
  }
}

@media (min-width: 992px) {
  .container {
    padding: 15px;
    border-radius: 20px;

    .header {
      margin-bottom: 15px;
    }
  }
  .dashboard {
    margin-bottom: 15px;

    .neu-card {
      padding: 10px;
      border-radius: 12.5px;
      margin-bottom: 10px;
    }
  }

  input,
  select {
    border-radius: 10px;
    margin-bottom: 10px;
  }

  .btn-group {
    margin-top: 5px;
  }

  .neu-button {
    border-radius: 10px;

    &.w100 {
      margin-top: 15px;
    }
  }

  .backup-section {
    margin-top: 15px;
  }
}
