/* Default light theme */
body[data-theme="light"] {
  --bg-color: #ffffff;
  --text-color: #222;
  --card-bg: #f5f5f5;
}

/* Dark theme */
body[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --text-color: #fff;
  --card-bg: #2a2a2a;
}

.popup {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #2563eb;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

.popup.show {
  opacity: 1;
  transform: translateY(0);
}

.popup.error {
  background: #dc2626; /* red for errors */
}

.hidden {
  display: none;
}

main h1 {
  margin-bottom: 20px;
}

.settings-card {
    background: var(--bg-color);
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }

  .settings-section {
    margin-bottom: 32px;
  }

  .settings-section h2 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    margin-bottom: 16px;
  }

  label {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
  }

  input,
  select {
    width: 100%;
    padding: 10px 14px;
    font-size: 16px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    outline: none;
    box-sizing: border-box;
    background: white;
  }

  input:focus,
  select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  }

  .readonly-email {
    background-color: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.8;
  }

  .profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .preferences-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
  }

  .currency-select {
    position: relative;
  }

  .currency-select i {
    position: absolute;
    left: 12px;
    top: 68%;
    transform: translateY(-50%);
    color: #6b7280;
  }

  .currency-select select {
    padding-left: 34px;
  }

  .toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: #e5e7eb;
    border-radius: 24px;
    cursor: pointer;
    transition: 0.2s ease;
  }

  .toggle::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: 0.2s ease;
  }

  .toggle.active {
    background: #2563eb;
  }

  .toggle.active::before {
    transform: translateX(20px);
  }

  .theme-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .theme-toggle span {
    font-size: 14px;
    color: #374151;
  }

  /* ===== Notifications ===== */
  .notifications-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .notif-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .notif-item span {
    font-size: 15px;
    color: var(--text-color);
  }

  /* ===== Save Button ===== */
  .save-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #2563eb;
    color: white;
    font-size: 16px;
    font-weight: 500;
    border: none;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s ease;
  }

  .save-btn:hover {
    background: #1d4ed8;
  }


@media only screen and (max-width: 767px) {
   .profile-grid {
      grid-template-columns: 1fr;
    }

    .preferences-grid {
      grid-template-columns: 1fr;
    }
}
