: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;
  max-width: 100vw;
  overflow: hidden;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

/* Changed these rules to position elements */
.menu-toggle {
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--title-color);
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 1001;
}
.user-info {
  order: 1; /* Keeps header text on the left */
  flex-grow: 1;
  margin-left: 20px;
}

.user-info h1 {
  color: var(--title-color);
  font-size: 1.8rem;
}

.user-name {
  color: var(--title-color);
  font-size: 1.8rem;
  margin-bottom: 5px;
}

.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;
}

/* Cards Layout */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

.card {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.card-header i {
  font-size: 1.8rem;
  color: var(--theme-color);
}

.card-header h3 {
  color: var(--text-color);
  font-size: 1.1rem;
  font-weight: 500;
}

.card-amount {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--title-color);
  margin-bottom: 15px;
}

.card-footer {
  color: #888;
  font-size: 0.9rem;
  border-top: 1px solid #eee;
  padding-top: 15px;
}

/* Responsive Cards */
@media (max-width: 768px) {
  .cards-container {
    grid-template-columns: 1fr;
  }

  .card-amount {
    font-size: 1.8rem;
  }
}

@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;
  }
}

.transfer-container {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--title-color);
  font-weight: 500;
}

input,
select {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
}

.error-message {
  color: var(--withdrawal-color);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.confirmation-details {
  margin: 20px 0;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
}

.confirmation-details p {
  margin: 10px 0;
  padding: 5px 0;
  border-bottom: 1px solid #eee;
}

.confirmation-details strong {
  color: var(--title-color);
  min-width: 120px;
  display: inline-block;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

#taxCodeModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  width: 400px;
}

.progress-bar {
  height: 10px;
  background: #eee;
  border-radius: 5px;
  margin: 1rem 0;
  position: relative;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--theme-color);
  border-radius: 5px;
  transition: width 0.3s linear; /* Ensure this is present */
  position: absolute;
  left: 0;
  top: 0;
}

.progress-text {
  text-align: center;
  margin-top: 10px;
  font-weight: bold;
  color: var(--theme-color);
  transition: opacity 0.3s ease; /* Smooth text updates */
}

.code-help {
  padding: 15px;
  margin: 15px 0;
  border-radius: 5px;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.code-help i {
  font-size: 1.2em;
}

.code-help.tax {
  background: #e8f5e9;
  border-left: 4px solid #2ecc71;
  color: #1b5e20;
}

.code-help.aml {
  background: #fff3e0;
  border-left: 4px solid #f39c12;
  color: #e65100;
}

.code-help.imf {
  background: #e3f2fd;
  border-left: 4px solid #3498db;
  color: #0d47a1;
}

.code-help.anti-terror {
  background: #ffebee;
  border-left: 4px solid #c62828;
  color: #b71c1c;
}

.currency-input {
  position: relative;
}
.currency-symbol {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: bold;
  color: #666;
}
input#amount {
  font-family: monospace;
  letter-spacing: 0.5px;
}

.help-text {
  font-size: 0.9rem;
  color: #666;
  margin: 10px 0;
}

.success-icon {
  color: #2ecc71;
  font-size: 4rem;
  margin: 20px 0;
  text-align: center;
  width: 100%;
}

.transfer-amount {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--title-color);
  text-align: center;
  margin: 20px 0;
}

.transfer-summary {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 10px;
  margin: 20px 0;
}

.transfer-summary p {
  margin: 15px 0;
  font-size: 1.1rem;
}

.success-details {
  text-align: center;
}

.modal-content h3 {
  color: var(--title-color);
  margin-bottom: 15px;
}

.modal-content p {
  margin: 10px 0;
  color: var(--text-color);
}

#taxCode {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: monospace;
  letter-spacing: 1px;
}

.progress-container {
  margin: 20px 0;
}

.progress-text {
  text-align: center;
  margin-top: 10px;
  font-weight: bold;
  color: var(--theme-color);
}

.status-message {
  text-align: center;
  margin: 15px 0;
  color: var(--text-color);
}

.tax-code-form {
  margin-top: 25px;
}

.submit-btn {
  width: 100%;
  padding: 12px;
  background: var(--theme-color);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 15px;
}

.user-name {
  color: var(--title-color);
  font-size: 1.8rem;
  margin-bottom: 5px;
}

.login-details {
  font-size: 0.9rem;
  color: var(--text-color);
}

.login-details span:not(:last-child)::after {
  content: "•";
  margin: 0 10px;
}

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  max-width: 100%;
}

.card {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.balance-card {
  background: linear-gradient(
    135deg,
    var(--theme-color),
    var(--secondary-color)
  );
  color: white;
}

.balance-card h2 {
  font-size: 2rem;
  margin: 10px 0;
}

.transaction-item {
  display: flex;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

.amount {
  color: var(--theme-color);
  font-weight: bold;
  font-size: 1.2rem;
}

.amount.positive {
  color: #2ecc71;
}

.chart-container {
  height: 400px;
  background: white;
  border-radius: 15px;
  padding: 20px;
  margin-top: 25px;
}

.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: 600px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.close {
  position: absolute;
  right: 20px;
  top: 10px;
  font-size: 28px;
  cursor: pointer;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--theme-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.cancel-btn {
  background-color: #e22026 !important;
  margin-top: 15px;
  width: 100%;
  color: #f0f0f0;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .sidebar {
    left: -250px; /* Hidden by default on mobile */
  }

  .sidebar.inactive {
    left: -250px;
  }

  .sidebar.active {
    left: 0;
  }

  .main-content {
    padding: 20px;
  }
  .modal-content {
    width: 95%;
    padding: 1.5rem;
  }
}


@media (max-width: 480px) {
  .modal-content {
    padding: 1rem;
  }

  #verificationCode {
    font-size: 14px;
  }

  .filter-btn {
    padding: 10px;
    font-size: 14px;
  }

  .progress-text {
    font-size: 14px;
  }
}
