html,
body {
  height: 100%;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #121212;
  color: #e0e0e0;
  margin: 0;
  transition: margin-left 0.5s;
}

h1,
h2 {
  color: #ffffff;
  border-bottom: 2px solid #007bff;
  padding-bottom: 10px;
  margin-top: 0;
}

p {
  line-height: 1.6;
}

a {
  color: #3391ff;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.card {
  background-color: #1e1e1e;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn {
  background-color: #007bff;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  width: 100%;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #0056b3;
}

/* ---  Login/Signup pages --- */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 100vh;
  padding: 20px;
  box-sizing: border-box;
}

.auth-container .card {
  width: 100%;
  max-width: 400px;
  padding: 30px;
}

.auth-container h2 {
  text-align: center;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 10px;
}

.auth-container p {
  text-align: center;
  color: #888;
  margin-bottom: 25px;
}

.auth-link {
  text-align: center;
  margin-top: 20px;
}

.error-message {
  color: #dc3545;
  text-align: center;
  margin-top: 15px;
  min-height: 1em;
  font-weight: bold;
}

/* --- end of sign in sign up page --- */
.main-content {
  padding: 20px;
}

header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

header h1 {
  margin: 0 0 0 15px;
  border-bottom: none;
  padding-bottom: 0;
}

/* --- FORM STYLES (--- */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px;
  background-color: #333;
  border: 1px solid #555;
  border-radius: 5px;
  color: #e0e0e0;
  font-size: 1rem;
  box-sizing: border-box;
}

#form-message {
  text-align: center;
  margin-top: 15px;
  font-weight: bold;
}

/* --- SIDE MENU --- */
.sidenav {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  background-color: #1e1e1e;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 60px;
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.5);
}

.sidenav a {
  padding: 10px 15px 10px 32px;
  text-decoration: none;
  font-size: 1.2rem;
  color: #818181;
  display: block;
  transition: 0.3s;
}

.sidenav a:hover,
.sidenav a.active {
  color: #f1f1f1;
  background-color: #007bff;
}

.sidenav .close-btn {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
}

.menu-btn {
  font-size: 24px;
  cursor: pointer;
  background: none;
  border: none;
  color: #e0e0e0;
}

#overlay {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
}

#logout-button {
  background-color: #0056b3;
  bottom: 20px;
  width: 100%;
}

/* --- DASHBOARD  --- */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.total-amount {
  font-size: 2.5rem;
  font-weight: bold;
  color: #007bff;
  text-align: center;
  margin-top: 20px;
}

.filter-container {
  text-align: center;
  margin-bottom: 20px;
}

#time-filter {
  padding: 8px;
  background-color: #333;
  border: 1px solid #555;
  border-radius: 5px;
  color: #e0e0e0;
}

.chart-container {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 250px;
  padding: 10px;
  border-radius: 5px;
  background-color: #2c2c2c;
  gap: 5px;
}

.chart-entry {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.chart-amount {
  font-size: 0.8rem;
  color: #e0e0e0;
  margin-bottom: 5px;
  font-weight: bold;
}

.chart-bar {
  width: 70%;
  max-width: 50px;
  background-color: #007bff;
  position: relative;
  border-radius: 3px 3px 0 0;
  transition: background-color 0.3s;
}

.chart-bar:hover {
  background-color: #0056b3;
}

.chart-label {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #aaa;
}

.expense-list {
  list-style: none;
  padding: 0;
}

.expense-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #333;
}

.expense-list li:last-child {
  border-bottom: none;
}

.expense-list .reason {
  font-weight: bold;
}

/* --- Floating Action Button --- */
#add-expense-fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #007bff;
  color: white;
  border-radius: 50%;
  text-align: center;
  font-size: 36px;
  line-height: 60px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 100;
  transition: background-color 0.3s, transform 0.2s;
}

#add-expense-fab:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

/* ---EXPENSES PAGE --- */

.search-container {
  margin: 20px 0;
}

#search-input {
  width: 100%;
  padding: 10px;
  background-color: #333;
  border: 1px solid #555;
  border-radius: 5px;
  color: #e0e0e0;
  font-size: 1rem;
  box-sizing: border-box;
}

#search-input::placeholder {
  color: #888;
}

/* Table */
.table-container {
  overflow-x: auto;
  margin-top: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #333;
}

thead th {
  background-color: #2c2c2c;
  color: #ffffff;
  font-weight: 600;
}

tbody tr:hover {
  background-color: #2a2a2a;
}

/* Full Expense List  */
#full-expense-list {
  list-style: none;
  padding: 0;
}

#full-expense-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 10px;
  border-bottom: 1px solid #333;
  flex-wrap: wrap;
}

#full-expense-list li:last-child {
  border-bottom: none;
}

#full-expense-list .reason {
  font-weight: bold;
  font-size: 1.1rem;
}

#full-expense-list .meta {
  display: block;
  color: #888;
  font-size: 0.9rem;
}

#full-expense-list .amount {
  font-weight: bold;
  font-size: 1.1rem;
  color: #e0e0e0;
  margin-left: 15px;
}

/* --- Delete Button --- */
.delete-btn {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-left: 15px;
  transition: background-color 0.3s;
}

.delete-btn:hover {
  background-color: #c82333;
}
