:root {
  --theme-color: #e22026;
  --secondary-color: #550401;
  --text-color: #545151;
  --title-color: #1e242a;
  --deposit-color: #2ecc71;
  --withdrawal-color: #e22026;
  --background-color: #f5f6fa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

body {
  background-color: var(--background-color);
  overflow-x: hidden;
}

.sidebar {
  width: 250px;
  height: 100vh;
  background-color: var(--theme-color);
  padding: 20px;
  color: white;
  position: fixed;
  transition: all 0.3s ease;
  z-index: 1000;
}

.logo-img {
  width: 180px;
  margin-bottom: 30px;
  display: block;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  margin: 10px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  text-decoration: none;
}

.nav-item:hover,
.nav-item.active {
  background-color: var(--secondary-color);
  transform: translateX(5px);
}

.main-content {
  margin-left: 250px;
  min-height: 100vh;
  padding: 30px;
  transition: all 0.3s ease;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

/* Changed these rules to position elements */
.menu-toggle {
  order: 2; /* Moves hamburger to the right */
  cursor: pointer;
  font-size: 1.5rem;
}

.user-info {
  order: 1; /* Keeps header text on the left */
}

.user-info h1 {
  color: var(--title-color);
  font-size: 1.8rem;
}

.transactions-container {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filters {
  margin-bottom: 25px;
  display: flex;
  gap: 15px;
}

.filter-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 5px;
  background: #f0f0f0;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-btn.active {
  background: var(--theme-color);
  color: white;
}

.transactions-table {
  width: 100%;
  border-collapse: collapse;
}

.transactions-table th,
.transactions-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.transactions-table th {
  background-color: var(--theme-color);
  color: white;
  font-weight: 600;
}

.deposit-amount {
  color: var(--deposit-color);
  font-weight: 600;
}

.withdrawal-amount {
  color: var(--withdrawal-color);
  font-weight: 600;
}

.settings-container {
  display: grid;
  gap: 25px;
  margin-top: 25px;
}

.security-card,
.notifications-card {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section-title {
  color: var(--title-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--background-color);
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--theme-color);
}

input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.device-list {
  margin-top: 15px;
}

.device-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.btn {
  padding: 8px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--theme-color);
  color: white;
}

.btn-danger {
  background-color: var(--withdrawal-color);
  color: white;
}

/* Modal styles for Change Password */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.modal-content h3 {
  color: var(--title-color);
  margin-bottom: 1rem;
}

.modal .close {
  position: absolute;
  right: 20px;
  top: 12px;
  font-size: 24px;
  cursor: pointer;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-color);
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

@media (max-width: 768px) {
  .sidebar {
    left: -250px;
  }

  .sidebar.active {
    left: 0;
  }

  .main-content {
    margin-left: 0;
    padding: 20px;
  }

  .transactions-table {
    display: block;
    overflow-x: auto;
  }

  .header {
    position: relative;
  }

  .menu-toggle {
    position: absolute;
    right: 0;
  }
}
